home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / E_bliss / cm_id7.txt < prev    next >
Text File  |  2000-05-25  |  3KB  |  88 lines

  1. Tutorial for Crackme 7 By tC
  2. ----------------------------
  3.  
  4.  
  5.  
  6. The Maker of this crackme writes:
  7. ---------------------------------
  8.  
  9. Hi Crackers.                        
  10. Today you have to patch the CrackMe that it         
  11. cannot expire.                          
  12. Little challenge: Try to change only ONE BYTE!      
  13.                               
  14. Send your solutions (only offset & byte please) to: 
  15.       bombasticx@gmx.net                      
  16.                               
  17. If you are at least the third one who send me his   
  18. solution or maybe a tutorial, your name (& tutorial)
  19. will be appear on my site.                  
  20.                               
  21. Thanx for tryin' my CrackMez.                  
  22. tC...'99    
  23.  
  24.  
  25.  
  26. Ok, if you run the Crackme you can read (and notice) that this crackme only runs for 20 seconds.
  27. Ofcourse we don`t want this and also don`t want to pay 450 dollar to register :)
  28. Most of the programs that only run a certain time (like 30 mins) use the Settimer function.
  29. To find out if this crackme is using this function we set a breakpoint on it in Softice.
  30. And we break in softice at this location:
  31.  
  32. :0043D3EF E8648FFCFF              Call 00406358    ; Settimer
  33. :0043D3F4 85C0                    test eax, eax
  34. :0043D3F6 7521                    jne 0043D419
  35. :0043D3F8 8D55FC                  lea edx, dword ptr [ebp-04]
  36. :0043D3FB A104ED4300              mov eax, dword ptr [0043ED04]
  37. :0043D400 E8E779FCFF              call 00404DEC
  38. :0043D405 8B4DFC                  mov ecx, dword ptr [ebp-04]
  39. :0043D408 B201                    mov dl, 01
  40. :0043D40A A1ACB34000              mov eax, dword ptr [0040B3AC]
  41. :0043D40F E810B4FCFF              call 00408824
  42. :0043D414 E8835EFCFF              call 0040329C
  43.  
  44. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  45. |:0043D3D7(C), :0043D3DD(C), :0043D3E4(C), :0043D3F6(C)
  46. |
  47. :0043D419 33C0                    xor eax, eax
  48.  
  49.  
  50. Hmm, we must find some way to let the program never execute/set that (Set)Timer at 0043D3EF.
  51. If you look at 0043D419 you see that that line is referenced by 4 jumps. If we could let the 
  52. program jump there, the Call 00406358 (settimer) will never be executed and the timer won`t get
  53. set, so the program keeps running forever.
  54.  
  55. Let`s look at the jumps, they are just above the call.
  56.  
  57.  
  58. :0043D3CD E8668EFCFF              Call 00406238
  59. :0043D3D2 8B7324                  mov esi, dword ptr [ebx+24]
  60. :0043D3D5 85F6                    test esi, esi
  61. :0043D3D7 7440                    je 0043D419        ; Jump 1
  62. :0043D3D9 807B3400                cmp byte ptr [ebx+34], 00
  63. :0043D3DD 743A                    je 0043D419        ; Jump 2
  64. :0043D3DF 66837B2E00              cmp word ptr [ebx+2E], 0000
  65. :0043D3E4 7433                    je 0043D419        ; Jump 3
  66. :0043D3E6 6A00                    push 00000000
  67. :0043D3E8 56                      push esi
  68. :0043D3E9 6A01                    push 00000001
  69. :0043D3EB 8B4328                  mov eax, dword ptr [ebx+28]
  70. :0043D3EE 50                      push eax
  71.  
  72.  
  73. If we look at line 0043D3D7 we see the first jump, if we reverse it (make it jne) the jump is taken and the call to Settimer at 0043D3EF is skipped. Normally there is no jump and the program
  74. proceeds to line 0043D3EF (Settimer). And our goal is to change only 1 byte so we can change
  75.  
  76.  
  77. je 0043D419
  78.  
  79. to
  80.  
  81. jne 0043D419
  82.  
  83.  
  84. And if we run the program it keeps running forever :)
  85.  
  86.  
  87. Dracs '99
  88.