nerdexam
CompTIA

CAS-001 · Question #26

Which of the following can aid a buffer overflow attack to execute when used in the creation of applications?

The correct answer is B. Standard libraries. Certain standard C library functions such as strcpy and gets do not perform bounds checking, enabling buffer overflow conditions when applications use them without additional safeguards.

Enterprise Security

Question

Which of the following can aid a buffer overflow attack to execute when used in the creation of applications?

Options

  • ASecure cookie storage
  • BStandard libraries
  • CState management
  • DInput validation

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    80% (20)
  • C
    8% (2)
  • D
    4% (1)

Why each option

Certain standard C library functions such as strcpy and gets do not perform bounds checking, enabling buffer overflow conditions when applications use them without additional safeguards.

ASecure cookie storage

Secure cookie storage involves protecting session tokens from theft and is not related to memory management vulnerabilities that lead to buffer overflows.

BStandard librariesCorrect

Standard libraries - particularly legacy C standard library functions like strcpy(), gets(), and sprintf() - do not enforce input length limits or perform bounds checking on memory writes, so when developers use these functions in application code, attackers can supply oversized input that overwrites adjacent memory regions, enabling code execution via buffer overflow.

CState management

State management refers to tracking application state across requests and sessions, which is unrelated to the memory boundary violations that cause buffer overflows.

DInput validation

Input validation is a defensive measure that prevents buffer overflows by rejecting malformed input before it reaches vulnerable code, so it reduces rather than aids such attacks.

Concept tested: Unsafe standard library functions enabling buffer overflows

Source: https://owasp.org/www-community/vulnerabilities/Buffer_Overflow

Topics

#buffer overflow#standard libraries#secure coding#application security

Community Discussion

No community discussion yet for this question.

Full CAS-001 Practice