-
-
[原创]从执行流程看shellcode(一)[附源代码]
-
发表于:
2009-2-18 20:37
8241
-
[原创]从执行流程看shellcode(一)[附源代码]
1、shellcode初始化代码
00401000 > $ 8D85 70FEFFFF lea eax, dword ptr [ebp-190] ; shellcode初始化代码
00401006 . 50 push eax ; /pWSAData
00401007 . 68 01010000 push 101 ; |RequestedVersion = 101 (1.1.)
0040100C . FF15 18504000 call dword ptr [<&Ws2_32.WSAStartup>] ; \WSAStartup
00401020 . EB 54 jmp short 00401076 -------------------
00401022 /$ 8B75 3C mov esi, dword ptr [ebp+3C] |
00401025 |. 8B7435 78 mov esi, dword ptr [ebp+esi+78] |
00401029 |. 03F5 add esi, ebp |
0040102B |. 56 push esi |
0040102C |. 8B76 20 mov esi, dword ptr [esi+20]
0040102F |. 03F5 add esi, ebp
00401031 |. 33C9 xor ecx, ecx
00401033 |. 49 dec ecx
00401034 |> 41 /inc ecx
00401035 |. AD |lods dword ptr [esi] 这部分就是获取函数的运算部分
00401036 |. 33DB |xor ebx, ebx
00401038 |> 36:0FBE1428 |/movsx edx, byte ptr ss:[eax+ebp]
0040103D |. 38F2 ||cmp dl, dh
0040103F |. 74 08 ||je short 00401049
00401041 |. C1CB 0D ||ror ebx, 0D
00401044 |. 03DA ||add ebx, edx |
00401046 |. 40 ||inc eax |
00401047 |.^ EB EF |\jmp short 00401038 |
00401049 |> 3BDF |cmp ebx, edi |
0040104B |.^ 75 E7 \jnz short 00401034 ----------------------------
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)