Information Security Lab Manual
Information Security Lab Manual
Prepared by:
Eng. Hanadi A. Ahmed (Research Assistant)
2024
University Vision
To locally lead, regionally compete in education and scientific research, and effectively
University Mission
Al Janad University for Science and Technology strives for excellence in teaching, learning,
scientific research and community service through a motivating educational environment that
keeps up with quality standards; it effectively utilizes technology and human resources, embodies
a local and regional partnership, fosters the national allegiance, and contributes to sustainable
development.
College Vision
College Mission
The college of Engineering and Information Technology at Al-Jand University for Science and
Technology strives to prepare qualified engineers capable of working efficiently and responsibly
Program Mission
Providing excellent education to prepare qualified graduates in the field of networks and
NO Type Details
Windows 10
Ubuntu 2022
4 Virtual Machines
Kali Linux 2023
Metasploitable2 VM
Windows Ubuntu
Implementation
Task1:
1. Download and install VMware Workstation Pro as shown here
2. Download and install Ubuntu OS in VMware as shown here
3. Download and install Windows 11 OS in VMware as shown here
4. Download and install Kali Linux OS in VMware as shown here
5. Metasploitable
Task2:
Step1: Start VMware and add an adapter as following:
Step 2: Config two adapters for (Windows, Ubuntu, Kali and Metasploitable2) as following:
Step 3: Set a static ip for (Windows, Ubuntu, Kali and Metasploitable2) as following:
Step 4: Test connectivity as following:
LAB 2 – Password and Security
Pre-requests
▪ Ubuntu virtual OS with John the ripper tool
▪ A web Browser and internet connection
Tasks List
Task1: Cracking a linux user account using John the ripper
Task2: Finding out if your email or password has been pwned
Task3: taking the survey
Implementation
TASK1:
Step1: install John the ripper in Ubuntu using terminal
sudo apt update
sudo apt install john
Step2: Create an account in Linux
sudo useradd -m janad2
Note that the -m attribute will ensure that a home directory will also be created for the user.
sudo passwd janad2
You’ll enter the password twice 12345.
Step3: View the user accounts and their hashed passwords
1. It is important to know that in Linux, there is a file /etc/passwd that stores all the basic information
about each user. This is normal for many operating systems, and you can view it with the cat command:
sudo cat /etc/passwd
2. It is also important to know that in Linux there is a file /etc/shadow that stores the hashed versions of
user passwords. You can view it by using cat to output the data:
sudo cat /etc/shadow
Naturally, you won’t be able to decipher much more than the usernames in this file.
3. Lastly, it is imperative to know that John the Ripper comes with unshadow. All unshadow does is
stitch together the passwd file and shadow file so John the Ripper can use it.
We’ll run unshadow and store the results in a file that we’ll create on the fly called tempUserPW:
sudo unshadow /etc/passwd /etc/shadow > tempUserPW
Let’s take a look and see if everything seems to be working so far:
cat tempUserPW
Step4: Crack the password
When we run John the Ripper, we’ll have to give it both the wordlist we want to use and the file we
made with unshadow. Again, we’ll be using the standard dictionary that comes with John the Ripper, not
rockyou.txt. If you wanted to use rockyou.txt, you’d have to point to it in the wordlist parameter.
sudo john -wordlist=/usr/share/john/password.lst --format=crypt tempUserPW
Yeah! We just cracked the passwords (at least, the ones that were easy to crack with the default
dictionary). The output looks daunting, but it’s not too bad to decipher.
The output shouldn’t be too cumbersome because there are only a few accounts. But if there were a lot
of accounts, we could clean up the output with the show parameter in John the Ripper:
sudo john -show tempUserPW
TASK2:
PART I: Find out if your email address has been pwned.
1. Go to https://haveibeenpwned.com/ and enter your email
2. If you have been pwned, scroll down through the list and note the sites where your email address has
been discovered.
Strong Password
TASK3:
There are a number of easy ways to increase your security and privacy. This survey is meant to make
you think about what you can do to be more secure.
Conclusion
We just cracked a Linux user account with John the Ripper. There were a few things that made this
possible, but the biggest enabler is when we created a relatively weak password. This is meant to show
just how weak some passwords are. Be careful when you make passwords for various accounts.There
are simple things you can do that take little to no effort but provide substantially more security and
privacy.
LAB 3 – Malware and Threats
Pre-requests
▪ Windows VM (2 copies host and target)
▪ JPS Virus Maker tool
▪ ProRAT tool
Tasks List
Task1: Understanding types of Malware
Task2: Generate a virus using JPS Virus Maker and examine its effection on the target system
Task3: Generate a remote access torjan using ProRAT tool and examine its effection on the target
system
Scenario
In this lab, we will be discussing and testing the impact of malicious software, also known as malware,
on a victim's system. Let's begin by setting up two virtual machines running the Windows operating
system, where one will host the malware and the other will be the target.
On the host machine, start by installing the JPS Virus Maker tool. This tool will allow us to create a
convincing malware file, which we will inject into a legitimate document such as a PDF or another
document type. Place this infected file in a shared folder between the two virtual machines. When the
victim machine opens this file, the malicious code will execute, causing damage to their system.
Next, let's use the host machine again to install the Prorat tool. This tool will enable us to inject a
Remote Access Trojan (RAT) into one of the applications. Your task will be to convince the victim to
install this application, giving you control over their system.
Finally, the instructor will recommend a similar tool for testing the impact of malware on Android
systems.
Implementation
TASK1:
Malware, or malicious software, is any program or file that is intentionally harmful to a computer,
network or server.
Types of malware include computer viruses, worms, Trojan horses, ransomware and spyware. These
malicious programs steal, encrypt and delete sensitive data; alter or hijack core computing functions and
monitor end users' computer activity. Read this article to distinguish types of malware.
TASK2:
The JPS Virus Maker tool is used to create its own customized virus. This tool has many options for
building that can be used to create a virus. Some of the tool’s features are auto-start, shutdown, disable
security center, lock mouse and keyboard, destroy protected storage, and terminate windows. An ethical
hacker and pen-tester can use the JPS Virus Maker Tool as a proof of concept to audit perimeter security
controls in an organization. After performing this task, we will end and re-launch the lab
as target machine will be infected by the virus.
In the host machine, navigate to JPS Virus Maker and double-click jps.exe. If an Open File —
Security Warning pop-up appears, click Run. The JPS (Virus Maker 4.0) window appears; tick
the Auto Startup checkbox.
The window displays various features and options that can be chosen while creating a virus file.
From the Virus Options, check the options that you want to embed in a new virus file.In this lab, the
options embedded in the virus file are Disable TaskManager, Disable Windows Update, Disable
Control Panel, Disable Drives, Hide Windows Clock, Hide Desktop Icons, Enable Remote
Desktop, Remove Bluetooth, Turn Off Windows Firewall, Turn Off Windows Defender, and Auto
Startup. Ensure that the None radio button is selected to specify the trigger event when the virus should
start attacking the system after its creation. Now, before clicking on Create Virus!, click the right arrow
icon from the right-hand pane of the window to configure the virus options.
A Virus Options window appears, as shown in the screenshot. Check the Change Windows
Password option, and enter a password (here, janad) in the text field. Check the Change Computer
Name option, and type janad in the text field. You can even configure the virus to convert to a worm. To
do this, check the Enable Convert to Worm checkbox, and provide a Worm Name (here, janad). For
the worm to self-replicate after a particular time, specify the time in seconds (here, 1 second) in the Copy
After field. Ensure that the JPG Icon radio button is selected under the Change Icon section. Ensure that
the None radio button is selected in the lower part of the window. After completing your selection of
options, click the drop-down icon next to the Create Virus! button and select x86(32Bit); click Create
Virus!
A Virus Created Successful! pop-up appears; click OK.
The newly created virus (server) is placed automatically in the folder where jps.exe is located, but with
the name Server.exe. Now, pack this virus with a binder or virus packager and send it to the victim
machine through email, chat, a mapped network drive, or other method. In this task, we are using a
mapped network drive to share the virus file to the victim machine. Assume that you are a victim and that
you have received this file. Click switch to the target machine. logging into the machine …..
Open the folder and double-click Server.exe file to execute the virus.
Once you have executed the virus, the Desktop screen goes blank, indicating that the virus has infected
the system. Surprised by the system behavior, the victim (you) attempts to fix the machine by restarting
it. Once the machine has rebooted, try to log in to the machine with the
provided Username and Password. You should receive the error message “the password is incorrect. Try
again.”. Now, login with the password that you provided at the time of virus creation (i.e., janad). You
Attackers use malware to steal personal information, financial data, and business information from target
systems. ProRat is a “remote administration tool” created by the PRO Group. ProRat was written in the C
programming language and is capable of working with all Windows OSes. ProRat was designed to allow
users to control their own computers remotely from other computers. However, attackers have co-opted it
for their own nefarious purposes. Some hackers take control of remote computer systems to conduct a
Denial-of-Service (DoS) attack, which renders the target system unavailable for normal personal or
business use. These targeted systems include high-profile web servers such as banks and credit card
gateways.
As with other Trojan horses, ProRat uses a client and server. It opens a port on the computer that allows
the client to perform numerous operations on the server (the victim machine).
An ethical hacker or pen tester can use ProRat to audit their own network against remote access Trojans.
Step 3: Enter a username of janad with a password of janad and click Login.
Step 4: In the Wireshark application, filter for http and click Enter.
Step 5: Browse through the different HTTP messages and select the POST message.
In the lower window, the message is displayed. Expand the HTML Form URL Encoded:
application/x-ww-form-urlencoded section.
Step 3: Click Log in. Enter in your NetAcad username and password. Click Log In.
Step 4: In the Wireshark application, expand the capture window vertically and then filter by HTTPS
traffic via port 443.
Browse through the different HTTPS messages and select an Application Data message
Completely expand the Secure Sockets Layer section.
Finally: Apply this tutorial with using malicious files that you have generated in the prefious lab.
LAB 5 – Port Scanning (NMAP)
Pre-requests
▪ Kali VM
▪ Metasploitable2 VM
▪ internet connection
Topology
windows-zenmap ubuntu-nmap
10.10.10.2 10.10.10.3
10.10.10.5
Scenario
Port scanning is usually part of a reconnaissance attack. There are a variety of port scanning methods
that can be used. We will explore how to use the Nmap utility. Nmap is a powerful network utility that is
used for network discovery and security auditing. For this lab, we are going to be scanning the
Metasploitable2 VM using Nmap. Launch both Kali Linux and the Metasploitable2 VM and ensure that
they are on the same isolated network using VMWare Adapter settings.
Tasks List
Task1:Download and setup Nmap
Task2: Checking for open Ports with Nmap
Task3: Impelement an OS Detection
Task4: Impelement a Complete Scanning
Implementation
Using nmap to scan our network Remember: Do not scan systems or addresses that you do not have
explicit, documented permission to scan. You may scan the addresses in the diagram provided, and
using nmap and only from the class Linux server. In this lab you will generate a series of nmap
commands for troubleshooting and/or assessing the security of a network of Metasploitable2.
Task1:
To install NMAP on Ubuntu, run the command:
Nmap will churn for a while while it tries to detect the actual services running on these ports. In a few
minutes you will see a screen that looks like this:
Task 3:
nmap -O 10.10.10.5
LAB 6 – Host-Based Scans (Nessus)
Pre-requests
▪ Kali VM
▪ Metasploitable2 VM
▪ internet connection
10.10.10.4
10.10.10.5
Kali
Tasks List
Task1: Perform vulnerability research in Common Weakness Enumeration (CWE)
Task2: Perform vulnerability research in Common Vulnerabilities and Exposures (CVE)
Task3: Perform vulnerability research in National Vulnerability Database (NVD)
Implementation
Nessus is an open-source network vulnerability scanner that uses Common Vulnerabilities and
Exposures (CVE) architecture. It is widely used for vulnerability assessment and penetration testing.
Nessus server can be installed on Unix, Linux and FreeBSD whereas Nessus client is available for Unix
and Windows based operating systems. For this lab, we will be installing Nessus on Kali Linux. Nessus
can be downloaded from here. It can also be downloaded using curl as shown below (version may
change).
Once the latest version of Nessus is downloaded, it can be installed as shown below.
Click on “Continue”. Select the type of Nessus install you want. Since we are using a Free version of
Nessus for this tutorial we select “Register for Nessus Essentials”. Click on “continue”.
To run Nessus Essentials, you need an activation code. Get the activation code by entering the following
details.
You need a user account to login into Nessus. Create an account and most importantly remember the
user account information.
Then, Nessus will download all the required plugins. This may take some time (a bit long time
sometimes).
Once all the plugins are finished downloading, you should see this.
The installation is finished. Now, it’s time to start scanning with Nessus. Click on “New scan”. A new
popup opens. Assign a target.
10.10.10.5
The scan will start and take some time to finish. For this tutorial, we are using “Metasploitable 2” as
target.
The vulnerabilities are classified into five categories by Nessus. They are Critical, High, Medium, Low
and Information. You can view detailed information about the detected vulnerabilities by clicking on
them.
All the scans you perform are located in “My scans” section.
Nessus allows different types of scans. All the scans that can be performed using Nessus can be viewed
from “All scans” section.
LAB 7 – Internal Scans (OpenVAS)
Pre-requests
▪ Kali VM
▪ Metasploitable2 VM
▪ internet connection
Scenario
In this lab, you will use OpenVAS to perform a vulnerability scan on the Metasploitable VM and review
the vulnerability assessment report from the scan.
10.10.10.4
10.10.10.5
Kali
Tasks List
Task1: Setup and Exploring OpenVAS
Task2: Configuring a Vulnerability Scan and report the result
Implementation
OpenVAS/GVM is a fully-featured vulnerability scanner, but it's also one component of the larger
"Greenbone Security Manager" (GSM).
admin
admin
Our first test will be to configure a simple scan using OpenVAS/GVM on a single IP address.
Metasplotable ip as a test: 10.10.10.5
To conduct a new scan, we follow the path of: Scans > Tasks
Once the page loads, there is an option to create a new task on the top left of the screen:
Create a new task
The "Scan Targets" option is where the IP is added. It is currently greyed out because only existing
scans can be selected in the drop-down, but next to it we can create a new target.
10.10.10.5/24
Now we can click on Save, which will display "Malvert1" under the "Scan Targets" option. We can
click on Save to save the task. "Once" has been chosen as the schedule option to run the scan only once.
The Schedule option is useful when your scans are targeting your own infrastructure and you want it
continuously monitored. The other options on the task have been left as default, as an exercise to see the
outcome of the scan.
Start scan
The bottom of the Task screen should look like the above. Now we click on the "Start" option to run the
scan. The scan should take some time to run, as it looks through multiple threats and scans multiple
ports. Once the scan is complete, we can look at the results under: Scans > Reports.
We can now create a more advanced scan by using the different configuration options to add custom
details. In this case we'll add custom ports and a larger IP subnet to scan.
First, we will add a custom port list. Our targets will simply be the different SQL databases. Here is the
full list:
We expect to see quite different results from the default scan above, by narrowing down our focus to the
SQL ports only.
Now we can move to creating a new target, which will be the larger subnet of the IP mentioned above:
10.10.10.0/24
Under Configuration > Targets, we can add the details of the subnet and our custom SQL Ports port-list:
LAB 8 – Web Applications Scans (Invicti)
Pre-requests
▪ internet connection
Tasks List
Task1: Download Invicti tool
Task2: Install and configure Invicti tool
Task3: Configuring a Web Scan and report the result
Implementation
Task1: Download Invicti tool
Download a cracked copy from : https://github.com/Ixve/Red-Team-Tools
Task2: Install and configure Invicti tool
Run the WebAppSetup.exe file and select Next.
On the End-User License Agreement step, accept the license agreement, and select Next.
On the Ready to Install step, select Install to install the Web Application Server, and wait for a while.
The installation asks you to install the prerequisite: The Authentication Verifier Service.
On the Welcome to the Prerequisites Setup Wizard window, select Next to continue.
On the Select Installation Folder step, select Next to install the Authentication Verifier Service to the
default folder. Or select Browse to select an installation folder. Select Next.
On the Completing the Invicti Enterprise Authentication Verifier Service Setup Wizard step,
select Finish to complete the installation.
On the Completing the Invicti Enterprise Web Application Setup Wizard step, select Finish to complete
the Web Application Setup process.
You may wish to go ahead with the default settings. After selecting the target website, you need to
select Launch. Right after, Invicti will begin scanning the website.
You can monitor the progress in real-time. Also, Invicti will start reporting vulnerabilities as soon as it
identifies them.
Using customized settings
What if you need to configure the scan settings and authentication? You may have a website that
requires fine-tuning the scan settings. To meet such needs, Invicti has extensive customization options
suitable for your website. The following scenario will showcase some of these extensive customization
options.
For this scenario, you need to enter authentication information so that Invicti can crawl and attack
password-protected web pages. To do so, select Form > Form Authentication. As the PHP test website
has a straightforward login page, it is easy to configure.
Once you enter the login credentials, select Verify Login & Logout to make sure that Invicti can crawl
and attack these web pages.
Next, you may wish to configure the Scan Scope. It lets you define what part of the website can be
scanned. You can instruct Invicti Enterprise to scan only the entered URL. That means only the supplied
URL and the parameters on its page will be scanned.
Now, you may wish to configure the scan time window. As the PHP test website is in the production
environment and is accessible to visitors, you may not want to cause any disruptions. So, you can
instruct Invicti to perform scanning within non-business hours.
Remember that scan duration may vary depending on the size of the web application and the variety of
security checks enabled in the Scan Policy you’ve selected.
Step 3: Reviewing scan results
When Invicti completes the security scanning, it notifies you with an email. In this scenario, the scanner
warns you that the PHP test website is very insecure and requires immediate attention.
Now, select View the Report Online to see the scan summary. This page lists vulnerabilities grouped by
severity levels.
When you want to review the progress, you can select Issues > All Issues. This page provides you a
quick overview of vulnerabilities. For example, Invicti shows that the Blind SQL Injection is Fixed
(Unconfirmed).
This means remediation action has been taken on this issue, and the issue is updated as Fixed. Now,
select Issues > Waiting for Retest. Invicti notifies you that it is about to scan to confirm the remediation,
and when the scan is completed, you’ll be notified.
If the issue is fixed, the issue’s state will be automatically changed to Fixed (Confirmed); otherwise,
Invicti will change its status back to Present again and will assign it to the user who marked the issue
previously as Fixed.
Step 4: Integrating with issue tracking tool
To handle issues easily, you may wish to integrate Invicti Enterprise with an issue tracking system.
Invicti integrates with a wide range of software and tools that you can integrate into your existing SDLC
processes, including vulnerability management systems, issue tracking systems, continuous integration
systems, and web application firewalls. These tools help you to streamline the bug-fixing processes.
4. Read the license agreement. To proceed, you must accept the license agreement. Select the I
accept the license agreement option and click Next to continue.
5. Choose an installation directory for Metasploit. The directory you choose must be empty.
Click Next to continue.
6. When the Disable Anti-Virus and Firewall screen appears, click Next if you have disabled the
anti-virus software and firewalls on your local system. If you have not disabled them, you must
disable them at this time.
If the install detects that anti-virus software or a firewall is enabled, you will see a warning. Click OK to
close the warning. The installer will not allow you to continue the installation process until the firewalls
and anti-virus software are disabled. If you cannot disable them, you will not be able to install
Metasploit.
7. Enter the SSL port that the Metasploit service should use and click Next. By default, the server
uses port 3790 for HTTPS. If the port is already bound to another process, you can use netstat to
determine if a process is already listening on that port and kill the process, or you can enter
another port such as 8080 or 442.
8. Enter the web server name that you want to use to generate the SSL certificate and the number of
days that the certificate should be valid in the Days of validity field.
9. Select Yes, trust certificate to install the self-signed Metasploit SSL certificate to your
operating system’s trusted certificate store. If you install the certificate, browsers that utilize the
operating system’s certificates, such as Internet Explorer, will not prompt you about an insecure
SSL certificate.
Please note that the installer creates a temporary certificate authority to generate the certificate and
immediately discards it in order to prevent phishing attacks and the potential resigning of the certificate.
10. The installer is ready to install Metasploit and all its bundled dependencies. Click Next to
continue.
11. When the installation completes, click the Finish button.
Task2: Configuring a Scan and report the result
Manually Adding a Host with an IPv6 Address
To manually add a host, select Analysis > Hosts. When the Hosts page appears, click the New
Host button.
When the Hosts page appears, enter the following information:
The other fields, such as Ethernet address and OS information, are optional.
You can also access the Scan button from the Analysis page.
3. When the New Discovery Scan page appears, enter the target addresses that you want to include
in the scan in the Target addresses field.
You can enter a single IP address, an address range, or a CIDR notation. If there are multiple addresses
or address ranges, use a newline to separate each entry. 4. At this point, you can launch the scan.
However, if you want to fine tune the scan, you can click the Show Advanced Options button to
display additional options that you can set for the discovery scan. For example, you can specify the IP
addresses that you want to explicitly include and exclude from the scan.
The best way to view the data collected by the Discovery Scan is from the Hosts page. To view the
Hosts page, select Hosts > Analysis. Each host will have one of the following statuses: scanned,
cracked, shelled, or looted. For recently scanned hosts, the easiest way to identify them to sort them by
date and their status.
Before you can run a Nexpose scan from Metasploit Pro, you must add a Nexpose Console. You'll need
to know the address and port Nexpose runs on, and you'll need the credentials for an account that can be
used to log into the Nexpose console.
4. When the Nexpose configuration page appears, enter the following information:
5. Select the Enabled option to initialize and activate the Nexpose Console.
6. Save the configuration.
The Nexpose Consoles table is updated with the console. If Metasploit Pro is able to successfully
connect and authenticate to the Nexpose console, the status is 'Available (Enabled)', as shown below:
Otherwise, an 'Error' status displays if there is an issue with the console's configuration. The following
errors may appear:
• 'Error: Nexpose host is unreachable' indicates that Metasploit Pro cannot access the console. You
will need to verify that you have entered the correct address and port.
• 'Error: Authentication required for API access' indicates that the credentials that you have
provided cannot be used to authenticate to the Nexpose server. You will need to verify that you
have entered the correct credentials.
Running a Nexpose Scan
To be able to prioritize security risks, you must know what devices are running in an environment and
understand how they are vulnerable to attacks. You can run a Nexpose scan to discover the services and
applications that are running on a host and identify potential vulnerabilities that may exist based on the
collected data..
All scan data collected from Nexpose is stored in a Metasploit project and can be viewed from the
Analysis area. The information gathered from each host includes the IP address, host name, operating
system, running services, and possible vulnerabilities. Metasploit Pro maps each vulnerability to a
related module, if one exists in the module database for it. These modules are viewable from
the Modules tab on the single host view.
After the scan completes, select Analysis > Hosts to view the scan results.
After you run a Nexpose scan from Metasploit Pro, a temporary site is created on the Nexpose console.
The naming syntax for a temporary site is Metasploit-<project name>-<ID>. In Nexpose, select Assets >
Sites to view a list of sites and search for the site by project name.
The Findings window displays the real-time statistics for the test and the task log. You can click on the
tabs at the top of the Findings window to switch between the real-time statistics and the task log. You
can also automatically push validated vulnerabilities and access the Vulnerabilities Exceptions
configuration page.
The Findings window automatically appears when you start the Vulnerability Validation Wizard. If you
navigate away from the Findings window, you can go to the Tasks page to access it again.
1. From within a project, select Tasks > Show Tasks from the Project Tab bar. The Tasks page
appears.
2. Find the Vulnerability Validation task.
3. Click the Vulnerability Validation task name. The Findings window appears.
The Statistics Tab
The Statistics tab shows a high-level, count of hosts, vulnerabilities, and exploits. Each value is
displayed in a stat bubble with an orange progress bar. The progress bar wraps around the stat bubble
and only displays when there is activity occurring for a particular finding.
From the Statistics tab, you can track the following data:
You can view the vulnerability name, the exploit module that was run against the vulnerability, and the
result of the exploit. For vulnerability validations, the state will be exploited. 3. Use the navigational
page buttons to view more hosts or click the Show Entries dropdown to expand the number of
validations displayed.
The Tasks Log tab shows a detailed activity log for the Vulnerability Validation Wizard. Each task that
Metasploit Pro performs is documented in the Tasks Log. For example, you can view the assets and
vulnerability definitions as they are being imported into a project or you can view the exploit modules as
they are being run. If you have chosen to perform a dry run of the auto-exploitation task, you can go to
the Tasks Log to view the proposed attack plan.
Additionally, the Tasks Log shows you the current state of the test, the start time of the test, and the
amount of time that the test has been running.
Recommended Topics
Network Vulnerability Scan (Microsoft Defender for Endpoint)
External Scans (Rapidfire)
Database Scans (Imperva’s Scuba)