Skip to content

This package implements a basic PE loader in python to load executable in memory (used to create packer, loader from internet or to impact a process context).

License

Notifications You must be signed in to change notification settings

mauricelambert/PyPeLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPeLoader Logo

PyPeLoader

Description

This package implements a basic PE loader in python to load executable in memory (used to create packer, loader from internet or to impact a process context).

Requirements

This package require:

  • python3
  • python3 Standard Library

Installation

Pip

python3 -m pip install PyPeLoader

Git

git clone "https://github.com/mauricelambert/PyPeLoader.git"
cd "PyPeLoader"
python3 -m pip install .

Wget

wget https://github.com/mauricelambert/PyPeLoader/archive/refs/heads/main.zip
unzip main.zip
cd PyPeLoader-main
python3 -m pip install .

cURL

curl -O https://github.com/mauricelambert/PyPeLoader/archive/refs/heads/main.zip
unzip main.zip
cd PyPeLoader-main
python3 -m pip install .

Usages

Command line

PyPeLoader              # Using CLI package executable
python3 -m PyPeLoader   # Using python module
python3 PyPeLoader.pyz  # Using python executable
PyPeLoader.exe          # Using python Windows executable

PyPeLoader.exe "C:\Windows\System32\net1.exe" "net user"

Python script

from PyPeLoader import load, get_peb, modify_process_informations, modify_executable_path_name, set_command_lines

full_path = r"C:\Windows\System32\net1.exe"
module_name = "net1.exe"
command_line = "net user"

peb = get_peb()

modify_process_informations(peb, full_path, command_line)
modify_executable_path_name(peb, module_name, full_path)
set_command_lines(command_line)

with open(full_path, 'rb') as file:
    load(file) # for 32 bits python version use: C:\Windows\SysWOW64\net1.exe

Links

License

Licensed under the GPL, version 3.

About

This package implements a basic PE loader in python to load executable in memory (used to create packer, loader from internet or to impact a process context).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages