3 ms·
I think the SSH host keys are in the system partition ('/private' directory)? It's not protected by FileVault. This leaves out a possibility of a MITM. An atta
by cyberax 1y ago
I think the SSH host keys are in the system partition ('/private' directory)? It's not protected by FileVault.
This leaves out a possibility of a MITM. An attacker can steal the unencrypted machine host keys and pretend to be your computer. And since you're entering a clear-text password, it's easy to sniff.
Moving the host keys into hardware root-of-trust would help. But macOS Secure Enclave barely supports that, and it's also pretty slow.
- _mikz 1y agoI have my private keys in Secure Enclave. Why the machine would not have own private keys there?
- aaroncarson 1y ago100% - Apple wouldn’t be so stupid as to move the private host keys to an unencrypted partition when the Secure Enclave is _right there_. No way is the Secure Enclave too slow for this - it’s exactly what it’s designed to do!
- davidczech 1y agoThey are encrypted with a SEP key when stored in preboot volume.
- cyberax 1y agoI misspoke. I meant a partition that is only protected by the machine-level keys. But then I also realized that it's still likely to be hard to access for the attacker. So I don't really have much issues with that.
- cyberax 1y ago> I have my private keys in Secure Enclave. Really? Secure Enclave supports only one asymmetric algorithm. With only some limited usages.
- SXX 1y agoAs far as I aware you can't actually do 100% of crypto needed for SSH auth inside the SEP itself. Might be I missed something, but I tried to find a way before and there was none. This would obviously be most secure. What you can do though is use Secure Enclave powered app for storing and managing access to the keys. So basically app like "secretive" run on your normal OS, but isolated and only it can access keys, use them and there no export function even with admin privileges. AFAIK this will fail if there is a local root exploit on macOS, but still much better than keeping keys in plain text.
- cyberax 1y agoYou can generate and store your private SSH key in the secure enclave, there's even an SSH agent that does that for you: https://github.com/maxgoedjen/secretive https://github.com/maxgoedjen/secretive But that's it. Anything more complicated is not possible. You can't even upload your existing key into the SE.
- SXX 1y agoAFAIK "secretive" SSH agent is not actually running inside SEP when it using the keys. So when keys are actively used they are exposed in main OS RAM and only protected by macOS security model (so are safe unless there is jailbreak / actual root exploit). So "secretive" and similar software is not as secure as let's say hardware token. If I'm wrong please correct me, but when I researched the topic I come to this conclusion.
- cyberax 1y agoAh, I see that Secretive is a victim of feature creep. I think it still can use the SE to store the private key, but it also has more ways to do it. This is the initial inspiration for Secretive: https://github.com/sekey/sekey https://github.com/sekey/sekey - it uses the SE to generate and store the actual private key, so it never leaves the machine. Hence its limitations.
- Citizen8396 1y ago1. The drive is encrypted and practically impossible to access on modern Macs regardless of FileVault status 2. The notion of someone having access to / compromising your device in order to capture SSH creds doesn't strike me as realistic
- trueismywork 1y agoThats how all major supercomputer was hacked for crypto.