by lmilcin · 6y ago · 0 comments
I had a discussion once with admins at my company that wanted to convert servers to have AD accounts in a naive way. The discussion could be shortened to something like this:
Me: please, don't convert servers to AD because my password will be available to everybody as everybody has root on test environment.
Admins: no, this is perfectly safe.
Me: Guys, once you have root on machine you can do everything including accessing passwords as they are being typed.
Admins: No, not possible. Perfectly safe.
Me: Here, I ran the tool using ptrace from root account, here is a list of all accounts and passwords of all users using test env. This is actually read() call at some point, you just need to be able to filter it out from strace output.
Admins: Wtf! You are going to get fired!
Your company either runs in a model where it trusts the employees or it doesn't. If it doesn't trust the employees they shouldn't be giving ANY of them root on a shared system.
On production servers on the other hand, the amount of people with root is probably much smaller, and there might be bigger wins by being able to centrally enforce password policies or whatever the sysadmins want to do.
90% of the time someone insists AD is too insecure for them, it's because they're unwilling to maintain hygiene (logging into an untrusted machines with overscoped credentials 8 times a day), or unwilling to use the provided security features (what do you mean use kerberized services? ldap binds work just find and give me an anti-ad security straw man!)
With poorly implemented AD (think telnet/ssh login app asking for password), on the other hand, you get password transmitted to the other box. At some point some application performs read() to actually receive it.
If you're running X you don't even need root :(
I do this about as frequently as I need to install something on remote server that has graphical installer. Not sure why people think thought this is a good idea but a huge amount of commercial software in 2000s had that kind of installation process.
In the 90's, firewalls were uncommon, so literally anyone on the Internet could sniff your keyboard or pop up windows on your display. Or, better yet, xmelt it.
This resulted in LOTS of mayhem.