SESSION IDENTIFIER ARE FOR NOW, PASSWORDS ARE FOREVER

Similar documents
A Tale of the Weaknesses of Current Client-Side XSS Filtering

A Tale of the Weaknesses of Current Client-side XSS Filtering

A Server and Browser-Transparent CSRF Defense for Web 2.0 Applications. Slides by Connor Schnaith

What is Web Security? Motivation

Relax Everybody: HTML5 Is Securer Than You Think

BASELINE SECURITY TEST PLAN FOR EDUCATIONAL WEB AND MOBILE APPLICATIONS

Web Application Security

Project 2: Web Security Pitfalls

The Top Web Application Attacks: Are you vulnerable?

Web application security

Next Generation Clickjacking

Criteria for web application security check. Version

Cross-Site Scripting

Single Sign-On for the Internet: A Security Story. Eugene Tsyrklevich eugene@tsyrklevich.name Vlad Tsyrklevich vlad902@gmail.com

Application Security Testing. Generic Test Strategy

Web Security Testing Cookbook*

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

Acunetix Web Vulnerability Scanner. Getting Started. By Acunetix Ltd.

Magento Security and Vulnerabilities. Roman Stepanov

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

APPLICATION SECURITY AND ITS IMPORTANCE

Protecting Web Applications and Users

Secure development and the SDLC. Presented By Jerry

(WAPT) Web Application Penetration Testing

Course Content: Session 1. Ethics & Hacking

Hack Proof Your Webapps

Web-Application Security

Last update: February 23, 2004

Finding and Preventing Cross- Site Request Forgery. Tom Gallagher Security Test Lead, Microsoft

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

elearning for Secure Application Development

EECS 398 Project 2: Classic Web Vulnerabilities

Chapter 1 Web Application (In)security 1

Check list for web developers

Web Application Security Considerations

How to break in. Tecniche avanzate di pen testing in ambito Web Application, Internal Network and Social Engineering

Øredev Web application testing using a proxy. Lucas Nelson, Symantec Inc.

Bug Report. Date: March 19, 2011 Reporter: Chris Jarabek

Web applications. Web security: web basics. HTTP requests. URLs. GET request. Myrto Arapinis School of Informatics University of Edinburgh

Secure Coding in Node.js

Recent Advances in Web Application Security

25 Million Flows Later Large- scale Detec6on of DOM- based XSS. Published at ACM CCS 2013 Sebas5an Lekies, Ben Stock, Mar6n Johns

WHITE PAPER. FortiWeb and the OWASP Top 10 Mitigating the most dangerous application security threats

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Security Research Advisory SugarCRM Cross-Site Scripting Vulnerability

Bypassing Internet Explorer s XSS Filter

Password Managers: Attacks and Defenses

Creating Stronger, Safer, Web Facing Code. JPL IT Security Mary Rivera June 17, 2011

Bank Hacking Live! Ofer Maor CTO, Hacktics Ltd. ATC-4, 12 Jun 2006, 4:30PM

Acunetix Website Audit. 5 November, Developer Report. Generated by Acunetix WVS Reporter (v8.0 Build )

MANAGED SECURITY TESTING

Ethical Hacking as a Professional Penetration Testing Technique

SAP: Session (Fixation) Attacks and Protections

State of The Art: Automated Black Box Web Application Vulnerability Testing. Jason Bau, Elie Bursztein, Divij Gupta, John Mitchell

ASL IT Security Advanced Web Exploitation Kung Fu V2.0

Intrusion detection for web applications

HTML5. Eoin Keary CTO BCC Risk Advisory.

Carlos Muñoz Application Security Engineer WhiteHat

WebCruiser User Guide

Universal XSS via IE8s XSS Filters

Gateway Apps - Security Summary SECURITY SUMMARY

Security Test s i t ng Eileen Donlon CMSC 737 Spring 2008

Where every interaction matters.

Ethical Hacking Penetrating Web 2.0 Security

CSE598i - Web 2.0 Security OWASP Top 10: The Ten Most Critical Web Application Security Vulnerabilities

Attacks on Clients: Dynamic Content & XSS

Is Drupal secure? A high-level perspective on web vulnerabilities, Drupal s solutions, and how to maintain site security

Advanced Web Technology 10) XSS, CSRF and SQL Injection 2

Protection, Usability and Improvements in Reflected XSS Filters

External Network & Web Application Assessment. For The XXX Group LLC October 2012

Penetration Test Report

Web Application Security. Vulnerabilities, Weakness and Countermeasures. Massimo Cotelli CISSP. Secure

Web Application Penetration Testing

WebCruiser Web Vulnerability Scanner User Guide

