新CrackMe160之014 - Splish
-
去NAG
汇编的程序, 直接上OD, F8单步跟踪弹框代码具体位置为00401079, 将这行nop掉,即可,另存Splish_去NAG.exe, 运行测试正常 -
验证硬件码
查找按钮事件入口, 转到代码最下面的IAT列表可以看到文本框内容获取方法为GetWindowTextA,所以在代码中找到对应的方法
0040136A处找到一个, 004015F1和0040160D连续的两个, 可以和界面的硬件码一个文本框, 用户名系列号两个文本框对应,可知一个的是验证硬件码的入口, 另一个是验证用户名系列号的入口,分别下好断点
随便输入硬件码1234,点验证,成功在0040136A处停下, 0040136F处是固定串"HardCoded" 00401375处是输入的"1234", 两串对比是否一致 -
验证用户名系列号
00401632~00401650 与 00401669~0040167A两处分别是用户名和系列号的算法部分, 代码如下:
00401621 |. 8D35 36324000 lea esi,dword ptr ds:[0x403236]
00401627 |. 8D3D 58324000 lea edi,dword ptr ds:[0x403258]
0040162D |. B9 0A000000 mov ecx,0xA
00401632 |> 0FBE041E /movsx eax,byte ptr ds:[esi+ebx]
00401636 |. 99 |cdq
00401637 |. F7F9 |idiv ecx
00401639 |. 33D3 |xor edx,ebx
0040163B |. 83C2 02 |add edx,0x2
0040163E |. 80FA 0A |cmp dl,0xA
00401641 |. 7C 03 |jl short Splish.00401646
00401643 |. 80EA 0A |sub dl,0xA
00401646 |> 88141F |mov byte ptr ds:[edi+ebx],dl
00401649 |. 43 |inc ebx
0040164A |. 3B1D 63344000 |cmp ebx,dword ptr ds:[0x403463]
00401650 |.^ 75 E0 \jnz short Splish.00401632
00401652 |. 33C9 xor ecx,ecx
00401654 |. 33DB xor ebx,ebx
00401656 |. 33D2 xor edx,edx
00401658 |. 8D35 42324000 lea esi,dword ptr ds:[0x403242]
0040165E |. 8D3D 4D324000 lea edi,dword ptr ds:[0x40324D]
00401664 |. B9 0A000000 mov ecx,0xA
00401669 |> 0FBE041E /movsx eax,byte ptr ds:[esi+ebx]
0040166D |. 99 |cdq
0040166E |. F7F9 |idiv ecx
00401670 |. 88141F |mov byte ptr ds:[edi+ebx],dl
00401673 |. 43 |inc ebx
00401674 |. 3B1D 67344000 |cmp ebx,dword ptr ds:[0x403467]
0040167A |.^ 75 ED \jnz short Splish.00401669
算法简单,可自行理解, 注册机代码如下:
#include <stdio.h>
#include <string.h>
#include <time.h>
int main() {
char user[21] = {0};
char code[21] = {0};
printf("用户名: ");
fgets(user, sizeof(user), stdin);
int i, len = strlen(user) - 1; //最后一个\n
unsigned int rlt, sum = 0;
for(i=0; i<len; i++){
code[i] = (((user[i] % 0xA) ^ i) + 0x2) % 0xA;
}
srand((int)time(NULL));
int rnd = 0;
for(i=0; i<len; i++){
rnd = rand() % 8 + 4; //[4,12)
code[i] += rnd * 0xA; //变为可见字符 32 ~ 126, 取 40 ~ 119之间的
}
printf("系列号: %s\n", code);
getchar();
return 0;
}
运行示例:
用户名: 123
系列号: egi
使用的工具连接(工具有点多有点大,可以先下OD,其它的后面慢慢下) 点击前往下载
下面是我的OD的界面布局,我觉得这4个是最常用的界面,其它的我基本上没用到~


浙公网安备 33010602011771号