This is part 1 of a 3-part series on recovering a MODX website after it has been compromised and keeping it safe in the future.
Upgrade, Upgrade, Upgrade
Upgrading the software that runs your site as soon as upgrades are available is the surest way to protect your investment and reputation with your online presence. This applies to not only MODX, but also to other platforms like WordPress, Drupal, Joomla, Magento, and more. While this article focuses on MODX, the principals in general apply to all software platforms.
If you are running a version of MODX prior to 2.6.5, released on July 11, 2018, it is critical to upgrade your site now. If you are upgrading from a MODX version prior to 2.3.x, upgrade to the 2.3.6 release prior to upgrading 2.6.5.
Why Upgrades Are Important
Your digital public billboard to the world deserves to be kept up to date and secure. Unless your site really doesn’t matter, it makes sense to budget more than your monthly cellphone bill on a critical, globally visible marketing channel. Please use quality hosting with backups on by default. Be sure to budget for regular, ongoing maintenance with a trusted team or individual who know what they’re doing when it comes to your website and hosting.
The risks of hoping for the best with a commodity host with no backups, or naively assuming things will be OK, is too risky today. If you do not maintain both your site software and the full stack of server software that powers it, your site will almost certainly be hacked at some point assuming it is ever linked to on the public web or has a custom domain name associated with it.
The consequences of skipping critical maintenance of any software tied to a website can be disastrous, including total loss of the website, loss of business, loss of reputation, delisting from Google’s index or Adwords, ransom, or extortion.
MODX Update Frequency & Methods
MODX Revolution typically has 4-6 patch releases per year, often containing security updates. Wise site owners today must be prepared for consistent, ongoing website maintenance after their site launches. There are several options to improve the ease of upgrading including Softaculous in cPanel, the UpgradeMODX Extra, SiteDash and the Upgrade button in MODX Cloud. There is, of course, also the traditional upgrade method as well.
Please note, before doing any maintenance on your site it’s critical to take a backup prior to updating, or you face risk of data loss. Always, always, always try to have multiple backups of your website, and preferably perform test upgrades on a clone of your site prior to doing any work on it.
When you update your site version, you should also update all your Extras to the latest version from within the MODX Manager Dashboard, or using one of the tools mentioned above.
The Symptoms of a Website Hack
The most recent attacks fixed in 2.6.5 have several telltale signs, though this may change. They currently include:
- The website redirects visitors to adult websites, gambling sites, or anywhere that should not be redirecting to.
- You cannot login to the Manager or the Manager Login Screen is blank or missing.
- New PHP files with obfuscated php in the main directory where your MODX site sits.
- Missing “assets” directory, which is typically located at in the main directory of the website alongside MODX.
- PHP files in an “assets/images/” directory. This directory typically only contain files that have image extensions such as, .jpg, png, svg, ico, jpeg, tiff, etc.
More in this Series
For more in the Hacked Site Series, you can read Part 2 for practical details on how to recover from a compromise, and Part 3 covering the tips and tools recommended by MODX Community.