.

Steps for The Ethical Hacker to learn programming

<<

Kev

Post Sun Jun 24, 2007 2:39 pm

Steps for The Ethical Hacker to learn programming

I am a big believer that the Ethical Hacker should know at least some basic programming. The first place to start is with basic Bash scripts. They are so easy and you get results right away. Then go onto to some basic HTML.  Then either Python or Perl and eventually to C. C is the ultimate goal and it is without question the traditional code of the hacker.  Why not just start with C?  You could and some do, but I have seen too many people get stuck because C can be a little obscure for those new to programming.

Python or Perl are good languages to grasp before taking on C. Even when you are well versed in C there are many times you would rather write a quick script in these languages rather than C.  The natural question is, if you had to choose one over the other, Perl or Python, which one would be the better choice?  For me, Python is really the way to go.  I feel its easier to learn, has more readable code , integrates into java better and can port a little easier because it doesn’t lean has heavily to Unix as Perl. I also feel Python makes the jump to learning C more natural than from Perl.

I wote this in the opinion area because that is what it is, my opinion. I would be curious if others diifer from this progression .
Last edited by Kev on Sun Jun 24, 2007 2:43 pm, edited 1 time in total.
<<

p0et

User avatar

Full Member
Full Member

Posts: 197

Joined: Thu Nov 02, 2006 4:38 pm

Location: Victoria, Canada

Post Sun Jun 24, 2007 9:34 pm

Re: Steps for The Ethical Hacker to learn programming

That's pretty interesting, Kev. I just dabbled a bit in HTML, Javascript, C and Perl but now don't really know enough to even put a program (or anything) together in any of those languages! Whenever I sit down and try to learn a language, it seems a little overwelming and boring to me. I enjoy learning about networking and security too much to switch over and study programming instead. It seems like I'd need to put in some good time that's usually spent with ethical hacking into programming.  I'll check it out though, bash is pretty cool... thanks for sharing your opinion!  ;)
GCIH, Security+, Network+, A+, MCP, DCSE
<<

jimbob

Post Mon Jun 25, 2007 7:41 am

Re: Steps for The Ethical Hacker to learn programming

A often overlooked programming skill I consider essential for ethical hacking is shell scripting. No matter what Unix-like environment you're in you always have the shell the fall back on and you cannot assume Perl or Python are installed. The same could be said (to a lesser extent perhaps) of  Windows batch scripting.

Knowing how to program in a one of the 'lowest common denominator' languages is pretty useful since wherever you have a foothold you have an interpreter you can use.

Jim
<<

Kev

Post Mon Jun 25, 2007 3:55 pm

Re: Steps for The Ethical Hacker to learn programming

Thanks for the input. If you find programming a little boring there is one little exercise one can do to make it a little more interesting. Try writing a basic script to ping all the live hosts on a network on several different platforms. First write a bash script. Then write one in Python and then finally one in C. You can google examples of each.  Once you see how each platform accomplishes the same goal, lights usually go on in peoples head about how programming works. Its actually fun to write a quick program like this and see it work.
<<

invincible

Newbie
Newbie

Posts: 3

Joined: Fri Jul 20, 2007 4:44 am

Post Thu Jul 26, 2007 9:19 am

Re: Steps for The Ethical Hacker to learn programming

I know bash scripting and is trying to learn c .
Thanks for the post .
<<

cleanwithit0607

Newbie
Newbie

Posts: 49

Joined: Thu Mar 27, 2008 5:17 am

Post Sat Jul 26, 2008 6:05 am

Re: Steps for The Ethical Hacker to learn programming

Kev wrote:I am a big believer that the Ethical Hacker should know at least some basic programming. The first place to start is with basic Bash scripts. They are so easy and you get results right away. Then go onto to some basic HTML.  Then either Python or Perl and eventually to C. C is the ultimate goal and it is without question the traditional code of the hacker.  Why not just start with C?  You could and some do, but I have seen too many people get stuck because C can be a little obscure for those new to programming.

