Final 2021
Final 2021
Final 2021
Final
Name:
6.S060 Final Name: 2 of 24
• This is an open book exam: you can use your notes from this class, or any material released
by us this term. You cannot use the internet. Use of any material not released by us this term
is strictly forbidden.
• Any form of collaboration is strictly forbidden.
• If you need assistance clarifying a question in the exam, raise your hand and a proctor will
come by.
• Point totals correspond roughly to how much time we expect you to spend on each problem
(part).
6.S060 Final Name: 3 of 24
(c) [2 points] One way to construct a secure signature scheme for arbitrary length messages is
with the “hash-and-sign” paradigm.
(f) [2 points] If a client and server communicate using transport layer security (TLS), an eaves-
dropper in the middle of the network can learn the IP addresses of the client and server.
(g) [2 points] A CCA-secure encryption scheme hides the length of the plaintext.
(h) [2 points] It is impossible to update the lowest level Boot Read-Only Memory (ROM) in an
iOS device.
(i) [2 points] If you live in Belgium and connect to the Internet via a U.S.-based VPN provider,
your Belgian ISP learns no information about your browsing behavior.
(j) [2 points] You connect to a Google server via an encrypted TLS connection. Your ISP can
distinguish between the cases in which (a) you watch a 30-minute episode of Stephen Colbert
on YouTube and (b) you watch a 30-second cat video.
6.S060 Final Name: 4 of 24
(b) [5 points] How many hashes will the adversary need to compute in order to guarantee guess-
ing the passwords of all users on a specific server?
(c) [5 points] How many hashes will the adversary need to compute in order to guarantee guess-
ing the passwords of all users on all servers?
6.S060 Final Name: 5 of 24
(b) [5 points] Show how to upgrade the security to CCA security given a MAC scheme for mes-
sages of arbitrary length.
6.S060 Final Name: 6 of 24
The Google cookie value is a secret 32-byte hexadecimal string—e.g., 1FAB8AEEC9· · · 9809D9BC02.
(Each hexadecimal character in ASCII takes one byte to represent.)
The GET request travels to Google over an encrypted TLS connection. Recall that TLS encryption
increases the length of the plaintext by a fixed amount.
Say that your browser compresses the GET request string before encrypting it. The compression
algorithm has the property that:
• If there is no repeated 4-byte string in the GET request, the output is L bytes long.
• If there are r repeated 4-byte strings in the GET request, the output is L − r bytes long.
(a) [5 points] Show that if the attacker can guess the first 4 bytes of your Google cookie value, it
can confirm that its guess was correct.
6.S060 Final Name: 8 of 24
(b) [5 points] Show that if the attacker can cause your browser to load 216 URLs, it can recover
the first 4 bytes of your Google cookie.
(c) [5 points] Show how the attacker can recover your entire Google cookie by loading ≪ 220
URLs. You may assume that the cookie itself contains no repeated 4-byte strings.
6.S060 Final Name: 9 of 24
What security problems could arise from using OCSP like this?
6.S060 Final Name: 10 of 24
(b) [5 points] An alternative to OCSP is certificate revocation lists (CRLs). When using CRLs,
the certificate authority includes in each certificate the URL of a CRL file. The client can fetch
this signed CRL file, which contains a list of all certificates that the certificate authority has
revoked. In this way, the client can check whether a particular certificate has been revoked.
Explain how a malicious certificate authority could abuse this process to learn which clients
are visiting which websites.
6.S060 Final Name: 11 of 24
(b) [5 points] Ben allows virtual machines to dynamically manage their memory allocations. In
particular, he adds special calls from the virtual machine into the virtual machine monitor that
allow the VM to either allocate more pages of memory, or to give some pages of memory back
to the shared global set of free pages. When allocating or freeing memory, the virtual machine
monitor ensures that page tables are properly updated, so that at most one virtual machine has
a page of memory mapped in its page tables at a time.
Does this design provide strong non-interference between virtual machines? Explain why or
why not.
6.S060 Final Name: 15 of 24
void f() {
if (input[0] != input[1])
return;
(a) [5 points] How many inputs, on average, will a purely random (not coverage-guided) fuzzer
need to trigger the call to crash()?
(b) [5 points] How many inputs, on average, will a coverage-guided fuzzer need to trigger the
call to crash()?
6.S060 Final Name: 16 of 24
if (x > 4096) {
return;
}
if (x < 16) {
crash();
}
}
(a) [10 points] Which of the following queries will a symbolic execution issue to its SAT solver?
Check all that apply.
1. ((x mod 2) == 0)
2. ¬((x mod 2) == 0)
3. (x > 4096)
4. ¬(x + 1 > 4096)
5. (x + 1 > 4096) ∧ ((x mod 2) == 0)
6. (x + 1 > 4096) ∧ ¬((x mod 2) == 0)
7. (x < 16) ∧ (x > 4096) ∧ ((x mod 2) == 0)
8. (x < 16) ∧ ¬(x > 4096) ∧ ¬((x mod 2) == 0)
9. ¬(x + 1 < 16)
10. ¬(x < 16) ∧ (x > 4096) ∧ ¬((x mod 2) == 0)
6.S060 Final Name: 17 of 24
(b) [5 points] How many execution paths will the symbolic execution engine explore in executing
f(x)?
6.S060 Final Name: 18 of 24
For each of the user’s applications, the Python host embeds the application program in a separate
sandboxed instance. friends.c is the source code for a distributed public key infrastructure
application where users produce signed attestations of friendship (similar to that of lab 2):
payment.c is the source code for an application where users sign transactions for a payment
system:
The programs above are compiled into auth.wasm, friends.wasm, and payment.wasm
before they are instantiated, and the Python host allows the applications to call the hash and
sign functions exported by auth.wasm.
Assume the following:
(a) [5 points] How many bytes are copied from the payment.wasm sandbox to the auth.wasm
sandbox memory by the Python host in a single call of authorize_payment? Explain
your answer.
(b) [5 points] Suppose that an attacker can make arbitrary calls to authorize_payment. Can
the attacker certify a malicious public key as a friend? Explain why or why not.
(c) [5 points] Suppose that an attacker can make arbitrary calls to certify_friend. Can the
attacker authorize a malicious payment? Explain why or why not.
6.S060 Final Name: 20 of 24
where dist(D, D′ ) = 1 if and only if D′ can be obtained from D by changing one record in D.
Any possible record has a single value that is in between the minimum value a and maximum value
b.
What is the global sensitivity when f is the median?
In order to get ϵ-differential privacy, what noise distribution should we add to the outcome f (D)?
6.S060 Final Name: 21 of 24
(c) [5 points] In the next questions, assume that check_password is secure and satisfies tim-
ing independence as defined earlier. Bob would like to use it to perform some access control
into his secure server. He hopes his scheme respects the following properties:
• Correctness: The algorithm will return True if the given username correspond to an
existing user on the server and the associated password is the exact same one as provided
by the user.
• Security: The algorithm will return False if the username is not registered on that ma-
chine or the password is not the one associated with the given username.
• Timing Independence: The execution timing of the algorithm should not help a potential
attacker to recover any information regarding other users of the server.
He writes the following code:
def has_access(username, password):
if username not in user_password_dict:
return False
else:
return check_password(password, user_password_dict[username])
Can an attacker recover any sensitive information regarding the secure server using a timing
attack? Can this have an impact on security?
(b) [3 points] How important to you are the breadth of covered topics (authentication, encryption,
systems, software, hardware, privacy, human factors, etc); the depth in each of the topics; and
the connection between the topics? Which of these needs the most improvement the next time
we teach this class?
(c) [2 points] How did taking this class affect your thinking about taking other security-related
classes such as 6.857, 6.858, and 6.875?
(d) [2 points] What was your favorite part of the lab assignments that we should keep, and what
was the most tedious / least favorite aspect that we should fix?