Code Monkey home page Code Monkey logo

miniprint's Introduction

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. pip3 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

miniprint's People

Contributors

meltrotter avatar sa7mon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

miniprint's Issues

Does not work in Docker

Hi! I try to run it in docker using dockerfile from "docker" branch, it starts, but does not work. I tested it with PRET, it connects, but nothing happens when I try to execute commands. (If I run it just with python, everything is OK)

No module named pyfakefs

Ubuntu 18.04 LTS, fresh install.

Cloned the repository, ran pip install, then python3 ./server.py

I get the following error:

Traceback (most recent call last):
  File "./server.py", line 26, in <module>
    from printer import Printer
  File "/home/dcs-admin/miniprint/printer.py", line 20, in <module>
    from pyfakefs import fake_filesystem
ModuleNotFoundError: No module named 'pyfakefs'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.