Introduction to Computer Security



Similar documents
1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

WEB ATTACKS AND COUNTERMEASURES

Web Application Security

Lecture 11 Web Application Security (part 1)

HTTP. Internet Engineering. Fall Bahador Bakhshi CE & IT Department, Amirkabir University of Technology

reference: HTTP: The Definitive Guide by David Gourley and Brian Totty (O Reilly, 2002)

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

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

What is Web Security? Motivation

Last update: February 23, 2004

HTTP Response Splitting

CONTENT of this CHAPTER

Internet Technologies. World Wide Web (WWW) Proxy Server Network Address Translator (NAT)

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

HTTP Protocol. Bartosz Walter

Check list for web developers

Web Application Worms & Browser Insecurity

Common Security Vulnerabilities in Online Payment Systems

Cross-Site Scripting

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

Web application security

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

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

Evolution of the WWW. Communication in the WWW. WWW, HTML, URL and HTTP. HTTP Abstract Message Format. The Client/Server model is used:

Recommended Practice Case Study: Cross-Site Scripting. February 2007

Detecting and Exploiting XSS with Xenotix XSS Exploit Framework

Sample Report. Security Test Plan. Prepared by Security Innovation

Web Application Security Considerations

April 11, (Revision 2)

3. Broken Account and Session Management. 4. Cross-Site Scripting (XSS) Flaws. Web browsers execute code sent from websites. Account Management

Cyber Security Workshop Ethical Web Hacking

HTTPParameter Pollution. ChrysostomosDaniel

CIS 551 / TCOM 401 Computer and Network Security. Spring 2007 Lecture 20

Web Application Security

EVALUATING COMMERCIAL WEB APPLICATION SECURITY. By Aaron Parke

IJMIE Volume 2, Issue 9 ISSN:

THE OPEN UNIVERSITY OF TANZANIA

Login with Amazon. Developer Guide for Websites

Web Security. Crypto (SSL) Client security Server security 2 / 40. Web Security. SSL Recent Changes in TLS. Protecting the Client.

Web-Application Security

Web Application Firewall

Penetration Testing with Kali Linux

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

Java Web Application Security

Enterprise Application Security Workshop Series

Web Application Firewall on SonicWALL SRA

OWASP and OWASP Top 10 (2007 Update) OWASP. The OWASP Foundation. Dave Wichers. The OWASP Foundation. OWASP Conferences Chair

How To Understand The History Of The Web (Web)

The purpose of this report is to educate our prospective clients about capabilities of Hackers Locked.

Application Security Testing. Generic Test Strategy

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture # Apache.

Web Application Firewall on SonicWALL SSL VPN

Protecting Your Organisation from Targeted Cyber Intrusion

The Dark Side of Ajax. Jacob West Fortify Software

External Vulnerability Assessment. -Technical Summary- ABC ORGANIZATION

MatriXay WEB Application Vulnerability Scanner V Overview. (DAS- WEBScan ) The best WEB application assessment tool

AJAX Storage: A Look at Flash Cookies and Internet Explorer Persistence

Web Application Security

Developing ASP.NET MVC 4 Web Applications MOC 20486

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

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

University of Wisconsin Platteville SE411. Senior Seminar. Web System Attacks. Maxwell Friederichs. April 18, 2013

Web Application Guidelines

Web Application Security

Chapter 27 Hypertext Transfer Protocol

Advanced Administration for Citrix NetScaler 9.0 Platinum Edition

Web and Security 1 / 40

1 Introduction: Network Applications

The Top Web Application Attacks: Are you vulnerable?

Criteria for web application security check. Version

Basic & Advanced Administration for Citrix NetScaler 9.2

Semantic based Web Application Firewall (SWAF V 1.6) Operations and User Manual. Document Version 1.0

Web Security Threat Report: January April Ryan C. Barnett WASC Member Project Lead: Distributed Open Proxy Honeypots

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

HP WebInspect Tutorial

Security features of ZK Framework

A Survey on Security and Vulnerabilities of Web Application

WEB SECURITY. Oriana Kondakciu Software Engineering 4C03 Project

Lab 7 - Exploitation 1. NCS 430 Penetration Testing Lab 7 Sunday, March 29, 2015 John Salamy

Protection, Usability and Improvements in Reflected XSS Filters

OCR LEVEL 3 CAMBRIDGE TECHNICAL

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

Application Code Development Standards

Project 2: Web Security Pitfalls

An Insight into Cookie Security

Ethical Hacking as a Professional Penetration Testing Technique

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

WEB APPLICATION SECURITY

Sichere Webanwendungen mit Java

E-commerce. Security. Learning objectives. Internet Security Issues: Overview. Managing Risk-1. Managing Risk-2. Computer Security Classifications

ArcGIS Server Security Threats & Best Practices David Cordes Michael Young

Software Assurance Tools: Web Application Security Scanner Functional Specification Version 1.0

Network Security Web Security

Transcription:

Introduction to Computer Security Web Application Security Pavel Laskov Wilhelm Schickard Institute for Computer Science

Modern threat landscape The majority of modern vulnerabilities are found in web applications. Source: MITRE CVE trends

Web application vulnerabilities in numbers 3,462/2,029 web/non-web application vulnerabilities were discovered by Symantec in 2008 Average exposure time: 60 days 12,885 site-specific XSS vulnerabilities were submitted to XSSed in 2008 Only 3% of site-specific vulnerabilities were fixed by the end of 2008

