1.
Question 1
Three of the following are classic security properties; which one is not?

1 point

Integrity


Confidentiality


Availability


Correctness

2.
Question 2
What was the first buffer overflow attack?

1 point

Code Red


Love Bug


Morris Worm


SQL Slammer

3.
Question 3
The stack is memory for storing

1 point

Global variables


Dynamically linked libraries


Program code


Local variables 

4.
Question 4
Why is it that the compiler does not know the absolute address of a local variable?

1 point

Compiler writers are not very good at that sort of thing


As a stack-allocated variable, it could have different addresses depending on when its containing function is called


Programs are not allowed to reference memory using absolute addresses


The size of the address depends on the architecture the program will run on

5.
Question 5
When does a buffer overflow occur, generally speaking?

1 point

when the program notices a buffer has filled up, and so starts to reject requests


when a pointer is used to access memory not allocated to it 


when writing to a pointer that has been freed


when copying a buffer from the stack to the heap

6.
Question 6
How does a buffer overflow on the stack facilitate running attacker-injected code?

1 point

By writing directly to the instruction pointer register the address of the code


By writing directly to %eax the address of the code


By overwriting the return address to point to the location of that code


By changing the name of the running executable, stored on the stack

7.
Question 7
What is a nop sled?

1 point

It is an anonymous version of a mop sled


It is a sequence of nops preceding injected shellcode, useful when the return address is unknown


It is a method of removing zero bytes from shellcode


It is another name for a branch instruction at the end of sequence of nops

8.
Question 8
The following program is vulnerable to a buffer overflow (assuming the absence of automated defenses like ASLR, DEP, etc., which we introduce in the next unit). What is the name of the buffer that can be overflowed?


1 point

len


msg


buf


out

9.
Question 9
Here is the same program as the previous question. What line of code can overflow the vulnerable buffer?


1 point

strncat(buf,out,sizeof(buf)-len-1);


printf("%s",buf);


sprintf(out, "argument %d is %s\n", argc-1, argv[argc-1]);


len = strlen(buf);


printf(msg)

10.
Question 10
Recall the vulnerable overflow from the previous two questions. We can change one line of code and make the buffer overrun go away. Which of the following one-line changes, on its own, will eliminate the vulnerability?


1 point

change char msg[] = "Welcome to the argument echoing program\n" to char msg[42] = "Welcome to the argument echoing program\n"


change printf(msg) to printf("%s",msg);


change printf("%s",buf) to printf(buf);


change sprintf(out, "argument %d is %s\n", argc-1, argv[argc-1])

to snprintf(out, S, "argument %d is %s\n", argc-1, argv[argc-1])

11.
Question 11
Recall the vulnerable program from the previous few questions. Which of the following attacks do you think the program is susceptible to?


1 point

code injection


data corruption


reading arbitrary addresses in memory


all of the above

12.
Question 12
Recall the program again.

If we changed  to  then the program would be vulnerable to what sort of attack?

1 point

heap overflow


format string attack


use-after-free attack


all of the above

13.
Question 13
Exploitation of the Heartbleed bug permits

1 point

a format string attack


a read outside bounds of a buffer


a kind of code injection


overwriting cryptographic keys in memory

14.
Question 14
Why is it that anti-virus scanners would not have found an exploitation of Heartbleed?

1 point

Heartbleed attacks the anti-virus scanner itself


Heartbleed exploits are easily mutated so the files they leave

behind do not appear unusual


Anti-virus scanners tend to look for viruses and other malicious

code, but Heartbleed exploits steal secrets without injecting any code


It's a vacuous question: Heartbleed only reads outside a buffer, so

there is no possible exploit

15.
Question 15
An integer overflow occurs when

1 point

an integer is used as if it was a pointer


an integer is used to access a buffer outside of the buffer's bounds


an integer expression's result "wraps around"; instead of creating a very large number, a very small (or negative) number ends up getting created


there is no more space to hold integers in the program