by ivank · 11y ago · 0 comments
> We recommend that you use the same passphrase for your root password as you use for your LUKS encryption (unless you share your laptop with other trusted people who should be able to unlock the drives, but shouldn't be able to become root). If you are the sole user of the laptop, then having your root password be different from your LUKS password has no meaningful security advantages.
Your root password is much easier to steal than your disk encryption password. Trick the user into running a program that does 'alias sudo=evil-sudo' >> ~/.bashrc, or sniff it from an unrelated X11 window, or use a microphone. A microphone is far more likely to pick up your root password than a password typed once at boot. If the root password is sniffed with a microphone, the attacker might not even have root access to your system over the network. If stolen with evil-sudo or via X11, you might realize you've been compromised before all of your data is exfiltrated. Neither scenario should let the attacker then steal your disks and be able to decrypt all of your data. Unless you follow the advice.
If you're using sudo correctly, you do not enter your root password. Frankly, the only time I can remember being prompted for a root password in years is when the system has failed to boot and offers entry to a recovery/maintenance shell.
If you're using LUKS correctly for your boot drive, you enter it only during startup before the system has booted.
If someone has access to your disk and has your LUKS key, the root password is merely a formality.
Yes, but it keeps an audit trail of who's account was compromised, etc.
IMHO "sudo" (or "doas") should be used from a different user, by switching to a different VT. Or at least only allowing certain commands for you day to day user.
And I agree that the typical sudoers config that allows opening terminals as root isn't a good idea.
What I prefer lately is using a yubikey neo to ssh access a root shell. You can configure sudo and authorized_keys to allow directly opening a root shell and you never enter any passwords anywhere except the pin to unlock the yubikey's openpgp applet. The yubikey will lock the key after six unsuccessful pin attemps and you can just yank the key out when it's not being used.
Now all I need is some sort of phone app that reaches out to me on a side-channel to pops up asking me to authorize each login (something like libpam-askmeonmyphone)--(I really like the way the Microsoft Account 2FA phone app works in this regard). If I could change one thing about the yubikey neo, it's that I'd require it to make me physically interact with it to decrypt anything (beyond entering the PIN).
That said, I like your use of yubikeys, even better than the phone that's the sort of stuff that should be triggered using a smartwatch.
(I disable credential caching with "Defaults timestamp_timeout=0" in /etc/sudoers.)
Still, unless one is sure that the sudo being invoked really is sudo, disabling the timeout won't be enough.
Add that to not having a root password and you have a single (weaker) point of failure (wheel group).
Really though, that rescue disk sounds like a better idea every time I think about the situation.
Even without, IIRC, Ubuntu (one of the few systems that actually gets root passwords right by defaulting to it being randomly-generated garbage that nobody knows) will prompt for the credentials of a sudo-capable user even for single-user mode.
That's only going to get you the user's password, not the root password.
An attacker might still bring an evil-su in addition to an evil-sudo, though. And even if you're logging into that root user only in an another tty, it seems like an unnecessary risk to share the password with LUKS.
Is audio analysis of keyboard chatter a thing or are we leaking passwords when we verbally communicate them to a co-worker?
I don't think this is related, but I found this keylogging technique combining microphone, camera, accelerometer data to approximate finger/thumb positions for PIN numbers: http://www.cl.cam.ac.uk/~rja14/Papers/pinskimmer_spsm13.pdf
> it is fine to write down your passphrases and keep them in a safe place
That is essentially, of course, how password managers work!
There's no reason not to write a password down as long as it's securely stored. You probably need embarrassingly little physical security to store your password more safely than many dodgy website solutions!
I _still_ frequently get my _already set_ password emailed to me in plaintext either on sign-up, or when I click "forgotten". (The site is always treated to an angry email encouraging a thorough redesign - though not of course, a 'reply', which would give them even easier access to my password!)
> "Unless you have concerns about physical security, it is fine to write down your passphrases and keep them in a safe place away from your work desk."
https://www.schneier.com/blog/archives/2005/06/write_down_yo...
Have a (logical) salt for all of the passwords. Don't write down that salt.
So, if you found my piece of paper with passwords, you might see something like this:
Etrade - I1999IbmfsaaymIwIbmoi
Gmail - D9cjeawfocsIdkwhtfts4r
But my actual passwords are something like this:
Etrade - I1999ibmfsaaymIwibmoi804WMainStreet
Gmail - D9cjeawfocsIdkwhtfts4r804WMainStreet
804WMainStreet is tacked on to the end of all of them, but you wouldn't know that from looking at the sheet of paper. Only my spouse knows the salt, and it's easy for us to remember, e.g., maybe 804WMainStreet is the address of the first place we lived together. In theory, this is reducing randomness, which might make it easier to crack one knowing the others, but I'm not super concerned about that.
The two most important elements of security for regular consumers are: 1) Use different passwords for everything. 2) Use multi-factor auth when available.
Whatever you have to do to achieve that is better than not doing it.
*And I actually use initialism for these passwords so I don't have to pull out the piece of paper often, only when I forget. In this example, the Etrade password might be derived from "In 1999 I bought my first stock as a young man. I wish I bought more of it."
Ideally, you'd just set "In 1999 I bought my first stock as a young man. I wish I bought more of it." as your actual password :)
(
) Unless you either turn that force into the energy required to brute-force the passphrase/keyfile or use it in a way that invokes xkcd #538.