XSS (Cross-site Scripting) allows an attacker to execute a dynamic script (Javascript, VbScript) in the context of the application. This allows several different attack opportunities, mostly hijacking the current session of the user or changing the look of the page by changing the HTML on the fly to steal the user's credentials. This happens because the input entered by a user has been interpreted as HTML/Javascript/VbScript by the browser.
XSS targets the users of the application instead of the server. Although this is a limitation, since it allows attackers to hijack other users' session, an attacker might attack an administrator to gain full control over the application.
Impact
There are many different attacks that can be leveraged through the use of XSS, including:
Hi-jacking users' active session
Changing the look of the page within the victims browser.
Mounting a successful phishing attack.
Intercept data and perform man-in-the-middle attacks.
Remedy
The issue occurs because the browser interprets the input as active HTML, Javascript or VbScript. To avoid this, all input and output from the application should be filtered. Output should be filtered according to the output format and location. Typically the output location is HTML. Where the output is HTML ensure that all active content is removed prior to its presentation to the server.
Prior to sanitizing user input, ensure you have a pre-defined list of both expected and acceptable characters with which you populate a white-list. This list needs only be defined once and should be used to sanitize and validate all subsequent input.
There are a number of pre-defined, well structured white-list libraries available for many different environments, good examples of these include, OWASP Reform and Microsoft Anti Cross-site Scripting libraries are good examples.
<script language="JavaScript" type="text/javascript"> function beenClicked(marker) { var theImage = document.getElementById('converter'); theImage.src = marker; } function altBeenClicked(marker) { var theImage = document.getElementById('altconverter'); theImage.src = marker; } function altBeenClickedTwo(marker) { var theImage = document.getElementById('altconvertertwo'); theImage.src = marker; } function trackit() { var objFrame=document.getElementById("placeholder"); objFrame.src="/click.html"; }
function trackrbl() { pageTracker._trackPageview('/track/rbl/'); }
function trackquigo() { pageTracker._trackPageview('/track/quigo/'); var theImage = document.getElementById('converter'); theImage.src = "https://mv.bidsystem.com/ppc/sendtracker.aspx?c=208596&conversion=1&w=p3p&cb=5B3F6608-0DC3-D441-BEABB4C163958C34&u=c22f0e8e-f312-43e6-994c-526c659b5b6d"; }
function trackrl() { pageTracker._trackPageview('/track/rl/'); beenClicked('http://www.googleadservices.com/pagead/conversion/1071721528/?label=2omWCKGgPxC42IT_Aw&script=0'); }
function ct(c,s,t,r,p) { var ctrackFrame=document.getElementById("ctrack"); ctrackFrame.src="/t.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p;
}
var cc = 0; function cti(c,s,t,r,p,k) { pageTracker._trackPageview('/vz/track'); var ctrackFrame=document.getElementById("ctrack"); ctrackFrame.src="/ti.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p + "&k=" + k; //cc = cc + 1; //if (cc == 1) { // $('.verizon_block').hide(); //} }
function itrack() {
}
function sponsored_tracking_112() {
}
/* JavaScript for click tracking verizon */
function ctv(c,s,t,r,p,k,a) { pageTracker._trackPageview('/idearc'); $('#cBlock').load("/tv.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p + "&k=" + k + "&a=" + escape(a.href)); var theImage = document.getElementById('converter'); theImage.src = 'http://www.googleadservices.com/pagead/conversion/1071721528/?label=gGSYCN2gPxC42IT_Aw&script=0'; } function ctvp(c,s,t,r,p,k,a) { pageTracker._trackPageview('/idearc'); }
function getObject(objID) { if (document.all) { var obj = document.all[objID]; } else if (document.getElementById) { var obj = document.getElementById(objID); } return obj; }
function hideObject(objID) { var obj = getObject(objID); var rtn = false; if (obj != null) { obj.style.display = "none"; rtn = true; } return rtn; }
function showObject(objID) { var obj = getObject(objID); var rtn = false; if (obj != null) { obj.style.display = "inline"; rtn = true; } return rtn; }
function logClick(clickUrl) { var img = new Image(); img.src = clickUrl; }
<div style="padding-left:10px;"> <h1 style="text-transform: capitalize;">"><script>netsparker(9)</script> listings in Dallas, Texas</h1> <h2 style="text-transform: capitalize;">Use the map to find the closest "><script>netsparker(9)</script> listings near you</h2> </div>
The Server responded with an HTTP status 500. This indicates that there is a server-side error. Reasons may vary. The behavior should be analysed carefully. If Netsparker is able to find a security issue in the same resource it will report this as a separate vulnerability.
Impact
The impact may vary depending on the condition. Generally this indicates poor coding practices, not enough error checking, sanitization and whitelisting. However there might be a bigger issue such as SQL Injection. If that's the case Netsparker will check for other possible issues and report them separately.
Remedy
Analyse this issue and review the application code in order to handle unexpected errors, this should be a generic practice which does not disclose further information upon an error. All errors should be handled server side only.
<font style="COLOR: black; FONT: 16pt/18pt verdana"> The web site you are accessing has experienced an unexpected error.<br> Please contact the website administrator.
</font> <br><br> <table border="1" cellpadding="3" bordercolor="#000808" bgcolor="#e7e7e7"> <tr> <td bgcolor="#000066"> <font style="COLOR: white; FONT: 11pt/13pt verdana" color="white"> The following information is meant for the website developer for debugging purposes. </font> </td> <tr> <tr> <td bgcolor="#4646EE"> <font style="COLOR: white; FONT: 11pt/13pt verdana" color="white"> Error Occurred While Processing Request </font> </td> </tr> <tr> <td> <font style="COLOR: black; FONT: 8pt/11pt verdana">
<li>Enable Robust Exception Information to provide greater detail about the source of errors. In the Administrator, click Debugging & Logging > Debug Output Settings, and select the Robust Exception Information option.</li>
<li>Check the <a href='http://www.adobe.com/go/prod_doc' target="new">ColdFusion documentation</a> to verify that you are using the correct syntax.</li> <li>Search the <a href='http://www.adobe.com/go/prod_support/' target="new">Knowledge Base</a> to find a solution to your problem.</li>
Cookie was not marked as HTTPOnly. HTTPOnly cookies can not be read by client-side scripts therefore marking a cookie as HTTPOnly can provide an additional layer of protection against Cross-site Scripting attacks..
Impact
During a Cross-site Scripting attack an attacker might easily access cookies and hijack the victim's session.
Actions to Take
See the remedy for solution
Consider marking all of the cookies used by the application as HTTPOnly (After these changes javascript code will not able to read cookies.
Remedy
Mark the cookie as HTTPOnly. This will be an extra layer of defence against XSS. However this is not a silver bullet and will not protect the system against Cross-site Scripting attacks. An attacker can use a tool such as XSS Tunnel to bypass HTTPOnly protection.
<script language="JavaScript" type="text/javascript"> function beenClicked(marker) { var theImage = document.getElementById('converter'); theImage.src = marker; } function altBeenClicked(marker) { var theImage = document.getElementById('altconverter'); theImage.src = marker; } function altBeenClickedTwo(marker) { var theImage = document.getElementById('altconvertertwo'); theImage.src = marker; } function trackit() { var objFrame=document.getElementById("placeholder"); objFrame.src="/click.html"; }
function trackrbl() { pageTracker._trackPageview('/track/rbl/'); }
function trackquigo() { pageTracker._trackPageview('/track/quigo/'); var theImage = document.getElementById('converter'); theImage.src = "https://mv.bidsystem.com/ppc/sendtracker.aspx?c=208596&conversion=1&w=p3p&cb=5B316145-AFD6-83CF-4A0890CD085BC52E&u=c22f0e8e-f312-43e6-994c-526c659b5b6d"; }
function trackrl() { pageTracker._trackPageview('/track/rl/'); beenClicked('http://www.googleadservices.com/pagead/conversion/1071721528/?label=2omWCKGgPxC42IT_Aw&script=0'); }
function ct(c,s,t,r,p) { var ctrackFrame=document.getElementById("ctrack"); ctrackFrame.src="/t.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p;
}
var cc = 0; function cti(c,s,t,r,p,k) { pageTracker._trackPageview('/vz/track'); var ctrackFrame=document.getElementById("ctrack"); ctrackFrame.src="/ti.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p + "&k=" + k; //cc = cc + 1; //if (cc == 1) { // $('.verizon_block').hide(); //} }
function itrack() {
}
function sponsored_tracking_112() {
}
/* JavaScript for click tracking verizon */
function ctv(c,s,t,r,p,k,a) { pageTracker._trackPageview('/idearc'); $('#cBlock').load("/tv.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p + "&k=" + k + "&a=" + escape(a.href)); var theImage = document.getElementById('converter'); theImage.src = 'http://www.googleadservices.com/pagead/conversion/1071721528/?label=gGSYCN2gPxC42IT_Aw&script=0'; } function ctvp(c,s,t,r,p,k,a) { pageTracker._trackPageview('/idearc'); }
function getObject(objID) { if (document.all) { var obj = document.all[objID]; } else if (document.getElementById) { var obj = document.getElementById(objID); } return obj; }
function hideObject(objID) { var obj = getObject(objID); var rtn = false; if (obj != null) { obj.style.display = "none"; rtn = true; } return rtn; }
function showObject(objID) { var obj = getObject(objID); var rtn = false; if (obj != null) { obj.style.display = "inline"; rtn = true; } return rtn; }
function logClick(clickUrl) { var img = new Image(); img.src = clickUrl; }
<div style="padding-left:10px;"> <h1 style="text-transform: capitalize;">credit monitoring listings in Dallas, Texas</h1> <h2 style="text-transform: capitalize;">Use the map to find the closest credit monitoring listings near you</h2> </div>
Netsparker identified that the target web server is disclosing the web server's version in the HTTP response. This information can help an attacker to gain a greater understanding of the system in use and potentially develop further attacks targeted at the specific web server version.
Impact
An attacker can look for specific security vulnerabilities for the version identified through the SERVER header information.
Remediation
Configure your web server to prevent information leakage from the SERVER header of its HTTP response.
<script language="JavaScript" type="text/javascript"> function beenClicked(marker) { var theImage = document.getElementById('converter'); theImage.src = marker; } function altBeenClicked(marker) { var theImage = document.getElementById('altconverter'); theImage.src = marker; } function altBeenClickedTwo(marker) { var theImage = document.getElementById('altconvertertwo'); theImage.src = marker; } function trackit() { var objFrame=document.getElementById("placeholder"); objFrame.src="/click.html"; }
function trackrbl() { pageTracker._trackPageview('/track/rbl/'); }
function trackquigo() { pageTracker._trackPageview('/track/quigo/'); var theImage = document.getElementById('converter'); theImage.src = "https://mv.bidsystem.com/ppc/sendtracker.aspx?c=208596&conversion=1&w=p3p&cb=5B32ACC9-A7B7-744C-63502FCFAD1B7D62&u=c22f0e8e-f312-43e6-994c-526c659b5b6d"; }
function trackrl() { pageTracker._trackPageview('/track/rl/'); beenClicked('http://www.googleadservices.com/pagead/conversion/1071721528/?label=2omWCKGgPxC42IT_Aw&script=0'); }
function ct(c,s,t,r,p) { var ctrackFrame=document.getElementById("ctrack"); ctrackFrame.src="/t.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p;
}
var cc = 0; function cti(c,s,t,r,p,k) { pageTracker._trackPageview('/vz/track'); var ctrackFrame=document.getElementById("ctrack"); ctrackFrame.src="/ti.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p + "&k=" + k; //cc = cc + 1; //if (cc == 1) { // $('.verizon_block').hide(); //} }
function itrack() {
}
function sponsored_tracking_112() {
}
/* JavaScript for click tracking verizon */
function ctv(c,s,t,r,p,k,a) { pageTracker._trackPageview('/idearc'); $('#cBlock').load("/tv.cfm?c=" + c + "&s=" + s + "&t=" + t + "&r=" + r + "&p=" + p + "&k=" + k + "&a=" + escape(a.href)); var theImage = document.getElementById('converter'); theImage.src = 'http://www.googleadservices.com/pagead/conversion/1071721528/?label=gGSYCN2gPxC42IT_Aw&script=0'; } function ctvp(c,s,t,r,p,k,a) { pageTracker._trackPageview('/idearc'); }
function getObject(objID) { if (document.all) { var obj = document.all[objID]; } else if (document.getElementById) { var obj = document.getElementById(objID); } return obj; }
function hideObject(objID) { var obj = getObject(objID); var rtn = false; if (obj != null) { obj.style.display = "none"; rtn = true; } return rtn; }
function showObject(objID) { var obj = getObject(objID); var rtn = false; if (obj != null) { obj.style.display = "inline"; rtn = true; } return rtn; }
function logClick(clickUrl) { var img = new Image(); img.src = clickUrl; }
<div style="padding-left:10px;"> <h1 style="text-transform: capitalize;">credit monitoring listings in Dallas, Texas</h1> <h2 style="text-transform: capitalize;">Use the map to find the closest credit monitoring listings near you</h2> </div>