8 simple ways to hack your joomla

62
Tenko Nikolov @tnikolov JWC’13 “8 simple ways to hack your Joomla!”

Upload: sitegroundcom

Post on 08-May-2015

52.739 views

Category:

Technology


6 download

DESCRIPTION

A presentation by Tenko Nikolov (@tnikolov) on Joomla World Conference 2013 about the most common ways to get your Joomla site hacked.

TRANSCRIPT

Page 1: 8 Simple Ways to Hack Your Joomla

Tenko Nikolov @tnikolov JWC’13

“8 simple ways to hack your Joomla!”

Page 2: 8 Simple Ways to Hack Your Joomla

a few words about me

Partner & CEO, SiteGround

Founder, 1H - www.1h.com

17+ years of IT Experience

Graduated Law School...

Passionate photographer

Performance addict

Security freak

Page 3: 8 Simple Ways to Hack Your Joomla

of 100,000 Joomla! sitesSiteGround is the home

Page 4: 8 Simple Ways to Hack Your Joomla

we face hundreds if not thousands of security attacks per day

Page 5: 8 Simple Ways to Hack Your Joomla

“Why would somebody hack me?”

Page 6: 8 Simple Ways to Hack Your Joomla

Hackers don’t really care about your site. All they care is to send some spam.

Page 7: 8 Simple Ways to Hack Your Joomla

If anybody tells you your site is unhackable, that guy is a liar!

“Security is a not a product, but a process.”

Page 8: 8 Simple Ways to Hack Your Joomla

1. Outdated Joomla! Core

Page 9: 8 Simple Ways to Hack Your Joomla

..of Joomla! file upload security bug

Quick demo..

Page 10: 8 Simple Ways to Hack Your Joomla

more info on the hack

• All versions before 3.1.5 and 2.5.14 are vulnerable

• Can be executed by any user, no admin rights needed

• The attacker can obtain full access to Joomla! and its surrounding userspace

Page 11: 8 Simple Ways to Hack Your Joomla

More info on the hack

Joomla!http://goo.gl/8YwZIk!

!Sucuri!

http://goo.gl/WjLKGm!!

SiteGround!http://goo.gl/NWkZTz

Page 12: 8 Simple Ways to Hack Your Joomla

Always update!

There is no excuse for not updating!

Page 13: 8 Simple Ways to Hack Your Joomla

Use software to get notified and update Joomla! Core

Page 14: 8 Simple Ways to Hack Your Joomla

Admin Tools https://www.akeebabackup.com/products/admin-tools.html

!!

Watchful.li https://watchful.li/features/

Page 15: 8 Simple Ways to Hack Your Joomla

Remember to create a backup before updating.

SiteGround does automatic Joomla! Updates too ;)

Page 16: 8 Simple Ways to Hack Your Joomla

Read security bulletins

!Joomla! Security News:

http://feeds.joomla.org/JoomlaSecurityNews !

Sucuri: http://blog.sucuri.net/?s=joomla

Page 17: 8 Simple Ways to Hack Your Joomla

2. Extensions

Page 18: 8 Simple Ways to Hack Your Joomla

• Here’s a Scenario:

• Your site is up to date

• Your extensions are up to date

• But you still get hacked…

• Wonder why?

Page 19: 8 Simple Ways to Hack Your Joomla

Extension vulnerabilities

• Sometimes when vulnerability in an extension is found, it takes the extension developers too much time to fix it.

• Therefore it’s always good to use a WAF!

• WAF = Web Application Firewall

Page 20: 8 Simple Ways to Hack Your Joomla

Popular WAFs

Page 21: 8 Simple Ways to Hack Your Joomla

-Wikipedia

“ModSecurity supplies an array of request filtering and other security features to the Apache HTTP Server, IIS and NGINX. ModSecurity is a web application layer firewall. ModSecurity is free software released under the Apache license 2.0.”

Page 22: 8 Simple Ways to Hack Your Joomla

SiteGround adds more than 200 mod_sec rules every week.

Page 23: 8 Simple Ways to Hack Your Joomla

example mod_sec rule

!!!!!!!!!!!#!30.Sep.2013!!!!!!!!!!!!#!joomla!com_seminar!Cross!site!scripting!Vulnerability!!!!!!!!!!!!#!http://cxsecurity.com/issue/WLBD2013090184!!!!!!!!!!!!SecFilterSelective!REQUEST_FILENAME!"index\.php"!"chain,id:00680"!!!!!!!!!!!!SecFilterSelective!ARG_option!"com_seminar"!chain!!!!!!!!!!!!SecFilterSelective!ARG_search!"onmouseover"

Page 24: 8 Simple Ways to Hack Your Joomla

CloudFlare and Incapsula are advanced mod_security alike FREE services which add

a CDN functionality.

Page 25: 8 Simple Ways to Hack Your Joomla
Page 26: 8 Simple Ways to Hack Your Joomla
Page 27: 8 Simple Ways to Hack Your Joomla

More Security Bulletins

Joomla! Extensions Security News: http://feeds.joomla.org/JoomlaSecurityVulnerableExtensions

Page 28: 8 Simple Ways to Hack Your Joomla

