|
Hatch Generator for AutoCAD 2002 |
|
amois |
|
Program Tipi: AutoCAD Plugin |
|
Araçlar:
SoftICE |
|
|
|
|
AutoCAD cizimlerinden Hatch pattern olusturuyor.
|
Yazı |
Authorization bolumunde verilen bir 32
basamakli Requested Code icin License String isteniyor. Sallama seriali "1907"
olarak girelim. [bpx hmemcpy] --> [F12]
:10007322 lea ecx, dword ptr [esp+0C] <--
Buradayiz
...
:1000737F call 10008E90
<-- ??
:10007384 mov edi, eax
:10007386 cmp edi, ebx
:10007388 je 10007402
<-- iyi cocuk
:1000738A push 00000200
...
:100073ED Call 1000B7DA
<-- "License error"
[bpx 1000737F] --> [F8]
...
:10008EFD mov edx, dword ptr [esi+0000012C]<-- Requested Code
F393D3D0959BB3CD636..
:10008F03 lea eax, dword ptr [esp+20] <--
1907
:10008F07 lea ecx, dword ptr [esp+14]
:10008F0B push eax
:10008F0C lea edi, dword ptr [esi+04] <-- "hgen"
:10008F0F push ecx
:10008F10 push edx
:10008F11 push edi
:10008F12 mov ecx, esi
:10008F14 call 10009160
<-- ??
:10008F19 test al, al
<-- [d ecx] = :)
:10008F1B jne 10008F27
10008F14 deki cagri oncesinde Authorization bolumundeki degerler push
ediliyor. Cagri sonucunda olmasi gereken seriali gorebiliyoruz.
KeyGen algoritmasini incelemeye calisalim. [bpx 10008F14]
--> [F8]
...
:10009170 mov eax, dword ptr [esp+14] <-- "hgen"
:10009174 push ecx
<-- Requested Code F393D3D0959BB3CD636..
:10009175 push edx
:10009176 push eax
:10009177 call 10009CF0
<-- ??
:1000917C mov edx, dword ptr [esp+2C] <-- "1907"
:10009180 lea ecx, dword ptr [esp+10] <-- :)
:10009184 push ecx
:10009185 push edx
:10009186 Call dword ptr [1000D37C] <--
Esitler mi ?
Sallama serial ile olmasi gereken 10009186 da karsilastiriliyor. Ama
bizim 10009177 deki cagriyi incelememiz gerekiyor. [bpx
10009177] --> [F8]
...
:10009DBD push eax
:10009DBE push ecx
<-- "hgenF393D3D0959BB3CD636.."
:10009DBF lea ecx, dword ptr [esp+14]
:10009DC3 call 1000B5F0
<-- ??
:10009DC8 mov edx, dword ptr [esp+14] <-- edx =
66899CDA
...
:10009DEE mov edx, dword ptr [eax]
:10009DF0 add eax, 00000004
:10009DF3 inc ecx
:10009DF4 cmp eax, 10012B28
:10009DF9 mov dl, byte ptr [esp+edx+18]
:10009DFD mov byte ptr [ecx+esi-01], dl
<-- olmasi gereken serial DL de
:10009E01 jl 10009DEE
Olmasi gereken serial 10009DEE ile 10009E01 arasindaki dongu sonucu [ecx+esi-01]
ile gosterilen yere yaziliyor. Biraz yukarisinda ise, Application adi olan "hgen"
in Requested Code ile birlesip 10009DC3 cagrisi oncesi push edildigini
goruyoruz. Cagri sonucunda 10009DC8 de edx'e atanan deger biraz ilginc. Cunku,
olmasi gereken serial ile edx'in degeri arasinda bir baglanti var. Digitleri
ayni olmakla beraber yerleri farkli. Zaten bu yer degistirme 10009DEE ile
10009E01 arasindaki dongu ile oluyor.
[bpx 10009DC3] --> [F8]
...
:1000B647 mov edi, dword ptr [ebp+08] <-- "hgenF393D3D0959BB3CD636.."
:1000B64A mov bl, byte ptr [edi]
<-- h g e n F 3 9 3 D 3 ..
:1000B64C test bl, bl
:1000B64E je 1000B674
:1000B650 mov edx, dword ptr [esi] <--
ilk basta FFFFFFFF
:1000B652 and ebx, 000000FF
:1000B658 mov eax, edx
:1000B65A and eax, 000000FF
:1000B65F xor eax, ebx
:1000B661 mov ebx, dword ptr [ecx+04] <-- sabit tablo
baslangici
:1000B664 shr edx, 08
:1000B667 mov eax, dword ptr [ebx+4*eax] <-- tablodan sayi al
:1000B66A xor eax, edx
:1000B66C inc edi
:1000B66D mov dword ptr [esi], eax <--
burada sakla
:1000B66F jmp 1000B64A
:1000B671 mov esi, dword ptr [ebp+0C]
:1000B674 mov ecx, dword ptr [esi] <--
ecx = 99766325
:1000B676 mov eax, dword ptr [ebp-14]
:1000B679 not ecx
<-- ecx = 66899CDA
Evet, sonunda KeyGen rutinini bulduk. 1000B64A ile 1000B66F arasindaki
dongude bol miktarda XOR islemi oluyor. Bu isleme Application Name, Requested
Code ve Sabit Tablo'daki degerler giriyor.
Ilk once Dump edecegimiz tablo uzunlugunu bulalim. Tablodan alinan degerin
adresi [ebx+4*eax] seklinde. Burada ebx, Tablo
baslangic adresini gosteriyor. 1000B65A daki islemden dolayi eax en fazla 2
digit olabilir, yani FF. Tablo uzunlugu = ebx+4*eax =
ebx+4*FF = ebx+3FC
1000B664 de iken [\dump ebx 3FC hgen.tab] seklinde
tabloyu alalim.
Dongu sonucunda ecx=99766325 ve daha sonra da 66899CDA degerini aldi. Olmasi
gereken serial 669D8CA9. Sadece basamak yerleri degistirildi. Hangisinin nereye
kaydigini kestirmeden ogrenmenin yolu, 1000B679 islemi sonucunda manual olarak
ecx=12345678 yapmak. Daha once acikladigim 10009DEE ile 10009E01 arasindaki
dongu sonucu olmasi gereken serial 21473685 oldu. Artik KeyGen kodumuzu
yazabiliriz.
.data
sonuc db 32h dup(?)
; bos alan, temp
final db 08h dup(?)
; bos alan, temp
isim db "hgenF393D3D0959BB3CD636E53A0936F2FA1",0
; Application Name&Requested Code
tablo db 000h,000h,000h,000h,096h,030h,007h,077h
; Sabit Tablo
db 02Ch,061h,00Eh,0Eeh,0BAh,051h,009h,099h
...
db 0DFh,005h,05Ah,08Dh,0EFh,002h,02Dh,0
.code
start:
lea edi, isim
mov esi, 0ffffffffh
; ilk bastaki degeri
@dongu:
MOV BL,[EDI]
; bu bolum programdan
TEST BL,BL
JZ @serial
MOV EDX,ESI
AND EBX,000000FFh
MOV EAX,EDX
AND EAX,000000FFh
XOR EAX,EBX
lea EBX, tablo
; tablo offseti ebx'de
SHR EDX,08h
MOV EAX,[EAX*4+EBX]
XOR EAX,EDX
INC EDI
MOV ESI,EAX
JMP @dongu
@serial:
mov ecx, esi
; ecx = 99766325
not ecx
; ecx = 66899CDA
invoke dw2hex, ecx, offset final
; Doubleword to Hex
lea esi, final
; [d esi] = 66899CDA
lea edi, sonuc
; serial buraya yazilacak
mov al, [esi+1]
; yer degistirme islemi
mov [edi+0], al
mov al, [esi+0]
mov [edi+1], al
mov al, [esi+3]
mov [edi+2], al
mov al, [esi+6]
mov [edi+3], al
mov al, [esi+2]
mov [edi+4], al
mov al, [esi+5]
mov [edi+5], al
mov al, [esi+7]
mov [edi+6], al
mov al, [esi+4]
mov [edi+7], al
; buraya kadar
@cikis:
invoke MessageBoxA, 0, offset sonuc, offset sonuc, 0
invoke ExitProcess,0
end start
|
|
Bir programı kullanarak para kazanıyorsanız, programı satın alın.