CS FundamentalsHardGATE CS
Which defence makes a stack-buffer-overflow attack that jumps to injected shellcode on the stack fail, even if the return address is overwritten?
- A. Using a larger stack
- B. Running the program as root
- C. Disabling virtual memory
- D. A non-executable stack (NX / DEP)
Correct answer: D. A non-executable stack (NX / DEP)
With NX the CPU refuses to execute code from stack pages, so injected shellcode cannot run (attackers then turn to return-oriented programming, which ASLR and stack canaries help defend against).
More Operating Systems questions
- In the Bell–LaPadula confidentiality model, which rules apply?
- Which component of a computer can a hypervisor of TYPE 1 run on directly?
- Why could a classic x86 CPU (before VT-x/AMD-V) not be virtualised by pure trap-and-emulate?
- Containers (e.g. using Linux namespaces and cgroups) differ from virtual machines mainly because:
- A 1 GB process is swapped to a disk with 100 MB/s transfer rate and 10 ms latency. Approximately how long does a full swap out followed by…
- Interrupt-driven I/O vs polling: a device produces one byte every 1 ms and checking its status register costs 1 µs, while taking an…