Dislaimer: Only an occasional *nix user. Just curious.
I was reading https://security.stackexchange.com/questions/232924/is-sudo-almost-useless where the question raises the point
Once an attacker has a shell as your sudoer user (or just compromised a local process enough), he/she can use one of the many privilege escalation tool ...
One answer states
so long as you can avoid interacting with a fake login screen, you can mitigate this by having separate administrative and non-administrative user accounts
which got me thinking, that compromising root via a sudoer would be much harder if
sudo, or really any privilege escalation mechanism, couldn't be faked with the same users rights that uses said privilege escalation mechanism.
So, as a user, how would I make sure that the privilege escalation mechanism used cannot be tampered with by myself without prior privilege escalation?
Note: xkcd/1200 applies, of course.