Attacks/Breaches
4/12/2010
04:20 PM
Connect Directly
Google+
Twitter
RSS
E-Mail
50%
50%

'Design Flaw' Led To Wave Of Attacks On Hundreds Of WordPress Blogs

Database storing user credentials in plain text gets hacked

Hundreds of WordPress blogs were hacked during the past few days by attackers who pilfered blogger credentials stored in plain text in the database.

The researchers who discovered the attacks say a design flaw in the WordPress blogging platform was the underlying problem because by default it allows users to set up permissions that let anyone read their blog's wp-config.php file configuration files, and because WordPress stores the bloggers' credentials in plain text.

The attackers injected malicious iFrames into the blogs so that any visitors would automatically be infected with malware, including code that spreads fake antivirus software.

"A few people got hacked last week and asked us to help," says David Dede, founder of Sucuri Security, which also uses WordPress for its own blog. "We fixed them and in one site, just after we fixed it, it got hacked again. Looking at the logs, we didn't see any access in there at all, so the attack didn't come from the Web."

Dede says after further analysis and more complaints of hacked blogs, he and his team found that the blogs were getting hit with a malicious iFrame, and that the blogs were all hosted on Network Solutions' servers. Most were running the newest version of WordPress, 2.9.2, he says

The attacker basically created a scanner to locate all configuration files containing incorrect permissions, Dede says. "It read the database credentials from there and started hacking everyone," he says.

Network Solutions has now cleaned up the infected blogs and stopped the attacks by changing database passwords for WordPress. The hosting provider recommends that WordPress users log into their accounts and change their administrative passwords, as well as delete any administrative access accounts they don't recognize.

WordPress, meanwhile, says it hasn't seen any evidence that the attacks were related to a security problem with its software. Barry Abrahamson, systems wrangler for WordPress, says the attacks appear to have targeted weak file permissions. "File-level permissions and Web server security are the responsibility of the hosting environment, not the application," Abrahamson says. "WordPress can be installed a number of ways, and many hosts have built custom installers. I am not sure how WordPress was installed in these cases."

If a blogger wants to check if his site was hacked, then he should look for extra HTML in the header and view the source for any iFrames pointing to http://mainnetsoll.com/grep or http://networkads.net/grep, he says. "They can [also] try installing the WordPress Exploit Scanner plug-in," Abrahamson says. "The database scan portion of this plug-in should catch if a malicious iFrame code has been inserted into the options table in their database."

Contact your hosting provider if you find either of these issues, he adds, and ensure you're running WordPress 2.9.2.

The good news is the attacks were not as malicious as they could have been, Sucuri Security's Dede notes. The attackers modified only the site URL, he says. "So they were actually nice," he says.

Dede and other experts say the attacks suffered by WordPress could happen to most any popular blogging platform: "It's a hard problem to fix. They need the credentials stored somewhere, and the Web server needs to be able to read it," Dede says. Joomla, Mediawiki, and other blogging platforms that are set up the same way are also vulnerable to this type of attack when the permissions in the configuration files are set up incorrectly, he says.

Encrypting the credentials isn't an option because the keys have to be stored where the Web server can read them in order to decrypt the data, he says.

There's no way to decrypt the credentials for the database without accessing the database, WordPress' Abrahamson notes. "We would have to store the decryption key in another file somewhere on the file system. If a malicious user has access to the file system -- like they appeared to have in this case -- it is trivial to obtain the keys and decrypt the information. When you leave the keys to the door in the lock, does it help to lock the door?"

The users erred by setting up permissions for anyone to read the configuration files, Dede notes, although that was the default on WordPress. WordPress now is no longer recommending this, however, he notes.

Have a comment on this story? Please click "Discuss" below. If you'd like to contact Dark Reading's editors directly, send us a message.

Kelly Jackson Higgins is Executive Editor at DarkReading.com. She is an award-winning veteran technology and business journalist with more than two decades of experience in reporting and editing for various publications, including Network Computing, Secure Enterprise ... View Full Bio

Comment  | 
Print  | 
More Insights
Register for Dark Reading Newsletters
White Papers
Cartoon
Current Issue
Dark Reading Tech Digest, Dec. 19, 2014
Software-defined networking can be a net plus for security. The key: Work with the network team to implement gradually, test as you go, and take the opportunity to overhaul your security strategy.
Flash Poll
Video
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2014-8802
Published: 2015-01-23
The Pie Register plugin before 2.0.14 for WordPress does not properly restrict access to certain functions in pie-register.php, which allows remote attackers to (1) add a user by uploading a crafted CSV file or (2) activate a user account via a verifyit action.

CVE-2014-9623
Published: 2015-01-23
OpenStack Glance 2014.2.x through 2014.2.1, 2014.1.3, and earlier allows remote authenticated users to bypass the storage quote and cause a denial of service (disk consumption) by deleting an image in the saving state.

CVE-2014-9638
Published: 2015-01-23
oggenc in vorbis-tools 1.4.0 allows remote attackers to cause a denial of service (divide-by-zero error and crash) via a WAV file with the number of channels set to zero.

CVE-2014-9639
Published: 2015-01-23
Integer overflow in oggenc in vorbis-tools 1.4.0 allows remote attackers to cause a denial of service (crash) via a crafted number of channels in a WAV file, which triggers an out-of-bounds memory access.

CVE-2014-9640
Published: 2015-01-23
oggenc/oggenc.c in vorbis-tools 1.4.0 allows remote attackers to cause a denial of service (out-of-bounds read) via a crafted raw file.

Best of the Web
Dark Reading Radio
Archived Dark Reading Radio
If you’re a security professional, you’ve probably been asked many questions about the December attack on Sony. On Jan. 21 at 1pm eastern, you can join a special, one-hour Dark Reading Radio discussion devoted to the Sony hack and the issues that may arise from it.