The goals of this assignment are getting hands on with digital signatures and certificates, to understand malware, get hands on with some malware detection technology and more.
Create and Use a new Branch
We will create a new git branch called
hw4 for use in this assignment. The branch you create must exactly match the one I’ve given you for you to receive any credit for this homework.
Prior to creating this new branch make sure your working directory is “clean”, i.e., consistent with the last commit you did when you turned in homework 3. Follow the procedures in GitHub for Classroom Use to create the new branch, i.e.,
git checkout -b hw4. Review the section on submission for using push with a new branch.
README.md for Answers
You will modify the
README.md file in your repo to contain the answers to this homework.
Question 1. (10 pts)
(a) Multiple choice Chapter 8
Questions from Chapter 8 of the course text:
(b) Secure Hashes
As in the course notes compute the SHA256 hash of a text file. It can be any file but it needs to be longer than 3kB. Change one character in the file. Recompute the hash. Change that character back to its original value and recompute the hash.
Show the following:
- Name of the file and its length
- Original hash of the file in hex.
- Hash of the modified file in hex.
- Hash of the file after you undid the change.
(c) Key Exchanges
Like in the course notes you will perform a key exchange using public key cryptography to yield a shared secret key for use in symmetric cryptography. See X25519 key exchange.
Use the following Python imports:
from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey from cryptography.hazmat.primitives import serialization
Also use code like the following to print out public keys in a standard text format:
Do and answer the following:
- Generate X25519 private and public keys for a user named Alice. Show Alice’s public key here in standard format.
- Generate X25519 private and public keys for a user named Bob. Show Bob’s public key here in standard format.
- Have Alice generate a secret key for use with Bob. Which of Bob’s key’s should key get and use. Use the X25519 key exchange algorithm. Show the hex for this secret key.
- Have Bob generate a secret key for use with Alice. Which of Alice’s key’s should key get and use. Use the X25519 key exchange algorithm. Show the hex for this secret key.
- Are the symmetric secret keys that Alice and Bob generated the same?
- How long are the symmetric secret keys generated? Which symmetric algorithm can use a key of this length?
Question 2. (10 pts)
(a) WireShark and TLS Capture
Use WireShark to capture the TLS handshake when you open a new browser tab or window to a website different from what I showed in class. Then do and answer the following:
- Take a screenshot of the Client Hello packet. I get something like:
How many different cipher suites is you client willing to accept? List the first five here.
Take a screenshot of the Server Hello packet. I get something like:
- What cipher suite did the client and server decide to use? In particular what was the block cipher? What was the block cipher mode? And what was the cryptographic hash algorithm?
Visit a website supporting HTTPS (Chrome is easiest to get certificate information from) and answer the following questions about the X.509 certificate for the website:
- Who is the certificate issued to?
- What is the certification path, i.e., who signed the certificate
- What is type and length of the public key
- What signature algorithm was used?
- What are the validity dates?
(c) Digital Signatures
As in the course slides you will use Elliptic curve public key cryptography to (securely) sign and verify a message. Reference ED25519.
Do and answer the following:
- Create Ed25519 private and public keys.
- Show your public key in a standard text format here.
- Create a simple text message (it must be different from mine in the class notes)
- Generate a signature with Ed25519. How long is the signature? Which key was used to generate the signature.
- Verify the signature using the Ed25519 algorithm. Which key did you use to verify the signature?
- Modify the message by one character. Try to verify the modified message against the signature.
Show your Python code here.
Question 3. (10 pts)
(a) CyBOK Malware Dimensions
Read section 1 of Malware & Attack Technologies. What are the “six dimensions” of Malware that they discuss?
(b) Advanced Malware Study
Read the A Deep Dive into Lokibot Infection Chain from January 2021 and answer the following questions.
- What is the malicious goal of Lokibot?
- What is the prime attack vector, i.e., how does it first get into a system?
- What language do the current targets speak?
- What techniques does the Malware use to hide itself?
- What is a dropper?
- What is UAC and why is Lokibot trying to bypass it?
(c) Testing AntiVirus Software
Go to the Anti Malware Testing Standards Organization (AMTSO) security features check and run the following tests and report how your system did.
- Detects Manually Downloaded Malware
- Detects drive-by downloads of malware
- Detects compressed malware
If your system did not automatically detect all these threats what safeguards could you take to enhance your security?
Question 4. (10 pts)
In this question we are going to get hands on with YARA. You will need to install the simple YARA command on your system per the instructions. Note: you do not need to build it. The YARA Zip with executables for Windows was around 2MB, i.e., pretty small.
We are going to use YARA to detect some file formats from their contents and not their file extension. See the page File signatures for information on many file types.
(a) Detect JPEG files
Write a YARA rule to detect JPEG files. Show that rule here.
(b) Detect PNG files
Write a YARA rule to detect PNG files. Show that rule here.
(c) Detect Zip files
Many email systems prevent the sending of Zip files so users give the file a different extension. Write a YARA rule to detect Zip files. Show that rule here.
Question 5. (10 pts)
It is time to get started with the research projects. The theme this semester is privacy and in particular privacy on the Web. Choose one or more of the following potential topics:
- Web Tracking: Who is tracking you and why?
- How they track us around the web: Current Techniques and technologies what are they?
- Ad blocker extensions for browsers: Which are tracking you? How do they work?
- Privacy enhancing tools: What is Firefox and/or Chrome doing to help or hurt?
- Browser privacy extensions: do they help? how do they work?
Our goal is a report at the end of the semester suitable for explaining the techniques or technology in a way that gets to the computer science roots of the issue and is understandable by a student in CS671 (or CS351/CS651 web development).
You will start by performing searches to gather online references. Find approximately five references on one of the topics listed above. Make sure that you find a range of coverage, i.e., some general information, some very technical information. List those references here with your initial assessment of the usefulness of the references and the level of technical depth.