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 › Visual Basic Programming › [Help] Injection Concept [solved]

Exclamation[Help] Injection Concept [solved]

Posts 1–15 of 17 · Page 1 of 2
Withoutwings
Withoutwings
[Help] Injection Concept [solved]
Dear MPGH,

I am wanting to make an injector, yes again, but I won't release it anywhere, but I am wanting to make it so I can fully understand the code, and create the code myself. Can someone help me atleast at getting started?(by the way it's for a game, injecting a .dll into a game).

Thank you in advance.
#1 · 15y ago
Bombsaway707
Bombsaway707
Lol, giving you the code won't help you "understand" it
#2 · 15y ago
cgallagher21
cgallagher21
Code:
1.Public Class Form12. 3.    Private TargetProcessHandle As Integer4.    Private pfnStartAddr As Integer5.    Private pszLibFileRemote As String6.    Private TargetBufferSize As Integer7. 8.    Public Const PROCESS_VM_READ = &H109.    Public Const TH32CS_SNAPPROCESS = &H210.    Public Const MEM_COMMIT = 409611.    Public Const PAGE_READWRITE = 412.    Public Const PROCESS_CREATE_THREAD = (&H2)13.    Public Const PROCESS_VM_OPERATION = (&H8)14.    Public Const PROCESS_VM_WRITE = (&H20)15. 16.    Public Declare Function ReadProcessMemory Lib "kernel32" ( _17.    ByVal hProcess As Integer, _18.    ByVal lpBaseAddress As Integer, _19.    ByVal lpBuffer As String, _20.    ByVal nSize As Integer, _21.    ByRef lpNumberOfBytesWritten As Integer) As Integer22. 23.    Public Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _24.    ByVal lpLibFileName As String) As Integer25. 26.    Public Declare Function VirtualAllocEx Lib "kernel32" ( _27.    ByVal hProcess As Integer, _28.    ByVal lpAddress As Integer, _29.    ByVal dwSize As Integer, _30.    ByVal flAllocationType As Integer, _31.    ByVal flProtect As Integer) As Integer32. 33.    Public Declare Function WriteProcessMemory Lib "kernel32" ( _34.    ByVal hProcess As Integer, _35.    ByVal lpBaseAddress As Integer, _36.    ByVal lpBuffer As String, _37.    ByVal nSize As Integer, _38.    ByRef lpNumberOfBytesWritten As Integer) As Integer39. 40.    Public Declare Function GetProcAddress Lib "kernel32" ( _41.    ByVal hModule As Integer, ByVal lpProcName As String) As Integer42. 43.    Private Declare Function GetModuleHandle Lib "Kernel32" Alias "GetModuleHandleA" ( _44.    ByVal lpModuleName As String) As Integer45. 46.    Public Declare Function CreateRemoteThread Lib "kernel32" ( _47.    ByVal hProcess As Integer, _48.    ByVal lpThreadAttributes As Integer, _49.    ByVal dwStackSize As Integer, _50.    ByVal lpStartAddress As Integer, _51.    ByVal lpParameter As Integer, _52.    ByVal dwCreationFlags As Integer, _53.    ByRef lpThreadId As Integer) As Integer54. 55.    Public Declare Function OpenProcess Lib "kernel32" ( _56.    ByVal dwDesiredAccess As Integer, _57.    ByVal bInheritHandle As Integer, _58.    ByVal dwProcessId As Integer) As Integer59. 60.    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _61.    ByVal lpClassName As String, _62.    ByVal lpWindowName As String) As Integer63. 64.    Private Declare Function CloseHandle Lib "kernel32" Alias "CloseHandleA" ( _65.    ByVal hObject As Integer) As Integer66. 67. 68. 69. 70.    Private Sub Inject()71. 72. 73.        Timer1.Stop()74.        Dim TargetProcess As Process() = Process.GetProcessesByName("processname without .exe")75.        TargetProcessHandle = OpenProcess(PROCESS_CREATE_THREAD Or PROCESS_VM_OPERATION Or PROCESS_VM_WRITE, False, TargetProcess(0).Id)76.        pszLibFileRemote = "path to the .dll"77.        pfnStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")78.        TargetBufferSize = 1 + Len(pszLibFileRemote)79.        Dim Rtn As Integer80.        Dim LoadLibParamAdr As Integer81.        LoadLibParamAdr = VirtualAllocEx(TargetProcessHandle, 0, TargetBufferSize, MEM_COMMIT, PAGE_READWRITE)82.        Rtn = WriteProcessMemory(TargetProcessHandle, LoadLibParamAdr, pszLibFileRemote, TargetBufferSize, 0)83.        CreateRemoteThread(TargetProcessHandle, 0, 0, pfnStartAddr, LoadLibParamAdr, 0, 0)84.        CloseHandle(TargetProcessHandle)85. 86.    End Sub87. 88.    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick89.        If IO.File.Exists("path to the .dll") Then90.            Dim TargetProcess As Process() = Process.GetProcessesByName("processname without .exe")91.            If TargetProcess.Length = 0 Then92. 93.            Else94.                Timer1.Stop()95.                Call Inject()96.            End If97.        Else98.            Timer1.Stop()99.            MsgBox(".Dll not found.")100. 101.        End If102.    End Sub103. 104.    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load105.        Timer1.Interval = 50106.        Timer1.Start()107.    End Sub108.End Class

