real applications, real vulnerabilities really exploited ...€¦ · 3 authentication bypass os...

22
1 Real Applications, Real Vulnerabilities Really Exploited Quintin Russ OWASP New Zealand Day 2011 7th July 2011

Upload: others

Post on 08-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

1

Real Applications, Real VulnerabilitiesReally Exploited

Quintin Russ

OWASP New Zealand Day 20117th July 2011

Page 2: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

2

About Me

● Quintin Russ● Technical Director, SiteHost

– http://www.sitehost.co.nz– [email protected]

● Web Developer in previous life● Built first website in 2002

Page 3: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

3

Authentication Bypass

● OS Commerce bug - November 2009● Popular ecommerce web application● Bypassed by appending /login.php to URI● unpatched installs still being exploited in the wild.● GET /admin/index.php => /admin/login.php● GET /admin/index.php/login.php => #winning

Page 4: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

4

Authentication Bypass

● OS Commerce bug - November 2009

Page 5: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

5

Authentication Bypass

● OS Commerce bug - November 2009

Page 6: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

6

Authentication Bypass

● Demo Time.

Page 7: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

7

Authentication Bypass

● How to Prevent● Patch!● Track your upstream for updates● Read the documentation● Identify and reduce attack surface - /admin dir● Disable upload and / or execution of uploaded files● Use standard authentication frameworks

Page 8: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

8

Remote Code Execution

● Wordpress plugins – June 2011● Wordpress team detected suspicious commits● All passwords reset as a “prophylactic measure”● 3 popular plugins backdoored for 48 hours

Page 9: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

9

Remote Code Execution

● Wordpress plugins altered source code● W3C Total Cache

● WPtouch

Page 10: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

10

Remote Code Execution

● Wordpress plugins altered source code● W3C Total Cache

● WPtouch

Page 11: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

11

Remote Code Execution

● How to Prevent● Patch!● Track your upstream for updates● Be wary of any 3rd party plugin● Read the Wordpress hardening guide● Identify and reduce attack surface - /wp-admin dir

Page 12: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

12

SQL Injection

● SQL Injection – its everywhere

Page 13: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

13

SQL Injection

● SQL Injection – its everywhere

Page 14: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

14

SQL Injection

● SonyPictures.com – June 2011● 1,000,000 users personal information lost● Passwords stored in plain text● One of many sites that got compromised● SQL Injection is still a problem today

Page 15: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

15

SQL Injection

● Cacti 0.8.7e● Popular RRD graphing tool ● Pre-auth SQL bug found by Stefan Esser in 2010

Page 16: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

16

SQL Injection

● Cacti 0.8.7e● Popular RRD graphing tool ● Pre-auth SQL bug found by Stefan Esser in 2010

Page 17: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

17

Remote Code Execution

● How to Prevent● Patch!● Read the OWASP guides on SQL Injection● https://www.owasp.org/index.php/Guide_to_SQL_Injection

● Use a framework with Parameterized queries● Validate input, escape output

Page 18: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

18

We're Hiring!

Real Applications - Real VulnerabilitiesReally Exploited.

Quintin [email protected]

Thank you for listening, questions?

Page 19: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

19

Authentication Bypass

● Authentication Bypass Resources● https://www.owasp.org/index.php/Broken_Access_Cont

rol● http://seclists.org/fulldisclosure/2009/Nov/169

Page 20: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

20

Remote Code Execution

● Remote Code Execution Resources● https://www.owasp.org/index.php/Direct_Dynamic_Cod

e_Evaluation_%28%27Eval_Injection%27%29● https://wordpress.org/news/2011/06/passwords-reset/● http://mtekk.us/archives/enemy-of-the-spammers/wp-

org-commit-evil-code/

Page 21: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

21

SQL Injection

● SQL Injection Resources● https://www.owasp.org/index.php/SQL_Injection● https://www.owasp.org/index.php/Testing_for_MySQL● http://php-security.org/2010/05/13/mops-2010-023-

cacti-graph-viewer-sql-injection-vulnerability/index.html

Page 22: Real Applications, Real Vulnerabilities Really Exploited ...€¦ · 3 Authentication Bypass OS Commerce bug - November 2009 Popular ecommerce web application Bypassed by appending

22

We're Hiring!

Real Applications - Real VulnerabilitiesReally Exploited.

Quintin [email protected]

Thank you for listening, questions?