Practical: 1
Practical: 1
Practical: 1
Date:
Aim: Perform 5 different types of (port) scanning using nmap on a single port and capture the
packets using wireshark and analyze the output.
Theory:
1. Nmap:
Nmap is a free and open-source network scanner created by Gordon Lyon. Nmap is
used to discover hosts and services on a computer network by sending packets and
analyzing the responses.
Nmap provides a number of features for probing computer networks, including host
discovery and service and operating system detection.
These features are extensible by scripts that provide more advanced service detection,
vulnerability detection, and other features.
Nmap can adapt to network conditions including latency and congestion during a scan.
Nmap started as a Linux utility and was ported to other systems including Windows,
macOS, and BSD. It is most popular on Linux, followed by Windows.
2. Wireshark:
3. open:
4. closed
A closed port is accessible (it receives and responds to Nmap probe packets), but there
is no application listening on it.
Administrators may want to consider blocking such ports with a firewall. Then they
would appear in the filtered state, discussed next.
5. filtered
Nmap cannot determine whether the port is open because packet filtering prevents its
probes from reaching the port.
The filtering could be from a dedicated firewall device, router rules, or host-based
firewall software.
These ports frustrate attackers because they provide so little information. Sometimes
they respond with ICMP error messages such as type 3 code 13 (destination
unreachable: communication administratively prohibited), but filters that simply drop
probes without responding are far more common.
This forces Nmap to retry several times just in case the probe was dropped due to
network congestion rather than filtering. This slows down the scan dramatically.
6. Unfiltered
The unfiltered state means that a port is accessible, but Nmap is unable to determine
whether it is open or closed.
Only the ACK scan, which is used to map firewall rulesets, classifies ports into this
CS383-Cyber Security and Cyber Laws 20DCS138
state.
Scanning unfiltered ports with other scan types such as Window scan, SYN scan, or
FIN scan, may help resolve whether the port is open.
7. open|filtered
Nmap places ports in this state when it is unable to determine whether a port is open or
filtered. This occurs for scan types in which open ports give no response.
The lack of response could also mean that a packet filter dropped the probe or any
response it elicited.
So Nmap does not know for sure whether the port is open or being filtered. The UDP,
IP protocol, FIN, NULL, and Xmas scans classify ports this way.
8. closed|filtered
This state is used when Nmap is unable to determine whether a port is closed or
filtered.
It is only used for the IP ID idle scan.
Implementation:
Below are the glimpses of the packets captured by wireshark when the above command
was executed
CS383-Cyber Security and Cyber Laws 20DCS138
If we want to scan for a range of ip address then, enter the following command
Write sudo nmap ip address range.
To scan for all available TCP ports, enter the following command
Conclusion/Summary:
CS383-Cyber Security and Cyber Laws 20DCS138
Practical 2
Date:
Aim: Perform a Vulnerability Scan on a system within the Local Area Network and Submit
the report.
Theory:
Nessus Essentials:
Nessus Essentials is a free vulnerability assessment solution for up to 16 IPs that
provides an entry point into the Tenable ecosystem.
Backed by market leading functionality from Nessus Professional, Nessus Essentials
gives you the accuracy and speed you need to discover, prioritize and remediate
vulnerabilities.
Implementation:
Firstly, Nessus Essential is not pre-installed. Hence, we need to download it.
CS383-Cyber Security and Cyber Laws 20DCS138
Fig-2.5: Status
After providing the user_name and password, download process will begin.
Once, all plugins are installed, it will prompt you to enter the details of hosts that you
want to check for.
Fig-2.9: scanning
CS383-Cyber Security and Cyber Laws 20DCS138
Conclusion/Summary:
Theory:
OWASP stands for “Open Web Application Security Project”.
It is an open, online community that creates methodologies, tools, technologies and
guidance on how to deliver secure web applications.
OWASP ZAP (ZAP) is one of the world’s most popular free security tools and is
actively maintained by hundreds of international volunteers. It can help to find security
vulnerabilities in web applications. It’s also a great tool for experienced pen testers and
beginners.
ZAP is what is known as a “man-in-the-middle proxy.” It stands between the browser
and the web application. While you navigate through all the features of the website, it
captures all actions. Then it attacks the website with known techniques to find security
vulnerabilities.
It is one of the most active Open Web Application Security Project (OWASP) projects
and has been given Flagship status.
When used as a proxy server it allows the user to manipulate all of the traffic that
passes through it, including traffic using https.
It can also run in a daemon mode which is then controlled via a REST API.
ZAP was added to the ThoughtWorks Technology Radar in May 2015 in the Trial ring.
ZAP was originally forked from Paros, another pentesting proxy. Simon Bennetts, the
project lead, stated in 2014 that only 20% of ZAP's source code was still from Paros.
Implementation:
Starting ZAP.
Once setup you can start ZAP by clicking the ZAP icon on your Windows desktop or
CS383-Cyber Security and Cyber Laws 20DCS138
Automated Scan:
This option allows you to launch an automated scan against an application just by
entering the URL. If you are new to ZAP, it is best to start with Automated Scan mode.
To run a Quick Start Automated Scan:
CS383-Cyber Security and Cyber Laws 20DCS138
1. Start Zap and click the large ‘Automated Scan’ button in the ‘Quick Start’ tab.
2. Enter the full URL of the web application you want to attack in the ‘URL to attack’
text box.
3. Click the ‘Attack’ button.
Once you click the ‘Attack’ button, ZAP will start crawling the web application with
its spider and passively scan each page it finds. Then ZAP will use the active scanner
to attack all of the discovered pages, functionality and parameters.
Exploring the web application manually
Spiders are a great way to explore the basic site, but they should be combined with
manual exploration to be more effective. This functionality is very useful when your
web application needs a login or contains things like registration forms, etc.
You can launch browsers that are pre-configured to proxy through ZAP via the Quick
Start tab. Browsers launched in this way will also ignore any certificate validation
warnings that would otherwise be reported.
Manual Explore:
CS383-Cyber Security and Cyber Laws 20DCS138
Passive Scans only scan the web application responses without altering them.
It does not attack or insert malicious scripts to the web application, so this is a safe
scan; you can use it if you are new to security testing.
Passive scanning is good at finding some vulnerabilities and as a way to get a feel for
the basic security of a web application.
Active scan attacks the web application using known techniques to find vulnerabilities.
This is a real attack that attempts to modify data and insert malicious scripts in the web
application.
CS383-Cyber Security and Cyber Laws 20DCS138
Practical: 6
Date:
Aim: Implementation to gather information from any PC’s connected to the LAN using whois,
port scanners, network scanning, IP scanners etc.
Theory:
Angry IP Scanner:
CS383-Cyber Security and Cyber Laws 20DCS138
Angry IP Scanner is a free, lightweight, cross-platform, and open source tool to scan networks.
It helps you to scan a range of IP addresses to find live hosts, open ports, and other relevant
information of each and every IP address.
The good thing about Angry IP Scanner is that it lets you scan IP addresses in three different
ways. They are, the range you specified, a random IP address or a list of IP addresses from a
text file. You can easily select the scan mode from the drop-down menu next to the IP address
field.
Once you close the summary window, you will see the list of all the IP address. You can also
see additional details in different “fetcher” columns. In case you are wondering, here’s what
the colored dots next to each IP address mean.
Red: The IP address is inactive, dead or there is no device connected to this IP address.3.
Blue: The IP address is either active or busy and not responding to the requests sent by Angry
IP Scanner. This usually will be your own IP Address.
Green: The IP address is active, and the device connected to it is responding to the requests
made by Angry IP Scanner. There may also be open ports.
ARPING
If traditional ICMP-based pings are no longer reliable unless you know in advance that there is
no firewall blocking ICMP echo requests, what other options exist? One option is an Address
CS383-Cyber Security and Cyber Laws 20DCS138
To know why ARP pings are virtually guaranteed to work while ICMP pings may not, one
should understand the importance of ARP in networking. ARP is used by hosts on a network
to resolve IP addresses into Media Access Control (MAC) addresses, which can be interpreted
as a network interface’s unique serial number. Hosts on an Ethernet network use MAC
addresses rather than IP addresses to communicate.
When a host tries to create a connection to another host (on the same subnet), it first needs to
obtain the second host’s MAC address. In this process, Host A sends an ARP request to the
broadcast address of the subnet to which it is connected. Every host on the subnet receives this
broadcast, and the host with the IP address in question sends an ARP reply back to Host A
with its MAC address. After receiving the ARP reply from Host B, Host A can connect to
Host B.
ARP is required for an Ethernet network to function properly, so it typically is not blocked by
a firewall. If ARP requests were blocked, no host would be able to “find” a computer on a
network and connect to it. For all intents and purposes, the system would be unplugged from
the network.
(Tools do exist to filter ARP. The ebtables project provides these tools. Ebtables is similar in
both functionality and syntax to iptables, but whereas iptables works with TCP and UDP
protocols, ebtables works with ARP.)
One possible drawback to this system of using ARP to ping a host is that the ARP protocol is
not a routed protocol. If you are not on the same subnet as the host you are trying to connect
to, then this method is not going to work without first joining that subnet, which may or may
not be physically possible. Thus by sending an ARP request rather than an ICMP echo, you are
virtually guaranteed to get a reply.
CS383-Cyber Security and Cyber Laws 20DCS138
Zenmap
Whois
Whois is a protocol and a set of tools used to query information about domain names, IP
addresses, and other network resources. It is used to look up information about the registration
and ownership of a domain name, or the assignment of an IP address. The information that can
be obtained from a Whois query typically includes details such as the name of the registrant,
the date of registration, and the expiration date of the domain or IP address.
Whois can be used for various purposes, including:
Finding the contact information for a domain or IP address, including the registrant’s name,
address, phone number and email address.
CS383-Cyber Security and Cyber Laws 20DCS138
Masscan
Masscan is a high-speed TCP port scanner that can scan the entire internet in under 6 minutes.
It is open-source software that is designed to be fast, efficient, and highly configurable.
Masscan uses a technique called "SYN scanning" to scan for open ports on a given IP address
or range of IP addresses. It can also perform service detection, which means it can identify the
type of service running on a given port.
Conclusion/Summary:
Practical: 8
Date:
Aim: Gather information of any domain/website/IP address using following Information
Gathering Tools. 1. Samspade 2. Nslookup 3. Whois 4. Tracert.
Theory:
Samspade
Nslookup
Whois
Tracert
NSLOOKUP:
CS383-Cyber Security and Cyber Laws 20DCS138
WHOIS:
WHOIS is a protocol and a database used to look up information about domain names,
IP addresses and other internet resources. It is a way to find the owner and technical
details of a domain name or IP address, including contact information and registration
data. WHOIS records are maintained by registrars and registries, which are
organizations that manage the registration of domain names and IP addresses. WHOIS
information can be used for various purposes such as troubleshooting technical
problems, researching the ownership of a domain or IP address, or identifying the
registrar or registry responsible for a particular resource. WHOIS information can be
queried using a command-line tool or a web-based interface.
CS383-Cyber Security and Cyber Laws 20DCS138
TRACERT(traceroute):
The traceroute command is used to determine the path between two connections. Often
a connection to another device will have to go through multiple routers.
The traceroute command will return the names or IP addresses of all the routers
between two devices.
CS383-Cyber Security and Cyber Laws 20DCS138
SAMSPADE:
Fig-8.5 Using SamSpade gather the information about domain and IP address
Conclusion/Summary:
Theory:
DOMAINTOOLS: http://www.domaintools.com
Find information on any domain name or website. Large database of whois information, DNS,
domain names, name servers, IPs, and tools for searching and monitoring domain names.
WHOIS: http://www.who.is
Secure Domain Name Searches, Registration & Availability. Use Our Free Whois Lookup
Database to Search for & Reserve.
BUILTWITH: http://builtwith.com
NETCRAFT: https://sitereport.netcraft.com/
Web technology information profiler tool. Find out what a website is built with.
VIRUSTOTAL: https://www.virustotal.com/gui/home/url
DNS tools, Network tools, Email tools, DNS reporting and IP information gathering. Explore
monitoring products and free DNS tools at DNSstuff.
CS383-Cyber Security and Cyber Laws 20DCS138
Fig-9.10 VIRUSTOTAL is used to get DNS report and malware detection and other breaches
in any website
Conclusion/Summary: