ZAP Scanning Report

Summary of Alerts

Risk LevelNumber of Alerts
High4
Medium4
Low13
Informational0

Alert Detail

High (Medium)SQL Injection - MySQL
Description

SQL injection may be possible.

URLhttp://192.168.52.147/bWAPP/sqli_16.php
MethodPOST
Parameterlogin
Attackbee' UNION ALL select NULL --
EvidenceThe used SELECT statements have a different number of columns
Instances1
Solution

Do not trust client side input, even if there is client side validation in place.

In general, type check all data on the server side.

If the application uses JDBC, use PreparedStatement or CallableStatement, with parameters passed by '?'

If the application uses ASP, use ADO Command Objects with strong type checking and parameterized queries.

If database Stored Procedures can be used, use them.

Do *not* concatenate strings into queries in the stored procedure, or use 'exec', 'exec immediate', or equivalent functionality!

Do not create dynamic SQL queries using simple string concatenation.

Escape all data received from the client.

Apply a 'whitelist' of allowed characters, or a 'blacklist' of disallowed characters in user input.

Apply the principle of least privilege by using the least privileged database user possible.

In particular, avoid using the 'sa' or 'db-owner' database users. This does not eliminate SQL injection, but minimizes its impact.

Grant the minimum database access that is necessary for the application.

Other information

RDBMS [MySQL] likely, given UNION-specific error message regular expression [\QThe used SELECT statements have a different number of columns\E] matched by the HTML results

The vulnerability was detected by manipulating the parameter with an SQL UNION clause to cause a database error message to be returned and recognised

Reference

https://www.owasp.org/index.php/Top_10_2010-A1

https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet

CWE Id89
WASC Id19
Source ID1
High (Medium)Server Side Code Injection - PHP Code Injection
Description

A code injection may be possible including custom code that will be evaluated by the scripting engine

URLhttp://192.168.52.147/bWAPP/phpi.php?message=%24%7B%40print%28chr%28122%29.chr%2897%29.chr%28112%29.chr%2895%29.chr%28116%29.chr%28111%29.chr%28107%29.chr%28101%29.chr%28110%29%29%7D
MethodGET
Parametermessage
Attack${@print(chr(122).chr(97).chr(112).chr(95).chr(116).chr(111).chr(107).chr(101).chr(110))}
Instances1
Solution

Do not trust client side input, even if there is client side validation in place.

In general, type check all data on the server side and escape all data received from the client.

Avoid the use of eval() functions combined with user input data.

Reference

http://cwe.mitre.org/data/definitions/94.html

https://www.owasp.org/index.php/Direct_Dynamic_Code_Evaluation_('Eval_Injection')

CWE Id94
WASC Id20
Source ID1
High (Medium)SQL Injection
Description

SQL injection may be possible.

URLhttp://192.168.52.147/bWAPP/sqli_11.php?title=we%27+AND+%271%27%3D%271%27+--+&action=search
MethodGET
Parametertitle
Attackwe' OR '1'='1' --
Instances1
Solution

Do not trust client side input, even if there is client side validation in place.

In general, type check all data on the server side.

If the application uses JDBC, use PreparedStatement or CallableStatement, with parameters passed by '?'

If the application uses ASP, use ADO Command Objects with strong type checking and parameterized queries.

If database Stored Procedures can be used, use them.

Do *not* concatenate strings into queries in the stored procedure, or use 'exec', 'exec immediate', or equivalent functionality!

Do not create dynamic SQL queries using simple string concatenation.

Escape all data received from the client.

Apply a 'whitelist' of allowed characters, or a 'blacklist' of disallowed characters in user input.

Apply the principle of least privilege by using the least privileged database user possible.

In particular, avoid using the 'sa' or 'db-owner' database users. This does not eliminate SQL injection, but minimizes its impact.

Grant the minimum database access that is necessary for the application.

Other information

The page results were successfully manipulated using the boolean conditions [we' AND '1'='1' -- ] and [we' OR '1'='1' -- ]

The parameter value being modified was NOT stripped from the HTML output for the purposes of the comparison

Data was NOT returned for the original parameter.

The vulnerability was detected by successfully retrieving more data than originally returned, by manipulating the parameter

