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

Similar documents
Web Security: SSL/TLS

ECE458 Winter Web Security. Slides from John Mitchell and Vitaly Shmatikov (Modified by Vijay Ganesh)

Method of control. Lots of ways to architect C&C: Star topology; hierarchical; peer-to-peer Encrypted/stealthy communication.

Web Application Firewalls. Our focus: web app code. Web app code. Secure Web Site Design. Common vulnerabilities (OWASP) Dan Boneh

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

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

Java Web Application Security

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

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

The Hyper-Text Transfer Protocol (HTTP)

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

Web Application Security Considerations

Introduction to Computer Security

What is Web Security? Motivation

Where every interaction matters.

Network Technologies

Web application security

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

Hack Yourself First. Troy troyhunt.com

The Web: some jargon. User agent for Web is called a browser: Web page: Most Web pages consist of: Server for Web is called Web server:

No. Time Source Destination Protocol Info HTTP GET /ethereal-labs/http-ethereal-file1.html HTTP/1.

CS640: Introduction to Computer Networks. Applications FTP: The File Transfer Protocol

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 Response Splitting

Out of the Fire - Adding Layers of Protection When Deploying Oracle EBS to the Internet

How to Build a Trusted Application. John Dickson, CISSP

Cyber Security Workshop Ethical Web Hacking

HTTP Protocol. Bartosz Walter

T14 SECURITY TESTING: ARE YOU A DEER IN THE HEADLIGHTS? Ryan English SPI Dynamics Inc BIO PRESENTATION. Thursday, May 18, :30PM

Web Engineering Web Application Security Issues

Web Application Report

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

1. When will an IP process drop a datagram? 2. When will an IP process fragment a datagram? 3. When will a TCP process drop a segment?

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

Browser Security Model

Detecting Web Application Vulnerabilities Using Open Source Means. OWASP 3rd Free / Libre / Open Source Software (FLOSS) Conference 27/5/2008

FINAL DoIT v.4 PAYMENT CARD INDUSTRY DATA SECURITY STANDARDS APPLICATION DEVELOPMENT AND MAINTENANCE PROCEDURES

Intrusion detection for web applications

Simon Fraser University. Web Security. Dr. Abhijit Sen CMPT 470

Project #2. CSE 123b Communications Software. HTTP Messages. HTTP Basics. HTTP Request. HTTP Request. Spring Four parts

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

Web Application Penetration Testing

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

Web Application Firewall on SonicWALL SSL VPN

(WAPT) Web Application Penetration Testing

Cross-Site Scripting

Secure Web Application Coding Team Introductory Meeting December 1, :00 2:00PM Bits & Pieces Room, Sansom West Room 306 Agenda

Barracuda Web Site Firewall Ensures PCI DSS Compliance

Playing with Web Application Firewalls

Web Application Attacks And WAF Evasion

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

Security-Assessment.com White Paper Leveraging XSRF with Apache Web Server Compatibility with older browser feature and Java Applet

Web Application Firewall on SonicWALL SRA

IJMIE Volume 2, Issue 9 ISSN:

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

Lecture 11 Web Application Security (part 1)

Application Security: What Does it Take to Build and Test a Trusted App? John Dickson, CISSP Denim Group

Application Security Best Practices. Wally LEE Principal Consultant

Top Ten Web Application Vulnerabilities in J2EE. Vincent Partington and Eelco Klaver Xebia

Sichere Webanwendungen mit Java

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

Web Application Security

Cross Site Scripting in Joomla Acajoom Component

Web Application Security

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

How To Understand The History Of The Web (Web)

Hypertext for Hyper Techs

Web Application Security

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

WEB SECURITY CONCERNS THAT WEB VULNERABILITY SCANNING CAN IDENTIFY

Stopping SQL Injection and. Manoranjan (Mano) Paul. Track: Operating Systems Security - Are we there yet?

Magento Security and Vulnerabilities. Roman Stepanov

Ethical Hacking as a Professional Penetration Testing Technique

The Web History (I) The Web History (II)

Chapter 1 Web Application (In)security 1

Secure Web Applications. The front line defense

THE PROXY SERVER 1 1 PURPOSE 3 2 USAGE EXAMPLES 4 3 STARTING THE PROXY SERVER 5 4 READING THE LOG 6

WHITE PAPER FORTIWEB WEB APPLICATION FIREWALL. Ensuring Compliance for PCI DSS 6.5 and 6.6

Criteria for web application security check. Version

Instructor: Betty O Neil

