Exploit Exercises - Nebula 04
I really like Nebula 04, because it is really easy, but still a commonly missed thing in programming.
The object of this challenge is to find a vulnerability and exploit this C++ program.
#include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <stdio.h> #include <fcntl.h> int main(int argc, char **argv, char **envp) { char buf[1024]; int fd, rc; if(argc == 1) { printf("%s [file to read]\n", argv[0]); exit(EXIT_FAILURE); } if(strstr(argv[1], "token") !