此代码注入xp正常, 注入win7 system进程会重启,注入普通进程正常。
注入函数 ZwCreateThreadEx 谁能看出哪里的问题
__CODE_ASM:
//
pushad
pushfd
//重定位
call __REMOTE_MODULE
__REMOTE_MODULE:
pop ebx
sub ebx,offset __REMOTE_MODULE //
//
mov eax,offset _strKernel32
add eax,ebx
push eax
mov eax,[offset _lpGetModuleHandle]
add eax,ebx
call [eax]
//
mov eax,offset stubend
add eax,ebx
mov ecx,0x44
__MemPi:
mov byte ptr[eax+ecx-1],0
loop __MemPi
push eax
mov dword ptr[eax],0x44 //si.cb = sizeof(si);
mov word ptr[eax+0x30],SW_SHOW //si.wShowWindow = SW_SHOWNORMAL;
mov ecx,offset _lpDesktop
add ecx,ebx
mov dword ptr[eax+0x8],ecx //si.lpDesktop = "winsta0\default";
add eax,0x44
push eax //pi
push 0
push 0
push NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE
push 0
push 0
push 0
mov eax,offset _strExeOrDllPath
add eax,ebx
push eax
push 0
//---------------------
//OpenProcessToken( _hProcess , TOKEN_ALL_ACCESS , &hToken )
mov eax,offset __Token
add eax,ebx
push eax
push TOKEN_ALL_ACCESS
push -1
mov eax,offset _lpOpenProcessToken
add eax,ebx
call [eax]
//---------------------
mov eax,offset __Token
add eax,ebx
push dword ptr[eax]
mov eax,offset _lpCreateProcessAsUser
add eax,ebx
call [eax]
cmp eax,0
popfd
popad
retn 0x4
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课