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,

Slides:



Advertisements
Similar presentations
Module XIV SQL Injection
Advertisements

MY NCBI (module 4.5). MODULE 4.5 PubMed/How to Use MY NCBI Instructions - This part of the: course is a PowerPoint demonstration intended to introduce.
SQL Injection Stephen Frein Comcast.
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.
Creating Stronger, Safer, Web Facing Code JPL IT Security Mary Rivera June 17, 2011.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
Understand Database Security Concepts
Automating Bespoke Attack Ruei-Jiun Chapter 13. Outline Uses of bespoke automation ◦ Enumerating identifiers ◦ Harvesting data ◦ Web application fuzzing.
-Ajay Babu.D y5cs022.. Contents Who is hacker? History of hacking Types of hacking Do You Know? What do hackers do? - Some Examples on Web application.
By Brian Vees.  SQL Injection  Username Enumeration  Cross Site Scripting (XSS)  Remote Code Execution  String Formatting Vulnerabilities.
1. What is SQL Injection 2. Different varieties of SQL Injection 3. How to prevent it.
Misc. Announcements Backup your work! Document team members’ contributions (so that if there is any dispute …) More Bonus credits: Create screencasts for.
Peter Torres, Tim Poley CS526 Spring  What is SQL Injection?  Basic Example  Case Studies  Defensive Techniques  Demo.
SQL Injection and Buffer overflow
Albert Gonzales showed early talent and very easily breezed through computer classes. His remarkable computer skills allowed him to hack into the government.
Chapter 6: Hostile Code Guide to Computer Network Security.
Web Application Attacks ECE 4112 Fall 2007 Group 9 Zafeer Khan & Simmon Yau.
{ Code Injection Cable Johnson.  Overview  Common Injection Types  Developer Prevention Code Injection.
SQL Injection Timmothy Boyd CSE 7330.
MIS Week 11 Site:
+ Websites Vulnerabilities. + Content Expand of The Internet Use of the Internet Examples Importance of the Internet How to find Security Vulnerabilities.
An anti-hacking guide.  Hackers are kindred of expert programmers who believe in freedom and spirit of mutual help. They are not malicious. They may.
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.
Computer Security and Penetration Testing
Software Security Testing Vinay Srinivasan cell:
Attacking Applications: SQL Injection & Buffer Overflows.
1 Internet Browsing Vulnerabilities and Security ECE4112 Final Lab Ye Yan Frank Park Scott Kim Neil Joshi.
Tutorial 10 Programming with JavaScript
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
INTRUDERS BY VISHAKHA RAUT TE COMP OUTLINE INTRODUCTION TYPES OF INTRUDERS INTRUDER BEHAVIOR PATTERNS INTRUSION TECHNIQUES QUESTIONS ON INTRUDERS.
Attacking Data Stores Brad Stancel CSCE 813 Presentation 11/12/2012.
SQL Injection Introduction, Demo and Overview. What is SQL Injection? Insertion of SQL statements into application inputs to corrupt, exploit, or otherwise.
SQL Injection Jason Dunn. SQL Overview Structured Query Language For use with Databases Purpose is to retrieve information Main Statements Select Insert.
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.
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.
SQL – Injections Intro. Prajen Bhadel College of Information Technology & Engeneering Kathmandu tinkune Sixth semister.
Web Security Lesson Summary ●Overview of Web and security vulnerabilities ●Cross Site Scripting ●Cross Site Request Forgery ●SQL Injection.
Databases Kevin Wright Ben Bruckner Group 40. Outline Background Vulnerabilities Log File Cleaning This Lab.
Example – SQL Injection MySQL & PHP code: // The next instruction prompts the user is to supply an ID $personID = getIDstringFromUser(); $sqlQuery = "SELECT.
SQL Injection Attacks An overview by Sameer Siddiqui.
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.
KEYLOGGERS BY COLLIN DONALDSON. DISCLAIMER Hacking is only legal under the following circumstances: 1.You hack (penetration test) a device/network you.
DISCLAIMER  Hacking is only legal under the following circumstances: 1. You hack (penetration test) a device/network you own. 2. You gain explicit, documented.
ADVANCED SQL.  The SQL ORDER BY Keyword  The ORDER BY keyword is used to sort the result-set by one or more columns.  The ORDER BY keyword sorts the.
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.
By Collin Donaldson Man in the Middle Attack: Password Sniffing and Cracking.
SQL INJECTION Diwakar Kumar Dinkar M.Tech, CS&E Roll Diwakar Kumar Dinkar M.Tech, CS&E Roll
Application Vulnerabilities
SQL Injection.
Group 18: Chris Hood Brett Poche
Module: Software Engineering of Web Applications
Module: Software Engineering of Web Applications
Web Application Vulnerabilities, Detection Mechanisms, and Defenses
Security Testing Methods
World Wide Web policy.
Cross-Site Scripting Travis Deyarmin.
The Security Problem Security must consider external environment of the system, and protect it from: unauthorized access. malicious modification or destruction.
Secure Software Development: Theory and Practice
Intro to Ethical Hacking
Ways to Secure CMS Websites. The most widely used Content Management Systems are Wordpress, Joomla and Drupal as per statistics. The highest CMS platforms.
Chapter 13 Security Methods Part 3.
Lecture 2 - SQL Injection
Web Hacking: Beginners
CS5123 Software Validation and Quality Assurance
Intro to Ethical Hacking
Presentation transcript:

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, documented permission from an individual, assumedly a friend. 3.You acquire an Ethical Hacker Certification and hack for a public or private sector organization with explicit permission to do so. This is the safest of the three methods. Hacking is illegal in all other circumstances. Hackers can be charged with fines, misdemeanors, and/or felonies depending on severity and accounts of hacks. For these reasons I will not be demonstrating any live hacking attempts in the wild. For more information DISCLAIMER

A type of code injection. Code injection is when a hacker exploits a computer vulnerability that allows invalid data to be processed. The hacker introduces or injects a malicious virus/script/command into the program to change the program’s execution. SQL injection is one of the most popular forms of code injection and is used to hack data-driven web applications that use SQL or a derivative of SQL. SQL is a type of vector, which means it is designed to infiltrate a system and than propagate itself. Buffer overflow is a related technique that is also a vector. In nature, a vector is any animal that carries a biological virus, such as rats /fleas carrying bubonic plague or mosquitos carrying malaria or West Nile virus. Definition

“The vulnerability happens when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is weakly typed and unexpectedly executed.” String literal escape characters are characters that initiate different controls in a program (authenticate, end program, etc.). If a program is incorrectly filtered it will not reject other characters such as (#,, =, *, etc.) Weak-typed means the software was written in a language that does not support memory safety, type safety, static type safety, or dynamic type safety. Java is strongly typed, however C++ is weakly typed and it is what SQL is written in. Hence why SQL is a popular target. How it works and why

Find a website with a URL that looks like one of the following example: Look for the “php?id=5” note: can be any number after the = sign. Now type an invalid string literal escape character after the last character in the URL, in this case after the “5”. An apostrophe ‘ or pound sign # are recommended. If the site produces and error such as “syntax error” or “error on line 23” or any similar error, the website you found is vulnerable to an SQL injection. If an error is not produced, search for a new website. Step One: Casing

There are many ways to launch an SQL injection. Here are two common ones. SQL Tag Injection: Type a pound sign (#) into the websites URL followed by malicious code. SQL tags use a format like this: #TABLE1_SELECT_ROW2ksd nazx If you know SQL than you can give the table commands remotely, including pasting in source code for viruses. This method is more flexible and allows a wider range of options, yet for simplicity sake we will use a second option. The second option: a generic SQL injection. Step Two: Choose method of injection

Look for a page with a URL similar to the following: You can also use an SQL injection tool to help you find the login page, some examples being Absinthe, Havij, or sqlmap. We will not cover the use of tools however. Now it is time to launch the SQL Injection attack. Step Three: Find a login/admin page

Type any of the following on the username and password section of the login page 1 ′ OR ’1 ′ =’1 1 OR 1=1 1’1 1 AND 1=1 1 EXEC SP_ (or EXEC XP_) 1 ′ AND 1=(SELECT COUNT(*) FROM tablenames); – If none of the codes work, look for more by searching “SQL Injection Codes” Step 4: Launching the Attack

You are now in the system and have successfully hacked a website. Congratulations! At this point, you may want to leave (if you are only hacking to learn that is). You now have full reign over an SQL database. What you do with the database is up to you. You can access and edit the database like any other user, except that you have to hack in again (unless you inject a script that opens a backdoor to the database you can use). For more information on what you can do once inside, refer to the following: Step 5: Malicious Activity

OR YOU DECIDE