CSS Answer Bank (Repeated Qns Only)
CSS Answer Bank (Repeated Qns Only)
5 times
4 times
3 times
2 times
1 time
# indicates 5-mark question
CSS Question Bank
1.Introduction - Number Theory and Basic Cryptography
1. Give examples of replay attacks. List three general approaches for dealing with replay
attack. #
2. Encrypt given string using Playfair cipher.
Previously asked strings:
i. “ALL THE BEST” using “DOCUMENT” .
ii. “The key is hidden under the door” using “domestic”.
3. Define non-repudiation and authentication. Show with example how it can be achieved. #
4. State the rules for finding Euler’s phi function. Calculate:
a. φ(11)
b. φ(49)
c. φ(240)
d. φ(10)
e. φ(343)
5. Explain the relationship between Security Services and Mechanisms in detail. #
2. Symmetric and Asymmetric key Cryptography and key Management
1. Discuss DES with reference to following points:
i. Block size and key size
ii. Need of expansion permutation
iii. Role of S-box
iv. Weak keys and semi weak keys
v. Possible attacks on DES
2. Explain Kerberos in detail.
3. Explain Di ie Hellman key agreement algorithm. Also discuss the possible attacks on it. #
4. Numerical on Di ie Hellman key exchange algorithm.
5. Elaborate the steps of key generation using the RSA algorithm #
6. Numerical on RSA algorithm.
7. Explain the di erent modes of block ciphers. (ECB and CBC asked twice) #
8. Explain Advanced Encrypted Standards (AES) in detail.
3. Cryptographic Hash Functions
1. Explain properties of secure hash function. #
2. Explain secure hash algorithm on 512 bits. #
3. Di erentiate between SHA-1 and MD5. #
4. What is need for message authentication? List various techniques used for message
authentication. Explain any one of them.
6. System Security
1. Explain bu er overflow attack. #
1 2 3 4 5 6
2024 Dec 15 45 15 10 35 0
2024 May 15 45 15 15 30 5
2023 Dec 15 45 30 0 35 0
2023 May 20 35 10 15 40 5
2022 Dec 15 35 5 20 40 10
Last 5 Avg 15 40 15 15 35 5
*2022 May 15 30 15 10 25 10
Total 95 235 70 90 205 30
Asked once:
1.Introduction - Number Theory and Basic Cryptography
1. List and explain various types of attacks on encrypted message. #
2. Explain Euclidian Algorithm. #
3. Use Hill cipher to encrypt the text “short”. The key to be used is hill.
4. Explain with examples keyed and keyless transposition cipher. #
6. System Security
1. Explain worms and viruses. #
2. Write a short note on: SQL injection. #
3. List various Software Vulnerabilities. How vulnerabilities are exploited to launch an attack. #
CSS Answer Bank
multiple times asked questions highlighted
# indicates 5-mark question
1.Introduction - Number Theory and Basic Cryptography
1. Give examples of replay attacks. List three general approaches for dealing with replay
attack. #
Replay Attacks – Examples:
1. Network Login Replay:
o An attacker captures a legitimate user's login request (e.g., username and encrypted
password or token) and re-sends it later to gain unauthorized access.
2. Secure Shell (SSH) Replay:
o A previously recorded SSH session is replayed by an attacker to execute commands
on a server as if they were the original user.
3. Payment Gateway Replay:
o An attacker intercepts a payment transaction (like a mobile payment request) and
resends it to make unauthorized purchases.
Three General Approaches to Prevent Replay Attacks:
1. Use of Nonces:
o A nonce is a unique, random number added to each message. Servers track recent
nonces and reject reused ones.
2. Timestamping:
o Each message is time-stamped, and the receiver checks whether the timestamp is
within an acceptable time window.
3. Session Tokens or One-Time Passwords (OTPs):
o Tokens or OTPs are generated for a single session or transaction and become invalid
after one use.
2. Encrypt given string using Playfair cipher. PYQs:
i. “The key is hidden under the door” using “domestic”.
ii. “ALL THE BEST” using “DOCUMENT” .
i.
3. Define non-repudiation and authentication. Show with example how it can be achieved. #
Non-Repudiation:
Non-repudiation ensures that a sender cannot deny having sent a message and a receiver
cannot deny having received it.
It provides proof of origin and integrity of the data.
Authentication:
1. Data Confidentiality
Goal: Ensure that data is only accessible to authorized users.
Mechanisms:
o Encipherment: Encrypts the data to make it unreadable to unauthorized parties.
o Routing Control: Prevents data from taking insecure paths where it could be
intercepted.
2. Data Integrity
Goal: Ensure that data has not been altered in transit.
Mechanisms:
o Encipherment: Detects tampering by encrypting and checking for changes.
o Digital Signature: Verifies sender identity and confirms data hasn't been altered.
o Data Integrity Mechanism: Uses checksums or hashes to validate data accuracy.
3. Authentication
Goal: Confirm the identity of communicating parties.
Mechanisms:
o Encipherment: Often combined with secret keys to authenticate.
o Digital Signature: Ensures the sender is who they claim to be.
o Authentication Exchange: Protocols that verify identity through challenges.
4. Non-repudiation
Goal: Prevent sender or receiver from denying a transaction.
Mechanisms:
o Digital Signature: Provides legal proof of message origin.
o Data Integrity: Ensures message was not changed.
o Notarization: Involves a third party to verify transactions.
5. Access Control
Goal: Restrict access to resources only to authorized users.
Mechanism:
o Access Control Mechanism: Uses credentials, roles, and permissions to grant or
deny access.
2. Symmetric and Asymmetric key Cryptography and key Management
6. Discuss DES with reference to following points:
i. Block size and key size
ii. Need of expansion permutation
iii. Role of S-box
iv. Weak keys and semi weak keys
v. Possible attacks on DES
DES (Data Encryption Standard)
DES is a symmetric key encryption algorithm that processes data in fixed-size blocks using a
series of transformations. Below are its key characteristics:
1. Block Size and Key Size
Block Size: 64 bits (operates on 64-bit plaintext blocks).
Key Size: 56 bits (although the input key is 64 bits, 8 bits are used for parity, leaving an
e ective key length of 56 bits).
Rounds: 16 rounds of encryption.
2. Need for Expansion Permutation
DES uses an Expansion Permutation (E-P box) to increase the 32-bit right half of the
plaintext to 48 bits before applying the XOR operation with the subkey.
Purpose:
o Introduces di usion by spreading bits across multiple S-Box inputs.
o Helps in key mixing to make encryption more complex.
3. Role of S-Box
The S-Box (Substitution Box) is the heart of DES.
It takes a 6-bit input and produces a 4-bit output using predefined non-linear mappings.
Purpose:
o Provides confusion, making the relationship between the key and ciphertext
complex.
o Ensures non-linearity, which strengthens security by resisting linear cryptanalysis.
4. Weak Keys and Semi-Weak Keys
Weak Keys:
o Certain keys cause the encryption function to behave identically across rounds,
making DES vulnerable. Four out of 256 possible keys are called weak keys
o Example: If all bits in the key are 0s or 1s, encryption and decryption become
identical.
Semi-Weak Keys:
o There are six key pairs that are called semi-weak keys.
o A semi-weak key creates only two di erent round keys and each of them is repeated
eight times.
5. Possible Attacks on DES
Brute Force Attack:
o Since DES has a 56-bit key, exhaustive search of all possible keys (2⁵⁶) is feasible
with modern computing power.
Linear Cryptanalysis:
o Uses linear approximations of DES operations to find key bits.
Meet-in-the-Middle Attack (on 2DES):
o Reduces the e ective security of Double DES (2DES) from 112-bit security to about
57 bits.
7. Explain Kerberos in detail.
Kerberos is an authentication protocol, and at the same time a KDC. Three servers are involved
in the Kerberos protocol:
• An authentication server (AS),
• A ticket-granting server (TGS),
• A real (data) server that provides services to others.
In our examples and figures, Bob is the real server and Alice is the user requesting service.
Authentication Server (AS):
• The authentication server (AS) is the KDC in the Kerberos protocol.
• Each user registers with the AS and is granted a user identity and a password.
• The AS verifies the user, issues a session key to be used between Alice and the TGS, and
sends a ticket for the TGS.
Ticket-Granting Server (TGS)
• The TGS issues a ticket for the real server (Bob).
• It also provides the session key (KAB ) between Alice and Bob.
• Kerberos has separated user verification from the issuing of tickets.
• In this way, though Alice verifies her ID just once with the AS, she can contact the TGS
multiple times to obtain tickets for di erent real servers.
Real Server:
• The real server (Bob) provides services for the user (Alice).
• Kerberos is designed for a client-server program, such as FTP, in which a user uses the client
process to access the server process.
• Kerberos is not used for person-to-person authentication.
8. Explain Di ie Hellman key agreement algorithm. Also discuss the possible attacks on it. #
(Asked along with numerical)
Solution for I]
Final Answers:
ϕ(N) = 160
Private key D = 23
Cipher Text C = 179
12. Explain the di erent modes of block ciphers. (ECB and CBC asked separately twice) #
1. Electronic Codebook (ECB) mode:
Plaintext is divided into 64-bit blocks.
Each block is independently encrypted using the same key.
Ciphertext is also divided into 64-bit blocks, decrypted one at a time with the same key to
recover plaintext.
Decryption:
1. The first ciphertext block is decrypted using the same key that was used for encrypting all
plain text blocks. The result of decryption is then XORed with the initialization vector (IV) to
obtain the first plain text block.
2. Each ciphertext block is decrypted, then XORed with the previous ciphertext to recover
plaintext. The process repeats for all blocks.
3. Cipher Feedback (CFB) Mode
Encryption:
1. IV is encrypted using the key.
2. Leftmost s bits of encrypted IV
are XORed with the first s-bit
plaintext fragment to get
ciphertext C1.
3. C1 is fed back into the IV,
shifting left by s bits, and the
process repeats for the next
plaintext fragment.
Decryption:
1. IV is encrypted using the same key
(encryption is used for decryption).
2. Leftmost s bits of encrypted IV are
XORed with C1 to retrieve plaintext
P1.
3. C1 is fed back into the IV, and the
process continues for all ciphertext
fragments.
5. Counter Mode
Encryption:
1. The Counter value is encrypted
using the key.
2. The encrypted counter is XORed
with plaintext to get ciphertext.
3. The counter increments for
each block, and the steps
repeat.
Decryption:
1. The Counter value is encrypted
using the same key.
2. The encrypted counter is XORed
with ciphertext to retrieve
plaintext.
The counter increments, and steps
repeat until all blocks are
13. Explain Advanced Encrypted Standards (AES) in detail.
It requires a block size of 128 bits and three di erent key sizes of 128, 192, and 256 bits.
AES is a non-Feistel cipher that encrypts and decrypts a data block of 128 bits.
It uses 10, 12, or 14 rounds.
The key size, which can be 128, 192, or 256 bits, depends on the number of rounds.
The number of round keys generated by the key-expansion algorithm is always one more
than the number of rounds.
Encryption Process
1. Key Expansion:
o The input cipher key (128 bits) is expanded into multiple round keys using a key
schedule.
o Keys W0 to W43 are derived for 11 rounds (0–10).
2. Initial Round:
o AddRoundKey: XOR the plaintext with the first-round key.
3. Rounds 1 to 9 (Each round consists of):
• SubBytes (Substitution):
Replaces each byte using an S-Box to add confusion and make patterns harder to detect.
• ShiftRows (Permutation):
Shifts rows of the matrix to the left to mix data and spread byte influence.
• MixColumns (Mixing):
Mixes data within each column using math in a special field (GF 2⁸) to increase security.
• AddRoundKey (Key Addition):
XORs the state with a round-specific key, making encryption depend on the key.
4. Final Round (Round 10):
o Same as other rounds but no MixColumns.
o Operations: SubBytes → ShiftRows → AddRoundKey.
Decryption Process
1. Key Expansion:
o Uses the same expanded keys in reverse order.
2. Initial Round:
o AddRoundKey using the last round key W40 to W43 .
3. Rounds 1 to 9:
o InvShiftRows: Reverse row shifting.
o InvSubBytes: Reverse byte substitution.
o AddRoundKey: XOR the ciphertext with the round key
o InvMixColumns: Reverse column mixing.
4. Final Round:
o Only InvShiftRows, InvSubBytes, and AddRoundKey.
Advantages of AES
1. Strong Security
AES uses key sizes of 128, 192, or 256 bits, making brute-force attacks infeasible.
2. Fast and E icient
AES is designed to be fast in both hardware and software implementations.
3. Cryptographic Hash Functions
14. Explain properties of secure hash function. #
A cryptographic hash function is a special type of hash function used in security applications.
It takes an input (or message) and returns a fixed-size string of bytes, typically a digest that
appears random. These functions are widely used in data integrity checks, digital signatures,
password storage, and more.
Properties of a Secure Hash Function
1. Deterministic
o The same input always produces the same hash output.
2. Pre-Image Resistance (One-way property)
o Given a hash value h, it should be computationally infeasible to find any input x such
that hash(x) = h.
3. Second Pre-Image Resistance
o Given an input x₁, it should be infeasible to find another input x₂ such that hash(x₁) =
hash(x₂).
4. Collision Resistance
o It should be hard to find any two distinct inputs x₁ and x₂ such that hash(x₁) =
hash(x₂).
5. Avalanche E ect
o A small change in input should drastically change the output hash (bitwise), making
patterns hard to detect.
6. Fast Computation
o The function should quickly compute the hash for any input.
7. Fixed Output Length
o Regardless of input size, the output should be a fixed length (e.g., 128, 256, or 512
bits).
15. Explain secure hash algorithm on 512 bits. #
SHA-512 is part of the SHA-2 family, designed by the NSA and standardized by NIST.
Key Features:
Output Length: 512 bits (64 bytes)
Block Size: 1024 bits
Word Size: 64 bits
Number of Rounds: 80
Working Steps of SHA-512:
1. Padding the Message
o The message is padded to make its length a multiple of 1024 bits (a block size).
Padding includes a 1 bit followed by 0s and the original message length.
2. Parsing the Message
o The padded message is divided into 1024-bit blocks.
3. Initialize Hash Values
o Eight 64-bit words are used as initial hash values (constants defined in the
standard).
4. Message Schedule Preparation
o For each block, 80 64-bit words are prepared using the original message block and
bitwise operations.
5. Compression Function
o Each message block goes through 80 rounds of processing using logical functions
(e.g., AND, XOR), modular additions, and shifts.
6. Update Hash Values
o Intermediate hash values are updated in each round and used for the next block.
7. Final Output
o After processing all blocks, the final 512-bit hash value is produced.
16. Di erentiate between SHA-1 and MD5. #
17. What is need for message authentication? List various techniques used for message
authentication. Explain any one of them.
Need for message authentication:
Message authentication is crucial in communication to ensure that a message:
1. Comes from a legitimate source (authentication)
2. Has not been altered in transit (integrity)
3. Has not been duplicated or replayed
Without message authentication:
Attackers can modify messages without detection (tampering).
Impersonation becomes possible (spoofing).
Messages can be re-sent maliciously (replay attacks).
Message authentication techniques:
Message Authentication Code (MAC)
Hash-based Message Authentication Code (HMAC)
Cipher-based Message Authentication Code (CMAC)
Cipher Block Chaining MAC (CBC-MAC)
Digital Signatures
Technique for message authentication(can do any of the above):
CMAC (Cipher-based Message Authentication Code)
1. The message is divided into N blocks, each m bits long.
2. The size of the CMAC is n bits. If the last block is not m bits, it is padded with a 1-bit
followed by enough 0-bits to make it m bits.
3. The first block of the message is encrypted with the symmetric key to create an m-bit block
of encrypted data.
4. This block is XORed with the next block and the result is encrypted again to create a new
m-bit block.
5. The process continues until the last block of the message is encrypted.
6. The n leftmost bit from the last block is the CMAC.
7. In addition to the symmetric key K, CMAC also uses another key k, which is applied only at
the last step. This key is derived from the encryption algorithm with plaintext of m 0-bits
using the cipher key K.
8. The result is then multiplied by x if no padding is applied and multiplied by x2 if padding is
applied.
4. Authentication Protocols & Digital Signature Schemes
18. Why are digital certificates and signatures required? What is the role of digital signature in
digital certificates?
Need for Digital Certificates:
1. Public Key Verification:
They verify that a public key truly belongs to the individual or organization claiming it.
2. Trusted Communication:
Issued by a Certificate Authority (CA), they help establish trust between parties who have
never met before.
3. Prevent Man-in-the-Middle Attacks:
Without certificates, attackers could pose as someone else by sending a fake public key.
Need for Digital Signatures:
1. Authentication:
Confirms the identity of the sender — the signature proves the message came from the
private key holder.
2. Data Integrity:
Ensures the message was not altered in transit. Even a small change would make the
signature invalid.
3. Non-Repudiation:
The sender cannot deny sending the message since only they possess the private key used
to sign it.
Role of digital signature in digital certificates:
The digital signature plays a crucial role in the functioning and trustworthiness of a digital
certificate. A digital certificate is an electronic document that binds a public key with the identity
of its owner. However, for others to trust that this certificate truly belongs to the claimed entity, it
must be verified and vouched for by a trusted third party—this is where the digital signature
comes in.
When a Certificate Authority (CA) issues a digital certificate, it signs the certificate using its
private key. This digital signature acts as proof that the certificate was indeed issued by the CA
and that the information contained in it—such as the public key, the identity of the owner, and
the validity period—has not been tampered with. Anyone receiving the certificate can verify the
digital signature using the CA’s public key. If the verification succeeds, the recipient knows that
the certificate is authentic and trustworthy.
Without the digital signature, there would be no reliable way to trust that the certificate is
legitimate or has not been altered.
19. Discuss RSA as a digital signature algorithm.
• The RSA idea can also be used for signing and verifying a message.
• The digital signature scheme changes the roles of the private and public keys.
• First, the private and public keys of the sender, not the receiver, are used.
• Second, the sender uses her own private key to sign the document; the receiver uses the
sender’s public key to verify it.
• The signing and verifying sites use the same function, but with di erent parameters.
• The verifier compares the message and the output of the function for congruence. If the result
is true, the message is accepted.
Key Generation
Key generation in the RSA digital signature scheme is exactly the same as key generation in the
RSA cryptosystem.
1. Choose two large prime numbers (p and q)
2. Calculate n = p*q and Φ = (p-1)(q-1)
3. Choose a number e where 1 < e < Φ and it is co-prime to Φ
4. Calculate d = e-1 mod(p-1)(q-1) Or e*d =1 mod Φ
5. Bundle private key pair as (n,d)
6. Bundle public key pair as (n,e)
Signing and Verifying
For signing, Alice creates a signature out of the message using her private exponent,
S = Md mod n and sends the message and the signature to Bob.
For verifying, Bob receives M and S. Bob applies Alice’s public exponent to the signature to
create a copy of the message M’ = Se mod n. Bob compares the value of M’ with the value of M. If
the two values are congruent, Bob accepts the message.
20. Discuss various attacks on Digital signatures.
There are 3 kinds of attacks on digital signatures:
• Key-only
• Known-message
• Chosen-message.
• Key-Only Attack
In the key-only attack, Eve has access only to the public information released by Alice. To forge a
message, Eve needs to create Alice’s signature to convince Bob that the message is coming from
Alice.
• Known-Message Attack
In the known-message attack, Eve has access to one or more message-signature pairs. In other
words, she has access to some documents previously signed by Alice. Eve tries to create
another message and forge Alice’s signature on it.
• Chosen-Message Attack
In the chosen-message attack, Eve somehow makes Alice sign one or more messages for her.
Eve now has a chosen-message/signature pair. Eve later creates another message, with the
content she wants, and forges Alice’s signature on it.
Forgery Types
If the attack is successful, the result is a forgery. There can be two types of forgery: existential
and selective.
• Existential Forgery
Eve creates a valid message-signature pair, but the message content is random or useless.
Although this forgery is more likely, Eve can’t gain much from it since the message has no real
value.
• Selective Forgery
Eve is able to successfully forge Alice’s signature on a message that she has chosen. The
content of this message is specific and meaningful to Eve. This type of forgery can be very
harmful to Alice because the forged message may contain important or sensitive information.
Although it's less likely to occur, it's more dangerous if successful.
5. Network Security and Applications
21. Explain the phases of handshake protocol in SSL. #
Handshake Protocol is used to establish sessions. This protocol allows the client and server to
authenticate each other by sending a series of messages to each other. Handshake protocol
uses four phases to complete its cycle.
Phase 1: Both the Client and Server send hello packets to each other. In this IP session, cipher
suite and protocol version are exchanged for security purposes.
Phase 2: Server sends its certificate and Server-key-exchange message. The server ends phase-
2 by sending the Server-hello-end packet.
Phase 3: Client replies to the server by sending his certificate and Client-exchange-key.
Phase 4: Change-cipher suite occurs and after this the Handshake Protocol ends.
22. Enlist the various functions of the di erent protocols of SSL. #
Notations:
• M = Message • H = Hash function
• PRa, PRb = Private Keys of Sender (A) and Receiver (B) • Ks = Session key
• PUa , PUb = Public Keys of Sender (A) and Receiver (B) • | | = Concatenation
• EP / DP = Public Key Encryption & Decryption Algorithms
• EC / DC = Symmetric Encryption & Decryption Algorithms
• Z/Z-1 = Compression & Decompression functions.
Authentication:
To achieve authentication, PGP ensures that the message truly comes from the claimed sender
and hasn't been altered during transmission. This is done using digital signatures, which allow
the receiver to verify the sender's identity and the integrity of the message.
1. The sender creates a message.
2. SHA-1 is used to generate a 160-bit hash code of the message.
3. The hash code is encrypted with RSA using the sender’s private key, and the result is
prepended to the message.
4. The receiver uses RSA with the sender’s public key to decrypt and recover the hash code.
5. The receiver generates a new hash code for the message and compares it with the
decrypted hash code. If the two match, the message is accepted as authentic.
Confidentiality:
To ensure confidentiality, PGP encrypts the message so that only the intended recipient can read
it. This is done by combining symmetric encryption (for speed) with public key encryption (for
secure key exchange), protecting the message from unauthorized access.
1. The sender generates a message and a random 128-bit number to be used as a session
key for this message only.
2. The message is encrypted using CAST-128 (or IDEA or 3DES) with the session key.
3. The session key is encrypted with RSA using the recipient’s public key and is prepended to
the message.
4. The receiver uses RSA with its private key to decrypt and recover the session key.
5. The session key is used to decrypt the message.
This is how PGP achieves both confidentiality and authentication in emails—by using a
combination of digital signatures for verifying sender identity and hybrid encryption
(symmetric + public key) for secure message transmission.
24. Explain various types of firewall.
1. PACKET FILTERING FIREWALLS
Definition: Packet filtering firewalls inspect individual packets of data as they pass through the
network and make decisions to allow or block them based on predefined rules at the network
layer (Layer 3) of the OSI model.
Operation: These firewalls examine attributes of packets such as source and destination IP
addresses, ports, and protocol types to determine whether to permit or deny the tra ic.
Example Rules:
Allow incoming tra ic on port 80 (HTTP) for web browsing.
Block incoming tra ic with a source IP address from a specific blacklist
Example: Windows Firewall in Microsoft Windows.
2. CIRCUIT-LEVEL GATEWAYS
Definition: Circuit-level gateways operate at the session layer (Layer 5) of the OSI model. They
don't inspect packet contents. Instead, they monitor TCP handshakes to ensure proper
connection establishment, follows the proper sequence of steps.
Operation: When a connection attempt is made, the circuit-level gateway acts as an
intermediary, establishing a virtual circuit between the client and the server. It verifies that the
TCP handshake (SYN, SYN-ACK, ACK) is completed successfully before allowing tra ic to pass
through.
Example Rules:
Verify that the TCP handshake follows the SYN, SYN-ACK, ACK sequence.
Example: Microsoft Forefront Threat Management Gateway (TMG).
5. NEXT-GENERATION FIREWALLS
Definition: Next-generation firewalls integrate traditional firewall features with advanced
security capabilities, such as application awareness, intrusion prevention, and user identity
awareness, to provide enhanced protection against modern threats.
Operation: NGFWs inspect and control tra ic at both the network and application layers (Layer
3 to Layer 7), allowing for more granular security policies based on application, user, and
content.
Example Rules:
Allow access to social media applications during non-business hours only.
Block file uploads to cloud storage services from unapproved user groups.
Example: Check Point NGFW
25. Di erentiate between IDS and Firewall. #
26. Explain DDOS attack and how it is launched.
A Distributed Denial-of-Service (DDoS) Attack aims to disrupt a server, service, or network by
flooding it with excessive tra ic from multiple compromised devices. Attackers use botnets—
networks of infected computers and IoT devices—to overwhelm targets, making it di icult to
distinguish attack tra ic from legitimate users.
How a DDoS Attack Works
1. Attackers infect multiple devices (bots) with malware.
2. These bots form a botnet, controlled remotely.
3. The attacker commands the botnet to flood the target with tra ic, exhausting its resources
and causing service disruption.
Types of DDOS attacks:
1. Volumetric Attacks
These are the most common type of DDoS attacks. They aim to consume all available bandwidth
between the target and the internet by sending massive volumes of fake tra ic. The goal is to
clog the network pipes, making legitimate tra ic unable to get through.
Example: UDP Flood – attackers send a large number of UDP packets to random ports on
a target server, overwhelming its ability to process and respond.
2. Protocol Attacks
Also known as state-exhaustion attacks, these exploit vulnerabilities in network protocols to
exhaust server resources like firewalls, load balancers, and connection tables.
Example: SYN Flood – the attacker sends repeated TCP connection requests (SYN
packets) without completing the handshake, leaving the server waiting and tying up
resources.
3. Application Layer Attacks
These target the top layer of the OSI model (Layer 7) and aim to crash web applications or
servers by sending seemingly legitimate, but malicious requests that are computationally
expensive to handle.
Example: HTTP GET/POST Flood – attackers mimic normal users by sending many HTTP
requests to a website, causing slowdowns or crashes.
27. Write a short note on ARP spoofing. #
ARP Spoofing is a type of cyberattack where an attacker sends fake ARP messages on a local
network. The goal is to associate their own MAC address with the IP address of another device,
such as a router or gateway.
As a result, tra ic meant for the legitimate device is unintentionally sent to the attacker, enabling
them to:
Intercept sensitive information (e.g., passwords, emails)
Modify or corrupt data (Man-in-the-Middle attack)
Launch Denial-of-Service (DoS) attacks
Prevention Techniques
Network Segmentation:
o Divide the network into smaller segments using VLANs (Virtual LANs) to isolate
devices and reduce the impact scope of ARP spoofing.
Intrusion Detection/Prevention Systems (IDS/IPS):
o Deploy IDS/IPS to monitor and alert for unusual ARP tra ic patterns, helping to
detect or block spoofing attempts.
28. Explain TCP/IP vulnerabilities layer wise. #
The TCP/IP model has four layers, each with its own set of vulnerabilities:
1. Application Layer
o Bu er overflows in services like HTTP, FTP, SMTP: Attacker sends more data than
a bu er can handle, overwriting memory and potentially executing malicious code.
o Injection attacks (e.g., SQL Injection, Cross-Site Scripting): Malicious input is
inserted into a program to manipulate queries or scripts and gain unauthorized
access or control..
2. Transport Layer
o TCP session hijacking: Attacker takes over an existing session.
o SYN flood (DoS attack): Exploits TCP 3-way handshake by sending multiple SYN
requests.
3. Network Layer (Internet Layer)
o IP spoofing: Attacker fakes source IP address to disguise identity.
o ICMP attacks (e.g., Ping of Death): Attacker sends oversized or malformed ICMP
packets to crash or freeze the target system.
4. Data Link Layer
o ARP spoofing: Attacker associates their MAC address with another host's IP.
o MAC flooding: Overwhelms a switch's MAC table, forcing it to act like a hub.
29. Write a short note on: Packet Sni ing. #
Packet sni ing is a network monitoring technique where a program or device captures and
analyses data packets as they travel across a network. It is commonly used by network
administrators for troubleshooting and performance monitoring but can also be exploited by
attackers for malicious purposes.
How Packet sni ing works:
Packet sni ing is done by using tools called packet sni er. It can be either filtered or unfiltered.
Filtered is used when only specific data packets have to be captured and Unfiltered is used when
all the packets have to be captured. Wireshark, SmartSni are examples of packet-sni ing tools.
Prevention Measures
Use encryption protocols like HTTPS, SSH, and VPNs.
Implement switch-based networks to limit broadcast tra ic exposure.
Use Intrusion Detection Systems (IDS) and firewalls.
30. IPSEC protocol: (asked 4 times, 3 di erent questions asked)
i. How is security achieved in Transport and Tunnel modes of IPSEC? Explain the role
of AH and ESP.
ii. Explain IPSEC protocol in detail. Also write applications and advantages of IPSEC.
iii. How does ESP header guarantee confidentiality and integrity of packet payload?
What is an authentication header (AH)? How does it protect against replay attack?
IPSec is a set of protocols that secure internet communications by providing encryption and
authentication at the network layer (Layer 3) of the OSI model. It is used to establish secure
connections between network devices, such as routers, firewalls, and hosts.
IPSec ensures secure data transmission over networks by providing three key security functions:
1. Confidentiality – Encrypts data to prevent unauthorized access or eavesdropping.
2. Integrity – Ensures that data remains unaltered during transmission.
3. Authentication – Verifies the identity of the communicating devices or users.
Authentication Header(AH):
Provides authentication and integrity protection for IP packets.
AH doesn’t provide confidentiality as it doesn't encrypt but provides assurance that the
packet has not been altered in transit.
It uses Hash Algorithms like MD5, SHA1.
Protects against replay attacks.
AH supports two modes of operation: Transport Mode and Tunnel Mode.
Next Header(8 bits): Identify the type of Next payload or next actual data.
Payload Length(8 bits): It measures the length of the authentication header itself excluding the
payload.
Reserved(16 bits): It is for future use and always set to zero.
Security Parameters Index (SPI) (32 bits): Unique identifier used to associate the packet with a
particular security association.
Sequence Number(32 bits): A monotonically increasing counter used to prevent replay attacks.
How AH protects against replay attacks:
AH: Uses sequence numbers in the header, which are incremented with each packet. The
receiver can check the sequence number to detect if a packet has been replayed.
Security Parameters Index (SPI): A unique identifier used to associate the packet with a
particular security association.
Sequence Number: A monotonically increasing counter used for anti-replay protection.
Payload Data: The encrypted and/or authenticated payload of the packet.
Padding: Additional padding may be added to ensure alignment with encryption block sizes(0-
255 octets)
Padding Length: Mandatory field in ESP used to indicate no. of padding (protection) added in the
packet.
Next Header: Indicates the protocol of the payload (e.g., TCP, UDP)
IPSEC Modes of Operation:
~ AJ
Asked once:
1.Introduction - Number Theory and Basic Cryptography
1. List and explain various types of attacks on encrypted message. #
2. Explain Euclidian Algorithm. #
3. Use Hill cipher to encrypt the text “short.” The key to be used is hill.
4. Explain with examples keyed and keyless transposition cipher. #
6. System Security
20. Explain worms and viruses. #
21. Write a short note on: SQL injection. #
22. List various Software Vulnerabilities. How vulnerabilities are exploited to launch an attack. #
Not enough time to study all, will make later if there’s time