+ All Categories
Home > Documents > Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read...

Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read...

Date post: 05-Aug-2020
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
41
Transcript
Page 1: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.
Page 2: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

Exploiting Network Printers

Jens Müller, Vladislav Mladenov, Juraj Somorovsky, Jörg Schwenk

Page 3: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1

Why printers?

Page 4: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1987 20172

Evolution

Page 5: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

3

Yet another T in the IoT?

Page 6: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Systematization of printer attacks

• Evaluation of 20 printer models

• PRinter Exploitation Toolkit (PRET)

• Novel attacks beyond printers

• New research directions

4

Contributions

Page 7: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1. Background

2. Attacks

3. Evaluation

4. PRET

5. Beyond printers

6. Countermeasures

5

Overview

Page 8: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1. Printing channel (USB, network, …)

2. Printer language (PJL, PostScript, …)6

How to print?

Page 9: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

PrintingUnit

Printer USB

RAW

IPP

LPD

SMB

PJLInterpreter

PostScriptInterpreter

FurtherInterpreter(PCL, PDF, …)

7

What to attack?

Page 10: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Printer Job Language

• Manages settings like output tray or paper size

@PJL SET PAPER=A4

@PJL SET COPIES=10

@PJL ENTER LANGUAGE=POSTSCRIPT

• NOT limited to the current print job

8

PJL

Page 11: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Invented by Adobe (1982 – 1984)

• Heavily used on laser printers

• Turing complete language

9

PostScript

Page 12: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1. Background

2. Attacks

3. Evaluation

4. PRET

5. Beyond printers

6. Countermeasures

10

Overview

Page 13: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Is your copy room always locked?

11

Attacker model: Physical access

Page 14: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Who would connect a printer to the Internet?

12

Attacker model: Network access

Page 15: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

13

Attacker model: Network access

Attacker(Insider)

Attacker

Page 16: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

14

Attacker model: Web attacker

Carrier

Attacker(Website)

Page 17: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Denial of service

• Protection bypass

• Print job manipulation

• Information disclosure

15

Four classes of attacks

Page 18: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Postscript infinite loop

{} loop

16

Denial of service

Page 19: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Reset to factory defaults

• Can be done with a print job (HP)

@PJL DMCMD ASCIIHEX=

"040006020501010301040106"

17

Protection bypass

Page 20: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Redefinition of Postscript showpage operator

18

Print job manipulation

Page 21: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Access to memory

• Access to file system

• Capture print jobs

Save on file system or in memory

19

Information disclosure

Page 22: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

20

Attacker model: Web attacker

Carrier

Attacker(Website)

Page 23: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

21

Same-origin policy

Carrier

evil.org internal.bank.com

Page 24: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

22

CORS spoofing

Carrier

evil.org printer.bank.com:9100

JavaScript (PS file)

(HTTP/1.0 OK) print(Access-Control-Allow-Origin: evil.org) print…

Page 25: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1. Background

2. Attacks

3. Evaluation

4. PRET

5. Beyond printers

6. Countermeasures

23

Overview

Page 26: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• How would you proceed?

Our approach: Contacted university system administraators

24

Obtaining printers

Page 27: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

25

Printers. Lots of printers

Page 28: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

26

Evaluation results

Page 29: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

Overview

1. Background

2. Attacks

3. Evaluation

4. PRET

5. Beyond printers

6. Countermeasures

27

Overview

Page 30: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

Translator

PJL PostScript

PRET

Result

/str 256 string def (%*%../../../*) {==} str filenameforall

PostScript Request

PJL Request

PJL Response

(%disk0%../../../ init)(%disk0%../../../.profile)(%disk0%../../../tmp)

Postscript Response

init TYPE=FILE SIZE=1276.profile TYPE=FILE SIZE=834tmp TYPE=DIR

@PJL FSDIRLIST NAME="0:\..\..\" ENTRY=1 COUNT=3User command

- 834 .profile- 1276 initd - tmp

ConnectorAttacker

ls

28

PRinter Exploitation Toolkit (PRET)

Page 31: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

29

PRET commands

Page 32: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1. Background

2. Attacks

3. Evaluation

4. PRET

5. Beyond printers

6. Countermeasures

30

Overview

Page 33: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

Attacker

Converting PostScript = interpreting PostScript

31

Google Cloud Print

Page 34: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• PS conversion websites

• Image conversion sites

• Thumbnail preview

32

PostScript in the web?

Page 35: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

32

File system Environment

variables

Command

execution

[Dropbox] read list stat read

Box.com (read) list stat read

[Google Drive] (read) (list) stat

MS OneDrive read list stat read

Yandex Disk (read) list stat read

Jumpshare write read list stat read exec

CloudMe (read) list stat

[CloudConvert] write read list stat read exec

Attacks on Cloud Storage

Page 36: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

1. Background

2. Attacks

3. Evaluation

4. PRET

5. Beyond printers

6. Countermeasures

33

Overview

Page 37: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

34

Countermeasures

Page 38: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

“Hacker Stackoverflowin made 160,000 printers spewout ASCII art around the world” -- theregister.co.uk

35

Do not connect printers to the Internet

Page 39: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Employees: always lock the copy room

• Administrators: sandbox printers in aVLAN accessible only via print server

• Printer vendors: undo insecure designdecisions (PostScript, proprietary PJL)

• Browser vendors: block port 9100

37

Countermeasures

Page 40: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

• Systematic analysis of networkprinters and printing standards

• Insecurity of Postscript and PJL

• Attacks applied to different areas

• TODO:

– Firmware Updates, Fax, 3D printing

37

Conclusions and future work

Page 41: Exploiting Network Printers Conf...CloudMe (read) list stat [CloudConvert] write read list stat read exec Attacks on Cloud Storage. 1. Background 2. Attacks 3. Evaluation 4. PRET 5.

PRET („Printer Exploitation Toolkit“)

https://github.com/RUB-NDS/PRET

Hacking Printers Wiki

http://hacking-printers.net/

Questions?38

Thanks for your attention...


Recommended