Cатсн²² (in)sесuяitу / ChrisJohnRiley

Because we're damned if we do, and we're damned if we don't!

PRN-2-ME

Update: Since this Python script was released I’ve rewritten the logic as a Metasploit module which can be found in the Metasploit trunk (information on the module can be found HERE)


PRN-2-me is a simple listener that can be configured to run on any port (default is 9100 for jetdirect style connections). The tool will then save all incoming PCL and PostScript print jobs to file and forward them on to the real printer.

Now that you’ve got the print jobs saved to disk, it’s a simple task of sifting through them and seeing what nuggets of gold you’ve captured.

Postscript (PS): The simple format… you can open .ps files in most operating systems without any specialist software needed. Click and run… These files are also a LOT better quality than the PCL alternatives. If you don’t believe me just check out the samples.

Sample PS file –> HERE

PCL: Not so simple… PCL isn’t well supported when it comes to viewers. However all is not lost. There are 2 options here.

OpenPCL Viewer – Java based viewer (project can be found here)

GhostPCL  – By grabbing the source for GhostPDL you can compile PCL and/or XPS support to easily convert to other formats (project can be found here)

Example command line (example output):

pcl6 -sDEVICE=pdfwrite -sOutputFile=job_001_PCL.pdf job_001_PCL.pcl

Sample PCL file –> HERE

So, what’s next!

The script is available for download HERE..

The tool is licensed under a mixture of BEERware (where you buy me beers if you like the tool) and FEEDBACKware (where you tell me how crap it is so I can make it better). Enjoy!

Advertisements

9 responses to “PRN-2-ME

  1. Pingback: Printer MITM revisited: prn-2-me | Cатсн²² (in)sесuяitу

  2. andrew August 26, 2011 at 08:13

    hello,script not download,Placese send a email.thx

  3. ChrisJohnRiley August 26, 2011 at 08:35

    Hi, Script seems to download fine here….

    Direct Link to PoC Scripts –> https://sites.google.com/a/c22.cc/storage/poc_scripts

  4. Nick March 2, 2012 at 21:26

    Chris, I downloaded this script recently and of course I ran it in python etc. However, while running it I get this message:

    File “C:\Documents and Settings\Nick\My Documents\Downloads\prn2me.py”, line 232, in
    main()
    File “C:\Documents and Settings\Nick\My Documents\Downloads\prn2me.py”, line 225, in main
    sys.exit(2)
    SystemExit: 2

    I am by no means experienced with python or programming outside of MATLAB and other Engineering based programs. So I was wondering what I did wrong, and what I need to do in order to make it work.

  5. AkumA September 13, 2012 at 17:14

    You are probably missing some support packages. You need to grab setuptools-0.6c11.win32-py2.7 in order to install .egg files and the sort. you need Twisted-12.2.0.win32-py2.7.msi, and zope.interface-4.0.1-py2.7-win32.egg. Install these 3 packages and you should be good to go.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: