sudo_sniff
sudo_sniff copied to clipboard
Find sudo from PATH
Find sudo wherever it may be.
I allocated memory, is that ok?
In my commit, on line 197, the compiler complained about possibly truncating a string, so I used a larger buffer(PATH_MAX) for command.
And when finding the first sudo in PATH, I just ignore the first path, since it should be the one the attacker has added. I think it should be correct? Because of this, hunter@nsa:~$ ./sudo whoami line in README.md might not work if there's only one sudo in the PATH.