Reference

https://www.owasp.org/index.php/Top_10_2010-A1

https://www.owasp.org/index.php/SQL_Injection_Prevention_Cheat_Sheet

CWE Id89
WASC Id19
Source ID1
High (Low)Cross Site Scripting (Reflected)
Description

Cross-site Scripting (XSS) is an attack technique that involves echoing attacker-supplied code into a user's browser instance. A browser instance can be a standard web browser client, or a browser object embedded in a software product such as the browser within WinAmp, an RSS reader, or an email client. The code itself is usually written in HTML/JavaScript, but may also extend to VBScript, ActiveX, Java, Flash, or any other browser-supported technology.

When an attacker gets a user's browser to execute his/her code, the code will run within the security context (or zone) of the hosting web site. With this level of privilege, the code has the ability to read, modify and transmit any sensitive data accessible by the browser. A Cross-site Scripted user could have his/her account hijacked (cookie theft), their browser redirected to another location, or possibly shown fraudulent content delivered by the web site they are visiting. Cross-site Scripting attacks essentially compromise the trust relationship between a user and the web site. Applications utilizing browser object instances which load content from the file system may execute code under the local machine zone allowing for system compromise.

There are three types of Cross-site Scripting attacks: non-persistent, persistent and DOM-based.

Non-persistent attacks and DOM-based attacks require a user to either visit a specially crafted link laced with malicious code, or visit a malicious web page containing a web form, which when posted to the vulnerable site, will mount the attack. Using a malicious form will oftentimes take place when the vulnerable resource only accepts HTTP POST requests. In such a case, the form can be submitted automatically, without the victim's knowledge (e.g. by using JavaScript). Upon clicking on the malicious link or submitting the malicious form, the XSS payload will get echoed back and will get interpreted by the user's browser and execute. Another technique to send almost arbitrary requests (GET and POST) is by using an embedded client, such as Adobe Flash.

Persistent attacks occur when the malicious code is submitted to a web site where it's stored for a period of time. Examples of an attacker's favorite targets often include message board posts, web mail messages, and web chat software. The unsuspecting user is not required to interact with any additional site/link (e.g. an attacker site or a malicious link sent via email), just simply view the web page containing the code.

URLhttp://192.168.52.147/bWAPP/sqli_16.php
MethodPOST
Parameterlogin
Attack'"<script>alert(1);</script>
Evidence'"<script>alert(1);</script>
Instances1
Solution

Phase: Architecture and Design

Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.

Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.

Phases: Implementation; Architecture and Design

Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies.

For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters.

Consult the XSS Prevention Cheat Sheet for more details on the types of encoding and escaping that are needed.

Phase: Architecture and Design

For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

If available, use structured mechanisms that automatically enforce the separation between data and code. These mechanisms may be able to provide the relevant quoting, encoding, and validation automatically, instead of relying on the developer to provide this capability at every point where output is generated.

Phase: Implementation

For every web page that is generated, use and specify a character encoding such as ISO-8859-1 or UTF-8. When an encoding is not specified, the web browser may choose a different encoding by guessing which encoding is actually being used by the web page. This can cause the web browser to treat certain sequences as special, opening up the client to subtle XSS attacks. See CWE-116 for more mitigations related to encoding/escaping.

To help mitigate XSS attacks against the user's session cookie, set the session cookie to be HttpOnly. In browsers that support the HttpOnly feature (such as more recent versions of Internet Explorer and Firefox), this attribute can prevent the user's session cookie from being accessible to malicious client-side scripts that use document.cookie. This is not a complete solution, since HttpOnly is not supported by all browsers. More importantly, XMLHTTPRequest and other powerful browser technologies provide read access to HTTP headers, including the Set-Cookie header in which the HttpOnly flag is set.

Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a whitelist of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. Do not rely exclusively on looking for malicious or malformed inputs (i.e., do not rely on a blacklist). However, blacklists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.

When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if you are expecting colors such as "red" or "blue."

Ensure that you perform input validation at well-defined interfaces within the application. This will help protect the application even if a component is reused or moved elsewhere.

Reference

http://projects.webappsec.org/Cross-Site-Scripting

http://cwe.mitre.org/data/definitions/79.html

