peinjector – MITM PE file infector

The executable file format on the Windows platform is PE COFF. The peinjector provides different ways to infect these files with custom payloads without changing the original functionality. It creates patches, which are then applied seamlessly during file transfer. It is very performant, lightweight, modular and can be operated on embedded hardware.


  • Full x86 and x64 PE file support.
  • Open Source
  • Fully working on Windows and Linux, including automated installation scripts.
  • Can be operated on embedded hardware, tested on a Rasperberry Pi 2.
  • On Linux, all servers will be automatically integrated as service, no manual configuration required.
  • Plain C, no external libraries required (peinjector).
  • MITM integration is available in C, Python and Java. A sample Python MITM implementation is included.
  • Foolproof, mobile-ready web interface. Anyone who can configure a home router can configure the injector server.
  • Easy to use integrated shellcode factory, including reverse
    shells, meterpreter, … or own shellcode. Everything is available in 32
    and 64 bit with optional automated encryption. Custom shellcode can be
    injected directly or as a new thread.
  • An awesome about page and much more, check it out.



                                  + configuration                  
                                  | payload                        
                                  | ...                            
      +-------+       |                        |                   
      | PATCH <-------+      libpeinfect       <--+                
      +-------+       |                        |  |                
                      +-----------+------------+  |                
                                  |               |                
                      +-----------v------------+  |                
                      |                        |  |                
      +--------------->       libpetool        |  |                
      | change values |                        |  |                
      | add sections  +-----------^------------+  |                
      | resize sect.              |               |                
      + ...                  +----v----+          |                
                             | PEFILE  +----------+                
      PE File data    |                        |    PE File data   
      +--------------->       libpefile        +--------------->   
                      |                        |                   
Ehacking Staff
With more than 50 global partners, we are proud to count the world’s leading cybersecurity training provider. EH Academy is the brainchild of Ehacking, which has been involved in the field of training since the past Five years and continues to help in creating professional IT experts.

Most Popular

How To Create A Virtual Penetration Testing Lab At Home

In this article, I will demonstrate how to create your own virtual penetration testing lab at home. Creating a pentesting lab is must for...

The Importance of Cyber Security in The Medical Device Industry

Medical devices are a revolutionary aspect of healthcare - they connect doctors and patients, help diagnose and treat diseases. Some - like ECMO machines...

Top 5 Techniques Hackers Use to hack Social Media Accounts

These days, Social Media have become a significant need in our everyday life. It encourages us to associate and connect with anyone over the...

5 Top Programming Languages for Hacking

We live in the 21st century, which is very fast-changing. This is a century of competition for information and computing resources. Every year the...