Web Login, Cookies 2015. 01. 26.. Web Login | Old way HTML

Slides:



Advertisements
Similar presentations
© 2009 IBM Corporation IBM Rational Application Security The Bank Job Utilizing XSS Vulnerabilities Adi Sharabani IBM Rational Application Security Research.
Advertisements

Key distribution and certification In the case of public key encryption model the authenticity of the public key of each partner in the communication must.
ForceHTTPS: Protecting High-Security Web Sites from Network Attacks Collin Jackson and Adam Barth.
Socket Layer Security. In this Presentation: need for web security SSL/TLS transport layer security protocols HTTPS secure shell (SSH)
Topic 8: Secure communication in mobile devices. Choice of secure communication protocols, leveraging SSL for remote authentication and using HTTPS for.
Session Hijacking Why web security depends on communications security and how TLS everywhere is the only solution. Scott Helme - 6th Aug scotthel.me.
More on SSL/TLS. Internet security: TLS TLS is one of the more prominent internet security protocols. TLS is one of the more prominent internet security.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Copyright © Clifford Neuman - UNIVERSITY OF SOUTHERN CALIFORNIA - INFORMATION SCIENCES INSTITUTE CSci530: Computer Security Systems Authentication.
Designing Security In Web Applications Andrew Tomkowiak 10/8/2013 UW-Platteville Software Engineering Department
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
Web-based Document Management System By Group 3 Xinyi Dong Matthew Downs Joshua Ferguson Sriram Gopinath Sayan Kole.
 A cookie is a piece of text that a Web server can store on a user's hard disk.  Cookie data is simply name-value pairs stored on your hard disk by.
OWASP Mobile Top 10 Why They Matter and What We Can Do
CRYPTOGRAPHY PROGRAMMING ON ANDROID Jinsheng Xu Associate Professor North Carolina A&T State University.
Cookies Cross site scripting
Cross-Site Scripting Vulnerabilities Adam Doupé 11/24/2014.
Origins, Cookies and Security – Oh My! John Kemp, Nokia Mobile Solutions.
CSCI 6962: Server-side Design and Programming Secure Web Programming.
Lecture 14 – Web Security SFDV3011 – Advanced Web Development 1.
Chapter 9 Web Applications. Web Applications are public and available to the entire world. Easy access to the application means also easy access for malicious.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Feedback #2 (under assignments) Lecture Code:
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. 1 RubyJax Brent Morris/
SEC835 Runtime authentication Secure session management Secure use of cryptomaterials.
Ram Santhanam Application Level Attacks - Session Hijacking & Defences
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
1 Robust Defenses for Cross-Site Request Forgery Adam Barth, Collin Jackson, John C. Mitchell Stanford University 15th ACM CCS.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
THE DEVIL IS IN THE (IMPLEMENTATION) DETAILS: AN EMPIRICAL ANALYSIS OF OAUTH SSO SYSTEMS SAN-TSAI SUN & KONSTANTIN BEZNOSOV PRESENTED BY: NAZISH KHAN COMPSCI.
Chapter 16 The World Wide Web. FIGURE 16.0.F01: A very, very simple Web page. Courtesy of Dr. Richard Smith.
COEN 350: Network Security Authentication. Between human and machine Between machine and machine.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation.
PHP Secure Communications Web Technologies Computing Science Thompson Rivers University.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
OWASP Building Secure Web Applications And the OWASP top 10 vulnerabilities.
Securing Angular Apps Brian Noyes
1 State and Session Management HTTP is a stateless protocol – it has no memory of prior connections and cannot distinguish one request from another. The.
© Copyright 2009 SSLPost 01. © Copyright 2009 SSLPost 02 a recipient is sent an encrypted that contains data specific to that recipient the data.
CSRF Attacks Daniel Chen 11/18/15. What is CSRF?  Cross Site Request Forgery (Sea-Surf)  AKA XSRF/ One Click / Sidejacking / Session Riding  Exploits.
Session Management Tyler Moore CS7403 University of Tulsa Slides adapted in part or whole from Dan Boneh, Stanford CS155 1.
Dos and Don’ts of Client Authentication on the Web Kevin Fu, Emil Sit, Kendra Smith, Nick Feamster Presented: Jesus F. Morales.
Intro to Web Application Security. iHostCodex Web Services - CEO Project-AG – CoFounder OWASP Panay -Chapter Leader -Web Application Pentester -Ethical.
ASP.NET 2.0 Security Alex Mackman CM Group Ltd
PHP: Further Skills 02 By Trevor Adams. Topics covered Persistence What is it? Why do we need it? Basic Persistence Hidden form fields Query strings Cookies.
Carrie Estes Collin Donaldson.  Zero day attacks  “zero day”  Web application attacks  Signing up for a class  Hardening the web server  Enhancing.
UKUUG Linux 2008 Introduction to Web Application Security Flaws Jake Edge LWN.net URL for slides:
COMP9321 Web Application Engineering Semester 2, 2017
An Introduction to Web Application Security
Intro to Web Application Security
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
World Wide Web policy.
API Security Auditing Be Aware,Be Safe
Ofer Shezaf, CTO, Breach Security
Cookies Cross site scripting
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
BY: SHIVI AGRAWAL ( ) CSE-(6)C
SSH: SECURE LOGIN CONNECTIONS OVER THE INTERNET
CSC 495/583 Topics of Software Security Intro to Web Security
Web Security Advanced Network Security Peter Reiher August, 2014
Cross Site Request Forgery New Attacks and Defenses
Unit 32 Every class minute counts! 2 assignments 3 tasks/assignment
Cross Site Request Forgery (CSRF)
Presentation transcript:

