Jump to content

Malicious Javascript code added to the bottom of my HTML


ArizonaJohn

Recommended Posts

Hello,

 

Below is the code to my main page, called index.php.  It is what shows when I type my domain into the browser.  On a few occasions, when I open it in Internet Explorer, some malicious javascript code gets added to the bottom of the code below.  The malicious javascript code looks like: "<script type="text/javascript">eval(String.fromCharCode(118,97,114,32,120,101,119,61,57,56,55,49,51,49,..."

 

It seems like this code then installs a fake anti-virus program on the computer of anyone who visits my site.  How can I prevent this malicious javascript from getting written into my source code.

 

Thanks,

 

John

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<?php
session_start();
unset($_SESSION['find']);	
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Title</title>

<link rel="stylesheet" type="text/css" href="tablestyles.css"> 

</head>

<body>

<div class="mainlinks"><a href="about.php" class="links">About</a><a href="testpage.php" class="links">New Testpage</a><a href="tablecreate.php" class="links">Table Create</a></div>

<div class="line"></div>


<div class="smalllogo"><a href="index.php"><img src="images/logo.png" alt="Tywod" width="170" height="45" border="0"/></a></div>
  
  
  <div class="searchbox">
  <form action="tsearch14.php" method="post">
  <label>Enter Topic:
  <input type="text" name="find" size="55"/>
  <input type="hidden" name="searching" value="yes" />
  <input type="submit" name="search" value="Search" />
  </label>
  </form>
  </div>

<div class="line2"></div>

<div class="copyright">©2009 Title</div>

</body>
</html>

This seems to be more than just virus since it is actually adding code to my own site. 

 

And if my computer just had a virus, does this mean that any computer with a virus could add code to my source code?

 

I guess I'm asking how to make my own site trojan-proof.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.