If you have any trouble accessing any of these materials, please post a note on Piazza and we'll help.
- Slides: all animations, limited animations
- Outline
- Recording; Close-up recording of stack-smashing demos
- Supplemental Reading: No supplemental reading for this lecture, but here are some entirely optional papers, for those who are interested in learning about this topic in more depth.
- Smashing the Stack for Fun and Profit by Aleph One
- Beyond Stack Smashing: Recent Advances in Exploiting Buffer Overruns by Pincus and Baker
- Reflections on Trusting Trust by Ken Thompson
- Given a piece of simple C code (such as the examples in lecture), explain the steps necessary to execute a basic stack-smashing attack by exploiting gets. For example: How many bytes would need to be inputted to overflow the buffer? What variable would you try to overwrite? What content would you aim to write into that variable (e.g., the address of what function)?
- You do not need to be able to use gdb, or write code in C.
- Explain the assumptions that the basic stack-smashing attacks in lecture relied on (e.g., that we could reliably predict the address of a function).
- Explain how a user could detect Thompson's hack in the first version of our hacked compiler (the one that only inserts a backdoor into UNIX).
- Explain why this same method does not allow a user to detect the hack with the "hacked v2.0 C compiler".