2019 Exam

C Code

void func(const char* arg) {
char buffer[42];
if (length(arg) <= 42) {
strcpy(buffer, arg);
}
}

What can get overwritten?

  1. Saved Frame Pointer
  1. Return Pointer
  1. No overflow because of a length check

Address Layout randomization

Which of the following is true?

  1. Is always better than DEP
  1. Randomizes memory layout
  1. Can be bypassed with knowledge about addresses and local variables
  1. Prevents a buffer overflow

PHP Code

Which of the following is true?

<html> Output: <?php echo $_GET[argument] ?> </html>
  1. CSRF is possible
  1. XSS is possible and the server sees the attack scripts
  1. XSS is possible and the server does not see the attack scripts
  1. No exploits possible

Cryptographic Protocols

A{A,B,nB}BA \larr \{A,B,n_B\} -B

A{Enc(m, sig(m,nB,skA)}pkBBA - \{\text{Enc}(m,~\text{sig}(m,~n_B,sk_A)\}_{pk_B} \rarr B

Which of the following is true?

  1. Injective agreement ABA\rarr B
  1. non injective agreement
  1. no agreement at all
  1. confidentiality of mm

Electronic Codebook ECB

Which of the following is true?

  1. Plaintext patterns are visible
  1. parallel encryption is possible
  1. parallel decryption is possible
  1. random access is possible

Cookies

Cookie 1:
name=uid value=1 domain=tuwien.ac.at secure=falseCookie 2:
name=sid value=2 domain=secpriv.tuwien.ac.at secure=false

Which cookies get sent with a request to https://tuwien.ac.at ?

  1. Cookie 1
  1. Cookie 2
  1. Both
  1. None

Access Control

Which concept allows only authorized subjects to have write access to data?

  1. Accountability
  1. Availability
  1. Integrity
  1. Confidentialty
  1. Accessibility

The ElGamal Proof

Which of the following is true?

  1. We assume that if there is an adversary that can break DDH, then we can use it to break ELGamal
  1. We assume that if there is an adversary that can break ElGamal, then we can use it to break DDH
  1. The proof is about how (gx,gy,gxy)(g^x, g^y, g^{xy}) can not be differenciated from (gx,gy,gr)(g^x, g^y, g^r)
  1. The proof is about how (gx,gy,gxy)(g^x, g^y, g^{xy}) can not be differenciated from (gx,gy,gx+y)(g^x, g^y, g^{x+y})

Textbook RSA

Which of the following is true?

  1. Textbook RSA is correct
  1. Textbook RSA is CPA secure
  1. A small ee can be used without sacrificing security
  1. A small dd can be used without sacrificing security

ACL and Capabilities

Which of the following is true?

  1. There is a reference monitor that checks every access
  1. ACL are object centered, Capabilities are subject centered
  1. ACL are subject centered, Capabilities are object centered
  1. Only capabilities can be inherited
  1. Its easier to revoke an ACL

CSRF

What are successful countermeasures?

  1. Tokens in Forms
  1. Referrer header
  1. Custom HTTP Header
  1. Setting cookie properties to secure and httpOnly

XSS

What are successful countermeasures?

  1. httpOnly cookies
  1. HTTPS protocol
  1. not allowing the word <script> and validating user input

Collision Resistant Hash Function

Which of the following is true?

  1. always maps to the same length
  1. maps to any length
  1. its infeasible to find 2 plaintexts with the same hash
  1. Users with the same passwords get different hashes in Unix

OTP

What gets leaked when we use the same key multiple times for two different plaintexts ?

  1. m1m2m_1 \oplus m_2
  1. the key kk itself
  1. m1m2km_1 \oplus m_2 \oplus k
  1. nothing

Stack Canaries

Which of the following is true?

  1. Get validated just when we want to return from a function
  1. Prevent overwriting the return address
  1. Have no performance impact
  1. Require a recompilation for activation

SOP

What does the SOP check for the DOM?

  1. Protocol
  1. Domain
  1. Port
  1. Path