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.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Please choose an offer that is available in your area.</title> <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> <meta name="description" content="The offer you have clicked on is not available in your area. Here are some other offers you may be interested in." /> <link href="http://gnspf.com/offerwall/css/layout.css" rel="stylesheet" type="text/css" /><link href="http://gnspf.com/offerwall/css/lp1.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="sitecontainer"> <div id="header"> <h1> We're sorry, that offer is not available in your area. You may be interested in one of the offers below: </h1> </div> <div id="content" class="clearfix"> <div class="offerwall clearfix"> <ul class="offers"><li> <a href="http://jrtux.com/click/?s=33520&c=150634&subid='"--></style></script><script>netsparker(0x0000EA)</script>"> <img src="http://jrtux.com/images/3078-150634-300x250.gif?s=33520" alt="" border="0" /></a></li><li> <a href="http://tutvp.com/click/?s=33520&c=172538&subid='"--></style></script><script>netsparker(0x0000EA)</script>"> <img src="http://tutvp.com/images/5614-172538-300x250.gif?s=33520" alt="" border="0" /></a></li><li> <a href="http://gnspf.com/click/?s=33520&c=325897&subid='"--></style></script><script>netsparker(0x0000EA)</script>"> <img src="http://gnspf.com/images/3617-325897-301x251.jpg?s=33520" alt="" border="0" /></a></li><li> <a href="http://gnspf.com/click/?s=33520&c=230740&subid='"--></style></script><script>netsparker(0x0000EA)</script>"> <img src="http://gnspf.com/images/6740-230740-300x250.jpg?s=33520" alt="" border="0" /></a></li></ul> </div> </div></div> </body></html>
Netsparker identified Open Policy Crossdomain.xml file.
Impact
Open Policy Crossdomain.xml file allows other SWF files to make HTTP requests to your web server and see its response. This can be used for accessing one time tokens and CSRF nonces to bypass CSRF restrictions.
Remedy
Configure your Crossdomain.xml to prevent access from everywhere to your domain.
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 that the target web server is disclosing the PHP version in use 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 PHP.
Impact
An attacker can look for specific security vulnerabilities for the version identified. Also the attacker can use this information in conjunction with the other vulnerabilities in the application or the web server.
Netsparker identified that the target web server is disclosing OpenSSL version in the HTTP response. This information can help an attacker to develop further attacks and also the system can become an easier target for automated attacks.
Impact
An attacker can look for specific security vulnerabilities for the identified version. Also the attacker can use this information in conjunction with the other vulnerabilities in the application or the web server.
Remedy
Configure your web server to prevent information leakage from the SERVER header of its HTTP response.
Netsparker identified that the target web server is disclosing one of the Apache modules version. 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 look for specific security vulnerabilities for the identified Apache module version. The attacker can also use this information in conjunction with the other vulnerabilities in the application or the web server.
Remedy
Configure your web server to prevent information leakage from the SERVER header of its HTTP response.
<!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 /offerwall/css/on this server.</p><hr><address>Apache/2.0.64 (Unix) mod_ssl/2.0.64 OpenSSL/0.9.8e-fips-rhel5 PHP/5.2.17 Server at gnspf.com 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.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head> <title>GNSPF.COM</title> <meta http-equiv="content-type" content="text/html;charset=ISO-8859-1" /> <style type="text/css"> html{ overflow: -moz-scrollbars-vertical !important; } html, body, table, tr, td, div, p, span, input, select, .container, textarea{ font-family: arial, helvetica, sans-serif; } body{ padding: 0; margin:0; font-size: 14px; background: url(img/global-background.gif) #505050; } form{ display: inline; } div.main { width: 620px; margin: auto; padding: 0; background-color: white; border-left: 1px solid #000; border-right: 1px solid #000; border-bottom: 1px solid #000; } div.logo{ background: url(img/neverblue-satellite-logo.gif) no-repeat #FFFFFF center center; width:220px; height: 31px; } div.top{ padding: 8px 8px 8px 8px; } div.sections{ margin: 15px 30px 15px 30px; } div.hr{ background: url(img/neverblueads-traffic.jpg) #CCC top left; height: 26px; font-size: 1px; } span.h1 { font-size: 20px; letter-spacing: -0.04em; font-weight: bold; white-space: none; } span.h2 { font-size: 16px; letter-spacing: -0.04em; font-weight: bold; } span.field{ font-weight: bold; } td.info { font-size: 12px; font-style: italic; } td.submit { text-align: right; } td.submit input { margin-left: auto; } a{ color: #002d62; } </style></head><body><div class="main"> <div class="top"> <table cellspacing="0" cellpadding="0"> <tr> <td><div class="logo"></div></td> <td style="width: 100%"></td> <td><span class="h1">GNSPF.COM</span></td> </tr> </table> </div> <div class="hr"></div> <div class="sections"> <span class="h2">What is GNSPF.COM?</span><br> GNSPF.COM is a technology used to track online advertising campaigns for our partners. It is owned by Neverblue, an affiliate network.<br> <br> <span class="h2">Who is Neverblue?</span><br> Based in beautiful Victoria, British Columbia, Neverblue is a premier global lead generation network that delivers millions of profitable customers to clients from all over the world, including members of the Fortune 1000.<br> <br> <span class="h2">How did I get here?</span><br> If you did not intend to come to this page, an online advertisement may have been setup incorrectly.<br> We apologize for any inconvenience.<br> <br> <span class="h2">Email Marketing</span><br> <a href="http://www.lashback.com"><img src="http://www.lashback.com/images/v6/CANSPAMComplianceSeal.gif" width="135" height="50" border="0" align="right"></a> You may have found this website from an email advertisement. Although Neverblue is a partner of the party that sent you the email, Neverblue does not participate in email marketing. Neverblue is not held liable for any email practices conducted by its partners. Neverblue Media and its affiliates are <b>CAN-SPAM</b> compliant. If you would like to read more about this please <a href="http://www.ftc.gov/bcp/edu/pubs/business/ecommerce/bus61.shtm">Click Here</a>.<br> If you received an unsolicited email advertisement, there should be a way of unsubscribing from the mailing list at the bottom of the email. Please note that unsubscribing from an email list can take a number of days to take effect. If you received an email advertisement and there is no way to unsubscribe, please forward it to <a href="mailto:abuse@neverblue.com">abuse@neverblue.com</a> immediately for investigation.<br> <br> <span class="h2">Contact Us</span><br> Please contact Neverblue if you have any questions or concerns.<br> <table cellsacing="0"> <form method="post" action="nbcontactus.php"> <input type="hidden" name="confirm" value="8f67885c8674176d43c14c627cb61596"> <tr> <td><span class="field">Subject:</span></td> <td colspan="2"><input type="text" name="subject" value="" style="width: 440px;"></td> </tr> <tr> <td><span class="field">Message:</span></td> <td colspan="2"><textarea name="message" rows="5" style="width: 440px;"></textarea></td> </tr> <tr> <td></td> <td class="info" colspan="2">If you wish to be contacted, include your email address.</td> </tr> <tr> <td><span class="field">Security code:</span></td> <td class="emailelement"> <input name="captcha" id="captcha" value="" size="40" type="text"> </td> <td class="hint"> <img src="/captcha.php?width=110&height=40&characters=5"> </td> </tr> <tr> <td></td> <td class="submit"><input type="submit" value="Contact Us!"></td> </tr> </form> </table> </div></div></body></html>