worawit / CVE-2021-3156

Sudo Baron Samedit Exploit
BSD 3-Clause "New" or "Revised" License
737 stars 168 forks source link

remove pwned file in case it already exists #17

Open HynekPetrak opened 3 years ago

HynekPetrak commented 3 years ago

Hello, this pull requests makes sure the pwned file does not exist prior exploitation.

I've just experienced one case like that, and obviously the condition os.stat(PWNED_PATH).st_uid != 0 gave a false positive.