Web application: a user s view HTTP: a simple stateless protocol. Browser HTTP reply HTTP request Web server Client-side operations: open a TCP connection on port 80 send a request Server-side operations establish a TCP connection request process an HTTP request send an HTTP reply

Web application: technical infrastructure Browser HTTP reply Web server HTTP request Firewall HTTP proxy Cached reply Cache Additional requirements: Traffic filtering Load balancing Performance improvement

Web application: software instrumentation Extensions Applet, Javascript, ActiveX CGI, PHP, Ajax, Ruby on Rails Application gateway Application-specific request Browser HTTP reply Web server Application, e.g. database HTTP request Firewall HTTP proxy Cached reply Cache

Web application threats Client side Server side Implementation C/C++, Java Script languages Attack types buffer overflows drive-by downloads XSS, XSRF code injection SQL injection Attack outcome malware installation loss of private data defacement loss of private data loss of corporate secrets

HTTP protocol Simple protocol for transfer of hyperlinked content Request/response Stateless Clear-text

HTTP request structure Initial request line: Method (GET, POST, etc.) Resource specified by URI Protocol version Header lines: key/value pairs, e.g. Accept-language: <language> Body (arbitrary byte stream, separated by CR LF) Uploaded files Form data

HTTP methods GET retrieves a resource form parameters in URI safe, no side-effects POST sends data to a server form parameters in body potential side-effects GET /cgi-bin/birthday.pl? month=june&day=27 HTTP/1.0 POST /script.cgi HTTP/1.0 User-Agent: HTTPTool/1.0 Content-Type:... Content-Length: 32 <CR><LF> name=pavel&surname=laskov

Uniform resource identifier (URI) Syntax: <scheme>://<authority><path>?<query>#<fragment> Special characters can be hex-encoded %0A = newline %20 or + = space %2B = + Examples: ftp://ftp.ietf.org/rfc/rfc1808.txt http://ida.first.fhg.de/ laskov http%3a%2f%2f//ida%2efirst%2efhg%2ede%2f%7elaskov mailto:pavel.laskov@uni-tuebingen.de

HTTP response structure Initial response line protocol version status code status message Header lines (same as request) Body (arbitrary byte stream, separated by CR LF) requested resources in HTML

HTTP basic authentication Goal: allow a browser send login credentials Method concatenate user name and password separated by the colon encode using base64 send in clear text

HTTP digest authentication Server receives a (method:uri) request. Server denies access and returns a nonce as a challenge. Client asks a user for credentials Client calculates: H1 = MD5(username:realm:password) H2 = MD5(method:URI) Client sends msg = MD5(H1:nonce:H2) to a server Server knows password for the user and computes: H1 = MD5(username:realm:password) H2 = MD5(method:URI) Server compares MD5(H1:nonce:H2) with msg.

Session management and cookies Cookie is a set of name/value pairs stored in a browser Cookie usage: authentication state maintenance (e.g. shopping cart ) user preference tracking Cookie attributes: name value expiration date the path and domain the cookie is valid for

Persistent authentication using cookies

Cross-site scripting: an example

Main problem of XSS Any web application that returns user input without filtering is a potential XSS vulnerability! Allows execution of arbitrary Javascript in user s browser. Why would a user do this? Inadvertently click on an emailed link Click on an infected image Leave a mouse on an image infected with an onmouseover tag.

Basic XSS scenario

What is cross-site in XSS? Injection of Javascript in a browser is actually perfectly legal, but... Typically Javascript is allowed to only access resources from the same site that has injected it into a browser. In a XSS attack, Javascript does not originate from a web server but is dynamically injected into it via a user request following a reflection from a third-party, a cross-site.

Samy worm Inject Javascript into a user profile using document.body.innerhtml Get the list of user s heros by using a GET on a user profile Add Samy as a field by performing XML-HTTP on the addfriends page Any user who visits an infected user s page will gets profile infected with Javascript and his friends list infected with Samy Eventually about 1,000,000 MySpace profiles were infected. More technical details and hacks at: http://web.archive.org/web/20060208182348/namb.la/popular/tech.html

Cross-site request forging: an example Why does every online bank request you to sign off?

Cross-site request forging: an example Why does every online bank request you to sign off? User logs in to bank.com and does not sign off.

Cross-site request forging: an example Why does every online bank request you to sign off? User logs in to bank.com and does not sign off. Session cookie remains in browser stats.

Cross-site request forging: an example Why does every online bank request you to sign off? User logs in to bank.com and does not sign off. Session cookie remains in browser stats. User accidentally visits a malicious site with the following content: <form name=f action=http://bank.com/paybill.php> <input name=recipient value=badguy>...</form> <script> document.f.submit(); </script>

Cross-site request forging: an example Why does every online bank request you to sign off? User logs in to bank.com and does not sign off. Session cookie remains in browser stats. User accidentally visits a malicious site with the following content: <form name=f action=http://bank.com/paybill.php> <input name=recipient value=badguy>...</form> <script> document.f.submit(); </script> Browser sends user request including the existing authorization credentials.

XSRF: main scenario

Summary Security of web applications crucially depends on sanitisation of user input. The latter is easier said than done. Typical attacks, such as XSS and XSRF, can be highly automatic and result in serious compromised.