Web Security Advanced Network Security Peter Reiher August, 2014

Slides:



Advertisements
Similar presentations
Nick Feamster CS 6262 Spring 2009
Advertisements

Cross-site Request Forgery (CSRF) Attacks
What is code injection? Code injection is the exploitation of a computer bug that is caused by processing invalid data. Code injection can be used by.
ForceHTTPS: Protecting High-Security Web Sites from Network Attacks Collin Jackson and Adam Barth.
WEB BROWSER SECURITY By Robert Sellers Brian Bauer.
Common Exploits Aaron Cure Cypress Data Defense. SQL Injection.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
Cross Site Scripting a.k.a. XSS Szymon Siewior. Disclaimer Everything that will be shown, was created for strictly educational purposes. You may reuse.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
Lecture 2 Page 1 CS 236, Spring 2008 Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
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.
It’s always better live. MSDN Events Securing Web Applications Part 1 of 2 Understanding Threats and Attacks.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
Lecture 16 Page 1 CS 236 Online Cross-Site Scripting XSS Many sites allow users to upload information –Blogs, photo sharing, Facebook, etc. –Which gets.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Lecture 7 Page 1 CS 236 Online Password Management Limit login attempts Encrypt your passwords Protecting the password file Forgotten passwords Generating.
Cosc 4765 Server side Web security. Web security issues From Cenzic Vulnerability report
WEB SECURITY WEEK 3 Computer Security Group University of Texas at Dallas.
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.
© All rights reserved. Zend Technologies, Inc. PHP Security Kevin Schroeder Zend Technologies.
IBM Rational Application Security Group (aka Watchfire) Web Based Man In the Middle Attack © 2009 IBM Corporation 1 Active Man in the Middle Attacks The.
Lecture 16 Page 1 CS 236 Online SQL Injection Attacks Many web servers have backing databases –Much of their information stored in a database Web pages.
Lecture 15 Page 1 Advanced Network Security Perimeter Defense in Networks: Firewalls Configuration and Management Advanced Network Security Peter Reiher.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
Lecture 15 Page 1 CS 136, Fall 2014 Web Security Computer Security Peter Reiher December 9, 2014.
By Sean Rose and Erik Hazzard.  SQL Injection is a technique that exploits security weaknesses of the database layer of an application in order to gain.
Lecture 19 Page 1 CS 236 Online Advanced Research Issues in Security: Web Security and Privacy CS 236 On-Line MS Program Networks and Systems Security.
Lecture 16 Page 1 CS 236 Online Web Security CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Lecture 16 Page 1 CS 236 Online Exploiting Statelessness HTTP is designed to be stateless But many useful web interactions are stateful Various tricks.
Session Management Tyler Moore CS7403 University of Tulsa Slides adapted in part or whole from Dan Boneh, Stanford CS155 1.
COOKIES AND SESSIONS.
Lecture 15 Page 1 CS 136, Spring 2016 Web Security Computer Security Peter Reiher May 24, 2016.
Page 1 Ethical Hacking by Douglas Williams. Page 2 Intro Attackers can potentially use many different paths through your application to do harm to your.
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
Secure HTTP (HTTPS) Pat Morin COMP 2405.
Javascript worms By Benjamin Mossé SecPro
Building Secure ColdFusion Applications
CSE 154 Lecture 25: web security.
Tonga Institute of Higher Education IT 141: Information Systems
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
TOPIC: Web Security (Part-4)
World Wide Web policy.
Web Security CS 136 Computer Security Peter Reiher December 3, 2013
Protecting Memory What is there to protect in memory?
Password Management Limit login attempts Encrypt your passwords
Web Security Computer Security Peter Reiher March 2, 2017
Cookies Cross site scripting
SQL Injection Attacks Many web servers have backing databases
E-commerce Application Security
Outline Introduction Characteristics of intrusion detection systems
Cross-Site Forgery
CSE 154 Lecture 26: web security.
What is Cookie? Cookie is small information stored in text file on user’s hard drive by web server. This information is later used by web browser to retrieve.
Tonga Institute of Higher Education IT 141: Information Systems
Riding Someone Else’s Wave with CSRF
CSC 495/583 Topics of Software Security Intro to Web Security
Foundations of Network and Computer Security
Tonga Institute of Higher Education IT 141: Information Systems
Web Security Advanced Network Security Peter Reiher August, 2014
Outline Using cryptography in networks IPSec SSL and TLS.
Cookies and sessions Saturday, February 23, 2019Saturday, February 23,
Web Security CS 136 Computer Security Peter Reiher November 29, 2012
Web Security CS 136 Computer Security Peter Reiher March 11, 2010
Active Man in the Middle Attacks
Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
CSc 337 Lecture 24: Security.
Exploring DOM-Based Cross Site Attacks
Advanced Research Issues in Security: Web Security and Privacy CS 236 On-Line MS Program Networks and Systems Security Peter Reiher.
Presentation transcript:

Web Security Advanced Network Security Peter Reiher August, 2014

