Last week, we became aware of a number of customers websites being altered, with the addition of some extra hidden code to customer’s home pages.
No personal data has been compromised (apart from an encrypted version of FTP passwords) and all sites have been restored as far as possible.
We have been investigating this and whilst we first thought that this attack was possible through the exploitation of weak customer passwords, we have now proved that the hacker was manipulating our ftp server username and password database, and adding additional usernames into the system in order to gain access to customer’s websites.
We have been able to successfully monitor this attack in action, which has allowed us to exactly understand what went on, how it happened and most importantly, the full extent of the attack.
The Attack – What happened?
A customer’s website was compromised, probably through some insecure php code, and the attackers uploaded some code which allowed them to browse a mysql database.
Our web servers have access to our management database, so that they can pull down the configuration for customer websites. It seems likely that at some point we inadvertently miss-configured the permissions on the configuration file storing the database access credentials.
From this, the attacker was able to scan the server configuration files and determine a mysql username on our web hosting database.
This user was able to edit the ftp server database table, and they created additional ftp usernames that mirrored customer’s usernames (but with different passwords), which they then used to access the customer’s website accounts. The extra usernames were then deleted, to hide their trace.
How do we know?
From our FTP server logs we have been able to identify which files were edited, and it is clear that the only change was to alter the index/home page on a website.
We were also able to add monitoring to our database servers and determine which username and password was used, and what changes they made to our database.
From our logging of the network traffic, we can see that no other data was misappropriated, specifically no personal customer data.
What have we done to rectify & prevent future occurrences?
- We have restored affected customer files as far as possible.
- We have improved the firewalling in our network, so that customer web servers do not connect to our management database to get their configuration data.
- We have undertaken a further precautionary password changing exercise.
- We have planned additional work, to implement automated scanning for future attacks on our ftp servers and web servers.
- We implementing further partitions to our database security, so that web server configuration and ftp access are secured using different users.
- We have fed the lessons learned from this exercise into our web cluster redesign work, to improve the protection we give to customer websites.
Conclusion
We would like to apologise to customers for any inconvenience this episode may have caused.
As you may know from following our blog, we are engaged in a program of evolving our email and web hosting infrastructure and problems like this highlight areas for improvement in our initial systems designs from a several years ago.
Finally, we would also recommend customers reset their FTP passwords, because, whilst they are encrypted in our database, there is the possibility that a 3rd party has a copy of that list, and they could be decrypted and used again.
This can be done online at: https://hosting.gradwell.net/login/ftpmanage?menu_req=75