Support » Plugin: Google XML Sitemaps » This plugin might have been hacked

  • Hi,

    I suspect that this plugin might have been hacked. I updated it to the latest announcec version some days ago and today I found out the following:

    1. I had double traffic yesterday and the day before, all directed to pages like http://www.mysite.com/index.php?page=some-bad-words-here
    2. I found out this morning that a folder was created under my www folder, called “page” containing thousands of folders, each containing a few .txt files with bad text and links to bad sites.
    3. I also found out that the XML maps generated by this plugin had changed to be listing EXCLUSIVELY the bad sites listed in the above mentioned .txt files

    I have just removed the “page” folder, and I have deactivated the plugin.

    Can someone else confirm that these actions are enough? And confirm that my analysis above is about right and that I’m not missing another part of the problem?

    Thanks,

Viewing 9 replies - 1 through 9 (of 9 total)
  • I have also removed the generated xml files…

    I’m not sure I would lean towards the plugin in this case. Many attacks are target and it’s very easy to see which plugins a WordPress website has. Perhaps your hosting provider was compromised and many of your PHP files were modified?

    hello devburnett,

    Thanks for the answer. What made me think the plugin was involved is the fact that I have very few plugins, I updated this one just a few days before I realized the problem was there and the sitemaps files provided by the plugin were all changed to be exclusively links to the famous /index.php?page=bad-words-here, thausends of them.

    But you are right, I’m not 100% sure that the problem came with the plugin, just a strong smell.

    What I found out in the days after:

    1. When I tried to remove the folders (all where named like xxxx with x being an hexa number) inside the “page” folder, I realized that there where more of them being created continuously.
    2. I spotted some files in the “page” folder that looked more like the possible “generating” files and removed them, I was able to stop the madness
    3. I noticed a “page” file sitting in my www file which I’m unable to remove (when I remove it by FTP, i get a positive confirmation that it has disappeared and then when I refresh the page, the file is back !!
    4. I’m not 100% but I think this file is the one which triggers the populating of the “page” folder and it seems that it is triggered if I click on the file with FileZilla and try to download it… So I just stopped touching this file and left it there for the time being…
    5. In the mean time, Google’s index has been massively polluted by those many many pages with the format index.php?page=bad-words-here. Clicking on any of those links gets instantly forwarded to a bad site somewhere… I’m now trying to block indexing of those pages, and cleaning Google’s index

    Amazing thing. First time in 17 years that I have a problem like this… Interesting experience. Any pointer on a similar case being reported somewhere would help me a lot trying to understand what happened and how I can prevent this in the future…

    Thanks,

    A thought; that the sitemap is just reflecting your infection.

    I am by no means an expert, but I follow the security company Sucuri and I’ve heard about these types of infections often…SEO Spam sounds like what you are suffering from (usually not detectable to ordinary visitors).

    You should check that you are running the latest WordPress version for starters.

    Sucuri offer a helpful free site checker: https://sitecheck.sucuri.net/
    Do you have a known good backup you could use to go back to? (being able to check that the backup shows no signs of the infection you are seeing) – and then you would need to patch the initial vulnerability.
    Sucuri have some helpful information on their blog/site about infections and they can also help you get to the bottom of the issue (for a fee) if you don’t have a known good backup that you can use yourself or be able to clean up the problem.

    Here are some links to some helpful guides:
    https://sucuri.net/guides/how-to-clean-hacked-wordpress
    https://codex.wordpress.org/FAQ_My_site_was_hacked

    Zap, any chance you can post the user/group and file permissions of that suspicious file in #3?

    Thanks a lot both for taking the time.

    604 is the permission on the suspicious file.

    Zap, any chance you can post the user/group and file permissions of that suspicious file in #3?

    I ran the sucuri check and got an all green feedback… I’ll read the guidelines and will report back.

    Thanks again,

    I ran the live check from sucuri, got an all green feedback. I installed the sucuri plugin, got an all green feedback (or so I think, as I did not find the thing super easy to read)… So not sure anymore where to look further.

    @devburnett, are the permissions (604) on the file ok?

    Thanks,

    Zap,

    604 indicates -rw—-r– which means only the owner of the file can read and write it and “others” can also read but the group can not read or write.

    Can you paste the entire listing for the file.

    For example if I run the ls command I can see all my files as such. Staff would be the group, james would be the owner and you can see I set the file 604. www-data or apache is normally the web server users.

    -rw—-r– 1 james staff 0 Aug 8 06:59 file

    Do I understand correctly that you’d like me to run the ls command on the folder?

    I’m not able to run the ls command to the ftp server, not sure why. I never used it until now, as I do everything with a tool…

    Will keep trying further tomorrow.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.