| View previous topic :: View next topic |
| Author |
Message |
CrAckME How do I cheat?
Reputation: 0
Joined: 16 Nov 2013 Posts: 5
|
Posted: Fri Nov 22, 2013 11:31 am Post subject: weird compare(assembly - crackme) |
|
|
Hi there,
I am facing with this "problem":
cmp [ebp-0x8], 0x0534
0x0534 - 05h is non printable character and 34h is 4.
ebp-0x8 is my input.
how can I insert these 0x0534 into ebp-0x8?
I've tried pexpect python module:
| Code: |
#!/usr/python
import pexpect
stage2 = 'A' * 26 + '0' * 4 + "\x05\x34"
child = pexpect.spawn("/root/Desktop/crackme")
print stage2
child.expect("please enter your password:")
child.sendline(stage2)
print child.before
print child.after
child.interact()
|
That doesnt work
I'm using gdb.
|
|
| Back to top |
|
 |
Gniarf Grandmaster Cheater Supreme
Reputation: 43
Joined: 12 Mar 2012 Posts: 1285
|
Posted: Fri Nov 22, 2013 1:13 pm Post subject: |
|
|
Trying a buffer overflow are you?...
Anyway just 'AAAAAAAAAAAAAAAAAAAAAAAAAA0000' in a text file and hex edit it to add the trailing 05 34. Then open it in notepad and copy-paste it into your crackme.
EDIT: that being said, given the asm you provided, I think the trail should be 34 05 instead of 05 34.
_________________
DO NOT PM me if you want help on making/fixing/using a hack. |
|
| Back to top |
|
 |
CrAckME How do I cheat?
Reputation: 0
Joined: 16 Nov 2013 Posts: 5
|
Posted: Fri Nov 22, 2013 1:45 pm Post subject: |
|
|
| Gniarf wrote: | Trying a buffer overflow are you?...
Anyway just 'AAAAAAAAAAAAAAAAAAAAAAAAAA0000' in a text file and hex edit it to add the trailing 05 34. Then open it in notepad and copy-paste it into your crackme.
EDIT: that being said, given the asm you provided, I think the trail should be 34 05 instead of 05 34. |
like that?
prntscr. com/25z8do
|
|
| Back to top |
|
 |
Gniarf Grandmaster Cheater Supreme
Reputation: 43
Joined: 12 Mar 2012 Posts: 1285
|
Posted: Fri Nov 22, 2013 1:59 pm Post subject: |
|
|
More like 4141414141414141414141414141414141414141414141414141303030303405 on the hex side.
_________________
DO NOT PM me if you want help on making/fixing/using a hack. |
|
| Back to top |
|
 |
CrAckME How do I cheat?
Reputation: 0
Joined: 16 Nov 2013 Posts: 5
|
Posted: Fri Nov 22, 2013 2:08 pm Post subject: |
|
|
| Gniarf wrote: | | More like 4141414141414141414141414141414141414141414141414141303030303405 on the hex side. |
I did it with 0x1337 and I couldnt copy-paste the ascii part:
00000000 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 AAAAAAAAAAAAAAAA
00000010 41 41 41 41 41 41 41 41 41 30 30 30 30 37 13 0A AAAAAAAAA00007..
prntscr. com/25zdq3
thank u for your time sir
|
|
| Back to top |
|
 |
Gniarf Grandmaster Cheater Supreme
Reputation: 43
Joined: 12 Mar 2012 Posts: 1285
|
Posted: Fri Nov 22, 2013 2:22 pm Post subject: |
|
|
| Quote: | | 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 30 30 30 30 37 13 0A | I took that, wrote it into a text file with an hex editor (hex side), opened this file with notepad, pressed ctrl+a, ctrl+c, pasted it with notepad in another text file, got a copy of the first file.
You're doing something wrong but I don't know exactly what... Maybe the ctrl+a part.
_________________
DO NOT PM me if you want help on making/fixing/using a hack. |
|
| Back to top |
|
 |
|