Automatic Analysis of Browser-based Security Protocols



Similar documents
SECURITY THREAT IDENTIFICATION AND TESTING FOR SECURITY PROTOCOLS

Security and Privacy Concern for Single Sign-on Protocols

SSOScan: Automated Testing of Web Applications for Single Sign-On vulnerabilities

Addressing threats to real-world identity management systems

Improving Security and Privacy of Integrated Web Applications

Social Application Guide

Lecture Notes for Advanced Web Security 2015

OAuth 2.0 Developers Guide. Ping Identity, Inc th Street, Suite 100, Denver, CO

Discovering Concrete Attacks on Website Authorization by Formal Analysis

Copyright: WhosOnLocation Limited

SSOScan: Automated Testing of Web Applications for Single Sign-On Vulnerabilities. Yuchen Zhou and David Evans Presented by Yishan

JVA-122. Secure Java Web Development

Pentests more than just using the proper tools

Pentests more than just using the proper tools

A Standards-based Mobile Application IdM Architecture

OpenID Single Sign On and OAuth Data Access for Google Apps. Ryan Dave Primmer May 2010

MULTI-REPRESENTATIONAL SECURITY ANALYSIS

SAML AS AN SSO STANDARD FOR CUSTOMER IDENTITY MANAGEMENT. How to Create a Frictionless, Secure Customer Identity Management Strategy

OpenID Connect 1.0 for Enterprise

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

Evaluation of different Open Source Identity management Systems

(WAPT) Web Application Penetration Testing

The Essential OAuth Primer: Understanding OAuth for Securing Cloud APIs

PingFederate. Windows Live Cloud Identity Connector. User Guide. Version 1.0

An Authentication Flaw in Browser-based Single Sign-On Protocols: Impact and Remediations

Single Sign On. SSO & ID Management for Web and Mobile Applications

BASELINE SECURITY TEST PLAN FOR EDUCATIONAL WEB AND MOBILE APPLICATIONS

Web Application Security

Identity Federation Broker for Service Cloud

Introduction to SAML

Cloud-based Identity and Access Control for Diagnostic Imaging Systems

How To Use Saml 2.0 Single Sign On With Qualysguard

Automatic Recognition, Processing and Attacking of Single Sign-On Protocols with Burp Suite

Lecture 11 Web Application Security (part 1)

An SAML Based SSO Architecture for Secure Data Exchange between User and OSS

OpenLogin: PTA, SAML, and OAuth/OpenID

Deploying RSA ClearTrust with the FirePass controller

Dell One Identity Cloud Access Manager How to Develop OpenID Connect Apps

Using SAML for Single Sign-On in the SOA Software Platform

Strategic Information Security. Attacking and Defending Web Services

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

ASL IT SECURITY BEGINNERS WEB HACKING AND EXPLOITATION

Final Project Report December 9, Cloud-based Authentication with Native Client Server Applications. Nils Dussart

Axway API Gateway. Version 7.4.1

Enhancing Web Application Security

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

Cyber Security Challenge Australia 2014

INTRUSION PROTECTION AGAINST SQL INJECTION ATTACKS USING REVERSE PROXY

The Security Development Life Cycle

Configuring Single Sign-on from the VMware Identity Manager Service to ServiceNow

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Conducting Web Application Pentests. From Scoping to Report For Education Purposes Only

Information Security Group Active-client based identity management

Computer Systems Security 2013/2014. Single Sign-On. Bruno Maia Pedro Borges

RTC-Web Security Considerations

Research on the Security of OAuth-Based Single Sign-On Service

IBM WebSphere Application Server

HP WebInspect Tutorial

Model-Based Vulnerability Testing for Web Applications

HOL9449 Access Management: Secure web, mobile and cloud access

PRACTICAL IDENTITY AND ACCESS MANAGEMENT FOR CLOUD - A PRIMER ON THREE COMMON ADOPTION PATTERNS FOR CLOUD SECURITY

