• Resolved seoguru

    (@seoguru)


    I’m a happy wordfence pro user. Unfortunately my site was hacked anyway. The wordfence update this morning resulted in a blank screen for all pages in my site. I reinstalled wordpress, and reinstalled wordfence. Fortunately, the site works again.

    Doing the above, I found out that almost all php-files in my site started with a long line of unreadable code, starting with: <?php $bjnrmjz = ‘)sutcvt-#w… The 404-page stated that the site was ‘Hacked by Dr.web’.
    With the help of the wordfence scan, I was able to clean up all of those files, except for the .php-files generated by wordfence in the /wflogs/-directory. That directory contains the following files:

    .htaccess
    attack-data.php
    config.php
    ips.php
    rules.php
    wafRules.rules

    My questions:
    1. Are the above the rights files?
    2. The .php files all begin with that long line of unreadable code starting with: <?php $bjnrmjz = ‘)sutcvt-#w… Is this right or does this indicate a hack? And if so, how to remove that, because it is generated by wordfence? I already deleted the complete directory, but in a minute the directory/files are regenerated including the long line of unreadable code mentioned above.

    Thanks for your help!

    https://www.ads-software.com/plugins/wordfence/

Viewing 15 replies - 1 through 15 (of 34 total)
  • Probably multiple issues.

    1) You were hacked by Dr. Web.

    2) You were using Wordfence which has a bug in it, which yesterday produced internal 500 errors on probably thousands of websites. Info and temporary work around:
    https://www.ads-software.com/support/topic/unable-to-open-wflogsconfigphp-for-reading-and-writing?replies=10

    • Fix #2 so your site works without internal 500 errors.
    • Then backup your site.
    • Then do a forensic analysis (look at your logs, find ip address of Dr. Web, determine when and how he got access to your system).
    • Reinstall the latest version of wordpress and all plugins.
    • Fix the configuration of your site that allowed Dr. Web in. (In order of likeliness: poor passwords, unpatched plugins/wordpress, poor configuration).
    • Learn from your mistakes.

    To answer your questions from my server:

    /wp-content/wflogs$ ls -a
    . attack-data.php .htaccess rules.php
    .. config.php ips.php wafRules.rules

    attack-data.php is binary. The rest are text.

    Thread Starter seoguru

    (@seoguru)

    Thanks Petkovsc! Do the .php files on your server also start with a long line like <?php $bjnrmjz = ‘)sutcvt-#w…
    Looking forward hearing from you again.

    Oops, sorry I didn’t respond. None of my php files start with that.

    seoguru,
    sorry it took so long to get back to you. Those are the correct files that are supposed to be in that directory.

    The text added to your files does look bad so if you are able to get rid of it that’s good. Here are some tips that might help you along the way

    * FAQ My site was hacked

    * How to Clean a Hacked WordPress Site using Wordfence

    My site is installed with Wordfence, monthly Wordfence send me Wordfence activity, including Recently Modified Files:
    wp-content/wflogs/attack-data.php
    wp-content/uploads/wpcf7_captcha/1798753607.txt
    wp-content/uploads/wpcf7_captcha/1798753607.png
    wp-content/uploads/wpcf7_captcha/770585600.txt
    wp-content/uploads/wpcf7_captcha/770585600.png
    wp-content/uploads/wpcf7_captcha/1909471196.png
    wp-content/uploads/wpcf7_captcha/1909471196.txt
    wp-content/uploads/wpcf7_captcha/4262648466.txt
    wp-content/uploads/wpcf7_captcha/4262648466.png
    wp-content/uploads/wpcf7_captcha/2882867458.txt
    I do not understand meaning of above modified files and who modifies them? Are they hacked?

    Hi nguyenngoccu,
    Files are modified when plugins are updated and when plugins perform certain functions. It is normal to see the /wflogs/attack-data.php in that list because that file is updated when your Wordfence Firewall is working. As for the Contact Form 7 files you would have to inquire with the authors of that plugin if you want to know why those files are changing. If the plugin was recently updated, that could explain it.

    Hello! We reported a warning message from our hosting today https://www.ads-software.com/support/topic/malware-in-wflogsattack-data-php/#post-8933127 same files look hacked or false alarm ?

    Thank you Wfasa for your answer. Have a nice day.

    I have just had the same message from my 1and1 hosting, saying that file permissions were reduced due to a malicious file upload of ‘attack-data.php’.

    I am a premium customer of Wordfence, so I’m alerting them now…

    I think this is a false alarm, but am following it up.

    I have received the same notification from 1&1 today. Says attack took place at 3:36pm GMT

    Forgot to say I am using Wordfence (Free edition)

    Had a similar notification from 1and1 this morning. Keeping an eye on it.

    Ditto. For 4 websites I manage – all with free Wordfence. Looked at attack-data.php via FileZilla over SFTP and no file permissions changed. Nothing yet posted on Wordfence site. So guessing it is a false alarm…

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘files in wflogs directory hacked?’ is closed to new replies.