PrepAway - Latest Free Exam Questions & Answers

Tag: what is a counter measure

What is the countermeasure against XSS scripting?

Consider the following code:
URL:http://www.xsecurity.com/search.pl?text=alert(document.cookie)
If an attacker can trick a victim user to click a link like this, and the Web application does not validate input, then the victim’s browser will pop up an alert showing the users current set of cookies. An attacker can do much more damage, including stealing passwords, resetting your home page, or redirecting the user to another Web site.
What is the countermeasure against XSS scripting?