Skip to content
A medium interaction printer honeypot 🍯
Branch: master
Clone or download
Latest commit b5c8aa4 Apr 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fake-files Add real files into fakefs Mar 21, 2019
uploads Add uploads directory Apr 5, 2019
.gitignore Add uploads directory Apr 5, 2019
.travis.yml Switch 3.7 to dev Mar 10, 2019
LICENSE.md Update LICENSE.md Mar 25, 2019
printer.py Fix method Apr 5, 2019
readme.md Update readme.md Apr 19, 2019
requirements.txt Get argparse working messily Mar 27, 2019
server.py Get PS saving correctly Apr 5, 2019
test_printer.py Add test for postscript saving Apr 5, 2019

readme.md

miniprint

Build Status Codacy Badge License

A medium interaction printer honeypot

About

miniprint acts like a standard networked printer that has been accidentally exposed to the public internet.

It speaks the Printer Job Language (PJL) over the raw network "protocol"

Features

  • A fully-featured virtual filesystem in which attackers can read and write files and directories - nothing gets written to the host
  • Any PostScript or plaintext print jobs sent to the printer will be saved to the uploads/ directory
  • Extensive (probably too much) logging
  • Shodan Honeycore: 0

Installation

  1. virtualenv venv && source ./venv/bin/activate (optional)
  2. pip install -r requirements.txt
  3. python3 ./server.py

Usage

usage: miniprint [-b,--bind HOST] [-l,--log-file FILE] [-t,--time-out TIME] [-h]

miniprint - a medium interaction printer honeypot
       by Dan Salmon: @BLTjetpack, github.com/sa7mon 

optional arguments:
  -b, --bind <host>       Bind the server to <host> (default: localhost)
  -l, --log-file <file>   Save all logs to <file> (default: ./miniprint.log)
  -t, --timeout <time>    Wait up to <time> seconds for commands before disconnecting client (default: 120)

  -h, --help  show this help message and exit

To interactively attack miniprint on localhost, you can use PRET with the following command: python ./pret.py localhost pjl

Logs are generated in format: time - loglevel - method - operation - message and are saved to miniprint.log by default.

Requirements

  • Python >= 3.5

Printer Protocol Support

Protocol Port Support
Raw 9100 Yes
Web 80 No
IPP 631 No
LPD 515 No

Printer Control Language Support

Language Support
PJL Yes
PML No

Page Description Language Support

Language Support
PDF Yes
XPS No
PostScript No
Plaintext Yes
PCL No

Known Issues

  • PostScript files printed that don't contain %%EOF at the end will cause the printer to wait indefinitely for the end of the job.

Thanks

You can’t perform that action at this time.