This level introduces the concept that memory can be accessed outside of its allocated region, how the stack variables are laid out, and that modifying outside of the allocated memory can modify program execution.
    This level is at /opt/protostar/bin/stack0

    1. #include <stdlib.h>
    2. #include <unistd.h>
    3. #include <stdio.h>
    4. int main(int argc, char **argv)
    5. {
    6. volatile int modified;
    7. char buffer[64];
    8. modified = 0;
    9. gets(buffer);
    10. if(modified != 0) {
    11. printf("you have changed the 'modified' variable\n");
    12. } else {
    13. printf("Try again?\n");
    14. }
    15. }

    image.png