Quiz 2 — Calling Conventions, System Calls, Shellcode, Stack Overflow, ROP basics
12 multiple-choice questions, 1 point each. Closed notes: no slides, no AI tools, no talking. Your instructor will tell you when to start and when to stop. Pick the single best answer for each question, then press Submit quiz.
Question 1 1 point
Under the cdecl calling convention, after a function returns, which register holds its return value?
Question 2 1 point
Which sequence is the standard function prologue that sets up a new stack frame?
Question 3 1 point
In a typical 32-bit cdecl stack frame, where does a function find the first argument passed to it?
Question 4 1 point
On 32-bit Linux, which instruction transfers control from user mode into the kernel to perform a system call (the classic convention)?
Question 5 1 point
Using the int 0x80 convention, which register holds the system-call number?
Question 6 1 point
Shellcode is usually written to avoid any NUL (0x00) byte because:
Question 7 1 point
In the jump–call–pop technique for position-independent shellcode, what does the call instruction push onto the stack?
Question 8 1 point
A buffer overflow becomes an exploitable vulnerability, rather than just a crash, the moment that:
Question 9 1 point
Why does a cyclic (De Bruijn) pattern let you find the exact offset to the saved return address from a single crash?
Question 10 1 point
What problem does a NOP sled solve in a return-to-shellcode attack?
Question 11 1 point
In Return-Oriented Programming (ROP), what is a gadget?
Question 12 1 point
With NX/DEP on (-z noexecstack), injected shellcode on the stack can no longer run. Why does a ROP chain still work?