CWE Id79
WASC Id8
Source ID1
Medium (Medium)CSP Scanner: Wildcard Directive
Description

The following directives either allow wildcard sources (or ancestors), are not defined, or are overly broadly defined:

frame-ancestor

URLhttps://self-repair.mozilla.org/en-US/repair
MethodGET
ParameterContent-Security-Policy
Evidenceobject-src 'none'; base-uri 'none'; block-all-mixed-content; worker-src 'none'; frame-src 'none'; form-action 'self'; default-src 'self' https://normandy-cloudfront.cdn.mozilla.net/; report-uri /__cspreport__
Instances1
Solution

Ensure that your web server, application server, load balancer, etc. is properly configured to set the Content-Security-Policy header.

Reference

http://www.w3.org/TR/CSP2/

http://www.w3.org/TR/CSP/

http://caniuse.com/#search=content+security+policy

http://content-security-policy.com/

https://github.com/shapesecurity/salvation

CWE Id16
WASC Id15
Source ID3
Medium (Medium)X-Frame-Options Header Not Set
Description

X-Frame-Options header is not included in the HTTP response to protect against 'ClickJacking' attacks.

URLhttp://192.168.52.147/bWAPP/ba_weak_pwd.php
MethodPOST
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/js/
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/sqli_16.php
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/js/?C=D;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/evil/sandbox.htm
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=D;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/phpi.php?message=test
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/ba_weak_pwd.php
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/js/?C=M;O=A
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=M;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/phpi.php?message=teste
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/images/?C=S;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/sqli_16.php
MethodPOST
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/images/?C=M;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/info.php
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/js/?C=M;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/images/?C=D;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/js/?C=S;O=D
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/phpi.php
MethodGET
ParameterX-Frame-Options
URLhttp://192.168.52.147/bWAPP/secret_html.php
MethodGET
ParameterX-Frame-Options
Instances61
Solution

Most modern Web browsers support the X-Frame-Options HTTP header. Ensure it's set on all web pages returned by your site (if you expect the page to be framed only by pages on your server (e.g. it's part of a FRAMESET) then you'll want to use SAMEORIGIN, otherwise if you never expect the page to be framed, you should use DENY. ALLOW-FROM allows specific websites to frame the web page in supported web browsers).

Reference

http://blogs.msdn.com/b/ieinternals/archive/2010/03/30/combating-clickjacking-with-x-frame-options.aspx

CWE Id16
WASC Id15
Source ID3
Medium (Medium)Application Error Disclosure
Description

This page contains an error/warning message that may disclose sensitive information like the location of the file that produced the unhandled exception. This information can be used to launch further attacks against the web application. The alert could be a false positive if the error message is found inside a documentation page.

URLhttp://192.168.52.147/bWAPP/images/?C=S;O=A
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=S;O=A
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=N;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/images/?C=N;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/js/?C=S;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/stylesheets/
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/images/?C=M;O=A
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=D;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/js/?C=N;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/images/?C=N;O=A
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/images/?C=S;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=D;O=A
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/js/?C=D;O=A
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/images/?C=M;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/js/?C=M;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/js/?C=N;O=A
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/js/?C=D;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/images/?C=D;O=D
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/js/
MethodGET
EvidenceParent Directory
URLhttp://192.168.52.147/bWAPP/images/
MethodGET
EvidenceParent Directory
Instances27
Solution

Review the source code of this page. Implement custom error pages. Consider implementing a mechanism to provide a unique error reference/identifier to the client (browser) while logging the details on the server side and not exposing them to the user.

Reference

CWE Id200
WASC Id13
Source ID3
Medium (Low)Directory Browsing
Description

It is possible to view the directory listing. Directory listing may reveal hidden scripts, include files , backup source files etc which can be accessed to read sensitive information.

URLhttp://192.168.52.147/bWAPP/js/
MethodGET
AttackParent Directory
URLhttp://192.168.52.147/bWAPP/stylesheets/
MethodGET
AttackParent Directory
URLhttp://192.168.52.147/bWAPP/images/
MethodGET
AttackParent Directory
Instances3
Solution

Disable directory browsing. If this is required, make sure the listed files does not induce risks.

Reference

http://httpd.apache.org/docs/mod/core.html#options

