Module: Software Engineering of Web Applications

Slides:



Advertisements
Similar presentations
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems © 2002, Predictive Systems.
Advertisements

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.
HI-TEC 2011 SQL Injection. Client’s Browser HTTP or HTTPS Web Server Apache or IIS HTML Forms CGI Scripts Database SQL Server or Oracle or MySQL ODBC.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
Cross Site Scripting a.k.a. XSS Szymon Siewior. Disclaimer Everything that will be shown, was created for strictly educational purposes. You may reuse.
Introduction The concept of “SQL Injection”
By Brian Vees.  SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities.
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.
Injection Attacks by Example SQL Injection and XSS Adam Forsythe Thomas Hollingsworth.
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
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.
Copyright 2007 © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
COMP3121 E-Commerce Technologies Richard Henson University of Worcester November 2011.
Web Application Security ECE ECE Internetwork Security What is a Web Application? An application generally comprised of a collection of scripts.
Security Scanners Mark Shtern. Popular attack targets Web – Web platform – Web application Windows OS Mac OS Linux OS Smartphone.
School of Computing and Information Systems CS 371 Web Application Programming Security Avoiding and Preventing Attacks.
NMD202 Web Scripting Week3. What we will cover today Includes Exercises PHP Forms Exercises Server side validation Exercises.
Analysis of SQL injection prevention using a filtering proxy server By: David Rowe Supervisor: Barry Irwin.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflows can be triggered by inputs that are designed to execute code, or alter the way the program.
Web Applications Testing By Jamie Rougvie Supported by.
Building Secure Web Applications With ASP.Net MVC.
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.
Presented By: Chandra Kollipara. Cross-Site Scripting: Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflow Analysis of Buffer Overflow Attacks.
Module: Software Engineering of Web Applications Chapter 3: user-input-validation testing of web applications 1.
Since you’ll need a place for the user to enter a search query. Every form must have these basic components: – The submission type defined with the method.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
Introduction of XSS:-- Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
By Collin Donaldson. Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you own. 2.You gain explicit,
Carrie Estes Collin Donaldson.  Zero day attacks  “zero day”  Web application attacks  Signing up for a class  Hardening the web server  Enhancing.
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.
SQL INJECTION Diwakar Kumar Dinkar M.Tech, CS&E Roll Diwakar Kumar Dinkar M.Tech, CS&E Roll
Web Security (cont.) 1. Referral issues r HTTP referer (originally referrer) – HTTP header that designates calling resource  Page on which a link is.
XSS 101 Jason Clark 12/20.
Database and Cloud Security
SQL Injection.
Web Application Security
CSCE 548 Student Presentation Ryan Labrador
Web Application Vulnerabilities
Module: Software Engineering of Web Applications
Module: Software Engineering of Web Applications
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Chapter 7: Identifying Advanced Attacks
TOPIC: Web Security (Part-4)
World Wide Web policy.
Static Detection of Cross-Site Scripting Vulnerabilities
CS 371 Web Application Programming
Example – SQL Injection
Chapter 19 PHP Part III Credits: Parts of the slides are based on slides created by textbook authors, P.J. Deitel and H. M. Deitel by Prentice Hall ©
PHP: Security issues FdSc Module 109 Server side scripting and
CSC 495/583 Topics of Software Security Intro to Web Security
Lecture 2 - SQL Injection
Web Programming Language
CS5123 Software Validation and Quality Assurance
Software Security Slide Set #10 Textbook Chapter 11 Clicker Questions
Protecting Against Common Web Application Vulnerabilities
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
Exploring DOM-Based Cross Site Attacks
Presentation transcript:

Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications

Vulnerabilities in web applications Existing technologies such as anti-virus software and network firewall offer comparatively secure protection at host and network levels, but not at the application level (Huang et al., 2004). Application-level attacks are more difficult to detect than attacks at host and network levels. These attacks can come from any online user — even authenticated ones. As UIV checks inputs from any on-line user, UIV is an effective means to protect a web application from application-level attacks. These slides are designed to accompany module: Software Engineering of Web Applications

Vulnerabilities in web applications Here, we give a brief introduction of several vulnerabilities in web applications to show how attacks can happen at the application level because of defective UIV. These slides are designed to accompany module: Software Engineering of Web Applications

