URI Use and Abuse P\/\/N1ch1\/\/4. Contributing Authors Nathan McFeters – Senior Security Analyst – Ernst & Young Advanced Security Center, Chicago Billy.

Slides:



Advertisements
Similar presentations
WordPress Installation for Beginners Sheila Bergman
Advertisements

Web 2.0 Programming 1 © Tongji University, Computer Science and Technology. Web Web Programming Technology 2012.
Slipping Past the Firewall DNS Rebinding with Pure Java Applets Billy K Rios (BK) and Nate McFeters.
Module XII Web Application Vulnerabilities
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
Google Series Part 1: gmail Part 2: maps Part 3: talk Part 4: earth Part 5: books Part 6: picasa Part 7: sites Part x: ?
Incident Handling & Log Analysis in a Web Driven World Manindra Kishore.
What is code injection? Code injection is the exploitation of a computer bug that is caused by processing invalid data. Code injection can be used by.
WEB BROWSER SECURITY By Robert Sellers Brian Bauer.
©2009 Justin C. Klein Keane PHP Code Auditing Session 3 – Tools of the Trade & Crafting Malicious Input Justin C. Klein Keane
HTTP Cookies. CPSC Application Layer 2 User-server state: cookies Many major Web sites use cookies Four components: 1) cookie header line of HTTP.
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
EECS 354 Network Security Cross Site Scripting (XSS)
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Advanced Security Center Overview Northern Illinois University.
Mastering the Internet, XHTML, and JavaScript Chapter 2 Web Browsers.
CS 290C: Formal Models for Web Software Lecture 1: Introduction Instructor: Tevfik Bultan.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
TRIRIGA Anywhere 10.4 Beta Registration Steps
Adobe Connect User Guide. Adobe Connect Meeting is an online-based tool that lets you to connect with colleagues, classmates, or anyone else around the.
ITM352 Javascript and Dynamic Web Pages: Client Side Processing.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Use my floppy disk. 1. copy short cut to desktop. 2.run NoAdHOSTS.exe 3. Surf without ad’s. 4.to reverse everything -edit out all url s you want to return.
PLUG INS flash, quicktime, java applets, etc. Browser Plug-ins Netscape wanted a method to extend features of the browser became an unofficial standard.
Computer Concepts 2014 Chapter 7 The Web and .
XSS Without the Browser Wait, what? Toorcon Seattle, 2011.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Ajax Basics The XMLHttpRequest Object. Ajax is…. Ajax is not…. Ajax is not a programming language. Ajax is not a programming language. Ajax is a methodology.
JavaScript & jQuery the missing manual Chapter 11
Mr. Rouda’s CSCI 101 sections. What does a web page consist of? Code HTML, CSS, XHTML, XML, etc. Images Gif, jpg, png, etc. Plugins Swf, flv, etc. JavaScript.
Cosc 4765 Server side Web security. Web security issues From Cenzic Vulnerability report
Prevent Cross-Site Scripting (XSS) attack
Dynamic Web Pages (Flash, JavaScript)
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
Ladd Van Tol Senior Software Engineer Security on the Web Part One - Vulnerabilities.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Copyright 2000 eMation SECURITY - Controlling Data Access with
Mr. Rouda’s CSCI 101 sections. What does a web page consist of? Code HTML, CSS, XHTML, XML, etc. Images Gif, jpg, png, etc. Plugins Swf, flv, etc. JavaScript.
Chapter 1: The Internet and the WWW CIS 275—Web Application Development for Business I.
1 Internet Browsing Vulnerabilities and Security ECE4112 Final Lab Ye Yan Frank Park Scott Kim Neil Joshi.
Microsoft Internet Explorer and the Internet Using Microsoft Explorer 5.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
1 Welcome to CSC 301 Web Programming Charles Frank.
Ajax In Action The Journey into Web2.0 Presented by Eric Pascarello.
Client-based Application Attacks Adli Abdul Wahid Dept. of Comp. Science, IIUM
The Top 10 Bugs in Windows 2000 From Jesper Johanssen’s W2K Security Vulnerabilities Lecture.
Building Secure Web Applications With ASP.Net MVC.
Crash Course in Web Hacking
The Internet 8th Edition Tutorial 3 Using Web-Based Services for Communication and Collaboration.
Web Application Vulnerabilities ECE 4112 Internetwork Security, Spring 2005 Chris Kelly Chris Lewis April 28, 2005 ECE 4112 Internetwork Security, Spring.
PLUG INS flash, quicktime, java applets, etc. Browser Plug-ins Netscape wanted a method to extend features of the browser became an unofficial standard.
FTP Short for File Transfer Protocol, the protocol for exchanging files over the Internet.protocolfilesInternet works in the same way as HTTP for transferring.
The Module Road Map Assignment 1 Road Map We will look at… Internet / World Wide Web Aspects of their operation The role of clients and servers ASPX.
Video Chat – getting ready Need a broadband connection. Need speakers & web cam or headset and webcam. Download software or browser plug-in. Sign up for.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
 There are device known as Server  Web Server / HTTP Server  Each computer has unique number known as IP Address  Domain Name.
Remote Access Usages. Remote Desktop Remote desktop technology makes it possible to view another computer's desktop on your computer. This means you can.
Overview of Servlets and JSP
JavaScript and Ajax (Internet Background) Week 1 Web site:
 AJAX technology  Rich User Experience  Characteristics  Real live examples  JavaScript and AJAX  Web application workflow model – synchronous vs.
MIS Week 5 Site:
Software Security. Bugs Most software has bugs Some bugs cause security vulnerabilities Incorrect processing of security related data Incorrect processing.
Mac OS X backdoor Trojan, now in beta? 報告人:劉旭哲. Introduction It targets users of Mac OS X As even the malware itself admits, it is not yet finished. It.
Protecting Memory What is there to protect in memory?
Data Virtualization Tutorial… CORS and CIS
Lecture: Protocols in Detail
Dynamic Web Pages (Flash, JavaScript)
Exploring DOM-Based Cross Site Attacks
Protecting Browsers from Extension Vulnerabilities
Presentation transcript:

URI Use and Abuse P\/\/N1ch1\/\/4

Contributing Authors Nathan McFeters – Senior Security Analyst – Ernst & Young Advanced Security Center, Chicago Billy Kim Rios – Senior Researcher – Microsoft, Seattle Rob Carter – Security Analyst – Ernst & Young Advanced Security Center, Houston

URIs – An Overview Generic – ftp://, telnet://, etc. What else is registered? –aim://, firefoxurl://, picasa://, itms://, etc.

URIs – Interaction With Browsers Developers create URI hooks in the registry for their applications Once registered they can be accessed and interacted with through the browser XSS can play too!

URI Discovery – Where and What? RFC 4395 defines an IANA-maintained registry of URI Schemes W3C maintains *retired* schemes AHA! The registry! Enter DUH!

DUH Tool – Sample Output

Attacking URIs – Attack Scope URIs link to applications Applications are vulnerable to code flaws and functionality abuse URIs can be accessed by XSS exposures

Stack Overflow in Trillians aim.dll Through the aim:// URI The aim:// URI is associated with the command Rundll32.exe C:\Program Files\Trillian\plugins\aim.dll, aim_util_urlHandler url=%1 ini="c:\program files\trillian\users \default\cache\pending_aim.ini.

Stack Overflow in Trillians aim.dll Through the aim:// URI Attacker controls the value that is put into aim_util_urlHandler through the URI, such as aim://MyURL. Value is copied without bounds checking leading to a stack overflow

Stack Overflow in Trillians aim.dll Through the aim:// URI Example: aim:///# / AAAABBBB

Stack Overflow Caught By OllyDbg

Control of Pointer to Next SEH Record and SE Handler

Command Injection in Call to Trillians aim.dll Through XSS The command associated with aim:// takes two arguments, URL (which we control) and ini, which is set by default to C:\Program Files\Trillian\users \default\cache \pending_aim.ini.

Command Injection in Call to Trillians aim.dll Through XSS Attacker can inject a to close off the uri command line argument and can then inject a new ini parameter. The ini parameter is used to specify a file location to write startup data to. We can control some of that startup data through the aim:// URI.

Command Injection in Call to Trillians aim.dll Through XSS

Cross Browser Scripting – IE pwns Firefox and Netscape Navigator Firefox and Netscape Navigator 9 register URIs to be compliant with Windows Vista. These URIs (firefoxurl and navigatorurl) are vulnerable to command injection when called from IE. Gecko based browsers accept the –chrome argument, and we can inject this to supply arbitrary JavaScript code that allows us to spawn a command prompt.