Outline Definition of Webserver HTTP Static is no fun Software SSL. Webserver. in a nutshell. Sebastian Hollizeck. June, the 4 th 2013

Chapter 27 Hypertext Transfer Protocol

Check list for web developers

Web Browser and the Internet

SANDCAT THE WEB APPLICATION SECURITY ASSESSMENT SUITE WHAT IS SANDCAT? MAIN COMPONENTS. Web Application Security

Common Security Vulnerabilities in Online Payment Systems

The Top Web Application Attacks: Are you vulnerable?

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

COMP 112 Assignment 1: HTTP Servers

Dawn Song

Top Ten Web Attacks. Saumil Shah Net-Square. BlackHat Asia 2002, Singapore

Thick Client Application Security

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

WHITE PAPER. FortiWeb Web Application Firewall Ensuring Compliance for PCI DSS 6.5 and 6.6

Secure development and the SDLC. Presented By Jerry

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

CTIS 256 Web Technologies II. Week # 1 Serkan GENÇ

Last update: February 23, 2004

Executive Summary On IronWASP

Transcription:

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

Announcements Reminder: Project 3 is available on the web pages Due: April 3rd Midterm II has been graded Today: Web Security [Some slides adapted from John Mitchell's course at Stanford] 4/3/07 CIS/TCOM 551 2

Midterm II Average: 70 Std. Dev.: 9 High: 88 Low: 50 4/3/07 CIS/TCOM 551 3

Web Security What security concerns are there on the web? Class answers: Leaking personal information (privacy!) Anonymity Integrity -- getting data/software from the web Web scripts, web pages can modify local data Authenticating remote hosts -- Phishing / spoofing SQL injection / XSS / format string vulerabilities Cookies / encoding state in URLs 4/3/07 CIS/TCOM 551 4

OWASP.org Top 10 Open Web Application Security Project 1. Unvalidated Input 2. Broken Access Control 3. Broken Authentication 4. Cross Site Scripting 5. Buffer Overflows 6. Injection Flaws 7. Improper Error Handling 8. Insecure Storage 9. Application Denial of Service 10. Insecure Configuration Management 4/3/07 CIS/TCOM 551 5

Browser security topics Review HTTP, scripting Controlling outgoing information Cookies Cookie mechanism, JunkBuster Routing privacy Anonymizer, Crowds Privacy policy P3P Risks from incoming executable code JavaScript ActiveX Plug-ins Java 4/3/07 CIS/TCOM 551 6

HyperText Transfer Protocol Used to request and return data Methods: GET, POST, HEAD, Stateless request/response protocol Each request is independent of previous requests Statelessness has a significant impact on design and implementation of applications Evolution HTTP 1.0: simple HTTP 1.1: more complex 4/3/07 CIS/TCOM 551 7

HTTP Request Method File HTTP version Headers GET /default.asp HTTP/1.0 Accept: image/gif, image/x-bitmap, image/jpeg, */* Accept-Language: en User-Agent: Mozilla/1.22 (compatible; MSIE 2.0; Windows 95) Connection: Keep-Alive If-Modified-Since: Sunday, 17-Apr-96 04:32:58 GMT Blank line Data none for GET 4/3/07 CIS/TCOM 551 8

HTTP Response HTTP version Status code Reason phrase Headers HTTP/1.0 200 OK Date: Sun, 21 Apr 1996 02:20:42 GMT Server: Microsoft-Internet-Information-Server/5.0 Connection: keep-alive Content-Type: text/html Last-Modified: Thu, 18 Apr 1996 17:39:05 GMT Content-Length: 2543 Data <HTML> Some data... blah, blah, blah </HTML> 4/3/07 CIS/TCOM 551 9

HTTP Server Status Codes Code 200 201 301 302 400 Description OK Created Moved Permanently Moved Temporarily Bad Request not understood Return code 401 Used to indicate HTTP authorization HTTP authorization has serious problems!!! 401 403 404 500 Unauthorized Forbidden not authorized Not Found Internal Server Error 4/3/07 CIS/TCOM 551 10

HTML and Scripting <html> <P> Browser receives content, displays <script> var num1, num2, sum HTML and executes scripts num1 = prompt("enter first number") num2 = prompt("enter second number") sum = parseint(num1) + parseint(num2) alert("sum = " + sum) </script> </html> 4/3/07 CIS/TCOM 551 11

Events <script type="text/javascript"> function whichbutton(event) { if (event.button==1) { alert("you clicked the left mouse button!") } else { alert("you clicked the right mouse button!") }} </script> <body onmousedown="whichbutton(event)"> </body> Mouse event causes page-defined function to be called Other events: onload, onmousemove, onkeypress, onunload 4/3/07 CIS/TCOM 551 12

Document object model (DOM) Object-oriented interface used to read and write documents web page in HTML is structured data DOM provides representation of this hierarchy Examples Properties: document.alinkcolor, document.url, document.forms[ ], document.links[ ], document.anchors[ ] Methods: document.write(document.referrer) Also Browser Object Model (BOM) Window, Document, Frames[], History, Location, Navigator (type and version of browser) 4/3/07 CIS/TCOM 551 13

Need for session state www.e_buy.com www.e_buy.com/ shopping.cfm? pid=269& item1=102030405 View Catalog Select Item Check out www.e_buy.com/ shopping.cfm? pid=269 www.e_buy.com/ checkout.cfm? pid=269& item1=102030405 Store session information in URL; Easily read on network 4/3/07 CIS/TCOM 551 14

Store info across sessions? Cookies A cookie is a file created by an Internet site to store information on your computer Browser Enters form data Stores cookie Server Browser Requests cookie Returns data Server Http is stateless protocol; cookies add state 4/3/07 CIS/TCOM 551 15

Cookie A named string stored by the browser Accessible as property of the Document object Can be read and written entirely on client side using Javascript Accessibility persists for the duration of the browser session (but an expiration date may be given) is associated with the subtree of the document that created it (but a cookie path may be specified) is accessible to pages on the server that created it (but a cookie domain may be declared) 4/3/07 CIS/TCOM 551 16

Browser security risks Compromise host Write to file system Interfere with other processes in browser environment Steal information Read file system Read information associated with other browser processes (e.g., other windows) Fool the user Reveal information through traffic analysis 4/3/07 CIS/TCOM 551 17

Browser sandbox Idea Code executed in browser has only restricted access to OS, network, and browser data structures Isolation Similar to OS process isolation, conceptually Browser is a weak OS Same-origin principle Browser process consists of related pages and the site they come from 4/3/07 CIS/TCOM 551 18

Same-Origin Principle Basic idea Only the site that stores some information in the browser may later read or modify that information (or depend on it in any way). Details What is a site? URL, domain, pages from same site? What is information? cookies, document object, cache,? Default only: users can set other policies No way to keep sites from sharing information 4/3/07 CIS/TCOM 551 19

Schematic web site architecture WS 1 Firewall Application Firewall (WAF) Load Balancer WS 2 Firewall App Servers DB WS 3 IDS Authorization Netegrity (CA) Oblix (Oracle) To CC processor 4/3/07 CIS/TCOM 551 20

Our focus: web app code Common web-site attacks: Denial of Service: ealier in course Attack the web server (IIS, Apache) : e.g. control hijacking: CodeRed, Nimda, Solutions: Harden web server: stackguard, libsafe, Worm defense: later in course.» Host based intrusion detection,» Worm signatures generation, shields. Today: Common vulnerabilities in web application code 4/3/07 CIS/TCOM 551 21

Web app code Runs on web server or app server. Takes input from web users (via web server) Interacts with the database and 3 rd parties. Prepares results for users (via web server) Examples: Shopping carts, home banking, bill pay, tax prep, New code written for every web site. Written in: C, PHP, Perl, Python, JSP, ASP, Often written with little consideration for security. 4/3/07 CIS/TCOM 551 22

Common vulnerabilities (OWASP) Inadequate validation of user input Cross site scripting SQL Injection HTTP Splitting Broken session management Can lead to session hijacking and data theft Insecure storage Sensitive data stored in the clear. Prime target for theft e.g. egghead, Verizon. Note: PCI Data Security Standard (Visa, Mastercard) 4/3/07 CIS/TCOM 551 23

Warm up: a simple example Direct use of user input: http://victim.com/ copy.php? name=username copy.php: script name script input system( cp temp.dat $name.dat ) Problem: http://victim.com/ copy.php? name= a ; rm * (should be: name=a%20;%20rm%20* ) 4/3/07 CIS/TCOM 551 24

Redirects EZShopper.com shopping cart (10/2004): http:// /cgi-bin/ loadpage.cgi? page=url Redirects browser to url Redirects are common on many sites Used to track when user clicks on external link EZShopper uses redirect to add HTTP headers Problem: phishing http://victim.com/cgi-bin/loadpage? page=phisher.com Link to victim.com puts user at phisher.com Local redirects should ensure target URL is local 4/3/07 CIS/TCOM 551 25