Et Lab1 2021600035
Et Lab1 2021600035
Et Lab1 2021600035
IT321-Ethical Hacking
AY:2023-2024
Lab1 A- Internet Foot-printing
Lab1 B- Network Scanning
Objectives:
[1] Introduce the anatomy of ethical hacking
[2]To perform Network Reconnaissance Using Command Line
[3]To perform DNS Interrogation
[4]To perform Web Reconnaissance
2. Active Footprinting: This involves directly interacting with the target system or
network to gather information. It includes techniques like port scanning, network
sniffing, and vulnerability scanning to identify potential weaknesses.
The GHDB was initially created by Johnny Long, a security researcher, and it has
been widely used by both security professionals and malicious actors for various
purposes such as reconnaissance, penetration testing, and information gathering.
The queries in the Google Hacking Database can be used to find a wide range of
information, including:
"Who is" database refers to a type of database used for storing and managing
domain registration information. When someone registers a domain name, they are
required to provide certain contact details, including their name, address, email
address, and phone number. This information is collected by domain registrars and
stored in a centralized database known as the "whois" database.
The "whois" database allows anyone to look up information about a domain name
and find out who owns it or who is responsible for managing it. This information
can be useful for various purposes, such as contacting the domain owner for
business inquiries, investigating potential trademark infringement, or identifying
malicious actors involved in cybercrime.
However, due to privacy concerns, some domain registrars offer privacy protection
services that allow domain owners to hide their contact information from public
view in the whois database. In such cases, the registrar's contact information is
displayed instead of the owner's personal details.
1A.3 Other available resources
In addition to the Google Hacking Database, there are several other resources and
techniques available for conducting internet footprinting and reconnaissance:
6. WHOIS Lookup: While the WHOIS database provides contact information for
domain owners, some registrars offer limited information or privacy protection
services. Nevertheless, WHOIS lookup tools can still provide valuable insights into
domain registration details.
9. Open Source Intelligence (OSINT) Tools: There are various OSINT tools and
frameworks available, such as Maltego, Recon-ng, and theHarvester, designed
specifically for gathering information from publicly available sources across the
internet.
1B Network Footprinting
1. Ifconfig/ipconfig
2. Ping
The route command-line tool is typically used for displaying and managing
the IP routing table
4. Arp
6. Fping
1. Fping
2. Arp-scan
7. Arp-scan
Nslookup
1. Host
2. Dig
3. Whois
1. Whois
Lab1 B- Network Scanning
Objective: Scan the network to identify open ports, OS detection, service scanning and
vulnerability scanning.
Outcomes:
1. To install and use network scanner (nmap) and web server scanner (nikto)
2. To explore various scanning mechanisms.
3. To enumerate the open ports and identify vulnerable services.
4. To detect the operating system and associated vulnerability
5. To identify the exploit with respect to vulnerable services.
System Requirements:
3 workstations installed with Kali Linux/Fedora Linux Core/Ubuntu and Windows XP
Nmap, nmapfe, zenmap etc
Layer 7 Application This layer involves the application HTTP, FTP, and
software that is sending and receiving Telnet
data
Layer 6 Presentation This layer defines how data is formatted ASCII, JPEG, PDF,
or organized PNG, and DOCX
Layer 3 Network This layer involves logical system IPv4, IPv6, ICMP,
addressing and IPSec
Procedure: Let explore nmap: Network host scanner, port scanner, OS fingerprinting, Service
scanner and vulnerability scanner.
NMAP: Network exploration tool and security/port scanner
Description:
Nmap is short for Network Mapper. It is an open-source security tool for network exploration,
security scanning, and auditing.
Short analysis:
The command initiates a standard nmap scan on the specified IPv4 address. The initial nmap
command, "sudo nmap 10.0.2.4," conducts a thorough scan on the specified IPv4 address to
identify open ports, services, and potentially unveil the host's operating system. The inclusion of
the "-v" option enhances verbosity, providing a detailed breakdown of the scan process.
2. Scan multiple IP address or subnet (IPv4)
$sudo nmap 192.168.1.1 192.168.1.2 192.168.1.3
Short analysis:
These nmap commands showcase the ability to exclude specific hosts or networks from a scan,
which is crucial for refining the scanning scope in scenarios involving a large number of
potential targets. Whether excluding individual hosts or utilizing an exclusion list from a file, this
feature enhances the precision and customization of the scanning process
Short analysis:
These nmap commands utilize ACK scanning ("-sA") to assess whether a host or network is
protected by a firewall. ACK scans can unveil filtered ports, aiding in the identification of
potential firewall presence.
7: Scan a host when protected by the firewall
$sudo nmap -PN 192.168.1.1
Short analysis:
The inclusion of the "-PN" option in these nmap commands explicitly disables host discovery,
allowing the scan to proceed even when the target host is protected by a firewall. By bypassing
the normal host discovery mechanisms, these commands aim to gather information about open
ports and services on the specified host, regardless of its firewall protection.
8: Scan a network and find out which servers and devices are up and running
This is known as host discovery or ping scan:
$sudo nmap -sP 192.168.1.0/24
$sudo nmap done: 256 IP addresses (4 hosts up) scanned in 2.80 second
Short analysis:
This nmap command utilizes the "-sP" option for a ping scan, aiming to discover active hosts
within the given network range. This host discovery technique is essential for identifying live
devices on a network, providing a foundational step for subsequent targeted scans and
comprehensive network reconnaissance.
9: How do I perform a fast scan?
$sudo nmap -F 192.168.1.1
Short analysis:
The inclusion of the "-F" option in this nmap command denotes a fast scan, focusing on a subset
of common and high-priority ports to expedite the scanning process. Fast scans are particularly
useful for situations where a quick overview of a target is needed, and a comprehensive scan is
not required.
Short analysis:
By incorporating the "--reason" option, these nmap commands enhance the scan output by
providing additional information about the reasons behind the state of each port. This includes
insights into whether a port is open, closed, or filtered, offering valuable context for each
identified port on the target host.
11: Only show open (or possibly open) ports
$sudo nmap --open 192.168.1.1
$sudo nmap --open server1
Short analysis:
Utilizing the "--open" option in these nmap commands streamlines the scan output by displaying
only the information related to open (or possibly open) ports on the target host.
12: Show all packets sent and received
$sudo nmap --packet-trace 192.168.1.1
$sudo nmap --packet-trace server1
Short analysis:
By incorporating the "--packet-trace" option, these nmap commands provide a detailed trace of
all packets sent and received during the scan.
Conclusion:
● In this practical, we learnt network reconnaissance and vulnerability assessment using the
tool Nmap.
● We explored various Nmap commands, covering important techniques like host
discovery, scanning multiple hosts, excluding specific targets, and enabling OS detection.
● The commands demonstrated how Nmap efficiently identifies live hosts, open ports, and
potential vulnerabilities in a network