Make a Drag a& Drop Injector
Soo, Someone asked me to make a tutorial about how I make these drag and drop Method :
So I decided to make a full tutorial for the whole injector.
If You're Gonna Use This Method Give Credits
So let's start :
start a new Project > windows form application
Then Add these items :
- 3 Labels
- 1 ListBox
- 1 Combobox
- 1 CheckBox
- 2 Timers
- 1 OpenFileDialog
Then Name Them :
- ListBox1 --> DLLs
- Label1 --> STS
- Combobox1 --> ProcName
- CheckBox1 --> CloseAJ
Then Organize them as u like :

Now Click F7 and C+P This Code Between "Public Class Form1" and "End Class"
The Double Click on The Form and C+P this COde :
Now One Click on The DLLs and Go to Properties and Click on this Icon 
and Search for this Sub :
then double click on it and C+P this code in it :
Then Double Click on OpenFileDialog1 and C+P this Code in it :
Then Double click on Timer1 and C+P this code in it :
Then Double Click on Timer2 and C+P this code :
Then Go to The end of The Code(to the last 2 lines) and C+P this Code Between "End Sub" and "End Class" :
Now Run The Project.
If everything is working You'll Get a Msgbox That says "No DLL Dropped." and The Debug will stop
this means that it's working fine, so go to it's directory Drag a Dll on the App icon and enjoy the easy injection
INJECTOR FUNCTIONS :
- Drag and Drop on Icon
- Drag and Drop On ListBox(Dll Name) to Change The Dll
- Double Click on ListBox(Dll Name) to Browse a Different Dll
- Auto Inject
So..
Here I'm Gonna explain what does the 2 methods of drag and drop that I use make :
1st Method is Dropping on the Icon :
This code uses the Method Of CommandLineArgs which is the best method dragging and dropping on the app icon
The Code above is edited with comments to explain the drag and drop.
The 2nd Method is Dragging and Dropping onto the Listbox, or any item in Vb.net that have the property of "AllowDrop"
Thank Youu.
Comment If There is any Problem
The Project is in an Attachmnet
Virus Scan :
Jotti
VirusTotal
@Hannibal @BACKD00R @iSmexy Please Approve
So I decided to make a full tutorial for the whole injector.
If You're Gonna Use This Method Give Credits
So let's start :
start a new Project > windows form application
Then Add these items :
- 3 Labels
- 1 ListBox
- 1 Combobox
- 1 CheckBox
- 2 Timers
- 1 OpenFileDialog
Then Name Them :
- ListBox1 --> DLLs
- Label1 --> STS
- Combobox1 --> ProcName
- CheckBox1 --> CloseAJ
Then Organize them as u like :

Now Click F7 and C+P This Code Between "Public Class Form1" and "End Class"
Code:
Private result As Short
Private Declare Function GetAsyncKeyState Lib "User32" (ByVal vKey As Integer) As Short
Dim Xpos As New Integer
Dim Ypos As New Integer
Dim Pos As Point
Dim dlls4inj 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)
If CloseAJ.Checked = True Then
Me.Close()
Else
MsgBox("DLL Injected.", MsgBoxStyle.Information)
End If
Return True
End Function
Code:
Timer2.Interval = 1
Timer2.Start()
DLLs.Name = "DLLs"
DLLs.AllowDrop = true
ProcName.Text = "crossfire"
STS.Text = "Waiting for Program to Start.."
Timer1.Interval = 50
Timer1.Start()
CloseAJ.Checked = True
'//=========DLL Drop Code===============
Try
Dim Lil As String = My.Application.CommandLineArgs(0)
If Lil.Contains(".Dll") Or Lil.Contains(".DLL") Or Lil.Contains(".dll") Then
Dim r
r = New IO.StreamReader(Lil)
For Each i In My.Application.CommandLineArgs
Dim FileName As String
FileName = i.Substring(i.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.DLLs.Items.Add(DllFileName)
dlls4inj.Add(DllFileName, i)
Next
r.Close()
Else
MsgBox("The File You Dropped in not a Dll", MsgBoxStyle.Critical)
End
End If
Catch ex As Exception
End Try
If DLLs.Items.Count = 0 Then
MsgBox("No DLL Dropped.", MsgBoxStyle.Critical)
End
Else
End If

and Search for this Sub :

then double click on it and C+P this code in it :
Code:
OpenFileDialog1.Filter = "DLL (*.dll) |*.dll|All Files (*.*) |*.*"
OpenFileDialog1.ShowDialog()
Code:
dlls4inj.Clear()
DLLs.Items.Clear()
Dim FileName As String
FileName = OpenFileDialog1.FileName.Substring(OpenFileDialog1.FileName.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.DLLs.Items.Add(DllFileName)
dlls4inj.Add(DllFileName, OpenFileDialog1.FileName)
Code:
If DLLs.Items.Count > 0 Then
Dim TargetProcess As Process() = Process.GetProcessesByName(ProcName.Text)
If TargetProcess.Length = 0 Then
STS.Text = ("Waiting for " + ProcName.Text + ".exe")
Else
Dim ProcID As Integer = Process.GetProcessesByName(ProcName.Text)(0).Id
Timer1.Stop()
Timer2.Stop()
For Each inj As KeyValuePair(Of String, String) In dlls4inj
Inject(ProcID, inj.Value)
If CloseAJ.Checked = True Then
If STS.Text = "Dll Injected." Then
End
End If
End If
Next
End If
End If
Code:
If ProcName.Text = "" Then
If DLLs.Items.Count = 0 Then
STS.Text = "Waiting For DLL"
Timer1.Stop()
End If
Else
Dim TargetProcess As Process() = Process.GetProcessesByName(ProcName.Text)
If TargetProcess.Length = 0 Then
If DLLs.Items.Count = 0 Then
STS.Text = "Waiting For DLL"
Timer1.Stop()
Else
STS.Text = ("Waiting for " + ProcName.Text + ".exe")
End If
End If
End If
Timer1.Start()
Code:
Private Sub DLLs_DragEnter(ByVal sender As Object, ByVal e As _
System.Windows.Forms.DragEventArgs) Handles DLLs.DragEnter
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.All
End If
End Sub
Private Sub DLLs_DragDrop(ByVal sender As Object, ByVal e As _
System.Windows.Forms.DragEventArgs) Handles DLLs.DragDrop
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim MyFiles() As String
Dim i As Integer
' Assign the files to an array.
MyFiles = e.Data.GetData(DataFormats.FileDrop)
' Loop through the array and add the files to the list.
For i = 0 To MyFiles.Length - 1
dlls4inj.Clear()
DLLs.Items.Clear()
Dim FileName As String
FileName = MyFiles(i).Substring(MyFiles(i).LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.DLLs.Items.Add(DllFileName)
dlls4inj.Add(DllFileName, MyFiles(i))
Next
End If
End Sub
If everything is working You'll Get a Msgbox That says "No DLL Dropped." and The Debug will stop
this means that it's working fine, so go to it's directory Drag a Dll on the App icon and enjoy the easy injection
INJECTOR FUNCTIONS :
- Drag and Drop on Icon
- Drag and Drop On ListBox(Dll Name) to Change The Dll
- Double Click on ListBox(Dll Name) to Browse a Different Dll
- Auto Inject
More About Drag & drop
So..
Here I'm Gonna explain what does the 2 methods of drag and drop that I use make :
1st Method is Dropping on the Icon :
Code:
Try
Dim Lil As String = My.Application.CommandLineArgs(0) ' CommandLineArgs is equivalent to Dropped items that ran the app.
If Lil.Contains(".Dll") Or Lil.Contains(".DLL") Or Lil.Contains(".dll") Then ' This is to make sure That the dropped item is a Dll
Dim r
r = New IO.StreamReader(Lil) ' this Dim is for reading the Directory of The item ran the app
For Each i In My.Application.CommandLineArgs
' here is where I add the dll to my Listbox
Dim FileName As String
FileName = i.Substring(i.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.DLLs.Items.Add(DllFileName)
dlls4inj.Add(DllFileName, i)
Next
r.Close()
Else
MsgBox("The File You Dropped in not a Dll", MsgBoxStyle.Critical)
End
End If
Catch ex As Exception
End Try
If DLLs.Items.Count = 0 Then
MsgBox("No DLL Dropped.", MsgBoxStyle.Critical)
End
Else
End If
The Code above is edited with comments to explain the drag and drop.
The 2nd Method is Dragging and Dropping onto the Listbox, or any item in Vb.net that have the property of "AllowDrop"
Code:
Private Sub DLLs_DragEnter(ByVal sender As Object, ByVal e As _
System.Windows.Forms.DragEventArgs) Handles DLLs.DragEnter ' It Handles Once The Dragged Item Enters The Field of Listbox1 but still not dropped
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
e.Effect = DragDropEffects.All ' If it's Dropped do this action.
End If
End Sub
Code:
Private Sub DLLs_DragDrop(ByVal sender As Object, ByVal e As _
System.Windows.Forms.DragEventArgs) Handles DLLs.DragDrop ' Handles The Dropping Part.
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
Dim MyFiles() As String
Dim i As Integer
' Assign the files to an array.
MyFiles = e.Data.GetData(DataFormats.FileDrop)
' Loop through the array and add the files to the list.
For i = 0 To MyFiles.Length - 1
dlls4inj.Clear()
DLLs.Items.Clear()
Dim FileName As String
FileName = MyFiles(i).Substring(MyFiles(i).LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.DLLs.Items.Add(DllFileName)
dlls4inj.Add(DllFileName, MyFiles(i))
Next
End If
End Sub
Thank Youu.
Comment If There is any Problem
The Project is in an Attachmnet
Virus Scan :
Jotti
VirusTotal
@Hannibal @BACKD00R @iSmexy Please Approve



