pete > courses > Crash Course in System Security (CSCI 1005), Winter 2025 > Day 06
Day 06: What’s an Executable?
Or: Another Vector to the Kernel
New(ish) Tools
- readelf
- xxd
- diff
Exercises
Hack the Metadata
Compile the "hi" program from last week without the "execstack" flag. Modify the compiled program to have (when run) an executable stack.
Confirm that you have done so both by running the program and examining /proc/<pid>/maps, and by figuring out the stack executability is reported in the output of readelf.
Hack the Machine Code
Write a simple C program that runs a loop 1000 times. Compile it. Using readelf and a hex editor, modify the compiled program to execute this loop 2000 times instead.