home *** CD-ROM | disk | FTP | other *** search
- doc: How to crack Sushi's dos crackme
- tools: SIce
- level: 1
- author: kpak4o/GC
- approach: brute
-
- Run the progy and choose enter searial (1)
- /* by the way nice interface Sushi :) */
- Press Ctrl-D then in SIce a few `p ret`
- and you should be here:
- 128E: mov ah, 01
- 1290: int 16
- 1292: jz 12EE
- 1294: pushf
- 1295: xor ah, ah
- 1297: int 16
-
- Arhh! The good old int 16. ah=1 means check for
- key . ah=0 means read the key. so bpx 1295 and go.
- Now when you enter a key you end up at 1295.
- Step through the code a little and you will see
- that AL is compared to 08h, 1Bh and 0Dh.
- Notice that 0Dh is the ASCII code of 'ENTER'.
- Follow that branch :
- 504B: mov byte [cs:di], 0
- 504F: sub di, 25AAh ;25AAh should be the start of the buffer
- 5053: mov [cs:25A6h], di ;[cs:25A6] holds the length of the str
- 5058: pop dword [cs:2746h]
-
- When you hit `ENTER`, the string is zero delimitered.
- Then its length is calculated and stored.
- So check at cs:25AA and you will see your beloved
- serial number.
- bpm cs:25AA and go but don't forget to disable your
- previous break points.
- After a while you are at:
- 2D13: lodsb
- 2D14: cmp al, 2Eh
- jz 2D55h
- cmp al, 39h
- ja 2D52h
- cmp al, 30h
- jb 2D52h
- sub al, 30h
- ;; and so on .....
-
- This is only a small part of the loop that converts
- your string to a number. Follow it closely and soon
- you will see
- FILD QWORD CS:[27D2]
- WF and see that you number goes into the FP stack.
- Now carefully watch for any FP instructions and you
- won't miss :
- FSTP REAL4 [784] ; your number is stored at 784
- CALL 0000
- WAIT
- FILD DWORD [796] ;WOW! 11223344 goes into FP stack
- WAIT
- FCOMP REAL4 [784] ; your number is compared with 11223344
-
- Usually one should stop here and try the 11223344,
- because there is a great chance that's the serial.
- But I had the inertia and after a few lines i saw the
- same thing but with 7844521 instead of 11223344.
- Also I did see this message into the exe
- 'I Always enter that, but this time it aint right =>'
- with a hex editor before the debugging. So I already
- new what was going on. What about you?
-
- Note:
- Make sure that 7844521 is hard coded into the exe.
- For example I searched the exe for A9B277 and
- found it at the end followed by AB4130. :P