The increasing popularity of mobile devices is rapidly changing how and where we

Automatic Recognition, Processing and Attacking of Single Sign-On Protocols with Burp Suite

SECURITY AND REGULATORY COMPLIANCE OVERVIEW

Application Impersonation: Problems of OAuth and API Design in Online Social Networks

The Top 5 Federated Single Sign-On Scenarios

Step-by-Step guide for SSO from MS Sharepoint 2010 to SAP EP 7.0x

Login with Amazon. Developer Guide for Websites

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

Building a Mobile App Security Risk Management Program. Copyright 2012, Security Risk Advisors, Inc. All Rights Reserved

Onegini Token server / Web API Platform

Adding Stronger Authentication to your Portal and Cloud Apps

Security Certification of Third- Parties Applications

VIDEO intypedia007en LESSON 7: WEB APPLICATION SECURITY - INTRODUCTION TO SQL INJECTION TECHNIQUES. AUTHOR: Chema Alonso

INTEGRATE SALESFORCE.COM SINGLE SIGN-ON WITH THIRD-PARTY SINGLE SIGN-ON USING SENTRY A GUIDE TO SUCCESSFUL USE CASE

Automatic vs. Manual Code Analysis

Building Secure Applications. James Tedrick

How to Implement Enterprise SAML SSO

Transcription:

Automatic Analysis of Browser-based Security Protocols Avinash Sudhodanan Alessandro Armando (FBK, coordinator) Roberto Carbone (FBK, tutor) Luca Compagna (SAP, tutor) FP7-PEOPLE-2012-ITN

Outline Context Problem Overview State of the art Proposed Approach Conclusion and Future Work

Web Authentication Schemes & Single Sign-On Web Authentication Single Sign-On (SSO) Login with PayPal Sign in with LinkedIn Facebook Login 250+ Million users, 2,000,000 websites OpenID One billion users, 50,000 websites

Integration of third-party Web services

Analysis of Security Protocols Current protocol analysis technique: Verification of design-level protocol specification But.. security relies on the IMPLEMENTATION

Secure Implementation Provide secure implementation guidelines Sign in with LinkedIn Facebook Login

Web Security: Current solutions Follow secure implementation guidelines Use penetration testing tools (ZAP, Burp, VERA ) Mainly focus on injections vulnerabilities, e.g., XSS, SQLi, Attack patterns highly dependent on application Logic vulnerabilities out of the scope Rely on security knowledge of developer/pen-tester

SAML-based SSO for Google Apps Alice Client Alice, Google, URI Google Service Provider FBK Identity Provider FBK, AuthReq(ID, Google), URI FBK, AuthReq(ID, Google), URI Login and consent Google, URI, {AA}K -1 FBK Builds and authenticated assertion AA=AuthAssert(Alice, FBK) Google, URI, {AA}K -1 FBK Resource

Attack: SAML-based SSO for Google Apps Alice Client Malice Service Provider FBK Identity Provider Google Calendar Service Provider Alice, Malice, URI FBK, AuthReq(ID, M alice), URI FBK, AuthReq(ID, Malice), URI Login and consent Malice, URI, {AA}K -1 FBK Builds and authenticated assertion AA=AuthAssert(FBK, Malice) Malice, URI, {AA}K -1 FBK Resource Google, calendaruri, {AA}K -1 FBK Alice s Calendar

State of the art BRM analyzer [8], WebSpi[2], AuthScan[3], SPaCIoS(SATMC SAT-based model checker)[6], VERA (SPaCIoS module)[15], WEMM (Giancarlo Pellegrino, Davide Balzarotti) [5] Good: Evaluates protocol against 3 attacker scenarios and classifies parameters in the communication. Helpful for expert pen-tester Bad: Identifying attack depends on pen-tester s skill Good: Library of ProVerif for modelling Web specific protocols, use power of model checking to discover vulnerabilities Bad: Requires programs to be written in a subset of PHP and Javascript for automatic model extraction Good: Possibility to automatically extract protocol model and test the attack trace discovered by model checker Bad: Difficult to verify the correctness of the model, False positives Good: Nice starting point: combine testing/model checking Bad: Inability to extract the model from the specification Good: Separates attack from attack payloads Bad: Need to manually model the attack sequence Good: Automatically generating test cases for a wide range of modern applications Bad: No provision for adding new attack patterns

