home *** CD-ROM | disk | FTP | other *** search
/ KeyGen Studio 2002 / KeyGen_Studio_2002.iso / Tutorials / CrackMesCbjNet / kpk4-sushi-dos.txt < prev    next >
Encoding:
Text File  |  2001-09-21  |  2.2 KB  |  73 lines

  1. doc:  How to crack Sushi's dos crackme
  2. tools: SIce
  3. level: 1
  4. author: kpak4o/GC
  5. approach: brute
  6.  
  7. Run the progy and choose enter searial (1)
  8. /* by the way nice interface Sushi :) */
  9. Press Ctrl-D then in SIce a few `p ret`
  10. and you should be here:
  11. 128E:  mov ah, 01
  12. 1290:  int 16
  13. 1292:  jz 12EE
  14. 1294:  pushf
  15. 1295:  xor ah, ah
  16. 1297:  int 16
  17.  
  18. Arhh! The good old int 16. ah=1 means check for
  19. key . ah=0 means read the key. so bpx 1295 and go.
  20. Now when you enter a key you end up at 1295.
  21. Step through the code a little and you will see
  22. that AL is compared to 08h, 1Bh and 0Dh.
  23. Notice that 0Dh is the ASCII code of 'ENTER'.
  24. Follow that branch :
  25. 504B:  mov byte [cs:di], 0
  26. 504F:  sub di, 25AAh        ;25AAh should be the start of the buffer
  27. 5053:  mov [cs:25A6h], di       ;[cs:25A6] holds the length of the str
  28. 5058:  pop dword [cs:2746h]
  29.  
  30. When you hit `ENTER`, the string is zero delimitered.
  31. Then its length is calculated and stored.
  32. So check at cs:25AA and you will see your beloved
  33. serial number.
  34. bpm cs:25AA and go but don't forget to disable your
  35. previous break points.
  36. After a while you are at:
  37. 2D13:  lodsb
  38. 2D14:  cmp al, 2Eh
  39.        jz 2D55h
  40.        cmp al, 39h
  41.        ja 2D52h
  42.        cmp al, 30h
  43.        jb 2D52h
  44.        sub al, 30h
  45. ;; and so on .....
  46.  
  47. This is only a small part of the loop that converts
  48. your string to a number. Follow it closely and soon
  49. you will see
  50.   FILD QWORD CS:[27D2]
  51. WF and see that you number goes into the FP stack.
  52. Now carefully watch for any FP instructions and you
  53. won't miss :
  54.   FSTP REAL4 [784]    ; your number is stored at 784
  55.   CALL 0000
  56.   WAIT
  57.   FILD DWORD [796]    ;WOW! 11223344 goes into FP stack
  58.   WAIT
  59.   FCOMP REAL4 [784]    ; your number is compared with 11223344
  60.  
  61. Usually one should stop here and try the 11223344,
  62. because there is a great chance that's the serial.
  63. But I had the inertia and after a few lines i saw the
  64. same thing but with 7844521 instead of 11223344.
  65. Also I did see this message into the exe
  66. 'I Always enter that, but this time it aint right =>'
  67. with a hex editor before the debugging. So I already
  68. new what was going on. What about you?
  69.  
  70. Note:
  71.  Make sure that 7844521 is hard coded into the exe.
  72.  For example I searched the exe for A9B277 and
  73.  found it at the end followed by AB4130. :P