Um y isnt code tags working?
#3 · edited 15y ago · 15y ago
aLcohoL_95
aLcohoL_95
Quote Originally Posted by Withoutwings View Post
Dear MPGH,

I am wanting to make an injector, yes again, but I won't release it anywhere, but I am wanting to make it so I can fully understand the code, and create the code myself. Can someone help me atleast at getting started?(by the way it's for a game, injecting a .dll into a game).

Thank you in advance.
Quote Originally Posted by Bombsaway707 View Post
Lol, giving you the code won't help you "understand" it

Bombsaway is right
btw
there is lots of injector codes
google it or use search button
#4 · 15y ago
Withoutwings
Withoutwings
I am not wanting any code, I wish someone would explain it to me please.
#5 · 15y ago
Bombsaway707
Bombsaway707
Quote Originally Posted by Withoutwings View Post
I am not wanting any code, I wish someone would explain it to me please.
Then you need to talk to a master coder because their are few people who actually understand fully what the code means
#6 · 15y ago
LY
Lyoto Machida
I think @topblast should know
#7 · 15y ago
Withoutwings
Withoutwings
Quote Originally Posted by -Away View Post
I think @topblast should know
Ok, thanks, both of you, for your advice.
#8 · 15y ago
Jason
Jason
@Void @Hell_Demon both understand the concept. If you ask REAAAAAAAALLY nicely, they may you tell you!
#9 · 15y ago
Void
Void
DLL Injection = Calling LoadLibrary in the target process.

1.Allocate memory to write the string of the path to the DLL you're injecting.
2.Write the string to the allocated memory.
3.Get the address of LoadLibrary
4.Start a remote thread at the location of LoadLibrary.

Functions:
VirtualAlloc Function (Windows)
WriteProcessMemory Function (Windows)
GetProcAddress Function (Windows)
CreateRemoteThread Function (Windows)
GetModuleHandle Function (Windows)
OpenProcess Function (Windows)

Brief explanation, should get you going.
#10 · 15y ago
Withoutwings
Withoutwings
Quote Originally Posted by Void View Post
DLL Injection = Calling LoadLibrary in the target process.

1.Allocate memory to write the string of the path to the DLL you're injecting.
2.Write the string to the allocated memory.
3.Get the address of LoadLibrary
4.Start a remote thread at the location of LoadLibrary.

Functions:
VirtualAlloc Function (Windows)
WriteProcessMemory Function (Windows)
GetProcAddress Function (Windows)
CreateRemoteThread Function (Windows)
GetModuleHandle Function (Windows)
OpenProcess Function (Windows)

Brief explanation, should get you going.
Thank you very much, would've almost kissed you, but then I came to realise you're a dude (x
#11 · 15y ago
Jason
Jason
Kiss him anyway. He enjoys it!
#12 · 15y ago
Withoutwings
Withoutwings
Quote Originally Posted by Jason View Post
Kiss him anyway. He enjoys it!
lawl ;$ (too short >.>)
#13 · 15y ago
Void
Void
Quote Originally Posted by Jason View Post
Kiss him anyway. He enjoys it!
WHY ARE YOU STILL AWAKE?!
#14 · 15y ago
Withoutwings
Withoutwings
Quote Originally Posted by Void View Post
WHY ARE YOU STILL AWAKE?!
Yeah just ignore it. xD
#15 · 15y ago
Posts 1–15 of 17 · Page 1 of 2

Post a Reply

Tags for this Thread

#injector#source#understanding#withoutwings