Canary for tamper detection
– injected code, return address, canary, passwordok, userid, password
No code execution on stack
Thwarting Buffer Overflow Attacks
– Address space layout randomization(ASLR)
randomizes stack, heap, libc, etc. This makes it harder for the attacker to find important locations(e.g., libc function address).
Use a non-executable stack coupled with ASLR. This solution uses OS/hardware support.
argc, argv, return address, allowlogin, pwdstr, targetpwd