Common Exploits Aaron Cure Cypress Data Defense. SQL Injection.

Slides:



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

Nick Feamster CS 6262 Spring 2009
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.
WebGoat & WebScarab “What is computer security for $1000 Alex?”
COMP 321 Week 12. Overview Web Application Security  Authentication  Authorization  Confidentiality Cross-Site Scripting Lab 12-1 Introduction.
CMSC 414 Computer and Network Security Lecture 24 Jonathan Katz.
It’s always better live. MSDN Events Security Best Practices Part 2 of 2 Reducing Vulnerabilities using Visual Studio 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.
Information Networking Security and Assurance Lab National Chung Cheng University 1 Top Vulnerabilities in Web Applications (I) Unvalidated Input:  Information.
ASP.NET 2.0 Chapter 6 Securing the ASP.NET Application.
Introduction to the OWASP Top 10. Cross Site Scripting (XSS)  Comes in several flavors:  Stored  Reflective  DOM-Based.
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.
Injection Attacks by Example SQL Injection and XSS Adam Forsythe Thomas Hollingsworth.
WEB SECURITY WORKSHOP TEXSAW 2013 Presented by Joshua Hammond Prepared by Scott Hand.
Presenter Deddie Tjahjono.  Introduction  Website Application Layer  Why Web Application Security  Web Apps Security Scanner  About  Feature  How.
Web Application Attacks ECE 4112 Fall 2007 Group 9 Zafeer Khan & Simmon Yau.
Introduction to InfoSec – Recitation 10 Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)
Understanding SharePoint 2013 Add-In Security Vulnerabilities
Introduction to Application Penetration Testing
Workshop 3 Web Application Security Li Weichao March
Cosc 4765 Server side Web security. Web security issues From Cenzic Vulnerability report
Cross-Site Scripting Vulnerabilities Adam Doupé 11/24/2014.
Lets Make our Web Applications Secure. Dipankar Sinha Project Manager Infrastructure and Hosting.
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.
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.
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.
November 13, 2008 Ohio Information Security Forum Attack Surface of Web Applications James Walden Northern Kentucky University
OSI and TCP/IP Models And Some Vulnerabilities AfNOG th May 2011 – 10 th June 2011 Tanzania By Marcus K. G. Adomey.
Feedback #2 (under assignments) Lecture Code:
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.
Ram Santhanam Application Level Attacks - Session Hijacking & Defences
The attacks ● XSS – type 1: non-persistent – type 2: persistent – Advanced: other keywords (, prompt()) or other technologies such as Flash.
October 3, 2008IMI Security Symposium Application Security through a Hacker’s Eyes James Walden Northern Kentucky University
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.
Web Security SQL Injection, XSS, CSRF, Parameter Tampering, DoS Attacks, Session Hijacking SoftUni Team Technical Trainers Software University
Crash Course in Web Hacking
Presented By: Chandra Kollipara. Cross-Site Scripting: Cross-Site Scripting attacks are a type of injection problem, in which malicious scripts are injected.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 9 1COMP9321, 15s2, Week.
CS526Topic 12: Web Security (2)1 Information Security CS 526 Topic 9 Web Security Part 2.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Module: Software Engineering of Web Applications Chapter 3 (Cont.): user-input-validation testing of web applications 1.
Session Management Tyler Moore CS7403 University of Tulsa Slides adapted in part or whole from Dan Boneh, Stanford CS155 1.
Introduction of XSS:-- Cross-Site Scripting (XSS) attacks are a type of injection, in which malicious scripts are injected into otherwise benign and trusted.
Copyright © The OWASP Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the OWASP License. The OWASP.
Intro to Web Application Security. iHostCodex Web Services - CEO Project-AG – CoFounder OWASP Panay -Chapter Leader -Web Application Pentester -Ethical.
Session 11: Cookies, Sessions ans Security iNET Academy Open Source Web Development.
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.
Introduction SQL Injection is a very old security attack. It first came into existence in the early 1990's ex: ”Hackers” movie hero does SQL Injection.
Building Secure ColdFusion Applications
TOPIC: Web Security (Part-4)
World Wide Web policy.
What is REST API ? A REST (Representational State Transfer) Server simply provides access to resources and the REST client accesses and presents the.
Cross-Site Forgery
Cross-Site Request Forgeries: Exploitation and Prevention
Riding Someone Else’s Wave with CSRF
CSC 495/583 Topics of Software Security Intro to Web Security
Web Security Advanced Network Security Peter Reiher August, 2014
Lecture 2 - SQL Injection
Protecting Against Common Web Application Vulnerabilities
Cross-Site Scripting Issues and Defenses Ed Skoudis Predictive Systems
Presentation transcript:

Common Exploits Aaron Cure Cypress Data Defense

SQL Injection

What is it? ◦The inclusion of portions of SQL statements in an entry field in an attempt to get the website to pass a newly formed rogue SQL command to the database (e.g., dump the database contents to the attacker)

SQL Injection Tools How do we attack it? ◦SqlMap   sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting SQL injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester and a broad range of switches lasting from database fingerprinting, over data fetching from the database, to accessing the underlying file system and executing commands on the operating system via out-of-band connections.

SQL Injection Tools ◦BSQL Hacker  hacker/ hacker/  BSQL (Blind SQL) Hacker is an automated SQL Injection Framework / Tool designed to exploit SQL injection vulnerabilities virtually in any database.

SQL Injection Demo sqlmap.py -u sqlmap identified the following injection points with a total of 59 HTTP(s) requests: --- Place: GETParameter: id Type: boolean-based blind Title: AND boolean-based blind - WHERE or HAVING clause Payload: id=3 AND 1640=1640 Type: error-based Title: MySQL >= 5.0 AND error-based - WHERE or HAVING clause Payload: id=3 AND (SELECT 1157 FROM(SELECT COUNT(*),CONCAT(0x3a796c6a3a,(SELECT (CASE WHEN (1157=1157) THEN 1 ELSE 0 END)),0x3a7a76743a,FLOOR(RAND(0)*2))x FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) Type: UNION query Title: Generic UNION query (NULL) - 3 columns Payload: id=3 UNION ALL SELECT NULL,CONCAT(0x3a796c6a3a,0x6f6a6c61786d494f6a74,0x3a7a76743a),NULL– -- -web server operating system: Windows 2012 web application technology: ASP.NET , ASP.NET, Microsoft IIS 8.0 back-end DBMS: MySQL 5.0

SQL Injection Mitigation How do we prevent it? ◦Don’t concatenate untrusted data ◦Use parameterized queries ◦Use a framework  nHibernate  Entity Framework  Etc.

Session hiJACKING

Session Hijacking What is it? ◦Occurs when authentication tokens are stolen from an authenticated user. This vulnerability commonly occurs when session tokens are sent in cleartext between a web server and a client’s browser. Other examples include tokens being stolen via cross-site scripting and man-in-the- middle attacks. Allows an attacker to assume the identity of another user gain unauthorized access to applications and functionality.

Session Hijacking Tools How do we attack it? ◦Firesheep  Intercepts browser cookies used by many sites, including Facebook and Twitter, to identify users and allows anyone running the program to log in as the legitimate user and do anything that user can do on a particular website. ◦Cross Site Scripting (XSS) ◦Hamster/Ferret ◦Man in the Middle (MITM)

Session Hijacking Demo HTTP Header Injection of hijacked cookie ◦Grab the existing cookie value (XSS, MITM, etc) ◦Create a new request, adding the captured value in the header.

Session Hijacking Mitigation How do we prevent it? ◦Use SSL ◦Set HTTPOnly and Secure on all cookies ◦No http links (secure only) ◦Set the HTTP Strict-Transport-Security (HSTS) header

Cross Site request forgery (CSRF)

Cross Site Request Forgery What is it? ◦While a user is authenticated into the target website (i.e. a banking website), the user visits another website (injection website) that is under the control of an attacker or a site (including the target site) that contains a vulnerability that the attacker can exploit.

CSRF Tools How can we attack it? ◦Pinata.py   Assists with the explanation of Cross Site Request Forgery and how a vulnerable application can be exploited. ◦CSRF Tool 

CSRF Demo HQM_h64 HQM_h64

CSRF Mitigation How can we prevent it? ◦Use a random token on every post. ◦Server-side must check it before processing the request. ◦If any POST endpoint lacks it — something is clearly wrong

Session Fixation

Permits an attacker to hijack a valid user session. When authenticating a user, the web application doesn’t assign a new session ID, making it possible to use an existing session ID.

Session Fixation Tools How do we attack it? ◦XSS ◦MITM ◦BlackSheep ◦FireSheep

Session Fixation Demo Perform a GET of the site Login Ensure that the Session ID changes

Session Fixation Mitigation How do we prevent it? ◦Clear the session on login/logout ◦Generate a new session ID on login/logout ◦Remove the session cookie on logout ◦Log the user out

Cross-Site Scripting (XSS)

What is it? ◦Cross-Site Scripting attacks occur when malicious scripts are injected into the otherwise benign and trusted web sites. An attacker uses a web application to send malicious code, generally in the form of a browser side script, to a different end user.

XSS Tools How can we attack it? ◦XSSer   Cross Site "Scripter" (aka XSSer) is an automatic -framework- to detect, exploit and report XSS vulnerabilities in web-based applications. ◦XSS Me (ff) ◦XSS-Proxy   XSS-Proxy is an advanced Cross-Site-Scripting (XSS) attack tool. The documents, tools and other content on this site assume you have a basic understanding of XSS issues and existing exploitation methods. If you are not famliar with XSS, then I recommend you check out the primer links/docs below to get a better of idea of what XSS is and how to detect it, fix it, and exploit it.

XSS Demo javascript:alert(pass.value)

XSS Mitigation How do we prevent it? ◦Validate the user input ◦Remove or encode special characters ◦Encode it before it is displayed ◦Use an Anti-XSS library

Questions?