3. Themes

Page 29: 8 Simple Ways to Hack Your Joomla

-Nicholas Dionysopoulos

“Templates are software, not just a bunch of graphics. Template developers do release security upgrades all the time. Make sure you install them. I've seen many sites getting hacked because of a dated template with a SQL injection or XSS vulnerability.”

Page 30: 8 Simple Ways to Hack Your Joomla

Example

RocketTheme SQL injection in their modules!!

http://www.rockettheme.com/blog/extensions/1300-important-security-vulnerability-fixed

!

Page 31: 8 Simple Ways to Hack Your Joomla

WAF is good for themes too.

Page 32: 8 Simple Ways to Hack Your Joomla

4. Weak passwords

Page 33: 8 Simple Ways to Hack Your Joomla

Let me tell you a story…

Page 34: 8 Simple Ways to Hack Your Joomla

On April 9th we got hit by a huge brute force attack towards many Joomla!s

Page 35: 8 Simple Ways to Hack Your Joomla

… and we blocked more than 92,000 IPs in total across our network in just

bots used more than a thousand different IPs per server to scan for passes…

Page 36: 8 Simple Ways to Hack Your Joomla

In 12 hours we blocked more than 15 million login requests

But still, we thought many passwords were guessed

Page 37: 8 Simple Ways to Hack Your Joomla

And we were shocked how many passwords we found.

We then tried to brute force our clients ourselves.

Page 38: 8 Simple Ways to Hack Your Joomla

Like REEEEEALLLY WEAK!

Over 40% of our customers used Really Weak passwords.

Page 39: 8 Simple Ways to Hack Your Joomla

Username is admin

Let me show you how easy it is to crack a dumb password, say: “admin123”

Page 40: 8 Simple Ways to Hack Your Joomla

So in less than 10 seconds I’ve got your password

Page 41: 8 Simple Ways to Hack Your Joomla

Tip: Change your password to full sentence - it’s easy to remember and hard to guess like:

!

“I love to watch the sunset.”

Page 42: 8 Simple Ways to Hack Your Joomla

admin2 is not acceptable too ;) Try with yourname_adm1n

Tip 2: Change your username!

Page 43: 8 Simple Ways to Hack Your Joomla

Tip 3: Implement captcha on your login page

Page 44: 8 Simple Ways to Hack Your Joomla

5. Outdated Server Software

Page 45: 8 Simple Ways to Hack Your Joomla

http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/

Old PHP 5.3 running as CGI remote execution exploit

Page 46: 8 Simple Ways to Hack Your Joomla

http://testdomainname.com/j25/index.php?-s

Quick demo how it works:

Page 47: 8 Simple Ways to Hack Your Joomla

http://blog.sucuri.net/2012/06/security-vulnerability-in-mysql.html

MySQL p a s s w o r d - l e s s a u t h s e c u r i t y vulnerability. All 64bit MySQL versions up to 5.1.61, 5.2.11, 5.3.5, 5.5.22 are vulnerable

Page 48: 8 Simple Ways to Hack Your Joomla

Make sure your server side software is current at all times.

Page 49: 8 Simple Ways to Hack Your Joomla

6. Incorrectly configured server software

Page 50: 8 Simple Ways to Hack Your Joomla

http://seclists.org/fulldisclosure/2013/Aug/81

Apache Symlinks bug

Page 51: 8 Simple Ways to Hack Your Joomla

7. Joomla! Permissions

Page 52: 8 Simple Ways to Hack Your Joomla

Correct Joomla! Permissions set

• Folders: 755

• Files: 644

• configuration.php 444

Page 53: 8 Simple Ways to Hack Your Joomla

Incorrect Joomla! Permissions set

• All: 777

• Anything more than 755

Page 54: 8 Simple Ways to Hack Your Joomla

It’s a must to have account isolation, when hosted on shared.

Page 55: 8 Simple Ways to Hack Your Joomla

8. Malware

Page 56: 8 Simple Ways to Hack Your Joomla

They want to spam, remember?

Viruses and Trojans steal your login details.

Page 57: 8 Simple Ways to Hack Your Joomla

Or use Linux.. Or a Mac ;)

Stay up to date on anti-virus software.

Page 58: 8 Simple Ways to Hack Your Joomla

So let’s recap…• Update your Joomla!

• Update your extensions. Read security bulletins ones in a while.

• Update your themes. Don’t forget that!

• Use strong passwords and non default admin usernames.

• Make sure your server side software is current (PHP, Apache)

• Make sure your server side software is correctly setup

• Use correct file permissions for Joomla!

• Watch up for that sneaky malware

Page 59: 8 Simple Ways to Hack Your Joomla

Questions?

Page 60: 8 Simple Ways to Hack Your Joomla

In case you wondered - here’s my test environment

• CentOS 6 64bit VM with 2.6.32 kernel

• Apache/2.2.25 (latest)

• PHP 5.3.10 (latest is 5.3.27)

• Joomla! 2.5.13

Page 61: 8 Simple Ways to Hack Your Joomla

Thank you!

Page 62: 8 Simple Ways to Hack Your Joomla

@tnikolov [email protected]

Tenko Nikolov