Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

C 

[TuT] .DLL Injection (Games)

Tutorial wrote by me, I did the comments with the '//'.
NOTE:
  • Inject it to a process, which procces is decided by the injector (http://pastebin.com/TnCxvupB = Injector Source VB.net)

  • This has NO menu/GUI(Look down this post for a base with menu/GUI)




Code
#include <windows.h>
#include <stdio.h>

#define ADR_SPEED 0x123819 // Not existing

/*------- Hacks Here -------*/

void SpeedHack() // When SpeedHack(); Is called
{
if(GetAsyncKeyState(VK_NUMPAD0) &1) // If GetAsyncKeyState NUMPAD 0 is pressed
{
*(float*)(ADR_SPEED) = 200; // float(used to 'float' values) to 200 (Normal value = 95)
}
}


void HackThread() // HackThread makes the hack inject
{
for(;; )
{
SpeedHack(); // This puts the hack on.
}
Sleep(200); // Protect from overload
}

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) // DLLMain uses for threading
{
if(dwReason == DLL_PROCESS_ATTACH) // If its attached
{
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread, 0, 0, 0); // Make thread for the HackThread, so our hacks run when the hack is injected.
}
return TRUE;
}

EDIT:
Ok, im posting this now, its called inline asm, which means, using C++ to write to the asm of the .exe (I COPIED THIS FROM A SITE ILL CODE FOR)
Spoiler (Click to View)

My OLD Full base + menu + more advanced codes + bypass cheat detection(Full Source) =
Download Click

VTable Numbers:
Vtable Numb3rs

I hope you enjoy this thread!
[warn]
FR1908
22 views and a few downloads but no reply's? Feedbacks please people :)
FR1908
Very nice, base is well organized, not sure what to add to the tut so A++
Thanks for this, I do memory editing in games and I was looking for a tutorial for using InlineASM.
(Apr 12, 2010 12:11 PM)Weather Man Wrote:  Thanks for this, I do memory editing in games and I was looking for a tutorial for using InlineASM.

Glad I'd helped :)

(Apr 12, 2010 11:27 AM)i Slap Kidz Wrote:  Very nice, base is well organized, not sure what to add to the tut so A++

Thanks :D
FR1908
How would the Anti-Hack bypass work, would it suspend the threads with an injectable DLL?
(Apr 13, 2010 12:11 PM)Weather Man Wrote:  How would the Anti-Hack bypass work, would it suspend the threads with an injectable DLL?

You would to get the main .dll from the Anti-Cheat program, reverse(unpack) it, and find addresses. Which basically jump over the detection checks/messages and its functions.

(Apr 13, 2010 01:02 PM)dealin29a Wrote:  Most likely this would be detected with any anti-hack wouldn't it? but thanks!

NoMenu hacks would never be detected, although you can't use memory hacks(Which writes to assembly).
FR1908
THNX MAN I REALLY NEED THIS MAN
+k
(Apr 16, 2010 05:40 AM)D.O.A Wrote:  THNX MAN I REALLY NEED THIS MAN
+k

No Problem hope u liked it :D
FR1908
Oops, posted in wrong thread. Please delete this post
(Apr 30, 2010 06:01 AM)thanasis2028 Wrote:  Oops, posted in wrong thread. Please delete this post

Loolled, you can delete your own posts.
FR1908
Would this work in Counter-Strike ?
Wtf this violates rules?
how would you write something that scans for a memory address like cheat engine?
we are making a game in our programing class, and the teacher is going to have a rigged character. hes going to be standing there so i cant use CE to scan for addresses, so how would i do this in code?
If i could +rep you i should do it very nice organized i suck at reading topics like this but this one totally helped me out thank you dude :)


Possibly Related Threads...
Thread / Author Replies Views Last Post
by RowdyCatAug 20, 2025 11:58 PM 5 242 Aug 20, 2025 11:58 PM
Last Post: ▄︻デ══━一一一一━
[C] by SecurifierJan 17, 2020 07:20 AM 12 416 Jan 17, 2020 07:20 AM
Last Post: SIM-3602340
[C] by hadesgod7979Sep 5, 2019 10:47 PM 4 313 Sep 5, 2019 10:47 PM
Last Post: gogreendv