Code Monkey home page Code Monkey logo

dll_injector's Introduction

Dll_injector

simple tool that uses Windows APIs to trick a process to load a dll to its memory.

Windows APIs used :

OpenProcess : get a handle for a process in memory knowing its PID .
VirtualAllocEx : Allocate memory in a process knowing its handle .
WriteProcessMemory : Write to a memory in a process knowing its handle .
LoadLibraryW : load dll into a process (This is the function that our process need to execute ) .
CreateRemoteThread : Create thread in another process knowing its handle .

How it works ?

first it search for the pid of the process given in arguments and it open a handle to the process to write the path of the dll in its memory , then it create a remote thread calling the function loadlibraryW to import the dll .

bypassing ASLR this works because kernel32 would have the same base address in all process and the same offsets for all the functions , so loadlibrary will have the same address in our process (Inject.exe) and in the process we want to inject to .

Usage :

Inject.exe process_name Fullpathofdll.dll

dll_injector's People

Contributors

hadimed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  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.