SlideShare a Scribd company logo
1 of 39
In The Middle of Printers –
The (In)Security of Pull Printing Solutions
Jakub Kałużny SecuRing
#whoami
● IT Security Consultant at SecuRing
● Consulting all phases of SDLC
● Previously worked for ESA and online money
transfers company
● Bug bounty hunter
Pull Printing Solutions
Pull Printing Solutions
https://www.laservalley.com/images/hp_AccessControl.jpg
Why hack pull printing?
● It is cool
● Widely used
● Confidential data
● Getting popular
● Legal conditions
https://www.flickr.com/photos/girlgeek/1877517607
Threat modelling – key risks
sniffing print queues
accountability users’ data
Attack vectors
Other users’ data
Access to other
print queues
Sniffing, MITM
Authorization bypass
User/admin interface
vulnerabilities
Proprietary network protocols
• You will encounter one
• No docs, specs, tools
• What to do ?
• decompile the client?
• search for some tools?
• watch the raw packets?
• Let’s try!
https://www.flickr.com/photos/canonsnapper/2566562866
What is needed ?
http://www.memegen.com/meme/e4tvwy
Ex 1: Secure Pull Printing
“is a modern printing solution that
safeguards document confidentiality and
unauthorized access to print, scan, copy and
e-mail functions. Its user-authentication
provides air-tight security on your shared
MFPs that function as personal printers.”
Vendor ensures
„Documents are delivered only into the right hands”
„Information is kept confidential. No risk of being left
unattended at the printer”
„Document collection is safe anytime and anywhere —
no “print and sprint”.”
„Integration with other enterprise applications and
workflows is kept secure through single sign-on”
Ex 1: Proprietary protocol
First look on communication
● TCP, 2 ports
● No cleartext, no SSL
● Seems to follow some scheme…
Ex1: Deeper sight on traffic
S
E
R
V
E
R
P
R
I
N
T
E
R
constant 263B
96B, “X” B, 128B
always different 64 B
many identical 16B blocks
HELLO
HELLO, CERTIFICATE
SESSION KEY
PostScript, ECB mode
https://en.wikipedia.org/wiki/ECB_mode
PoC script for MITM
Ex 1: Reverse-engineered
● Hardcoded RSA certificate in printer embedded
software
● No trust store!
● AES-128 ECB for symmetric cryptography
● More vulnerabilities inside
● Same protocol in admin interface
Ex 1: Consequences
sniffing print queues
accountability users’ data
“Many of the devices does not have the
CPU power that allows a fast login response
and at the same time establish a high
security level”
“For example changing ECB to CBC mode
encryption will be more CPU intensive and
introducing that may cause slower
performance of the devices, which the
customers are very reluctant to see
implemented.”
Ex 1: Vendor gets notified
“(…) system has been deployed at many
high security customers and has passed
internal audits.”
Ex 2: Responsible vendor
“With its roots in education and the full
understanding that college kids “like to
hack”, our development processes
continually focus on security.”
“Secure print release (…) can integrate
card-swipe user authentication at devices
(…) ensuring jobs are only printed when the
collecting user is present.”
Ex2: binary protocol
S
E
R
V
E
R
P
R
I
N
T
E
R
HELLO
USER: user1
token
HASH(password + token)
Password ok
Release my print queue
OK
Just copied 100 pages
Charge user “guest-xyz” for copying 100 pages
Ex 2: Closer look
Release my print queue
Just copied 100 pages
User permissions
beginDeviceTransaction
(…) guest-xyz
Release print queue for user “guest-xyz”
S
E
R
V
E
R
P
R
I
N
T
E
R
guest-abc
Ex 2: Consequences
sniffing print queues
accountability users’ data
Ex 2: Vendor gets notified
● KB access and support service
● And all versions of software
● Responded in few hours and patched in few
days
● Was happy to be pentested
Ex 3: Secure Print Solutions
“The Secure Print technology offers:
High Security - Jobs only print when
released by the user”
Ex 3: Architecture design
● Network level protection
● IP whitelist
● Stateless HTTP service, no session token, no
cookie
Ex 3: Authentication request
S
E
R
V
E
R
P
R
I
N
T
E
R
POST /AuthenticateLogin2 HTTP/1.1
(...)
param1=username&param2=password
Ex 3: Hacking without any tools
POST /AuthenticateLogin2 HTTP/1.1
(...)
param1=username&param2=password
Ex 3: Tampering accountability
S
E
R
V
E
R
P
R
I
N
T
E
R
POST /LogJob HTTP/1.1
(…)
data=<job><job-id>1073741847</job-
id><name>_Print_____1073741847</name><type>103</type><
type-string>Print</type-string><page-cnt>0</page-
cnt><color-page-cnt>0</color-page-
cnt><color>0</color><duplex>0</duplex><page-
size>0</page-size><page-size-
string>Unknown_Size</page-size-
string><media>Unknown</media><dest>UNKNOWN</dest>
<user-name>USER1</user-name><email-
address>unknown@unknown.com</email-address></job>
Just printed a job, note it and charge
Ex 3: Consequences
sniffing print queues
accountability users’ data
Ex 3: Vendor gets notified
Received, and will look it over with engineers. I'll
come back to you shortly.
Discussed with engineers, and the reason why
communication was non-SSL, was to support older
Lexmark devices which cannot do SSL.
Other vulnerabilities
● Logs and printed files on a default web server
● Brute-force attack in admin/user interfaces, no logs
● XSS and CSRF in web interfaces
● Predictable session identifiers
● DoS attack vulnerability
Get the
software
Pentests Report
Get the software Pentests
Report
vulnerabilities
Research process
What we thought
How does it really look like
Research problems
Why do vendors fear pentests?
● no direct profit
● risk of finding criticals
● implies a lot of patching
Cheat sheet - owners
While deploying a pull printing solution:
● Get it pentested
● Network layer security - IPsec, VLANs
● Verify vendor claims, ask for their SDLC, how
do they handle vulnerabilities
Cheat sheet - developers
Encryption between server and printer/user:
● Avoid writing your own crypto
● Use known standards
● Authenticate both side
Cheat sheet - developers
Behind the proprietary protocol:
● Access control
● Separate interfaces
● MITM protection is not enough
Cheat sheet - testers
Look for vulnerabilities in:
● Encryption, trust stores, cipher suites
● Access control in proprietary protocols
● Infrastructure design
What’s next ?
● CVEs disclosure
● A follow-up paper
● Ready to fight new proprietary protocols
Q & A
http://www.securing.pl
e-mail: info@securing.pl
tel. +48 (12) 4252575
Jakub Kałużny
jakub.kaluzny@securing.pl
CC license credits
https://www.flickr.com/photos/bru/2967030367
https://www.flickr.com/photos/calliope/1816120150
https://www.flickr.com/photos/siradavis/2148761728
https://www.flickr.com/photos/elevateprinting/3123470876
https://www.flickr.com/photos/acaben/18403502
https://www.flickr.com/photos/liewcf/449611278
https://www.flickr.com/photos/mava/3111719841
https://www.flickr.com/photos/wmjas/2378330389
https://www.flickr.com/photos/oskay/472097903
https://www.flickr.com/photos/fsse-info/3093021726/in/photolist-aFngAa-9PUjEk-fUJCjP-
cwh2TC-cwh2oU-9Lag1z-9RByGf-8FDcLH-dvodj3-aWRC4R-dvoaPG-dvhyKF-bjzH5u-65zwkN-
aWRDGc-5JYnU6-dnDDuL-bueg2C-DCHxv-5WapqT-fcuDBM-5T7QW3-7Pbpsw-6LFtWE-dj1hmz-
iZBc-97WJJo-4VUGyN-dj1g2A-eazhzq-mXsEkZ-dnDyEB-8T3kyS-6tT6Na-orB7V-6mMWku-
dvhC7a-4CayLn-5HjxKd-HHCg2-FJkDk-5HjxAN-kcAVp4-k5nj3Z-7JgVcV-kvhRaR-fRYLeC-ex2mmw-
ewYafe-ewYa6M

