0% found this document useful (0 votes)
32 views13 pages

Shibam Pandit Webtech Assignment 4

Uploaded by

Uddipto Jana
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)
32 views13 pages

Shibam Pandit Webtech Assignment 4

Uploaded by

Uddipto Jana
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
You are on page 1/ 13

1.

A spoofing attack is a type of cyberattack where a malicious entity impersonates a legitimate


user or device to gain unauthorized access or deceive systems or individuals. The goal of
spoofing is often to trick a victim into disclosing sensitive information or to exploit the trust of a
legitimate source.

● Types of Spoofing Attacks:


(i) IP Spoofing: The attacker falsifies the IP address of the source in a packet to make it
appear as though it is coming from a trusted IP address.
(ii) Email Spoofing: The attacker forges the sender's email address to make it look as if
the email is coming from a trusted source.
(iii) DNS Spoofing: Also known as DNS cache poisoning, this attack involves
manipulating DNS records to redirect a victim’s traffic to malicious websites.
(iv) ARP Spoofing: The attacker sends false Address Resolution Protocol (ARP)
messages to associate their MAC address with the IP address of another device, allowing them
to intercept or alter network traffic.
(v) Website Spoofing: Involves creating a fraudulent website that looks like a legitimate
one to trick users into entering sensitive information, such as login credentials.


A Denial of Service (DoS) attack aims to overwhelm a system, service, or network
resource, making it unavailable to legitimate users. This is typically achieved by flooding the
target with an excessive amount of traffic, consuming resources, or exploiting vulnerabilities.


SYN Flood Attack: This is a specific type of DoS attack where the attacker sends a
large number of SYN (synchronize) requests to a target server with a fake or unreachable
source IP address. The server allocates resources to each connection request, but because the
IP address is fake or unreachable, the server cannot complete the handshake, leading to a
depletion of system resources. This prevents legitimate users from accessing the service,
causing a denial of service.

2.

A packet filtering firewall is a security device or software that monitors and controls incoming
and outgoing network traffic based on predetermined security rules. It filters packets based on
criteria like IP addresses, ports, protocols, and packet states, ensuring that only valid packets
are allowed to pass through.

Working Principle:
(i) Packet Inspection: The firewall inspects each packet of data sent over the network.
(ii) Rules Matching: The firewall compares the packet against a set of predefined rules
(e.g., IP addresses, port numbers, protocols).
(iii) Decision Making: Based on the matching criteria, the firewall either:
Allows the packet if it meets the rule.Blocks the packet if it does not meet the rule or if it is
deemed malicious.
(iv) Stateless Filtering: Traditional packet filtering is stateless, meaning it does not track
the state of a connection. Each packet is treated in isolation.
This firewall type is relatively fast, but it doesn't offer deep inspection like more advanced
firewalls (stateful or application-layer firewalls).

Transport mode Tunnel mode

(i) Only the payload (data) of the IP packet is (i) The entire IP packet (both header and
encrypted, not the header. payload) is encrypted and encapsulated
within a new IP packet.

(ii) Typically used for end-to-end (ii) Often used in site-to-site communication
communication between hosts (e.g., between (e.g., connecting two networks) and for
two computers). VPNs.

(iii) The original IP header remains intact, so (iii) The original IP header is hidden, and a
the intermediate routers can still read the new header is added, making it more secure
routing information. for communication across public networks.

(iv) Generally faster than tunnel mode (iv) Slightly slower than transport mode due
because only the payload is encrypted. to the additional overhead of encrypting and
encapsulating the entire packet.


A brute force attack is a method used by attackers to gain access to a system, account,
or encrypted data by systematically trying all possible combinations of passwords or encryption
keys until the correct one is found.

3.

A Man-in-the-Middle (MITM) attack occurs when an attacker intercepts and potentially alters the
communication between two parties without their knowledge. The attacker positions themselves
between the sender and the receiver, allowing them to eavesdrop on or manipulate the data
being exchanged.

Example of MITM Attack:


Scenario: Alice sends a confidential email to Bob. However, an attacker, Mallory, intercepts the
communication between Alice and Bob (for instance, by compromising a public Wi-Fi network or
using ARP spoofing). Mallory can read, alter, or inject malicious content into the message
without Alice or Bob knowing.

