能力值:
( LV13,RANK:1370 )
|
-
-
2 楼
invoke GetPidFromProcName, CTEXT("B.exe") ;得到B.exe的基址
invoke OpenProcess , PROCESS_ALL_ACCESS , TRUE , eax ;打开B.exe进程
invoke GetShell32Base, Pid,CTEXT("C.dll") ;得到B.exe下的C.dll的基址
mov modBaseAddr,eax
GetPidFromProcName proc lpProcName:DWORD
LOCAL stProcess : PROCESSENTRY32
LOCAL hSnapshot
LOCAL dwProcessID
mov dwProcessID, 0
invoke RtlZeroMemory, addr stProcess, sizeof stProcess
mov stProcess.dwSize, sizeof stProcess
invoke CreateToolhelp32Snapshot, TH32CS_SNAPPROCESS, 0
mov hSnapshot, eax
invoke Process32First, hSnapshot, addr stProcess
.while eax
invoke lstrcmpi, lpProcName, addr stProcess.szExeFile
.if eax==0
mov eax, stProcess.th32ProcessID
mov dwProcessID, eax
.break
.endif
invoke Process32Next, hSnapshot, addr stProcess
.endw
invoke CloseHandle, hSnapshot
mov eax, dwProcessID
ret
GetPidFromProcName endp
GetShell32Base proc uses ebx esi edi remoteproid:dword ,modname:dword
LOCAL hSnapshot:dword
LOCAL modinfo:MODULEENTRY32
mov modinfo.dwSize,sizeof MODULEENTRY32
invoke CreateToolhelp32Snapshot,TH32CS_SNAPMODULE,remoteproid
mov hSnapshot,eax
invoke Module32First,hSnapshot,addr modinfo
.while eax
lea ecx,modinfo.szModule
invoke lstrcmpi,modname,ecx
.if eax == 0
mov eax,modinfo.modBaseAddr
ret
.endif
invoke Module32Next,hSnapshot,addr modinfo
.endw
invoke CloseHandle,hSnapshot
ret
GetShell32Base endp
|
能力值:
( LV5,RANK:60 )
|
-
-
3 楼
楼上的比较厉害呵呵。
|