This injector tutorial is very very simple, the injector itself is simple and working
The original code wasn't mine, it was canadafrost's. i just made a simple version that's easy to make and use.
This injectors settings (auto) :
close after injection
auto inject
Requirements:
Visual basic express 2008 or 2010
or
visual studio 2008 or 2010
Application type:
Windows Form Application
How to make this injector:
1. Add a timer and an Open File Dialog to your form from your toolbox.
2. Double click you're form and delete all the code that's in there and replace it with this one.
Code:
Public Class Form1
Private Property result As Short
Dim dlls As New Dictionary(Of String, String)
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As Integer
Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Integer, ByVal lpAddress As Integer, ByVal dwSize As Integer, ByVal flAllocationType As Integer, ByVal flProtect As Integer) As Integer
Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByVal lpBuffer() As Byte, ByVal nSize As Integer, ByVal lpNumberOfBytesWritten As UInteger) As Boolean
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Integer, ByVal lpProcName As String) As Integer
Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Integer
Private Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Integer, ByVal lpThreadAttributes As Integer, ByVal dwStackSize As Integer, ByVal lpStartAddress As Integer, ByVal lpParameter As Integer, ByVal dwCreationFlags As Integer, ByVal lpThreadId As Integer) As Integer
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Integer, ByVal dwMilliseconds As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Private Function Inject(ByVal pID As Integer, ByVal dllLocation As String) As Boolean
If IntPtr.Size = 8 Then Throw New ArgumentException("Please make sure this program is compiled as x86, not x64. Memory functions don't work so well otherwise.")
Dim hProcess As Integer = OpenProcess(&H1F0FFF, 1, pID)
If hProcess = 0 Then Return False
Dim dllBytes As Byte() = System.Text.Encoding.ASCII.GetBytes(dllLocation)
Dim allocAddress As Integer = VirtualAllocEx(hProcess, 0, dllBytes.Length, &H1000, &H4)
If allocAddress = Nothing Then Return False
Dim kernelMod As Integer = GetModuleHandle("kernel32.dll")
Dim loadLibAddr = GetProcAddress(kernelMod, "LoadLibraryA")
If kernelMod = 0 OrElse loadLibAddr = 0 Then Return False
WriteProcessMemory(hProcess, allocAddress, dllBytes, dllBytes.Length, 0)
Dim libThread As Integer = CreateRemoteThread(hProcess, 0, 0, loadLibAddr, allocAddress, 0, 0)
If libThread = 0 Then
Return False
Else
WaitForSingleObject(libThread, 5000)
CloseHandle(libThread)
End If
CloseHandle(hProcess)
MsgBox("Successfully Injected " & dlls.Count & " Dlls to Crossfire.exe.", vbCrLf, "Lucasheer715 @ MPGH.Net")
Me.Close()
Return True
End Function
Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs)
Dim FileName As String
FileName = OpenFileDialog1.FileName
Dim DllFileName As String = FileName
OpenFileDialog1.Multiselect = True
Try
dlls.Add(DllFileName, OpenFileDialog1.FileName)
MsgBox(DllFileName + " was succesfully Added to .DLLs.", vbCrLf, "Waiting for crossfire.exe")
Catch ex As Exception
MsgBox("The .DLLs/.DLL could not be added :(", vbCrLf, "Try restarting to resolve this problem.")
End Try
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If dlls.Count = 0 Then
'do nothing, u could add another openfiledialog here.
Dim TargetProcess As Process() = Process.GetProcessesByName("Crossfire")
If TargetProcess.Length = 0 Then
'do nothing
Else
Dim ProcID As Integer = Process.GetProcessesByName("Crossfire")(0).Id
For Each inj As KeyValuePair(Of String, String) In dlls
Try
Inject(ProcID, inj.Value)
Timer1.Stop()
Catch ex As Exception
MsgBox("Failed to start injection :(", vbCrLf, "Please retry :)")
End Try
Next
End If
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Interval = 50
Timer1.Enabled = True
hideform()
browsedlls()
End Sub
Private Sub hideform()
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.Size = New System.Drawing.Size(0, 0)
Me.Hide()
End Sub
Private Sub browsedlls()
OpenFileDialog1.Filter = "DLL (*.dll) |*.dll|All Files (*.*) |*.*"
OpenFileDialog1.ShowDialog()
OpenFileDialog1.ShowReadOnly = True
End Sub
End Class
HOW TO USE (VERY VERY IMPORTANT!!!)
1. press f5 to debug or open injector
2. find .dll in the open file dialog.
3. run crossfire and wait.
virus jotti :
http://virusscan.jotti.org/en/scanre...ebfceec37ab147
virus total :
https://www.virustotal.com/en/file/2...is/1370677072/