Outline Cross site scripting threats Cryptography in the web

Cross-Site Scripting XSS Many sites allow users to upload information Blogs, photo sharing, Facebook, etc. Which gets permanently stored And displayed Attack based on uploading a script Other users inadvertently download it And run it . . .

The Effect of XSS Arbitrary malicious script executes on user’s machine In context of his web browser At best, runs with privileges of the site storing the script Often likely to run at full user privileges

Non-Persistent XSS Embed a small script in a link pointing to a legitimate web page Following the link causes part of it to be echoed back to the user’s browser Where it gets executed as a script Never permanently stored at the server

Persistent XSS Upload of data to a web site that stores it permanently Generally in a database somewhere When other users request the associated web page, They get the bad script

Some Examples Twitter had a bug allowing XSS in 2010 Other XSS vulnerabilities discovered on sites run by eBay, Symantec, PayPal, Facebook, Amazon, Adobe, Microsoft, Google Gmail, LinkedIn, the Scientology website, thousands of others D-Link router flaw exploitable through XSS

Why Is XSS Common? Use of scripting languages widespread For legitimate purposes Most users leave them enabled in their browsers Sites allowing user upload are very popular Only a question of getting user to run your script

Typical Effects of XSS Attack Most commonly used to steal personal information That is available to legit web site User IDs, passwords, credit card numbers, etc. Such information often stored in cookies at client side

Solution Approaches Don’t allow uploading of anything Don’t allow uploading of scripts Provide some form of protection in browser

Disallowing Data Uploading Does your web site really need to allow users to upload stuff? Even if it does, must you show it to other users? If not, just don’t take any user input Problem: Not possible for many important web sites

Don’t Allow Script Uploading A no-brainer for most sites Few web sites want users to upload scripts, after all So validate user input to detect and remove scripts Problem: Rich forms of data encoding make it hard to detect all scripts Good tools can make it easier

Protect the User’s Web Browser Basically, the same solutions as for any form of protecting from malicious scripts With the same problems: Best solutions cripple functionality

Cross-Site Request Forgery CSRF Works the other way around An authenticated and trusted user attacks a web server Usually someone posing as that user Generally to fool server into believing that the trusted user made a request

CSRF in Action Attacker puts link to (say) a bank on his web page Unsuspecting user clicks on the link His authentication cookie goes with the HTTP request Since it’s for the proper domain Bank authenticates him and transfers his funds to the attacker

Issues for CSRF Attacks Not always possible or easy Attacks sites that don’t check referrer header Indicating that request came from another web page Attacked site must allow use of web page to allow something useful (e.g., bank withdrawal) Must not require secrets from user Victim must click link on attacker’s web site And attacker doesn’t see responses

Data Transport Issues The web is inherently a network application Thus, all issues of network security are relevant And all typical network security solutions are applicable Where do we see problems?

(Non-) Use of Data Encryption Much web traffic is not encrypted Or signed As a result, it can be sniffed Allowing eavesdropping, MITM attacks, alteration of data in transit, etc. Why isn’t it encrypted?

Why Web Sites Don’t Use Encryption Primarily for cost reasons Crypto costs cycles For high-volume sites, not encrypting messages lets them buy fewer servers They are making a cost/benefit analysis decision And maybe it’s right?

Problems With Not Using Encryption Sensitive data can pass in the clear Passwords, credit card numbers, SSNs, etc. Attackers can get information from messages to allow injection attacks Attackers can readily profile traffic Especially on non-secured wireless networks

Firesheep Many wireless networks aren’t encrypted Many web services don’t use end-to-end encryption for entire sessions Firesheep was a demo of the dangers of those in combination Simple Firefox plug-in to scan unprotected wireless nets for unencrypted cookies Allowing session hijacking attacks When run in that environment, tended to be highly successful

Why Does Session Hijacking Work? Web sites try to avoid computation costs of encryption So they only encrypt login Subsequent HTTP messages “authenticated” with a cookie Anyone who has the cookie can authenticate The cookie is sent in the clear . . . So attacker can “become” legit user

Using Encryption on the Web Some web sites support use of HTTPS Which permits encryption of data Based on TLS/SSL Performs authentication and two-way encryption of traffic Authentication is certificate-based HSTS (HTTP Strict Transport Security) requires browsers to use HTTPS

Increased Use of Web Encryption These and other problems have led more major web sites to encrypt traffic E.g., Google announced in 2014 it would encrypt all search requests Facebook and Twitter adopted HSTS in 2014 Arguably, all web interactions should be encrypted

Sometimes Encryption Isn’t Enough Especially powerful “attackers” can subvert this process Man-in-the-middle attacks by ISPs NSA compromised key management NSA also spied on supposedly private links Usually impossible for typical criminal Hard or impossible for a user to know if this is going on

Conclusions Web 2.0 has made web security more difficult, by allowing users to upload content Many problems result, such as cross site scripting Crypto cannot solve all of the web security problems, but it can solve many of them But only if web sites choose to use it