1- Hidden fields Hidden fields refer to hidden HTML form fields, such as (input type=hidden name=hl value=“en”). In many web applications, developers use these fields to transfer values instead of presenting these values to users. Unfortunately, these fields are actually visible and manipulable to users. Malicious users could easily change the values of these fields in HTML source code and send the changed values back to the web application. These slides are designed to accompany module: Software Engineering of Web Applications

Hidden fields If a web application uses a hidden field to hold merchandise prices, malicious users could purchase items at little or no cost. These attacks could be successful because a web application may not validate whether the returning value of a hidden field is the same as its outgoing value, and accepts the illegally changed value. These slides are designed to accompany module: Software Engineering of Web Applications

2- Cross-Site Scripting Cross-Site Scripting (XSS) flaws occur when a web application accepts user-supplied inputs that contain browser-executable scripts, and posts the inputs in an HTML page without validating or encoding. When another user accesses the HTML page, the web browser executes scripts posted in that HTML page. Through XSS, attackers could send an executable script to a victim’s browser, and then possibly hijack user sessions, deface websites, introduce worms, etc. These slides are designed to accompany module: Software Engineering of Web Applications

Cross-Site Scripting Fig. 1 shows a typical XSS example, which is borrowed from the “Writing Secure Code” book (Howard and LeBlanc, 2003). Suppose that an attacker sends the code shown in Fig. 1 to a bulletin board, and then an innocent user opens that bulletin board and clicks the hyper link of “Click here!”. As a result, this user’s cookie would be stolen. Such attacks could be successful when the web application does not filter out or transform scripts included in users’ inputs. These slides are designed to accompany module: Software Engineering of Web Applications

Cross-Site Scripting These slides are designed to accompany module: Software Engineering of Web Applications

3- SQL injection SQL injection flaws occur when user-supplied inputs are sent to an interpreter as part of a command or query. Attackers trick the interpreter to execute unintended commands via supplying specially crafted data For example, consider a web application that authenticates a user by checking a database in this way: These slides are designed to accompany module: Software Engineering of Web Applications

SQL injection SQLQuery = “SELECT * FROM Users WHERE (UserName=’ “+ strUserName +”’) AND (Password=’ “+ strPassword +”’);”; if GetQueryResult(SQLQuery) == 0 then authenticated = false; else authenticated = true; If an attacker enters X’ OR ‘A’ =’A for UserName and X’ OR ‘A’ =’A for Password and the web application executes the query on the database directly, the SQL statement at runtime becomes: SELECT ∗ FROM Users WHERE(UserName = ‘X’ OR‘A’ = ‘A’) AND(Password = ‘X’ OR‘A’ = ‘A’); These slides are designed to accompany module: Software Engineering of Web Applications

SQL injection In this way, the attacker bypasses the authentication and accesses all the user information in the Users table. Similar to XSS attacks, SQL-injection attacks could be successful if the web application does not filter or transform SQL commands included in users’ inputs. These slides are designed to accompany module: Software Engineering of Web Applications

4- Unconscious mistakes Besides the preceding malicious attacks, many users can enter invalid inputs unconsciously. For example, users may enter invalid characters, such as multiple blanks, &, and null accidentally. These characters may lead to a failure or even crash when they are used for database operations. These slides are designed to accompany module: Software Engineering of Web Applications

Unconscious mistakes Even though such inputs may not crash a web application, there can be a negative user experience. For example, when a user signs up for a service, a web application requires the user’s email address, and sends an automatically generated password to that email address. If the user enters an invalid email address, the user does not get the password and the service sign up fails. These slides are designed to accompany module: Software Engineering of Web Applications

Reference Li, N., Xie, T., Jin, M. & Liu, C., 2010. Perturbation-based user-input-validation testing of web applications. The Journal of Systems and Software, 83(11), pp. 2263-2274. These slides are designed to accompany module: Software Engineering of Web Applications

Solution To avoid these vulnerabilities, a web application should validate a user input before using the input for further processing. However, web-application developers often forget validating users’ inputs, and UIV is often not correctly developed. These slides are designed to accompany module: Software Engineering of Web Applications