Process:
Alice sends her message (unencrypted).
Mallory intercepts the message.
Mallory either:
Alters the message content (e.g., changes a bank account number).
Eavesdrops on the message to gain sensitive information.
Mallory forwards the altered or original message to Bob, who receives it, unaware that the
message has been tampered with.

Preventing MITM:
Use SSL/TLS encryption (for example, HTTPS) to ensure the confidentiality and integrity of the
communication.
Use digital signatures to verify the authenticity of the sender.


Both worms and viruses are types of malicious software (malware), but they have
distinct characteristics.

Worm:
(i) Self-Replicating: A worm is a type of malware that can self-replicate and spread
independently, often without needing a host file.
(ii) Propagation: Worms typically spread through network vulnerabilities or by exploiting
flaws in software. They do not need user interaction to spread.
Example: The Conficker worm infected millions of computers by exploiting a vulnerability
in Windows, spreading itself across the network.

Virus:
(i) Requires Host: A virus attaches itself to an existing executable file or program and
relies on the user to execute the infected file to spread.
(ii) Spread Mechanism: Unlike worms, viruses need the assistance of users (e.g., by
opening an infected email attachment or downloading an infected file) to propagate.
Example: A Trojan horse virus that hides inside a legitimate-looking program. Once the
user runs the program, the virus executes and spreads.

Key Differences:
(i) Replication: Worms are self-replicating and do not need a host, whereas viruses
attach to files and need user action to spread.
(ii) Transmission: Worms primarily spread via networks, while viruses spread via infected
files or programs.
(iii) Impact: Worms can spread rapidly and cause widespread network congestion, while
viruses often depend on human action and might corrupt or delete data.


A VPN is a technology that creates a secure, encrypted connection over the internet or a
private network, enabling users to send and receive data as if they were directly connected to a
private network. It helps ensure that the communication is private, protected from
eavesdropping, and can hide the user's real IP address.

Importance of VPN
(i) Security: VPNs protect data from being intercepted when using public networks, such
as Wi-Fi in cafes or airports. The encryption ensures that even if data is intercepted, it remains
unreadable.
(ii) Privacy: VPNs hide your actual IP address, making your online activities harder to
track. This enhances your privacy by masking your browsing habits from websites and online
services.
(iii) Access Restricted Content: VPNs can help users bypass geographical restrictions
and access content that is limited to specific regions. By connecting to a server in a different
location, users can appear to be browsing from that country, enabling access to region-specific
services (e.g., streaming platforms like Netflix or Hulu).
(iv) Remote Work: VPNs are commonly used by organizations to provide employees with
secure access to their internal network and resources while working remotely.
(v) Bypass Censorship: In countries with strict internet censorship, VPNs allow users to
access blocked websites and services by routing their traffic through servers in countries with no
restrictions.

4.

DNS Spoofing (also known as DNS Cache Poisoning) is a type of attack where an attacker
manipulates or corrupts the DNS (Domain Name System) cache of a resolver, redirecting traffic
from legitimate websites to malicious ones. The attacker poisons the DNS cache with incorrect
IP address mappings, making the victim's system resolve a domain to the wrong IP address,
thus enabling them to steal sensitive information or inject malware.

Example of DNS Spoofing:


(i) Normal DNS Resolution: When a user types www.example.com into their browser,
their computer sends a request to a DNS server to resolve the domain to an IP address.
The DNS server responds with the correct IP address of the website.
(ii) DNS Spoofing Attack:The attacker compromises a DNS server or a local DNS
cache (such as on the user's computer or a router).
The attacker sends a fake DNS response with a false IP address for www.example.com.
The DNS server caches this false response. Now, when the user types www.example.com
again, the attacker’s malicious IP address is returned, and the user is redirected to a fake
website controlled by the attacker, potentially leading to phishing or malware downloads.

Protection against DNS Spoofing:


(i) Use DNSSEC (DNS Security Extensions), which ensures the integrity of DNS
responses through digital signatures.
(ii) Regularly clear DNS caches and use trusted DNS servers.

Circuit Gateway Application Gateway

(i) Operates at the transport layer (Layer 4) of (i) Operates at the application layer (Layer 7)
the OSI model. of the OSI model.

(ii) A circuit gateway acts as a proxy server (ii) An application gateway inspects and filters
that establishes a virtual circuit between two traffic based on application-level protocols,
endpoints. It works by monitoring the such as HTTP, FTP, or SMTP. It acts as an
connection and relaying data between clients intermediary between a client and the
and servers, essentially functioning as a application server, analyzing the content of
"middleman." the data exchanged to determine whether it
should be allowed or blocked.

(iii) The circuit gateway doesn't inspect the (iii) The application gateway understands the
content of the communication; it simply specific protocols it handles and can make
forwards the traffic based on the session detailed filtering decisions based on
(connection) characteristics, such as port application-specific data, such as HTTP
numbers and IP addresses. request headers or FTP commands.

(iv) It's often used for handling protocols that (iv) Typically used to secure web traffic
establish end-to-end connections, like TCP. (HTTP/HTTPS), email traffic (SMTP), or FTP
traffic by inspecting and filtering the content.


NAT (Network Address Translation) is a technique used to modify the source or
destination IP addresses of packets as they pass through a router or firewall. NAT is typically
used to allow multiple devices within a private network to share a single public IP address for
accessing the internet.

Example of NAT:

● Private Network Setup:


In a local network, devices have private IP addresses that are not routable on the public internet
(e.g., 192.168.1.2, 192.168.1.3).
These devices need to communicate with websites and services on the internet, which require
public IP addresses.
● NAT Translation Process:
Outgoing Request: When the device with IP address 192.168.1.2 wants to access a website, it
sends the request to the router.
The router has a public IP address (e.g., 203.0.113.5), and NAT modifies the source IP address
of the outgoing packet from 192.168.1.2 to 203.0.113.5. The router also keeps a translation
table to map 203.0.113.5 back to 192.168.1.2 when the response comes.
● Receiving Response:
The web server responds to the public IP address 203.0.113.5.
The router receives the response and uses its NAT table to translate the destination address
back to the internal private address (192.168.1.2), and then forwards the response to the correct
device on the local network.
● Many Devices Sharing One IP:
Multiple devices (e.g., 192.168.1.2, 192.168.1.3, etc.) on the internal network can send requests
to the internet, but all of them will appear to the outside world as coming from 203.0.113.5 (the
public IP). The router tracks which request corresponds to which device using its translation
table (via port numbers or other methods).

Types of NAT:
(i) Static NAT: Maps a specific private IP address to a specific public IP address.
Dynamic NAT: Maps a private IP address to a public IP address from a pool of available public
addresses.
(ii) PAT (Port Address Translation): Often called "overloading," PAT maps multiple private
IP addresses to a single public IP address but uses different port numbers to differentiate
between connections.

Benefits of NAT:
(i) Conserves public IP addresses.
(ii) Adds a layer of security by hiding internal IP addresses from the public internet.
(iii) Simplifies the network configuration for local devices accessing external resources.

5.

A firewall is a network security device or software that monitors and controls incoming and
outgoing network traffic based on predetermined security rules. Its primary purpose is to
establish a barrier between a trusted internal network and untrusted external networks, such as
the internet.

Types of Firewall Configurations

(i) Packet Filtering Firewall:


Description: Filters traffic at the network layer by examining the source and destination
addresses, ports, and protocols.
Diagram:
[Internal Network] ---- [Packet Filtering Firewall] ---- [External Network]

(ii) Stateful Inspection Firewall:


Description: Tracks the state of active connections and makes decisions based on the context of
the traffic, not just individual packets.
Diagram:
[Internal Network] ---- [Stateful Inspection Firewall] ---- [External Network]

(iii) Proxy Firewall (Application-Level Gateway):


Description: Acts as an intermediary between users and the internet, filtering traffic at the
application layer.
Diagram:
[Internal Network] ---- [Proxy Firewall] ---- [External Network]

(iv) Next-Generation Firewall (NGFW):


Description: Combines traditional firewall functionality with advanced features like application
awareness, intrusion prevention, and SSL decryption.
Diagram:
[Internal Network] ---- [Next-Generation Firewall] ---- [External Network]

(v) Network Address Translation (NAT) Firewall:


Description: Hides internal IP addresses by translating them into a single public IP address,
providing an extra layer of security.
Diagram:
[Internal Network] ---- [NAT Firewall] ---- [External Network]


The SSL Alert Protocol is part of the SSL/TLS (Secure Sockets Layer / Transport Layer
Security) protocol suite, and its primary purpose is to provide a way for endpoints in a secure
connection to notify each other about errors, warnings, or other important events that could
affect the secure communication.

Key Functions of SSL Alert Protocol:


(i) Error Notification: It alerts the communication parties when an error occurs during the
SSL/TLS handshake or while establishing a secure connection. For example, an error like
certificate verification failure or unsupported protocol version.
(ii) Warnings: It sends warnings when issues are detected that don't immediately break
the connection but might affect security. For example, warnings about expired certificates.
(iii) Connection Termination: It signals if there is a need to terminate a connection due to
a critical error (e.g., decryption failure or protocol violation).

SSL Alert Levels:


Warning Alerts: These indicate non-critical issues that may not cause immediate
termination of the connection, such as expired certificates or unsupported cipher suites.
Fatal Alerts: These indicate critical errors that result in the termination of the SSL/TLS
session, such as protocol version mismatches or invalid messages.

Example of SSL Alert:


Alert Level: Fatal
Alert Description: “HandShakeFailure”
Cause: This might occur if the client and server cannot agree on a common protocol version
during the SSL handshake.

6.

Packet filtering routers are the first line of defense in network security. However, they are
vulnerable to certain types of attacks. Here are some common attacks and their respective
countermeasures:

1. IP Spoofing Attack
Attack: In an IP spoofing attack, an attacker sends packets with a forged source IP
address, making it appear as though they are coming from a trusted source. The goal is to
bypass the packet filter by impersonating a legitimate IP address.
Countermeasure: Implement Ingress Filtering to prevent packets with invalid or unusual
source addresses from entering the network. Egress Filtering can also be applied to ensure that
only packets with legitimate internal source addresses leave the network.
2. Tiny Fragment Attack
Attack: In this attack, attackers fragment IP packets into tiny pieces to split the packet
header across multiple fragments. The goal is to bypass packet filters that only inspect the first
fragment of a packet, as the filter may not reassemble the fragments for inspection.
Countermeasure: Configure the packet filtering router to drop unusually small packets or
reassemble fragmented packets before filtering. This prevents fragmented attacks by ensuring
the complete packet is analyzed before being forwarded.
3. Source Routing Attack
Attack: Source routing allows the sender to specify the route that a packet should take
through the network. Attackers can use source routing to direct packets through specific routers
to bypass packet filters.
Countermeasure: Disable source routing on routers to prevent this attack. Most modern
routers have source routing disabled by default as a security best practice.
4. Denial of Service (DoS) Attack
Attack: Attackers flood the router with a high volume of packets to exhaust its resources,
causing it to become overwhelmed and unable to process legitimate traffic.
Countermeasure: Implement rate limiting and throttling to control the number of packets
the router processes from a single IP address. Use Intrusion Detection Systems (IDS) to detect
and mitigate DoS attacks in real time.
5. Ping of Death
Attack: In this attack, the attacker sends oversized packets or improperly fragmented
ICMP packets to cause buffer overflows or crashes on the target system.
Countermeasure: Configure packet filters to block large or malformed packets. Modern
firewalls and routers typically have built-in protections against oversized packets and malformed
ICMP messages.


The SSL Record Protocol is responsible for providing confidentiality and integrity for data
transmitted between a client and server in SSL/TLS connections. It operates at a lower layer
within the SSL/TLS protocol suite, encapsulating higher-layer protocols and protecting their
data.

Functions of the SSL Record Protocol:


Fragmentation: The application data is divided into manageable chunks called records
(typically 16KB or less), which are then processed individually.
Compression (optional): Each record may be compressed to reduce its size before
encryption. However, compression is optional and often disabled to mitigate specific attacks like
CRIME.
Message Integrity: The protocol uses a Message Authentication Code (MAC) to ensure
data integrity. A MAC is calculated for each record using a shared secret key, and this MAC is
appended to the data before encryption. This helps verify that the data has not been altered in
transit.
Encryption: After adding the MAC, each record is encrypted using the encryption
algorithm negotiated during the SSL/TLS handshake (e.g., AES or DES). This ensures
confidentiality, as the encrypted data cannot be read by unauthorized parties.
Transmission: The encrypted records are then transmitted to the recipient. On the
recipient’s side, the SSL Record Protocol decrypts the data, verifies the MAC for integrity,
decompresses (if necessary), and reassembles the application data.


Non-repudiation is a security concept that ensures that a party in a digital communication
cannot deny the authenticity of their actions, such as sending a message, signing a document,
or making an online transaction. Non-repudiation is achieved through mechanisms like digital
signatures and transaction logs, which serve as evidence that a specific action was performed
by a specific user.
Purpose of Non-Repudiation:
(i) Accountability: Non-repudiation provides proof of an action, which holds individuals
accountable for actions taken in digital transactions.
(ii) Legal Compliance: In legal contexts, non-repudiation is essential to ensure that a
party cannot dispute having committed to a contract, transaction, or communication.
(iii) Secure Communication: It protects both parties by preventing denial of participation
in a transaction or communication, building trust between communicating parties.
Example: In online banking, when a user authorizes a transaction with a digital signature,
non-repudiation ensures that they cannot deny having authorized the transaction later. The
digital signature serves as proof that the transaction was approved by the user.

7.

SSL (Secure Sockets Layer), or its modern version TLS (Transport Layer Security), is placed
between the application layer and the transport layer in the OSI model because it is responsible
for securing data transmission between applications over the network. By sitting between these
two layers, SSL can —
(i) Provide Encryption and Integrity: SSL ensures that all data passed from the
application layer (like HTTP, FTP) to the transport layer (TCP) is encrypted, maintaining
confidentiality and integrity before it reaches the network.
(ii) Remain Application-Independent: SSL operates below the application layer, which
means it can secure data for any application protocol (e.g., HTTP, SMTP) without requiring
modifications to the applications themselves. Any application that utilizes the SSL/TLS libraries
can benefit from secure communication.
(iii) Leverage Transport Layer Protocols: SSL relies on TCP, a reliable,
connection-oriented protocol, for data transport. By using the transport layer, SSL benefits from
TCP’s reliable delivery mechanisms, providing a stable foundation for secure data transmission.
This placement allows SSL to secure a wide range of internet applications by encrypting
data before it is passed to the transport layer and sent across the network.


Application-Level Gateways (also known as proxy firewalls) work at the application layer
of the OSI model. They inspect and filter traffic based on specific application-level protocols, like
HTTP or FTP.

Advantages:
(i) Granular Security Control: Application-level gateways can filter traffic based on
specific application-layer protocols, allowing for fine-grained control and filtering of requests.
This enables blocking of malicious or unwanted content (e.g., certain URLs or FTP commands).
(ii) Enhanced Protection Against Malware: By inspecting the content of messages,
application-level gateways can detect and block viruses, malware, and other threats within the
data payload, making them highly effective against application-level attacks.

Drawbacks:
(i) Performance Overhead: Application-level gateways are slower than other types of
firewalls (like packet-filtering firewalls) because they inspect the content of each packet at the
application layer, which requires more processing.
(ii) Complex Configuration and Maintenance: Configuring an application-level gateway
can be more complex, as each protocol might need custom rules or configurations. This
complexity also increases maintenance requirements and troubleshooting efforts.


The SSL Handshake Protocol is responsible for establishing a secure session between a
client and a server. This protocol sets up encryption and authentication parameters before any
data is exchanged. The SSL handshake follows these main steps:
(i) Client Hello: The client initiates the handshake by sending a "Client Hello" message
to the server. This message includes the client’s supported SSL/TLS version, a list of supported
cipher suites (encryption algorithms), a random number, and other connection parameters.
(ii) Server Hello: The server responds with a "Server Hello" message. It chooses the
SSL/TLS version and cipher suite from the list provided by the client, generates a random
number, and sends its digital certificate for authentication.
(iii) Server Certificate and Key Exchange:
Certificate: The server sends its digital certificate, which includes its public key and identifies the
server.
Key Exchange (optional): In some cases, the server may also send an additional key exchange
message (for Diffie-Hellman or other protocols).
Server Hello Done: The server sends a “Server Hello Done” message, signaling the end of its
part of the handshake.
(iv) Client Key Exchange: The client generates a pre-master secret (a random number
used to derive the encryption keys) and encrypts it with the server’s public key from the
certificate. This encrypted pre-master secret is sent to the server. Both the client and server will
use this secret to independently generate the session keys.
(v) Finished Messages:
Client Finished: The client sends a "Finished" message to indicate that it is ready for secure
communication. This message is encrypted using the session key.
Server Finished: The server responds with its own "Finished" message, also encrypted. This
exchange confirms that both parties are ready, and secure communication can now begin.
At the end of this handshake, both client and server have established a session key that is used
to encrypt data for the duration of the session.

8.

Phishing:

Phishing is a type of social engineering attack where attackers attempt to trick individuals into
providing sensitive information, such as usernames, passwords, credit card numbers, or other
personal data. This is usually done by masquerading as a trustworthy entity in an email,
message, or website that appears legitimate. Phishing attacks often involve:
(i) Fake Emails or Messages: Emails that appear to be from reputable sources (e.g.,
banks, social media platforms) requesting the user to log in, verify their identity, or update
account information.
(ii) Spoofed Websites: Links in phishing messages may lead to websites that closely
mimic legitimate sites, prompting users to enter sensitive information.

● Countermeasures:
(i) Avoid clicking on links in unsolicited emails.
(ii) Verify the authenticity of the sender.
(iii) Use anti-phishing filters and security software.

Trojan Horse

A Trojan Horse, or simply Trojan, is a type of malicious software that disguises itself as a
legitimate program or file to trick users into installing it. Once installed, a Trojan can execute
harmful activities, such as stealing data, monitoring user activity, or providing unauthorized
access to the attacker. Trojans do not replicate like viruses or worms but are often downloaded
through deceptive means.
Types of Trojans —
(i) Backdoor Trojans: Allow attackers remote control of the infected system.
(ii) Spyware Trojans: Collect sensitive information, such as keystrokes and passwords.
(iii) Banking Trojans: Target financial information by mimicking bank interfaces.

● Countermeasures:
(i) Avoid downloading files or software from untrusted sources.
(ii) Use updated antivirus software to detect and block Trojans.
(iii) Regularly update applications and operating systems to patch vulnerabilities.

Pharming

Pharming is an attack that redirects a website’s traffic to a malicious website, often to steal
personal information. Unlike phishing, which requires tricking individual users, pharming can
affect multiple users at once by poisoning DNS entries or compromising a website’s host file,
which then redirects users to a fake site.
How Pharming Works —
(i) DNS Poisoning: The attacker corrupts DNS servers, causing users attempting to
access legitimate sites to be redirected to fraudulent ones.
(ii) Host File Manipulation: Attackers modify the host files on a victim’s computer,
redirecting requests for legitimate websites to malicious sites.

● Countermeasures:
(i) Use secure DNS services to detect and prevent DNS poisoning.
(ii) Regularly scan and update antivirus software.
(iii) Be vigilant for any unusual website behavior, such as altered URLs or unfamiliar site
certificates.

Active Attacks

Active Attacks involve direct interaction with the target system or network with the intent to alter,
intercept, or disrupt the system’s operations. Unlike passive attacks (e.g., eavesdropping),
which only involve listening to information, active attacks can manipulate data or cause a
system to behave unexpectedly.
Types of Active Attacks —
(i) Modification of Messages: Intercepting and altering data in transit.
Masquerade: Impersonating a legitimate user to gain unauthorized access.
(ii) Denial of Service (DoS): Overloading a network or system to disrupt its functionality.
Replay Attacks: Capturing and reusing valid data transmissions to deceive the system.

● Countermeasures:
(i) Use encryption to protect data integrity and confidentiality.
(ii) Implement strong authentication and authorization mechanisms.
(iii) Deploy Intrusion Detection Systems (IDS) to detect and respond to suspicious
activities in real time.

You might also like