Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Programming Tutorials › HOW TO MAKE YOUR OWN INJECTOR!

HOW TO MAKE YOUR OWN INJECTOR!

Posts 1–10 of 10 · Page 1 of 1
CheytacBoy__
CheytacBoy__
HOW TO MAKE YOUR OWN INJECTOR!
Let's get started:

1. Open your Visual Basic 2008/2010

2. Make a windows form application project

3. Make

Code:
• 5Buttons 
• 2Radiobuttons
• 2Labels
• 1Listboxes
• 1Timers
• 1OpenFileDialog
• 1Checkbox
• 1Textbox
4. Change Name

Code:
Listbox1 = "DLLs"

Changing Text :
Button1 = "Browse"
Button2 = "Remove"
Button3 = "Clear List"
Button4 = "Inject"
Button5 = "Quit"
RadioButton1 = "Manual"
RadioButton2 = "Automatic"
Checkbox1 = "Close after Inject"
Label2 = Status
5. Double Click the Form And Paste This

Code:
Public Class Form1
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)
Private Sub Inject()
On Error GoTo 1 ' If error occurs, app will close without any error messages
Timer1.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 = OpenFileDialog1.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: Me.Show()
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DLLs.Name = "DLLs"
Button1.Text = "Browse"
Label1.Text = "Waiting for Program to Start.."
Timer1.Interval = 50
Timer1.Start()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
OpenFileDialog1.Filter = "DLL (*.dll) |*.dll"
OpenFileDialog1.ShowDialog()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
For i As Integer = (DLLs.SelectedItems.Count - 1) To 0 Step -1
DLLs.Items.Remove(DLLs.SelectedItems(i))
Next
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
DLLs.Items.Clear()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If IO.File.Exists(OpenFileDialog1.FileName) Then
Dim TargetProcess As Process() = Process.GetProcessesByName(TextBox1.Text)
If TargetProcess.Length = 0 Then

Me.Label1.Text = ("Waiting for " + TextBox1.Text + ".exe")
Else
Timer1.Stop()
Me.Label1.Text = "Successfully Injected!"
Call Inject()
If CheckBox1.Checked = True Then
End
Else
End If
End If
Else
End If 
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If IO.File.Exists(OpenFileDialog1.FileName) Then
Dim TargetProcess As Process() = Process.GetProcessesByName(TextBox1.Text)
If TargetProcess.Length = 0 Then

Me.Label1.Text = ("Waiting for " + TextBox1.Text + ".exe")
Else
Timer1.Stop()
Me.Label1.Text = "Successfully Injected!"
Call Inject()
If CheckBox1.Checked = True Then
End
Else
End If
End If
Else
End If
End Sub

Private Sub OpenFileDialog1_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk
Dim FileName As String
FileName = OpenFileDialog1.FileName.Substring(OpenFileDialog1.FileName.LastIndexOf("\"))
Dim DllFileName As String = FileName.Replace("\", "")
Me.DLLs.Items.Add(DllFileName)
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Me.Close()
End Sub

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
Button4.Enabled = True
Timer1.Enabled = False
End Sub

Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
Button4.Enabled = False
Timer1.Enabled = True
End Sub
End Class
Done!
Press Thanks Button If I Helping You!
#1 · 13y ago
abuckau907
abuckau907
most of the right parts are there, but I would not call this a "tutorial"

and a few parts are even wrong and/or ..weird.

Code:
Private Sub Inject()
On Error GoTo 1 ' If error occurs, app will close without any error messages
....
1: Me.Show()
End Sub

''app will close without msg <-> Me.Show() ?  I know you're going to say " well I forgot to change it.." : I'm just saying..
------------------------------------------------
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)

''Rtn is never used. And...is supposed to be boolean ?!!
''no error checking..which isn't always bad, cuz I don't sometimes, but.. edit* you did, but very loosely.
from msdn.com ie. Microsoft, ie. windows, ie. what you're using.
Code:
BOOL WINAPI WriteProcessMemory(
  _In_   HANDLE hProcess,
  _In_   LPVOID lpBaseAddress,
  _In_   LPCVOID lpBuffer,
  _In_   SIZE_T nSize,
  _Out_  SIZE_T *lpNumberOfBytesWritten
);

//This is C++, but you *should* get the point, the API returns a BOOL not an INT.
//and you never used the return value anyway :p
//also consider using IntPtr instead of Integer because of 64 bit interoperability. maybe.
//ie. ByVal lpBaseAddress As Integer should be IntPtr, and all your 'memory addresses' should be Intptr too. For 64 compat.
I guess seeing most of the pieces (api calls mostly) might help someone. Again, not really a tutorial. Thank you for wanting to help tho.


^^I'm no expert, but I do know "return values" and "api declaration", which are *general* language concepts.




#2 · edited 13y ago · 13y ago
abuckau907
abuckau907
Code:
Private pfnStartAddr As Integer
Private pszLibFileRemote As String
Did you make this code yourself? What does "pfn" and "psz" stand for? and "lp" and "dw" -- I know, but do you?
#3 · edited 13y ago · 13y ago
radnomguywfq3
radnomguywfq3
Quote Originally Posted by abuckau907 View Post
Code:
Private pfnStartAddr As Integer
Private pszLibFileRemote As String
Did you make this code yourself? What does "pfn" and "psz" stand for? and "lp" and "dw" -- I know, but do you?
pfn is function pointer, psz is pointer to null (zero) terminated string, lp is long pointer(not relevant for protected mode x86), dw is double word. Just standard Hungarian notation.

WriteProcessMemory returns a BOOL data type, but the typdef for a BOOL is a signed integer. I think the .Net boolean type would be less safe of an implicit conversion(maybe isn't, I'd have to look it up in the spec.) but I know that I won't have any odd bugs if I just interpret the return as a integer.

IntPtr would be a good idea, Integer is 32bits, and a long is 64 bits. Intptr is 64 bits on a 64 bit system, and 32 on a 32 bit system.
#4 · edited 13y ago · 13y ago
abuckau907
abuckau907
I asked if he knew what they meant, not you, because I was implying he copy-pasted it. Thanks for answering HIS question tho.. :/
#5 · edited 13y ago · 13y ago
radnomguywfq3
radnomguywfq3
Quote Originally Posted by abuckau907 View Post
I asked if he knew what they meant, not you, because I was implying he copy-pasted it. Thanks for answering HIS question tho.. :/
Sorry, I must have misread your post.
#6 · 13y ago
abuckau907
abuckau907
Don't say sorry to me :/ idc. I'm just saying "This sucks, as far as *tutorials* go"..i know about bool etc, but I don't think the OP does.

^^not my job. but seriously. tutorial. ??
#7 · edited 13y ago · 13y ago
MarkHC
MarkHC
I think the right title would be: "How to Copy&Paste your own injector"
#8 · 13y ago
tynab
tynab
Is that undetected for cf ?
#9 · 13y ago
IT
itsmebadman
This guy can make his own injector and he wants my injector code. Noob. go to youtube and copy dat sh1t
#10 · 13y ago
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

  • How To Make Your Own Injector Using [VB6].By Jhem in WarRock Tutorials
    38Last post 13y ago
  • [Tutorial]How to make Your own InjectorBy RikuoII in WarRock Philippines Hacks
    17Last post 14y ago
  • How to make your own InjectorBy ReachBot in Mission Against Terror Discussions
    4Last post 13y ago
  • How to make your own radiostation?By nasir91 in General
    3Last post 19y ago
  • (TUT)how to make your own warrock menuBy aprill27 in WarRock - International Hacks
    0Last post 19y ago

Tags for this Thread

None