Home|Sitemap|Contact

What is Cross Site Scripting - XSS?

In addition to form posts, information passed on the URL (form method=get or via hyperlinks) can be dangerous.
Example 2: URL data


A simple example using JavaScript follows.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="author" content="Roderick Divilbiss">
<meta name="copyright" content="? 2005 Roderick Divilbiss">
</head>
<body>
<%=request.form("input1")%>
<form name="frm" action="example.asp" method="post">
  <input type="text" size="40" name="input1" value="&lt;script&gt;alert('XSS Succeeded')&lt;/script&gt;">
  <input type="submit" name="submit" value="Submit">
</form>
</body>

</html>

Next