Register for your free account! | Forgot your password?

Go Back   elitepvpers > Shooter > S4 League > S4 League Hacks, Bots, Cheats & Exploits
You last visited: Today at 05:34

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[SRC-Release] Injector with an embeddable DLL

Discussion on [SRC-Release] Injector with an embeddable DLL within the S4 League Hacks, Bots, Cheats & Exploits forum part of the S4 League category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
[SRC-Release] Injector with an embeddable DLL

Here's the injector I made for my Item Manager.
  • Loads a DLL from resource;
  • Writes a .dll with a random filename into System32 folder;
  • Injects using simple LoadLibrary/CreateRemoteThread method;
  • Schedules the .dll for deletion on reboot.

How to use it in your VC++ project:
  • Make sure your project is set to Unicode (Solution properties -> Configuration Properties -> General -> Character Set = Use Unicode Character Set);
  • Make your project require administrator privileges (Solution properties -> Configuration Properties -> Linker -> Manifest File -> UAC Execution Level = requireAdministrator);
  • Create a resource in your project with type of "BINARY" and ID of "IDR_DLL" and set its path to your DLL file.
  • Include 'Injection.h' in your main CPP.

Then use it like this- on a timer message or in a separate thread loop:
Code:
DWORD procId = GetTargetThreadIDFromProcName(L"S4 Client.exe");

if (procId) {
    Inject(procId);
}
Of course, this snippet lacks error handling, and you should have it, but it's up to you.

Feel free to add corrections and ask questions. Happy coding!
Attached Files
File Type: zip NyaInjector_src.zip (1.5 KB, 330 views)
Nyamochka is offline  
Thanks
15 Users
Old 05/19/2010, 10:19   #2
 
elite*gold: 0
Join Date: Mar 2010
Posts: 87
Received Thanks: 4
what about 64 win7 ? is it same for 32 bit os ?
captaingenzo is offline  
Old 05/19/2010, 10:21   #3
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
Quote:
Originally Posted by captaingenzo View Post
what about 64 win7 ?
Reported working under Win7 64-bit.

The problem with some of the users was due to Unicode Windows usernames.

Update: Oh, you mean System32 can be a problem on 64-bit systems? As far as I remember, it's still there for compatibility purposes so it should be OK. It's just a trick to fool X-Trap.
Nyamochka is offline  
Thanks
1 User
Old 05/19/2010, 11:48   #4
 
elite*gold: 0
Join Date: Jul 2009
Posts: 2,241
Received Thanks: 848
Hm, that's nice. I don't use C++, but I got an idea for using with other languages ;D
mipez is offline  
Old 05/19/2010, 11:51   #5
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
Quote:
Originally Posted by mipez View Post
Hm, that's nice. I don't use C++, but I got an idea for using with other languages ;D
It's easy to translate it into VB, Delphi or C# - API calls are the same.
Nyamochka is offline  
Thanks
1 User
Old 05/19/2010, 13:23   #6
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
LOL! Just noticed I haven't attached it. Here you go.

I wonder why no one noticed there should be something
Nyamochka is offline  
Thanks
2 Users
Old 05/19/2010, 14:09   #7
 
cmpqz321's Avatar
 
elite*gold: 0
Join Date: Mar 2010
Posts: 119
Received Thanks: 16
nice
cmpqz321 is offline  
Old 05/19/2010, 14:12   #8
 
