This is an open-notes, open-Internet, open-book final. You may discuss it with other students, but you must each do your own write-up. We'll talk about the details of acceptable collaboration in class.
Hand in via your CS231 github repository, in final/final.pdf
(20 points) TLS redux
You did a lab exercise on TLS a few weeks ago, but with no associated homework, so we're going to revisit it now.
Is this protocol enough to guarantee to Alice that she's talking to the real Bob? (Hint: no.) What's missing?
List as succinctly as you can the sequence of communications between Alice and Bob that make up a typical TLS handshake initiated by Alice. Annotate each item in your list with a reference to the TLS RFC, showing where exactly the contents of your list item are described in the RFC. (Section 7.3 is a good place to get oriented in the spec, but the precise details of the handshake messages are described later.)
Assume that this is an asymmetric situation analagous to your browser (Alice) visiting a website like github.com (Bob), where Bob isn't expecting Alice to have a certificate. You may also assume that the parties make choices that correspond to stuff we have studied (e.g. RSA, not elliptic curves, and regular DH, not some other key exchange protocol).
My goal here is for you to illustrate that you understand the steps of the TLS handshake and how they connect to the kinds of ideas we were working with in the cryptographic scenarios assignment. With that in mind, you need to construct your list in terms of things like "Alice generates and stores a random integer X" followed by "Alice sends gX mod p to Bob". Precise, short, minimal discussion.
Please write your answer as a list rather than as continuous prose. Also, to whatever extent you can, use functional notation like SK(M) or DA(EB(M)). Short list items and mathematical notation make this kind of thing much easier to understand and evaluate, so thanks for making the effort.
(20 points) ARP Spoofing
We have spent a lot of time this term worrying about Mal and how to thwart person-in-the-middle attacks. What we haven't done, however, is discuss practical techniques for becoming a person-in-the-middle. This section of this exam concerns a well-known PITM attack: ARP spoofing.
In the questions below, I will refer to "network interfaces" and their attributes. An interface in this context is a software object roughly analogous to a physical networking device. For example, when I open a terminal on my Mac and run "ifconfig", I see a list of interfaces and their attributes. There's "en0" which corresponds to my wireless network device. There's also en1, en2, en3, and en4, each of which corresponds to one of my USB-C jacks in the sides of my laptop (they're all capable of connecting me to an Ethernet if I have the right adapter). And there's lo0 (the "loopback interface"), which gives me a way of treating my own laptop as just another computer on the network.
When I run ifconfig on my Kali virtual machine, I see two interfaces. There's lo, the loopback, and eth0, which is my Kali VM's interface to whatever network my actual hardware is connected to. As I type this, eth0 on the VM is indirectly connected to my laptop's wireless card, but from Kali's point of view, it doesn't matter—eth0 is just another network interface.
Network interfaces in all the contexts we're working in are associated with 48-bit "MAC addresses" (medium access control). When the interface is associated with a hardware device, the MAC address is actually physically built into the device. When an interface is a software entity (like eth0 on my Kali VM), the MAC address is some sort of randomized 48-bit number. Either way, it generally works to think of this as a "hardware address" that can't be changed. In contrast, an IP address is a more abstract address that can be moved from device to device based on the needs of the owner of the IP address.
To give you a little sense of the uses of IP addresses and MAC addresses, consider this common situation. Suppose you type "http://somenewwebsite.org/" in your browser's address bar. Then your computer does something like this:
The point is that you use an IP address to refer to any computer on the internet. But to actually send any data packet to the first machine along the packet's path to its destination IP address, you have to know the first machine's MAC address.
With all that as background, please answer the following, using either the VirtualBox setup in Weitz 138 or an equivalent setup on your own computer.
(15 points) Find me an exploit
Metasploitable is set up with a ton of vulnerabilities. Your job for this section is to find a Metasploitable vulnerability that you find interesting, and describe it to me. Whatever you choose should work on the Weitz 138 VirtualBox setup, going from the attacking VM (Kali) to the target VM (Metasploitable). Your description of your chosen exploit will consist of two parts.
(3 points) Have a great break