-
-
[求助]远程注入失败。
-
发表于: 2008-8-22 15:06 3283
-
;注入处理
RemoteProcessProcStartAddr:
RemoteProcessProc proc
PrintText "RemoteProcessProc!!!!!!!!"
ret
RemoteProcessProc endp
RemoteProcessProcCodeLen equ ($ - RemoteProcessProcStartAddr)*1
;注入部分,注入后notepad.exe会出错。
mov hProcessList,@invoke(CreateToolhelp32Snapshot,TH32CS_SNAPPROCESS,0)
mov stProcess.dwSize,sizeof PROCESSENTRY32
invoke Process32First,hProcessList,addr stProcess
.repeat
invoke lstrcmpi,addr stProcess.szExeFile,@CTEXT("notepad.exe")
.if eax == 0
invoke OpenProcess,PROCESS_ALL_ACCESS,TRUE,stProcess.th32ProcessID
mov hProcess,eax
.break
.endif ;//
invoke Process32Next,hProcessList,addr stProcess
.break .if eax == 0
.until FALSE
.if hProcess != 0
invoke VirtualAllocEx,hProcess,NULL,RemoteProcessProcCodeLen,MEM_COMMIT,PAGE_EXECUTE_READWRITE
mov hVirtualAlloc,eax
invoke WriteProcessMemory,hProcess,hVirtualAlloc,addr RemoteProcessProc,RemoteProcessProcCodeLen,addr i
invoke CreateRemoteThread,hProcess,NULL,NULL,addr RemoteProcessProc,NULL,NULL,addr j
PrintHex eax
.endif ;//
invoke CloseHandle,hProcess
invoke CloseHandle,hProcessList
RemoteProcessProcStartAddr:
RemoteProcessProc proc
PrintText "RemoteProcessProc!!!!!!!!"
ret
RemoteProcessProc endp
RemoteProcessProcCodeLen equ ($ - RemoteProcessProcStartAddr)*1
;注入部分,注入后notepad.exe会出错。
mov hProcessList,@invoke(CreateToolhelp32Snapshot,TH32CS_SNAPPROCESS,0)
mov stProcess.dwSize,sizeof PROCESSENTRY32
invoke Process32First,hProcessList,addr stProcess
.repeat
invoke lstrcmpi,addr stProcess.szExeFile,@CTEXT("notepad.exe")
.if eax == 0
invoke OpenProcess,PROCESS_ALL_ACCESS,TRUE,stProcess.th32ProcessID
mov hProcess,eax
.break
.endif ;//
invoke Process32Next,hProcessList,addr stProcess
.break .if eax == 0
.until FALSE
.if hProcess != 0
invoke VirtualAllocEx,hProcess,NULL,RemoteProcessProcCodeLen,MEM_COMMIT,PAGE_EXECUTE_READWRITE
mov hVirtualAlloc,eax
invoke WriteProcessMemory,hProcess,hVirtualAlloc,addr RemoteProcessProc,RemoteProcessProcCodeLen,addr i
invoke CreateRemoteThread,hProcess,NULL,NULL,addr RemoteProcessProc,NULL,NULL,addr j
PrintHex eax
.endif ;//
invoke CloseHandle,hProcess
invoke CloseHandle,hProcessList
[注意]传递专业知识、拓宽行业人脉——看雪讲师团队等你加入!
赞赏
他的文章
- [求助]C语言中没有Currency类型? 4565
- [求助]远程注入失败。 3284
- [原创]在MASM中调用标准C函数 7429
- [下载]Radasm2.2.1.3下载 9492
- [求助]SHA512求助 3492
看原图
赞赏
雪币:
留言: