DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… ·...

28
Bugged Files IsYour Document Telling onYou? Daniel Crowley, Damon Smith

Transcript of DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… ·...

Page 1: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

Bugged&Files&Is#Your#Document#Telling#on#You?#

Daniel#Crowley,#Damon#Smith#

Page 2: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

•  Damon&Smith&

Who&are&we?&

•  Daniel&Crowley&

Page 3: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

Files&that&trigger&outbound&traffic&when&parsed&&

&Without&being&an&executable&format&&Regardless&of&format&complexity&

&&&&&&Without&the&use&of&exploits&&

&…and&the&implications&of&all&that&

What&is&this&talk&about?&

Page 4: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Privacy&

– DRM&

– DLP&

– DeFanonymization&

• Security&

– NTLM&credential&capture/relay&– CSRF&

• ”It’s&a&feature,&not&a&bug”&

Why&is&this&important?&&

Page 5: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

Demonstration&

•  RTF&•  WMV&

Page 6: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Office&formats&– .docx&– .pptx&– .xlsx&

• PLS&playlists&• Shortcut&(.lnk)&files&• Desktop.ini&files&• HTML&

What&formats&are&already&known&to&allow&this?&

Page 7: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

•  HTML&in&IE&•  Linked&images&in&emails&opened&in&Outlook!&

Other&NTLM&trigger&silliness&

Page 8: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Document&formats&• Media&formats&• Meeting/scheduling&related&formats&&

What&did&our&work&focus&on?&

Page 9: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Remote&image&

– No&warning,&no&NTLM&

• App.media.openPlayer()&– Warning,&NTLM&possible&

• getURL()&– Warning,&NTLM&possible&

PDF&

Page 10: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Linked&document&on&UNC&share&– Warning&(ignored),&NTLM&possible&

RTF&

Page 11: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Remote&XML&stylesheets&• Javascript&

SVG&(Scalable&Vector&Graphics)&

Page 12: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• All&these&formats&support&remote&media&

– Even&UNC&paths…&

M3U&/&PLS&/&ASX&

Page 13: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

•  ID3&tag&– LINK&frame&– APIC&frame&

•  Not&supported&on&any&major&player&we&tested&!&

MP3&

Page 14: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

•  URLANDEXIT&•  Launches&default&browser&with&specified&URL&

•  DRM&functionality&abuse&•  Subtitles&•  Can&include&arbitrary&HTML&

ASF&(WMA/WMV/ASF)&

Page 15: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• HTTP&tracker&URLs&in&“announceFlist”&– As&many&as&you&want&

• URL&seeds&allowed&in&“urlFlist”&– Clients&can&implement&any&URL&handler&

• Must&support&one&or&both&of&HTTP&&&FTP&

– Not&universally&supported&

TORRENT&

Page 16: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Free/Busy&URL&

– No&warning,&NTLM&possible&– Requires&specific&actions&by&recipient&

VCF&(vCard&format)&

Page 17: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• VALARM&

– ATTACH&parameter&is&a&URL&

– AUDIO&and&PROCEDURE&alarm&types&&

• ICS&is&the&iCalendar&format&– Not&even&Calendar.app&will&let&you&accept&PROCEDURE&!&

ICS&(iCalendar&format)&

Page 18: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Email&• Open&file&share&

• Watering&hole&

• P2P&distribution&• Honeypot&

Delivery&methods&

Page 19: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Dystopian&future&DRM&could&call&home&

– Probably&already&does&in&some&cases&• Goes&beyond&deterrence&into&identification&

Digital&Rights&Management&

Page 20: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Imagine&being&a&whistleblowerFtoFbe&

– In&a&fascist&country&• The&document&you&exfiltrate&calls&home&

– From&your&work&computer&– From&your&home&computer&– From&your&friend’s&home&

– From&your&lawyer’s&office&

– From&a&journalist’s&office&

• You&get&disappeared&&

Data&Loss&Prevention&

Page 21: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Tor&Browser&only&routes&browser&traffic&through&Tor&– External&programs&don’t&route&through&Tor&

• You&don’t&control&that&jihad&wiki&– But&maybe&you&can&upload&a&bugged&PDF&

DeFAnonymization&

Page 22: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Windows&will&autoFauth&when&accessing&SMB&

• Files&can&in&some&cases&initiate&SMB&traffic&– Embedding&remote&file://&resources&– UNC&path&as&file&

– Javascript/other&active&content&• NTLM&auth&can&be&cracked&or&relayed&

NTLM&Credential&Capture/Relay&

Page 23: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

NTLM&overview&

Server&Client&

1.&Negotiate&

2.&Challenge&

3.&Authenticate&

Page 24: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

NTLM&relay&overview&

Server&Client&

Attacker&

Page 25: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Initiating&traffic&from&privileged&positions&is&fun&

– Exploit&router&vulns&– Exploit&NAS/Printers&– Exploit&IoT&devices&

CSRF&

Page 26: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• AV?&– Too&many&formats&and&variations&– Possibility&of&false&positives&

• Format&changes?&– Too&much&inertia,&too&many&formats&

• ApplicationFlevel&firewalls?&– Easy&for&RTF&

– Not&so&easy&for&M3U&&

Possible&Mitigations&

Page 27: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

• Warnings?&•  Proxychains&with&strict_chain&and&bad&proxy&- Doesn’t&work&for&some&applications&

•  Egress&filtering?&- Doesn’t&stop&internal&connections&- Might&stop&legitimate&functionality&

Possible&Mitigations&

Page 28: DEF CON 23 Presentation CON 23/DEF CON 23 presentations/DE… · Files&that&trigger&outbound&traffic&when&parsed& & &Without&being&an&executable&format& &Regardless&of&format&complexity&

Questions?&

Daniel#Crowley,#Damon#Smith#