Stack Protection
In this tutorial, you are asked to explain all stack protection mechanisms and identify them in the various assembly dumps of the auth.c
example developed in the week 9 lecture.
Fortified Source Functions
- What are Fortified Source Functions and how do they work?
- How to enable it on Linux?
- In
auth-fortify-enable.x86
, can you identify the “fortified” called tostrcpy
?
Stack Canaries
- What are stack canaries and how do they work?
- How to enable it on Linux?
- In
auth-canary-enable.x86
, can you identify where the canary is set and verifies in the functionpwd
?
Non Executable Stack
- What is a non executable stack and how does it work?
- How to enable it on Linux?
- There is actually no difference at all between
auth-all-disable.x86
andauth-nex-disable.x86
, why?
ASLR - Address Space Layout Randomization
- What is ASLR and how does it work?
- How to enable it on Linux?
PIC/PIE - Position Independent Code
- What is a position independent code and how does it work?
- How to enable it on Linux?
- In
auth-pie-enable.x86
, can you identify where/how the binary gets the offset to calculate the absolute address of the functionpwd
?