Skip to content

Complete printer penetration testing toolkit with 109 commands across PJL, PostScript & PCL. 4 network protocols, automated discovery, file exfiltration, NVRAM access, attack payloads. Modern Python 3.8+ offensive security tool.

License

Notifications You must be signed in to change notification settings

mrhenrike/PrinterReaper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

188 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

PrinterReaper v2.5.3 - Complete Printer Penetration Testing Toolkit

Is your printer safe from the void? Find out before someone else does…

PrinterReaper v2.5.3 is the most complete printer penetration testing toolkit available, with support for all three major printer languages (PJL, PostScript, PCL) and four network protocols (RAW, LPD, IPP, SMB). Test, exploit, and secure network printers with 109 commands across 7 categories.

TL;DR: PrinterReaper is your complete toolkit for discovering and exploiting printer vulnerabilities. Connect. Scan. Exploit. Exfiltrate. Repeat.

πŸ“ Official Website: www.uniaogeek.com.br/printer-reaper


🎯 What's New in v2.5.3

  • 🎨 Complete PRET Assets - 8 PS fonts, 3 MIBs, 4 overlays, 5 testpages
  • πŸ“‹ New Commands - assets (list bundled files), overlay_list (preview overlays)
  • 🧹 Clean Repository - Removed 116+ archived files from public tracking
  • πŸ› οΈ Release Tools - release_notes.py to generate changelogs from commits
  • πŸš€ Startup UX - No args β†’ extended help with quick-start and discovery
  • πŸ” Discovery Flags - --discover-local and --discover-online
  • πŸ“š Help Standardized - PS/PCL help with categories (PJL-style)
  • πŸ§ͺ Test Fixtures - Real PS/PCL test pages for QA validation

⚑ Quick Start

Installation

# Clone repository
git clone https://github.com/mrhenrike/PrinterReaper.git
cd PrinterReaper

# Install dependencies
pip3 install -r requirements.txt

# Verify installation
python3 printer-reaper.py --version

Discover Printers

# Automatic network discovery (extended help + options)
python3 printer-reaper.py

# Local SNMP discovery
python3 printer-reaper.py --discover-local

# Online discovery (Shodan/Censys)
python3 printer-reaper.py --discover-online

# Output:
Discovered printers:
192.168.1.100    HP LaserJet 4250       uptime=10:21:49    Ready
192.168.1.105    Brother MFC-7860DW    uptime=16:31:17    Sleep

Connect and Exploit

# Auto-detect best language
python3 printer-reaper.py 192.168.1.100 auto

# Or specify language manually
python3 printer-reaper.py 192.168.1.100 pjl   # PJL mode
python3 printer-reaper.py 192.168.1.100 ps    # PostScript mode
python3 printer-reaper.py 192.168.1.100 pcl   # PCL mode

πŸ“‹ Features

Printer Languages (3)

PJL (Printer Job Language) - 54 commands

  • Complete filesystem access
  • NVRAM manipulation
  • Job control and capture
  • Configuration backup/restore
  • Lock/unlock capabilities

PostScript - 40 commands

  • Dictionary enumeration
  • Operator testing (400+ operators)
  • Print job manipulation
  • Overlay and watermarking
  • File system operations

PCL (Printer Command Language) - 15 commands

  • Virtual filesystem via macros
  • Legacy printer support
  • Basic control operations

Total: 109 commands across all languages!


Network Protocols (4)

Protocol Port Description
RAW 9100 Default (AppSocket/JetDirect)
LPD 515 Line Printer Daemon (legacy)
IPP 631 Internet Printing Protocol (modern)
SMB 445/139 Windows network printing

Attack Payloads (5)

  • banner.ps - Print custom banner messages
  • loop.ps - Infinite loop DoS attack
  • erase.ps - Erase printed pages
  • storm.ps - Print storm (resource exhaustion)
  • exfil.ps - Data exfiltration via printing

πŸ“š Command Categories

πŸ“ Filesystem (19 commands)

ls, mkdir, find, upload, download, delete, copy, move, touch
chmod, permissions, rmdir, mirror, get, put, cat, edit, append, fuzz

ℹ️ Information (18 commands)

id, version, devices, uptime, date, pagecount, variables, printenv
network, info, scan_volumes, firmware_info, dicts, dump, known, search

βš™οΈ Control (16 commands)

set, display, offline, restart, reset, selftest, backup, restore
config, formfeed, copies, open, close, timeout, reconnect

πŸ”’ Security (9 commands)

lock, unlock, disable, nvram, enumerate_operators, test_file_access
permissions, chmod

πŸ’₯ Attacks (16 commands)

destroy, flood, hold, format, capture, overlay, cross, replace
hang, payload, traverse, dos_display, dos_jobs, dos_connections
exfiltrate, backdoor

🌐 Network (3 commands)

direct, execute, load

πŸ“Š Monitoring (3 commands)

pagecount, status, discover

πŸ’» Usage Examples

Example 1: Network Discovery

$ python3 printer-reaper.py

Detected OS: Linux
Found 2 network(s) to scan...
Discovered printers:
192.168.1.100    HP LaserJet 4250
192.168.1.105    Brother MFC-7860DW

Example 2: File Exfiltration (PJL)

$ python3 printer-reaper.py 192.168.1.100 pjl

192.168.1.100:/> ls /etc
-  834  passwd
-  156  hosts

192.168.1.100:/> download /etc/passwd
Downloaded passwd to ./passwd

192.168.1.100:/> cat /etc/passwd
root:x:0:0:root:/root:/bin/sh

Example 3: Print Job Manipulation (PostScript)

$ python3 printer-reaper.py 192.168.1.100 ps

192.168.1.100:ps> cross "CONFIDENTIAL - DO NOT DISTRIBUTE"
Text will be added to all printed pages

192.168.1.100:ps> replace "Public" "Top Secret"
Will replace 'Public' with 'Top Secret' in all documents

Example 4: Payload Execution (PostScript)

192.168.1.100:ps> payload banner PRINTER COMPROMISED
Payload 'banner' executed

192.168.1.100:ps> payload storm 100
Payload 'storm' executed - 100 pages will print

Example 5: Virtual Filesystem (PCL)

$ python3 printer-reaper.py 192.168.1.100 pcl

192.168.1.100:pcl> put document.txt
Uploaded document.txt as macro 1000

192.168.1.100:pcl> ls
Macro  1000      1024 bytes  document.txt

192.168.1.100:pcl> get 1000
Downloaded macro 1000 to document.txt

🎯 Key Capabilities

Information Gathering

βœ… Identify printer model and firmware
βœ… Extract network configuration
βœ… Dump NVRAM contents
βœ… List environment variables
βœ… Enumerate PostScript operators

File System Access

βœ… Browse printer's file system
βœ… Download configuration files
βœ… Upload arbitrary files
βœ… Mirror entire filesystem
βœ… Path traversal testing

Configuration Control

βœ… Change printer settings
βœ… Backup and restore configuration
βœ… Set display messages
βœ… Control print parameters
βœ… Modify page device settings

Security Testing

βœ… Test authentication bypass
βœ… Verify filesystem restrictions
βœ… Check NVRAM security
βœ… Test buffer overflows
βœ… Path traversal attacks

Exploitation

βœ… Capture print jobs
βœ… Inject malicious overlays
βœ… Replace text in documents
βœ… Cause denial of service
βœ… Execute attack payloads
βœ… Physical NVRAM damage (with warning)


πŸ“¦ Installation

Requirements

  • Python 3.8 or higher
  • Operating System: Linux, Windows, WSL, macOS, or BSD

Install

# Clone repository
git clone https://github.com/mrhenrike/PrinterReaper.git
cd PrinterReaper

# Install Python dependencies
pip3 install -r requirements.txt

# Install SNMP tools (optional, for discovery)
# Ubuntu/Debian
sudo apt install snmp

# macOS
brew install net-snmp

# Test installation
python3 printer-reaper.py --version

Dependencies

colorama>=0.4.6         # Terminal colors
requests>=2.31.0        # HTTP requests
urllib3>=2.0.0          # HTTP client
pysnmp>=4.4.12          # SNMP discovery (optional)

πŸ”§ Usage

Command Line

usage: printer-reaper.py [-h] [-s] [-q] [-d] [-i file] [-o file]
                         [--osint] [--auto-detect] [--version]
                         target {pjl,ps,pcl,auto}

positional arguments:
  target                Printer IP address or hostname
  {pjl,ps,pcl,auto}     Printer language (PJL, PostScript, PCL, or auto)

optional arguments:
  -h, --help            show this help message and exit
  -s, --safe            Verify language support before connecting
  -q, --quiet           Suppress warnings and banner
  -d, --debug           Enter debug mode (show raw traffic)
  -i, --load file       Load and run commands from file
  -o, --log file        Log raw data sent to the target
  --osint               Check target exposure (passive OSINT)
  --auto-detect         Automatically detect supported languages
  --version             Show program version and exit

Examples

# Network discovery
python3 printer-reaper.py

# Connect with PJL
python3 printer-reaper.py 192.168.1.100 pjl

# Connect with PostScript
python3 printer-reaper.py 192.168.1.100 ps

# Connect with PCL
python3 printer-reaper.py 192.168.1.100 pcl

# Auto-detect language
python3 printer-reaper.py 192.168.1.100 auto

# Safe mode (verify support first)
python3 printer-reaper.py --safe 192.168.1.100 pjl

# Load commands from file
python3 printer-reaper.py -i commands.txt 192.168.1.100 pjl

# Debug mode
python3 printer-reaper.py --debug 192.168.1.100 ps

🎨 Module Comparison

Feature PJL PostScript PCL
Filesystem βœ… Full βœ… Full ⚠️ Virtual
Commands 54 40 15
File Upload βœ… βœ… βœ…
File Download βœ… βœ… βœ…
Path Traversal βœ… βœ… ❌
NVRAM Access βœ… ❌ ❌
Job Capture βœ… βœ… ❌
Overlays ❌ βœ… ❌
Text Replace ❌ βœ… ❌
Lock/Unlock βœ… βœ… ❌
Best For Modern HP/Brother Advanced attacks Legacy devices

Recommendation: Use auto mode to let PrinterReaper choose!


πŸ” Security Features

Testing Capabilities

  • Authentication Testing - Bypass, brute force, default credentials
  • Filesystem Security - Access control, path traversal, permissions
  • Buffer Overflow Testing - Flood attacks, input validation
  • Information Disclosure - Configuration, credentials, NVRAM
  • Print Job Security - Capture, manipulation, interception
  • Denial of Service - Resource exhaustion, crashes, hangs

Attack Vectors

Reference Hacking Printers Wiki for comprehensive attack taxonomy:

  • Denial of Service (transmission, processing, physical)
  • Privilege Escalation (factory defaults, accounting bypass)
  • Print Job Access (retention, manipulation)
  • Information Disclosure (memory, filesystem, credentials)
  • Code Execution (buffer overflows, firmware)

πŸ“š Documentation

In-Shell Help

Every command has detailed help:

> help              # List all commands
> help upload       # Detailed help for specific command

GitHub Wiki

Complete documentation at: PrinterReaper Wiki


πŸ—οΈ Architecture

Overview


πŸŽ“ Typical Workflow

1. Discovery

./printer-reaper.py

2. Connect

./printer-reaper.py 192.168.1.100 auto

3. Reconnaissance

> id               # Identify printer
> ls               # Browse filesystem
> network          # Get network info
> variables        # List variables

4. Exploitation

> download /etc/passwd         # Exfiltrate files
> upload backdoor.ps           # Upload malicious files
> lock 12345                   # Lock control panel
> capture                      # Capture print jobs

5. Advanced (PostScript)

> enumerate_operators          # Test 400+ operators
> overlay logo.eps             # Add watermark
> cross "CONFIDENTIAL"         # Add text overlay
> replace "Public" "Secret"    # Replace content

⚠️ Legal Notice

IMPORTANT: PrinterReaper is intended solely for authorized security testing.

  • βœ… Run only against devices you own or have written permission to test
  • ❌ Unauthorized use may violate laws and regulations
  • βš–οΈ The authors disclaim all liability for misuse or damage

By using PrinterReaper, you accept full responsibility for your actions.


🌟 Why PrinterReaper?

vs PRET (Original)

Aspect PRET PrinterReaper v2.4.0
Languages 3 3 βœ…
Protocols 1 4 βœ…
PJL Commands ~40 54 (+35%) βœ…
PS Commands ~30 40 (+33%) βœ…
Documentation Basic Wiki 14 pages βœ…
Help System 50% 100% βœ…
Python 2.7 3.10+ βœ…
Maintenance ❌ Discontinued βœ… Active
OS Support Linux only 5 platforms βœ…

Winner: PrinterReaper in 7 of 9 categories!


πŸ“– Documentation

Quick Links

In-Shell Help

> help                    # List all commands
> help <command>          # Detailed help
> help filesystem         # Category help

πŸ”¬ Testing & QA

PrinterReaper v2.5.3 has been comprehensively tested:

  • βœ… 37 automated tests - 100% pass rate
  • βœ… All modules tested - Zero import errors
  • βœ… All protocols validated - Instantiation successful
  • βœ… All payloads verified - Template substitution working
  • βœ… operators.py validated - 371 operators loaded
  • βœ… PRET assets integrated - Fonts, overlays, MIBs, testpages

Recent Updates

v2.5.3 (Oct 2025) - Complete assets, branding, enhanced docs, production-ready
v2.5.1 (Oct 2025) - PRET assets, overlay_list, release tools, repo cleanup
v2.5.0 (Oct 2025) - Startup UX, discovery flags, fixtures, overlays
v2.4.2 (Oct 2025) - HTML Wiki for website deployment
v2.4.1 (Oct 2025) - QA tested, 100% pass rate, documentation updates
v2.4.0 (Oct 2025) - Complete toolkit: 3 languages, 4 protocols, 5 payloads


πŸ› οΈ Development

Project Structure

PrinterReaper/
β”œβ”€β”€ printer-reaper.py         # Main executable
β”œβ”€β”€ requirements.txt          # Dependencies
β”œβ”€β”€ README.md                 # This file
β”‚
β”œβ”€β”€ src/                      # Source code
β”‚   β”œβ”€β”€ main.py               # Entry point
β”‚   β”œβ”€β”€ version.py            # Version info (2.5.0)
β”‚   β”‚
β”‚   β”œβ”€β”€ core/                 # Core modules
β”‚   β”‚   β”œβ”€β”€ printer.py        # Base class
β”‚   β”‚   β”œβ”€β”€ capabilities.py   # Detection
β”‚   β”‚   β”œβ”€β”€ discovery.py      # SNMP scanning
β”‚   β”‚   └── osdetect.py       # OS detection
β”‚   β”‚
β”‚   β”œβ”€β”€ modules/              # Language modules
β”‚   β”‚   β”œβ”€β”€ pjl.py            # PJL (54 commands)
β”‚   β”‚   β”œβ”€β”€ ps.py             # PostScript (40 commands)
β”‚   β”‚   └── pcl.py            # PCL (15 commands)
β”‚   β”‚
β”‚   β”œβ”€β”€ protocols/            # Network protocols
β”‚   β”‚   β”œβ”€β”€ raw.py            # RAW (Port 9100)
β”‚   β”‚   β”œβ”€β”€ lpd.py            # LPD (Port 515)
β”‚   β”‚   β”œβ”€β”€ ipp.py            # IPP (Port 631)
β”‚   β”‚   └── smb.py            # SMB (Ports 445/139)
β”‚   β”‚
β”‚   β”œβ”€β”€ payloads/             # Attack payloads
β”‚   β”‚   β”œβ”€β”€ banner.ps         # Banner payload
β”‚   β”‚   β”œβ”€β”€ loop.ps           # DoS loop
β”‚   β”‚   β”œβ”€β”€ erase.ps          # Page erase
β”‚   β”‚   β”œβ”€β”€ storm.ps          # Print storm
β”‚   β”‚   └── exfil.ps          # Exfiltration
β”‚   β”‚
β”‚   └── utils/                # Utilities
β”‚       β”œβ”€β”€ helper.py         # Core utilities
β”‚       β”œβ”€β”€ codebook.py       # Error codes
β”‚       β”œβ”€β”€ fuzzer.py         # Fuzzing vectors
β”‚       └── operators.py      # PS operators (400+)
β”‚
β”œβ”€β”€ wiki/                     # GitHub Wiki
└── tests/                    # Test suite

🀝 Contributing

Contributions welcome! Please read Contributing Guide.


πŸ“œ License

PrinterReaper is released under the MIT License.


πŸ“ž Support


πŸ™ Credits

Based On

  • PRET - Original printer exploitation tool by Ruhr-UniversitΓ€t Bochum
  • Hacking Printers Wiki - Comprehensive printer security knowledge base

Enhanced With

  • Modern Python 3.10+ features
  • Complete PostScript and PCL modules
  • Multi-protocol support
  • Professional documentation
  • Attack payload system
  • Enterprise-grade error handling

🌐 References


⭐ Star History

If you find PrinterReaper useful, please star the repository!


PrinterReaper v2.5.3
Complete Printer Penetration Testing Toolkit

109 Commands | 3 Languages | 4 Protocols | 5 Payloads

Made with ❀️ for the security community

Documentation | Issues | Releases


Powered by UniΓ£o Geek

UniΓ£o Geek

www.uniaogeek.com.br | Blog

About

Complete printer penetration testing toolkit with 109 commands across PJL, PostScript & PCL. 4 network protocols, automated discovery, file exfiltration, NVRAM access, attack payloads. Modern Python 3.8+ offensive security tool.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 15

Languages