Cyber 1,2
Cyber 1,2
Cyber 1,2
Question Bank
Unit-1
B. Active Attacks:
Active attacks refer to types of attacks that involve the
attacker actively disrupting or altering system, network,
or device activity. Active attacks are typically focused on
causing damage or disruption, rather than gathering
information or intelligence. Here, both the sender and
receiver have no clue that their message/ data is
modified by some third-party intruder. The message/
data transmitted doesn’t remain in its usual form and
shows deviation from its usual behavior. This makes
active attacks dangerous as there is no information
provided of the attack happening in the communication
process and the receiver is not aware that the data/
message received is not from the sender.
Active attacks are further divided into four parts based
on their behavior:
Blockchain Revolution:-
Blockchain security relies on cryptographic keys. Users need to
manage their private keys, which serve as the only means of
accessing their blockchain assets or accounts. If a private key is lost
or stolen, the user loses access to their funds permanently.Many
individuals and companies have lost millions of dollars in
cryptocurrency simply due to misplacing or failing to secure their
private keys.The regulatory landscape surrounding blockchain
technology and its applications, including cryptocurrencies, is still
evolving. Without clear regulations, blockchain ecosystems may
become havens for illegal activities such as money laundering, fraud,
and cybercrime.
While blockchain ensures transparency, it also raises privacy
concerns. Once data is recorded on a blockchain, it is immutable and
viewable by anyone with access to the network. This can be
problematic for sensitive personal data or confidential business
information.
Unit-2
5. Define the term in briefly: (i) Open Port Identification (ii) Banner
Check.
Open Port Identification
An open port is a network port configured to accept all incoming
connections using protocols like TCP and UDP, included in every IP
address. When a port is open, a particular port number on a device is
accessible and actively listening for incoming connections. In
contrast, a closed port rejects or ignores connections. For example,
port 80 is used for HTTP traffic, while port 443 is used for HTTPS.
A TCP Connect Scan establishes a full TCP connection with each port
on a target system by completing the three-way handshake. This
method is reliable for detecting open ports because it establishes a
real connection, but it is more detectable and can trigger alarms in
network security systems due to the full connection setup.
To identify open ports, network administrators and security
professionals use port scanning tools. These tools send connection
requests to a range of ports on the target system and observe the
responses. The responses indicate whether the ports are open,
closed, or filtered. For instance, a successful connection indicates an
open port, while a refusal or no response suggests the port is closed
or protected by a firewall.
Banner Check.
Banner check:- A banner check (or banner grabbing) is the process of
retrieving and examining the text banners or information messages
that some network services expose when they are connected to.
These banners usually reveal valuable information about the
software version, services, or the system running on a specific port.
To perform a banner check, tools connect to a service's port and
capture the banner that is sent in response. This can be done
manually using tools like Telnet or Netcat, which allow users to
connect to a specific port and view the banner information.
Automated tools like Nmap also provide banner grabbing capabilities,
allowing for the extraction and display of banner information from
multiple services in one go.
The primary use of banner checking is in security assessments. By
analyzing the banners, security professionals can determine the
versions and types of services running on a server. This information is
valuable for identifying vulnerabilities associated with specific
software versions. For example, if a banner reveals an outdated
version of a web server known to have security flaws, it can be a
critical indicator of potential security risks.
6. Describe Network Sniffers and Injection Tool. Explain any two
injection tools in brief.
A Network Sniffer is a tool that captures all data packets passing
through a network interface in order to analyze network activities
without impacting network operations. It operates silently, collects
data continuously, and can detect stealthy or sporadic activities.
Network Troubleshooting: Identifying issues within the
network, such as bottlenecks, connection problems, or
misconfigurations.
Security Monitoring: Detecting unauthorized access, monitoring
for suspicious activity, or capturing data that may be involved in
security incidents.
Data Analysis: Understanding traffic patterns, protocol usage,
and bandwidth consumption within a network.
Ethical Hacking: Penetration testers use sniffers to gather
information about a network or to capture unencrypted data
for further analysis.
Injection Tools
Injection tools are software applications or scripts used to inject
malicious code or data into a vulnerable system or application to
exploit it. Injection attacks can be used to gain unauthorized
access, execute arbitrary commands, or manipulate data within a
system. These tools are commonly used in penetration testing and
by malicious actors to exploit vulnerabilities.
1. SQLMap
SQLMap is an open-source tool specifically designed for
automating the process of detecting and exploiting SQL injection
vulnerabilities in web applications. It allows users to:
Identify SQL Injection Points: SQLMap can scan web
applications for potential SQL injection vulnerabilities by
analyzing user inputs and the responses they generate from the
server.
Exploit SQL Vulnerabilities: Once a vulnerability is found,
SQLMap can be used to exploit it, allowing the attacker to
retrieve or manipulate data in the database, such as dumping
entire databases, retrieving database schema, and extracting
credentials.
2. Metasploit
Metasploit is a comprehensive penetration testing framework that
includes a wide range of tools for discovering, exploiting, and
validating vulnerabilities. It is widely used by security professionals
and ethical hackers for various types of attacks, including injection
attacks. Key features include:
Payload Injection: Metasploit allows users to create and inject
payloads into vulnerable systems. These payloads can perform
actions like creating a reverse shell, adding new users, or
escalating privileges.
Exploit Modules: Metasploit contains a vast library of exploit
modules, including those for SQL injection, command injection,
and other types of code injection attacks.
What is Ettercap?
Ettercap is an open-source network security tool that is used for
man-in-the-middle (MITM) attacks on a local area network (LAN). It
allows attackers to intercept, capture, and manipulate network traffic
between devices. Ettercap is commonly used for network security
testing, ethical hacking, and penetration testing to assess the security
of network protocols and applications.
What is Hping?
Hping is an open-source command-line tool for network security
testing and auditing. It is used primarily for crafting and manipulating
TCP/IP packets and conducting security tests such as network
scanning, firewalls testing, and performing denial-of-service (DoS)
attacks. It is similar to ping, but offers advanced packet manipulation
capabilities, allowing users to craft custom packets for testing
purposes.
17. What do you mean by TCP/IP port? What is socket? Write down
port number range & well known ports.
A TCP/IP port is a logical endpoint in a network communication used
by the Transmission Control Protocol (TCP) or User Datagram
Protocol (UDP) to identify specific processes or services running on a
server or client. When data is transmitted over a network, it is
directed to the correct application using a port number, which acts as
an address for the data within the host. Ports are essential in
distinguishing between multiple services or connections on a single
device. For example, web servers typically use port 80 for HTTP
traffic, while email servers might use port 25 for SMTP.
A socket is an endpoint for communication between two machines. It
is a combination of an IP address and a port number, enabling the
transmission of data between a client and a server in a network.
Sockets can be created for both TCP (connection-oriented) and UDP
(connectionless) protocols.
For example, when a client wants to connect to a web server, it
creates a socket using the server’s IP address and port number 80
(HTTP). The server, listening on this port, accepts the connection and
communicates with the client.
Port numbers range from 0 to 65535 and are divided into three
categories:
1. Well-Known Ports (0-1023)
2. Registered Ports (1024-49151)
3. Dynamic/Private Ports (49152-65535)
Some of the most commonly used well-known ports include:
Port 20, 21: FTP (File Transfer Protocol)
o Port 20: FTP Data
o Port 21: FTP Control
Port 22: SSH (Secure Shell)
o Used for secure remote login and command execution.
Port 23: Telnet
o Used for unencrypted text-based communication over a
network.
Port 25: SMTP (Simple Mail Transfer Protocol)
o Used for sending emails.
Port 53: DNS (Domain Name System)
o Used for domain name resolution.
Port 80: HTTP (Hypertext Transfer Protocol)
o Used for web traffic (websites).
Port 110: POP3 (Post Office Protocol 3)
o Used for retrieving emails from a mail server.
18. What is Metasploit? Explain payload types in short
Metasploit (from above)
A payload refers to the part of malware which performs a
malicious action. In the analysis of malicious software such as
worms, viruses and Trojans, it refers to the software's harmful
results. A payload in Metasploit refers to an exploit module. There
are three different types of payload modules in the Metasploit
Framework: Singles, Stagers, and Stages. These different types
allow for a great deal of versatility and can be useful across
numerous types of scenarios.
Examples of payloads include data destruction, messages with
insulting text or spam e-mail messages sent to a large number of
people.
Singles:- Singles are payloads that are self-contained and
completely standalone. A Single payload can be something as
simple as adding a user to the target system or running calc.exe.
These kinds of payloads are self-contained, so they can be caught
with non-metasploit handlers such as netcat.
Stagers:- Stagers setup a network connection between the
attacker and victim and are designed to be small and reliable. It is
difficult to always do both of these well so the result is multiple
similar stagers. Metasploit will use the best one when it can and
fall back to a less-preferred one when necessary.
Stages:- Stages are payload components that are downloaded by
Stagers modules. The various payload stages provide advanced
features with no size limits such as Meterpreter, VNC Injection,
and the iPhone ‘ipwn’ Shell.
19. What is Nmap? Explain different functionality with its command
in detail.(same as 8)
Functionality with commands:-
1. Scan a Range of IP Address: To scan a range of IP addresses, the
Nmap command is as follows:
nmap 192.168.1.1-24
2. Port Scanning: There are multiple commands in Nmap for scanning
ports such as:
To scan TCP port 80, the following Nmap command can be used:
nmap -p T:80 192.168.1.1
3. Ping Scan Using Nmap: It can be used for host discovery and the
following command can be used:
nmap -sP 192.168.1.1/20
4. Saving the Nmap Scan Output to a File: The syntax for the
command to save the Nmap output to a text file is as follows:
nmap 192.168.1.1 > op.txt
5. Most Popular Ports Scanning: The most popular TCP ports can be
scanned using TCP SYN scan and the following command exists for
this purpose:
nmap -sS 192.168.1.1
imp question answers:-
1.What is Metasploit? write differences between payload &
exploits.
Metasploit is a popular open-source framework used for developing,
testing, and executing exploits against a target system to identify
security vulnerabilities. It is commonly used by penetration testers
and security researchers to simulate attacks, detect weaknesses in
systems, and improve security measures. Metasploit offers various
tools and modules for exploit development, payload delivery, and
post-exploitation tasks.
Key Components of Metasploit:
Exploits: Prebuilt or custom code that takes advantage of
vulnerabilities in a system.
Payloads: Code executed after an exploit successfully gains
access to the system.
Auxiliary Modules: Tools used for scanning, enumeration, and
other non-exploitative tasks.
Encoders: Used to obfuscate payloads to avoid detection by
security software.
Difference Between Payload and Exploit:
Feature Exploit Payload
A payload is the code
An exploit is code that executed on the target system
takes advantage of a after the exploit successfully
specific vulnerability to breaches the system. It
Definition
gain unauthorized access defines what actions are
to a system or execute performed (e.g., opening a
arbitrary commands. reverse shell, downloading
files).
To breach a system's To specify what to do once
Purpose defenses by exploiting access to the system is
known vulnerabilities. obtained.
The first stage that The second stage, where
Role in delivers and executes the actual actions or commands
Attack payload on the target are executed on the
system. compromised machine.
A buffer overflow exploit
A reverse shell that connects
Example targeting a vulnerable
back to the attacker’s system.
service.
Exploit triggers the Payload executes after the
Interaction
payload. exploit is successful.
Types Exploits vary based on the Payloads can be either single-
vulnerability they target use (e.g., immediate action)
(e.g., remote, local, web- or staged (executing a series
Feature Exploit Payload
based). of actions).
In summary, the exploit is responsible for breaching the system, and
the payload determines what is done after the system is
compromised.
2.Write short notes on Tcpdump and Windump.
Tcpdump is one of the most widely used packet capture and analysis
tools in UNIX-like systems such as Linux, macOS, and BSD. It operates
from the command line and allows network administrators, security
experts, and developers to capture network packets and analyze
network traffic at a very granular level. Tcpdump gives insights into
the data being transmitted over the network, which is useful for
troubleshooting network issues, detecting security vulnerabilities,
and performance monitoring.
Key Features of Tcpdump:
Real-time packet capture: Tcpdump captures packets as they
are transmitted and received on the network interface in real-
time.
Detailed protocol analysis: It decodes various network
protocols such as IP, TCP, UDP, ICMP, and HTTP, allowing deep
inspection of the traffic.
Filtering: Tcpdump uses Berkeley Packet Filter (BPF) syntax,
which allows users to filter captured traffic. This helps to focus
on specific traffic, such as packets to or from a particular IP
address, a specific port, or a particular protocol.
o Example: To capture only TCP traffic, the filter would be:
tcpdump tcp
Packet saving: Tcpdump allows saving captured packets in
a .pcap file format, which can be analyzed later using tools like
Wireshark.
o Example: Save packets to a file:
tcpdump -w capture.pcap
Offline analysis: Captured files can be read and analyzed later
without the need to stay connected to the network.
o Example: Read a previously saved capture file:
tcpdump -r capture.pcap
Network performance: Tcpdump is very lightweight and
doesn't add significant overhead to the network or the machine
on which it's running.
Windump is the Windows counterpart of Tcpdump, providing similar
functionality in capturing and analyzing network traffic on Windows
platforms. It is built on top of WinPcap, a Windows library that
facilitates low-level network packet capture and filtering. Windump
has become a standard packet analyzer for Windows, widely used by
network administrators and security experts for diagnosing and
analyzing network traffic.
Key Features of Windump:
Packet capture and filtering: Like Tcpdump, Windump captures
all the traffic flowing through a network interface and allows
users to filter specific traffic using BPF syntax.
o Example: To capture HTTP traffic on a Windows system:
windump tcp port 80
WinPcap integration: Windump requires WinPcap (Windows
Packet Capture Library) to capture packets. WinPcap provides
low-level access to the network stack and enables packet
filtering, traffic capture, and traffic injection.
Command-line operation: Windump is a command-line tool,
making it lightweight and scriptable. This allows it to be
integrated into various automated network monitoring and
intrusion detection systems.
Pcap format: Captured data can be stored in .pcap format,
which is compatible with other packet analysis tools like
Wireshark.
o Example: Save captured data to a file:
windump -w output.pcap
Cross-platform compatibility: Since Windump produces the
same .pcap files as Tcpdump, users can easily share capture files
between different operating systems for analysis.
3.write short note on nmap and netcat.
Nmap (Network Mapper)
Nmap is a powerful and flexible open-source tool used for network
exploration, security auditing, and vulnerability detection. It enables
network administrators, security professionals, and penetration
testers to scan and map network infrastructures, identify active
hosts, and discover open ports along with the services running on
them. Nmap is highly regarded for its efficiency in both large-scale
network scanning and targeted analysis of individual systems.
Key Features of Nmap:
1. Host Discovery:
o Nmap is commonly used to discover devices on a
network, determining which systems are active and
reachable. It does this by sending various types of probe
packets, such as ICMP (ping), TCP, and UDP packets, to
identify responsive hosts.
o Example: A basic network scan for active devices:
nmap -sn 192.168.1.0/24
2. Port Scanning:
o Nmap can determine which network ports on a host are
open and what services are running on those ports. It
identifies whether services like HTTP (port 80), FTP (port
21), or SSH (port 22) are accessible. This information is
crucial for understanding what is running on a target
system and identifying potential vulnerabilities.
o Example: To scan for open ports on a specific IP address:
nmap 192.168.1.10
3. Service and Version Detection:
o Nmap goes beyond identifying open ports by determining
the services running on those ports and their software
versions. This allows network administrators to pinpoint
specific software applications running on servers, such as
web servers, databases, or email servers.
o Example: Scanning to detect services and versions:
nmap -sV 192.168.1.10
4. Operating System Detection:
o Nmap uses TCP/IP stack fingerprinting to guess the
operating system of the target device. By analyzing
various characteristics of packet responses, it can provide
detailed information about the OS version and
architecture.
o Example: To detect the OS running on a target:
nmap -O 192.168.1.10
5. Network Mapping:
o Nmap can be used to create detailed maps of network
structures. This helps administrators visualize network
topology and identify potential bottlenecks,
misconfigurations, or unauthorized devices on the
network.
Netcat:-