The Devil is Phishing: Rethinking Web Single Sign On Systems Security. Chuan Yue USENIX Workshop on Large Scale Exploits

Security starts in the head(er)

Security Testing with Selenium

Security Research Advisory IBM inotes 9 Active Content Filtering Bypass

Client logo placeholder XXX REPORT. Page 1 of 37

Preparing for the Cross Site Request Forgery Defense

Recon and Mapping Tools and Exploitation Tools in SamuraiWTF Report section Nick Robbins

Cross-site site Scripting Attacks on Android WebView

HOD of Dept. of CSE & IT. Asst. Prof., Dept. Of CSE AIET, Lko, India. AIET, Lko, India

WebCruiser Web Vulnerability Scanner User Guide

Web Application Hacking (Penetration Testing) 5-day Hands-On Course

Web Application Worms & Browser Insecurity

Lecture 11 Web Application Security (part 1)

Revisiting SQL Injection Will we ever get it right? Michael Sutton, Security Evangelist

Penetration Testing with Kali Linux

MIGRATIONWIZ SECURITY OVERVIEW

Application Layer Encryption: Protecting against Application Logic and Session Theft Attacks. Whitepaper

WEB ATTACKS AND COUNTERMEASURES

Sidste chance for Early Bird! Tilmeld dig før d. 30. juni og spar DKK. Læs mere og tilmeld dig på

Web Application Attacks And WAF Evasion

Complete Cross-site Scripting Walkthrough

Using Foundstone CookieDigger to Analyze Web Session Management

MetaXSSploit. Bringing XSS in Pentesting A journey in building a security tool. Claudio

Annex B - Content Management System (CMS) Qualifying Procedure

What about MongoDB? can req.body.input 0; var date = new Date(); do {curdate = new Date();} while(curdate-date<10000)

Login with Amazon. Developer Guide for Websites

Transcription:

SESSION IDENTIFIER ARE FOR NOW, PASSWORDS ARE FOREVER XSS-BASED ABUSE OF BROWSER PASSWORD MANAGERS Ben Stock, Martin Johns, Sebastian Lekies

Browser choices Full disclosure: Ben was an intern with Microsoft until 7 days ago J

About us Ben Stock, Martin Johns, Sebastian Lekies, Security Researchers at Uni Erlangen, SAP and Uni Bochum More and stuff at http://kittenpics.org About this talk Results of an analysis of different browser's password managers Study on password fields on the Web After all the scary parts: a potential solution to the problem

Cross-Site Scripting a.k.a. XSS (duh)

The Same-Origin Policy Question: why can t attacker.org read the visitors emails from GMail? Answer: the Same-Origin Policy is in the way Only resources with matching protocol, domain and port may gain access That makes for a sad attacker (and his kitten)

XSS the underlying problem Web Apps process data Which was provided by the user POST, GET, headers,. Data might be stored, or echoed back directly Data <script>alert(1)</script> is actually Code interpreted by the victim s browser, executed in the origin of vulnerable application Attack method Find flaw in Web application that allows injection of CODE, not just DATA Make victim visit that site è We can read your GMails J

XSS what an attacker can do Open an alert box! Hijack a session Oldest trick in the book: steal their cookies Force victim to click a link (or post something about this talk on Twitter) Alter content Display fake content Spoof login forms.. Steal your password manager s passwords

Types of XSS Reflected Stored Server <?php! echo "Hello.$_GET['name'];!?>! <?php! $res = mysql_query( INSERT.$_GET['message']);! [ ]! $res = mysql_query( SELECT ");! $row = mysql_fetch_assoc($res);! echo $row['message'];!?>! Client <script>! var name = location.hash.slice(1));! document.write("hello " + name);! </script>! <script>! var html= location.hash.slice(1);! localstorage.setitem( message, html);! [ ]! var message = localstorage.getitem( message );! document.write(message);! </script>!

Isn't XSS so 2010? Our CCS paper from 2013 ~10% of all Web sites carry DOM-based XSS Our BlackHat US talk on bypassing the XSSAuditor 80% of all domains could still be exploited

Passwords & Password Managers

Passwords on the Web Still first (and most of the time, only) form of authentication In a (semi) perfect world, we would have one password per site sufficiently complex to avoid brute forcing reality... Source: https://xato.net/password/more-top-worst-passwords/

Solution: A Password Manager Takes burden of remembering passwords off the user shipped with every browser these days Two functionalities: 1.) Store credentials on first submission 2.) Insert credentials on subsequent visits 1 2 host=http://localhost, user=user1, pwd=secret Password Manager Our Extension 3 host=http://localhost, user=user1, pwd=nonce

