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?

  1. A. Using a larger stack
  2. B. Running the program as root
  3. C. Disabling virtual memory
  4. 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

Exams that ask this topic