didzis balodis - web application security – war stories from real penetration testing engagements

20
Web application security war stories from real penetration testing engagements Didzis Balodis, CISSP, GPEN Lead of security and infrastrucure division

Upload: devconfu

Post on 13-May-2015

80 views

Category:

Software


1 download

DESCRIPTION

The talk will cover some of the most common mistakes which are identified during recent web application security assessments. Those include but are not limited to various types of injections (SQLi, XSS, etc.), local file access and business logic flaws. During the talk practical examples will be demonstrated along with the mitigation tools and techniques.

TRANSCRIPT

Page 1: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Web application security – war

stories from real penetration

testing engagements

Didzis Balodis, CISSP, GPEN

Lead of security and infrastrucure division

Page 2: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Contents

Page 3: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Didzis Balodis

• Lead of DPA Securituy and Infrastructure division

• More than 10 years in IT (from year 1999)

• System administration, development, security

• Last 5 years – IT consulting, audits, security, penetration testing (more

than 50 engagements)

• Hobby - wifi hacking

• Certifications:

• CISSP- Certified Information System Security Professional

• GPEN – GIAC Certified Penetration Tester

Page 4: Didzis Balodis - Web application security – war stories from real penetration testing engagements

DPA security portfolio

IT audit and security testing:

Network pentests

Wireless network assessment

Web application security testing

Social engineering

Compliance

Security awareness trainings

Page 5: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Statistics

of web aplications contain at least

High risk vulnerability

Page 6: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Injections on the rise

ENISA Threat Landscape 2013 report:

«....Cross-Site Scripting (XSS), Directory Traversal, SQL injection

(SQLi) and Cross-Site Request Forgery (CSRF).

... injection attacks are on sharp rise.»

Page 7: Didzis Balodis - Web application security – war stories from real penetration testing engagements

It`s easy...

Statistics:

Page 8: Didzis Balodis - Web application security – war stories from real penetration testing engagements

OWASP TOP 10

A1- Injection (SQL, LDAP, SMTP, XML...) A2-Broken Authentication and Session Management

A3-Cross-Site Scripting (XSS) A4-Insecure Direct Object References

A5-Security Misconfiguration A6-Sensitive Data Exposure

A7-Missing Function Level Access Control A8-Cross-Site Request Forgery (CSRF)

A9-Using Components with Known Vulnerabilities A10-Unvalidated Redirects and Forwards

Page 9: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Consequences..

Stolen or

published client

data

Leakage of internal

company

information

Loss of reputation

Compliance and

legal issues

(Personal data

protection)

System downtime Financial losses

Page 10: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Example 1

Page 11: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Example 2

Page 12: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Example 3

Page 13: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Example 4

Page 14: Didzis Balodis - Web application security – war stories from real penetration testing engagements

DEMO TIME

Page 15: Didzis Balodis - Web application security – war stories from real penetration testing engagements

SQLi

http://somesystem.lv/ gettextLang=0&usr_login=loginKWgn&usr_password=aaa&sendpost=PieslÄgties sistÄmai' AND (SELECT 4747 FROM

(SELECT COUNT(*),CONCAT(0x3a76796a3a,

(SELECT (CASE WHEN (4747=4747) THEN 1 ELSE 0 END)),

0x3a787a693a,FLOOR(RAND(0)*2))x FROM

INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a)

AND 'KWgn'='KWgn&usr_password=aaa&sendpost=PieslÄgties sistÄmai

Page 16: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Insecure upload

Page 17: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Be proactive

To avoid unpleasnt surprise-

before someone else will do

Page 18: Didzis Balodis - Web application security – war stories from real penetration testing engagements

How it is done

• Network layer

• App layer

Identification/ automated tests

• Injections

• Sessions

• Business logic, etc

Manual testing

• DoS

• Report

• Re-tests

Finalizing

Page 19: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Recap

Page 20: Didzis Balodis - Web application security – war stories from real penetration testing engagements

Questions?