ลืมรหัสผ่าน
 ลงทะเบียน
ค้นหา
ดู: 4964|ตอบกลับ: 16

[Source Code] C# injector dll from Resources

[คัดลอกลิงก์]
โพสต์ 2015-11-17 00:43:09 | ดูโพสต์ทั้งหมด |โหมดอ่าน | Google Chrome 46.0.2490.86| Windows 7
แก้ไขครั้งสุดท้ายโดย profps เมื่อ 2015-11-17 00:42

Been working on this for a while now. It's a .NET library with various injection methods which make it very straightforward to make your own injectors/loaders. It even includes a public Manual Map injection method.

Although the source is in C#, the compiled library is usable in both VB.NET and C#, depending on your language preferences. I have included both the raw binary as well as the project folder in the attachments to this post.

The source is fairly documented, but I get lazy so there may be sections that you'll need to work out for yourself when looking into the source. The project targets .NET 2.0, so there should be no compatibility issues with projects you want to make.

To use the library, simply create a new .NET project and add the library as a project reference. (Project >> Add Reference >> Browse >> Locate DLL)

I've implemented this library using a factory pattern, so using the various different injection methods are very straightforward. All the various types of injection inherit from the base "InjectionMethod" class, which implements two different methods for injecting.

Code:
Inject(...)           // inject a single moduleor
InjectAll(...)        // inject a range of modules


Both of these methods have various overloads but the key point is that each method can either inject from a PortableExecutable object, or from a file location. A PortableExecutable object can be created in-memory, or from a file location. This means that when using ManualMap injection, it's possible to inject a DLL without it ever touching the harddisk during the injection process. Standard/ThreadHijack methods both call LoadLibrary, so even if you pass a PortableExecutable object to these injection methods, the module will be written to disk in a random location.

The two main namespaces you'll likely refer to are going to be
Code:
using InjectionLibrary;
using JLibrary.PortableExecutable;


Example 1: Using the creation factory to make an injection method

Code:
InjectionMethod injector = InjectionMethod.Create(InjectionMethodType.ManualMap);


Example 2: Super-stealthy injection from resources.

Code:
var injector = InjectionMethod.Create(InjectionMethodType.ManualMap);
var processId = Process.GetProcessesByName("engine")[0].Id;
var hModule = IntPtr.Zero;
using (var img = new PortableExecutable(Properties.Resources.TestDll))
    hModule = injector.Inject(img, processId);
if (hModule != IntPtr.Zero)
{   
    // injection was successful
}
else
{
    // injection failed
    if (injector.GetLastError() != null)
        MessageBox.Show(injector.GetLastError().Message);
}

ดาวน์โหลด  dll library

ผู้เข้าชม หากคุณต้องการดูเนื้อหาที่ถูกซ่อน จะต้องตอบกลับโพสต์นี้ก่อน


โพสต์ 2015-11-22 13:03:16 | ดูโพสต์ทั้งหมด | Google Chrome 46.0.2490.86| Windows 7
ขอไปทดสอบนะ
โพสต์ 2015-12-28 13:51:22 | ดูโพสต์ทั้งหมด
thk na kup thk na kup thk na kup
โพสต์ 2016-5-3 04:06:23 | ดูโพสต์ทั้งหมด
ส่อง ขอบคุณครับผมม
โพสต์ 2016-7-11 07:42:41 | ดูโพสต์ทั้งหมด
ขอบคุณครับ
โพสต์ 2016-11-29 18:17:41 | ดูโพสต์ทั้งหมด
ขอทดสอบหน่อยครับ
โพสต์ 2016-12-3 19:09:27 | ดูโพสต์ทั้งหมด
แจ่มมาากกกก
โพสต์ 2017-1-2 15:34:26 | ดูโพสต์ทั้งหมด | Google Chrome 55.0.2883.87| Windows 7

ขอบคุณครับ
โพสต์ 2017-3-12 13:51:46 | ดูโพสต์ทั้งหมด | Google Chrome 57.0.2987.98| Windows
ขอบคุณครับ
โพสต์ 2018-3-11 14:23:26 | ดูโพสต์ทั้งหมด | Firefox 58.0| Windows
ขอบคุณครับเจ้านายยยย
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง เข้าสู่ระบบ | ลงทะเบียน

รายละเอียดเครดิต

ประวัติการแบน|Library IT ศูนย์รวมความรู้ทุกเรื่อง เพื่อป้องการอาชยากรรมทางไซเบอร์ไกล้ตัว

GMT+7, 2024-4-19 23:04 , Processed in 0.054954 second(s), 16 queries .

Powered by Discuz! X3.5, Rev.8

© 2001-2024 Discuz! Team.

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้