CAS-002 · Question #693
Which of the following displays an example of a buffer overflow attack? A. <SCRIPT> </SCRIPT> B. Checksums-Sha1:7be9e9bac3882beab1abb002bb5cd2302c76c48d 1157 xfig_3.2.5.b-1.dsc…
The correct answer is C. #include. A buffer overflow attack is represented by C language code because C allows direct memory manipulation using unsafe functions that do not perform bounds checking.
Question
Options
- C#include
- D<form action="/cgi-bin/login" method=post>
How the community answered
(18 responses)- C94% (17)
- D6% (1)
Why each option
A buffer overflow attack is represented by C language code because C allows direct memory manipulation using unsafe functions that do not perform bounds checking.
C code using functions such as gets(), strcpy(), or sprintf() without bounds checking can write data beyond the allocated buffer boundary, overwriting adjacent memory regions such as the return address. This is the canonical definition of a stack-based buffer overflow, a vulnerability class specific to languages like C and C++ that lack built-in memory safety.
The HTML form tag is a standard web form element used for submitting data via POST and is not indicative of any attack technique.
Concept tested: Identifying buffer overflow attacks in source code
Source: https://owasp.org/www-community/attacks/Buffer_overflow_attack
Topics
Community Discussion
No community discussion yet for this question.