## DIRTY PIPE `CVE-2022-0847`

This is a kernel vulnerability that allows overwriting of data in
abitrary read-only files, that can therefore lead to privillege escalation since an unprivilleged 
process can write into a privilleged process. All credits go to ๐Ÿฅ‡[Max Kellermann]( for finding the vulnerability and his good explanation/description of the vulenrablility.



This proof of concept code is based on `Max Kellermann's` poc, that has been modified to explore some different 
ways on how this vulnerability can be used to gain higher privielleges. The exploit code includes a check  to check if the kernel version is vulnerable and using the vulnerability to overwrite `/etc/passwd` file to gain root privilleges. [exploit.c](dpipe.c)

### Usage

> You can download the already compiled binary or using `make` compile the binary locally and run it to gain `root`.