Problem Statement
What is a buffer overflow attack? How would you test for it during a penetration test?
Explanation
A buffer overflow attack happens when more data than a buffer can hold is written into it, which then allows the attacker to overwrite adjacent memory—including code pointers—and execute arbitrary code. During a penetration test you would identify vulnerable input fields (for example file upload or network service), send increasingly larger payloads, monitor memory/call stacks, use tools like gdb or WinDbg, and attempt to control the execution flow (e.g., return-oriented programming). Demonstrating this in interview shows you understand low-level exploitation and its relevance in real world.