Web Login, Cookies

Web Login | Old way HTML

What’s Wrong User ID and password is transferred in plaintext – Anybody can learn your password Adversary can directly send HTTP requet with password in URL – Easy target for brute force attack Very common in 90s to early 2000s

Simple Fixes Secure Hash – Send hash of the password instead of plaintext – But… HTTPS – Associate SSL/TLS session before login Most of the web site performs this – But…

TLS One-Way Authentication TLS requires digital signature for authentication To sign, signing certificate is required – Issuing user certificates is expensive Current TLS(HTTPS) authentication – Only server signs, client does not  Client authenticates server, but server does not Threat – Nasty proxy server can re-encrypt, re-sign all the packets Most of the hotels and IT kiosks does this thing And many big companies too

Simple Attack | SQL Injection txtUserId = getRequestString("UserId"); txtSQL = "SELECT * FROM Users WHERE UserId = " + txtUserId;

SQL Injection

SQL Injection Protection Simple solution: Blacklist – Attacker can eventually circumvent Input Sanitization – Modern database engine supports input sanitization feature marker in JavaScript i.e) %Q format string in SQLite

How CSRF Works bank.com Web App Web App Browser Bug!Bug! evil.org Web App Web App LoginLogin 1000$1000$ RequestRequest GET / HTTP/1.1 Host: GET / HTTP/1.1 Host: ResponseResponse HTTP/ OK <img src=“ ?to=hacker&amount=1000$“/>... HTTP/ OK <img src=“ ?to=hacker&amount=1000$“/>... CSRF-AttackCSRF-Attack GET/transfer?to=hacker &amount=1000$ HTTP/1.1 Host: bank.com GET/transfer?to=hacker &amount=1000$ HTTP/1.1 Host: bank.com

Protection From CSRF Add a small token for each request – Should not be automatic – Should be cryptographically strong – Should not be exposed easily CSRF with XSS will be very powerful

XSS Flow Example Server Browser DatabaseDatabase Web Application Bug!Bug! WebsiteWebsite Server Response HTMLHTML URLURL Initial Request URLURL Subsequent Victim Request

XSS Pattern Simple Patterns – javascript:alert('XSS'); – Masked / Evasive Patterns – – alert("XSS") "> – Whitelisting of the input is required – There are sanitizer tools (i.e) OWASP HTML JAVA sanitizer

HTTP Session Management HTTP is “stateless” protocol – Cannot keep information over a series of accesses Server should maintain “session” somehow Simple old solution – Use hidden form in HTML Web server assigns random value on this form User does not see the value BUT…

HTTP Cookie A special value created by server and sent to client Client stores the value and attach it on later access to the same domain

HTTP Cookie | scope Expiry information – (YYYY/MM/DD/, HH/MM/SS) – Usually 20 minutes Path Information – Available path in the domain (i.e /customer/php/) Domain Information – i.e) comp427.edu Etc.

What’s Wrong This Time It’s still plaintext – Attacker can easily impersonate / hijack – HTTPS can protect this (but not perfectly)

Firesheep (2010) A Firefox extension by Eric Butler – Eavesdrop network traffic – Extract unencrypted cookie – Show up hijacked user credential – Attacker can access the site

Solutions Bearer token – Server creates random token to client, other than cookie – Risky when attacker learns the token design Existing solutions – i.e.) Kerberos: Old, but secure authentication protocol Proprietary solutions – Powered by HTML5, many major web sites provides their own solutions

Kerberos (v5, 1993) Authentication protocol – Part of MIT Project (Athena) Secure Session Management – User needs to enter password only 1 time Widely used by many systems Does not require public key cryptography and hash functions – Based on 80’s technology

Kerberos Protocol

Password Management Users manage ID and password for each web site – Mostly same (easy) password and never change Each web site’s password policy is different – Infeasible to remember all the passwords if a user manages them differently – Password recovery questions are very stupid i.e) “Name of the city you born” for Monaco citizen Password management application is required – Do you trust your password manager?

Trend Micro Password Manager Google found vulnerability in Trend Micro Password Manager ( ) – Password manager itself is a privileged start up service – It is basically a web engine – Accepts JavaScript from the web sites!!! x = new XMLHttpRequest() x.open("GET", " indows/system32/calc.exe true); try { x.send(); } catch (e) {};

OpenID Decentralized single sign on(SSO) mechanism – User ID is a URI i.e) Any URI is possible – Web server asks the URI for authenticity User information does not goes to web sites There are extension APIs to transfer user information – Under user consent Open standard – 100+ Standard APIs – Nobody owns the mechanism – You can create your own OpenAPI server

OpenID Architecture

OAuth Simple open standard for secure authentication – Log in part of website i.e) photos, mails, bookmarks, locations, … – Token based authentication Does not send ID and password to the web site – Open source, open API

OAuth Protocol Flow Client Resource Owner Authorization Server Resource Server Authorization Request Authorization Grant Access Token Protected Resource

Problems NASCAR Problem – User is overwhelmed by so many choices Usability – URI is not good to remember by human

2(n) Factor Authentication 3 different types of the password – Something you have – Something you know – Something you are 2 factor authentication is combining 2 types of password for authentication – Password + SMS token – Password + HW token – Password + finger print – …

Question?