EZ Extract Resource v1.62 |
| |
| Program Tipi: Resource Editor |
| Softice, Hex Editor |
| |
| |
Dünya takimi:
| |
Register ekranina giriyoruz:
Username: renaTgaD Serial: 654321
Bir messagebox çıktı: programi tekrar kapatıp açmamızı istiyor, demek ki register
kontrolu şu an yapılmıyor, muhtemelen program açılırken registry'dan bilgileri
okuyup kontrol ediliyor. Registry Monitor'u çalıştırıyoruz, renaTgaD
kelimesini search yapıyoruz.
HKCU\software\SeaMoonTech\EZ Extract Resource\RegInfo\RegUserName
kayıdını buluyoruz. Bu kayıda regedit ile baktığımızda RegCode anahtarını görüyoruz,
fakat bizim yazdığımız 654321 yerine 876543 gözüküyor, bizim serial'i 1:1 yazmıyor
demek ki, bizi şuan bu ilgilendirmiyor. Şimdi programın içinde RegCode kelimesini
search yapıyoruz, 2 adresde bulduk
// birincisi
* Possible StringData Ref from Data Obj ->"RegCode"
:0040C669 6820074800 push 00480720 // ikincisi
* Possible StringData Ref from Data Obj ->"RegCode"
:0040F220 6820074800 push 00480720
ilk once birinci RegCode'u deniyelim, [40C669] adresine breakpoint koyacağız yanlız bu işlemi bpx 40C669 olarak yapmıyoruz, daha öncesinde bpx ShowWindow (GetCommandLineA, GetModuleHandle vb. API'lerde kullanilaabilir) API'sine bpx koyuyoruz, program'i çalıştırıyoruz, softice'a dustugumuzde U 40C669 komutu kullaniyoruz, burda dikkat edecegimiz sey [40C669] adresinde INVALID olmamasidir, o adresde programin asil asm degerleri olmasi gerekiyor, asik kodlari gordukten sonra, BD * daha sonra mouse yardimi ile [40C669] adresine bpx koyuyoruz, programi tekrar kapatip aciyoruz. Program acilirken hic break olmadi, register ekranina girip sallama degerler giriyoruz ve OK buttonuna bastigimizda softice'dayiz, bu demek oluyor ki burasi registry'a kayit yapan kisim, bizi burasi pek ilgilendirmiyor, gecelim diger RegCode adresine.
Yukarda soledigim yontemi [40F220] adresinede uyguluyoruz, programi tekrar kapatip aciyoruz, program acilirken softice'dayiz, asil noktayi bulduk demektir. Simdi [40F220] adresinden sonraki tum CALL 'lere goz atacagiz.
* Possible StringData Ref from Data Obj ->"RegCode" :0040F220 6820074800 push 00480720 ; bpx ile burdan baslamistik :0040F225 8D442418 lea eax, dword ptr [esp+18] * Possible StringData Ref from Data Obj ->"RegInfo" :0040F229 6828074800 push 00480728 :0040F22E 50 push eax :0040F22F 8BCE mov ecx, esi :0040F231 E83BC00400 call 0045B271 ; registry'den Username/Serial oku :0040F236 50 push eax :0040F237 8D4C2420 lea ecx, dword ptr [esp+20] :0040F23B C68424D00100000A mov byte ptr [esp+000001D0], 0A :0040F243 E87D3A0300 call 00442CC5 :0040F248 8D4C2410 lea ecx, dword ptr [esp+10] :0040F24C 889C24CC010000 mov byte ptr [esp+000001CC], bl :0040F253 E834390300 call 00442B8C :0040F258 51 push ecx :0040F259 8D542420 lea edx, dword ptr [esp+20] :0040F25D 8BCC mov ecx, esp :0040F25F 89642418 mov dword ptr [esp+18], esp :0040F263 52 push edx :0040F264 E898360300 call 00442901 :0040F269 51 push ecx :0040F26A C68424D40100000B mov byte ptr [esp+000001D4], 0B :0040F272 8BCC mov ecx, esp :0040F274 89642418 mov dword ptr [esp+18], esp :0040F278 57 push edi :0040F279 E883360300 call 00442901 :0040F27E 8BCE mov ecx, esi :0040F280 889C24D4010000 mov byte ptr [esp+000001D4], bl :0040F287 E854090000 call 0040FBE0 ; register algoritmasi burada :0040F28C 8986D0000000 mov dword ptr [esi+000000D0], eax :0040F292 68C4534800 push 004853C4
[40F287] adresindeki CALL haricindeki diger CALL'lerde herhangi bir sey yok. F8 ile [40F287] adresini inceliyelim.
* Referenced by a CALL at Addresses: |:0040F192 , :0040F209 , :0040F287 , :0040F2FE | :0040FBE0 6AFF push FFFFFFFF :0040FBE2 68003F4600 push 00463F00 :0040FBE7 64A100000000 mov eax, dword ptr fs:[00000000] :0040FBED 50 push eax :0040FBEE 64892500000000 mov dword ptr fs:[00000000], esp :0040FBF5 81ECD0000000 sub esp, 000000D0 :0040FBFB 56 push esi :0040FBFC 8BF1 mov esi, ecx :0040FBFE B801000000 mov eax, 00000001 :0040FC03 68C4534800 push 004853C4 :0040FC08 898424E0000000 mov dword ptr [esp+000000E0], eax :0040FC0F 8986C4000000 mov dword ptr [esi+000000C4], eax :0040FC15 8B8424E8000000 mov eax, dword ptr [esp+000000E8] ; Username EAX'a :0040FC1C 50 push eax :0040FC1D E868DA0100 call 0042D68A #ff9830 :0040FC22 83C408 add esp, 00000008 :0040FC25 85C0 test eax, eax :0040FC27 0F843B010000 je 0040FD68 ; username dolu ise devam :0040FC2D 8B8C24E8000000 mov ecx, dword ptr [esp+000000E8] :0040FC34 68C4534800 push 004853C4 :0040FC39 51 push ecx :0040FC3A E84BDA0100 call 0042D68A ; serial bos mu bak :0040FC3F 83C408 add esp, 00000008 :0040FC42 85C0 test eax, eax ; serial dolu ise devam :0040FC44 0F841E010000 je 0040FD68 :0040FC4A 68200E4800 push 00480E20 :0040FC4F 8D8C24E8000000 lea ecx, dword ptr [esp+000000E8] :0040FC56 E85BC90200 call 0043C5B6 :0040FC5B 83F8FF cmp eax, FFFFFFFF :0040FC5E 740A je 0040FC6A :0040FC60 C786C400000000000000 mov dword ptr [esi+000000C4], 00000000
buradan sonra ilginc bir kod geliyor.
:0040FC6A 8B9424E4000000 mov edx, dword ptr [esp+000000E4] :0040FC71 33C9 xor ecx, ecx :0040FC73 53 push ebx :0040FC74 C644240868 mov [esp+08], 68 ; esp+08 = 'h' :0040FC79 8B72F8 mov esi, dword ptr [edx-08] :0040FC7C C644240975 mov [esp+09], 75 ; esp+09 = 'u' :0040FC81 85F6 test esi, esi :0040FC83 C644240A79 mov [esp+0A], 79 ; esp+0A = 'y' :0040FC88 C644240B64 mov [esp+0B], 64 ; esp+0B = 'd' :0040FC8D C644240C6F mov [esp+0C], 6F ; esp+0C = 'o' :0040FC92 C644240D6E mov [esp+0D], 6E ; esp+0D = 'n' :0040FC97 C644240E67 mov [esp+0E], 67 ; esp+0E = 'g' :0040FC9C C644240F00 mov [esp+0F], 00 ; esp+0F = satir sonu :0040FCA1 7E3F jle 0040FCE2
esp+08 'den esp+0F'e itibaren bir kelime olusmus oluyor, bu kelime huydong, suan bunun ne ise yaradigini bilmiyoruz, ilerki kodlara bakinca bir algortimave bu string'in ne ise yaradigini gorebiliriz.
:0040FCA9 8B8424F0000000 mov eax, dword ptr [esp+000000F0] ; eax = renaTgaD :0040FCB0 BD07000000 mov ebp, 00000007 ; ebp = 7 :0040FCB5 8A1C01 mov bl, byte ptr [ecx+eax] ; r e n a T g a D :0040FCB8 8BC1 mov eax, ecx ; eax = username karakter no :0040FCBA 99 cdq ; edx = 0 :0040FCBB F7FD idiv ebp ; eax / ebp (7) :0040FCBD 0FBEC3 movsx eax, bl ; r e n a T g a D :0040FCC0 8BD9 mov ebx, ecx ; ecx = toplam okunan username karakter sayisi :0040FCC2 0FBE541410 movsx edx, byte ptr [esp+edx+10] ; edx = bolme kalan sonucu ile huydong 'dan oku :0040FCC7 03DA add ebx, edx ; ebx + edx :0040FCC9 03C3 add eax, ebx ; eax + ebx :0040FCCB BB09000000 mov ebx, 00000009 ; ebx = 9 :0040FCD0 03C6 add eax, esi ; eax + username karakter uzunlugu :0040FCD2 99 cdq :0040FCD3 F7FB idiv ebx ; eax / ebx (9) :0040FCD5 80C230 add dl, 30 ; dl = dl +30 :0040FCD8 41 inc ecx ; counteri artir :0040FCD9 8817 mov byte ptr [edi], dl ; seriali yaz :0040FCDB 4F dec edi ; serial pozisyonu :0040FCDC 3BCE cmp ecx, esi :0040FCDE 7CC9 jl 0040FCA9 ; dongu bitti ? :0040FCE0 5F pop edi ; stacktan pop et :0040FCE1 5D pop ebp :0040FCE2 8D464D lea eax, dword ptr [esi+4D] ; eax = ismin boyu+4Dh :0040FCE5 B909000000 mov ecx, 00000009 ; ecx = 9 :0040FCEA 99 cdq ; edx = 0 :0040FCEB F7F9 idiv ecx ; eax = eax/ecx edx=kalan :0040FCED 8B8424EC000000 mov eax, dword ptr [esp+000000EC] ; serialin son karakteri :0040FCF4 80C230 add dl, 30 ; dl = dl+30(dl edx in low kismi) :0040FCF7 88543410 mov byte ptr [esp+esi+10], dl ; son karakteri yaz :0040FCFB C644341100 mov [esp+esi+11], 00 ; 0 ile sonla
Döngü şu şekilde çalışıyor
:0040FCA9 her seferinde eax = 'renaTgaD' :0040FCB0 ebp = 7 :0040FCB5 ecx'in degeri ile 'renaTgaD' harf harf oku :0040FCB8 eax = ecx :0040FCBA :0040FCBB eax / ebp (7), bu islemden sonra eax yani username'in harf hex kodu 7'e bolunuyor, eax = sonuc, edx = kalan deger :0040FCBD eax = 'renaTgaD' karakter karakter oku:0040FCC0 ebx = ecx (toplam okunan username karakter sayisi) :0040FCC2 edx = eax / ebp bolme sonucunda kalan deger ile 'huydong' kelimesinden deger okunuyor :0040FCC7 ebx + edx :0040FCC9 eax + edx 'renaTgaD' degeri ile 'huydong' degerleri toplaniyor :0040FCCB ebx = 9 :0040FCD0 eax + esi, esi burada 'renaTgaD' karakter uzunlugudur :0040FCD2 :0040FCD3 eax / ebx (9) :0040FCD5 bolme sonucuna + 30 ekle :0040FCD8 ecx'i bir artir (okunan karakter sayisi) :0040FCD9 edi'in basina kalan sonuc degerini ekle :0040FCDB edi'i bir azalt (basina eklenmesi icin yapilmis) :0040FCDC ecx (toplam okunan karakter sayisi) = username uzunluguna
Keygen kodu
.data tablo db "huydong",0 .code invoke GetDlgItemText, _hWin, EDIT_NAME, ADDR szName, 32h ; ismi al cmp eax,0 jz @@err ;hatamesaji push ebp ; ebp yi sakla mov esi,eax ; ismin boyutu esi de xor ecx,ecx ; counteri sıfırla mov edi,offset szSerial-1 add edi,esi ; seriali yazmaya tersten başlıyor ; o yüzden bende bufferiismin boyu kadar büyüttüm @loop: mov eax, offset szName ; eax = renaTgaD mov ebp, 00000007 ; ebp = 7 mov bl, byte ptr [ecx+eax] ; r e n a T g a D mov eax, ecx ; eax = username karakter no cdq ; edx =0 idiv ebp ; eax / ebp (7) movsx eax, bl ; r e n a T g a D mov ebx, ecx ; ecx = toplam okunan username karakter sayısı movsx edx, byte ptr [tablo+edx] ; edx = bölme kalan sonucu ile huydong 'dan oku add ebx, edx ; ebx + edx add eax, ebx ; eax + ebx mov ebx, 00000009 ; ebx = 9 add eax, esi ; eax + username karakter uzunluğu cdq ; edx=0 idiv ebx ; eax / ebx (9) kalan edx add dl, 30h ; edx = edx+30h inc ecx ; counterı artır mov byte ptr [edi], dl ; seriali yaz dec edi ; serialin pozisyonu cmp ecx, esi jl @loop ; dongu bitti ? lea eax, [esi+4Dh] ; eax = ismin boyu+4Dh mov ecx, 00000009 ; ecx=9 cdq ; edx=0 idiv ebx ; eax=eax/ebx ;kalan edx add dl, 30h ; edx=edx+30h mov eax, esi ; eax=serialin hanesi mov byte ptr [szSerial+eax], dl pop ebp ; ebp yi eski haline getir
| |
Bir programı kullanarak para kazanıyorsanız, programı satın alın. Ayrıca
keygen kodunu yazan ve bana yardımcı olan Mr_Stop'a teşekkürler..