Monash University Faculty of Information Technology FIT2093 Introduction to Cybersecurity S1 2021: In-Semester SAMPLE Test CAMPUS: CLAYTON / MALAYSIA Instructions to Candidates: ● There are two parts to this test: Part A (30 marks, multiple choice questions) and Part B (70 marks, short answer questions). ● This In-Semester test is worth 10% of your final unit mark. ● Answer all questions in a separate document. ● For Part A, each MCQ is allocated 2 marks. For Part B, marks for each question are indicated at the beginning of each question and sub-question. ● The duration of this test is 120 minutes (2 hours), which includes a reading time of 10 minutes. PART A (30 marks) Choose the correct answer a)-d) for each of the following questions. 1. Which of the following machine learning technique is commonly used to predict numerical values? a) binary classification b) clustering
c) regression d) reinforcement
2. Of the following, the mode that has an error propagation effect is: a) ECB b) CBC c) CTR d) all the above have the same error propagation 3. ShiftRows is a basic component of AES which is used to achieve ___________. a) Substitution b) Diffusion c) Confusion d) All of the above 4. When an attacker performs a capture of a data unit and its subsequent retransmission to produce an unauthorized effect, which attack is he performing? a) Disruption b) Replay c) Masquerade d) Service denial 5. What method is used in UNIX password system to prevent precomputation attack? a) Root access only
b) Encryption c) Hashing
d) Salting
6. Which of the following statement about the password management in UNIX is correct ? a) /etc/passwd contains password hashes and is accessed by all users b) /etc/passwd contains password hashes and is only accessed by root c) /etc/shadow contains password hashes and is accessed by the privileged users d) /etc/shadow contains password hashes and is only accessed by root 7. What is the number of symmetric key encryption keys Alice needs to keep to receive private messages from 10 people, so that a message sent by each person can only be read by Alice and the sending person? a) 2 b) 10 c) 20 d) 45 8. Which kind of error is most relevant for biometric security? a) False Rejection Rate (FRR) b) False Acceptance Rate (FAR) c) Equal Error Rate (EER) d) none of the above 9. A file with UNIX permissions rw-r---w- allows a) the owner to read only b) the owner’s group to read and write c) anyone to write d) all of the above 10. The property of ________ ensures that the sender of a message cannot later claim that the message was never sent. a) Access control b) Authentication c) Authenticity d) Non-repudiation 11. The property of password hash functions that prevents exposure of the passwords (assuming brute force dictionary search is infeasible) is: a) efficient b) reversible c) one-way d) none of the above 12. Which of the following Machine Learning technique is used for monitoring unusual network traffic? a) Biometric b) Lie Detection c) Anomaly Detection d) none of the above 13. A software application allows users to enter the name of a file system folder to view, and the application processes such inputs by incorporating them into a file system command string and forwarding the string for execution by the operating system. Which kind of vulnerability should be prioritised as the most important to analyse this application for? a) buffer overflows b) command injection c) integer overflows d) none of the above 14. What kind of mitigation technique cannot be used to reduce the risk of offline dictionary attacks against password authentication systems: a) adding a random salt when hashing passwords b) locking out an account after several unsuccessful login attempts c) using a slow password hash function d) using strong access control to control exposure of password hash file 15. In a typical programming language (e.g. C), suppose x is an 8-bit (byte or character) unsigned integer variable (with max. possible value 255) . If the decimal value of x is 250 before the statement “x = x + 10;” is executed. What would likely be the value of x after the statement is executed? a) 255 b) 250 c) 4 d) 249 END OF PART A PART B (70 Marks) Write your answers for each of these questions. Q1.
(14 marks) Figure 1 below shows the round function of a simplified variant of the AES block cipher for each round. It involves Substitute Bytes, Shift Rows and Add Round Key: ● Substitute Bytes: use S-Box to perform byte-by-byte substitution of the block. S-Box substitutions are defined in Table 2 (see Reference material below), which is interpreted as follows: Each individual byte is divided into leftmost 4 bits and rightmost 4 bits. Leftmost 4 bits are used as the row value while the rightmost 4 bits are used as column values. {95} refers to row 9 and column 5, thus {95} is mapped to {2A}. ● Shift Rows: The 1st row is not changed. The 2nd row is circularly left shifted by 1 byte. The 3rd row is circularly left shifted by 2 bytes and the 4th row is circularly left shifted by 3 bytes. ● Add Round Key: XOR the output from Shift Rows. A message is divided into the blocks of 128-bit each and the 128 bits are arranged in a 4x4 byte matrix. The input bits R1...R128 in the first round are specified in the Table 1, the round key bits K1...K128 are all ones, and 16 S-box is specified in Table 2, see Reference material at end of test). (a) (7 marks) Write the 128-bit output of Substitute Bytes as a 4 x 4 byte matrix in HEX. Show your working. (b) (7 marks) Write the 128-bit output of the Shift Rows as a 4 x 4 byte matrix in HEX. Hint: A hexadecimal digit can be represented directly by 4 binary bits (and vice versa): 0: 0000 1: 0001 2: 0010 3: 0011 4: 0100 5: 0101 6: 0110 7: 0111 8: 1000 9: 1001 A: 1010 B: 1011 C: 1100 D: 1101 E: 1110 F: 1111 Figure 1: Simplified AES round function 00 00 FF FF 00 00 FF FF 00 00 FF FF 00 00 FF FF Table 1: Inputs Table 2: S-Box in AES 128 bits Q2. (14 marks) (a) (7 marks) In phone-based MFA systems such as the Okta phone app used by Monash, explain the purpose of the phone app for security. b) (7 marks) The Okta phone app in offline mode uses a number code derived from the time of day (to a resolution of about one minute) and asks the authenticating user to type the code into their web browser. Explain how a phishing attacker could potentially break this MFA system. Q3. < Vigenère cipher > (14 marks) The Vigenère cipher is a polyalphabetic cipher that uses the values of the letters of a secret key to shift the letters of a plaintext. The operation is done by repeating the secret key word to create a key which is as long as the message and then adding the values of the letters of the key to the letters of the plaintext. The result will be calculated mod 26 to make sure the ciphertext will also be comprised of letters. For plaintext P and (expanded) key K, the i-th letter Ci in the ciphertext C is computed by: Ci = (Pi + Ki) mod 26. Given the key CRYPTO and the plaintext GOODLUCKWITHEXAM, (a) (7 marks) Write the expanded key K (b) (7 marks) Write the ciphertext C in letters. Show the encryption process. Note: You can use the values assigned by Table 3 (see Reference material at end of test) for each letter. Q4 (14 marks) The attacker Marvin managed to read the password hash file of Alice’s account. Marvin knows that Alice usually chose a random 10-digit numerical password (from 0000000000 to 9999999999). Marvin is using a 8-core CPU and a single CPU core in Marvin’s machine can compute 106 SHA-2 hash function evaluations per second. Suppose the password hashing key derivation function runs 1,000 SHA-2 evaluation rounds with a 20-bit salt and Marvin’s password cracking tool can compute different hash values on all CPU cores in parallel. (a) (7 marks) Suppose Marvin is trying a brute-force attack by using some password cracking tool. Estimate how many seconds in the worst case (to the nearest power of 10) does it take for Marvin to break Alice’s password? Show your working process. (b) (7 marks) For his next target, Marvin plans to hack into another server Mybirthday.com which uses the same hashing algorithm and salt length as Alice’s account. Marvin heard rumors that many users of the Mybirthday.com server chose someone’s birthday as their password. To prepare for his upcoming attack, Marvin wants to try a pre-computation based dictionary attack. Estimate number of birthday dates that can be used as password? Assuming the user choose birthday from someone born in past 90 years and none picks 29th Feb. Note: Use the approximation 220 ≈ 106 Q5. (14marks) Read the following C source code with vulnerabilities and answer the questions: Hint: Use the ANSI C function reference at the following link: https://www.csse.uwa.edu.au/programming/ansic-library.html 1 #include 2 #include 3 4 void doit(void) 5 { 6 char buf[8]; 7 8 gets(buf); /* built-in function gets() to read input*/ 9 printf("%s\n", buf); /* print the inputted string, buf */ 10 } 11 12 int main(void) 13 { 14 printf("So... The End...\n"); 15 doit(); /* Call self-written function doit()*/ 16 printf("or... maybe not?\n"); 17 18 return 0; 19 } (a) (7 marks) Identify one vulnerability from the source code. Show the name of the vulnerability and the position (i.e. line number or the relevant source code) of the vulnerability. (b) (7 marks) Describe how to modify the source code to mitigate the vulnerability you find in part (a). How should it be modified to mitigate the vulnerability? END OF TEST 欢迎咨询51作业君