Docsity

Midterm Exam, Version 1 for Embedded Systems | CS 5950, Exams of Computer Science

Toggle sidebar
bg1
CS 5950/6030: Network Security — Fall 2005
M A S T E R
Please note that answers are more detailed than required for full credit.
This is in order to give you a credit for any partial answers (e.g., if you include one
subcase for, say, the case of limitations of testing, you get a credit for the full case).
Midterm Exam
-- Version 1 --
First Name ________________________ Last Name: ________________________
Row___________ Seat ________
>>> Please do NOT open this exam booklet until <<<
>>> the instructor gives a clear signal to start. <<<
Question
Nr
Max. Score Your Score Comments
1 5
2 10
3 15+10
4 10
5 20
6 10
7 10
8 10
9 10
TOTAL 100+10
Notes:
•Sign the front page now. After the signal to start, sign all pages.
•You can use both sides of exam booklet if needed.
•You may have 1 sheet of notes, front and back. >>> If you plan to use an extra sheet, you
must sign it now! <<< Turn in the sheet of notes with your exam.
•If you are unsure of a question, write down your assumptions regarding the question.
Remember, I cannot guess what you are thinking, let me know your thought process for at
least partial credit.
•Write clearly. Illegible answers will not be graded.
•You will have 45 minutes to complete the exam.
Good luck!
Midterm Exam, CS 5950/6030 — Fall 2005
pf3
pf4
pf5

Partial preview of the text

Download Midterm Exam, Version 1 for Embedded Systems | CS 5950 and more Exams Computer Science in PDF only on Docsity!

CS 5950/6030: Network Security — Fall 2005

M A S T E R

Please note that answers are more detailed than required for full credit.

This is in order to give you a credit for any partial answers (e.g., if you include one

subcase for, say, the case of limitations of testing, you get a credit for the full case).

Midterm Exam

-- Version 1 --

First Name ________________________ Last Name: ________________________

Row___________ Seat ________

**>>> Please do NOT open this exam booklet until <<<

the instructor gives a clear signal to start. <<<**

Question Nr

Max. Score Your Score Comments

TOTAL 100+

Notes :

  • Sign the front page now. After the signal to start, sign all pages.
  • You can use both sides of exam booklet if needed.
  • You may have 1 sheet of notes, front and back. >>> If you plan to use an extra sheet, you

must sign it now! <<< Turn in the sheet of notes with your exam.

  • If you are unsure of a question, write down your assumptions regarding the question. Remember, I cannot guess what you are thinking, let me know your thought process for at least partial credit.
  • Write clearly. Illegible answers will not be graded.
  • You will have 45 minutes to complete the exam.

Good luck!

Midterm Exam, CS 5950/6030 — Fall 2005

  1. [5 pts] Define in your own words Principle of Adequate Protection.

Computer items must be protected to a degree consistent with their value and only until they lose their value.

  1. [10 pts] Compare stream and block ciphers using the criteria listed in the table below. Enter S (for stream cipher) or B (for block cipher) into the second column to indicate which cipher type is better under a given criterion. Enter a brief explanation into the 3rd^ row.

Criterion

S or B better? Why? delay S (^) Receiver not waiting for all block characters before decoding error propagation

S Error in coding one char does not affect encoding of another diffusion B (^) Frequency of a char from P (plaintext) diffused in a block of C (ciphertext) susceptibility to malicious insertion

B Impossible to insert a char into a block without easy detection (block size would change)

  1. [15 pts + extra] [15 pts] Give example of a solution for establishing a symmetric key via PKE. It can be a solution which does not provide sender authentication. [EXTRA: 10 pts] For an extra credit, show both a solution without and with sender authentication.

Note: 15 pts for giving any one of the 2 solutions below. 25 pts for giving both.

Solution without sender authentication. S determines secret key K S encrypts K with kPUB-R: C = E( kPUB-R , K ) S send C to R R decrypts C to get K: D( kPRIV-R , C ) = K S & R communicate using secret (symmetric) key K

  1. [10 pts] a. [5 pts] Explain the penetrate and patch approach to judging program security (a.k.a. judging software security by fixing faults). b. [5 pts] What are shortcomings of the penetrate and patch approach?

For a) --Red Team / Tiger Team tries to crack software. --If it withstands the attack => security is judged as good.

For b) --Too often developers try to quick-fix problems discovered by Tiger Team. --Quick patches often introduce new faults.

  1. [20 pts] a. [15 pts] Write a detailed scenario of a buffer overflow affecting a call stack area. b. [5 pts] Explain how attacker can achieve her goals.

For a) --Initial stack: [data][data][...] --Pgm executes a subroutine => return address is pushed onto stack (so subroutine knows where to return control to when finished) Stack: [ret_addr][data][data][...]

--Subroutine allocates dynamic buffer char sample[10] => buffer (10 empty spaces) pushed onto stack Stack: [..........][ret_addr][data][data][...]

--Subroutine executes: sample[i] = ‘A’ for i = 10 Stack: [..........][A][data][data][...] Note: ret_address overwritten by A! (Assumed: size of ret_address is 1 char) --Subroutine finishes - buffer for char sample[10] is deallocated Stack: [A][data][data][...] --RET operation pops A from stack (considers it return address) Stack: [data][data][...] --Pgm (which called the subroutine) jumps to A => shifts program control to where attacker wanted

For b) By using the above scenario, an attacker can specify any return address A for her subroutine. This shifts program control to where attacker wanted.

(In detail: Upon subroutine return, pgm transfers control to attacker’s chosen address A—even in the OS area. Next instruction executed is the one at address A. It could be the first instruction of a malicious program that grants the highest access privileges to its „executor.”)

  1. [10 pts] Describe in a sufficient detail an example of a storage covert channel

This is example of one of many possible kinds of storage covert channels.

Example: File lock covert channel.

^ Protected variable X has n bits: X1, ..., Xn. ^ Trojan within Service Program written to leak value of X. ^ Trojan and Spy Program are synchronized, so can „slice” time into n intervals. ^ File FX (not used by anybody else)^   To signal that Xk=1, Trojan locks file FX for interval k (1 k n); to signal that Xk=0, Trojan unlocks file FX for interval k. ^ Spy Pgm tries to lock FX during each interval If it succeds during k-th interval, Xk = 0 (FX was unlocked); otherwise, Xk = 1 (FX was locked)

  1. [10 pts] a. [5 pts] Explain the majority voting technique for fault tolerance. b. [5 pts] How can it improve security?

For a) 3 processors run the same software. All outputs are compared. Result is accepted if outputs of ≥ 2 processors agree

For b) Even if an attacker penetrates one of the processors, the other two still give a good answer. Therefore, the system as a whole will give a correct result.

  1. [10 pts] Explain using access control lists (ACLs) for object access control using an example ACL.

Subjects: A, B, C, D, E Five objects—as named

Examples of specifications above: For Object 1, Subject A has OWR access rights, Subject B has R access rights, etc. For Object 4, Subject B has OWR access rights, all other subjects have WR rights.