Giter Club home page Giter Club logo

pe-infector's Introduction

PE-infector

Crossplatform tool for injecting shellcode into .exe or .dll binaries (x86 and 64).

Build:

Linux:
	Run make in directory

Windows:
	Run compile.bat

Usage:

  1. Prepare the shellcode (for example build raw shellcode with metasploit framework to file; recommend with option EXITFUNC=none if it possible for resume execution of original program)

  2. Run PE-infector -i <path_for_source_exe_or_dll> -o <patched_exe_or_dll> -s <path_for_shellcode> Support x86 and x64 .exe/.dll binaries. Also support injection methods:

     1. Code injection (default method; success if enough empty space)
     2. Create new section (turn on with option -m sect; by default section name has value ".code"; use additional option -n for set custom section name)
     3. Resize current code section (turn on with option -m resz)
    

    Also support output for current sections (option -d)

    Also support run shellcode in another thread (option -t or --thread. For 32bit and 64bit)

Example:

Instruction for Kali Linux (it doesn't matter which distributive use; it is just convinient to use Kali linux cause it has preinstalled metasploit framework for generating shellcodes).

  1. Generate the shellcode with effect show the window with caption:

     msfvenom -p windows/messagebox TEXT="Big brother watches you." -f raw > shellcode.raw
    
  2. Inject generated raw file into exe (choosen method resz cause it works in the most cases):

     PE-infector -i original.exe -o injected.exe -s shellcode.raw -m resz
    
  3. In success injected.exe will be generated

  4. Profit!

pe-infector's People

Contributors

mastmind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pe-infector's Issues

I get an error

PE-infector -i gta_sa.exe -o injected.exe -s shellcode.raw -m resz
That binary has 32bit arch
That is EXE file
EntryPoint: 0x00424570
ImageBase: 0x00400000
File alignment: 0x00000200
size of shellcode: 1083492
Infection error -3

multithreading x64

Hi,
Thank you for you work ! Can i ask you to explain me the difficulty to implement the multithreading feature for x64 PE ?
Thanks in advance !

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.