home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Mendoza / xoanon-dongle.txt < prev    next >
Text File  |  2000-05-25  |  14KB  |  296 lines

  1. How to undongle by +Xoanon
  2.  
  3.      Well, i have seen some of my previous works published by the +HCU. And
  4.      for me this is already enough... Wow! To be on a page together with
  5.      the "Gotha" of cracking!!! So i decided to start working on a more
  6.      serious project, a cracking subsector that only REAL +crackers can
  7.      face: DONGLES! Eh eh.... well, i have seen that the +HCU needs
  8.      something about dongles, so why should I not try? Let's see....
  9.  
  10. Prologue:
  11.  
  12.      First of all, i decided to try this donglecrack 'coz i don't know of
  13.      ANY version of Cubase 3.0 working (i mean REAL 100% cracked). Maybe
  14.      there are newer versions out (i think 3.05 or more), but i'm not sure
  15.      if are cracked well, coz i haven't tried them.
  16.  
  17.      And, the reason of this is quite simple: many crackers tend to not
  18.      even trying out the programs once they THINK they've cracked them, and
  19.      since Cubase has a funny trick (to let you think you've cracked it
  20.      after less than 2 minutes of debugging... you got it?) I think it is
  21.      worth explaining a little its protection schemes. By the way, i tried
  22.      cracking it 1 year ago and did the same error.
  23.  
  24.      In more understandable terms, simply NOPPING a JNZ lets you bypass the
  25.      initial donglecheck, so cubase "runs" somehow. But try working more
  26.      than 10 minutes (or even less)... try creating new tracks, by clicking
  27.      4 or 5 times on the right window... try choosing "Score" from the
  28.      menu.... TRY ANYTHING!!! It will soon crash with a "General Protection
  29.      Failure" error report...
  30.  
  31. Some donglecracking infos you may need:
  32.  
  33.      Since dongles are a relatively "strong" way to protect a program (a
  34.      dongle can contain locations where the program needs to jump, etc...)
  35.      sometimes without them it's impossible to crack such protections... I
  36.      mean, in some hard cases (i.e. when the locations of the jmps are
  37.      stored *directly* inside the dongle) you'll need ABSOLUTELY the
  38.      dongle, or you can't do anything... the program will not run.
  39.  
  40.      In this case (and in other ones as well) first try to "emulate" the
  41.      dongle, if you understand how it works. If you can't, then try a BRUTE
  42.      FORCE approach (read my tutorial) to fool the program (as i did with
  43.      Cubase).
  44.  
  45.      This is the way to proceed in order to "bruteforcing" a dongle:
  46.  
  47.      1) Write down the locations where the program crashes/does not run
  48.      2) Trace back and try to locate the switches (jumps) which jump to
  49.      these locations
  50.      3) Be sure these locations aren't used in other part of the program as
  51.      well
  52.  
  53. Let's start!!!
  54.  
  55.      Ok, are u ready with your Martini Vodka and/or cigarettes AND
  56.      Softice???
  57.  
  58.      Good...... let's begin eradicating the initial donglecheck! (you could
  59.      also try to emulate the dongle by setting BPIO -h on printer ports
  60.      such as 0378/0379/037a etc... you will land in the CUBASE.VXD... and
  61.      believe me... it's better to try another approach!)
  62.  
  63.      Well, you run Cubase and it popsup with the classic "Plug the
  64.      dongle,idiot" screen.... Ah ah ah!! Simply rerun it, Ctrl-D before the
  65.      nag appears, hit F12 more than once to trace back calls (p ret is for
  66.      sure one of the best SoftICE's functions i think, without it some of
  67.      the hard cracks couldn't be done) and you'll land in the CUBASE30CM
  68.      module. Step step and step until you reach this code (you might need
  69.      to set some temporaneus BPX to get rid of cycles_loops, but you will
  70.      figure out yourself where and how... otherwise i would spend a whole
  71.      day writing this tutorial!):
  72.  
  73.      *Initial Check
  74.  
  75.      0013.3C36 6A00                   push 0000
  76.      0013.3C38 6A00                   push 0000
  77.      0013.3C3A 56                     push si
  78.      0013.3C3B 6A3F                   push 003F
  79.      0013.3C3D 6A00                   push 0000
  80.      0013.3C3F 90                     nop
  81.      0013.3C40 0E                     push cs
  82.      0013.3C41 E8A924                 call 60ED  < Tracing this call you will
  83.                                                    see how the dongle operates,
  84.                                                    you'll reach the VXD too.
  85.                                                    but you better don't
  86.                                                    consider it! Let's BRUTEFORCE!
  87.      0013.3C44 83C40A                 add sp, 000A
  88.      0013.3C47 8BF8                   mov di, ax
  89.      0013.3C49 8BC7                   mov ax, di
  90.      0013.3C4B 3DFEFF                 cmp ax, FFFE < CUBASE.386 not loaded
  91.      0013.3C4E 7421                   je 3C71
  92.      0013.3C50 3DFFFF                 cmp ax, FFFF < AX=FFFF ? Dongle not present
  93.      0013.3C53 7402                   je 3C57      < NOPPING this lets you run
  94.                                                      Cubase... this is how most
  95.                                                      of the crackers THOUGHT they
  96.                                                      got rid of the protection.
  97.                                                      Moving in AX a value like
  98.                                                      0000 doesn't work too,
  99.                                                      by the way.
  100.      0013.3C55 EB4D                   jmp 3CA4
  101.  
  102.      Ok, now let's hexedit your NOPS in the CUBASESC.EXE to let the program
  103.      run and start again. As you can see, trying the things i told you
  104.      before makes your system crash at random times and you have to reboot
  105.      and reload SoftICE (very very frustrating!). What can we do? Don't
  106.      worry, +Xoanon explains!
  107.  
  108.      Well, you noticed that when your system crashes softice popsup and
  109.      tells you WHERE the crashes happens, at which instructions. We see,
  110.      for Cubase, that this happens here (btw, it happens here if you try to
  111.      create more than 2 or 3 tracks doubleclicking on the right window...
  112.      could happen also on other instructions):
  113.  
  114.      * SYSTEM CRASH *
  115.      * Referenced by a CALL at Addresses:
  116.      |:0015.529A, :0015.53F9, :0015.5487, :0015.5588, :0015.5CFB
  117.      |:0015.5E1B, :0015.AB6B, :0015.AB85, :0015.AC01, :0015.B513
  118.      |:0015.B73F, :0015.B9AA, :0015.BA51
  119.      |
  120.      :0015.C5C6 45                     inc bp
  121.      :0015.C5C7 55                     push bp
  122.      :0015.C5C8 8BEC                   mov bp, sp
  123.      :0015.C5CA 83EC08                 sub sp, 0008
  124.      :0015.C5CD C45E06                 les bx, [bp+06]
  125.      :0015.C5D0 66268B4704             mov eax, es:[bx+04]   < Executing one of
  126.      :0015.C5D5 668946FC               mov [bp-04], eax        these MOV the prg
  127.      :0015.C5D9 C45E06                 les bx, [bp+06]         crashes....
  128.      :0015.C5DC 66268B07               mov eax, es:[bx]        INTERESTING!
  129.      :0015.C5E0 668946F8               mov [bp-08], eax
  130.      :0015.C5E4 C45EFC                 les bx, [bp-04]
  131.      :0015.C5E7 268A474A               mov al , es:[bx+4A]
  132.      :0015.C5EB 98                     cbw
  133.      :0015.C5EC A809                   test al, 09
  134.      :0015.C5EE 755A                   jne C64A
  135.      :0015.C5F0 C45EFC                 les bx, [bp-04]
  136.      :0015.C5F3 268A4735               mov al , es:[bx+35]
  137.  
  138.      So, this can be our "ENTRY POINT" !!! Reboot (ARGH!), reload and try
  139.      to locate in memory the instructions at C5C6. This could be a little
  140.      hard coz the program relocate everytime... Try doubleclicking to
  141.      create a track AND pressing CTRL-D immediately (right after
  142.      doubleclicking), now trace back, with F12, and try U cs:C5C6 until you
  143.      see the following instructions... you could also need some stepping
  144.      inside the code of CUBASECM in order to find them.
  145.  
  146.      Or maybe you could try to find them in memory, with the search
  147.      function.
  148.  
  149.      Hmm.... ok,ok... i already did it for you... i don't want you to stay
  150.      awake the whole night trying to locate a "labile" instruction!
  151.  
  152.      Do the following:
  153.  
  154.           1) Double click to create a track, and immediately CTRL-D
  155.           2) Do HEAP CUBSCM30 to see how the memory is occupied by Cubase
  156.           3) The correct handle is the one with: Lenght: 0000EBC0, Type:
  157.           Code (obvious), Seg/Resrc: 0F
  158.           4) To be sure, do U ^THIS HANDLE^:C5C6 to see if it refers to the
  159.           INC BP
  160.           5) If it doesn't, maybe that segment isn't loaded in memory
  161.           yet... simply retry once more from step 1.
  162.  
  163.      Once found (hard eh?) set a BPX on the INC BP instruction and CTRl-D
  164.      to reenter in Cubase. Try to create more tracks and..... BOOM!
  165.  
  166.      Softice breaks at your BPX! This is interesting... we see that this
  167.      piece of code is called ONLY when Cubase decides to crash your system.
  168.      Therefore we can try to find a "switch" in order to bypass it.
  169.  
  170.      Ok, now begins the real hard work...
  171.  
  172.      . STACK <-- to see which calls are executed right before your BPX
  173.  
  174.         CUBSCM30(10) at 331F:019C [?]
  175.         CUBSCM30(10) at 331F:0A41 [?]
  176.         CUBSCM30(10) at 331F:AA9D [?]    < This is the call WHICH got us
  177.      => CUBSCM30(0F) at 3327:c5c6        < HERE!
  178.  
  179.      Hmmm..... well, unfortunately we have to reboot again now.... but we
  180.      found something REALLY REALLY interesting! The CALL which lead us to
  181.      the "crash" routine. Immediately reboot and light a cigarette/sip a
  182.      Martini Vodka, 'coz we are near the "clue"!
  183.  
  184.      Rebooted? ok! Reload and find in memory again the segment as i showed
  185.      you before, but now set a BPX at AA9D. Once doubleclicking etc....
  186.      you'll break here:
  187.  
  188.      :0015.AA9D E85F0B            call B5FF   < This is the call which crashes
  189.                                                 your system
  190.      :0015.AAA0 83C404            add sp, 0004
  191.      :0015.AAA3 5F                pop di
  192.      :0015.AAA4 5E                pop si
  193.      :0015.AAA5 C9                leave
  194.  
  195.      Hmm.... now a little zen: we found a call which crashes our
  196.      systems.... so let's walk some instructions back until we find
  197.      something (a JNZ/JZ/etc) which JUMPS OVER this evil call.
  198.  
  199.      Back back back back back back..... Found!!!!!
  200.  
  201.      :0015.AA8C 9AFFFF0000             call 0012.939Fh
  202.      :0015.AA91 3D0200                 cmp ax, 0002
  203.      :0015.AA94 7512                   jne AAA8   < as we see, it jumps over our
  204.                                                     "evil call"
  205.      :0015.AA96 16                     push ss
  206.      :0015.AA97 8D46BE                 lea ax, [bp-42]
  207.      :0015.AA9A 50                     push ax
  208.  
  209.      If you examine yourself how the program works, you'll find soon that
  210.      the JNE above JUMPS when AX not = 2... maybe the dongle just checks
  211.      something (or may be something is stored in some locations by the
  212.      initial check with the VXD), and when AX=2 it executes the CALL at
  213.      AA9D and it fucks up our target.
  214.  
  215.      Well, we can try this right now (a simple changing the JNE in JMP will
  216.      not work, coz at AAA8 there is another check as you will see).
  217.  
  218.      :0015.AAA8 C746AE0000             mov word ptr [bp-52], 0000
  219.      :0015.AAAD 9AFFFF0000             call 0012.796Dh
  220.      :0015.AAB2 250300                 and ax, 0003
  221.      :0015.AAB5 3D0200                 cmp ax, 0002   < if it's 2 will crash
  222.      :0015.AAB8 7508                   jne AAC2
  223.      :0015.AABA C7064C680300           mov word ptr [684C], 0003
  224.      :0015.AAC0 EB35                   jmp AAF7
  225.  
  226.      So, try changing the CMP AX,002 in MOV AX,002 at AA91 (and also the
  227.      following JNE in JMP) this will work.... YEAH! We did it!!!!
  228.  
  229.      Hmm... are we sure? Lets reboot and try some other options... We see
  230.      that we can create as much tracks as we want, we click all over the
  231.      screen and nothing happens... So? nice, yet... try to choose something
  232.      from the menus, say the Score Editor... it might work 1,2,3,4,5 and
  233.      may be some more times...yet it will surely crash again! And at a
  234.      different location...
  235.  
  236.      Well, at this point i thought i was lost too.... there are a lot of
  237.      locations where the programs crashes, this seems as it would be a very
  238.      long cracking session to change them all... let's give up...
  239.  
  240.      But... i never surrend!
  241.  
  242.      Let's go back to the code at AA91. There will SURELY be a place where
  243.      the CMP is done a first time, and destroying it should let all the
  244.      others compare passages work right.
  245.  
  246.      Therefore... zen again: search back from AA91 until we find an
  247.      instruction which JUMPS OVER!
  248.  
  249.      Examine again the AA91 part, BUT now, looking at some previous
  250.      instructions, we find:
  251.  
  252.      :0015.AA76 E92A0B                 jmp B5A3      < INTERESTING!!!!
  253.      :0015.AA79 668B4690               mov eax, [bp-70]
  254.      :0015.AA7D 668946C2               mov [bp-3E], eax
  255.      :0015.AA81 C45E06                 les bx, [bp+06]
  256.      :0015.AA84 2680BFAC0001           cmp byte ptr es:[bx+00AC], 01
  257.      :0015.AA8A 751C                   jne AAA8
  258.      :0015.AA8C 9AFFFF0000             call 0012.939Fh
  259.      :0015.AA91 3D0200                 cmp ax, 0002
  260.      :0015.AA94 7512                   jne AAA8
  261.  
  262.      As we see, this part starts with a JMP.... what does this mean?
  263.  
  264.      It means that the code at AA79 (which contains our CMP AX,002 etc...)
  265.      is CALLED (or jumped to) by some other instructions. This means also
  266.      that we MIGHT search for some "CALL AA79" or "JNZ/JZ/etc. AA79".
  267.  
  268.      Ok, let's try examining the code back, starting from this point. Back
  269.      back back back back back and...... FOUND!!!!!
  270.  
  271.      :0015.A9B5 9AFFFF0000             call 0012.7470h
  272.      :0015.A9BA 83C402                 add sp, 0002
  273.      :0015.A9BD 0BC0                   or ax, ax
  274.      :0015.A9BF 0F84B600               je AA79
  275.      :0015.A9C3 C45E06                 les bx, [bp+06]
  276.      :0015.A9C6 2680BFAC0001           cmp byte ptr es:[bx+00AC], 01
  277.      :0015.A9CC 0F85A900               jne AA79
  278.  
  279.      As we can see, there are 2 JE/JNE which refers to AA79!!! Examining
  280.      how the program act when it crashes, we found that every time it does,
  281.      it jumps.
  282.  
  283.      So, what's better than nopping both the jumps? Well, it's enough to
  284.      NOP the first one! THE END!
  285.  
  286.      Change your bytes in the file, reload it and .... NOW EVERYTHING
  287.      WORKS!
  288.  
  289.      Happy sequencing with the best in MIDI programs!
  290.  
  291.      DONGLES? Ciao ciao (First phase)
  292.  
  293.                                                                  By +Xoanon
  294.                                                                  .PiNNACLE.
  295.  
  296.