Security Testing and Assessment of Vulnerability Scanners in Quest of Current Information Security Landscape
Security Testing and Assessment of Vulnerability Scanners in Quest of Current Information Security Landscape
net/publication/305361919
CITATIONS READS
17 2,801
2 authors:
Some of the authors of this publication are also working on these related projects:
Detection and Remediation of Network Security Vulnerabilities for Improved Information Security in Organizational Networks View project
All content following this page was uploaded by Chanchala Joshi on 19 July 2016.
1
International Journal of Computer Applications (0975 – 8887)
Volume 145 – No.2, July 2016
take advantage of improperly coded applications to insert ii. Second he/she selects the product and stores his
and execute attacker-specified commands, enabling access to selection in personal shopping cart.
critical data and resources. XSS vulnerabilities exist when an
application sends user-supplied data to a Web browser iii. Later when the user decides to make the purchase an
without first validating or encoding that content. invoice is placed in queue for further processing.
The web application described in this paper implements iv. In addition to that the user can add reviews to products
OWASP top vulnerabilities A1, A2, A3 and A5. and read other customer‟s opinions, newsletters and
subscribe to mailing list.
In this paper used two free web application vulnerability
scanners to identify security flaws in web application. The 3. METHODOLOGY
main objective is to study the effectiveness of the scanners The “shopatujjain” Web Application is PHP based
and to try to identify common types of vulnerabilities in web application, which is deployed on Apache Tomcat Server. It
application environments. In summary, practical experiment uses database on MySQL to store the data for the web site in
report focuses on the following three questions: its tables. The application uses PHP to present the user
interface. It also uses HTML, CSS, JavaScript, and AJAX
i. What is the coverage of the vulnerability scanners tested technologies. The presence of such technologies as AJAX
when used in a web services environment? and JavaScript in web application gives additional
ii. What is the false-positive rate of the web vulnerability opportunities. JavaScript is widely used in modern web
scanners tested when used in a web services applications and it is important to analyze the behavior of
environment? tools and their ability to parse JavaScript code.
iii. What are the most common types of vulnerabilities in The web application developed is based on OWASP Top Ten
web services environments? report of 2014. This section goes over the characteristics of
vulnerabilities presented in the Web Application.
2. EXPERIMENTAL DETAILS
In Broad, experimental study consisted of five steps: 3.1 SQL Injection Vulnerability
User has provided his/her credentials, username and
2.1.1 Web Application password via web application. Web application has stored
Design a web application that implements all the the user data to the SQL server. An attacker crafts HTTP
vulnerabilities from OWASP Top Ten report also select requests that are sent to the web server to inject commands to
publically available web application services. the SQL server in order to gain system level access [15]. The
vulnerable web application allows this malicious code to be
2.1.2 Vulnerability Scanner placed on an SQL server, thus making it possible for the
Select the free web application vulnerability scanners. attacker to use SQLI commands to get user account
credentials.
2.1.3 Execution
Use the vulnerability scanners to scan the services to identify
potential vulnerabilities.
2.1.4 Verification
Perform manual testing to confirm that the vulnerabilities
identified by the scanners do exist (i.e., are not false
positives).
2.1.5 Analysis
Analyze the results obtained and systematize the lessons
learned.
There are several existing web applications to demonstrate
common web application vulnerabilities such as “HacMe”
series [13] and “WebGoat” [14]. “WebGoat” is mainly used
in educational purposes. But the implementation of OWASP
Top Ten report,is not possible with these web applications.
Because of these drawbacks of available applications, there Figure Hacking Strategy of SQLI
is a need to have an independent Web Application, which
implements OWASP Top Ten vulnerabilities, to be used to
3.1.1 Exploiting SQLI vulnerability
During SQLI Attack, a malicious string is used as an input to
test these web scanners. This paper designs a web application
a function that calls an SQL query, which is executed
(“shopatujjain”) to simulate the steps a regular user goes
immediately. In this way, the injection result is reflected
through while using a dynamic web page and replicates the
right away, thus the vulnerability is called Reflected SQLI
behavior. The availability of source code and the control
vulnerability.
over server results provides better evaluation of web
application scanners. For example, recoverPassword function is intended to
recover the user‟s password based on his/her answer to a
Main functionalities of the application are:
security question.
i. First a user creates an account and provides his/her
String recoverPassword( String emailAddress, String
personal data including shipping address and credit card
answer){
details.
2
International Journal of Computer Applications (0975 – 8887)
Volume 145 – No.2, July 2016
String query = "SELECT Password FROM v_UserPass iii. The payloads are formed and configured to be used in
WHERE the task.
(v_UserPass.EmailAddress = '" + emailAddress + "' AND iv. The attack begins.
v_UserPass.Answer = '" +
3.3 Cross Site Scripting Vulnerability
answer + "') "; Cross Site Scripting (XSS) vulnerability occurs when there is
} a possibility of injection of malicious code in web
application. Thus, the XSS flaw is as a result of not validated
Payload: or sanitized input parameters. There are three types of XSS:
emailAddress=test%40test.com%27%29 -- Non-Persistent, called Reflected XSS; Persistent or Stored
&answer=anycolor XSS; and Document Object Model (DOM)-based [16].
3
International Journal of Computer Applications (0975 – 8887)
Volume 145 – No.2, July 2016
Referer: http:// vulnerableApp.com/displayAccountPassword With Top 10 Secure Coding Practices for each vulnerability
type, this paper provides the defense mechanism for top four
Cookie: vulnerabilities out of top ten OWASP vulnerabilities.
JSESSIONID=98224C7236B39895384AD3A760E405AB
4.1 SQLI Defense
While using the POST method, form data appears within the Server Side defense using Prepared Statement [18] is the
message body of the HTTP request, not the URL. Thus, most effective way to protect from SQL Injections, because
password information is not revealed. To avoid security it ensures that intent of query is not changed. For example,
misconfiguration vulnerability in the above example, the the insertPassword(User user) function adds a new record to
password should be transferred via POST method. UserPass table in “shopatujjain” application database, when
a new customer is registering his/her account.
4. DEFENSE MECHANISMS
AGAINST WEB VULNERABILITY public static int insertPassword(User user) {
AND SECURE CODING ConnectionPool pool =
TECHNIQUES ConnectionPool.getInstance();
Preventing vulnerabilities in web applications is extremely Connection connection = pool.getConnection();
important due to the high number of attacks. The best way to
prevent vulnerabilities in applications is to write secure code. PreparedStatement ps = null;
According to Computer Emergency Response Team, or ResultSet rs = null;
CERT, at the Software Engineering Institute at Carnegie-
Mellon University, the following Top 10 Secure Coding String query ="INSERT INTO UserPass (EmailAddress,
Practices [17] are vital to security. Password, Answer) VALUES (?, ?, ?)";
i. Proper implementation of Input Validation helps to try {
avoid most of the web application vulnerabilities. But,
ps = connection.prepareStatement(query);
on the other hand, handling each input in isolation to
avoid unexpected command line arguments, user ps.setString(1, user.getEmailAddress());
controlled files, and other suspicious input is a complex
task, and as a result, the validation may be omitted. ps.setString(2, user.getPassword());
ii. Warnings and Error messages can suggest the places of ps.setString(3, user.getAnswer());
possible security flaws for both developers and an return ps.executeUpdate();
attacker. Static and dynamic analysis tools can detect
and eliminate the vulnerabilities. } catch (SQLException e) {
4
International Journal of Computer Applications (0975 – 8887)
Volume 145 – No.2, July 2016
5
International Journal of Computer Applications (0975 – 8887)
Volume 145 – No.2, July 2016
i. The first column represents the serial number. 6.1.1 SQL Injection:
ii. The second column represents the vulnerability number Acunetix Scanner is able to discover all SQL Injection
taken from Top Ten OWASP Vulnerabilities. vulnerabilities. But Netsparker and Burp Suite scanners are
failed to find some SQL Injection vulnerabilities, which are
iii. The third column represents the vulnerabilities not executed immediately.
presented in the test suite.
6.1.2 Broken Authentication and Session
iv. The fourth column shows the different types of a
Management
vulnerability presented in the third column.
Both Netsparker and Burp Suite scanners were not able to
v. The fifth column contains the number of vulnerabilities find the vulnerability.
detected by Acunetix WAVS.
6.1.3 Cross-Site Scripting:
vi. The sixth column contains the number of vulnerabilities Acunetix and Netsparker Scanners discovered all
detected by Netsparker WAVS. NonPersistent XSS vulnerabilities. Burp Suite scanner result
is very poor. Most of the Persistent XSS and DOM XSS
vii. The last column represents the number of vulnerabilities vulnerabilities were missed by all scanners.
detected by Burp Suite WAVS.
6.1.4 Security Misconfiguration:
Table: Results of WAVS assessment All the scanners are able to find the vulnerability Password
get via GET Method. Acunetix Scanner missed Sensitive
OWASP
SN report OWASP Vulnera Data Display vulnerability.
Acuneti Netspar Burp
o 2015 Vulnera bility
x ker Suite
bilities Type 7. CONCLUSIONS
Number
This paper described OWASP Top 10 Security Risks
implemented in the web application, which was used as a
1 A1
SQL
15 4 7 testset for evaluation of effectiveness of Acunetix web
Injection application vulnerability scanners, Netsparker web
application vulnerability scanners and Burp Suite web
application vulnerability scanners. The paper choses four
Broken Password
Guessing
5 0 2 vulnerabilities from Top 10 OWASP Security Risks for
Authentic
ation and
evaluation of three prominent Web Application Vulnerability
2 A2 Scanners. The evaluation of three prominent Web
Session
Managem
Brute Application Vulnerability Scanners is done by analyzing the
ent 1 1 0
Force results that is obtained from the execution of web scanners
against the vulnerable web application, then comparing the
number of detected vulnerabilities.
Non-
Persistent 9 9 2
XSS
The comparison of the three chosen scanners shown by the
following graph:
Cross
3 A3 Site Persistent
1 3 1
Scripting XSS
16
14
12
DOM
3 1 0 10
XSS 8
6
4 Acunetix
Password 2
sent via 0
5 5 5 Netsparker
GET
Authentication
SQL Injection
Misconfiguration
XSS
Security
4 A5 Misconfi Web
guration Server 2 0 2
DDoS
Sensitive
Data 0 4 2
display The result show that both Acunetix and Netsparker scanners
able to discover cross site scripting XSS but Burp Suit results
Tot was very poor. For SQL Injection Acunetix detect all the
40 27 18 vulnerabilities. Scan results of Acunetix WAVS for Broken
al
Authentication and Session Management vulnerabilities are
The Table 1 reports the vulnerabilities that were detected by better than other two scanners. But Security
web application scanners. As seen from the Table 1 all the Misconfiguration vulnerabilities are not properly discovered
tool tools missed some weaknesses. The analysis of why the by Acunetix, in this case the result of Netsparker and Burp
scanners missed certain vulnerabilities is as follows Suit Scanners are better.
The results show that the crawling has been significantly
improved, although there are still limitations that affect the
detection rate of such vulnerabilities as SQLI and XSS.
6
International Journal of Computer Applications (0975 – 8887)
Volume 145 – No.2, July 2016
For several vulnerabilities presented in this application, this [13] Foundstone Hacme Series. McAfee Corp
paper also explains defense measures, which secure the
application significantly. The results of web application [14] WebGoat Project. OWASP.
evaluation identify the most challenging vulnerabilities for http://www.owasp.org/index.php/Category:OWASP
scanner to detect, and compare the effectiveness of scanners. WebGoat Project
The assessment results can suggest areas that require further [15] K. K. Mookhey, Nilesh Burghate, Detection of SQL
research to improve scanner‟s detection rate. Injection and Cross-site Scripting Attacks, Symantec
Connect Community, 02 November 2010
8. REFERENCES
[1] Sarasan S. “Detection and Prevention of Web [16] J. Weinberger, P. Saxena, D. Akhawe, M. Finifter, R.
Application Security Attacks”, International Journal of Shin, and D. Song, “A Systematic Analysis of XSS
Advanced Electrical and Electronics Engineering, Sanitization in Web Application Frameworks”,
(IJAEEE), ISSN (Print) : 2278-8948, Volume-2, Issue- University of California, Berkeley, 2011
3, 2013, pp. 29- 34. [17] The OWASP Foundation, “OWASP Top Ten Web
[2] International Organization for Standardization and Application Security Risks”,
International Electrotechnical Commission. ISO/IEC http://www.owasp.org/index.php/Category:OWASP_To
27001:2005, Information technology – security p_Ten_Project, 2015
techniques – information security management systems [18] Oracle Documentation. “Using Prepared Statements”,
– requirements, 2005. 2011. Retrieved 2012 from:
[3] National Vulnerability Database, http://nvd.nist.gov http://docs.oracle.com/javase/tutorial/jdbc/basics/prepar
ed.html
[4] N. Antunes and M. Vieira, "Enhancing Penetration
Testing with Attack Signatures and Interface [19] Yang Guang, J. J., & Jipeng, H. “System modules
Monitoring for the Detection of Injection interaction based stress testing model”, 2014. The
Vulnerabilities in Web Services," Proc. IEEE Int'l Conf. Second International Conference on Computer
Services Computing (SCC 11), IEEE CS, 2011, pp. 104- Engineering and Applications, (pp. 138-141) Bali Island
111. [20] Neto, A. A., Duraes, J., Vieira, M., & Madeira, H.
[5] IBM Rational AppScan, 2008, http://www- “Assessing and Comparing Security of Web Servers”,
01.ibm.com/software/awdtools/appscan/ 2008. 14th IEEE Pacific International Symposium on
Dependable Computing. IEEE Computer Society
[6] HP WebInspect, 2008, http://www.hp.com
[21] Shekyan, S. Qualys Community. “Identifying Slow
[7] Acunetix Web Vulnerability Scanner, HTTP Attack Vulnerabilities on Web Applications”,
2008,http://www.acunetix.com/vulnerability-scanner/ 2013
[8] Netsparker Web Vulnerability Scanner, 2012, [22] Shekyan, S. Qualys Community. “How to Protect
https://www.netsparker.com/web-vulnerability-scanner/ Against Slow HTTP Attacks”, 2014
[9] Burp Suit Web Vulnerability Scanner, [23] Apache Software Foundation. “Security Tips, V 2.5”,
https://portswigger.net/burp/ 2011. Retrieved 2014, from:
[10] Foundstone WSDigger, 2008, http://httpd.apache.org/docs/2.0/misc/security_tips.html
http://www.foundstone.com/us/resources/proddesc/wsdi [24] Black, P. E., Fong, E., Okun, V., & Gaucher, R.
gger.htm National Institute of Standards and Technology (NIST).
[11] wsfuzzer, 2008, “Software Assurance Tools: Web Application Security
http://www.neurofuzz.com/modules/software/wsfuzzer. Scanner Functional Specification”
php [25] Vieira M, Antunes N, Madeira H. “Using Web Security
[12] https://www.owasp.org/images/0/0f/OWASP_T10_- Scanners to Detect Vulnerabilities in Web Services”,
_2015_rc1.pdf Coimbra - 2015
IJCATM : www.ijcaonline.org
7