by BiteCode_dev · 5y ago · 0 comments
If you are logged in as a sudo user, provided allowing only an ssh key, can you can't do anything unless:
- you know the password
- you trick the user into doing the action for you (E.G: a line in the bashrc)
The first one will slow down the attaker, the second one may trigger the user BS detector.
This assumes one isn't using password-less sudo (NOPASSWD), which several distros do set by default and many users change to it for convenience.
NOPASSWD is poor hygiene.