Skip to content

MastMind/PE-infector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 is possible for resume execution of the 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 in the code section)
     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 the current code section (turn on with option -m resz)
    

    Also support output for current sections (option -d)

    Also support run shellcode within a separate thread (option -t or --thread. For 32bit and 64bit)

Example:

This is instruction for Kali Linux (it doesn't matter which distributive is using here; it is just convinient to use Kali Linux because it has the preinstalled metasploit framework for generating shellcodes).

  1. Generate the shellcode with the effect of showing 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 because 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!

About

Crossplatform tool for inject shellcode into .exe and .dll binaries (x86 and x64)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages