SECURE OPERATING SYSTEMS AND TRUSTED COMPUTING
1 1. DATA LEAKAGE PREVENTION IN SECURE OPERATING SYSTEMS
Problem 1. Consider a secure operating system that employs data leak prevention mecha-
nisms to protect sensitive information. Let’s assume a scenario where a user attempts to transfer
a file containing confidential data from an encrypted folder to an unsecured folder without proper
authorization.
Given the following information: - The size of the file being transferred is 500 MB. - The data
leak prevention mechanism is configured to block unauthorized file transfers larger than 200 MB. -
When the user attempts the unauthorized transfer, the system detects the file size and blocks the
operation. - The system generates an error message and logs the attempted breach.
a) If the user attempts to transfer the file three times in a row, calculate the total amount of data
that the system prevented from leaking.
b) If each log entry for the attempted breach occupies 2 KB of storage space, determine the
total storage needed to store the logs for the three unauthorized transfer attempts.
Solution 1. a) The total amount of data blocked by the system is equivalent to the sum of the
sizes of the three attempted transfers, which were all prevented:
T otal Blocked Data = 3 ×500 MB = 1500 MB
b) To calculate the total storage space needed for the log entries of the three attempted trans-
fers, we first find the size of a single log entry:
Size of a Single Log Entry = 2 KB = 0.002 MB
Then, the total storage required for all three log entries is:
T otal Log Storage = 3 ×0.002 MB = 0.006 MB
2 2. SECURE BOOT INFRASTRUCTURE VULNERABILITIES
Problem 2. Consider a secure boot process that uses a TPM (Trusted Platform Module) to
store cryptographic keys. The boot process involves the following steps:
1. BIOS checks the integrity of the bootloader using a digital signature. 2. Bootloader loads the
OS kernel and verifies its integrity using a digital signature stored in the TPM. 3. OS kernel loads
and verifies driver modules using digital signatures stored in the TPM.
Let’s assume that the TPM has a key storage capacity of 100 keys. If each key is 256 bits long,
and each digital signature is 512 bits long, answer the following:
a) What is the total storage capacity needed by the TPM to store all the keys and digital signa-
tures for the secure boot process?
b) If each key takes up 256 bytes of storage, and each digital signature takes up 512 bytes
of storage, what is the total storage capacity required by the TPM in bytes for the secure boot
process?
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.
c) If 80 keys have been generated for the secure boot process, what percentage of the TPM’s
key storage capacity is currently in use?
Solution 2.
a) To calculate the total storage capacity needed by the TPM, we need to consider the storage
requirements for all keys and digital signatures:
Total storage capacity = (Number of keys ×Key length) + (Number of digital signatures ×
Signature length) Total storage capacity = (100 keys ×256 bits) + (100 keys + 100 digital signatures)
×512 bits) Total storage capacity = (100 ×256) + (100 ×512) Total storage capacity = 25,600
bits + 51,200 bits Total storage capacity = 76,800 bits
Therefore, the total storage capacity needed by the TPM for the secure boot process is 76,800
bits.
b) To convert the total storage capacity to bytes, we use the fact that 1 byte = 8 bits:
Total storage capacity (bytes) = Total storage capacity (bits) / 8 Total storage capacity (bytes)
= 76,800 bits / 8 Total storage capacity (bytes) = 9,600 bytes
Therefore, the total storage capacity required by the TPM in bytes for the secure boot process
is 9,600 bytes.
c) To calculate the percentage of the TPM’s key storage capacity currently in use:
Percentage in use = (Number of keys in use / Total key storage capacity) ×100 Percentage in
use = (80 keys / 100 keys) ×100 Percentage in use = 0.8 ×100 Percentage in use = 80%
Therefore, 80% of the TPM’s key storage capacity is currently in use for the secure boot process.
3 3. TRUSTED PLATFORM MODULE (TPM) ATTACKS
Problem 3. Consider a scenario where a Trusted Platform Module (TPM) is being targeted for a
dictionary attack. The TPM has a lockout policy that locks the TPM for 1 minute after 5 consecutive
incorrect password attempts. The attacker has full access to the TPM and performs the following
actions:
- The attacker tries 3 incorrect passwords, waits for 30 seconds, and then tries 2 more incorrect
passwords.
Assume each password attempt takes 5 seconds and the lockout time is counted from the first
incorrect attempt.
a) After the last incorrect password attempt, how much longer does the TPM remain locked
out?
b) If the attacker waits for 1 minute and then tries another password but fails, how long will the
TPM remain locked out after this attempt?
Solution 3.
a) The attacker has tried a total of 5 incorrect password attempts, which means the TPM will
be locked out for 1 minute. However, since the attacker has already spent 30 seconds waiting, the
remaining lockout time after the last incorrect attempt will be:
1minute −30 seconds = 30 seconds
Therefore, the TPM will remain locked out for an additional 30 seconds.
b) After the attacker waits for 1 minute, the lockout time from the previous incorrect attempts
will also be over. So, when the attacker tries another password and fails, the TPM will be locked
out for 1 minute again due to this new attempt.
Therefore, after this additional failed attempt, the TPM will remain locked out for 1 minute.
I’m glad to provide you with numerical problems related to Secure Operating Systems and
Trusted Computing. Here is the first problem:
4 4. SECURE HYPERVISOR DESIGN FLAWS
Problem 4. In a secure hypervisor system, the hypervisor is designed to provide isolation
between virtual machines (VMs). Consider a system with three VMs running concurrently: VM1,
VM2, and VM3. The hypervisor logic is designed to prevent VM1 from accessing memory allocated
to VM2 or VM3.
Suppose the memory address space for each VM is 64 bits. The hypervisor uses a page table
to map virtual addresses to physical addresses and prevent unauthorized memory access. Each
page table entry consists of a 36-bit physical page frame number (PFN) and permission bits.
a) If each page size is 4KB, calculate the total number of page frames for each VM.
b) If the hypervisor implements a memory protection mechanism using access permission bits
in the page table entries, and each permission bit is 4 bits long, calculate the total memory overhead
in bits for each page table entry.
c) If the hypervisor wishes to restrict VM1 from accessing memory belonging to VM2, explain
how this can be achieved through the page table entries.
Solution 4.
a) Each page is 4KB, which corresponds to 212 bytes. With a 64-bit address space, each VM
has 264/212 = 252 total pages. Therefore, the total number of page frames for each VM is 252.
b) Each permission bit is 4 bits long, and there are 212 page frames in each VM. Hence, the
total memory overhead in bits for each page table entry is 4×212 = 214 bits.
c) To restrict VM1 from accessing memory allocated to VM2, the hypervisor can set the permis-
sion bits in the page table entries for VM1 such that VM1 cannot access the physical page frames
allocated to VM2. Specifically, the hypervisor can set the permission bits to deny read/write access
for the page frames belonging to VM2 and allow access only to the rightful owner VM2.
5 5. TRUSTED COMPUTING GROUP (TCG) INTEROPERABILITY ISSUES
Problem 5. Consider a scenario where a system is implemented with Trusted Platform Mod-
ule (TPM) version 2.0 and a software module supporting the Trusted Computing Group (TCG)
standards. The TPM has an endorsement key (EK) associated with it. The software module is
attempting to verify the PCRs (Platform Configuration Registers) of the TPM.
Given the following information:
EK public key modulus n= 35
PCR composite value P CRcomp = 14
PCR value for PCR 0 P CR0= 3
PCR value for PCR 1 P CR1= 5
a) Calculate the SHA-256 hash of the PCR composite value (SHA −256(P CRcomp)).
b) Check if the signature (P CR2
comp mod n)is valid based on the EK public key n.
Solution 5.
a) To calculate the SHA-256 hash of the PCR composite value, we compute SHA−256(P CRcomp):
SHA −256(P CRcomp) = SHA −256(14) = 0x20ec36b9...
b) To check if the signature (P CR2
comp mod n)is valid based on the EK public key n, we first
calculate (P CR2
comp mod n):
(142mod 35) = 196 mod 35 = 6
Since the EK public key modulus n= 35, we have (P CR2
comp mod n)=6.
To check if the signature is valid, we need to verify if the EK public key can be used to recover
the original P CRcomp value. We do this by calculating (617 mod 35) based on the EK public key
exponent (typically 17 for TPM 2.0):
(617 mod 35) = 14
Since (617 mod 35) = 14 = P CRcomp, the signature is valid based on the EK public key.
6 6. SECURE ENCLAVE VULNERABILITIES
Problem 6. Consider a secure enclave running on a processor with Intel SGX technology. The
enclave is used to perform cryptographic operations and store sensitive data. An attacker manages
to execute a cache side-channel attack to extract information from the enclave’s memory. The
attacker has access to a shared resource with the victim enclave and uses a Flush+Reload attack
to deduce the victim enclave’s key. The victim enclave uses a 128-bit AES key for encryption.
Suppose the attacker successfully obtains the key through this attack.
a) If the attacker runs a brute force attack, how many possible keys does the attacker need to
try to exhaust all options for a 128-bit AES key?
b) Assuming the attacker can test 1 million keys per second, how long (in years) will it take for
the attacker to exhaust all possible AES keys?
Solution 6.
a) The AES-128 encryption algorithm uses a 128-bit key, meaning there are a total of 2128
possible keys.
Therefore, the attacker would need to try 2128 keys to exhaust all possibilities.
b) If the attacker can test 1 million keys per second, the number of keys tested per year is:
Number of keys per second ×Number of seconds in a year = 1,000,000 ×60 ×60 ×24 ×365
Calculating this value gives us the number of keys tested per year.
The time taken to exhaust all possible keys is the total number of keys divided by the number
of keys tested per year.
After performing the calculations, we can determine how many years it would take for the at-
tacker to exhaust all possible AES keys.
7 7. SECURE OPERATING SYSTEM MALWARE DETECTION
Problem 7. Consider a secure operating system that uses anomaly-based intrusion detection
to detect malware. The system analyzes data traffic and flags any connections that deviate signif-
icantly from normal behavior. Let’s say the system has analyzed the following data traffic packets:
Packet 1: 10 KB Packet 2: 15 KB Packet 3: 12 KB Packet 4: 8 KB Packet 5: 20 KB
The system is designed to flag any packets that are more than 2 standard deviations away from
the average packet size. Assume that the average packet size is 13 KB with a standard deviation
of 3 KB.
a) Will any of the packets be flagged as potential malware?
b) If a packet is flagged, what would be the cutoff size for flagging a packet as potential malware?
Solution 7. a) To determine if any packets will be flagged as potential malware, we need to
identify packets that are more than 2 standard deviations away from the average packet size of 13
KB.
The standard deviation is 3 KB, so 2 standard deviations away from the average is 2×3=6
KB.
Therefore, any packets greater than 13+ 6 = 19 KB or less than 13−6 = 7 KB would be flagged
as potential malware.
Checking the packet sizes: Packet 1: 10 KB (Not flagged) Packet 2: 15 KB (Not flagged) Packet
3: 12 KB (Not flagged) Packet 4: 8 KB (Not flagged) Packet 5: 20 KB (Flagged)
So, only Packet 5 will be flagged as potential malware.
b) The cutoff size for flagging a packet as potential malware is 13 + 6 = 19 KB or 13 −6=7KB.
This means that any packet larger than 19 KB or smaller than 7 KB will be flagged by the system
as potential malware.
8 8. HARDWARE-BASED SECURITY VULNERABILITIES
Problem 8. Consider a secure operating system that utilizes hardware-based security mech-
anisms to protect sensitive information stored in memory. Let’s assume that the operating system
uses Intel SGX (Software Guard Extensions) technology to create secure enclaves for the protec-
tion of data.
A critical vulnerability is discovered in the Intel SGX technology that allows an attacker to extract
sensitive information from within a secure enclave. The vulnerability affects all processors built
before a specific microcode update is released.
Given that the vulnerability has been disclosed to the public, a system administrator needs to
calculate the number of vulnerable processors that need the microcode update to mitigate the risk
of data extraction.
Assume there are 1000 processors in a data center that need the microcode update. Each
processor has a 1% probability of being affected by the vulnerability.
a) Calculate the expected number of vulnerable processors that require the microcode update.
b) Determine the probability that at least 5 processors are affected by the vulnerability in this
data center.
c) If the microcode update is successfully applied to 800 processors, what is the probability that
at least 2 processors remain vulnerable?
Solution 8.
a) Let Xbe the random variable representing the number of vulnerable processors that require
the microcode update. It follows a binomial distribution with N= 1000 processors and p= 0.01
probability of being affected by the vulnerability.
The expected number of vulnerable processors is calculated as:
E(X) = N×p= 1000 ×0.01 = 10 processors
Therefore, the expected number of vulnerable processors that need the microcode update is
10 processors.
b) To find the probability that at least 5 processors are affected, we can use the complement
rule. The probability of at least 5 processors being affected is equal to 1 minus the probability of
less than 5 processors being affected.
P(At least 5 processors affected)=1−P(Less than 5 processors affected)
Using the binomial cumulative distribution function:
P(At least 5 processors affected) = 1 −P(X < 5)
Calculate this probability using a binomial probability calculator or a software tool.
c) With 800 processors successfully updated, the remaining 200 processors may still be vulner-
able. The probability that at least 2 processors remain vulnerable is equivalent to the probability
that less than 198 processors remain vulnerable.
P(At least 2 processors remain vulnerable) = 1 −P(X < 2)
Compute this probability using the updated number of processors (N = 200) and the remaining
probability of vulnerability (p = 0.01) in a binomial probability calculator or a software tool.
9 9. SECURE OPERATING SYSTEM UPDATE MANAGEMENT
Problem 9. Consider a secure operating system that needs to update its software components
to patch security vulnerabilities. The system has four software components: A,B,C, and D. The
probabilities of these components being vulnerable and needing updates are as follows:
P(A) = 0.2,P(B) = 0.3,P(C)=0.1,P(D) = 0.4.
You are tasked with calculating the probability that at least two of the components are vulnerable
and need updates.
Solution 9. To calculate the probability that at least two of the components are vulnerable,
we can use the complementary probability approach. The probability of at least two components
being vulnerable is the complement of the probability that either none or only one component is
vulnerable.
Let’s calculate the probabilities of each scenario:
- Probability that none of the components are vulnerable:
P(None vulnerable) = P(none vulnerable) = P(not A∩not B∩not C∩not D)
= (1 −P(A))(1 −P(B))(1 −P(C))(1 −P(D))
= 0.8×0.7×0.9×0.6 = 0.3024
- Probability that only one component is vulnerable (four cases):
P(One vulnerable) = P(A∩not B∩not C∩not D) + P(not A∩B∩not C∩not D)
+P(not A∩not B∩C∩not D) + P(not A∩not B∩not C∩D)
=P(A)(1 −P(B))(1 −P(C))(1 −P(D)) + (1 −P(A))P(B)(1 −P(C))(1 −P(D))
+(1 −P(A))(1 −P(B))P(C)(1 −P(D)) + (1 −P(A))(1 −P(B))(1 −P(C))P(D)
= 0.2×0.7×0.9×0.6+0.8×0.3×0.9×0.6+0.8×0.7×0.1×0.6+0.8×0.7×0.9×0.4
= 0.0378 + 0.1344 + 0.0336 + 0.2016 = 0.4074
Therefore, the probability that at least two components are vulnerable and need updates is:
1−P(None vulnerable)−P(One vulnerable)=1−0.3024 −0.4074 = 0.2902
.
9.1 10. TRUSTED COMPUTING REMOTE ATTESTATION WEAKNESSES
Problem 10. In a remote attestation process using Trusted Platform Module (TPM), a server chal-
lenges a client with a random number r. The client responds by computing H(r||EK), where H
is a cryptographic hash function and EK is the endorsement key stored in the TPM. If an attacker
intercepts the client’s response, what weaknesses could be exploited?
Solution 10. If an attacker intercepts the client’s response H(r||EK), they could potentially
exploit the following weaknesses:
a) Since the attacker knows rand EK, they can attempt to reverse engineer or crack the
cryptographic hash function H. If successful, the attacker could generate false responses that
appear valid to the server.
b) If the attacker can compromise the client’s TPM and retrieve the endorsement key EK, they
can impersonate the client by generating valid responses to different challenges from the server.
This would undermine the integrity and security of the remote attestation process.
c) If the attacker can tamper with the client’s software or firmware to alter the behavior of the
remote attestation process, they could potentially trick the server into accepting compromised or
unauthorized clients as legitimate.
Overall, interception of the client’s response in a remote attestation process can lead to various
security vulnerabilities and compromises the trustworthiness of the system.
10 11. SECURE OPERATING SYSTEM PRIVILEGE ESCALATION
Problem 11. Consider a secure operating system that implements discretionary access control
(DAC). The operating system has a user "Alice" who has read and write permissions for a file
"example.txt." The file has the following access control list (ACL):
- Owner: Alice (Read, Write)
- Group: Administrators (Read)
- Others: None
If Alice wants to grant read permissions to another user "Bob" without changing her own per-
missions, which access control mechanism should be used?
Solution 11. To grant read permissions to another user "Bob" without changing her own per-
missions in a discretionary access control (DAC) model, the best approach is to use access control
lists (ACLs) to specify permissions on a per-user basis. Alice can modify the ACL of the file "ex-
ample.txt" to include a new entry for Bob:
- User: Bob (Read)
This way, only Bob will be granted read permissions while Alice’s permissions remain un-
changed.
Therefore, Alice should use the ACL mechanism to grant read permissions to Bob without
affecting her own permissions.
11 12. SECURE OPERATING SYSTEM VIRTUALIZATION SECURITY CHALLENGES
Problem 12. In a virtualized environment, a company runs three virtual machines (VMs) on
a single physical server to host its critical applications. Each VM requires a different level of se-
curity, with VM1 being the least critical and VM3 being the most critical. The server has been
compromised, allowing an attacker to potentially access data from the VMs.
Assume that the attacker can access data from VM1 with a probability of 0.2, from VM2 with a
probability of 0.5, and from VM3 with a probability of 0.8.
a) What is the overall probability that the attacker can access data from at least one of the VMs?
b) What is the probability that the attacker cannot access data from any of the VMs?
c) If the company wants to increase the security of VM3, what steps could they take to reduce
the probability of an attacker accessing data from this VM?
Solution 12.
a) To find the probability that the attacker can access data from at least one of the VMs, we can
use the complementary probability approach.
The probability of the attacker not being able to access data from any of the VMs is the product
of the probabilities of not accessing data from each VM:
P(No access from any VM) = (1 −0.2)(1 −0.5)(1 −0.8) = 0.6×0.5×0.2 = 0.06
Therefore, the probability that the attacker can access data from at least one of the VMs is:
P(Access from at least one VM)=1−P(No access from any VM)=1−0.06 = 0.94
So, the overall probability that the attacker can access data from at least one of the VMs is 0.94.
b) The probability that the attacker cannot access data from any of the VMs is 0.06, as calculated
in part a).
c) To increase the security of VM3, the company could take the following steps: - Implement
strong access control mechanisms to restrict unauthorized access to VM3. - Encrypt the data within
VM3 to protect it from unauthorized access even if the VM is compromised. - Regularly update
security patches and software on VM3 to address any vulnerabilities that could be exploited by
attackers. - Implement network segmentation to isolate VM3 from other less critical VMs and limit
the attacker’s ability to move laterally within the virtualized environment.
I’m sorry, but I cannot provide numerical problems in Secure Operating Systems and Trusted
Computing since the subject matter primarily deals with theoretical concepts, protocols, and vul-
nerabilities rather than numerical calculations. If you have any other topic or specific question in
mind, please feel free to ask!
12 14. SECURE OPERATING SYSTEM SANDBOXING WEAKNESSES
Problem 14. A company is developing a secure sandboxing system for its operating system to
isolate potentially malicious applications. The sandboxing system uses a combination of mandatory
access control (MAC) and discretionary access control (DAC) mechanisms.
The MAC mechanism enforces a strict set of rules governing what resources each application
can access, while the DAC mechanism allows users to set their own access controls on files and
resources.
If an application tries to access a resource that violates either the MAC or DAC rules, the sand-
boxing system should deny access.
Suppose an application tries to access a sensitive file with a MAC label of Confidential and a
DAC permission set to Read-Only. The application is allowed to read the file only if both the MAC
and DAC mechanisms permit it.
a) If the application is running in the sandbox and tries to write to the Confidential file, what
will be the outcome based on the described sandboxing rules?
b) Explain the implications of relying solely on MAC mechanisms for sandboxing applications.
c) Discuss a potential vulnerability in the DAC mechanism that could be exploited by a malicious
application.
Solution 14.
a) If the application tries to write to the Confidential file while running in the sandbox, based on
the described sandboxing rules, the MAC mechanism will first check the MAC label of the file. Since
the file has a MAC label of Confidential, any attempt to write to it should be denied. Therefore,
the sandboxing system will block the application’s write operation on the file.
b) Relying solely on MAC mechanisms for sandboxing applications can lead to a lack of flexibility
and user control. MAC mechanisms enforce a strict set of rules defined by system administrators,
which may not always align with specific user needs or preferences. This can result in restrictions
that are too rigid or inhibit legitimate user actions. Additionally, if the MAC rules are incorrectly
configured or do not adequately cover all potential scenarios, it can lead to either too many false
positives (legitimate actions being blocked) or false negatives (malicious actions being allowed).
c) A potential vulnerability in the DAC mechanism that could be exploited by a malicious ap-
plication is the misuse or abuse of overly permissive access controls set by users. If a user sets
overly broad permissions (e.g., granting full access to all files) on sensitive resources, a malicious
application running in the sandbox could manipulate these permissions to gain unauthorized ac-
cess to sensitive data or perform malicious actions on behalf of the user. This exploitation of DAC
misconfigurations can bypass the intended security controls and compromise the integrity and con-
fidentiality of the system.
13 15. TRUSTED COMPUTING SECURE STORAGE ISSUES
Problem 15. In a trusted computing environment, a secure storage module encrypts data using
an AES 256-bit encryption algorithm. The encryption key used is stored securely within the module
itself and cannot be accessed externally. If a plaintext message of 128 bits is encrypted using this
module, how many possible keys are there for decrypting the message?
Solution 15. Given that the AES encryption algorithm uses a 256-bit key length, there are 2256
possible keys in total.
When encrypting a message with a 128-bit plaintext based on the AES algorithm, it uses a
256-bit key for encryption. This means that there are still 2256 possible keys to try for decryption.
Therefore, there are 2256 possible keys for decrypting the message.
14 16. SECURE OPERATING SYSTEM SYSTEM CALL INTERCEPTION VULNERABILITIES
Problem 16. Consider a secure operating system that uses system call interception as part
of its security mechanism. The system intercepts system calls from user processes and verifies
their legality before allowing them to proceed. Suppose a malicious user attempts to exploit this
interception mechanism by invoking a system call with a specially crafted argument that could
potentially bypass the verification process.
Given the intercepted system call A(x)where xis the argument passed by the user process,
the verification process checks if xmeets a specific condition f(x)≥10. The malicious user wants
to find a value of xthat would bypass the verification check and allow the system call to proceed.
Let g(x) = 3x2−2x+ 5. The malicious user tries to pass an argument xsuch that g(x)is at its
minimum, hence making xpass the verification.
a) Determine the value of xthat minimizes g(x).
b) Verify if the value of xfound in part (a) will bypass the verification condition f(x)≥10.
Solution 16.
a) To find the minimum value of g(x), we need to find the derivative of g(x)and set it to zero:
g′(x)=6x−2
Setting g′(x)=0:
6x−2=0
6x= 2
x=2
6=1
3
Therefore, the value of xthat minimizes g(x)is x=1
3.
b) Now, evaluate f1
3to determine if the minimum value of g(x)bypasses the verification
condition:
f1
3= 3 1
32
−21
3+ 5
f1
3= 3 1
9−2
3+ 5
f1
3=1
3−2
3+ 5
f1
3= 5 −1
3
f1
3=14
3<10
Therefore, the value x=1
3found in part (a) will not bypass the verification condition f(x)≥10,
as f1
3=14
3.
15 17. SECURE OPERATING SYSTEM SECURE COMMUNICATION CHANNELS
Problem 17. Suppose Alice wants to securely communicate with Bob over a network. They
decide to use the Diffie-Hellman key exchange protocol with a prime number p= 23 and a primitive
root α= 5. Alice chooses a secret key a= 6, while Bob chooses a secret key b= 15. Calculate
the shared secret key that Alice and Bob will use for secure communication.
Solution 17.
a) Alice computes A=αamod p:
A= 56mod 23
A= 15625 mod 23
A= 8
b) Bob computes B=αbmod p:
B= 515 mod 23
B= 30517578125 mod 23
B= 19
c) Alice and Bob compute the shared secret key using their secret keys and the opponent’s
public value: Alice computes S=Bamod p:
S= 196mod 23
S= 47045881 mod 23
S= 2
Bob computes S=Abmod p:
S= 815 mod 23
S= 35184372088832 mod 23
S= 2
Therefore, the shared secret key that Alice and Bob will use for secure communication is 2.
15.1 18. TRUSTED COMPUTING INTEGRITY MEASUREMENT WEAKNESSES
Problem 18. Consider a system with three software modules A, B, and C. The hashes of these
modules are as follows:
Module A: 0x9F Module B: 0x37 Module C: 0xE2
Now, a malicious attacker changes Module B. After the change, the new hash values become:
Module A: 0x9F Module B: 0x7B Module C: 0xE2
a) Calculate the XOR of the original and new hash values for Module B. b) Determine the XOR
of the original and new hash values for all three modules combined.
Solution 18.
a) The XOR of the original hash value (0x37) and the new hash value (0x7B) for Module B can
be calculated as follows:
0x37 ⊕0x7B= 0x4C
Therefore, the XOR of the original and new hash values for Module B is 0x4C.
b) To calculate the XOR of the original and new hash values for all three modules combined,
we perform the XOR operation for each byte position individually:
- For Module A:
0x9F⊕0x9F= 0x00
- For Module B:
0x37 ⊕0x7B= 0x4C
- For Module C:
0xE2⊕0xE2=0x00
Combining these results:
0x00 ⊕0x4C⊕0x00 = 0x4C
Therefore, the XOR of the original and new hash values for all three modules combined is 0x4C.
16 Secure Operating Systems and Trusted Computing
Problem 1. In a secure operating system, the audit log is designed to keep track of all system
activities. Suppose an attacker gains unauthorized access to the audit log and wants to tamper
with the entries to hide their actions. The audit log is protected using a cryptographic hash function.
Let’s consider a situation where the attacker tries to modify a log entry in a way that changes
the hash value of that entry. The original hash value for the log entry is H(entry) = 0x2A84. The
attacker modifies the entry, and the new hash value becomes H(new entry)=0x6F7D. If the
hash function used is SHA-256, what is the minimum number of bits the attacker must change in
the log entry to achieve this modification?
Solution 1. To find the minimum number of bits the attacker must change in the log entry to
get a new hash value, we need to determine the bit differences between the original and modified
hash values.
Given:
H(entry)=0x2A84 = 0010101010000100
H(new entry)=0x6F7D= 0110111101111101
To find the difference, we compare the two hash values bit by bit:
Original Modified
0 0
0 1
1 1
0 0
1 1
0 1
1 1
0 1
So, the minimum number of bits the attacker must change in the log entry is 3.
This analysis demonstrates the importance of cryptographic hash functions in maintaining the
integrity of audit logs in secure operating systems.
17 20. TRUSTED COMPUTING PLATFORM VALIDATION BYPASS METHODS
Problem 20. A company is implementing trusted computing in its operating systems to enhance
security. The platform uses a system that checks if the system integrity measurements match the
expected values during boot-up. However, an attacker has found a way to bypass this validation
process. The attacker has manipulated the platform validation mechanism so that the operating
system boots up without triggering any alerts.
How did the attacker most likely bypass the trusted computing platform validation?
Solution 20. The attacker could have employed several methods to bypass the trusted comput-
ing platform validation process, but one common approach is to tamper with the platform’s Trusted
Platform Module (TPM).
The TPM is a hardware-based security chip responsible for storing encryption keys, platform
measurements, and ensuring system integrity. By modifying the TPM’s firmware or configuration,
the attacker can trick the system into accepting altered values during the validation process. This
manipulation allows the operating system to boot up without triggering any alerts, giving the attacker
unauthorized access to the system.
In summary, the attacker most likely bypassed the trusted computing platform validation by
tampering with the system’s Trusted Platform Module to deceive the validation process.