Python or Perl are good languages to grasp before taking on C. Even when you are well versed in C there are many times you would rather write a quick script in these languages rather than C.  The natural question is, if you had to choose one over the other, Perl or Python, which one would be the better choice?  For me, Python is really the way to go.  I feel its easier to learn, has more readable code , integrates into java better and can port a little easier because it doesn’t lean has heavily to Unix as Perl. I also feel Python makes the jump to learning C more natural than from Perl.

I wote this in the opinion area because that is what it is, my opinion. I would be curious if others diifer from this progression .



Talk about bringing a thread back from the dead. I like the way you created a roadmap; or path to what a ethical hacker needs as far as programming goes. I never really thought about learning a language, until I started reading about exploits. I will def. keep this thread on my favorites list, so I can stay on track. I already know HTML, I used to code a clan website I had back in the days of, Medal of Honor Allied Assault. But anyways, I guess I will start with Bash Scripting, then onto Python.

Does anybody know of a book, or website that's reputable that can help me learn Bash, and or Python?
A+, Network +, Security +, Linux +,

MCP/MCTS: Vista Config.

Work in progress: CEH

Currently Reading: Hacking-The Art Of Exploitation.

Recommended book: Counter Hack Reloaded.
<<

RoleReversal

User avatar

Hero Member
Hero Member

Posts: 928

Joined: Fri Jan 04, 2008 8:54 am

Location: UK

Post Sat Jul 26, 2008 7:33 am

Re: Steps for The Ethical Hacker to learn programming

Try this EH Thread (dive into python)

Read the rest of the programming board threads for some great resources.

And remember, the search box and google are your friend......
<<

cleanwithit0607

Newbie
Newbie

Posts: 49

Joined: Thu Mar 27, 2008 5:17 am

Post Sat Jul 26, 2008 8:35 am

Re: Steps for The Ethical Hacker to learn programming

RoleReversal wrote:Try this EH Thread (dive into python)

Read the rest of the programming board threads for some great resources.

And remember, the search box and google are your friend......


Thanks man. Yea, I always use google and the search function. I just ask so I can get more opinions. By the way, How's the OSCP course going?
A+, Network +, Security +, Linux +,

MCP/MCTS: Vista Config.

Work in progress: CEH

Currently Reading: Hacking-The Art Of Exploitation.

Recommended book: Counter Hack Reloaded.
<<

Kev

Sr. Member
Sr. Member

Posts: 428

Joined: Sat Sep 29, 2007 12:26 pm

Post Sat Jul 26, 2008 9:38 am

Re: Steps for The Ethical Hacker to learn programming

cleanwithit0607 wrote:Talk about bringing a thread back from the dead.


LOL!  Well it does show you are spending some time going through the forum rather than just making a quick post for help.  Very cool.  Please forgive my leaning towards python. Python was and still is the "darling" language for linux enthusiast. In reality, once you have a grasp of Python, it wont be too hard to get the "feel" of both Perl and Ruby. If you are wanting to import new exploits to Metasploit, a reasonable grasp of those will be important.
Last edited by Kev on Sat Jul 26, 2008 9:40 am, edited 1 time in total.
<<

Gert

Newbie
Newbie

Posts: 1

Joined: Sat Aug 09, 2008 5:00 am

Post Sat Aug 09, 2008 5:27 am

Re: Steps for The Ethical Hacker to learn programming

basic Bash scripts i have a book on Linux Command Line and Shell Scripting is this the same thing as bash scripts.
<<

RoleReversal

User avatar

Hero Member
Hero Member

Posts: 928

Joined: Fri Jan 04, 2008 8:54 am

Location: UK

Post Sat Aug 09, 2008 3:07 pm

Re: Steps for The Ethical Hacker to learn programming

Gert,

Bash is a very common Linux shell, so yes Bash scripting == shell scripting

Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron
.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software