OWASP Thailand-Beyond the Penetration Testing

29
Prathan Phongthiproek Management Consulting, KPMG Thailand Beyond the Penetration Testing

description

 

Transcript of OWASP Thailand-Beyond the Penetration Testing

Page 1: OWASP Thailand-Beyond the Penetration Testing

Prathan Phongthiproek!Management Consulting, KPMG Thailand

Beyond the Penetration Testing

Page 2: OWASP Thailand-Beyond the Penetration Testing

Penetration Testing !?

❖ Penetration Testing is more a process than mere scripts and tools;!❖ Time Management!❖ Methodology!❖ Risk Assessment!❖ Recommendation and Remediation Plan!❖ Reporting!❖ Superheroes !!

Page 3: OWASP Thailand-Beyond the Penetration Testing

Penetration Tester Average Annual Salary

http://www.payscale.com/research/US/Job=Penetration_Tester/Salary

Page 4: OWASP Thailand-Beyond the Penetration Testing

Penetration Testing

What management thinks I do.

What my client thinks I do.

What my parents think I do.

Page 5: OWASP Thailand-Beyond the Penetration Testing

What I think I do

Page 6: OWASP Thailand-Beyond the Penetration Testing

“Penetration Testing” versus “Hacking”

❖ Classic Penetration Testing!❖ Thinking inside the box!

❖ Assign Limited block of IP Address!

❖ Unable to go beyond the scope of approved list, Only touch xyz hosts, Don't touch abc host.!

❖ Follow Pentest Methodology; OSSTMM, NIST, Etc!

❖ Use public exploits: Exploit-db, Metasploit

❖ Real World Hacking!❖ Thinking outside the box!

❖ Know one piece of information and have to expand from there!

❖ Compromise all system and targeted attack!

❖ All Methodologies are integrated!

❖ Intelligent information gathering, 0-day exploit

Page 7: OWASP Thailand-Beyond the Penetration Testing

Battle Plan = PenTest Methodologies

❖ National Institute of Standards and Technology (NIST SP800-115)!❖ Open Source Security Testing Methodology Manual (OSSTMM)!❖ The Penetration Testing Execution Standard (PTES)!❖ Open Web Application Security Project (OWASP)

Page 8: OWASP Thailand-Beyond the Penetration Testing

OWASP Top 10 - 2013

https://www.owasp.org/index.php/Top_10_2013-Top_10

Page 9: OWASP Thailand-Beyond the Penetration Testing

Risk Rating Methodology

Risk = Likelihood factors + Impact factors

Threat Agent + Vulnerability Technical Impact + Business Impact

Page 10: OWASP Thailand-Beyond the Penetration Testing

Risk Assessment Calculator

Page 11: OWASP Thailand-Beyond the Penetration Testing

OWASP Testing Guide v4

❖ Released 17th September 2014!❖ 11 Domains!❖ 87 Modules

Informa(on)Gathering

Configura(on)and)Deploy)Management

Iden(ty)Management

Authen(ca(on

Authoriza(on

Session)Management

Input)Valida(on

Error)Handling

Weak)Cryptography

Business)Logic

Client)Side

Page 12: OWASP Thailand-Beyond the Penetration Testing

Don’t trust scan results

❖ Many testers follow a Nessus -> Metasploit Acunetix, IBM Appscan, HP Web Inspect!

❖ Need Manual Test: Identity Management, Authentication, Authorization, Business Logic, Client Side Testing !

❖ These tools are our eyes and ears, nothing more!

❖ Human - 80%, Tools - 20%

Page 13: OWASP Thailand-Beyond the Penetration Testing

Go Beyond…

❖ Some application is protected by Blacklist Checking or Web Application Firewall (WAF)!

❖ Understand the Application and Look into developer mind!

❖ Combine & Conquer!❖ This is what our clients are

paying us to do

Page 14: OWASP Thailand-Beyond the Penetration Testing

Manual and Semi-automated Tool

Page 15: OWASP Thailand-Beyond the Penetration Testing

Case Study #1: SQLi 101

❖ Select * from users where username=‘input1’ and password=‘input2’!

username= ‘ or a=a#!

password= whatever!

❖ Select * from users where username=‘’ or a=a#’ and password=‘whatever’!

❖ Select * from users where FALSE or TRUE!

FALSE or TRUE = TRUE

Page 16: OWASP Thailand-Beyond the Penetration Testing

Case Study #1: SQLi 101

❖ Blacklisting comment characters (# or - -)!❖ Select * from users where username=‘input1’ and password=‘input2’!

username= ‘ or ‘a’=‘a!

password= whatever!

❖ Select * from users where username=‘’ or ‘a’=‘a’ and password=‘whatever’!

❖ Select * from users where FALSE or [ TRUE and FALSE ]!

FALSE or FALSE = FALSE

Page 17: OWASP Thailand-Beyond the Penetration Testing

Case Study #1: SQLi 102

❖ Blacklisting comment characters (# or - -)!❖ Select * from users where username=‘input1’ and password=‘input2’!

username= ‘ or a=a or ‘a’=‘a!

password= whatever!

❖ Select * from users where username=‘’ or a=a or ‘a’=‘a’ and password=‘whatever’!

❖ Select * from users where FALSE or TRUE or [ TRUE and FALSE ]!

FALSE or TRUE or FALSE = TRUE

Page 18: OWASP Thailand-Beyond the Penetration Testing

Case Study #1: SQLi 102

Page 19: OWASP Thailand-Beyond the Penetration Testing

Case Study #1: SQLi 102

Page 20: OWASP Thailand-Beyond the Penetration Testing

Case Study #2: Account Enumeration

❖ Locate at Amazon Virtual Private Cloud!

❖ Running IIS8.0!

❖ PHP latest version!

❖ No issue from scan results

Page 21: OWASP Thailand-Beyond the Penetration Testing

Case Study #2: Account Enumeration

Page 22: OWASP Thailand-Beyond the Penetration Testing

Case Study #2: Account Enumeration

Page 23: OWASP Thailand-Beyond the Penetration Testing

Case Study #3: Mobile App Hard Coded

Page 24: OWASP Thailand-Beyond the Penetration Testing

Case Study #3: Mobile App Hard Coded

Page 25: OWASP Thailand-Beyond the Penetration Testing

Case Study #4: Whitebox PentestMS03-026

RPC DCOM

KNF6A2350 KNF6A2351

KNF6A2349-01 KNF6A2300

KNF6A2334-01 KNF6A2314-01

KNF6A2324-02 KNF6A2329-02

KNF6A3479-01 MNF20AV6229-01

MS0

5-03

9

NSRVAPP1 NSRVAPP2 NSRVDB1

MS PnP Overflow

MSSQL (1433)

MSSQL

NFSHP4 KNF6A2337-01 KNF6A2339-01

KNF6A2354-01 KNF6A3475-01 MNF20AB6214-02KNF6A2355

3389

33893389

3389

3389

3389

3389

3389

3389

33893389

3389

3389

3389

3389

3389

3389

3389

3389

Dev Dev2 Interweb Intraweb NFSImage NFSDATA

WEB2ADEVWEB1 WEB2B WEB2C WEB2D WEB2E SQL

DEVWEB2

3389

3389

172.18.77.21 (AD)

3389

3389

3389

172.18.77.22 (EXCHANGE)

172.23.111.24

172.23.111.21

Page 26: OWASP Thailand-Beyond the Penetration Testing

Team Rules

#1: Act like a warrior, Don't be a zombie.!

#2: CRITICAL/HIGH issues or Compromise the system, You get a Free BUFFET !!!

#3: If you miss it, I get a Free BUFFET+…!

#4: Keep Statistics (PWNED’em ALL)

Page 27: OWASP Thailand-Beyond the Penetration Testing

Reporting

❖ 1 Page Executive Summary!

❖ Remediation plan for short term and long term!

❖ Clear Description!

❖ Sharp Risk Rating!

❖ Make sense recommendation!

❖ and Great Presentation

Page 28: OWASP Thailand-Beyond the Penetration Testing

PenTesters Code of EthicsI will never copy and paste automated results to report!I will never completely trust scan results!I will go beyond scanning results!I will thinking outside of the Box!My report will rock !!

Page 29: OWASP Thailand-Beyond the Penetration Testing

Facebook: https://www.facebook.com/tan.prathan!Linkedin: https://www.linkedin.com/in/pprathan!Slideshare: https://www.slideshare.net/pprathan!Vimeo: https://vimeo.com/prathan

Thank you