Your question is Buffer Overflow and Mitigations. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
How does a buffer overflow attack work, and what are the modern mitigations against it (ASLR, DEP)?
Implement a simulator that classifies whether an overwritten return address leads to a successful exploit. Model an overflow, a code target or stack target, ASLR offset guesses, and DEP.
The function receives scalar inputs and returns one status string: no-overflow, blocked-by-aslr, blocked-by-dep, invalid-target, or exploitable.
def classify_overflow(write_length, buffer_size, target_type, target_offset, code_start, code_end, aslr_enabled, actual_aslr_offset, guessed_aslr_offset, dep_enabled):