|
I understand how sudo works.
How does sudo stop my above example from occurring?
The user copies the bash executable to another name. This copy occurs with normal acess rights, because /usr/bin/bash has read access for everyone.
No sudo authentication has occurred.
The user either copies, or moves, bash executabe to another name, say /home/user/this_is_not_bash.
Still no sudo authentication.
Now, the same user runs "sudo /home/user/this_is_not_bash"
Sudo checks sudoers file, and there is no restriction on running /home/user/this_is_not_bash (or any other name the user decides on)
The user has now been elevated to root.
Bash executable has NOT been copied to another users profile, it is being used to elevate (or switch) to another users account.
How do I stop this from occurring?
|