Cross Browser Scripting – IE pwns Firefox and Netscape Navigator

Command Injection in Firefox and All Gecko Based Browsers Gecko based browsers do not properly sanitize the values passed to several URIs and this can lead to a command injection thru XSS. FF < = vulnerable, everything else, STILL vulnerable at this time. Browser is tricked into associating the URL with a registered file handler as opposed to the URL handler for the URI.

Command Injection in Firefox and All Gecko Based Browsers The following URIs will cause a command injection: –mailto:%00%00../../../../../../windows/system32/cmd".exe../../../../../../../../windows/system32/calc.exe " - " blah.bat –nntp:%00%00../../../../../../windows/system32/cmd".exe../../../../../../../../windows/system32/calc.exe " - " blah.bat –news:%00%00../../../../../../windows/system32/cmd".exe../../.. /../../../../../windows/system32/calc.exe " - " blah.bat –snews:%00%00../../../../../../windows/system32/cmd".exe../../../../../../../../windows/system32/calc.exe " - " blah.bat –telnet:%00%00../../../../../../windows/system32/cmd".exe../../.. /../../../../../windows/system32/calc.exe " - " blah.bat

Command Injection in Firefox and All Gecko Based Browsers

Enter Firefox Not quite fixed yet… Anyone see PDPs Quicktime flaw which use our chrome javascript shell code? Everything fixed in , or is it?

Trust-based Applet Attack against Googles Picasa (T-bAG) picasa://importbutton?url= Yep, thats right it imports a remote XML description of a button If that button is loaded from OUR server and clicked we get to see all those naughty pictures of your girlfriend

The Plan – Ghetto Whiteboard Edition

The Plan – Ghetto Diagram Edition Victims Web Browser The Hacker YouTube, MySpace Attack Server Hacker Plants XSS Victim Gets Pwned Victim Loads Flash, DNS Rebind, Images Stolen

Trust-based Applet Attack against Googles Picasa (T-bAG) The button.xml file looks like so: Critical Update Available Click to Download Critical Update

Trust-based Applet Attack against Googles Picasa (T-bAG) When the button is clicked, Picasa starts up its own instance of Internet Explorer to open up whatever is at The real interesting thing is what Picasa SENDS:

Whats Sent by Picasa?!

Why Flash? We chose Flash to exploit our client-side attack vector for three reasons: –1. It is vulnerable to DNS Rebinding attacks. –2. If a valid crossdomain.xml file is present we can connect back to our attack server. –3. As of Actionscript 3.0 we now have access to a Socket class that can read and write raw binary data.

Trust-based Applet Attack against Googles Picasa (T-bAG)

Stupid IM Tricks I want to talk to your girlfriend as if Im you! –ymsgr:sendim?yourGirlFriend&m=I+think+we+sho uld+break+up…+sorry+but+its+you+not+me –aim:goim?screenname=yourGirlFriend&m=I+really +think+youd+be+happier+with+Nate –skype, Gadu-Gadu, Jabber, etc.

Yep, Theyre Stupid, but… Aside from stealing your girlfriend and causing a Denial of Service on you… What if you could XSS a lot of people from one page and then force their browsers to loop through sending as many of these messages as possible? DDoS on all chat providers anyone?

Whats Next? *Nix Anyone? Why oh why is no one talking about *Nix yet. Why? No registry… or is there? AHA! DUH4Linux.sh! #!/bin/bash gconftool-2 /desktop/gnome/url-handlers --all-dirs | cut --delimiter=/ -f 5 | while read line; do { gconftool-2 /desktop/gnome/url-handlers/$line -a | grep -i 'command' | cut --delimiter== -f 2 | while read line2; do { echo "$line $line2" } done

Output from DUH 4 Linux -bash-3.00$./DUH4Linux.sh mangnome-help "%s" cdda /usr/libexec/gnome-cdda-handler %s aim gaim-remote uri "%s" info gnome-help "%s" server-settings nautilus "%s" applications nautilus "%s" https firefox %s unknown mozilla "%s" ghelp gnome-help "%s" h323 gnomemeeting -c %s about firefox %s trash nautilus "%s" http firefox %s system-settings nautilus "%s" callto gnomemeeting -c %s mailto evolution %s

Conclusions and Questions Any questions?