http://alamo.satlug.org/pipermail/satlug/2002-February/000053.html

CWE Id548
WASC Id48
Source ID1
Low (Medium)CSP Scanner: Notices
Description

Warnings:

1:37: The block-all-mixed-content directive is an experimental directive that will be likely added to the CSP specification.

Info Items:

1:184: A draft of the next version of CSP deprecates report-uri in favour of a new report-to directive.

URLhttps://self-repair.mozilla.org/en-US/repair
MethodGET
ParameterContent-Security-Policy
Evidenceobject-src 'none'; base-uri 'none'; block-all-mixed-content; worker-src 'none'; frame-src 'none'; form-action 'self'; default-src 'self' https://normandy-cloudfront.cdn.mozilla.net/; report-uri /__cspreport__
Instances1
Solution

Ensure that your web server, application server, load balancer, etc. is properly configured to set the Content-Security-Policy header.

Reference

http://www.w3.org/TR/CSP2/

http://www.w3.org/TR/CSP/

http://caniuse.com/#search=content+security+policy

http://content-security-policy.com/

https://github.com/shapesecurity/salvation

CWE Id16
WASC Id15
Source ID3
Low (Medium)Incomplete or No Cache-control and Pragma HTTP Header Set
Description

The cache-control and pragma HTTP header have not been set properly or are missing allowing the browser and proxies to cache content.

URLhttps://self-repair.mozilla.org/en-US/repair
MethodGET
ParameterCache-Control
Evidencepublic, max-age=30
Instances1
Solution

Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate; and that the pragma HTTP header is set with no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttps://assets-cdn.github.com/assets/site-5716602cf891.css
MethodGET
ParameterX-Content-Type-Options
URLhttps://assets-cdn.github.com/assets/github-8ae397f2e748.js
MethodGET
ParameterX-Content-Type-Options
URLhttps://assets-cdn.github.com/assets/frameworks-a4bf54bef6fb.css
MethodGET
ParameterX-Content-Type-Options
URLhttps://assets-cdn.github.com/assets/github-ac2ce2821692.css
MethodGET
ParameterX-Content-Type-Options
URLhttps://assets-cdn.github.com/assets/frameworks-3a88f2643d5e.js
MethodGET
ParameterX-Content-Type-Options
Instances5
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Incomplete or No Cache-control and Pragma HTTP Header Set
Description

The cache-control and pragma HTTP header have not been set properly or are missing allowing the browser and proxies to cache content.

URLhttps://assets-cdn.github.com/assets/frameworks-a4bf54bef6fb.css
MethodGET
ParameterCache-Control
Evidencemax-age=31536000, public
URLhttps://assets-cdn.github.com/assets/site-5716602cf891.css
MethodGET
ParameterCache-Control
Evidencemax-age=31536000, public
URLhttps://assets-cdn.github.com/assets/github-ac2ce2821692.css
MethodGET
ParameterCache-Control
Evidencemax-age=31536000, public
Instances3
Solution

Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate; and that the pragma HTTP header is set with no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)Incomplete or No Cache-control and Pragma HTTP Header Set
Description

The cache-control and pragma HTTP header have not been set properly or are missing allowing the browser and proxies to cache content.

URLhttps://github.com/zaproxy/zap-extensions
MethodGET
ParameterCache-Control
Evidenceno-cache
Instances1
Solution

Whenever possible ensure the cache-control HTTP header is set with no-cache, no-store, must-revalidate; and that the pragma HTTP header is set with no-cache.

Reference

https://www.owasp.org/index.php/Session_Management_Cheat_Sheet#Web_Content_Caching

CWE Id525
WASC Id13
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttps://shavar.services.mozilla.com/downloads?client=navclient-auto-ffox&appver=52.6&pver=2.2
MethodPOST
ParameterX-Content-Type-Options
Instances1
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Cookie No HttpOnly Flag
Description

A cookie has been set without the HttpOnly flag, which means that the cookie can be accessed by JavaScript. If a malicious script can be run on this page then the cookie will be accessible and can be transmitted to another site. If this is a session cookie then session hijacking may be possible.

URLhttp://attacker.com/DOAError/assets/css/core.css
MethodGET
Parameterdis-timestamp
EvidenceSet-Cookie: dis-timestamp
URLhttp://attacker.com/DOAError/assets/css/core.css
MethodGET
Parameterdis-request-id
EvidenceSet-Cookie: dis-request-id
URLhttp://attacker.com/DOAError/assets/css/core.css
MethodGET
Parameterdis-remote-addr
EvidenceSet-Cookie: dis-remote-addr
URLhttp://attacker.com/catch.php
MethodPOST
Parameterdis-remote-addr
EvidenceSet-Cookie: dis-remote-addr
URLhttp://attacker.com/catch.php
MethodPOST
Parameterdis-request-id
EvidenceSet-Cookie: dis-request-id
URLhttp://attacker.com/catch.php
MethodPOST
Parameterdis-timestamp
EvidenceSet-Cookie: dis-timestamp
Instances6
Solution

Ensure that the HttpOnly flag is set for all cookies.

Reference

http://www.owasp.org/index.php/HttpOnly

CWE Id16
WASC Id13
Source ID3
Low (Medium)Web Browser XSS Protection Not Enabled
Description

Web Browser XSS Protection is not enabled, or is disabled by the configuration of the 'X-XSS-Protection' HTTP response header on the web server

URLhttp://attacker.com/catch.php
MethodPOST
ParameterX-XSS-Protection
Instances1
Solution

Ensure that the web browser's XSS filter is enabled, by setting the X-XSS-Protection HTTP response header to '1'.

Other information

The X-XSS-Protection HTTP response header allows the web server to enable or disable the web browser's XSS protection mechanism. The following values would attempt to enable it:

X-XSS-Protection: 1; mode=block

X-XSS-Protection: 1; report=http://www.example.com/xss

The following values would disable it:

X-XSS-Protection: 0

The X-XSS-Protection HTTP response header is currently supported on Internet Explorer, Chrome and Safari (WebKit).

Note that this alert is only raised if the response body could potentially contain an XSS payload (with a text-based content type, with a non-zero length).

Reference

https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

https://blog.veracode.com/2014/03/guidelines-for-setting-security-headers/

CWE Id933
WASC Id14
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttp://attacker.com/DOAError/assets/css/core.css
MethodGET
ParameterX-Content-Type-Options
Instances1
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttp://detectportal.firefox.com/success.txt
MethodGET
ParameterX-Content-Type-Options
Instances1
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)X-Content-Type-Options Header Missing
Description

The Anti-MIME-Sniffing header X-Content-Type-Options was not set to 'nosniff'. This allows older versions of Internet Explorer and Chrome to perform MIME-sniffing on the response body, potentially causing the response body to be interpreted and displayed as a content type other than the declared content type. Current (early 2014) and legacy versions of Firefox will use the declared content type (if one is set), rather than performing MIME-sniffing.

URLhttp://192.168.52.147/bWAPP/sm_dos_2.php
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/secret_html.php
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/htmli_current_url.php?ere=%3Cscript%3Ealert(1);%3C/alert%3E
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/js/?C=D;O=A
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/images/linkedin.png
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/images/?C=D;O=A
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=D;O=A
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/images/?C=S;O=D
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/images/cc.png
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/stylesheets/
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/js/?C=S;O=D
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/images/favicon.ico
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/unrestricted_file_upload.php
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/phpi.php
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/images/?C=M;O=A
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/sqli_16.php
MethodPOST
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/unrestricted_file_upload.php
MethodPOST
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/images/mme.png
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/icons/unknown.gif
MethodGET
ParameterX-Content-Type-Options
URLhttp://192.168.52.147/bWAPP/stylesheets/stylesheet_low_resolution.css
MethodGET
ParameterX-Content-Type-Options
Instances98
Solution

Ensure that the application/web server sets the Content-Type header appropriately, and that it sets the X-Content-Type-Options header to 'nosniff' for all web pages.

If possible, ensure that the end user uses a standards-compliant and modern web browser that does not perform MIME-sniffing at all, or that can be directed by the web application/web server to not perform MIME-sniffing.

Other information

This issue still applies to error type pages (401, 403, 500, etc) as those pages are often still affected by injection issues, in which case there is still concern for browsers sniffing pages away from their actual content type.

At "High" threshold this scanner will not alert on client or server error responses.

Reference

http://msdn.microsoft.com/en-us/library/ie/gg622941%28v=vs.85%29.aspx

https://www.owasp.org/index.php/List_of_useful_HTTP_headers

CWE Id16
WASC Id15
Source ID3
Low (Medium)Web Browser XSS Protection Not Enabled
Description

Web Browser XSS Protection is not enabled, or is disabled by the configuration of the 'X-XSS-Protection' HTTP response header on the web server

URLhttp://192.168.52.147/bWAPP/stylesheets/.svn/entries
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/stylesheets/?C=M;O=D
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/ba_weak_pwd.php
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/images/.svn/entries
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/images/?C=M;O=D
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/stylesheets/.svn
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/evil/sandbox.htm
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/htmli_get.php
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/sm_dos_3.php
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/ba_weak_pwd.php
MethodPOST
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/sqli_16.php
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/images/?C=D;O=D
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/sitemap.xml
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/js/?C=M;O=D
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/info.php
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/js/?C=D;O=D
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/phpi.php?message=teste
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/images/
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/.svn/entries
MethodGET
ParameterX-XSS-Protection
URLhttp://192.168.52.147/bWAPP/js/?C=M;O=A
MethodGET
ParameterX-XSS-Protection
Instances78
Solution

Ensure that the web browser's XSS filter is enabled, by setting the X-XSS-Protection HTTP response header to '1'.

Other information

The X-XSS-Protection HTTP response header allows the web server to enable or disable the web browser's XSS protection mechanism. The following values would attempt to enable it:

X-XSS-Protection: 1; mode=block

X-XSS-Protection: 1; report=http://www.example.com/xss

The following values would disable it:

X-XSS-Protection: 0

The X-XSS-Protection HTTP response header is currently supported on Internet Explorer, Chrome and Safari (WebKit).

Note that this alert is only raised if the response body could potentially contain an XSS payload (with a text-based content type, with a non-zero length).

Reference

https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

https://blog.veracode.com/2014/03/guidelines-for-setting-security-headers/

CWE Id933
WASC Id14
Source ID3
Low (Medium)Cookie No HttpOnly Flag
Description

A cookie has been set without the HttpOnly flag, which means that the cookie can be accessed by JavaScript. If a malicious script can be run on this page then the cookie will be accessible and can be transmitted to another site. If this is a session cookie then session hijacking may be possible.

URLhttp://192.168.52.147/bWAPP/logout.php
MethodGET
Parametertop_security
EvidenceSet-Cookie: top_security
URLhttp://192.168.52.147/bWAPP/logout.php
MethodGET
Parameteradmin
EvidenceSet-Cookie: admin
URLhttp://192.168.52.147/bWAPP/login.php
MethodPOST
ParameterPHPSESSID
EvidenceSet-Cookie: PHPSESSID
URLhttp://192.168.52.147/bWAPP/logout.php
MethodGET
Parametermovie_genre
EvidenceSet-Cookie: movie_genre
URLhttp://192.168.52.147/bWAPP/htmli_current_url.php
MethodGET
ParameterPHPSESSID
EvidenceSet-Cookie: PHPSESSID
URLhttp://192.168.52.147/bWAPP/logout.php
MethodGET
Parametersecret
EvidenceSet-Cookie: secret
URLhttp://192.168.52.147/bWAPP/logout.php
MethodGET
Parametertop_security_nossl
EvidenceSet-Cookie: top_security_nossl
URLhttp://192.168.52.147/bWAPP/login.php
MethodPOST
Parametersecurity_level
EvidenceSet-Cookie: security_level
URLhttp://192.168.52.147/bWAPP/logout.php
MethodGET
Parametertop_security_ssl
EvidenceSet-Cookie: top_security_ssl
URLhttp://192.168.52.147/bWAPP/ba_weak_pwd.php
MethodGET
ParameterPHPSESSID
EvidenceSet-Cookie: PHPSESSID
Instances10
Solution

Ensure that the HttpOnly flag is set for all cookies.

Reference

http://www.owasp.org/index.php/HttpOnly

CWE Id16
WASC Id13
Source ID3