38
Prajal Kulkarni @prajalkulkarni The Tale of 100 CVE’s

The tale of 100 cve's

Embed Size (px)

Citation preview

Page 1: The tale of 100 cve's

Prajal Kulkarni@prajalkulkarni

The Tale of 100 CVE’s

Page 2: The tale of 100 cve's

@about me

• Security Engineer @Flipkart

• Likes to do Bug Hunting!

• Loves coding in Python

• Member of null security community

• Lead vocalist @Sathee

@prajalkulkarni

Page 3: The tale of 100 cve's

WordPress Security Ecosystem!

100 CVE’s in less than a month!

How we did it?

What Tale?

Page 4: The tale of 100 cve's

60 Million Websites Worldwide

Powers 1 in 5 of all the worlds websites in the world

-Matt

Current stable release 3.9.1

Version 3.8 downloads > 20 Million times-Stats from Wikipedia

Page 5: The tale of 100 cve's

Wordpress Ecosytem

Page 6: The tale of 100 cve's
Page 7: The tale of 100 cve's

Scary Enough?

Page 8: The tale of 100 cve's

Still not??

Page 9: The tale of 100 cve's
Page 10: The tale of 100 cve's

WordPress Core – Stable 3.9.1

31,154 Plugins

More than 2.5K Themes

Wordpress Security Ecosytem

Page 11: The tale of 100 cve's

Our attempt to Improve the Ecosystem

Page 12: The tale of 100 cve's

Once Upon a Time

Credits - Anant Shrivastava

Page 13: The tale of 100 cve's

Wait Something not right!

Page 14: The tale of 100 cve's

Vulnerabilities Found!

Full path disclosure

-pma/error.php-pma/libraries/PMA_List_Database.class.php

PHP info disclosure

-pma/phpinfo.php

Security Bypass Allows direct access.

-pma/server_databases.php - Full access to all features including SQL window

-pma/main.php – reveals all the details of the database

Page 15: The tale of 100 cve's

Timeliness

• Author Contacted: 24 July 2013

• No positive response from the author

• Wordpress Security Team contacted: 11 September 2013

• Plugin Disabled in the repository : 21 October 2013

Page 16: The tale of 100 cve's

End Result?Plugin Closed!

CVE-2013-4462http://seclists.org/oss-sec/2013/q4/144

Page 17: The tale of 100 cve's

Started Project CodeVigilant

• Spot new issues in Plugins/Themes

• Report to the relevant author

• Get the patch released

• Else close the Plugin/Theme

Page 18: The tale of 100 cve's

What is required?

Apache/MySQL/PHP

XAMPP/WAMP

Python 2.7

Page 19: The tale of 100 cve's

Our Approach

Download the latest WordPress and install locally

Download all Plugins (31k)

Download all Themes (2.5k)

Page 20: The tale of 100 cve's

From Where do I get plugins/themes??

Page 21: The tale of 100 cve's

http://themes.svn.wordpress.org/

Page 22: The tale of 100 cve's

Download Themes Locally

Page 23: The tale of 100 cve's

Now What?

Page 24: The tale of 100 cve's

Started with Manual Approach!

Analyze Plugin/Theme source code

Understand the logic

Find Issues

Report !

Page 25: The tale of 100 cve's

Slow Results!!

Page 26: The tale of 100 cve's

Two Weeks Stats ??

Vulnerability Chart

LFI

Xss

Auth Bypass

Using Components With Known Vulnerabilities

10

9

1

1

Page 27: The tale of 100 cve's

Took a Lot of Time!

Page 28: The tale of 100 cve's

Lets Automate Everything!

Page 29: The tale of 100 cve's

Started with Cross site Scripting!

Page 30: The tale of 100 cve's
Page 31: The tale of 100 cve's

Simple Logic!

Find all $_GET parameters

Replace their value with chk_string: '><script>alert(document.cookie)</script>

Send the request with the appropriate URL structure

Check if the response contains the chk_string

Page 32: The tale of 100 cve's

Guess What!

• More than 100 valid XSS!

• Testing for XSS we also stumbled upon:– SSRF– LFI– Unvalidated Redirects and

Forwards

Page 33: The tale of 100 cve's

Stats for the next 3 weeks!A3-Cross-Site Scripting 211

Unvalidated Redirects and Forwards

4

Local File Inclusion 6

Information Disclosure 1

Direct access & Auth Bypass

1

Using Components with Known Vulnerabilities

30

SSRF/XSPA 4

Injection 9

Page 34: The tale of 100 cve's
Page 35: The tale of 100 cve's

http://codevigilant.com/

Page 36: The tale of 100 cve's

Future for codevigilant

Automation frameworks for other vulnerabilities

Explore other platforms like Drupal & Jumla

Encourage External Researchers to contribute.

Page 37: The tale of 100 cve's

Prajal Kulkarni

@prajakulkarni http://www.prajalkulkarni.com

Anant Shrivastava @anantshri

http://www.anantshri.info

Project Leads

Page 38: The tale of 100 cve's

Questions?