-
-
看雪CTF2019Q2-第4题 达芬奇密码
-
发表于: 2019-6-18 23:19 3390
-
sn长度为16
1 2 3 4 5 6 7 8 9 | .rdata:005456C0 dd WM_COMMAND .rdata:005456C4 dd 0 .rdata:005456C8 dd 1 .rdata:005456CC dd 1 .rdata:005456D0 dd 39h .rdata:005456D4 dd offset sub_401EA0 .text:00401F16 cmp eax, 10h .text:00401F19 jnz loc_401FDA |
1 2 3 4 5 6 7 8 9 | .rdata:005456C0 dd WM_COMMAND .rdata:005456C4 dd 0 .rdata:005456C8 dd 1 .rdata:005456CC dd 1 .rdata:005456D0 dd 39h .rdata:005456D4 dd offset sub_401EA0 .text:00401F16 cmp eax, 10h .text:00401F19 jnz loc_401FDA |
sn长度正确时写入check函数
1 2 3 4 | .text:00401F7B mov ecx, 0CCh .text:00401F80 mov esi, offset byte_5647B8 .text:00401F85 mov edi, offset sub_4010E0 .text:00401F8A rep movsd |
1 2 3 4 | .text:00401F7B mov ecx, 0CCh .text:00401F80 mov esi, offset byte_5647B8 .text:00401F85 mov edi, offset sub_4010E0 .text:00401F8A rep movsd |
x, y = sn ^ xor_key (x与y都为64位)
x, y = sn ^ xor_key (x与y都为64位)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | .text:00401101 mov [esp+98h+xor_key], 16h .text:00401106 mov [esp+98h+xor_key+1], 96h .text:0040110B mov [esp+98h+xor_key+2], 8Ch .text:00401110 mov [esp+98h+xor_key+3], 0E3h .text:00401115 mov [esp+98h+xor_key+5], 98h .text:0040111A mov [esp+98h+xor_key+6], 6Eh .text:0040111F mov [esp+98h+xor_key+7], 64h .text:00401124 mov [esp+98h+xor_key+8], 84h .text:00401129 mov [esp+98h+xor_key+9], 8 .text:0040112E mov [esp+98h+xor_key+0Ah], 0DCh .text:00401133 mov [esp+98h+xor_key+0Ch], 0BEh .text:00401138 mov [esp+98h+xor_key+0Dh], 4Dh .text:0040113D mov [esp+98h+xor_key+0Eh], 48h .text:00401142 mov [esp+98h+xor_key+0Fh], 4Fh .text:00401147 mov dword ptr [esp+98h+xor_key+10h], eax .text:0040114B mov [esp+98h+var_7C], eax .text:0040114F mov [esp+98h+var_78], eax .text:00401153 mov [esp+98h+var_74], eax .text:00401157 mov dword ptr [esp+98h+t_x], eax .text:0040115B mov dword ptr [esp+98h+t_x+4], eax .text:0040115F mov dword ptr [esp+98h+t_y], eax .text:00401163 mov dword ptr [esp+98h+t_y+4], eax .text:00401167 sub esi, ecx .text:00401169 lea esp, [esp+0] .text:00401170 lea ecx, [esp+eax+98h+xor_key] .text:00401174 mov dl, [esi+ecx] .text:00401177 xor dl, [ecx] .text:00401179 mov cl, [edi+eax+8] .text:0040117D xor cl, [esp+eax+98h+xor_key+8] .text:00401181 mov [esp+eax+98h+t_x], dl .text:00401185 mov [esp+eax+98h+t_y], cl .text:00401189 inc eax .text:0040118A cmp eax, 8 .text:0040118D jl short loc_401170 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | .text:00401101 mov [esp+98h+xor_key], 16h .text:00401106 mov [esp+98h+xor_key+1], 96h .text:0040110B mov [esp+98h+xor_key+2], 8Ch .text:00401110 mov [esp+98h+xor_key+3], 0E3h .text:00401115 mov [esp+98h+xor_key+5], 98h .text:0040111A mov [esp+98h+xor_key+6], 6Eh .text:0040111F mov [esp+98h+xor_key+7], 64h .text:00401124 mov [esp+98h+xor_key+8], 84h .text:00401129 mov [esp+98h+xor_key+9], 8 .text:0040112E mov [esp+98h+xor_key+0Ah], 0DCh .text:00401133 mov [esp+98h+xor_key+0Ch], 0BEh .text:00401138 mov [esp+98h+xor_key+0Dh], 4Dh .text:0040113D mov [esp+98h+xor_key+0Eh], 48h .text:00401142 mov [esp+98h+xor_key+0Fh], 4Fh .text:00401147 mov dword ptr [esp+98h+xor_key+10h], eax .text:0040114B mov [esp+98h+var_7C], eax .text:0040114F mov [esp+98h+var_78], eax .text:00401153 mov [esp+98h+var_74], eax .text:00401157 mov dword ptr [esp+98h+t_x], eax .text:0040115B mov dword ptr [esp+98h+t_x+4], eax .text:0040115F mov dword ptr [esp+98h+t_y], eax .text:00401163 mov dword ptr [esp+98h+t_y+4], eax .text:00401167 sub esi, ecx .text:00401169 lea esp, [esp+0] .text:00401170 lea ecx, [esp+eax+98h+xor_key] .text:00401174 mov dl, [esi+ecx] .text:00401177 xor dl, [ecx] .text:00401179 mov cl, [edi+eax+8] .text:0040117D xor cl, [esp+eax+98h+xor_key+8] .text:00401181 mov [esp+eax+98h+t_x], dl .text:00401185 mov [esp+eax+98h+t_y], cl .text:00401189 inc eax .text:0040118A cmp eax, 8 .text:0040118D jl short loc_401170 |
x与y的每个字节都不为0, 且 x > 0x0100000000000000
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | .text:0040120F mov eax, 7 .text:00401214 cmp [esp+eax+98h+t_x], 0 .text:00401219 jnz short loc_401221 .text:0040121B dec ecx .text:0040121C sub eax, 1 .text:0040121F jns short loc_401214 .text:00401221 cmp ecx, 8 .text:00401224 jnz loc_4013FE .text:0040122A mov eax, 7 .text:0040122F nop .text:00401230 cmp [esp+eax+98h+t_y], 0 .text:00401235 jnz short loc_40123D .text:00401237 dec ecx .text:00401238 sub eax, 1 .text:0040123B jns short loc_401230 .text:0040123D cmp ecx, 8 .text:00401240 jnz loc_4013FE .text:00401246 test [esp+98h+t_x+7], 0F0h .text:0040124B jnz loc_4013FE |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | .text:0040120F mov eax, 7 .text:00401214 cmp [esp+eax+98h+t_x], 0 .text:00401219 jnz short loc_401221 .text:0040121B dec ecx .text:0040121C sub eax, 1 .text:0040121F jns short loc_401214 .text:00401221 cmp ecx, 8 .text:00401224 jnz loc_4013FE .text:0040122A mov eax, 7 .text:0040122F nop .text:00401230 cmp [esp+eax+98h+t_y], 0 .text:00401235 jnz short loc_40123D .text:00401237 dec ecx .text:00401238 sub eax, 1 .text:0040123B jns short loc_401230 .text:0040123D cmp ecx, 8 .text:00401240 jnz loc_4013FE .text:00401246 test [esp+98h+t_x+7], 0F0h .text:0040124B jnz loc_4013FE |
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课
赞赏
他的文章
- KCTF2022春季赛 第三题 石像病毒 9112
- KCTF2022春季赛 第二题 末日邀请 16450
- KCTF2021秋季赛 第二题 迷失丛林 19187
- KCTF2020秋季赛 第十题 终焉之战 9199
- KCTF2020秋季赛 第九题 命悬一线 6709
赞赏
雪币:
留言: