Difference between revisions of "LPD"

From Hacking Printers
Jump to: navigation, search
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[File:LPD-deployment-channel.png|thumb|180px|LPD print job deployment]]
+
[[File:LPD-deployment-channel.png|thumb|180px|Printing over LPD]]
  
The Line Printer Daemon (LPD) protocol had originally been introduced in Berkeley Unix in the 1980s. The existing implementation was later specified by RFC1179 <ref>''[https://www.ietf.org/rfc/rfc1179.txt RFC1179: Line Printer Daemon Protocol]'', L. McLaughlin, 1990</ref>. The daemon runs on port 515/tcp and can be accessed using the ‘lpr’ command. While the LPD process was traditionally hosted on a computer system connected to the printing device, today's network printers run their own daemon directly accessible over the network. To print, the client sends a '''control file''' defining job/username and a '''data file''' containing the actual data to be printed. The input type of the data file can be set in the control file by choosing among various file formats. However it is up to the LPD implementation how to actually handle the print data. A popular LPD implementation for Unix-like operating system is ''LPRng'' <ref>''[http://lprng.sourceforge.net/ LPRng – An Enhanced Printer Spooler]'', P. Powell</ref>. LPD can be used as a carrier to deploy malicious PostScript or PJL print jobs. The protocol itself is not further analyzed in this wiki, with the exception of [[Accounting bypass|accounting bypasses]] and a fuzzer written to discover [[Buffer overflows#LPD daemon|buffer overflows]] in LPD implementations. The ''lpdprint'' tool included in [[PRET]] is a minimalist way to print data directly to an LPD capable printer as shown below:
+
The Line Printer Daemon (LPD) protocol had originally been introduced in Berkeley Unix in the 80s. The existing implementation was later specified by RFC1179 <ref>''[https://www.ietf.org/rfc/rfc1179.txt RFC1179: Line Printer Daemon Protocol]'', L. McLaughlin, 1990</ref>. The daemon runs on port 515/tcp and can be accessed using the ‘lpr’ command. While the LPD process was traditionally hosted on a computer system connected to the printing device, today's network printers run their own daemon directly accessible over the network. To print, the client sends a '''control file''' defining job/username and a '''data file''' containing the actual data to be printed. The input type of the data file can be set in the control file by choosing among various file formats. However it is up to the LPD implementation how to actually handle the print data. A popular LPD implementation for Unix-like operating system is ''LPRng'' <ref>''[http://lprng.sourceforge.net/ LPRng – An Enhanced Printer Spooler]'', P. Powell</ref>. LPD can be used as a carrier to deploy malicious PostScript or PJL print jobs. The protocol itself is not further analyzed in this wiki, with the exception of [[Accounting bypass|accounting bypasses]] and a fuzzer written to discover [[Buffer overflows#LPD daemon|buffer overflows]] in LPD implementations. The ''lpdprint'' tool included in [[PRET]] is a minimalist way to print data directly to an LPD capable printer as shown below:
  
 
  lpdprint.py hostname filename
 
  lpdprint.py hostname filename
  
→ ''Related aricles:'' [[Fundamentals#High-level_overview|Fundamentals]], [[Attack carriers]], [[Accounting bypass]], [[Buffer overflows]]
+
→ ''Related articles:'' [[Fundamentals#High-level_overview|Fundamentals]], [[Attack carriers]], [[Accounting bypass]], [[Buffer overflows]]
  
  
 
----
 
----

Latest revision as of 09:32, 31 January 2017

Printing over LPD

The Line Printer Daemon (LPD) protocol had originally been introduced in Berkeley Unix in the 80s. The existing implementation was later specified by RFC1179 [1]. The daemon runs on port 515/tcp and can be accessed using the ‘lpr’ command. While the LPD process was traditionally hosted on a computer system connected to the printing device, today's network printers run their own daemon directly accessible over the network. To print, the client sends a control file defining job/username and a data file containing the actual data to be printed. The input type of the data file can be set in the control file by choosing among various file formats. However it is up to the LPD implementation how to actually handle the print data. A popular LPD implementation for Unix-like operating system is LPRng [2]. LPD can be used as a carrier to deploy malicious PostScript or PJL print jobs. The protocol itself is not further analyzed in this wiki, with the exception of accounting bypasses and a fuzzer written to discover buffer overflows in LPD implementations. The lpdprint tool included in PRET is a minimalist way to print data directly to an LPD capable printer as shown below:

lpdprint.py hostname filename

Related articles: Fundamentals, Attack carriers, Accounting bypass, Buffer overflows



  1. RFC1179: Line Printer Daemon Protocol, L. McLaughlin, 1990
  2. LPRng – An Enhanced Printer Spooler, P. Powell