Sunday, August 16, 2015

sudo Vulnerability On OSx

I was perusing HackerNews and found an article mentioning that there is a vulnerability in sudo as Apple ships it.  The vulnerability is active because Apple ships its os with tty_tickets disabled.  What this means is that your logins to a machine (or terminal sessions as it were) are not treated as separate, but instead as linked. 

To demonstrate this, open two terminal windows and sudo to root.  You will be prompted for your password once, but not the second time.  To fix this, simply run 'visudo' (as root) and add the following line to the file.  ( I added a comment above it to say that it was a vulnerability fix:

# To turn off apple's giant privilege escalation vulnerability
Defaults tty_tickets
After you apply the fix, log out of your terminal sessions and open two new ones.  You should now have to provide your password on both of them.  

No comments:

Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.