Proposed Approach Automatically extracting the protocol model from the implementation Extending state of the art techniques Applying attack patterns on the extracted protocol model Attack patterns that are applicable for wide range of security protocols Possibility to add New attack patterns New attack scenarios Automatic testing of the implementation

Model Inference: Syntactic Labeling Syntactic Label Example Value LIST [8] scop=(a,b,c) URL [8] uri= http://login.google.com BLOB [8] access_token=e72e16c7e42f292c6912e77 WORD [8] type=code UNKNOWN [5] #a EMAIL [5] user_email= example@example.com EMPTY acope= NUMBER id=25 BOOL member=true

Model Inference: Semantic Label Label User 1, Application 1 User 1, Application 2 User 2, Application 1 UU (user-unique) [8] A A B B SU(session-unique) [8] A B C D App Unique (AU) A B A B User 2, Application 2 Label SEC (secret) [8] SIG (signature) [8] BG (browser-generated) [8] REDURI(redirection url) Description Parameter is necessary for the authentication Signature Element present in a request but not included in preceding responses URL which was passed as a request parameter and later found in the Location header of a redirection response

User: Test, Application: GoogleApp Test Client REDURI Test, Google, appuri Google Service Provider FBK Identity Provider FBK, AuthReq(ID, Google), appuri FBK, AuthReq(ID, Google), appuri SEC SEC SIG, SEC Google, appuri, {AA}K -1 FBK Login and consent SIG Google, appuri, {AA}K -1 FBK Resource Builds and authenticated assertion AA=AuthAssert(Test, FBK)

User: Alice, Application: TestApp Alice Client REDURI Alice, TestApp, URI Bob Service Provider FBK Identity Provider FBK, AuthReq(ID, TestApp), URI FBK, AuthReq(ID, TestApp), URI SEC SEC SIG, SEC Bob, URI, {AA}K -1 FBK Login and consent SIG Bob, URI, {AA}K -1 FBK Resource Builds and authenticated assertion AA=AuthAssert(Alice, FBK)

Attack Pattern: User-Test, Application-GoogleApp Test Client REDURI Test, Google, appuri Idp url sign 0 0 1 0 1 0 0 1 1 Google Service Provider FBK Identity Provider FBK, AuthReq(ID, Google), appuri FBK, AuthReq(ID, Google), appuri SEC SEC SIG, SEC Google, appuri, {AA}K -1 FBK Login and consent SIG Google, appuri, {AA}K -1 FBK Resource Builds and authenticated assertion AA=AuthAssert(Test, FBK) Replace the value with that of Alice in TestApp

Attack Pattern: Replay attack Goal: Replay session parameters in order to gain unauthorized access to at least one User Unique element in U1C1 Preconditions: There is at least one element with semantic type as SEC in U2C1 Actions: AND 1. Initialize test with baseurl of U2C1 & useractions of U2C1 2. Set variable sec_list as all elements in U2C1 that has semantic type as SEC 3. Start executing test AND 3.1. For each combination of elements in sec_list, replace their value in the Requests of test with corresponding value in U1C2 Post conditions: There are elements of U1C1 with semantic type as User Unique & origin as responsebody in trace of test

Conclusions Existing testing methods are insufficient for automatically testing security protocols We discovered a number of security issues in the implementation of widely used SSO protocols (LinkedIn, Yahoo) We propose a system that can automatically generate test cases for evaluating the security of protocol implementations Current status: Identifying design patterns for representing protocol, attacks and threat model 25/25

