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.
Netsparker identified that password data is sent over HTTP.
Impact
If an attacker can intercept network traffic he/she can steal users credentials.
Actions to Take
See the remedy for solution.
Move all of your critical forms and pages to HTTPS and do not serve them over HTTP.
Remedy
All sensitive data should be transferred over HTTPS rather than HTTP. Forms should be served over HTTPS. All aspects of the application that accept user input starting from the login process should only be served over HTTPS.
<style type="text/css"><!--.boobytraptext { font-family: Arial, Helvetica, sans-serif; font-weight:bold;}.boobytraptext { color: #CCC; }body { background-color: #000; text-align: center;}--></style><table width="13%" height="643" border="0" align="center" cellpadding="10"> <tr valign="top"> <td height="119"><img src="images/boobytrap.png" alt="" width="400" height="117" /></td> </tr> <tr> <td height="282"><p class="boobytraptext"> <span class="boobytraptext"><strong>BoobyTrap Will allow you to send a "BoobyTrap" email to your email account. A BoobyTrap email is an email that wil let you know if anyone is reading your emails without your knowledge. It will give you the IP address of the person as well as give you a location of where they were when they read the email.</strong></span> </p> <p class="boobytraptext"><strong>In some cases boobytrap will allow you to take pictures and recordings of the culprit if they have a webcam attached or built-in their computer.</strong></p></td> </tr> <tr> <td height="216" align="center" class="boobytraptext"><p>Enter your username and password</p> <form id="form1" name="form1" method="post" action="validateUser.php"> <p>username: <label> <input type="text" name="uname" id="username"> </label> </p> <p><br> password: <label> <input type="password" name="password" id="password"> </label> </p> <p> <label> <input type="submit" name="start" id="start" value="Submit" /> </label> </p></form> <p> </p></td> </tr></table><p align="center"> </p><p> </p>
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.
Netsparker believes that there is a XSS (Cross-site Scripting) in here it could not confirm it. We strongly recommend investigating the issue manually to ensure that it is an XSS (Cross-site Scripting) and needs to be addressed.
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 / encoded. Output should be filtered / encoded according to the output format and location.
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.
This page responses with HTTP redirect status therefore detected XSS vulnerability might not be exploitable in many conditions however it still indicates lack of correct filtering and should be addressed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html lang="en"><head> <title>PORTSNITCH | LIGATT Security Suites</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="keywords" content=""> <meta name="description" content=""> <link rel="stylesheet" type="text/css" href="cluetip/jquery.cluetip.css"> <link rel="stylesheet" type="text/css" href="css/screen.css"> <link rel="stylesheet" type="text/css" href="css/dropdown.css"> <link rel="stylesheet" type="text/css" href="tablesorter/themes/blue/style.css" /> <link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css" /> <link rel="stylesheet" href="menu_style.css" type="text/css" /> <script type="text/javascript" src="shadowbox/shadowbox.js"></script> <script type="text/javascript"> /*Shadowbox.init({ handleOversize: "drag", displayNav: false, handleUnsupported: "remove", autoplayMovies: false, language: 'en', //players: ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv'] player });*/ function target_phone_map() { //This will be a test to see if when we click it will open up a map Shadowbox.open({ player: 'html', content: '', height: 350, width: 350, options: { onFinish: function(item){ if(GBrowserIsCompatible()){ //create map canvas var mapPhone = new GMap2(document.getElementById(Shadowbox.contentId())); //set map type mapPhone.setMapType(G_SATELLITE_MAP); //set lat and long for map mapPhone.setCenter(new GLatLng(, ), 17); //set user interface to default which includes the zoom tool, and four map type buttons mapPhone.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(,); mapPhone.addOverlay(new GMarker(point)); } } } }); } function target_ip_map() { //This will be a test to see if when we click it will open up a map Shadowbox.open({ player: 'html', content: '', height: 350, width: 350, options: { onFinish: function(item){ if(GBrowserIsCompatible()){ //create map canvas var map = new GMap2(document.getElementById(Shadowbox.contentId())); //set map type map.setMapType(G_SATELLITE_MAP); //set lat and long for map map.setCenter(new GLatLng(0, 0), 17); //set user interface to default which includes the zoom tool, and four map type buttons map.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(0,0); map.addOverlay(new GMarker(point)); } } } }); } function target_address_map() { //This will be a test to see if when we click it will open up a map Shadowbox.open({ player: 'html', content: '', height: 350, width: 350, options: { onFinish: function(item){ if(GBrowserIsCompatible()){ /*Code for the address map*/ mapAdd = new GMap2(document.getElementById(Shadowbox.contentId())); mapAdd.setMapType(G_SATELLITE_MAP); mapAdd.setCenter(new GLatLng(37.4419, -122.1419), 15); mapAdd.setUIToDefault(); geocoder = new GClientGeocoder(); var address = "\'\"--></style></script><script>netsparker(0x0008C2)</script> 3 3 3 3 3"; if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { mapAdd.setCenter(point, 15); var marker = new GMarker(point); mapAdd.addOverlay(marker); //marker.openInfoWindowHtml(address); } } ); } } } } }); } </script> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="cluetip/jquery.cluetip.js"></script> <script type="text/javascript" src="library/jquery_calls.js"></script> <script type="text/javascript" src="library/country.js"></script> <script type="text/javascript" src="library/ajax.js"></script> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAiKM1iuk5Njtbop701BMpmhSpvELy0EdfA-aKJpnzXJx4Ryo4DBQ0sYoJ1vmKceddiB5Rj8ONIGtQ-A" type="text/javascript"></script> <script type="text/javascript" src="js/helpers.js"></script> <script type="text/javascript" src="js/date.js"></script> <script type="text/javascript" src="js/form.js"></script> <script src="jquery.tablesorter.js"></script> <script src="jquery.tablesorter.pager"></script> <script language="Javascript">var finished = false;function ltrim ( s ){return s.replace( /^\s*/, "" );}function twoOrMore(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only send one IP address to TattleTell!"); return false; } } } } if (over == 0) { alert("Please check at least one IP address to send to TattleTell"); return false; } else { document.getElementById('history').setAttribute('action', '/tattletell/addtarget.php'); document.getElementById('history').submit(); }}function twoOrMorePC211(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only send one IP address to PC211!"); return false; } } } } if (over == 0) { alert("Please check at one IP address to send to PC211"); return false; } else { document.getElementById('history').setAttribute('action', '/pc211/exploit.php'); document.getElementById('history').submit(); }}function twoOrMorePurchase(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only purchase one report at a time!"); return false; } } } } if (over == 0) { alert("Please check at one IP address to purchase"); return false; } else { document.getElementById('history').setAttribute('action', 'chkStatus.php'); document.getElementById('history').submit(); }}function twoOrMoreSendReport(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only send one report at a time!"); return false; } } } } if (over == 0) { alert("Please check at one least report to send"); return false; } else { document.getElementById('history').setAttribute('action', 'sendReport.php'); document.getElementById('history').submit(); }}function selectToggle(toggle, form){ var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if(toggle) { myForm.elements[i].checked = "checked"; } else { myForm.elements[i].checked = ""; } } }}function sendToTattle(){ document.getElementById('history').setAttribute('action', '/tattletell/addtarget.php'); document.getElementById('history').submit();}function deleteStuff(){document.getElementById('history').setAttribute('action','delete_history.php');document.getElementById('history').submit();}function go_back_to_index() { document.location='/portscanner/index.php';}var interval_id; function check_this_scan_status(this_id) { var strURL = "check_this_scan_status.php"; var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('POST', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4 && !finished) { var real_string = ltrim(self.xmlHttpReq.responseText); if( real_string.charAt(0) == "~") //if(self.xmlHttpReq.responseText.charAt(0)=='~') { updatepage(self.xmlHttpReq.responseText); finished = true; //Load the function //test(); initialize(); //The other functions to load the address map initializeAddress(); showAddress(); //One more function that will load the phone number map initializePhone(); } else { updatepage(self.xmlHttpReq.responseText); } //updatepage(self.xmlHttpReq.responseText); } } self.xmlHttpReq.send(getquerystring(this_id));}function getquerystring(id) { //var form = document.forms['f1']; //var word = form.word.value; //qstr = 'w=' + escape(word); // NOTE: no '?' before querystring qstr = 'id=' + id; return qstr;}function updatepage(str){ document.getElementById("update_pane").innerHTML = str;}</script> <script>function initialize() { //create map canvas var map = new GMap2(document.getElementById("map_canvas")); //set map type map.setMapType(G_SATELLITE_MAP); //set lat and long for map map.setCenter(new GLatLng(0, 0), 17); //set user interface to default which includes the zoom tool, and four map type buttons map.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(0,0); map.addOverlay(new GMarker(point)); }</script><script> var mapAdd = null; var geocoder = null; function initializeAddress() { mapAdd = new GMap2(document.getElementById("map_canvas_address")); mapAdd.setMapType(G_SATELLITE_MAP); mapAdd.setCenter(new GLatLng(37.4419, -122.1419), 15); mapAdd.setUIToDefault(); geocoder = new GClientGeocoder(); } function showAddress() { var address = "\'\"--></style></script><script>netsparker(0x0008C2)</script> 3 3 3 3 3"; if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { mapAdd.setCenter(point, 15); var marker = new GMarker(point); mapAdd.addOverlay(marker); //marker.openInfoWindowHtml(address); } } ); } }</script><script>function initializePhone() { //create map canvas var mapPhone = new GMap2(document.getElementById("map_canvas_phone")); //set map type mapPhone.setMapType(G_SATELLITE_MAP); //set lat and long for map mapPhone.setCenter(new GLatLng(, ), 17); //set user interface to default which includes the zoom tool, and four map type buttons mapPhone.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(,); mapPhone.addOverlay(new GMarker(point));}</script> <script type="text/javascript"> $(document).ready(function(){ Shadowbox.init({ handleOversize: "drag", displayNav: false, handleUnsupported: "remove", autoplayMovies: false, language: 'en', players: ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv'] }); $('a.basic').cluetip({ width: '300px', height: '300px', showTitle: true }); //The table for the scans $("#myTable").tablesorter({ sortList:[[0,0]], widthFixed: true, headers: { 7: { sorter: false }, 8: { sorter: false } } }); /*$(".menu2 a").append("<em></em>"); $(".menu2 a").hover(function() { $(this).find("em").animate({opacity: "show", top: "-75"}, "slow"); var hoverText = $(this).attr("title"); $(this).find("em").text(hoverText); }, function() { $(this).find("em").animate({opacity: "hide", top: "-85"}, "fast"); });*/ }); </script> </head><body> <div class="wrapper"> <div class="nav-wrapper"> <div class="nav"> <ul id="navigation"> <li class=""> <a href="/ezpay/index.php"> <span class="menu-left"></span> <span class="menu-mid">My Account</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/ezpay/subAccntForm.php">Sub Account</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class=""> <a href="/tattletell/yourips.php"> <span class="menu-left"></span> <span class="menu-mid">Tattletell</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/tattletell/yourips.php">Your IP Monitoring</a> </li> <li> <a href="/tattletell/addtarget.php">Add Target</a> </li> <li> <a href="/tattletell/signup.php">Purchase IPs</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class=""> <a href="/email_snitch/index.php"> <span class="menu-left"></span> <span class="menu-mid">IPSnitch</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/email_snitch/createSnitch.php">Add Target</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class="active"> <a href="/portscanner/index.php"> <span class="menu-left"></span> <span class="menu-mid">PortSnitch</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/proxy/spoofnetACCESS.php"> <span class="menu-left"></span> <span class="menu-mid">Spoofnet</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/portsnitch/index.php"> <span class="menu-left"></span> <span class="menu-mid">Recon</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/pc211/index.php"> <span class="menu-left"></span> <span class="menu-mid">PC211</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/spoofem_suites/index.php"> <span class="menu-left"></span> <span class="menu-mid">SPOOFEM</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/tools/index.php"> <span class="menu-left"></span> <span class="menu-mid">Tools</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Help</span> <span class="menu-right"></span> </a> </li> <li class="last"> <a href="/login/logout.php"> <span class="menu-left"></span> <span class="menu-mid">Logout</span> <span class="menu-right"></span> </a> </li> </ul> </div> </div><div class="content" style="width:800px;"><!-- begin top content --> <div style = "float: left"> <img src='portsnitchfinal.png' width="370px" /></div><div style = "float: left; margin-left: 2em; width:400px;"> <p align="justify"><font size="2"><b>PORTSNITCH</b> - For those that do not know what a "port" is, let me give you an example. Let’s say that your house is a computer, and your house has 65,000 windows and doors. Now imagine a potential burglar walking around your house checking to see if you have any open doors or windows. The burglar is not opening any of the doors or windows, but is checking to see if you left any of them open. We called him/her a "potential" burglar because until they illicitly enter an open door or window in which you left open, he/she has not broken any laws. That is the same as a hacker. Before a hacker can break-in to your computer, they perform what is called a "Port Scan" or “Vulnerability” check to see if you have any open ports (doors or windows). Once the hacker finds the open ports, he/she will then figure out which tools they will need to pry the door or window wide open, without setting off any alarms. These tools are called "Exploits."</font></p> <br /> <br /> </div><!-- end top content --> <div style="float:left;"..
This page responses with HTTP redirect status therefore detected XSS vulnerability might not be exploitable in many conditions however it still indicates lack of correct filtering and should be addressed.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html lang="en"><head> <title>PORTSNITCH | LIGATT Security Suites</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="keywords" content=""> <meta name="description" content=""> <link rel="stylesheet" type="text/css" href="cluetip/jquery.cluetip.css"> <link rel="stylesheet" type="text/css" href="css/screen.css"> <link rel="stylesheet" type="text/css" href="css/dropdown.css"> <link rel="stylesheet" type="text/css" href="tablesorter/themes/blue/style.css" /> <link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css" /> <link rel="stylesheet" href="menu_style.css" type="text/css" /> <script type="text/javascript" src="shadowbox/shadowbox.js"></script> <script type="text/javascript"> /*Shadowbox.init({ handleOversize: "drag", displayNav: false, handleUnsupported: "remove", autoplayMovies: false, language: 'en', //players: ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv'] player });*/ function target_phone_map() { //This will be a test to see if when we click it will open up a map Shadowbox.open({ player: 'html', content: '', height: 350, width: 350, options: { onFinish: function(item){ if(GBrowserIsCompatible()){ //create map canvas var mapPhone = new GMap2(document.getElementById(Shadowbox.contentId())); //set map type mapPhone.setMapType(G_SATELLITE_MAP); //set lat and long for map mapPhone.setCenter(new GLatLng(, ), 17); //set user interface to default which includes the zoom tool, and four map type buttons mapPhone.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(,); mapPhone.addOverlay(new GMarker(point)); } } } }); } function target_ip_map() { //This will be a test to see if when we click it will open up a map Shadowbox.open({ player: 'html', content: '', height: 350, width: 350, options: { onFinish: function(item){ if(GBrowserIsCompatible()){ //create map canvas var map = new GMap2(document.getElementById(Shadowbox.contentId())); //set map type map.setMapType(G_SATELLITE_MAP); //set lat and long for map map.setCenter(new GLatLng(0, 0), 17); //set user interface to default which includes the zoom tool, and four map type buttons map.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(0,0); map.addOverlay(new GMarker(point)); } } } }); } function target_address_map() { //This will be a test to see if when we click it will open up a map Shadowbox.open({ player: 'html', content: '', height: 350, width: 350, options: { onFinish: function(item){ if(GBrowserIsCompatible()){ /*Code for the address map*/ mapAdd = new GMap2(document.getElementById(Shadowbox.contentId())); mapAdd.setMapType(G_SATELLITE_MAP); mapAdd.setCenter(new GLatLng(37.4419, -122.1419), 15); mapAdd.setUIToDefault(); geocoder = new GClientGeocoder(); var address = "3 \'\"--></style></script><script>netsparker(0x000B9A)</script> 3 3 3 3"; if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { mapAdd.setCenter(point, 15); var marker = new GMarker(point); mapAdd.addOverlay(marker); //marker.openInfoWindowHtml(address); } } ); } } } } }); } </script> <script src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript" src="cluetip/jquery.cluetip.js"></script> <script type="text/javascript" src="library/jquery_calls.js"></script> <script type="text/javascript" src="library/country.js"></script> <script type="text/javascript" src="library/ajax.js"></script> <script src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAiKM1iuk5Njtbop701BMpmhSpvELy0EdfA-aKJpnzXJx4Ryo4DBQ0sYoJ1vmKceddiB5Rj8ONIGtQ-A" type="text/javascript"></script> <script type="text/javascript" src="js/helpers.js"></script> <script type="text/javascript" src="js/date.js"></script> <script type="text/javascript" src="js/form.js"></script> <script src="jquery.tablesorter.js"></script> <script src="jquery.tablesorter.pager"></script> <script language="Javascript">var finished = false;function ltrim ( s ){return s.replace( /^\s*/, "" );}function twoOrMore(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only send one IP address to TattleTell!"); return false; } } } } if (over == 0) { alert("Please check at least one IP address to send to TattleTell"); return false; } else { document.getElementById('history').setAttribute('action', '/tattletell/addtarget.php'); document.getElementById('history').submit(); }}function twoOrMorePC211(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only send one IP address to PC211!"); return false; } } } } if (over == 0) { alert("Please check at one IP address to send to PC211"); return false; } else { document.getElementById('history').setAttribute('action', '/pc211/exploit.php'); document.getElementById('history').submit(); }}function twoOrMorePurchase(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only purchase one report at a time!"); return false; } } } } if (over == 0) { alert("Please check at one IP address to purchase"); return false; } else { document.getElementById('history').setAttribute('action', 'chkStatus.php'); document.getElementById('history').submit(); }}function twoOrMoreSendReport(form){ var over = 0; var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if (myForm.elements[i].checked == true) { over++; if (over > 1) { alert("You can only send one report at a time!"); return false; } } } } if (over == 0) { alert("Please check at one least report to send"); return false; } else { document.getElementById('history').setAttribute('action', 'sendReport.php'); document.getElementById('history').submit(); }}function selectToggle(toggle, form){ var myForm = document.forms[form]; for( var i=0; i < myForm.length; i++ ) { if (myForm.elements[i].type == "checkbox") { if(toggle) { myForm.elements[i].checked = "checked"; } else { myForm.elements[i].checked = ""; } } }}function sendToTattle(){ document.getElementById('history').setAttribute('action', '/tattletell/addtarget.php'); document.getElementById('history').submit();}function deleteStuff(){document.getElementById('history').setAttribute('action','delete_history.php');document.getElementById('history').submit();}function go_back_to_index() { document.location='/portscanner/index.php';}var interval_id; function check_this_scan_status(this_id) { var strURL = "check_this_scan_status.php"; var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest(); } // IE else if (window.ActiveXObject) { self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP"); } self.xmlHttpReq.open('POST', strURL, true); self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4 && !finished) { var real_string = ltrim(self.xmlHttpReq.responseText); if( real_string.charAt(0) == "~") //if(self.xmlHttpReq.responseText.charAt(0)=='~') { updatepage(self.xmlHttpReq.responseText); finished = true; //Load the function //test(); initialize(); //The other functions to load the address map initializeAddress(); showAddress(); //One more function that will load the phone number map initializePhone(); } else { updatepage(self.xmlHttpReq.responseText); } //updatepage(self.xmlHttpReq.responseText); } } self.xmlHttpReq.send(getquerystring(this_id));}function getquerystring(id) { //var form = document.forms['f1']; //var word = form.word.value; //qstr = 'w=' + escape(word); // NOTE: no '?' before querystring qstr = 'id=' + id; return qstr;}function updatepage(str){ document.getElementById("update_pane").innerHTML = str;}</script> <script>function initialize() { //create map canvas var map = new GMap2(document.getElementById("map_canvas")); //set map type map.setMapType(G_SATELLITE_MAP); //set lat and long for map map.setCenter(new GLatLng(0, 0), 17); //set user interface to default which includes the zoom tool, and four map type buttons map.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(0,0); map.addOverlay(new GMarker(point)); }</script><script> var mapAdd = null; var geocoder = null; function initializeAddress() { mapAdd = new GMap2(document.getElementById("map_canvas_address")); mapAdd.setMapType(G_SATELLITE_MAP); mapAdd.setCenter(new GLatLng(37.4419, -122.1419), 15); mapAdd.setUIToDefault(); geocoder = new GClientGeocoder(); } function showAddress() { var address = "3 \'\"--></style></script><script>netsparker(0x000B9A)</script> 3 3 3 3"; if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { mapAdd.setCenter(point, 15); var marker = new GMarker(point); mapAdd.addOverlay(marker); //marker.openInfoWindowHtml(address); } } ); } }</script><script>function initializePhone() { //create map canvas var mapPhone = new GMap2(document.getElementById("map_canvas_phone")); //set map type mapPhone.setMapType(G_SATELLITE_MAP); //set lat and long for map mapPhone.setCenter(new GLatLng(, ), 17); //set user interface to default which includes the zoom tool, and four map type buttons mapPhone.setUIToDefault(); //add point with set lat and long for point var point = new GLatLng(,); mapPhone.addOverlay(new GMarker(point));}</script> <script type="text/javascript"> $(document).ready(function(){ Shadowbox.init({ handleOversize: "drag", displayNav: false, handleUnsupported: "remove", autoplayMovies: false, language: 'en', players: ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv'] }); $('a.basic').cluetip({ width: '300px', height: '300px', showTitle: true }); //The table for the scans $("#myTable").tablesorter({ sortList:[[0,0]], widthFixed: true, headers: { 7: { sorter: false }, 8: { sorter: false } } }); /*$(".menu2 a").append("<em></em>"); $(".menu2 a").hover(function() { $(this).find("em").animate({opacity: "show", top: "-75"}, "slow"); var hoverText = $(this).attr("title"); $(this).find("em").text(hoverText); }, function() { $(this).find("em").animate({opacity: "hide", top: "-85"}, "fast"); });*/ }); </script> </head><body> <div class="wrapper"> <div class="nav-wrapper"> <div class="nav"> <ul id="navigation"> <li class=""> <a href="/ezpay/index.php"> <span class="menu-left"></span> <span class="menu-mid">My Account</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/ezpay/subAccntForm.php">Sub Account</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class=""> <a href="/tattletell/yourips.php"> <span class="menu-left"></span> <span class="menu-mid">Tattletell</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/tattletell/yourips.php">Your IP Monitoring</a> </li> <li> <a href="/tattletell/addtarget.php">Add Target</a> </li> <li> <a href="/tattletell/signup.php">Purchase IPs</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class=""> <a href="/email_snitch/index.php"> <span class="menu-left"></span> <span class="menu-mid">IPSnitch</span> <span class="menu-right"></span> </a> <div class="sub"> <ul> <li> <a href="/email_snitch/createSnitch.php">Add Target</a> </li> </ul> <div class="btm-bg"></div> </div> </li> <li class="active"> <a href="/portscanner/index.php"> <span class="menu-left"></span> <span class="menu-mid">PortSnitch</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/proxy/spoofnetACCESS.php"> <span class="menu-left"></span> <span class="menu-mid">Spoofnet</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/portsnitch/index.php"> <span class="menu-left"></span> <span class="menu-mid">Recon</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/pc211/index.php"> <span class="menu-left"></span> <span class="menu-mid">PC211</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/spoofem_suites/index.php"> <span class="menu-left"></span> <span class="menu-mid">SPOOFEM</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="/tools/index.php"> <span class="menu-left"></span> <span class="menu-mid">Tools</span> <span class="menu-right"></span> </a> </li> <li class=""> <a href="#"> <span class="menu-left"></span> <span class="menu-mid">Help</span> <span class="menu-right"></span> </a> </li> <li class="last"> <a href="/login/logout.php"> <span class="menu-left"></span> <span class="menu-mid">Logout</span> <span class="menu-right"></span> </a> </li> </ul> </div> </div><div class="content" style="width:800px;"><!-- begin top content --> <div style = "float: left"> <img src='portsnitchfinal.png' width="370px" /></div><div style = "float: left; margin-left: 2em; width:400px;"> <p align="justify"><font size="2"><b>PORTSNITCH</b> - For those that do not know what a "port" is, let me give you an example. Let’s say that your house is a computer, and your house has 65,000 windows and doors. Now imagine a potential burglar walking around your house checking to see if you have any open doors or windows. The burglar is not opening any of the doors or windows, but is checking to see if you left any of them open. We called him/her a "potential" burglar because until they illicitly enter an open door or window in which you left open, he/she has not broken any laws. That is the same as a hacker. Before a hacker can break-in to your computer, they perform what is called a "Port Scan" or “Vulnerability” check to see if you have any open ports (doors or windows). Once the hacker finds the open ports, he/she will then figure out which tools they will need to pry the door or window wide open, without setting off any alarms. These tools are called "Exploits."</font></p> <br /> <br /> </div><!-- end top content --> <div style="float:left;"..
"Auto Complete" was enabled in one or more of the form fields. These were either "password" fields or important fields such as "Credit Card".
Impact
Data entered in these fields will be cached by the browser. An attacker who can access the victim's browser could steal this information. This is especially important if the application is commonly used in shared computers such as cyber cafes or airport terminals.
Remedy
Add the attribute autocomplete="off" to the form tag or to individual "input" fields.
Actions to Take
See the remedy for the solution.
Find all instances of inputs which store private data and disable autocomplete. Fields which contain data such as "Credit Card" or "CCV" type data should not be cached. You can allow the application to cache usernames and remember passwords, however, in most cases this is not recommended.
Re-scan the application after addressing the identified issues to ensure that all of the fixes have been applied properly.
Required Skills for Successful Exploitation
Dumping all data from a browser can be fairly easy and there exist a number of automated tools to undertake this. Where the attacker cannot dump the data, he/she could still browse the recently visited websites and activate the auto-complete feature to see previously entered values.
<style type="text/css"><!--.boobytraptext { font-family: Arial, Helvetica, sans-serif; font-weight:bold;}.boobytraptext { color: #CCC; }body { background-color: #000; text-align: center;}--></style><table width="13%" height="643" border="0" align="center" cellpadding="10"> <tr valign="top"> <td height="119"><img src="images/boobytrap.png" alt="" width="400" height="117" /></td> </tr> <tr> <td height="282"><p class="boobytraptext"> <span class="boobytraptext"><strong>BoobyTrap Will allow you to send a "BoobyTrap" email to your email account. A BoobyTrap email is an email that wil let you know if anyone is reading your emails without your knowledge. It will give you the IP address of the person as well as give you a location of where they were when they read the email.</strong></span> </p> <p class="boobytraptext"><strong>In some cases boobytrap will allow you to take pictures and recordings of the culprit if they have a webcam attached or built-in their computer.</strong></p></td> </tr> <tr> <td height="216" align="center" class="boobytraptext"><p>Enter your username and password</p> <form id="form1" name="form1" method="post" action="validateUser.php"> <p>username: <label> <input type="text" name="uname" id="username"> </label> </p> <p><br> password: <label> <input type="password" name="password" id="password"> </label> </p> <p> <label> <input type="submit" name="start" id="start" value="Submit" /> </label> </p></form> <p> </p></td> </tr></table><p align="center"> </p><p> </p>
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.
Netsparker identified that the target web server is an Apache server. This was disclosed through the HTTP response. This information can help an attacker to gain a greater understanding of the systems in use and potentially develop further attacks targeted at the specific version of Apache.
Impact
An attacker can search for specific security vulnerabilities for the version of Apache identified within the SERVER header.
Remedy
Configure your web server to prevent information leakage from the SERVER header of its HTTP response.
Netsparker identified a programming error message.
Impact
The error message may disclose sensitive information and this information can be used by an attacker to mount new attacks or to enlarge the attack surface. Source code, stack trace, etc. type data may be disclosed. Most of these issues will be identified and reported separately by Netsparker.
Remedy
Do not provide error messages on production environments. Save error messages with a reference number to a backend storage such as a log, text file or database then show this number and a static user-friendly error message to the user.
<b>Warning</b>: require_once(config.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>/var/www/html/proxy/includes/init.php</b> on line <b>6</b>
<b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'config.php' (include_path='.:/usr/share/pear:/usr/share/php') in <b>/var/www/html/proxy/includes/init.php</b> on line <b>6</b>
Request
GET /proxy/includes/process.php?action=update HTTP/1.1 Referer: http://www.untraceableemail.net/proxy/ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.untraceableemail.net Cookie: Apache=173.193.214.243.1303533512920701; PHPSESSID=da6gt429mc685hob4f5n0g4sm7 Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Sat, 23 Apr 2011 04:40:12 GMT Server: Apache/2.2.9 (Fedora) Content-Length: 482 Connection: close Content-Type: text/html; charset=UTF-8
<br /><b>Warning</b>: require_once(config.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>/var/www/html/proxy/includes/init.php</b> on line <b>6</b><br /><br /><b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'config.php' (include_path='.:/usr/share/pear:/usr/share/php') in <b>/var/www/html/proxy/includes/init.php</b> on line <b>6</b><br />
Netsparker identified a backup file on the web server.
Impact
Backup files can contain old or current versions of a file on the web server. This could include sensitive data such as password files or even the applications source code. This form of issue normally leads to further vulnerabilities or at worse sensitive information disclosure.
function go_back_to_index() { document.location='http://97.74.195.39/portscanner/index.php'; }
function validate(form) { with (form) { if (validate_email(email,"Not a valid e-mail address!")==false) {email.select();return false;} if(IsPhoneNumber(phone.value,"Please enter a valid phone number, with no '+,(-)' characters!")==false) {phone.select(); return false;} if(IsPhoneNumber(zip.value,"Please enter a valid zip code!")==false) {zip.select(); return false;} } return true; } function validate_email(field,alerttxt) { with (field) { apos=value.indexOf("@"); dotpos=value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alert(alerttxt);return false;} else {return true;} } }
function IsPhoneNumber(strFieldValue, strAlert) { size=strFieldValue.length; for ( var i=0; i < size; i++) {
function go_back_to_index() { document.location='http://97.74.195.39/portscanner/index.php'; }
function validate(form) { with (form) { if (validate_email(email,"Not a valid e-mail address!")==false) {email.select();return false;} if(IsPhoneNumber(phone.value,"Please enter a valid phone number, with no '+,(-)' characters!")==false) {phone.select(); return false;} if(IsPhoneNumber(zip.value,"Please enter a valid zip code!")==false) {zip.select(); return false;} } return true; } function validate_email(field,alerttxt) { with (field) { apos=value.indexOf("@"); dotpos=value.lastIndexOf("."); if (apos<1||dotpos-apos<2) {alert(alerttxt);return false;} else {return true;} } }
function IsPhoneNumber(strFieldValue, strAlert) { size=strFieldValue.length; for ( var i=0; i < size; i++) {
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>403 Forbidden</title></head><body><h1>Forbidden</h1><p>You don't have permission to access /icons/on this server.</p><hr><address>Apache/2.2.9 (Fedora) Server at www.untraceableemail.net Port 80</address></body></html>
Netsparker found e-mail addresses on the web site.
Impact
E-mail addresses discovered within the application can be used by both spam email engines and also brute force tools. Furthermore valid email addresses may lead to social engineering attacks .
Remedy
Use generic email addresses such as contact@ or info@ for general communications, remove user/people specific e-mail addresses from the web site, should this be required use submission forms for this purpose.
GET /boobitrap/images/ HTTP/1.1 Referer: http://www.untraceableemail.net/boobitrap/images/boobytrap.png User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.untraceableemail.net Cookie: Apache=173.193.214.243.1303533512871593 Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Sat, 23 Apr 2011 04:38:33 GMT Server: Apache/2.2.9 (Fedora) Content-Length: 1043 Connection: close Content-Type: text/html; charset=UTF-8
<!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><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title><style type="text/css"><!--.header { font-family: Verdana, Geneva, sans-serif;}--></style></head>_111222<body><p><img src="/images/boobytrap.png" width="400" height="117" alt="" /></p><p> </p><p class="header">BoobyTrap will help you verify if your email is being monitored.</p><p class="header">You will receive an email from First National Bank of Manhattan.</p><p><span class="header">DO NOT OPEN THIS EMAIL</span>.</p><p> </p><form id="form1" name="form1" method="post" action="boobtest.php"> <label> <input type="submit" name="btn" id="btn" value="START THE PROCESS>>>" /> </label> <input type="hidden" name="email_contact" id="email_contact" value="eigyan@iegraphics.com" /></form><p> </p></body></html>
Netsparker identified that the response from the page returned an HTTP Redirect Status but output more information than usual. This generally indicates that after redirect, page did not finish the response as it was supposed to.
Impact
This can lead serious issues such authentication bypass in authentication required pages, in other pages it generally indicates a programming error.
Remedy
Finish the HTTP Response after you redirect the user.
In ASP.NET use Response.Redirect("redirected-page.aspx", true); instead of Response.Redirect("redirected-page.aspx", false);
In PHP applications call exit(); after you redirect the user.
GET /proxy/includes/process.php?action=update HTTP/1.1 Referer: http://www.untraceableemail.net/proxy/ User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.untraceableemail.net Cookie: Apache=173.193.214.243.1303533512920701; PHPSESSID=da6gt429mc685hob4f5n0g4sm7 Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Sat, 23 Apr 2011 04:40:12 GMT Server: Apache/2.2.9 (Fedora) Content-Length: 482 Connection: close Content-Type: text/html; charset=UTF-8
<br /><b>Warning</b>: require_once(config.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in <b>/var/www/html/proxy/includes/init.php</b> on line <b>6</b><br /><br /><b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'config.php' (include_path='.:/usr/share/pear:/usr/share/php') in <b>/var/www/html/proxy/includes/init.php</b> on line <b>6</b><br />
GET /site/ HTTP/1.1 Referer: http://www.untraceableemail.net/site/spoofem/ajax-loader.gif User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Cache-Control: no-cache Host: www.untraceableemail.net Cookie: Apache=173.193.214.243.1303533512920701; PHPSESSID=da6gt429mc685hob4f5n0g4sm7 Accept-Encoding: gzip, deflate
Response
HTTP/1.1 200 OK Date: Sat, 23 Apr 2011 04:40:52 GMT Server: Apache/2.2.9 (Fedora) Content-Length: 1195 Connection: close Content-Type: text/html; charset=UTF-8
<br /><b>Warning</b>: mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: Access denied for user 'root'@'localhost' (using password: YES) in <b>/var/www/html/site/index.php</b> on line <b>19</b><br /><br /><b>Warning</b>: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: Access denied for user 'apache'@'localhost' (using password: NO) in <b>/var/www/html/site/index.php</b> on line <b>20</b><br /><br /><b>Warning</b>: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: A link to the server could not be established in <b>/var/www/html/site/index.php</b> on line <b>20</b><br /><br /><b>Warning</b>: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Access denied for user 'apache'@'localhost' (using password: NO) in <b>/var/www/html/site/index.php</b> on line <b>34</b><br /><br /><b>Warning</b>: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: A link to the server could not be established in <b>/var/www/html/site/index.php</b> on line <b>34</b><br />Database Error: Unable to connect to the database:Could not connect to MySQL
<br /><b>Warning</b>: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'root'@'localhost' (using password: YES) in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>19</b><br /><br /><b>Warning</b>: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: Access denied for user 'apache'@'localhost' (using password: NO) in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>20</b><br /><br /><b>Warning</b>: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: A link to the server could not be established in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>20</b><br /><br /><b>Warning</b>: mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'root'@'localhost' (using password: YES) in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>236</b><br /><br /><b>Warning</b>: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: Access denied for user 'apache'@'localhost' (using password: NO) in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>237</b><br /><br /><b>Warning</b>: mysql_select_db() [<a href='function.mysql-select-db'>function.mysql-select-db</a>]: A link to the server could not be established in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>237</b><br /><br /><b>Warning</b>: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Access denied for user 'apache'@'localhost' (using password: NO) in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>242</b><br /><br /><b>Warning</b>: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: A link to the server could not be established in <b>/var/www/html/portscanner/biz/check_this_scan_status.php</b> on line <b>242</b><br />