Giter Club home page Giter Club logo

injectcollection's Introduction

InjectCollection

A collection of injection via vc++ in ring3.

1.By the way of creating new thread in the target process to execute the kernel32 export function -- "LoadLibrary" to realize our aim of injection!

    Three functions I find can be used :CreateRemoteThread、NtCreateThreadEx、RtlCreateUserThread

2.By the way of suspending one thread of our target process, and then change thread context of eip or rip to our shellcode, last resume thread. so target process will stop to execute our shellcode, our aim will also be achieved!

    some functions are needed, such as SuspendThread, GetThreadContext, SetThreadContext, ResumeThread

3.By the way of queueing apc in the thread apc queue, for this method request the thread should be alertable, so I queue this apc in all thread of our target process by force, but it seems to be not steady.

    main function been used is QueueUserApc

4.By the way of setting registry value to set global hook, almost all process being created will load our dll!

    in the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Windows directory,
    set the value AppInit_DLLs to be our dll full path, 
    and set the value LoadAppInit_DLLs to be 0x1

These 4 methods above could use the dll named "NormalDll" I write for test.

5.By the way of Hooking the window message, once our target process triggered the hooked message, then it will execute export function in our dll!

    mainly used the SetWindowHookEx which is MS's API

This method should use the dll named "WindowHookDll" I write for test.

6.By the way of writing dll in the memory space of target process, and then create a thread in target thread to execute an export function in the dll we just wrote in target process. This export funcion mainly realize "LoadLibrary" by itself, so it requset the knowledge of PE structure!

injectcollection's People

Contributors

azuregreen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.