How to Make a Injector / Injector Codes (VB.net) PREPARE TO READ A LOT!
~How To Make A Injector~
(Instructions on how to create at bottom of thread.)
Thank me for doing all this typing for you.
Any Questions or problems E-mail me @ Josh_MPGH@yahoo.com or send me a PM(Private Message).
~NOTES~
1: You have to use "Visual Basic" any Version will do but I use "Visual Basic 2010 Express" (Scroll Down for Download) you CAN NOT use C++, C# or anything else it has to be VB.net.(They do have newer versions then 2010.)(Instructions on how to create at bottom of thread.)
Thank me for doing all this typing for you.

Any Questions or problems E-mail me @ Josh_MPGH@yahoo.com or send me a PM(Private Message).
~NOTES~
2: Do not tell me these codes do not work because they do.
3: I have included all these codes in a .rar file for you to download.
4: (If you get this far) Iv noticed that when you finish the injector and use it you can't type .exe at the end of the process your injecting into or it won't inject.
EXAMPLE the wrong way: TEST.exe X
EXAMPLE the right way: TEST √
5: I didn't include EVERY SINGLE LITTLE detail in the instructions I'm just showing you the coding and how to enter the coding. The form names etc are up to you.
6: Where it says "Josh's Injector will now restart" rename that to your injector name.
7: Couple of spelling errors in the screenshots.
8: MPGH blocked some of the code where it says "****" there is nothing I can do about it, just download "Injector Codes.rar".
~Links~
Visual Basic Download:Visual Basic 2010 Express | Microsoft Visual StudioInjector Codes.rar VirusScan1:https://www.virustotal.com/file/b9f0...is/1340681723/
Injector Codes.rar VirusScan2:Report - Antivirus online virus scan - viruschief.com
~Injector Codes~
Code:
[Main Code] Private TargetProcessHandle As Integer Private pfnStartAddr As Integer Private pszLibFileRemote As String Private TargetBufferSize As Integer Public Const PROCESS_VM_READ = &H10 Public Const TH32CS_SNAPPROCESS = &H2 Public Const MEM_COMMIT = 4096 Public Const PAGE_READWRITE = 4 Public Const PROCESS_CREATE_THREAD = (&H2) Public Const PROCESS_VM_OPERATION = (&H8) Public Const PROCESS_VM_WRITE = (&H20) Dim DLLFileName As String Public Declare Function ReadProcessMemory Lib "kernel32" ( _ ByVal hProcess As Integer, _ ByVal lpBaseAddress As Integer, _ ByVal lpBuffer As String, _ ByVal nSize As Integer, _ ByRef lpNumberOfBytesWritten As Integer) As Integer Public Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _ ByVal lpLibFileName As String) As Integer Public 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 Public Declare Function WriteProcessMemory Lib "kernel32" ( _ ByVal hProcess As Integer, _ ByVal lpBaseAddress As Integer, _ ByVal lpBuffer As String, _ ByVal nSize As Integer, _ ByRef lpNumberOfBytesWritten As Integer) As Integer Public 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 Public 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, _ ByRef lpThreadId As Integer) As Integer Public Declare Function OpenProcess Lib "kernel32" ( _ ByVal dwDesiredAccess As Integer, _ ByVal bInheritHandle As Integer, _ ByVal dwProcessId As Integer) As Integer Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindowName As String) As Integer Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandleA" ( _ ByVal hObject As Integer) As Integer Dim ExeName As String = IO.Path.GetFileNameWithoutExtension(Application.ExecutablePath)
Code:
[INJECT CODE]
Private Sub Inject()
On Error GoTo 1 ' If error occurs, app will close without any error messages
InjectTimer.Stop()
Dim TargetProcess As Process() = Process.GetProcessesByName(TextBox1.Text)
TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)
pszLibFileRemote = browsedll.FileName
pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")
TargetBufferSize = 1 + Len(pszLibFileRemote)
Dim Rtn As Integer
Dim LoadLibParamAdr As Integer
LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)
Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)
CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)
CloseHandle(TargetProcessHandle)
1: MsgBox("Error. your dll was not injected into" & " " & TextBox1.Text & " " & "Josh's Injector will restart.", MsgBoxStyle.OkOnly, "Error")
Application.Restart()
End Sub
Code:
[INJECT BUTTON CODE]
Dim TargetProcess As Process() = Process.GetProcessesByName(TextBox1.Text)
If TargetProcess.Length = 0 Then
Else
If System****.File.Exists(TextBox2.Text) Then
Call Inject()
Label5.Text = "Successfully Injected!"
Else
Label5.Text = "Error: .dll not found!"
End If
End If
Code:
[TIMER1 CODE]
Label5.Text = "Waiting for" & " " & TextBox1.Text & " " & "to Start..."
Dim TargetProcess As Process() = Process.GetProcessesByName(TextBox1.Text)
If TargetProcess.Length = 0 Then
Else
If System****.File.Exists(TextBox2.Text) Then
Timer1.Stop()
Call Inject()
Label5.Text = "Successfully Injected!"
Else
Timer1.Stop()
MsgBox("Error: your .dll was not found. Josh's Injector will now close and restart.", MsgBoxStyle.OkOnly, "Error")
Application.Restart()
End If
End If
Code:
[TIMER2 CODE] If Checkbox1.Checked = True And Label1.Text = "Successfully Injected!" Then Me.Close()
Code:
[AUTOMATIC INJECTION] Timer1.Start() Button1.Enabled = False
Code:
[MANUAL INJECTION]
[BUTTON1 = Your inject button]
Label5.Text = "Waiting for User Input..."
Timer1.Stop()
Button1.Enabled = True
Code:
[CLOSE AFTER INJECTION] If Checkbox1.Checked = True then Timer2.Start() If Checkbox1.Checked = false then Timer2.Stop()
~Instructions on How to Make Injector~
Step1:--Getting Visual Basic 2010 Express--Scroll up to find the download link to VB.net. OR if you already have it. just skip this step.
Step2:--Create Project / Start the Coding--
Look at the screenshots and do what they say.(Don't worry about the other codes except "Main Code" and the "Inject Code" for now.
#1

#2

#3

#4

#5

Step3:--Customizing the Form--
Look at the screenshot.

To Change the name of the things on the form click on the object once and scroll up in the properties until you find (Name) and to the right of it is the name.
Step4:--Finish the Coding--
(By now you should know what I mean by double clicking on stuff to bring up the coding.)
-Drag 2 timers and 1openfiledialog (DON'T RENAME THEM KEEP THE NAMES!)
-Double click on the button you named on the "Add .dll" and type OpenFileDialog1.ShowDialog()
-Double click on the radiobutton you named "Automatic Injection" and copy the code "Auto Injection."
-Double click on the radiobutton you named "Manual Injection" and copy the code "Manual Injection."
-Double click on the checkbox you named "Close After Injection" and copy the code "Close After Injection."
-Double click on the button you named "Inject" and copy the "Inject Button Code."
-Double click on the button you named "Exit" and type Me.Close().
-Single click on the openfiledialog1 and in the properties at the top click the thing that looks like a lighting bolt double click on File_OK and type Textbox2.text = Openfiledialog1.FileName.(Textbox2 = your .dll path textbox).
-Double click on the Timer1 and Copy "Timer1" code.
-Double Click on the Timer2 and Copy the "Timer2" code.
-The code in the screenshot that said Form1.Load and I told you NOT TO DELETE type Button1.Enabled = false and radiobutton1.checked = true
Step5:--Building the Project--
At the top of "Visual Basic" the toolbar Click "Debug" and press "Build (Your Project Name)" open the folder where you saved your project and Navigate too "Your Project Name/Your Project Name/bin/release"
--OPTIONAL--
If you want to save your settings such as processname and .dll path read below.
This uses my.settings in vb.net and does not create any txt file or .cfg file to save settings it saves in the program.
1:On your solution explorer double click "My Project".
2:Go to the "Settings" tab and you will see a line that says settings - string - user change that first line to Process and it should automatically create a new line rename the 2nd line to dllpath.
3:when your injector CLOSES you need to add this code below.
Textbox1.text = my.settings.process
Textbox2.text = my.settings.dllpath
my.settings.save
When your injector LOADS you need to add this code.
Textbox1.text = my.settings.process
Textbox2.text = my.settings.dllpath
same code as saving but without my.settings.save.
4:I;m not going to explain where to put these codes im sorry it should be easy to do just put it in the code everytime the program is going to exit or after injection etc.
Have Fun with your injector, I hope I made a good tutorial.

HOPE IT DOES!
ill try to profect it 
