Courseiva
Vulnerability Analysis and System HackingeasyMultiple SelectObjective-mapped

CEH Vulnerability Analysis and System Hacking Practice Question

Which TWO vulnerabilities are associated with buffer overflow attacks?

⚠ Common exam trap

Test-takers frequently confuse buffer overflow with other injection or concurrency flaws, but the CEH exam specifically pairs arbitrary code execution and stack smashing as the two direct consequences of a buffer overflow.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Arbitrary code execution

Buffer overflow attacks occur when a program writes more data to a buffer than it can hold, overwriting adjacent memory. This can corrupt the stack and allow an attacker to inject and execute arbitrary code (option A) by overwriting the return address or function pointers. Stack smashing (option B) is a specific technique that deliberately corrupts the call stack to hijack control flow, often as part of a buffer overflow exploit.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Arbitrary code execution

    Why this is correct

    Buffer overflows enable arbitrary code execution by allowing an attacker to overwrite critical memory locations, such as return addresses on the stack or function pointers in data segments. By carefully crafting input that exceeds the buffer's capacity, malicious shellcode can be injected into memory. The overwritten control flow mechanism then redirects program execution to this injected code, granting the attacker full control over the compromised process.

  • Stack smashing

    Why this is correct

    Stack smashing specifically refers to the corruption of the stack frame, a common outcome of stack-based buffer overflows. When an attacker writes past the boundary of a buffer located on the stack, they can overwrite the saved return address. This manipulation diverts the program's execution flow to an attacker-controlled address, often pointing to malicious shellcode previously injected into the process's memory space, thereby hijacking control.

  • Authentication bypass via SQL injection

    Why it's wrong here

    Authentication bypass via SQL injection is a distinct vulnerability where an attacker manipulates an application's database queries to gain unauthorized access, typically by injecting malicious SQL syntax into input fields. Unlike buffer overflows, which exploit memory corruption to alter program execution, SQL injection targets the database layer, leveraging improper input validation to trick the database into processing unintended commands, such as bypassing login credentials.

  • Cross-site scripting (XSS)

    Why it's wrong here

    Cross-site scripting (XSS) is a client-side web vulnerability where malicious scripts are injected into trusted websites, typically through input fields, and executed in the victim's browser. This differs fundamentally from buffer overflows, which are server-side memory corruption issues affecting the application's execution flow. XSS exploits the browser's trust in a website to steal cookies, deface content, or redirect users, without directly manipulating server memory.

  • Race condition

    Why it's wrong here

    A race condition occurs when the output of concurrent operations is unexpectedly dependent on the sequence or timing of other uncontrollable events, leading to unpredictable or insecure behavior. This is fundamentally different from a buffer overflow, which is a deterministic memory corruption vulnerability caused by writing data beyond the allocated buffer boundaries. While timing can sometimes influence the exploitability of a buffer overflow, the core vulnerability itself is not a timing issue but a memory safety flaw.

About these practice questions

This CEH question is part of Courseiva's 870-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CEH practice question is part of Courseiva's free EC-Council certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CEH exam.