Wagner Spring 2014 CS 161 Computer Security Midterm 2: (Last) (First)
Wagner Spring 2014 CS 161 Computer Security Midterm 2: (Last) (First)
Wagner Spring 2014 CS 161 Computer Security Midterm 2: (Last) (First)
You may consult one sheet of paper (double-sided) of notes. You may not consult other
notes, textbooks, etc. Calculators, computers, and other electronic devices are not permitted.
Please write your answers in the spaces provided in the test. We will not grade anything on
the back of an exam page unless we are clearly told on the front of the page to look there.
You have 50 minutes. There are 8 questions, of varying credit (100 points total). The
questions are of varying difficulty, so avoid spending too long on any one question.
Do not turn this page until your instructor tells you to do so.
Question: 1 2 3 4 5 6 7 8 Total
Points: 16 16 10 12 17 7 12 10 100
Score:
Page 1 of 10
Problem 1 True or False (16 points)
Circle True or False. Do not justify your answer.
(a) True or False: Firewalls are commonly deployed because they never affect func-
tionality.
(b) True or False: No intrusion detection system is capable of detecting novel attacks.
(c) True or False: Full TCP reassembly is sufficient to implement a network intrusion
detection systems (NIDS) that stops all evasion attacks.
(d) True or False: A host-based intrusion detection system (HIDS) is harder to evade
than a network intrusion detection system (NIDS) because a HIDS has access to
application-layer semantics.
(e) True or False: The false positive and false negative rates of a given intrusion
detection system provide enough info to classify it as “good” or “bad” at detecting
threats.
(f) True or False: The Kaminsky attack is an on-path attack; off-path attackers
cannot mount a Kaminsky attack.
(g) True or False: On-path attackers can successfully eavesdrop on the data sent
over a TCP connection.
(h) True or False: Off-path attackers can successfully eavesdrop on the data sent
over a TCP connection.
(b) True or False: Off-path attackers can successfully tamper with (i.e., modify) the
data sent from Alice’s web browser to http://www.cnn.com/.
(c) True or False: DHCP spoofing only affects the integrity of DNS lookups and has
no practical effect on web security.
(d) True or False: Diffie-Hellman is secure against passive eavesdroppers who cannot
modify packets or send forged packets.
(f) True or False: Cryptographic hash functions are required to be one-way and
collision-resistant.
(g) True or False: The IV in CTR mode (counter mode) must be kept secret.
(h) Alice and Bob share a symmetric key k. Alice sends Bob a message stating, “I owe
you $100”, and also sends a message authentication code (MAC) on this message
computed using the key k.
True or False: Assuming the MAC algorithm is secure, Bob can now go to his
bank and prove to the bank teller that Alice does indeed owe him $100 by giving
his key k to the teller.
(b) Suppose that we have deployed a stateful packet filter (as in part (a)) at the border
of our network, where it connects to the rest of the Internet. Now imagine that an
employee’s laptop has been infected with malware. Could the malware exploit the
VSFTPd vulnerability? Why or why not?
(b) What is the consequence of this mistake? In other words, what is the risk that it
introduces and how many of Joe’s users could be affected? Does it affect only users
whose password hashes are available in Google search, or does it go beyond that?
(c) How should Joe store passwords? More specifically, if a user’s password is w, what
should Joe store in the database record for that user?
(b) The relevant gdb output below is from before you feed in your malicious input.
(gdb) x/8x door
0xbffff9b8: 0xbffffa7c 0xb7e5f225 0xb7fed270 0x00000000
0xbffff9c8: 0xbffff9d8 0x0804842a 0x08048440 0x00000000
(gdb) i f 0
Stack level 0, frame at 0xbffff9d0:
eip = 0x8048412 in deja_vu (dejavu.c:7); saved eip 0x804842a
Locals at 0xbffff9c8, Previous frame’s sp is 0xbffff9d0
Saved registers:
ebp at 0xbffff9c8, eip at 0xbffff9cc
What should you see if you run x/8x door after the malicious input has been fed
in but before the shellcode executes? Assume that the exploit was successful, and
the bare minimum was changed in memory. Your solution should have at least one
4-byte chunk of shellcode.
0xbffff9b8:
0xbffff9c8: