nerdexam
CompTIA

SY0-301 · Question #40

Data execution prevention is a feature in most operating systems intended to protect against which type of attack?

The correct answer is B. Buffer overflow. Data Execution Prevention (DEP) marks memory regions as non-executable to block attackers from running shellcode injected through buffer overflow exploits.

Threats, vulnerabilities, and mitigations

Question

Data execution prevention is a feature in most operating systems intended to protect against which type of attack?

Options

  • ACross-site scripting
  • BBuffer overflow
  • CHeader manipulation
  • DSQL injection

How the community answered

(44 responses)
  • B
    91% (40)
  • C
    2% (1)
  • D
    7% (3)

Why each option

Data Execution Prevention (DEP) marks memory regions as non-executable to block attackers from running shellcode injected through buffer overflow exploits.

ACross-site scripting

Cross-site scripting is a web application vulnerability involving injected client-side scripts in a browser context and is mitigated by output encoding and Content Security Policy, not memory execution controls.

BBuffer overflowCorrect

Buffer overflow attacks work by overwriting executable memory regions with malicious shellcode, then redirecting program execution to that code. DEP enforces a hardware or software policy that marks stack and heap regions as non-executable (NX/XD bit), so even if an attacker successfully overflows a buffer and injects code, the CPU will raise an exception rather than executing it.

CHeader manipulation

Header manipulation involves altering HTTP request or response headers to exploit web application logic and is addressed by input validation and server-side controls, not DEP.

DSQL injection

SQL injection targets back-end database queries through unsanitized input and is prevented by parameterized queries and input validation, not memory execution protection.

Concept tested: Data Execution Prevention against buffer overflow attacks

Source: https://learn.microsoft.com/en-us/windows/win32/memory/data-execution-prevention

Topics

#DEP#buffer overflow#memory protection#OS security

Community Discussion

No community discussion yet for this question.

Full SY0-301 Practice