The dump looks quite interesting...While glancing over the code we see a call to strcmp @ 0x08048493 with 2 arguments...These arguments must contain the password...
I have commented the above dump to make it more understandable for you guyz!!!

So now that we have came to know the address of the Pass string lets check the data in it...

Lets set a breakpoint at the beginning of the Program..

Code:

(gdb) break main
Breakpoint 1 at 0x8048457

Lets run the program with some args!!

Code:

(gdb) run pass
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/aneesh/articles/crackme pass
Breakpoint 1, 0x08048457 in main ()

Lets step the code now

Code:

(gdb) s
Single stepping until exit from function main,
which has no line number information.
0x001a1140 in strcmp () from /lib/tls/i686/cmov/libc.so.6

Now that we know where the data exists lets examine the address's memory and get the password...

This can be done by 'x' command

Lets see how x works

Code:

(gdb) help x
Examine memory: x/FMT ADDRESS.
ADDRESS is an expression for the memory address to examine.
FMT is a repeat count followed by a format letter and a size letter.
Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),
t(binary), f(float), a(address), i(instruction), c(char) and s(string).
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).
The specified number of objects of the specified size are printed
according to the format.
Defaults for format and size letters are those previously used.
Default count is 1. Default address is following last thing printed
with this command or "print".

The help page of GDB is quite self-explanatory...

So for Examining memory @ address 0x8048585 and display it as a string

would be :-

Code:

(gdb) x/1s 0x8048585
0x8048585: "CraxMe001-Explicted"

So … BOOOM!!!! We have successfully managed to get the pass out of this simple program...

I hope you all liked it and Most Probably will continue Making more advanced articles on debugging..