├── compile_flags ├── level0 ├── README.md ├── reverse_me └── solution │ └── source.c ├── level1 ├── README.md ├── magic_num └── solution │ └── source.c ├── level2 ├── README.md ├── only_admin └── solution │ └── source.c └── level3 └── might_run /compile_flags: -------------------------------------------------------------------------------- 1 | -m32 -fno-stack-protector -z execstack -no-pie 2 | -------------------------------------------------------------------------------- /level0/README.md: -------------------------------------------------------------------------------- 1 | Reverse this binary and write the source code, 2 | Solution is in source.c 3 | -------------------------------------------------------------------------------- /level0/reverse_me: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelOverseer/reverse-easy-challenges/0321498a56a15f505443a2a145d0e11a47f26e86/level0/reverse_me -------------------------------------------------------------------------------- /level0/solution/source.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc, const char *argv[]) 5 | { 6 | char buf[64]; 7 | fgets(buf, 64, stdin); 8 | printf("%s\n",buf); 9 | return 0; 10 | } 11 | -------------------------------------------------------------------------------- /level1/README.md: -------------------------------------------------------------------------------- 1 | this program takes an argument 2 | ./magic_num "5" 3 | and prints "Nice" if the number is correct 4 | and "Not Nice" if the number is wrong 5 | -------------------------------------------------------------------------------- /level1/magic_num: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelOverseer/reverse-easy-challenges/0321498a56a15f505443a2a145d0e11a47f26e86/level1/magic_num -------------------------------------------------------------------------------- /level1/solution/source.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char **argv) 6 | { 7 | int num; 8 | 9 | if (argc != 2) 10 | return (1); 11 | num = atoi(argv[1]); 12 | if (num == 0x1337) 13 | puts("Nice\n"); 14 | else 15 | puts("Not Nice :(\n"); 16 | } 17 | -------------------------------------------------------------------------------- /level2/README.md: -------------------------------------------------------------------------------- 1 | This is your first exploitation of a bug 2 | Only admins can use this program 3 | 4 | Hint: 5 | It seems like an impossible task, 6 | But keep in mind hackers usually have long logins 7 | -------------------------------------------------------------------------------- /level2/only_admin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelOverseer/reverse-easy-challenges/0321498a56a15f505443a2a145d0e11a47f26e86/level2/only_admin -------------------------------------------------------------------------------- /level2/solution/source.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | int main(int argc, char **argv) 6 | { 7 | char buffer[50]; 8 | int admin = 0; 9 | 10 | puts("What's your login :"); 11 | gets(buffer); 12 | if (admin) 13 | puts("Hello Mr Admin"); 14 | else 15 | puts("I only talk to admins, sorry"); 16 | } 17 | -------------------------------------------------------------------------------- /level3/might_run: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KernelOverseer/reverse-easy-challenges/0321498a56a15f505443a2a145d0e11a47f26e86/level3/might_run --------------------------------------------------------------------------------