elite*gold: 0
Join Date: Aug 2009
Posts: 236
Received Thanks: 28
Gj you get a big Thx.
Alex.
casaAlex is offline  
Old 05/19/2010, 15:25   #9
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
This ****:
Code:
GetEnvironmentVariable(L"WINDIR", tempPath, MAX_PATH);
wcscat_s(tempPath, MAX_PATH, L"\\System32");
Should be replaced with:
Code:
GetSystemDirectory(tempPath, MAX_PATH);
It doesn't make a difference, yet it's a fail anyway
Nyamochka is offline  
Thanks
2 Users
Old 05/19/2010, 15:30   #10


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
hm nice work, even if i dont think that's really necessary in the s4 section
maybe you could make a class and if its good, i will add it to the Gamehacking Foundation Classes (if you agree)
MrSm!th is offline  
Old 05/19/2010, 15:35   #11
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
Quote:
Originally Posted by MrSm!th View Post
hm nice work, even if i dont think that's really necessary in the s4 section
maybe you could make a class and if its good, i will add it to the Gamehacking Foundation Classes (if you agree)
I never heard of GFC, yet i think there should be an injector, or even a handful of them already. And my stealth mechanisms (which are currently failing) don't qualify for a separate class, I guess.
Nyamochka is offline  
Thanks
1 User
Old 05/19/2010, 15:45   #12


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,902
Received Thanks: 25,407
Quote:
Originally Posted by Nyamochka View Post
I never heard of GFC, yet i think there should be an injector, or even a handful of them already. And my stealth mechanisms (which are currently failing) don't qualify for a separate class, I guess.
Yes, because i am working on it

It's a big collection of classes for (advanced) gamehacking, like detouring etc...
maybe you want to help me?
MrSm!th is offline  
Old 05/19/2010, 15:53   #13
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
Quote:
Originally Posted by MrSm!th View Post
Yes, because i am working on it

It's a big collection of classes for (advanced) gamehacking, like detouring etc...
maybe you want to help me?
Well, maybe I want to, but I don't know yet. I'm working on my manager while procrastinating from my job, but I'm not much of a game hacker Let's see how it will go.
Nyamochka is offline  
Thanks
1 User
Old 05/20/2010, 17:32   #14
 
elite*gold: 0
Join Date: Apr 2010
Posts: 398
Received Thanks: 3,564
As you may have noticed, my injector had trouble with some of Vista/Win7 instances. Here's the fix.

Header:
Code:
typedef struct _UNICODE_STRING {
  USHORT Length;
  USHORT MaximumLength;
  PWSTR  Buffer;
} UNICODE_STRING;
typedef UNICODE_STRING *PUNICODE_STRING;

typedef struct _OBJECT_ATTRIBUTES {
  ULONG Length;
  HANDLE RootDirectory;
  PUNICODE_STRING ObjectName;
  ULONG Attributes;
  PVOID SecurityDescriptor;
  PVOID SecurityQualityOfService;
} OBJECT_ATTRIBUTES;
typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;

typedef DWORD (WINAPI *NTCREATETHREADEX)
(
PHANDLE ThreadHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
HANDLE ProcessHandle,
LPTHREAD_START_ROUTINE lpStartAddress,
LPVOID lpParameter,
BOOL CreateSuspended,
DWORD dwStackSize,
DWORD dw1,
DWORD dw2,
LPVOID Unknown
);
Replace this in the code:
Code:
hThread = CreateRemoteThread(hProc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL);
With this:
Code:
HANDLE hThread;
	NTCREATETHREADEX NtCreateThreadEx = (NTCREATETHREADEX)GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtCreateThreadEx");
	if(NtCreateThreadEx) {
		NtCreateThreadEx(&hThread, GENERIC_ALL, NULL, hProc, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, FALSE, NULL, NULL, NULL, NULL);
	} else {
		hThread = CreateRemoteThread(hProc, NULL, NULL, (LPTHREAD_START_ROUTINE)LoadLibAddy, (LPVOID)RemoteString, NULL, NULL);
	}
Nyamochka is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
[Release] dll Injector v.10
01/08/2009 - MapleStory - 4 Replies
*edited* Credits go to SaTaNa
Release XMZ.DLL +Injector
09/05/2008 - GunZ - 5 Replies
XMZ.DLL +Injector Credit to FaaF for updating MLE (MoonLight Engine by IlvMoney A.K.A FaaF) Install MoonlightEngine: Run MoonLight Engine 1196.reg Run Systemca11retriever.exe and just accept all messages Restart your computer



All times are GMT +1. The time now is 05:35.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.