0% found this document useful (0 votes)
20 views20 pages

IT System Security Lab Practical Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views20 pages

IT System Security Lab Practical Guide

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DEPARTMENT OF COMPUTER ENGINEERING & APPLICATIONS

Institute of Engineering & Technology

Practical File

Name: Pragati Varshney UnivRoll: 2315300016


Course: B. Tech (CS-CSF) Class Roll: 15

Faculty: Mr. Arvind Prasad

Code: BCSE 0638

Subject Name: IT System Security & Physical Security Lab

Year: I Semester: II Session: 2023-24


Experiment 1:
Step1: To start the scanning, click on the Scan multiple computers
option.

Step2: Fill the systems IP address range.

Step3: Click on the Start Scan button.


Step4: Now the scanning will start, and it will take some time to
complete the scan.

Step5: Once the scan is completed a scan report will be generated,


click on the Pick a security report view option.
Step6: On the next window the report will be expended, click on Ok
after analyzing the report.

Experiment 2:
import socket
Firstip=input("Enter first ip:") lastip=input("Enter
second ip:")

f=[Link](".")+1
flength=len(Firstip)
first=int(Firstip[f:flength])

l=[Link](".")+1
flength=len(lastip)
last=int(lastip[l:flength])
for ip in range
(first,last):
target=Firstip[0:f] + str(ip)

print("scanning: " ,target) WL =


[8005,8008] try: for port in range
(7999,8100): soc =
[Link]()
[Link](1)
res=soc.connect_ex((target,port))
if res==0:
print("Port",port," is
open") try:
if [Link](port)>=0:
print("port is in white list")
except: pass [Link]()
except: pass

Experiment 3:
The following report summarizes that:
• The virus protection is up-to-date.
• The security benchmark score is 4.31 out of 10.
• There are 3 missing security updates, therefore in the section
missing security updates there are link to install them.
• We can also see computer profile summary which gives all the
information about software, hardware, virus protection,
communications and other devices.
Experiment 4:
A. Open HoneyBOT and select the network adapter through which you want
to use the HoneyBOT then list the ports with their services and then start the
engine click on the blue play button to start the HoneyBOT listening engine. The
status bar at the bottom of the window will increment as each port is successfully
opened.

B. On the top left corner go to the view tab then select services then add the
service you want to add with their respective details such as (port number,
protocol, enable, description).
Click on the blue play button to start the HoneyBOT listening engine. The status
bar at the bottom of the window will increment as each port is successfully
opened. Now wait for a while after that click on the red stop button to shut
down all listening services and terminate existing open sockets. The status bar
at the bottom of the window will decrement as each port is closed.

Double clicking a record in the list view of the main window will open the
Packet Log viewer window. On the upper left hand side of the window is the
Connection Details which displays basic information about the selected hit
including the total number of bytes sent and bytes received for that hit. In the
upper right hand side the application displays the Packet History list view of all
transmitted and received IP packets associated with the hit.
C. [Link] This IP Address seems malicious.

D. Go to the view tab on the top left corner then select the whitelist option to
create a whitelist. After going to the whitelist option add the details (remote IP,
local port, protocol, description) of the IP that has to be whitelisted.
Experiment 5:
The possible ways to block the malicious device using MAC address
are:
• By choosing MAC filtering from advanced settings of Firewall
• By implementing IEEE 802.1X authentication, which requires
devices to authenticate before they are granted network access.
Unauthorized devices, identified by MAC address, can be denied
access.
Experiment 6:
A. The steps one would take to set up a Wireshark capture to
monitor network traffic for suspicious activities are:
• Choose the network you want to capture network
traffic for suspicious activities.

• The traffic will start getting captured.

B. After analyzing the captured packets:


We found a Login on an HTTP connection which can
compromise the login credentials of the user as an HTTP
connection is not secure.
C. Security measures or actions that should be taken based on the
findings to mitigate the potential security threat are:
• One should use secure sites with an HTTPS connection.
• Enable Multi-Factor Authentication which adds extra layer of
security.
• Review recent activity of the account on an HTTP connection to
make sure of no unauthorized access.

Experiment 7:
• The top three bandwidth consuming deviecs source ip and
destination ip are:

• The protocol used by each of these devices TLSv1.2


• Based on the analysis, the recommendations to resolve the
slow internet speeds and intermittent connectivity issues will
be upgrading the TLS version, implement load balancing for
web servers to distribute traffic efficiently and ensure that all
network devices have the latest firmware and software updates
installed.

Experiment 8:
A. Setting up ZAP for Testing the Quiz Portal:
1. Installation:
- Download ZAP from the official website and install it on your
system.
- Ensure you have Java installed as ZAP runs on Java.

2. Configure Proxy Settings:


- Configure your browser to use ZAP as a proxy.
- Set the proxy settings in your browser to point to ZAP's
listening port (default is 8080).

3. Start ZAP:
- Launch ZAP after installation.
- ZAP will start a local proxy server to intercept and inspect
HTTP and HTTPS traffic.

4. Configure Browser:
- Open your browser and navigate to the ZAP welcome page
(`[Link]
- Follow the instructions to set up your browser to work with
ZAP.

5. Spider the Website:


- Use ZAP's spider tool to crawl the university's quiz portal. -
This will help in identifying all accessible pages and endpoints
for testing.
B. Performing a Simple Scan using ZAP:
1. Set Target URL:
- In ZAP, go to the "Quick Start" tab.
- Enter the URL of the university's quiz portal as the target.

2. Perform Active Scan:


- Click on the "Attack" tab.
- Select "Active Scan" and configure scan settings if needed.
- Start the scan to identify potential vulnerabilities.

3. Review Scan Results:


- Once the scan is complete, review the results in the "Alerts"
tab. - ZAP will categorize vulnerabilities based on severity
and provide detailed information about each issue found.
C. Common Security Issues Detected by ZAP:

1. Cross-Site Scripting (XSS):


- ZAP might detect XSS vulnerabilities where untrusted data is
improperly handled, allowing attackers to inject malicious
scripts into web pages.
- This can lead to session hijacking, defacement, or stealing
sensitive information from users.

2. SQL Injection (SQLi):


- ZAP can identify SQL injection vulnerabilities where attackers
can manipulate SQL queries executed by the application's
backend database.
- Exploiting SQLi vulnerabilities can result in unauthorized
access to databases, data theft, or even complete database
compromise.

Recommendations to Address Detected Vulnerabilities:

1. Implement Input Validation:


- Validate and sanitize user input to prevent XSS and SQLi
attacks. - Use proper encoding and escaping techniques to
handle usersupplied data securely.

2. Security Headers:
- Implement security headers such as Content Security
Policy (CSP), X-Content-Type-Options, and X-Frame-Options to
mitigate various web application security risks.

3. Parameterized Queries:
- Use parameterized queries or prepared statements to
prevent SQL injection attacks by separating SQL code from user
input.

4. Regular Security Assessments:


- Conduct regular security assessments using tools like ZAP
to proactively identify and address security vulnerabilities in the
quiz portal.
By addressing the identified vulnerabilities and adopting security best
practices, the university can enhance the security posture of its quiz
portal and mitigate potential risks to student and teacher data.

Experiment 9:

Mitigating Identified Risks:


1. Patch Management:
- Ensure that all devices on the network have the latest
security patches and updates installed to address known
vulnerabilities.

2. Network Segmentation:
- Implement network segmentation to isolate critical
systems and reduce the attack surface. This prevents attackers
from moving laterally within the network in case of a breach.

3. Access Control Policies:


- Enforce strict access control policies to limit access to
sensitive resources only to authorized users. Use strong
authentication mechanisms such as multi-factor authentication
(MFA).

4. Firewall Configuration:
- Configure firewalls to filter incoming and outgoing traffic,
blocking unnecessary ports and services. Regularly review and
update firewall rules to adapt to changing security
requirements.

5. Intrusion Detection and Prevention Systems (IDPS):


- Deploy IDPS to monitor network traffic for suspicious
activities and potential threats. Set up alerts for unusual
behavior and respond promptly to any detected incidents.

6. Regular Security Audits:


- Conduct regular security audits and vulnerability
assessments to identify and remediate security weaknesses
proactively.

Basic Network Discovery Scan using Nmap:

1. Performing the Network Discovery Scan:


- Open a terminal or command prompt.
- Use the following Nmap command to perform a basic network
discovery scan:

nmap -sn <network_address>

Replace `<network_address>` with the IP range of the simulated


network.
Discovered Devices:

- Device 1:
- IP Address: [Link]
- Description: (Provide any known information about the device, such
as hostname or device type)

- Device 2:
- IP Address: [Link]
- Description: (Provide any known information about the device, such
as hostname or device type)

- (Repeat the above format for all discovered devices)

Detailed Port Scan on Target Machine:

1. Performing the Port Scan:


- Choose one of the discovered devices as the target machine. - Use
the following Nmap command to perform a detailed port scan:

nmap -p- -sV <target_ip>

Replace `<target_ip>` with the IP address of the target machine.

Open Ports and Corresponding Services:

- Port 22 (SSH):
- Service: Secure Shell (SSH)
- Description: Used for secure remote access to the system.

- Port 80 (HTTP):
- Service: Hypertext Transfer Protocol (HTTP)
- Description: Used for web traffic, indicating the presence of a web
server.

- (Repeat the above format for all open ports and their corresponding
services)

Ensure to analyze the results of the network scan thoroughly and


take appropriate actions to address any vulnerabilities or security
risks identified. Regularly monitor the network for changes and
updates to maintain a secure environment.

Experiment 10:

A. Navigate to the "Projects" directory, which is located inside the


"Documents" directory. cd ~/documents/projects

B. Create a new directory named "Reports" within the "Projects"


directory. mkdir Reports
C. Inside the "Reports" directory, create two text files named
"Quarterly_Report.txt" and "Annual_Report.txt." cd Reports touch
Quarterly_Report.txt Annual_Report.txt

D. Display the contents of the "Reports" directory to verify the creation


of the new files. Ls

E. Move the "Annual_Report.txt" file to the "Backup" directory, which is


located in the parent directory of "Documents." mv
Annual_Report.txt ../../Backup/

F. Change the name of the "Quarterly_Report.txt" file to


"Q1_Report.txt." mv Quarterly_Report.txt Q1_Report.txt

G. Display the updated contents of the "Reports" directory. ls

Common questions

Powered by AI

The HoneyBOT tool can be used to simulate open ports on your network to attract and log potential threats. By selecting a network adapter and listing ports with respective services, users can start the HoneyBOT listening engine to track any incoming traffic. The tool provides insights through a `Packet Log` viewer, detailing connection incidents, bytes exchanged, and listing received IP packets . This logging can help identify suspicious activities, especially if specific ports attract unexpected attention, suggesting vulnerabilities or intrusion attempts .

To secure network communications, especially when vulnerabilities like HTTP login transmissions are identified, several steps can be taken: switch to HTTPS connections to encrypt data, implement Multi-Factor Authentication (MFA) to add security layers, and review account activities for unauthorized access to mitigate potential threats . These measures reduce the risk of credentials being exposed through unsecured communications and provide an additional layer of verification to protect access to sensitive accounts .

Using ZAP as a proxy improves web portal vulnerability testing by intercepting and inspecting both HTTP and HTTPS traffic during interactions with the portal. This setup allows ZAP to identify vulnerabilities like XSS and SQLi by examining how the web application handles requests and responses. By configuring the browser to work through ZAP, testers can dynamically analyze and record web traffic, enabling a comprehensive assessment of potential security issues . This approach facilitates a proactive evaluation and remediation of vulnerabilities before exploitation .

Firewalls and Intrusion Detection and Prevention Systems (IDPS) contribute to network security by filtering incoming and outgoing traffic, blocking unnecessary ports and services, and detecting suspicious activities. Firewalls are crucial for enforcing traffic rules and adapting to security requirements, while IDPS monitor for threats in real time and alert administrators of potential breaches . This proactive defense layer helps in maintaining a secure network environment by preventing unauthorized access and quickly mitigating detected threats .

To address slow internet speeds and connectivity issues associated with bandwidth-consuming devices, it's recommended to upgrade the TLS version used by these devices, implement load balancing for better traffic distribution, and ensure firmware and software are up to date across all network hardware . These measures will help in efficiently managing network resources while maintaining security and performance, thus providing a more stable connectivity experience .

Nmap network discovery and detailed port scans are essential for identifying devices on a network, including open ports and running services. This process helps in assessing the network’s current security posture and highlights areas vulnerable to attack, such as unnecessary open ports. Following a thorough analysis, immediate actions should include closing non-essential open ports, updating software and firmware of devices, and configuring firewall rules to block unauthorized access . These actions reduce the risk of exploitation and enhance overall network security .

Network segmentation helps mitigate security risks by isolating critical systems from the rest of the network, thereby reducing the attack surface. This approach prevents lateral movement by attackers in case of a breach, as access to different segments requires additional authorization. Network segmentation ensures that even if one part of the network is compromised, the critical segments remain secure and insulated from the intrusion .

ZAP can identify vulnerabilities such as Cross-Site Scripting (XSS) and SQL Injection (SQLi) when testing a web portal. XSS can lead to session hijacking or defacement, while SQLi can result in unauthorized database access. To address these vulnerabilities, input validation and sanitization should be implemented, as should parameterized queries for SQL. Using security headers like Content Security Policy (CSP) also helps mitigate these risks. Regular security assessments ensure that vulnerabilities are identified and addressed regularly, maintaining the portal's security posture .

MAC address filtering and IEEE 802.1X authentication enhance security by controlling which devices can access the network. MAC filtering allows only authorized MAC addresses to connect, effectively blocking unauthorized devices. IEEE 802.1X adds a layer of security by requiring devices to authenticate before gaining network access. Together, these methods ensure that only verified devices can connect, preventing unauthorized access and potential network breaches . Using these techniques helps in enforcing strict access control policies that are crucial for protecting network resources .

Conducting a basic Nmap network discovery scan involves using the `nmap -sn <network_address>` command to identify active devices on a network, providing a map of connected devices. A detailed port scan uses the `nmap -p- -sV <target_ip>` command on a selected target to discover open ports and associated services, identifying potential vulnerabilities. These scans are essential for understanding the network layout, assessing open services that may need security strengthening, and consequently fortifying the network against unauthorized access or exploitation . Regular scans help maintain security compliance and proactive risk management .

You might also like