Attackers have been setting their sights on freshly installed WordPress deployments, taking advantage of users who fail to follow through when it comes to configuring their server’s settings.
Researchers at the WordPress security plugin WordFence said Tuesday they observed a significant spike in attacks targeting WordPress accounts from the end of May to mid-June. According to the organization, the biggest increase in scans – roughly 7,500 a day – came on May 30.
According to Mark Maunder, the company’s CEO and founder, attackers mounted thousands of scans each day for /wp-admin/setup-config.php, a URL that new WordPress installations use to setup new sites. These are instances where a user has installed WordPress on their servers, just not configured it.
It wouldn’t be difficult for an attacker to carry out an attack, something Maunder dubs a WPSetup attack. Assuming a user hasn’t finished setting up their WordPress site, an attacker can swoop in and finish the user’s installation for them. With admin access, an attacker can enter their own database name, username, password, and even database server. From there an attacker would have to run an installation and enter some supplementary account information to gain control of the site.
Maunder says it’d be fairly easy for an attacker to execute PHP code, either via a theme or plugin editor, to compromise a victim’s hosting account, in addition to the site. In this case the attacker would have administrative access after all. From there they could also upload their own plugin with PHP code and activate it.
Furthermore an attacker could install a malicious shell in a victim’s directory to access any files or websites on the account or access any databases or application data that vulnerable WordPress installations have access to.
WordPress experts claim the attack method isn’t exactly new, but that it clearly hasn’t limited its effectiveness.
“The attack itself is a well-known tactic. Web scanners have been configured to look for default install files and directories for years,” Weston Henry, lead security analyst at SiteLock, a service that carries out daily scans of websites to identify vulnerabilities, said Thursday. Henry points out that spiga.py, an old web scanner, could be used to sniff out unfinished phpMyFAQ installations. After finding one it’d be easy for an attacker to complete the installation and achieve admin access.
Maunder says users should create a specially coded .htaccess file in the base of their web directory to ensure attackers can’t access their sites in the middle of an installation. .htaccess files are server configuration files, normally located in a site’s root folder, that can be used to enforce SSL, protect sensitive files, and only allow access to selected IP addresses only.
Maunder also says users could install their WordPress files either by unzipping them or doing a one-click install, then access their site immediately and complete the installation. This process is riskier, because an attacker could still pounce on a site if a user is slow, but serviceable, Maunder says.