This package implements a basic PE loader in python to load executables in memory.
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypeloader-1.0.0.tar.gz
(25.8 kB
view details)
File details
Details for the file pypeloader-1.0.0.tar.gz.
File metadata
- Download URL: pypeloader-1.0.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b273b3891b18d6fba8e573afe0f70f35ab742b0f9ed13d37467b3ad02b75be6c
|
|
| MD5 |
72bbe088ffa377b4566dcd858b9f59f9
|
|
| BLAKE2b-256 |
89c8c3287c016e3689249ebb289af5cf0ef3ea7078e8aed996e2414a195ff095
|