Skip to content

0xballistics/inject2pe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

inject2pe

inject or convert shellcode to PE.

Requires pefile (pip install pefile)

Based on the work at this post

A better shellcode2exe

Usage

python3 inject2pe.py --help

  • Convert shellcode to Portable Executable directly:
python3 inject2pe.py s2e --shellcode <SHELLCODE_BIN_PATH> --output <OUTPUT_EXE_PATH>
  • Inject shellcode into an existing Portable Executable:
python3 inject2pe.py i2e --shellcode <SHELLCODE_BIN_PATH> --exe <INPUT_EXE_PATH> --offset <HEX_ENTRY_POINT_OF_SC> --output <OUTPUT_EXE_PATH>

! This was particularly useful in a few situations in which shellcode uses modules loaded by the caller malware

About

inject or convert shellcode to PE

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages