Support » Fixing WordPress » bablooO/blyat attacks on WP 2.7.0 and 2.7.1

  • One of my sites suffered an attack in recent weeks which I can’t find documented in the WordPress forums.

    The symptom is hidden spam content in posts with an HTML comment fingerprint like:

    <!-- bablooO-start -->

    Some people report the string “blyat” instead of “bablooO”. The attack has been reported for both 2.7.0 and 2.7.1 installations of WordPress. So far I can’t find anyone who reports this problem and has figured out how the intruder got in. The most extensive discussion I can find is at:

    Is this a known attack? Is there an official channel through which to report this kind of thing?


    [Sorry for the anonymous handle but I don’t want to advertise an unclosed vulnerability on my site.]

Viewing 15 replies - 1 through 15 (of 23 total)
  • One of my sites is experiencing this as well, but the spam content is being injected into the RSS2 feed instead. I’ve upgraded to 2.8 and it still seems to be happening (unless it’s being cached somewhere). I have not seen any of this spam in the posts themselves.

    Thread Starter anoncobard


    Sterling, when you say “it still seems to be happening” do you mean that you’re seeing new spam content added even after you upgraded to 2.8?

    I saw in your ckon comment that you have the spam in your posts as well as in your RSS feed, it’s just that it’s invisible unless you view source. That’s one of the characteristics of this attack.

    As near as I can tell from the discussion on ckon, some people are finding the spam inserted in their theme files (particularly footer.php, and particularly people who have writable themes folders and use the theme editor) while others are seeing it inserted into blog posts in their database. It sounds like you’re in the latter category.

    You can see the extent of the damage to your database by using the WP Export feature (built right into WP, under Tools) to save your content as an XML file. Then load the XML file into a text editor and see how many posts the spam content shows up in.

    Checking for damage to your themes or other WP files is trickier unless you’re comfortable with command-line tools like grep. If you’re not a command-line person you could still FTP your theme files down to your desktop and examine them in a text editor.

    Please let us know if you find anything that might be useful.

    Correction: the content was in the posts in the database, but it was enclosed in a <p> element that was styled with height:0 and width:0, so I could only see it in the feed or with “view source”.

    I changed my admin password and cleaned the affected posts.

    Please notify me if/when you get more info on how this might have happened.

    Just saw your response.

    I’m not seeing any damage to theme files. It was only in the posts themselves. I suppose this has to be some sort of password security breach — either they hacked into my admin password or they found a way to get around the password permissions.

    I have not seen any new spam content since I upgraded to 2.8 and changed the admin password. No other users have privileges beyond “Subscriber”.

    Thread Starter anoncobard


    I found one hole: a third-party theme wasn’t validating its arguments. I’ve confirmed that it was vulnerable to cross-site scripting (XSS) by appending javascript to a URL. Background:

    I added a line of input validation to the theme and sent the patch to the theme developers. Hole closed.

    Now my burning question is whether that hole is the likely source of my intrusion or there are others. The symptoms we bablooO victims describe seem most consistent with an intruder being able to log into WordPress using the admin account. In practical terms is a javascript insertion in the URL really likely to result in interactive access to the WP Dashboard?

    <? /**/eval(base64_decode… ?>

    I found this code added to many of my files. I am uninstalling many of the sites now and going to older backups.

    Almost all of my wordpress sites on the same server has been attacked with this.

    Thread Starter anoncobard


    Coolgeee, was this code in addition to the bablooO spam HTML or instead of it?

    I am checking now.

    But I do notice that almost all my file have this code added to the beginning of the files, like index.php, etc

    in the wp-app.php file here is the code: (it is in all the files!!!


    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    In practical terms is a javascript insertion in the URL really likely to result in interactive access to the WP Dashboard?

    It’s possible. If they can get some javascript onto your page in a permanent fashion, then the next time you (the admin) visits the page, that script could send them your admin cookie, which would let them get into the site even though they lacked the password.

    With the admin cookie, they effectively become the admin for a short period (until it expires). The first step would likely be an automated script injection, where they use the plugin or theme editor to inject php code into some file, giving them backdoor access. From there, they could do anything they want until you find and remove that code.

    Mitigation: You can instantly invalidate all cookies to the site by changing the secret keys. See here for info on how to do that:

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    But I do notice that almost all my file have this code added to the beginning of the files, like index.php, etc

    If that is the case, then it’s probable that they got in via a different means. I have often seen this occur on shared webhosting services with poor security between different customers.

    In other words, if you’re sharing a server with 50 other sites, and any one of those other sites gets hacked, then the attacker can run a script to automatically add his hack code to all the sites on that server, unless the server is well-secured (many are not). Usually these scripts look for anything ending in PHP, for example, and just add the code to them blindly.


    I will update any findings shortly

    this is what my php.ini looks like:
    register_globals = off
    allow_url_fopen = off

    expose_php = Off
    max_input_time = 60
    variables_order = “EGPCS”
    extension_dir = ./
    upload_tmp_dir = /tmp
    precision = 12
    SMTP =
    url_rewriter.tags = “a=href,area=href,frame=src,input=src,form=,fieldset=”


    does this look corrupt?

    All these files aslos had added code to it.


    my wp-pass.php:
    * Creates the password cookie and redirects back to where the
    * visitor was before.
    * @package WordPress

    /** Make sure that the WordPress bootstrap has ran before continuing. */
    require( dirname(__FILE__) . ‘/wp-load.php’);

    if ( get_magic_quotes_gpc() )
    $_POST[‘post_password’] = stripslashes($_POST[‘post_password’]);

    // 10 days
    setcookie(‘wp-postpass_’ . COOKIEHASH, $_POST[‘post_password’], time() + 864000, COOKIEPATH);


Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘bablooO/blyat attacks on WP 2.7.0 and 2.7.1’ is closed to new replies.