Changes

Jump to: navigation, search

SRT210 Lab 7

1,212 bytes added, 21:06, 22 March 2019
Objectives
= Objectives =
* Understand the basics of public key encryption from a practical point of view.* Set up a Certificate Authority.* Create certificate+key pairs for servers, signed by your own CA.* Set up Apache to serve pages over HTTPS.
= PART 1: ENCRYPTION FOR NETWORK SERVICES =
# Again acting as the '''CA''': export the certificate and key (i.e. the public key and the private key) as .pem files. The extension .pem doesn't imply what the contents are, it's just a format that is typically used to store keys. You want to export the key without a passphrase, unless you want to type in a password every time your server reboots:<br />[[File:TinyCAExportCert.png]]<br /><br />[[File:TinyCAExportKey.png]]
# That key pair (private + public key) is what you'll need to use to set up your servers. These specific ones you generated here aren't particularly useful because they're for the server yourusername.ops, and you don't have a server with that hostname. But the process is identical for every keypair you'll need to generate in this lab.
# You don't normally need to configure your web browsers because they come with a collection of tusted CAs but since we created our own, we'll need to save the CA certificate also, so that later we can manually add it to Firefox:<br />[[File:TinyCAExportCACert.png]]
= PART 2: ENCRYPTION FOR APACHE(HTTPS) =
* Use nmap on lin1 and on c7host to confirm that the port used for HTTPS is open.
* If all of the above worked, use Firefox on c7host to go to https://lin1.yourusername.ops. You should see a security warning. Do not click through it, we'll fix it in another way.
[[File:ConnectionNotSecure.png]]
* Go to the Firefox Preferences, and add a root authority certificate, like so:
[[File:FirefoxAddCA.png ]]
* Now you should be able to go to https://lin1.yourusername.ops without any warnings. Furthermore, if you had more web servers: you could use your new CA to create keys for many of your own servers, and you could use those keys not just for web servers but for mail servers, LDAP servers, etc.
= PART 3: SNIFFING HTTPS TRAFFIC =
* Go through the exercise again of sniffing the traffic between <code>alice</code> and <code>lin1</code> using tcpdump while you log in to your webpage in Firefox.
* Open the resulting file in Wireshark and see if you can still find your password there.
= Lab completion =

Navigation menu