Skip to content

Arrange the steps of a classic stack-based buffer overflow exploit in chronological order, from the initial trigger to hijacked control flow.

Answer

An application receives input that exceeds the allocated stack buffer size, Excess data overwrites adjacent memory on the stack, The function's saved return address is overwritten, The CPU redirects execution to the overwritten address upon function return

Explanation

### The order 1. **Input exceeds the expected buffer size**: the program receives more data than its buffer can hold. 2. **Nearby memory is overwritten**: excess data spills into adjacent locations. 3. **A return address may be overwritten**: control information can be among the affected memory. 4. **Execution may continue at an unintended location**: the changed return address can redirect control flow. ### Terms - **Buffer overflow**: writing beyond a buffer's expected capacity. - **Return address**: a saved location used to continue program execution. ### Remember The control-flow effect follows the memory overwrite, not the other way around.

Related Questions

Want to practice more questions like this?

Join myBenkio free and practice past questions for your Nigerian university courses with AI explanations for every answer.

Start Practicing Free