Download C# Injection Library (JLibrary - Fixed)

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

KiNG Jaydo

Newbie
Full Member
Jan 21, 2015
29
158
1
So I originally found this by a guy named Jason. He posted the source code a while back but the code had many issues (eg. can't compile in .NET 3.5+, non x64 support, etc)
It is an amazing Library, all credit to him (I just fixed the bugs).

Allows for:
  • direct byte injections
  • manual map injections
  • thread hijack injections
  • standard injections
  • file injections
  • alot more :D

If you have any issues, feel free to let me know and I'll look into them :)

example usage can be found within the project (EXAMPLEUSAGE.cs)
all this can be compiled and used in VB or C# as a reference library ofc

Looking for a simple C# injector tutorial?

Virus Scan
 

Attachments

Last edited by a moderator:

skrillux0

Newbie
Full Member
May 28, 2015
5
272
0
Thanks for this King

How do you get a .dll file into a byte array for the second argument passed to the injector? How do I convert my dll into bytes that I can pass through?

public void inject(int pID, Byte[] dllbytes)
 

Solaire

Respected Hacker
Dank Tier VIP
Dec 15, 2013
1,051
16,353
62
Thanks for this King

How do you get a .dll file into a byte array for the second argument passed to the injector? How do I convert my dll into bytes that I can pass through?

public void inject(int pID, Byte[] dllbytes)
byte[] bytes = System.IO.File.ReadAllBytes(filename);
 

skrillux0

Newbie
Full Member
May 28, 2015
5
272
0
byte[] bytes = System.IO.File.ReadAllBytes(filename);
I've includied the class library but I'm getting this on the example

The type name 'PortableExecutable' does not exist in the type 'PortableExecutable'
 
Last edited:

skrillux0

Newbie
Full Member
May 28, 2015
5
272
0
Hmm managed to solve that but now when try embed the dll with 'Interop Types' I get

Cannot embed interop types from assembly 'JLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it is missing either the 'System.Runtime.InteropServices.ImportedFromTypeLibAttribute' attribute or the 'System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute' attribute.

Interop type 'InjectionMethod' cannot be embedded. Use the applicable interface instead.
 

skrillux0

Newbie
Full Member
May 28, 2015
5
272
0
OK me again sorry for the spam... I'm getting this now.. does the injector have any dependencies that I need to install?

System.Exception: Failed to load module into remote process. Error code: 0 at InjectionLibrary.CRTInjection.inject(String dllPath, IntPtr hProcess)
 

KiNG Jaydo

Newbie
Full Member
Jan 21, 2015
29
158
1
How are you calling the method? It's hard to tell when I don't know how you're doing it. First off, your program needs administration privileges to inject using this library. Also, how are you getting the process handle?
PM me if you need.

EDIT: Sorry for being absent. Just started Uni but I'll be here from now on haha
 

traderain

Newbie
Dank Tier Donator
Full Member
Feb 19, 2016
40
583
1
Thank you, I have been looking for something like this. *:D
 

reidjako

Newbie
Mar 3, 2016
2
32
0
Thank you so much for this! (I am using an older version of VS would you be able to upload the binary to please? Thank you :)
 

reidjako

Newbie
Mar 3, 2016
2
32
0
Invalid process handle.
Parameter name: hProcess
I am getting this error when trying to inject a .dll into csgo via manual mapping, it works with other applications.
 

Loset

Newbie
Full Member
Jan 13, 2016
34
323
1
"File is of the PE32+ format. Currently support only extends to PE32 images. Either recompile the binary as x86, or choose a different target."

you sure it has 64bit support?


if dll is 64bit I get exception

if loader is 32 bit and process 64bit and dll also 64 bit nothing happens
if loader is 64bit and process 64 bit and dll also 64bit I get crash.. (trying to inject to notepad.exe)


it crashes program when it try to load dependencies
 
Last edited:

KiNG Jaydo

Newbie
Full Member
Jan 21, 2015
29
158
1
I am getting this error when trying to inject a .dll into csgo via manual mapping, it works with other applications.
How are you getting the process handle?

"File is of the PE32+ format. Currently support only extends to PE32 images. Either recompile the binary as x86, or choose a different target."

you sure it has 64bit support?


if dll is 64bit I get exception

if loader is 32 bit and process 64bit and dll also 64 bit nothing happens
if loader is 64bit and process 64 bit and dll also 64bit I get crash.. (trying to inject to notepad.exe)


it crashes program when it try to load dependencies
Hmm. Let me try recreate the error and I'll get back to you!
 

Tormiasz

Newbie
Mar 9, 2016
1
34
0
Hello. My Application hung's while injecting DLL using Manual Map. I've done some lurking, SearchExports from Win32API.cs caused it.

I've changed num5 = index - 1; to num5 = index + 1; and num6 = index + 1; to num6 = index - 1;
Everything seems to work fine now.
 

mrc0dex

Newbie
Jan 7, 2017
1
12
0
Hello. My Application hung's while injecting DLL using Manual Map. I've done some lurking, SearchExports from Win32API.cs caused it.

I've changed num5 = index - 1; to num5 = index + 1; and num6 = index + 1; to num6 = index - 1;
Everything seems to work fine now.
I am getting the same issue. What do you mean by index - 1 and index + 1.

int num5 = (int) ((image_base_relocation.SizeOfBlock - num4) / 2);
uint num6 = image.GetPtrFromRVA(image_base_relocation.VirtualAddress);
 

steb

Jr.Coder
Full Member
Nobleman
Aug 16, 2016
63
383
1
So I'm using the original binaries of this project (the original one).
I'm getting this weird issue. Whenever I Inject a dll that is compiled with debug it works. but when i compiled a dll with release it doesnt work weird??
 

gnuzim

Jr.Coder
Trump Tier Donator
Dank Tier Donator
Nobleman
Nov 28, 2012
67
1,418
0
So I'm using the original binaries of this project (the original one).
I'm getting this weird issue. Whenever I Inject a dll that is compiled with debug it works. but when i compiled a dll with release it doesnt work weird??
lol, i'm having the same issue!
I'm about to run some tests, will let u know as soon as i figure it out what is wrong!

Edit:
Forgot to tell, the problem is not related to this library, i just can't convert my dll to byte when using release mode!
 
Last edited:

steb

Jr.Coder
Full Member
Nobleman
Aug 16, 2016
63
383
1
lol, i'm having the same issue!
I'm about to run some tests, will let u know as soon as i figure it out what is wrong!

Edit:
Forgot to tell, the problem is not related to this library, i just can't convert my dll to byte when using release mode!
Weird xd. Aight thanks.
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods