VAPT LAB MANUAL
VAPT LAB MANUAL
Lab Objectives
The objective of this lab is to demonstrate how to identify vulnerabilities and information disclosures in search
engines using The Harvester.
Lab Requirements
Kali Linux running as a virtual machine
Procedure
Step 1: Log into Kali Linux machine and open a Terminal Window
Step 2: Type theharvester -d certifiedhacker.com -l 300 -b all and hit Enter to launch the Harvester
Step 3: TheHarvester starts extracting the details and displays them on the screen. Since there is so much
information to go through, we will write the output to an HTML file for better readability.
Step 4: Press Ctrl+C to terminate the current session
Step 5: Type theharvester -d certifiedhacker.com -l 300 -b all -f test and hit Enter to export the results as a
file named test
Step 6: Navigate to the home folder in Kali machine and you will find two files named as test, one in HTML
format and one in XML format. Open the HTML format files to view the results.
Step 7: Here you can also see a graph of all the different information extracted by the Harvester displayed for better
analysis. Collect and note the information disclosed about the target.
2. Open Source Intelligence Gathering Using OSRFramework
OSRFramework is a set of libraries to perform Open Source Intelligence tasks. They include references to a
bunch of different applications related to username checking, DNS lookups, information leaks research, deep web
search, regular expressions extraction and many others.
Lab Objectives
The objective of this lab is to demonstrate how to identify usernames of the target on different social media
platforms.
Lab Requirements
To carry out the lab you need:
Procedure
Step 1: Log into Kali Linux machine
Step 2: Launch a command line terminal by clicking on the Terminal icon from the Taskbar
Step 3: usufy.py checks for the existence of a profile for given user details in the different platforms. Type
usufy.py -n
<Target username or profile name> -p twitter facebook youtube and press Enter
Step 4: Ge usufy.py will search the user details in the mentioned platform and will provide you with the
existence of the user.
Step 5: Searchfy.py checks with the existing users of a page/handlers for given details in the all social networking
platforms. Type searchfy.py -q <Page Name or Handler Name> and press Enter.
Step 6: It will put out all the details who are subscribed to target social networking pages that are provided.
Lab Requirements
To carry out the lab you need:
A valid email account (Hotmail, Gmail, Yahoo, etc.).We suggest you sign up with any of the services to obtain a
new email account for this lab. Do not use your real email accounts and passwords in these exercises.
Procedure
Step 1: Launch Maltego from the taskbar from the left-hand side.
Step 2: A product selection wiZard appears on the Maltego GUI.Click Run from Maltego CE (Free) option
Step 3: You will be redirected to the Login section. Click register here.
Step 4: Register your account and activate it. By filling up the required details
Step 6: The Install Transforms section appears. Leave the settings to default and click Next
Step 7: The Help Improve Maltego section appears, Leave the options set to default and click Next
Step 8: The Ready section appears. Select the radio button of Open a blank graph and let me play around and click
Finish in order to perform footprinting printing manually.
Step 9: Click the + icon located at the top-left corner of the GUI (in the toolbar) to start a new graph
Step 10: Ge New Graph (1) window appears along with a palette in the left pane. It contains a list of default
built-in transforms.
Step 12: Drag the website entity into the New Graph (1) section
Step 13: The entity appears on the new graph, with the www.paterva.com URL selected by default
Step 14: Double-click paterva.com and rename the domain name to the www.certifiedhacker.com.Press Enter
Step 16: Ge Run Transform(s) list appears. Click To server Technologies [using Builtwith]
Step 17: Maltego starts running the transform to server Technologies [using Built with] entity.
Step 18: Observe the status in the progress bar
Step 19: Once Maltego completes the Transforming Server Side Technologies, it displays the technology
implemented on the server that hosts the website.
Step 20: After obtaining the built-in technologies of the server, attackers might search for vulnerabilities related
to any of them and simulate exploitation techniques to hack them
Step 21: To start a new transform, select all entities by pressing Ctrl+A on the keyboard and press Delete.
Step 23: Right-click the entity and select All Transforms -> To Domains [DNS]
Step 25: Right-click the entity and select All Transforms -> To DNS Name [using Name Schema diction...]
Step 27: This transform will attempt to test various name schema against a domain and try to identify a specific name
schema for the domain
Step 28: Right-click the entity and select All transforms ->To DNS Name -SOA (Start of Authority).
Step 29: This returns the primary name server and the email of the domain administrator
Step 30: By extracting the SOA related information, attackers attempt to find vulnerabilities in their services
and architectures, and exploit them
Step 31: Select both the name server and the email by dragging and deleting them
Step 32: Right-click the entity and select ALL Transforms -> To DNS Name -MX (mail server)
Step 33: This transform returns the mail server associated with the certifiedhacker.com domain
Step 34: By identifying the mail exchanger server, attackers attempt to exploit the vulnerabilities in the server and
thereby use it to perform malicious activities such s sending spam e-mails
Step 35: Select only the mail server by dragging and deleting it.
Step 36: Right-click the entity and select All Transforms -> To DNS Name-Ns (name server)
Step 37: This returns the name servers associated with the domain.
Step 38: By identifying the primary name server, an attacker can implement various techniques to exploit the
server and thereby perform malicious activities su ch as DNS Hijacking and URL redirection.
Step 39: Right-click the entity and select All Transforms -> To IP Address [DNS]
Step 41: By obtaining the IP address of the website, an attacker can simulate various scanning techniques to find
open ports and vulnerabilities and thereby attempt to intrude in the network and exploit them.
Step 42: Right-click the entity and select All transforms -> To location [city, country], this transforms
identifies the geographical location where the IP address is located
Step 43: By obtaining the information related to geographical location, attackers can perform social engineering
attacks by making voice calls (vishing) to an individual in an attempt to leverage sensitive information.
Step 44: Right-click the domain entity (certifiedhacker.com) and select Run Transform -> To Entities from
whois
Step 45: This transform returns the entities pertaining to the owner of the domain.
Step 46: By obtaining this information, an attacker can exploit the servers displayed in the result or simulate a brute
force attack or any other technique to hack into the admin mail account and
Step 48: Perform footprinting on a target person to obtain the email address and phone number
Step 49: Click the + icon located at the top-left corner of the GUI to start a new graph
Step 50: A new graph (New Graph (2)) appears in Maltego. Expand the Personal tab in the left pane and
drag the person entity to the New Graph (2) section.
Step 51: The name of the entity is set as John Doe by default
Step 52: To assign a target person name, double-click John Doe and type the name of the person (here, Rini
Mathews)
Step 53: Right-click the entity and select All Transforms -> To Email Address [verify common]
Step 54: Maltego displays all the valid email addresses corresponding to the given name.
By extracting all informational attacker can simulate actions such as enumeration, web application Hacking,
social engineering etc. which may allow access to a system or network, gain credentials etc.
4. Daisy Chaining using Proxy Workbench
Proxy Workbench is a unique proxy server ideal for developers, security experts, and trainers-that displays data in real
time
Lab Objectives
This lab will show you how to create daisy proxy chaining using the proxy workbench tool.
Lab Requirements
Procedure
Step 1: After the installation is complete, switch back to the attacker machine and launch the Firefox web
browser
Step 2: Click the open menu button at the top-right corner of the browser window and click options
Step 3: The options window opens. Scroll down and click settings...Under the Network Proxy heading
Step 4: Select the Manual Proxy Configuration radio button in the Connection Settings WiZard
Step 5: Type 127.0.0.1 as the HTTP Proxy, enter the port values 8080 and check to Use this proxy server for
all the protocols. Then click ok.
Step 6: If you encounter a port error during configuration, simply ignore it
Step 8: The configure Proxy Workbench window opens. Select HTTP Proxy-web in the left pane and check
the HTTP protocol in the right pane.
Step 11: Enter the IP address of the Windows 7 virtual machine in the Proxy server field, and port number
8080 in the port field.
Note: In this lab, the IP address may vary in your lab environment.
Step 14: Switch Back to the Host machine (attacker machine), launch the Firefox web browser, and browse
websites such as http://www.cnet.com
Step 15: Open the Proxy workbench GUI for more detailed information. Observe that the request is coming
from 127.0.0.1(localhost) and going to another machine IP. In other words, you are browsing with IP address of the
windows machine, proxies of windows 7 already running in the background, thereby providing you with the
greatest anonymity.
Document all the IP addresses, open ports and running applications, and protocols you discovered during this lab.
Lab Objectives
Sniff/capture the response generated from the target machine using packet-sniffing tools such as Wireshark and
observer the TTL and TCP window siZe fields.
Lab Requirements
Procedure
Step 1: Launch Wireshark in windows 7 virtual machine. Wireshark main window appears and selects the
available Ethernet or interface start the packet capture.
Step 2: Launch windows 8 virtual machine and from the command prompt ping the windows 7 machine.
Step 3: Switch to the windows 7 machine and observe the packets captured by Wireshark
Step 4: Choose any packet of ICMP request from windows 8 to windows 7 machine, and expand Internet
Protocol version noted in the Packet Details Pane
Step 5: TTL value recorded as 128, which means the ICMP request came from the Windows-based machine.
Step 6: Now start the new packet capturing and switch to Kali Linux machine
Step 7: In a terminal window of Kali Linux, type ping <windows 7 machine IP> and press Enter. After few
packets sent form Kali Linux, press Ctrl+C to terminate the ping request.
Step 8: Switch to windows 7 machine and choose any type of ICMP request from Kali Linux to windows 7
machine and expand Internet Protocol Version node in the Packet details pane.
Step 9: TTL value recorded as 64 means that the ICMP request came from a Linux-based machine.
Stop the running capture in the Wireshark window, and close all the windows that were opened in the three
virtual machines.
6. HTTrack
HTTrack is a free (GPL, libre/free software) and easy-to-use offline browser utility. It allows
you to download a World Wide Web site from the Internet to a local directory, building
recursively all directories, getting HTML, images, and other files from the server to your
computer.
https://www.httrack.com/
Step 1: To connect and fetch the data just write this command in terminal of kali.
Step 5: Here it is showing the result of the command i.e. curl –v –X HEAD
modernindianbabynames.com
Step 6: To check the redirection we use the command i.e. curl google.com
Step 7: Here the result of the command 301 and 301 Moved means it is redirected.
Step 8: To get the details of redirected website we use the command i.e. curl –L google.com
Step 9: Here it is showing the result of the command
Step 10: We use this command to save the websites HTML Content.
Step 11: Result of the command showing total 29859 files saved.
Step 12: To view the details of downloaded files use the command vim curl.txt