Future Work Refine the proposed approach and provide a prototype of the tool Testing security protocol implementations Integrate with a legacy penetration testing tool Application of model checking for improving the effectiveness of the vulnerability detection technique 25/25

References 1/3 [1] Devdatta Akhawe, Adam Barth, Peifung E. Lam, John Mitchell, Dawn Song, Towards a Formal Foundation of Web Security, Proceedings of the 2010 23rd IEEE Computer Security Foundations Symposium, p.290-304, July 17-19, 2010 [2] Bai, G., Meng, G., Lei, J., Venkatraman, S. S., Saxena, P., Sun, J., et al. (2013). AuthScan: Automatic extraction of Web authentication protocols from implementations. In Proceedings of the 20th annual network and distributed system security symposium. [3] Chetan Bansal, Karthikeyan Bhargavan, Sergio Maffeis, Discovering Concrete Attacks on Website Authorization by Formal Analysis, Proceedings of the 2012 IEEE 25th Computer Security Foundations Symposium, p.247-262, June 25-27, 2012. [4] Rui Wang, Yuchen Zhou, Shuo Chen, Shaz Qadeer, David Evans, and Yuri Gurevich (2013, August). Explicating SDKs: Uncovering Assumptions Underlying Secure Authentication and Authorization. In Proceedings of the 22th conference on Security symposium

References 2/3 [5] Giancarlo Pellegrino and Davide Balzarotti. Toward Black- Box Detection of Logic Flaws in Web Applications. Network and Distributed System Security (NDSS) Symposium, 2014 [6] http://www.spacios.eu/ [7] http://prosecco.gforge.inria.fr/personal/bblanche/proverif/ [8] Rui Wang, Shuo Chen, XiaoFeng Wang, Signing Me onto Your Accounts through Facebook and Google: A Traffic-Guided Security Study of Commercially Deployed Single- Sign-On Web Services, Proceedings of the 2012 IEEE Symposium on Security and Privacy, p.365-379, May 20-25, 2012. [9] Rui Wang, Shuo Chen, XiaoFeng Wang, Shaz Qadeer, How to Shop for Free Online -- Security Analysis of Cashier-as-a-Service Based Web Stores, Proceedings of the 2011 IEEE Symposium on Security and Privacy, p.465-480, May 22-25, 2011. [10] G. Lowe. A Hierarchy of Authentication Specifications. In CSFW, pages 31 43, 1997.

References 3/3 [11] T. Y. C. Woo and S. S. Lam. A Semantic Model for Authentication Protocols. In S&P, pages 178 194, 1993. [12] A. Armando, R. Carbone, and L. Compagna, Ltl model checking for security protocols, in Computer Security Foundations Symposium, 2007. CSF 07. 20th IEEE, July 2007, pp. 385 396. [13] Zhou, Yuchen, and David Evans. "SSOScan: Automated Testing of Web Applications for Single Sign-On Vulnerabilities." http://www.ssoscan.org/ [14] https://www.owasp.org/index.php/owasp_zed_attack_proxy_project [15] VERA: A Flexible Model-Based Vulnerability Testing Tool [16] https://github.com/mozilla/zest/wiki

Thank You sudhodanan@fbk.eu

Architecture Diagram Web Application SSO Login Sign in with LinkedIn Browser Selenium Plugin User Actions User 1 Actions User 2 Actions Selenium sessions www.globalsources.com Input collector Browser Protocol Model Model Inference User 1 Session 1 User 1 Session 2 Syntactic & Semantic Classification User 2 Session 1 ZAP Proxy API Extended Zest Scripts Input Traces User i, Session j ZAP Session

Architecture Diagram cont. Web Application SSO Login Sign in with LinkedIn www.globalsources.com OAuth attacks Attack Patterns Online shop Attacks Protocol Model User 1 Session 1 User 1 Session 2 User 2 Session 1 Get pattern Extended Zest Scripts Is Applicable? Yes No Test Case Generation Oracle Is T estable? No Yes High Priority Low Priority