- 运行debug4示例程序并保持打开
- 运行petools找到子进程并转存
转存后用od打开:
12345678910111213141516171819202122232425262700401000 $ 68 C0994000 push Dumped.004099C0 ; /MutexName = "ReverseCore:DebugMe4"00401005 . 6A 00 push 0x0 ; |InitialOwner = FALSE00401007 . 6A 00 push 0x0 ; |pSecurity = NULL00401009 . FF15 04804000 call dword ptr ds:[<&KERNEL32.CreateMute>; \CreateMutexW0040100F . 85C0 test eax,eax00401011 . 75 17 jnz XDumped.0040102A00401013 . FF15 1C804000 call dword ptr ds:[<&KERNEL32.GetLastErr>; [GetLastError00401019 . 50 push eax0040101A . 68 EC994000 push Dumped.004099EC ; ASCII "CreateMutex() failed! [%d]"0040101F . E8 21030000 call Dumped.0040134500401024 . 83C4 08 add esp,0x800401027 . 33C0 xor eax,eax00401029 . C3 retn0040102A > FF15 1C804000 call dword ptr ds:[<&KERNEL32.GetLastErr>; [GetLastError00401030 . 3D B7000000 cmp eax,0xB700401035 74 08 je XDumped.0040103F00401037 E8 24000000 call Dumped.004010600040103C 33C0 xor eax,eax0040103E C3 retn0040103F 8DC0 lea eax,eax ; 非法使用寄存器00401041 . 6A 00 push 0x0 ; /Style = MB_OK|MB_APPLMODAL00401043 . 68 089A4000 push Dumped.00409A08 ; |Title = "DebugMe4"00401048 . 68 1C9A4000 push Dumped.00409A1C ; |Text = "Child Process"0040104D . 6A 00 push 0x0 ; |hOwner = NULL0040104F . FF15 1C814000 call dword ptr ds:[<&USER32.MessageBoxW>>; \MessageBoxW00401055 . C3 retn发现子进程运行时加密的部分已经解开,处理下Mutex判断和21行处的非法指令即可提出子程序
原理:通过恰好的时机使用转存脱壳,(前提需要对程序流程十分了解)