By Brian Vees.  SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities.

Slides:



Advertisements
Similar presentations
1 Project 2: Web App Security Collin Jackson CS 155 Spring 2007.
Advertisements

Introduction The concept of “SQL Injection”
1. What is SQL Injection 2. Different varieties of SQL Injection 3. How to prevent it.
Information Networking Security and Assurance Lab National Chung Cheng University The Ten Most Critical Web Application Security Vulnerabilities Ryan J.W.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
SQL Injection and Buffer overflow
Sara SartoliAkbar Siami Namin NSF-SFS workshop July 14-18, 2014.
1 SQL injection: attacks and defenses Dan Boneh CS 142 Winter 2009.
Web Application Attacks ECE 4112 Fall 2007 Group 9 Zafeer Khan & Simmon Yau.
Web Application Vulnerabilities Checklist. EC-Council Parameter Checklist  URL request  URL encoding  Query string  Header  Cookie  Form field 
{ Code Injection Cable Johnson.  Overview  Common Injection Types  Developer Prevention Code Injection.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
PHP Security.
Cosc 4765 Server side Web security. Web security issues From Cenzic Vulnerability report
Security.NET Chapter 1. How Do Attacks Occur? Stages of attack Examples of attacker actions 1. FootprintRuns a port scan on the firewall 2. PenetrationExploits.
Validation Controls. Validation Server Controls These are a special type of Web server control. They significantly reduce some of the work involved in.
+ 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.
Web Application Access to Databases. Logistics Test 2: May 1 st (24 hours) Extra office hours: Friday 2:30 – 4:00 pm Tuesday May 5 th – you can review.
© All rights reserved. Zend Technologies, Inc. PHP Security Kevin Schroeder Zend Technologies.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
Session and cookie management in.Net Justin Brunelle CS795 6/18/2009.
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.
Accessing MySQL with PHP IDIA 618 Fall 2014 Bridget M. Blodgett.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
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.
Top Five Web Application Vulnerabilities Vebjørn Moen Selmersenteret/NoWires.org Norsk Kryptoseminar Trondheim
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.
PHP Workshop ‹#› PHP Security. PHP Workshop ‹#› Two Golden Rules 1.FILTER external input Obvious.. $_POST, $_COOKIE, etc. Less obvious.. $_SERVER 2.ESCAPE.
PHP2010/11 : [‹#›] PHP Security. PHP2010/11 : [‹#›] Two Golden Rules 1.FILTER external input Obvious.. $_POST, $_COOKIE, etc. Less obvious.. $_SERVER.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Web Security.
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.
SQL INJECTIONS Presented By: Eloy Viteri. What is SQL Injection An SQL injection attack is executed when a web page allows users to enter text into a.
SecurityPHPApril 2010 : [‹#›] PHP Security. SecurityPHPApril 2010 : [‹#›] Two Golden Rules 1.FILTER external input Obvious.. $_POST, $_COOKIE, etc. Less.
Web Applications Testing By Jamie Rougvie Supported by.
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.
If statements and validation. If statement In programming the if statement allows one to test certain conditions and respond differently depending on.
Crash Course in Web Hacking
Web Application Vulnerabilities ECE 4112 Internetwork Security, Spring 2005 Chris Kelly Chris Lewis April 28, 2005 ECE 4112 Internetwork Security, Spring.
Controlling Web Site Access Using Logins CS 320. Basic Approach HTML form a php page that collects the username and password  Sends them to second PHP.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
PHP Error Handling & Reporting. Error Handling Never allow a default error message or error number returned by the mysql_error() and mysql_errno() functions.
Security Attacks CS 795. Buffer Overflow Problem Buffer overflow Analysis of Buffer Overflow Attacks.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
Secure Authentication. SQL Injection Many web developers are unaware of how SQL queries can be tampered with SQL queries are able to circumvent access.
INFO 344 Web Tools And Development CK Wang University of Washington Spring 2014.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
SQL Injection Josh Mann. What is SQL Injection  SQL injection is a technique for exploiting web applications that use client-supplied data in SQL queries.
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,
Software Security. Bugs Most software has bugs Some bugs cause security vulnerabilities Incorrect processing of security related data Incorrect processing.
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,
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
Radoslav Georgiev Telerik Corporation
SlideSet #20: Input Validation and Cross-site Scripting Attacks (XSS) SY306 Web and Databases for Cyber Operations.
SQL Injection.
Group 18: Chris Hood Brett Poche
Module: Software Engineering of Web Applications
CSCE 548 Student Presentation Ryan Labrador
CS 371 Web Application Programming
Web Systems Development (CSC-215)
Defense in Depth Web Server Custom HTTP Handler Input Validation
PHP: Security issues FdSc Module 109 Server side scripting and
Chapter 13 Security Methods Part 3.
Web Programming Language
CS5123 Software Validation and Quality Assurance
Presentation transcript:

by Brian Vees

 SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities

 A very common, and easy to exploit vulnerability  Requires basic SQL knowledge  The basic idea:  Find a user-inputted field that most likely is used to query a database  Insert text in the field which will then merge with the SQL query being executed  Examine the results to gain info about the database  Using this info, write better queries to receive potentially private data

 Given a sample login prompt on a webpage:  Query to validate username might look like this:  Entering a single apostrophe “breaks out” of the intended SQL code, allowing other code to be executed query = "select * from user where username='" + tbUserName.Text + "'";

 Entering this data causes the following query to be sent to the database:  Since 1=1 is always true, this query returns all users in the database select * from user where username='' or 1=1 --'

 SQL injection to obtain error messages containing useful data  SQL injection to delete data ( 'drop [tablename]-- )  SQL injection to execute files exec 'run', NULL, 'executable.exe'

 “Escape” apostrophes  String replacement on SQL-specific character combinations (“--”)  Safest: reject any bad input rather than attempting to “cleanse” it  Not necessarily plausible: names like O’Brien and other valid input contain apostrophes

 A very simple method of finding valid usernames

 Use the same error message for invalid password and invalid username  This way an attacker has no idea whether or not the username is correct

 Another type of code injection, but with client- side script  Can be used to bypass client-side security, as well as gain other information (session cookies)  Yahoo! and even Google have previously fallen victim to this vulnerability

 This form echoes what the user entered in the case of an invalid login (i.e. invalid characters)  What if we input JavaScript?

 Consider if we now input the following code: alert(document.cookie)  With this data, we can bypass cookie-based security  Also, external, lengthier scripts can be injected:

 User input cleansing  Don’t echo user input back unless it is necessary

 Potentially the most dangerous vulnerability  Stems from unsecure settings on a web server

 In PHP, the register_globals setting is often set to “on” to ease development  This allows for global variables to be set remotely  require($page. “.php”);  If $page is not initialized, any arbitrary file can be included and will be executed on that server

 There are several XML specifications that are also vulnerable to remote code execution  Improperly validated XML can “break out” of the XML, and execute malicious code

 Ensure web server configuration is secure (namely, if using PHP, turn register_globals off)  Validate user input

 An attack on server-side functions that can perform formatting (such as C’s printf)  Special characters are used to read or write sections of memory that normally would not be accessible

 %s can be used to continue reading data off the stack until an illegal memory address is attempted to be accessed, crashing the program  %x can be used to print areas of memory that are normally not accessible  %d, %u, and %x can be used to overwrite the instruction pointer, allowing the execution of user-defined code

 Make sure and verify all user input  Replace or reject special characters (“%”)

 What is the golden rule that will stop the majority of these website attacks? Validate User Input!