不知有人写过winiso 5.3的注册机没有,它的check routine,没有用公钥,也没有对称加密,好像是自己的算
法。难了我很长时间了,现在还没有弄通。于是下了个叫hinte!写的注册机,本想看他是怎么写的,不过都不
能拿来注册。
下面是winiso的core check:
那位能求逆,请给个思路:)
1.symbols and data
p1
.data:004D18AC p1 dd 0BCFEF35h, 179FDE6Bh, 0C5E7E798h, 5E7F79ACh
.data:004D18AC dd 0BCFEF359h, 0F9FDC6B7h, 73FBAD6Ah, 2F3FBCD6h
.data:004D18AC dd 0E7F75AD5h, 4FEE95AFh, 9FDD2B5Eh, 0FF74CD76h
.data:004D18AC dd 0BFBA76B9h, 7EE9BAE8h, 0FDD375D1h, 0F74D974Eh
.data:004D18AC dd 7BA6CBA7h, 6E9B0E99h, 0DD361D32h, 3A6C1A60h
.data:004D18AC dd 74D834C0h, 0E9B06981h, 5360F306h, 0A6C1E60Ch
.data:004D18AC dd 0CD83EC1Dh, 1B07F83Fh, 360FF07Eh, 6C1FE0FDh
.data:004D18AC dd 0D83FC1FAh, 307FA3F0h, 60FF47E1h, 0C1FE8FC2h
.data:004D18AC dd 3FD3F80h, 0FF4FE02h, 7FA7F01h, 1FE9FC04h
.data:004D18AC dd 3FD3F808h, 7FA7F010h, 7E9FE047h, 0FD3FC08Eh
.data:004D18AC dd 0FF4FE021h, 0F4FF4232h, 7A7FA119h, 0D3FD48C3h
.data:004D18AC dd 27FAB183h, 4FF56306h, 9FEAC60Dh, 69FEA461h
.data:004D18AC dd 0BFD5AC1Eh, 0FFAB7839h, 7F56D076h, 0FEADA0EDh
.data:004D18AC dd 7D5B61DEh, 0FAB6C3BCh, 756DA77Dh, 0EADB4EFAh
.data:004D18AC dd 2DB58F80h, 5B6B1F00h, 0B6D63E01h, 55B6BDF1h
.data:004D18AC dd 0AB6D7BE3h, 0D6DAD7C2h, 5B589808h, 0EDAC5C06h
p2
.data:004D19AC p2 dd 9B4D1349h, 369A2692h, 0CDA689A4h, 0DA689A48h
.data:004D19AC dd 0B4D13490h, 69A26921h, 0D344D243h, 6D344D24h
.data:004D19AC dd 0A689A486h, 4D13490Dh, 9A26921Ah, 689A486Bh
.data:004D19AC dd 344D2435h, 0D13490D7h, 0A26921AEh, 89A486BAh
.data:004D19AC dd 44D2435Dh, 13490D75h, 26921AEAh, 4D2435D5h
.data:004D19AC dd 9A486BAAh, 3490D754h, 6921AEA9h, 0D2435D52h
.data:004D19AC dd 0A486BAA5h, 490D754Bh, 921AEA96h, 2435D52Ch
.data:004D19AC dd 486BAA58h, 90D754B1h, 21AEA962h, 435D52C4h
.data:004D19AC dd 86BAA589h, 1AEA9624h, 0D754B12h, 35D52C48h
.data:004D19AC dd 6BAA5890h, 0D754B120h, 5D52C481h, 0BAA58902h
.data:004D19AC dd 0AEA96240h, 0EA96240Ah, 754B1205h, 0AA58902Ah
.data:004D19AC dd 54B12055h, 0A96240AAh, 52C48154h, 0D52C4815h
.data:004D19AC dd 0A58902A9h, 4B120553h, 96240AA7h, 2C48154Eh
.data:004D19AC dd 58902A9Dh, 0B120553Ah, 6240AA75h, 0C48154EAh
.data:004D19AC dd 48154EABh, 902A9D56h, 20553AACh, 8902A9D5h
.data:004D19AC dd 120553AAh, 240AA755h, 8154EAB3h, 40AA7559h
2.core check
///////////////////////////////////////////////////////////////////////////////////////////
.text:0041C958 sub_41C958 proc near ; CODE XREF: sub_41C488+61p
.text:0041C958 ; sub_41C488+75p ...
.text:0041C958
.text:0041C958 temp_2 = dword ptr -0Ch
.text:0041C958 temp_1 = dword ptr -8
.text:0041C958 var_4 = dword ptr -4
.text:0041C958 src = dword ptr 8 [ebp+src]->Serial_low
.text:0041C958 [ebp+src]+4->Serial_high
.text:0041C958 p1 = dword ptr 0Ch
.text:0041C958 p2 = dword ptr 10h
.text:0041C958
.text:0041C958 push ebp
.text:0041C959 mov ebp, esp
.text:0041C95B add esp, 0FFFFFFF4h
.text:0041C95E xor edx, edx
.text:0041C960 xor ecx, ecx
.text:0041C962 push ebx
.text:0041C963 push esi
.text:0041C964 push edi
.text:0041C965 mov eax, [ebp+src]
.text:0041C968 add eax, 4
.text:0041C96B xor ebx, ebx
.text:0041C96D mov [ebp+var_4], eax
.text:0041C970 mov [ebp+temp_1], edx
.text:0041C973 mov [ebp+temp_2], ecx
.text:0041C976
.text:0041C976 loc_41C976: ; CODE XREF: sub_41C958+61j
.text:0041C976 mov eax, [ebp+src]
.text:0041C979 mov edx, [ebp+var_4]
.text:0041C97C mov esi, [eax]
.text:0041C97E mov eax, [ebp+p1]
.text:0041C981 mov edi, [edx]
.text:0041C983 and esi, [eax]
.text:0041C985 mov eax, [ebp+p2]
.text:0041C988 and edi, [eax]
.text:0041C98A push esi
.text:0041C98B call sub_41C93C
.text:0041C990 pop ecx
.text:0041C991 push eax
.text:0041C992 push edi
.text:0041C993 call sub_41C93C
.text:0041C998 pop ecx
.text:0041C999 pop edx
.text:0041C99A xor al, dl
.text:0041C99C mov edx, [ebp+temp_1]
.text:0041C99F add [ebp+temp_1], edx
.text:0041C9A2 and eax, 0FFh
.text:0041C9A7 and eax, 1
.text:0041C9AA inc ebx
.text:0041C9AB xor [ebp+temp_1], eax
.text:0041C9AE add [ebp+p1], 4
.text:0041C9B2 add [ebp+p2], 4
.text:0041C9B6 cmp bl, 20h
.text:0041C9B9 jb short loc_41C976
.text:0041C9BB xor ebx, ebx
.text:0041C9BD
.text:0041C9BD loc_41C9BD: ; CODE XREF: sub_41C958+A8j
.text:0041C9BD mov eax, [ebp+src]
.text:0041C9C0 mov edx, [ebp+var_4]
.text:0041C9C3 mov esi, [eax]
.text:0041C9C5 mov eax, [ebp+p1]
.text:0041C9C8 mov edi, [edx]
.text:0041C9CA and esi, [eax]
.text:0041C9CC mov eax, [ebp+p2]
.text:0041C9CF and edi, [eax]
.text:0041C9D1 push esi
.text:0041C9D2 call sub_41C93C
.text:0041C9D7 pop ecx
.text:0041C9D8 push eax
.text:0041C9D9 push edi
.text:0041C9DA call sub_41C93C
.text:0041C9DF pop ecx
.text:0041C9E0 pop edx
.text:0041C9E1 xor al, dl
.text:0041C9E3 mov edx, [ebp+temp_2]
.text:0041C9E6 add [ebp+temp_2], edx
.text:0041C9E9 and eax, 0FFh
.text:0041C9EE and eax, 1
.text:0041C9F1 inc ebx
.text:0041C9F2 xor [ebp+temp_2], eax
.text:0041C9F5 add [ebp+p1], 4
.text:0041C9F9 add [ebp+p2], 4
.text:0041C9FD cmp bl, 20h
.text:0041CA00 jb short loc_41C9BD
.text:0041CA02 mov ecx, [ebp+src]
.text:0041CA05 mov eax, [ebp+temp_1]
.text:0041CA08 mov [ecx], eax
.text:0041CA0A mov edx, [ebp+var_4]
.text:0041CA0D mov ecx, [ebp+temp_2]
.text:0041CA10 mov [edx], ecx
.text:0041CA12 pop edi
.text:0041CA13 pop esi
.text:0041CA14 pop ebx
.text:0041CA15 mov esp, ebp
.text:0041CA17 pop ebp
.text:0041CA18 retn
.text:0041CA18 sub_41C958 endp
////////////////////////////////////////////////////////////////////////////////////////////
3.subroutine sub_41C93C
////////////////////////////////////////////////////////////////////////////////////////////
.text:0041C93C sub_41C93C proc near ; CODE XREF: sub_41C958+33p
.text:0041C93C ; sub_41C958+3Bp ...
.text:0041C93C
.text:0041C93C arg_0 = dword ptr 8
.text:0041C93C
.text:0041C93C push ebp
.text:0041C93D mov ebp, esp
.text:0041C93F mov eax, [ebp+arg_0]
.text:0041C942 xor edx, edx
.text:0041C944 test eax, eax
.text:0041C946 jz short loc_41C952
.text:0041C948
.text:0041C948 loc_41C948: ; CODE XREF: sub_41C93C+14j
.text:0041C948 inc edx
.text:0041C949 mov ecx, eax
.text:0041C94B dec ecx
.text:0041C94C and eax, ecx
.text:0041C94E test eax, eax
.text:0041C950 jnz short loc_41C948
.text:0041C952
.text:0041C952 loc_41C952: ; CODE XREF: sub_41C93C+Aj
.text:0041C952 mov eax, edx
.text:0041C954 pop ebp
.text:0041C955 retn
.text:0041C955 sub_41C93C endp
///////////////////////////////////////////////////////////////////////////////////////////
sub_41C93C 应该是求参数二进制中1的个数
core_check
是两步完全相同的算法,理解挺容易的,但求逆太难了。
Step1:i=0,j=0
Step2:serial_low 与p1[i] 相加的结果二进制里1的个数为x
Step3:serial_high与p2[i] 相加的结果二进制里1的个数为y
Step4:j*=2
若x,y奇偶不同 j+=1
i+=1
若i=32转Step5,否则转Step2
Step5:temp1=j
然后利用p1,p2的后32个dword求temp2
temp1,temp2再与用户名的hash值比较,相同则通过验证。
总体算法像奇偶校验相关的,可难建立模型,因此不好求逆。
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课