Password Managers and XSS XSS JavaScript accesses form fills forms Password Manager

DEMO: Passwords inserted via password managers are accessible via JavaScript.

Security Considerations World without password managers: XSS attacks only work when the user is authenticated Attacks are limited to the user s session World with password manager: Passwords can be accessed, no matter whether the user is authenticated or not Attacks are limited to the life time of the password Potentially affects other services as well (password reuse) Ø Current password managers make XSS attacks more severe

Security mechanisms in Password Managers and how we can steal your credentials anyways J

Five key features of PW Managers URL Matching Form Matching User Interaction No auto filling in frames Autocomplete attribute

DEMO: URL and form matching

DEMO: User interaction required

HTML5 autocomplete The "off" keyword indicates either that the control's input data is particularly sensitive (for example the activation code for a nuclear weapon); or that it is a value that will never be reused (for example a one- time- key for a bank login) and the user will therefore have to explicitly enter the data each time, instead of being able to rely on the UA to prefill the value for him; or that the document provides its own autocomplete mechanism and does not want the user agent to provide autocompletion values.

DEMO: Adheres to autocomplete

Our notion vs. Google's notion Our notion if programmer puts autocomplete=off to any part of the login field, at the very least that part should not be stored better even, if nothing is stored for that form We opened a bug report while in clear violation of the spec, Google wants it that way

Trade-off: Usability vs. Security

The State of the Web its passwords, that is

What are login forms like out there? Gain better understanding how sites handle forms Using autocomplete=off to opt out of password managers X-Frame-Options (now deprecated) to ensure no framing We implemented a simple crawler Scans entry pages to domains for login fields indicative keywords ("login", "sign in",...) Wraps access to these fields to notice JavaScript access

Analysis of Web password fields Crawl of Alexa Top 4000 Characteristic # Sites % rel. % abs. Password field 2,143 100% 53,6% Form on HTTPS page 821 38,3% 20,5% Action to HTTPS page 1,197 55,9% 29,9% Autocomplete off 293 13,6% 7,3% JavaScript access 325 15,1% 8,1%

Similar attacker model Man-in-the-Middle attacks

Similar attacker model Work by Silver et al. (USENIX Sec '14) Provide free WiFi in cafés User loads Google, multiple hidden iframes with target login pages + injected XSS payload Password manager autofills, credentials can be stolen According to authors, quick to automate

Comparing the attacks XSS attacker Ø needs XSS vuln on target Ø works regardless of HTTPS Network attacker Ø does not work with HTTPS Ø Can eavesdrop on posted credentials Attacks against password managers can easily be automated

Bottom line Default password managers in browser are not that secure issues related to auto filling ignoring autocomplete missing form verification Can we come up with something better? For attacks against untrained users

On a positive note We have a solution...

Mismatch in notion/implementations Password Managers should aid in authentication Authentication: "Credentials are sent to the server" Implementation: "Credentials are inserted into forms and then sent to the server" We propose to align implementation with notion

Our proposed solution Pwd Mgr Username Password Username Password Pwd Mgr Username Nonce Username Nonce Pwd Mgr Username Password

Constraints for this approach Potential pitfalls Attacker changes a form's target posting data to his own server / a page that reflects the content Attacker changes method to GET.. and subsequently reads the URL to which a frame was redirected Proposed constraints strict checking of form target URL exchanging nonce only in POST parameters

PoC Implementation 1 2 host=http://localhost, user=user1, pwd=secret Password Manager Our Extension 3 host=http://localhost, user=user1, pwd=nonce

PoC Implementation POST /login.php Data: user=user1&pwd=nonce POST /search.php Data: user=user1&query=nonce Our Extension POST /login.php Data: user=user1&pwd=secret POST /search.php Data: user=user1&query=nonce

Functional evaluation 325 domains used JavaScript to access password fields 229 domains only check that field is not empty 96 domains send password via XHR 23 domains hash password before sending it out 1 domain applies base64 encoding 6 domains send password in GET parameters 30/2143 domains have issues with our solution 98,6% of all domains we analyzed work just fine storing passwords in XHRs is not currently supported by browsers

Conclusion

What to take away? Current generation of browser-based password managers is quite vulnerable even if people "hate" IE, in this instance it is quite secure Way too many credentials are posted over HTTP network attacker has an easy job At least, against an XSS attacker, we can do something harder against network attacker, though Possible solution: enforce https for requests carrying credentials

PLACE CATPIC FROM TWITTER HERE Thank you visit us at kittenpics.org Sebastian Lekies Ben Stock @sebastianlekies @kcotsneb