Chapter 1
Chapter 1
1. Fundamentals
Legacy System Features:
These assumptions are from a time when the Internet was used mainly by
researchers and military labs.
They should also define specific defenses for each identified threat.
Chapter 1 1
Both hardware and software require rigorous testing to identify
vulnerabilities.
Timely Patching:
Chapter 1 2
Integrity: Ensures that information remains accurate and unaltered,
unless by authorized users.
It shows three overlapping circles, each labeled with one of the core concepts:
Confidentiality, Integrity, and Availability.
Confidentiality
Definition of Confidentiality:
Chapter 1 3
It involves allowing only authorized access to data while blocking others
from learning its content.
Historical Context:
Caesar Cipher: Julius Caesar used a basic cipher that replaced each letter
with another. Although simple by today's standards, it was effective due to
limited literacy among his enemies.
Encryption:
Only those with the decryption key can access the original data.
Access Control:
Authentication:
Commonly uses:
Authorization:
Physical Security:
Chapter 1 4
Faraday cages to block electromagnetic signals.
When a browser shows a lock icon while entering a credit card number,
multiple confidentiality tools are at work:
Physical security at the data center protects the server holding the
information.
Image Description
The image (Figure 2) illustrates the three foundations of authentication:
Chapter 1 5
Something you know: Shown with a person and sample passwords, indicating
knowledge-based authentication (e.g., passwords).
Something you have: Depicted with a radio token with secret keys,
representing possession-based authentication (e.g., smart cards).
Integrity
Definition of Integrity:
This distortion shows how easily data integrity can be lost when
information is repeatedly passed.
Malicious Compromise:
Backups:
Checksums:
Chapter 1 6
Even a small change in the file (like flipping a single bit) produces a
different checksum, helping to detect breaches in data integrity.
Integrity isn’t just about the data content; it also applies to metadata.
Metadata includes:
An intruder might not alter file content but may change metadata (e.g.,
access timestamps).
Availability
Definition of Availability:
Chapter 1 7
Availability ensures that information is accessible and modifiable in a
timely manner by authorized users.
Credit card security: If a list of stolen credit card numbers isn’t available
to merchants in time, it can lead to financial loss.
Physical Protections:
Computational Redundancies:
Web server farms use multiple servers so that if one server fails, the
website remains available.
Attackers may target availability even if they aren’t concerned with data
confidentiality or integrity.
For instance, a thief with stolen credit cards may try to disrupt the
availability of the stolen card list, preventing it from being broadcasted to
Chapter 1 8
merchants.
Unlike CIA concepts, which are interconnected, the AAA concepts are
independent of one another, focusing on different aspects of security and
privacy.
Chapter 1 9
Anonymity: Represented by an image that suggests concealment or privacy,
emphasizing the protection of user identity.
Assurance
Definition of Assurance*:
Components of Trust*:
Example: An online music system’s policy may specify user access and
copying rules.
Example: An online music store may allow limited copying for users
who bought songs.
Chapter 1 10
Trust Management:
Authenticity
Definition of Authenticity:
Nonrepudiation:
Chapter 1 11
Digital Signatures:
Anonymity
Aggregation:
Mixing:
Proxies:
Chapter 1 12
Trusted agents perform actions on behalf of users, concealing their
identities.
Pseudonyms:
Goal of Anonymity:
Intercepting
information meant Packet sniffers
Eavesdropping for someone else monitoring nearby Confidentiality
during Internet traffic.
transmission.
Man-in-the-middle
Unauthorized
attack, computer
Alteration modification of Data Integrity
viruses modifying
information.
system files.
Interrupting or
slowing down a Email spam filling up
Denial-of-
service or mail queues to slow Availability
Service
information down email servers.
access.
Chapter 1 13
from a genuine spoofing (network
source. packets with false
addresses).
Backing out of a
Denial of a
contract that
Repudiation commitment or Assurance
requires data receipt
data receipt.
acknowledgment.
Other Attacks:
Fail-Safe Defaults:
Chapter 1 14
Many access control models assume that, if access rights aren’t
specified, access is denied.
Complete Mediation:
The system should check every access to a resource for compliance with
the security policy.
Example: Online banking sites should prompt users to re-sign after a set
time (e.g., 15 minutes).
Open Design:
The system should make its security architecture and design publicly
available.
Separation of Privilege:
Chapter 1 15
Apply separation of system components to limit potential damage if one
component is breached.
Least Privilege:
Ensure each program and user operates with the minimum privileges
needed to function.
By enforcing this, you restrict privilege abuse and minimize damage from
compromised applications or accounts.
Provide separate access channels for users needing access to the same
resources to avoid unintended security issues.
Psychological Acceptability:
Work Factor:
Chapter 1 16
Compromise Recording:
The goal is to restrict access only to those with a legitimate need, following
the principle of least privilege.
Cells contain access rights (e.g., read, write, execute) for each subject-object
combination, with empty cells meaning no access.
Advantages:
Disadvantages:
Chapter 1 17
Scalability is a major issue; for large systems with many subjects and
objects, the matrix becomes extremely large and unmanageable.
Example: A system with 1,000 users and 1,000,000 files would need a
matrix with 1 billion cells, which is impractical to manage.
Alternatives:
The image (Table 1) shows an example access control matrix with read, write,
and execute permissions for four users across one file (/etc/passwd) and three
directories. This matrix provides a clear example of how different users have
distinct access rights to each resource.
The ACL model compresses each column of the access control matrix by
ignoring empty cells, reducing size.
Advantages:
Reduces size by only including nonempty cells from the access control
matrix.
Chapter 1 18
Stores ACLs with objects as metadata, making it easy for systems to
check permissions directly from the object (useful in file systems).
Disadvantages:
ACLs lack an efficient way to list all access rights of a given subject.
To find all access rights for a subject, the system must search every
object’s ACL individually, which can be time-consuming, especially for
tasks like removing a user from the system.
The image (Figure 5) shows access control lists (ACLs) for the directories and file
in Table 1, with each object listing the users who have read (r), write (w), and
execute (x) permissions.
2.3 Capabilities:
The capabilities model uses a subject-centered approach, listing objects
each subject has access to and specifying access rights.
This model compresses each row of the access control matrix by removing
empty cells.
Advantages:
Chapter 1 19
When a subject requests access, the system only checks the capabilities
list for that subject, which can be efficient if the list is small.
Disadvantages:
The image (Figure 6) shows capabilities lists for four users, each listing the read
(r), write (w), and execute (x) permissions they have for different objects.
Each role is associated with specific access rights suitable for that role’s
responsibilities.
Subjects (users) are assigned to roles, and their access rights become the
union of the rights of all assigned roles.
Role Hierarchies:
Chapter 1 20
RBAC allows hierarchical role structures, where higher roles inherit
access rights from lower roles.
Advantages:
Disadvantages:
The image (Figure 7) shows a role hierarchy for a computer science department,
illustrating how roles like Department Chair, System Administrator, and Faculty
are organized, with access rights inherited by roles lower in the hierarchy.
3. Cryptographic Concepts
Chapter 1 21
Cryptography provides techniques to achieve various security goals
effectively.
3.1 Encryption:
Traditionally, encryption enables confidential communication between two
parties, often named Alice and Bob, over an insecure channel.
Cryptosystems:
The decryption algorithm requires a secret key known to Bob (and possibly
Alice) to retrieve the original message.
6. Encryption algorithm
Chapter 1 22
7. Decryption algorithm
The Caesar cipher uses the Latin alphabet (23 characters) with a shift
operation.
Example shifts:
s(D, 3) = G
s(R, -2) = P
The encryption and decryption keys are opposites, and both algorithms
perform a circular shift on each character.
Modern Cryptosystems:
Modern cryptosystems are significantly more complex and secure than basic
ciphers like the Caesar cipher.
The length of AES keys makes brute-force attacks (trying all possible keys)
practically infeasible for an eavesdropper.
Symmetric Encryption:
In symmetric cryptosystems (or shared-key cryptosystems), the same key
(K) is used for both encryption and decryption.
Chapter 1 23
The image (Figure 8) illustrates a symmetric cryptosystem, where both the
sender and recipient use a shared secret key for encryption and decryption. An
attacker who eavesdrops cannot decrypt the ciphertext without knowing the key.
Chapter 1 24
The image (Figure 9) shows pairwise confidential communication among
multiple users, requiring n(n − 1)/2 distinct keys. Each key is shared only between
two users, ensuring privacy from other users.
Public-Key Encryption:
In a public-key cryptosystem, each user has a public key (shared openly) and
a private key (kept secret).
To send an encrypted message to Bob, Alice uses Bob’s public key to encrypt
her message. Bob then uses his private key to decrypt it.
This method avoids the need for a shared secret key and only requires each
user to keep their private key secure. (Advantage)
Larger Key Sizes: Public-key cryptosystems need longer keys (e.g., RSA
with 2048-bit keys) compared to symmetric systems (e.g., AES with 256-
bit keys).
Chapter 1 25
Figure 10: Shows a public-key cryptosystem where the sender uses the
recipient’s public key to encrypt, and the recipient uses their private key to
decrypt. An attacker cannot decrypt without the private key.
Chapter 1 26
Figure 12: Depicts the use of a public-key system to exchange a shared secret
key, which is then used for symmetric encryption.
Bob can apply the decryption algorithm to a message M using his private
key SB , resulting in DS B (M)
When anyone applies the encryption algorithm with Bob’s public key PB to
this output, they get back the original message: EPB (DS B (M))
= M
Chapter 1 27
Alice can verify the signature by encrypting \( S \) with Bob’s public key:
M = EPB (S)
This verification confirms that only Bob could have produced S because it
required his private key,SB , to create it.
They are typically one-way functions, meaning it’s easy to compute the hash
of a message h(M), but difficult to reverse it.
If Alice and Bob share a secret key K , Alice can send a message M with
integrity protection by computing a MAC:
A = h(K∣∣M)
Alice sends the pair (M, A)to Bob over an insecure channel.
A′′ = h(K∣∣M ′ )
If A′′ = A′ , Bob can be confident that M ′ is the original message M .
An attacker cannot alter the message and compute a correct MAC without
knowing the secret key K .
Chapter 1 28
The image (Figure 15) demonstrates using a message authentication code (MAC)
to verify message integrity. The sender computes a MAC using a shared key, and
the recipient verifies it, detecting any unauthorized changes made during
transmission.
Digital Certificates
Public-key cryptography enables Alice to send a shared secret key (K) to Bob
by encrypting it with Bob’s public key PB .
Problem: Alice needs assurance that PB truly belongs to the right Bob.
A digital certificate links a person’s identity with their public key and is
digitally signed by the CA.
To trust Bob’s public key, Alice only needs to trust the CA and know its public
key, which is often pre-installed in operating systems.
Chapter 1 29
Website address (e.g., mail.google.com)
Digital signature
Browser Usage: When a browser indicates a secure site (e.g., “locks the
lock”), it relies on a digital certificate to authenticate the web server’s identity,
helping prevent phishing attacks by confirming the organization’s name on the
certificate.
4.2 Passwords
Usernames and passwords are a common method for authenticating users in
computer systems.
Chapter 1 30
Dictionary Attack:
Easy-to-remember passwords are vulnerable because they come from a
small set of common possibilities.
To counter this, systems may introduce delays after failed attempts or lock
out users after repeated failures.
Secure Passwords:
Secure passwords use a large character set (alphabet) to make dictionary
attacks slower.
Testing one password per nanosecond would take around 1 month to break;
testing at 1 microsecond would take about 95 years.
Memorization Tips:
Use a memorable sentence and take the first letter of each word,
capitalizing some and adding special characters.
Chapter 1 31
Example: "Mark took Lisa to Disneyland on March 15" becomes
MtLtDoM15.
Pretexting:
An attacker pretends to be someone else (e.g., Eve calls a helpdesk claiming
to be Alice).
Baiting:
An attacker uses a “gift” to trick someone into installing malicious software.
Example: Bob pretends to be a helpdesk agent and helps Alice with her
computer, then casually asks for her password.
Chapter 1 32
Effectiveness:
Social engineering can bypass strong security measures.
Chapter 1 33