China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 21:17
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » General Cleanup Program for AUTORUN.INF Viruses View 5,784 Replies 10
Original Poster Posted 2006-12-19 11:44 ·  中国 山东 临沂 电信
初级用户
Credits 36
Posts 14
Joined 2006-12-16 13:44
19-year member
UID 73723
Gender Male
Status Offline
I've been in the forum for several days and only finished writing after getting help from many people.
Thank you all for your instructions.

Version 1.0

Virus characteristics:
Right - click on the drive letter, there appear bold auto, browse, autoplay; double - click the hard drive, there appears the open - with way

Currently, the viruses that can be completely cleaned:
SXS, LSASS.EXE, COMMAND.COM, AUTORUN.VBS

When encountering an unknown virus, delete the virus main body according to the program called in AUTORUN.INF.
For example
autorun.inf

open=test.exe
The program will automatically delete test.exe

There is still a lack in dealing with unknown viruses, only dealing with it according to autorun.inf, and unable to detect virus derivatives.

If the system is not installed on drive C, when dealing with the LSASS.EXE virus, it is easy to modify the registry badly, leading to being unable to log in normally.

I go to work during the day and can only update at night, so the update speed may be relatively slow.

http://zhenlove.com.cn/cndos/fileup/files/autorunkillone.rar

The link has expired (note from administrator)
Floor 2 Posted 2006-12-19 13:47 ·  中国 广西 玉林 博白县 电信
金牌会员
★★★★
Credits 3,687
Posts 1,467
Joined 2005-08-08 12:00
20-year member
UID 44210
Status Offline
Too many judgment statements
Simplify it (example):
for %%i in (c d e f g h i j k l m n o p q r s t u v w s y z) do (
set Driver=%%i
if exist %%i:\autorun.inf call :Check
)
echo Congratulations, no virus found or the virus has been cleaned up, the program will exit automatically after 3 seconds.
ping -n 4 127.1 >nul
exit

:Check
set "vir=sxs.exe RavMonE.exe autorun.bat command.com c:\sxs.exe c:\RavMonE.exe c:\autorun.bat c:\command.com"
for %%n in (%vir%) do (
for /f "tokens=1* delims==" %%i in (%Driver%:\autorun.inf) do if "%%j"=="%%n" call :%%~nn
)
goto :eof

:sxs
......
goto :eof


The virus file library uses
set "vir=sxs.exe RavMonE.exe autorun.bat command.com c:\sxs.exe c:\RavMonE.exe c:\autorun.bat c:\command.com"
Add (space separated, paths with spaces are not possible for the time being)

I used to write a 900-line batch script with judgment statements, and after learning to use "for", I simplified it to 60 lines ^_^

[ Last edited by zh159 on 2006-12-19 at 12:49 AM ]
Recent Ratings for This Post ( 3 in total) Click for details
RaterScoreTime
qingzangbasin +1 2006-12-21 02:18
PPdos +2 2006-12-31 07:03
wanyu555 +1 2007-01-18 15:47
Floor 3 Posted 2006-12-20 01:19 ·  中国 山东 临沂 联通
初级用户
Credits 36
Posts 14
Joined 2006-12-16 13:44
19-year member
UID 73723
Gender Male
Status Offline
Originally posted by zh159 at 2006-12-19 12:47 AM:
Too many judgment statements
Simplify (example):
for %%i in (c d e f g h i j k l m n o p q r s t u v w s y z) do (
set Driver=%%i
if exist %%i:\autorun.inf call :Check
)
echo Congratulations, er..


Thank you very much for the guidance, continue to modify.
Floor 4 Posted 2006-12-20 01:38 ·  中国 北京 海淀区 方正集团
中级用户
★★
Credits 404
Posts 179
Joined 2006-03-30 14:44
20-year member
UID 53056
Status Offline
Why not just close autorun? Set the Group Policy to disable AutoRun to enabled
Floor 5 Posted 2006-12-20 07:50 ·  中国 山东 临沂 电信
初级用户
Credits 36
Posts 14
Joined 2006-12-16 13:44
19-year member
UID 73723
Gender Male
Status Offline
Originally posted by kcdsw at 2006-12-19 12:38 PM:
Why not just close autorun

Group Policy: Disable AutoRun changed to Enabled


If so, many people will ask why the CD cannot be played automatically.
Floor 6 Posted 2006-12-20 08:06 ·  中国 广东 深圳 电信
初级用户
★★
Credits 135
Posts 64
Joined 2006-12-20 04:35
19-year member
UID 74003
Gender Male
Status Offline
They are all powerful people!!!

I still don't quite understand the parameters like for 的 tokens=1* delims==" right now!!!
Floor 7 Posted 2006-12-31 04:18 ·  中国 山东 济南 电信
初级用户
Credits 97
Posts 30
Joined 2006-12-30 10:54
19-year member
UID 75006
Gender Male
Status Offline
autorun很多时候有用阿,这个东东不错
Floor 8 Posted 2007-05-31 15:40 ·  中国 江苏 徐州 电信
初级用户
Credits 125
Posts 49
Joined 2006-12-24 08:33
19-year member
UID 74424
Gender Male
Status Offline
Good stuff, learned it.
Floor 9 Posted 2008-01-31 16:20 ·  中国 江苏 南通 电信
新手上路
Credits 15
Posts 10
Joined 2008-01-31 15:30
18-year member
UID 109901
Gender Male
Status Offline
Floor 10 Posted 2008-01-31 19:53 ·  中国 四川 成都 电信
初级用户
★★
Credits 176
Posts 78
Joined 2007-04-15 10:53
19-year member
UID 85268
Gender Male
Status Offline
Actually, you can combine FSUTIL to be more convenient. There's no need to specify the drive letter.
Floor 11 Posted 2008-11-24 13:54 ·  中国 广东 佛山 电信
初级用户
★★
Credits 178
Posts 82
Joined 2006-05-12 23:53
20-year member
UID 55419
Status Offline
Save it for later to read slowly.
Forum Jump: