59
Daniel Kanchev @dvkanchev 8 Most Popular Joomla! Hacks & How To Avoid Them

8 Most Common Joomla! Hacks and How to Avoid Them

Embed Size (px)

DESCRIPTION

On 23.03.2013 I visited The Netherlands to give the keynote speak about Joomla! web security. I talked about the most common 8 ways a Joomla! website can get hacked. So you should check the presentation if you are a Joomla! hacker that knows less than 8 ways :) It will be useful for you. However, if you are a Joomla user that doesn’t know anything about how to hack a Joomla!, or even worse, how to protect your Joomla! from being hacked, you should definitely check the slides! Because there is a way to protect yourself from each of the common Joomla hacks that I revealed them in the presentation. I went through the following scenarios and what should be done to prevent each of them: - Hacked through outdated Joomla!/extensions/themes. - Hacked through a vulnerable extensions/themes, that is not outdated - Hacked with the help of stolen/weak login details - Hacked through outdated/vulnerable server software - Apache, PHP, MySQL. - Hacked through incorrectly configured web server - A completely healthy site hacked through another vulnerable Joomla that is hosted on the same server - Hacked because of incorrect Joomla permissions - Hacked through malware on local PC which allows attackers to access a healthy site

Citation preview

Page 1: 8 Most Common Joomla! Hacks and How to Avoid Them

Daniel Kanchev @dvkanchev

8 Most Popular Joomla! Hacks &

How To Avoid Them

Page 2: 8 Most Common Joomla! Hacks and How to Avoid Them

Daniel Kanchev

7+ Years of Joomla! experience 5 Years with SiteGround Security Freak Performance Guru @SG VIP Customer Management Server Migration Specialist Love FOSS Addicted to extreme sports

Before we begin …

@dvkanchev

Page 3: 8 Most Common Joomla! Hacks and How to Avoid Them

of over 130,000 Joomla! sitesSiteGround is the home

Page 4: 8 Most Common Joomla! Hacks and How to Avoid Them

We face hundreds if not thousands security attacks per day …

Page 5: 8 Most Common Joomla! Hacks and How to Avoid Them

Why should YOU care?

Page 6: 8 Most Common Joomla! Hacks and How to Avoid Them

“Why would somebody hack me?”

Page 7: 8 Most Common Joomla! Hacks and How to Avoid Them

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

Page 8: 8 Most Common Joomla! Hacks and How to Avoid Them

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

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

Page 9: 8 Most Common Joomla! Hacks and How to Avoid Them

1. Outdated Joomla! Core

Page 10: 8 Most Common Joomla! Hacks and How to Avoid Them

…of Joomla! file upload security bug

Quick demo…

Page 11: 8 Most Common Joomla! Hacks and How to Avoid Them

More info on the hack

• All versions before 3.1.5 and 2.5.14 are vulnerable

• Can be executed by anybody, no admin rights needed

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

Page 12: 8 Most Common Joomla! Hacks and How to Avoid Them

More info on the hackJoomla!!

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

Sucuri!http://goo.gl/WjLKGm!

!SiteGround!

http://goo.gl/NWkZTz

Page 13: 8 Most Common Joomla! Hacks and How to Avoid Them

UPDATE! UPDATE! UPDATE!

Page 14: 8 Most Common Joomla! Hacks and How to Avoid Them

Use software to get notified and update Joomla! Core

Page 15: 8 Most Common Joomla! Hacks and How to Avoid Them

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

tools.html !!!

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

Page 16: 8 Most Common Joomla! Hacks and How to Avoid Them

SiteGround offers Joomla! Auto Update

Page 17: 8 Most Common Joomla! Hacks and How to Avoid Them

Read security bulletins

!

Joomla! Security News:!http://feeds.joomla.org/JoomlaSecurityNews

!

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

Page 18: 8 Most Common Joomla! Hacks and How to Avoid Them

2. Extensions

Page 19: 8 Most Common Joomla! Hacks and How to Avoid Them

• Your site is up to date

• Your extensions are up to date

• But you still get hacked…

• Wonder why?

Here’s a Scenario:

Page 20: 8 Most Common Joomla! Hacks and How to Avoid Them

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 21: 8 Most Common Joomla! Hacks and How to Avoid Them

Popular WAFs

Page 22: 8 Most Common Joomla! Hacks and How to Avoid Them

SiteGround adds more than 200 mod_sec rules every week.

Page 23: 8 Most Common Joomla! Hacks and How to Avoid Them

Example mod_sec rule

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

Page 24: 8 Most Common Joomla! Hacks and How to Avoid Them

CloudFlare and Incapsula are advanced mod_security alike FREE services

which add a CDN functionality.

Page 25: 8 Most Common Joomla! Hacks and How to Avoid Them
Page 26: 8 Most Common Joomla! Hacks and How to Avoid Them

More Security Bulletins

Joomla! Extensions Security News:!!

http://feeds.joomla.org/JoomlaSecurityVulnerableExtensions

Page 27: 8 Most Common Joomla! Hacks and How to Avoid Them

3. Themes

Page 28: 8 Most Common Joomla! Hacks and How to Avoid Them

-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 29: 8 Most Common Joomla! Hacks and How to Avoid Them

Example

RocketTheme SQL injection in their modules!!

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

!

Page 30: 8 Most Common Joomla! Hacks and How to Avoid Them

WAF is good for themes too!

Page 31: 8 Most Common Joomla! Hacks and How to Avoid Them

4. Weak passwords

Page 32: 8 Most Common Joomla! Hacks and How to Avoid Them
Page 33: 8 Most Common Joomla! Hacks and How to Avoid Them

Let me tell you a story…

Page 34: 8 Most Common Joomla! Hacks and How to Avoid Them

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

Page 35: 8 Most Common Joomla! Hacks and How to Avoid Them

… 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 Most Common Joomla! Hacks and How to Avoid Them

In 12 hours we blocked more than 15 million login requests

But still, we thought many passwords were guessed

Page 37: 8 Most Common Joomla! Hacks and How to Avoid Them

And we were shocked how many passwords we found.

We then tried to brute force our clients ourselves.

Page 38: 8 Most Common Joomla! Hacks and How to Avoid Them

Over 40% of our customers used Really Weak passwords.

Page 39: 8 Most Common Joomla! Hacks and How to Avoid Them

Username is admin

Let me show you how easy it is to guess a dumb password, say:

“pass123”

Page 40: 8 Most Common Joomla! Hacks and How to Avoid Them

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

Page 41: 8 Most Common Joomla! Hacks and How to Avoid Them

Tip: Change your password to a full sentence (from a favourite book) - it’s easy

to remember and hard to guess like: !

“I love to watch the sunset.”

Page 42: 8 Most Common Joomla! Hacks and How to Avoid Them

admin2 is not acceptable too ;) Try with: !

yourname_@dm1n

Tip 2: Change your username!

Page 43: 8 Most Common Joomla! Hacks and How to Avoid Them

Tip 3: Additionally secure your administrator login page

• Allow access only from certain IP addresses

• Add Captcha

• Password protect the administrator folder

• Use secret URL parameters

Page 44: 8 Most Common Joomla! Hacks and How to Avoid Them

5. Outdated Server Software

Page 45: 8 Most Common Joomla! Hacks and How to Avoid Them

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

Old PHP 5.3 running as CGI remote execution exploit

Page 46: 8 Most Common Joomla! Hacks and How to Avoid Them

Quick demo…

Page 47: 8 Most Common Joomla! Hacks and How to Avoid Them

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

Page 48: 8 Most Common Joomla! Hacks and How to Avoid Them

6. Incorrectly configured server software

Page 49: 8 Most Common Joomla! Hacks and How to Avoid Them

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

Apache Symlinks bug

public_html/fred.txt —> /home/otheracct/public_html/configuration.php

Add to httpd.conf or .htaccess file: SymLinksIfOwnerMatch

The Problem:

The Solution:

Page 50: 8 Most Common Joomla! Hacks and How to Avoid Them

7. Joomla! Permissions

Page 51: 8 Most Common Joomla! Hacks and How to Avoid Them

Correct Joomla! Permissions set

• Folders: 755 • Files: 644 • configuration.php: 444

Page 52: 8 Most Common Joomla! Hacks and How to Avoid Them

Incorrect Joomla! Permissions set

• All: 777 • Anything more than: 755

Page 53: 8 Most Common Joomla! Hacks and How to Avoid Them

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

Page 54: 8 Most Common Joomla! Hacks and How to Avoid Them

8. Malware

Page 55: 8 Most Common Joomla! Hacks and How to Avoid Them

Viruses and Trojans steal your login details.

Page 56: 8 Most Common Joomla! Hacks and How to Avoid Them

Stay up to date on anti-virus software.

Page 57: 8 Most Common Joomla! Hacks and How to Avoid Them

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, MySQL)

• Make sure your server side software is correctly setup

• Use correct file permissions for Joomla!

• Watch up for that sneaky malware

Page 58: 8 Most Common Joomla! Hacks and How to Avoid Them

Questions?

Page 59: 8 Most Common Joomla! Hacks and How to Avoid Them

THANK YOU!