More Related Content

Similar to In The Middle of Printers - The (In)Security of Pull Printing solutions - HackInTheBox Amsterdam 2014

BSides London 2015 - Proprietary network protocols - risky business on the wire.
BSides London 2015 - Proprietary network protocols - risky business on the wire.BSides London 2015 - Proprietary network protocols - risky business on the wire.
BSides London 2015 - Proprietary network protocols - risky business on the wire.Jakub Kałużny
 
Hacking identity: A Pen Tester's Guide to IAM
Hacking identity: A Pen Tester's Guide to IAMHacking identity: A Pen Tester's Guide to IAM
Hacking identity: A Pen Tester's Guide to IAMJerod Brennen
 
Information security & ethical hacking
Information security & ethical hackingInformation security & ethical hacking
Information security & ethical hackingeiti panchkula
 
CONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocols
CONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocolsCONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocols
CONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocolsPROIDEA
 
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014Jakub Kałużny
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsSlawomir Jasek
 
Application Security
Application SecurityApplication Security
Application Securityflorinc
 
Ethical_Hacking_ppt
Ethical_Hacking_pptEthical_Hacking_ppt
Ethical_Hacking_pptNarayanan
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Moataz Kamel
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiYossi Sassi
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionDaniel Owens
 
VTU network security(10 ec832) unit 6 notes
VTU network security(10 ec832) unit 6 notesVTU network security(10 ec832) unit 6 notes
VTU network security(10 ec832) unit 6 notesJayanth Dwijesh H P
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsVlad Fedosov
 
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2Chris Gates
 
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5James Jara
 
Effective Data Erasure and Anti Forensics Techniques
Effective Data Erasure and Anti Forensics TechniquesEffective Data Erasure and Anti Forensics Techniques
Effective Data Erasure and Anti Forensics Techniquesijtsrd
 
CONHESI 2021 - Exploiting Web APIs
CONHESI 2021 - Exploiting Web APIsCONHESI 2021 - Exploiting Web APIs
CONHESI 2021 - Exploiting Web APIsCiNPA Security SIG
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answersOWASP
 

Similar to In The Middle of Printers - The (In)Security of Pull Printing solutions - HackInTheBox Amsterdam 2014 (20)

Owasp top 10 2013
Owasp top 10 2013Owasp top 10 2013
Owasp top 10 2013
 
BSides London 2015 - Proprietary network protocols - risky business on the wire.
BSides London 2015 - Proprietary network protocols - risky business on the wire.BSides London 2015 - Proprietary network protocols - risky business on the wire.
BSides London 2015 - Proprietary network protocols - risky business on the wire.
 
Hacking identity: A Pen Tester's Guide to IAM
Hacking identity: A Pen Tester's Guide to IAMHacking identity: A Pen Tester's Guide to IAM
Hacking identity: A Pen Tester's Guide to IAM
 
Information security & ethical hacking
Information security & ethical hackingInformation security & ethical hacking
Information security & ethical hacking
 
CONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocols
CONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocolsCONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocols
CONFidence 2014: Jakub Kałużny: Shameful secrets of proprietary protocols
 
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
Shameful Secrets of Proprietary Network Protocols - OWASP AppSec EU 2014
 
Shameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocolsShameful secrets of proprietary network protocols
Shameful secrets of proprietary network protocols
 
Application Security
Application SecurityApplication Security
Application Security
 
Ethical_Hacking_ppt
Ethical_Hacking_pptEthical_Hacking_ppt
Ethical_Hacking_ppt
 
Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020Secure coding presentation Oct 3 2020
Secure coding presentation Oct 3 2020
 
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi SassiInSecure Remote Operations - NullCon 2023 by Yossi Sassi
InSecure Remote Operations - NullCon 2023 by Yossi Sassi
 
Application and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental EditionApplication and Website Security -- Fundamental Edition
Application and Website Security -- Fundamental Edition
 
VTU network security(10 ec832) unit 6 notes
VTU network security(10 ec832) unit 6 notesVTU network security(10 ec832) unit 6 notes
VTU network security(10 ec832) unit 6 notes
 
XP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applicationsXP Days 2019: First secret delivery for modern cloud-native applications
XP Days 2019: First secret delivery for modern cloud-native applications
 
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
hackcon2013-Dirty Little Secrets They Didn't Teach You In Pentesting Class v2
 
Why Web Security Matters!
Why Web Security Matters!Why Web Security Matters!
Why Web Security Matters!
 
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5James Jara Portfolio 2014 - InfoSec White Paper- Part 5
James Jara Portfolio 2014 - InfoSec White Paper- Part 5
 
Effective Data Erasure and Anti Forensics Techniques
Effective Data Erasure and Anti Forensics TechniquesEffective Data Erasure and Anti Forensics Techniques
Effective Data Erasure and Anti Forensics Techniques
 
CONHESI 2021 - Exploiting Web APIs
CONHESI 2021 - Exploiting Web APIsCONHESI 2021 - Exploiting Web APIs
CONHESI 2021 - Exploiting Web APIs
 
[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers[OWASP Poland Day] Application security - daily questions & answers
[OWASP Poland Day] Application security - daily questions & answers
 

More from Jakub Kałużny

The Hacker's Guide to NOT Getting Hacked
The Hacker's Guide to NOT Getting HackedThe Hacker's Guide to NOT Getting Hacked
The Hacker's Guide to NOT Getting HackedJakub Kałużny
 
Pentesting voice biometrics solutions - AusCERT 2017
Pentesting voice biometrics solutions - AusCERT 2017Pentesting voice biometrics solutions - AusCERT 2017
Pentesting voice biometrics solutions - AusCERT 2017Jakub Kałużny
 
Zeronights 2015 - Big problems with big data - Hadoop interfaces security
Zeronights 2015 - Big problems with big data - Hadoop interfaces securityZeronights 2015 - Big problems with big data - Hadoop interfaces security
Zeronights 2015 - Big problems with big data - Hadoop interfaces securityJakub Kałużny
 
Script based malware detection in online banking
Script based malware detection in online bankingScript based malware detection in online banking
Script based malware detection in online bankingJakub Kałużny
 
ESA - Hacking the aerospace industry - should we worry ?
ESA - Hacking the aerospace industry - should we worry ? ESA - Hacking the aerospace industry - should we worry ?
ESA - Hacking the aerospace industry - should we worry ? Jakub Kałużny
 
Bypassing malware detection mechanisms in online banking
Bypassing malware detection mechanisms in online bankingBypassing malware detection mechanisms in online banking
Bypassing malware detection mechanisms in online bankingJakub Kałużny
 

More from Jakub Kałużny (6)

The Hacker's Guide to NOT Getting Hacked
The Hacker's Guide to NOT Getting HackedThe Hacker's Guide to NOT Getting Hacked
The Hacker's Guide to NOT Getting Hacked
 
Pentesting voice biometrics solutions - AusCERT 2017
Pentesting voice biometrics solutions - AusCERT 2017Pentesting voice biometrics solutions - AusCERT 2017
Pentesting voice biometrics solutions - AusCERT 2017
 
Zeronights 2015 - Big problems with big data - Hadoop interfaces security
Zeronights 2015 - Big problems with big data - Hadoop interfaces securityZeronights 2015 - Big problems with big data - Hadoop interfaces security
Zeronights 2015 - Big problems with big data - Hadoop interfaces security
 
Script based malware detection in online banking
Script based malware detection in online bankingScript based malware detection in online banking
Script based malware detection in online banking
 
ESA - Hacking the aerospace industry - should we worry ?
ESA - Hacking the aerospace industry - should we worry ? ESA - Hacking the aerospace industry - should we worry ?
ESA - Hacking the aerospace industry - should we worry ?
 
Bypassing malware detection mechanisms in online banking
Bypassing malware detection mechanisms in online bankingBypassing malware detection mechanisms in online banking
Bypassing malware detection mechanisms in online banking
 

In The Middle of Printers - The (In)Security of Pull Printing solutions - HackInTheBox Amsterdam 2014

Editor's Notes

  1. I was supposed to tell you some impressive things about me, but let’s just stick to the fact that I am penetration tester at SecuRing, a Polish company operating in Europe. So, apart from threat modelling, auditing and business stuff, we do penetration tests – and yes – we hack almost everything – web and mobile applications, networks, environment and devices – such as ATMs, cash deposits machines and of course – printers. And this is the topic of my research which I am going to present you now.
  2. Let’s take a look on the flow diagram. So, normally a user would print files directly to the printer. In this case, in pull printing, he sends files to the server, it is held in the print queue. Then, the user goes to the printer, authenticates at its screen interface or swipes his card. Then, his print queue is released and the printer collects the print job.
  3. One more thing about Pull Printing Solutions – they offer a lot of funcionality, different access roles, which implies many threat agents, attack vectors and as it turned out – many vulnerabilities
  4. I don’t know why, but it gets accepted into every conference I apply to. We have been presenting this topic and a similar one generally about proprietary network protocols on PHDays in Moscow, CONFidence in Poland and OWASP AppSec is coming in July. Pull Printing Solutions are everywhere. They all handle a lot of confidential data. It’s getting even more popular, not only in top fortune companies but also mid-size and small businesses. There are some legal conditions which help pull printing business, in Poland, recently, banks were recommended by a government organization to implement a secure printing systems in their offices.
  5. Let’s make a quick threat modelling. What would an owner of such solution not like to happen, what are the key risks ? Anyone ? Let’s get some more interaction.
  6. OK, let’s get back to the flow diagram.
  7. How many of you are pentesters? Have you encountered a proprietary network protocol? Do you know the helpless feeling, when you are certain that there have to be many vicious vulnerabilities, but you just can’t get to them – because you don’t know the protocol specification, or don’t have proper tools to attack it? We have had the same problem many times, and would like to share our experience, based on the real-life examples.
  8. MFP got everything – hard disk, usb port, embedded software, VNC server. Ethernet usb adapter – for bridging the interfaces.
  9. 100% hackerproof, Marketing rubbish.
  10. Quantity analysis
  11. So, what were the consequences ? Actually, all of the key risks were broken. And this is some sort of a moment of glory – we even have a special procedure in our company for such criticals, but don’t ask, it’s classified 
  12. ECB is faster, but Only when using parallel Either printers have multi-thread procesor, or they lack computation power.
  13. Widely used on universitites, Ivy League.
  14. We started with basic tests: SQLi in param2, omitting param2, empty param2…
  15. To avoid such situations I prepared short cheatsheets.
  16. Infrastructure – so look for accessible admin interface, possibility for man in the middle, etc.