Final Content
Final Content
Q: Why is key management and distribution considered complex? A: Key management and
distribution involve cryptographic, protocol, and management issues that need to be carefully
addressed to ensure the security and integrity of cryptographic systems.
Q: What are the key requirements for symmetric key schemes? A: Symmetric key schemes
require both parties to share a common secret key, which must be securely distributed and
frequently changed to minimize the impact of a key compromise.
Key Distribution
Q: What are some methods for distributing symmetric keys? A: Symmetric keys can be
distributed using the following methods:
Q: What is the key hierarchy, and why is it used? A: A key hierarchy involves using a master
key to encrypt session keys. The master key is shared between the user and the key distribution
center, while session keys are temporary and used for specific sessions, improving security by
limiting the exposure of any single key.
Q: What are some major issues associated with using KDCs? A: Major issues include the
need for a hierarchy of KDCs for large networks, limited session key lifetimes for security, trust
in the automated key distribution system, and decentralized key distribution methods.
Q: What are the different methods of distributing public keys? A: Public keys can be
distributed through:
1. Public announcement.
2. Publicly available directories.
3. Public-key authorities.
4. Public-key certificates.
Q: What is the main weakness of public key announcements? A: The main weakness is the
possibility of forgery, where an attacker can create a key claiming to be someone else and
distribute it, allowing them to masquerade as the legitimate user until the forgery is discovered.
X.509 Certificates
Q: How do X.509 certificates improve public key distribution? A: X.509 certificates bind a
user's identity to their public key and are signed by a trusted CA, allowing anyone who knows
the CA's public key to verify the certificate's authenticity without real-time access to the CA.
Q: Why is public key cryptography used for symmetric key distribution? A: Public key
cryptography is used to distribute symmetric keys securely because it can encrypt secret keys for
distribution, ensuring that only the intended recipient can decrypt and use the symmetric key.
Q: Describe Merkle's simple scheme for secret key distribution. A: Merkle's simple scheme
involves the following steps:
1. A generates a public/private key pair and sends the public key to B.
2. B generates a secret key, encrypts it with A's public key, and sends it to A.
3. A decrypts the message with its private key to obtain the secret key.
4. Both A and B use the secret key for secure communication and then discard the key after
use.
Man-in-the-Middle Attack
Q: What is a man-in-the-middle attack, and how does it affect key distribution? A: A man-
in-the-middle attack occurs when an attacker intercepts and possibly alters communication
between two parties without their knowledge. In key distribution, this can result in the attacker
obtaining the secret key, compromising the security of the communication.
Q: How does the enhanced key distribution protocol ensure both confidentiality and
authentication? A: The enhanced protocol includes the following steps:
1. A encrypts a message with B's public key, including A's identity and a nonce.
2. B responds with a message encrypted with A's public key, including the nonce and a new
nonce.
3. A returns the new nonce encrypted with B's public key.
4. A selects a secret key and sends it encrypted with B's public key and A's private key.
5. B decrypts the message to obtain the secret key. This protocol ensures that both parties
can authenticate each other and securely exchange the secret key.
Q: What is the rationale behind using a hybrid approach for key distribution? A: The
hybrid approach combines the use of a private-key Key Distribution Center (KDC) for
distributing session keys and a public-key scheme for distributing master keys. This provides the
benefits of secure, efficient key distribution and backward compatibility with existing systems.
Public-Key Authority
Public-Key Certificates
Q: Why might a certificate need to be revoked, and how is this handled? A: A certificate
may need to be revoked if the user's private key is compromised, the user is no longer certified,
or the CA's certificate is compromised. Revocation is handled by maintaining a Certificate
Revocation List (CRL), which is regularly updated and checked by users to ensure the validity of
certificates.
Chapter 16
Web Security
Q: What are some common threats to web security? A: Common threats to web security
include integrity threats (such as tampering with data), confidentiality threats (e.g.,
eavesdropping on communications), denial of service attacks, and authentication threats (e.g.,
impersonation).
Q: Why is added security needed for web communications? A: Added security mechanisms
are needed because the Internet and the Web are highly vulnerable to various attacks, and basic
web protocols do not provide sufficient protection against these threats.
Q: What are the different approaches to providing web security? A: Web security can be
provided at different levels:
1. IP Security (IPSec) at the network layer.
2. Secure Sockets Layer (SSL) or Transport Layer Security (TLS) just above the TCP layer.
3. Application-specific security embedded within the application itself.
Q: What is the advantage of using IPSec for web security? A: The advantage of using IPSec
is that it is transparent to end users and applications, provides a general-purpose solution, and
includes filtering capabilities to only process selected traffic.
Q: What is SSL, and who originally developed it? A: SSL is a transport layer security service
originally developed by Netscape. It provides a reliable end-to-end secure service using TCP.
Q: What are the two layers of SSL protocols? A: SSL consists of the SSL Record Protocol,
which provides basic security services, and three higher-layer protocols: the Handshake Protocol,
Change Cipher Spec Protocol, and Alert Protocol.
SSL Architecture
Q: What is the difference between an SSL connection and an SSL session? A: An SSL
connection is a transient, peer-to-peer communications link, while an SSL session is an
association between a client and a server, created by the Handshake Protocol. A session can be
shared by multiple connections.
Q: What services does the SSL Record Protocol provide? A: The SSL Record Protocol
provides confidentiality using symmetric encryption and message integrity using a Message
Authentication Code (MAC).
SSL Protocols
Q: What is the purpose of the Change Cipher Spec Protocol in SSL? A: The Change Cipher
Spec Protocol is used to update the cipher suite in use by causing the pending state to become the
current state with a single byte message.
Q: What types of alerts are conveyed by the SSL Alert Protocol? A: The SSL Alert Protocol
conveys two types of alerts: warnings (e.g., close notify, no certificate) and fatal alerts (e.g.,
unexpected message, bad record MAC).
Q: What are the main phases of the SSL Handshake Protocol? A: The SSL Handshake
Protocol consists of four phases:
Q: What is the role of the master secret in SSL? A: The master secret is a one-time 48-byte
value generated using secure key exchange (RSA or Diffie-Hellman) and is used to generate
cryptographic parameters for encryption and MAC.
Q: How does TLS differ from SSLv3? A: TLS is similar to SSLv3 but includes minor
differences such as using HMAC for MAC, a pseudo-random function to expand secrets,
additional alert codes, changes in supported ciphers, and changes in certificate types and
negotiations.
Q: What does HTTPS stand for, and what does it secure? A: HTTPS stands for HTTP over
SSL and secures communications between a web browser and a web server by encrypting the
URL, document contents, form data, cookies, and HTTP headers.
Q: What is the primary purpose of SSH, and what version fixes its security flaws? A: The
primary purpose of SSH is to provide a secure remote logon facility, replacing insecure schemes
like TELNET. SSH2 fixes several security flaws found in the initial version, SSH1.
Q: What are the three protocols that comprise SSH? A: SSH consists of three protocols:
Q: What is SET, and what are its key components? A: SET (Secure Electronic Transactions)
is an open encryption and security specification developed to protect Internet credit card
transactions. It involves secure communications among parties, trust through X.509v3
certificates, and privacy by restricting information access.
Q: What is a dual signature in SET, and why is it used? A: A dual signature in SET is used to
link order information (OI) and payment information (PI) while keeping them separate. It is
created by signing concatenated hashes of OI and PI, ensuring that neither the merchant nor the
bank has access to each other's sensitive information.
Extra questions
SSL/TLS Operations
Q: What are the main operations of the SSL Record Protocol? A: The SSL Record Protocol
performs the following operations:
Q: What encryption algorithms are supported by SSL for confidentiality? A: SSL supports
several encryption algorithms for confidentiality, including AES, IDEA, RC2-40, DES-40, DES,
3DES, Fortezza, RC4-40, and RC4-128.
Q: What happens during the "Establish Security Capabilities" phase of the SSL
Handshake Protocol? A: During this phase, the client initiates a logical connection and
establishes security capabilities by sending a ClientHello message, which includes the SSL
version, session ID, cipher suite, and compression method.
Q: What is the purpose of the "Server Authentication and Key Exchange" phase? A: In this
phase, the server sends its certificate to authenticate itself to the client, optionally performs a key
exchange, and may request a certificate from the client for mutual authentication.
Q: Describe the "Client Authentication and Key Exchange" phase. A: The client verifies the
server's certificate, sends its certificate if requested, performs a key exchange, and sends a
ClientKeyExchange message. This message contains the pre-master secret encrypted with the
server's public key.
Q: What is the final step in the SSL Handshake Protocol, and what does it
accomplish? A: The final step is the "Finish" phase, where both the client and server send a
ChangeCipherSpec message to activate the negotiated security parameters and a Finished
message to verify that the handshake was successful. This completes the secure connection
setup.
Q: How does TLS handle alert codes differently from SSL? A: TLS includes additional alert
codes for better error handling and communication between the client and server. It also has
changes in the structure and content of the alert messages compared to SSL.
Q: What elements of communication are encrypted when using HTTPS? A: When using
HTTPS, the following elements are encrypted: the URL of the requested document, document
contents, form data, cookies, and HTTP headers.
Q: What security indicators are shown to users when a website uses SSL? A: Security
indicators include the URL changing from http:// to https://, a padlock icon appearing in the
browser window, the address bar turning green and displaying the website owner's name (with
Extended Validation SSL certificates), and potentially a trust mark such as a site seal.
Q: What are the primary purposes of the SSH Transport Layer Protocol? A: The SSH
Transport Layer Protocol provides server authentication, data confidentiality, data integrity, and
optional compression. It ensures that the communication between the client and server is secure.
Q: What is the role of the SSH User Authentication Protocol? A: The SSH User
Authentication Protocol authenticates the client to the server using methods such as public key
authentication, password authentication, and host-based authentication.
Q: How does the SSH Connection Protocol manage multiple communications? A: The SSH
Connection Protocol multiplexes multiple logical communication channels over a single
underlying SSH connection, allowing for concurrent and independent data streams between the
client and server.
Q: What are the main steps involved in a SET transaction? A: The main steps in a SET
transaction are:
Q: Why is a dual signature used in SET, and how is it created? A: A dual signature is used in
SET to ensure that the order information (OI) and payment information (PI) are linked but kept
separate. It is created by signing the concatenated hashes of the OI and PI, allowing both the
merchant and the bank to verify the transaction without accessing each other's sensitive
information.
General Concepts
Q: What is the primary goal of transport-level security protocols like SSL/TLS? A: The
primary goal of transport-level security protocols is to provide secure communication over a
network by ensuring data confidentiality, integrity, and authenticity between the communicating
parties.
Q: How does the use of certificates enhance security in SSL/TLS and SET? A: Certificates,
issued by trusted Certificate Authorities (CAs), bind a public key to an entity's identity. This
binding ensures that parties can trust the authenticity of public keys used in secure
communications, preventing man-in-the-middle attacks and other security breaches.
Chapter 21
Q: What are the two main categories of malicious software (malware)? A: Malware can be
categorized into two main types:
Q: Define a logic bomb and give an example of its trigger. A: A logic bomb is code
embedded in a legitimate program that is set to "explode" when certain conditions are met, such
as a specific date or the presence of a certain file. Once triggered, it may delete data or cause
other damage.
Q: What is a Trojan horse, and how is it typically used? A: A Trojan horse is a seemingly
useful program that contains hidden code that performs malicious functions, such as making files
readable, propagating a virus or worm, or destroying data.
Viruses
Q: What are the four phases of a virus's life cycle? A: The four phases of a virus's life cycle
are:
Q: What are the three parts of a computer virus? A: The three parts of a computer virus are:
Q: What is a macro virus, and why is it particularly threatening? A: A macro virus infects
files with macro code interpreted by applications like Microsoft Word. It is threatening because
it is platform-independent, infects documents (not just executable files), and spreads easily
through email.
E-mail Viruses
Q: How do e-mail viruses like Melissa and later versions spread? A: Early e-mail viruses like
Melissa spread by using Microsoft Word macros in attachments. Newer versions can spread by
simply opening the email, exploiting the scripting language of the email package.
Antivirus Measures
Q: What are the three main steps in dealing with a virus after infection? A: The three main
steps are:
Q: Describe the digital immune system and its purpose. A: The digital immune system,
developed by IBM and refined by Symantec, aims to provide rapid response to new viruses by
automatically capturing, analyzing, and removing them, and then updating other systems to
protect against the virus.
Worms
Q: What is a computer worm, and how does it spread? A: A worm is a program that
replicates itself and spreads from computer to computer over a network. It uses network
connections to propagate and can perform unwanted functions like installing Trojan horses or
causing disruptions.
Q: What was the Morris worm, and how did it propagate? A: The Morris worm, released in
1988, spread on UNIX systems using multiple techniques like exploiting the finger protocol,
password guessing, and a trapdoor in the sendmail program.
Q: What is a DDoS attack, and what is its goal? A: A DDoS attack floods a target with useless
traffic to consume its resources, making it unavailable to legitimate users. It typically involves
multiple compromised hosts (zombies) sending the traffic.
Q: How does a direct DDoS attack differ from a reflector DDoS attack? A: In a direct DDoS
attack, compromised hosts directly send traffic to the target. In a reflector DDoS attack,
compromised hosts send requests to other uninfected machines (reflectors), which then send
responses to the target, amplifying the attack.
Q: What are some techniques for defending against worms? A: Techniques include
signature-based worm scan filtering, filter-based worm containment, payload-classification-
based worm containment, threshold random walk (TRW) scan detection, rate limiting, and rate
halting.
Summary
Q: What are the three lines of defense against DDoS attacks? A: The three lines of defense
are:
Mobile Code
Q: What is mobile code and how can it be used maliciously? A: Mobile code refers to
programs like scripts or macros that can be transferred and executed on various platforms
without user instruction. It can be used maliciously to propagate viruses, worms, or Trojan
horses, and exploit system vulnerabilities for unauthorized data access or control.
Q: What is a multipartite virus? A: A multipartite virus can infect multiple types of files or
areas of a system, requiring comprehensive virus eradication efforts to address all infection sites.
Q: How does a compressed virus evade detection? A: A compressed virus reduces the size of
the infected program so that both the infected and uninfected versions are of the same length,
making simple size-based detection ineffective.
Q: What are the steps a virus takes to infect and execute within a program? A: The virus
first compresses the target program, inserts itself into the compressed program, decompresses the
original program when executed, and then runs the original program.
1. First-generation: Simple scanners that use virus signatures to identify known viruses.
2. Second-generation: Heuristic scanners that look for suspicious code patterns and integrity
checkers using hash functions.
3. Third-generation: Memory-resident programs that identify viruses by their actions rather
than their structure.
4. Fourth-generation: Comprehensive packages using a combination of antivirus techniques,
including scanning, activity trapping, and access control.
Q: What are the phases of worm propagation according to the model described by
[ZOU05]? A: Worm propagation has three phases:
1. Initial phase: Exponential growth as the worm infects new hosts rapidly.
2. Middle phase: Linear growth as the worm infects known hosts while attempting to find
new ones.
3. Finish phase: Slower growth as most vulnerable hosts are already infected, and the worm
targets remaining difficult-to-identify hosts.
Q: What is an example of a sophisticated worm attack? A: The Code Red worm (2001)
exploited vulnerabilities in Microsoft Internet Information Server (IIS), spread rapidly, and
initiated a denial-of-service attack against a government website.
Q: How do mobile phone worms propagate? A: Mobile phone worms, like CommWarrior,
propagate through Bluetooth connections or multimedia messaging services (MMS), sending
copies of themselves to contacts and other devices within range.
Q: What is the goal of a DDoS attack, and how is it executed? A: The goal of a DDoS attack
is to consume a target's resources, rendering it inaccessible to legitimate users. This is executed
by using a large number of compromised hosts (zombies) to flood the target with traffic.
Q: What is the difference between a direct DDoS attack and a reflector DDoS attack? A: A
direct DDoS attack uses compromised hosts to send traffic directly to the target, while a reflector
DDoS attack uses intermediary uninfected hosts (reflectors) to send responses to the target,
amplifying the attack and making it harder to trace.
Q: What are the three main lines of defense against DDoS attacks? A: The three main lines
of defense are:
Chapter 22
Introduction to Firewalls
Q: Why are firewalls an essential part of a comprehensive security strategy? A: Firewalls
provide a perimeter defense by controlling and monitoring traffic between networks with
differing trust levels, thereby protecting internal network assets from external threats while
allowing necessary access.
What is a Firewall?
Q: What are the primary functions of a firewall? A: The primary functions of a firewall
include:
Limitations of Firewalls
1. Cannot protect against attacks that bypass the firewall (e.g., via modem connections).
2. Cannot protect against internal threats from disgruntled or colluding employees.
3. Cannot protect against access via improperly secured wireless LANs.
4. Cannot protect against malware introduced through portable devices like laptops and
PDAs.
Types of Firewalls
Q: What is a stateful packet filter, and how does it differ from a traditional packet
filter? A: A stateful packet filter examines each IP packet in context, keeping track of client-
server sessions and ensuring that each packet belongs to a valid session. This allows it to detect
and block bogus packets that traditional packet filters might miss.
Firewall Configurations
Q: What is a bastion host, and what are its key characteristics? A: A bastion host is a highly
secure system used to run firewall software, gateways, or provide external services. It is
hardened to withstand attacks, runs a secure version of its operating system, has minimal
services, and requires additional authentication.
Q: What is a host-based firewall, and what are its advantages? A: A host-based firewall is a
software module that secures an individual host. Its advantages include tailored filtering rules,
protection independent of network topology, and an additional layer of defense when used with
stand-alone firewalls.
Q: What is a personal firewall, and what is its primary role? A: A personal firewall controls
traffic between a personal computer and the Internet or an enterprise network. Its primary role is
to deny unauthorized remote access to the computer and monitor outgoing activity for malware.
Q: What is a VPN, and how is it related to firewalls? A: A VPN (Virtual Private Network) is
a secure network implemented over an unsecure network (like the Internet) using encryption and
special protocols. Firewalls can serve as platforms for implementing VPNs, providing secure
interconnection between sites and remote access for telecommuters.
Q: What are some of the common locations and topologies for firewalls? A:
1. Host-resident firewall.
2. Screening router.
3. Single bastion inline.
4. Single bastion T.
5. Double bastion inline.
6. Double bastion T.
7. Distributed firewall configuration
Buffer Overflow.
Q: What can an attacker achieve if conditions are "just right" during a buffer
overflow? A: If conditions are ideal, an attacker can gain control over the program flow and
execute arbitrary code with the same privileges as the original application.
Stack Smashing
1. Function arguments.
2. Return address.
3. Previous frame pointer.
4. Local variables.
5. Local buffer variables.
Q: How does the stack grow in memory? A: The stack grows downwards, starting from the
highest memory address allocated for the process.
Memory Management
Q: What is the direction of growth for the stack and the heap? A:
• Stack: Grows downwards.
• Heap: Grows upwards.
Q: How can an attacker "smash" the stack? A: An attacker can smash the stack by providing
a very long string with malicious code. This string overflows the allocated buffer space in the
heap, causing the overflow to extend into the stack and overwrite the return address.
Q: What happens to the return address in a stack smashing attack? A: The return address is
overwritten with the entry address of the malicious code, causing the program to execute the
attacker's code when the function returns.
Q: What components of the stack frame are typically overwritten in a stack smashing
attack? A:
1. Return address.
2. Previous frame pointer.
3. Local variables.
4. Local buffer variables.