News for hackers. Stuff that matters.
Re:Signing .jars is not worth the effort by closeparen on Sunday July 26, 2020 @01:56PM (#23958822)
The instance itself needs to get its SSH host key signed, or upload its fingerprints somewhere, on first boot. This is easy enough to write, but making it any more secure than plain old TOFU is tricky.
Re:Signing .jars is not worth the effort by MaxBarraclough on Sunday July 26, 2020 @05:28PM (#23960326)
> making it any more secure than plain old TOFU is tricky.

To refer again to my complaint about this term: this isn't meaningful. It's not clear whether you mean trust blindly on first use (total failure to cryptographically verify the identity of the server) or manually check SSH fingerprint on first use (secure but inconvenient).

Both get called TOFU. One meaning of the term is a valid means of establishing a secure channel, and the other is cybersecurity negligence.

I'm not just being obtuse here, I really don't know which you mean. Manually checking fingerprints on first use seems like a pretty solid approach to SSH security, if you can trust the client to actually perform the check. Short-lived keys are the obvious improvement that this approach doesn't really support. Is that what you meant?

Re:Signing .jars is not worth the effort by closeparen on Monday July 27, 2020 @12:34AM (#23962260)
Where do you get the fingerprints to check against? Three intuitive but wrong answers:

a) By spawning the instance with a script that will post them to some API. Now you are just blindly trusting whatever gets posted to that API. If your provider offers instance identity documents, you could sign the request with that, but an attacker who can MITM within your VPC can presumably impersonate anyone to the instance metadata service. And if MITM within the VPC is not in your threat model, then blind trust (from another host in the VPC) is fine.

b) By having an SSH CA service connect to the instance to grab its public key. The CA is extending the same blind trust as the admin would have in doing it manually.

c) By having generated the host keypair somewhere other than the host. Now you have key material in the wrong places.

I don't think there's such a clear-cut line here. "Verify" just pushes the blind trust somewhere else.

I can think of some potentially better answers, for example write the public key to a block device, detach it from the new host, attach it to a verification service host and read it there. But this is kind of just reinventing networking... why do we trust the cloud provider's SAN more than its SDN?

Re:Signing .jars is not worth the effort by MaxBarraclough on Monday July 27, 2020 @04:57AM (#23963364)
> Where do you get the fingerprints to check against?

Any serious cloud/VPS provider will offer a way, leveraging HTTPS.

On EC2, the Linux distro writes the SSH fingerprint to the instance's 'system log' which can be securely viewed over the AWS web dashboard.

On Linode, you can use a web-based terminal session (over HTTPS of course) to run a command to show the fingerprint.

I've discussed this in other replies in this thread.

> "Verify" just pushes the blind trust somewhere else.

Not really. If my cloud provider is compromised, it's game-over anyway. Provided there's a secure channel to communicate the fingerprint, and provided we really do check the fingerprint (most people just don't bother), we should be ok.

> write the public key to a block device, detach it from the new host, attach it to a verification service host and read it there

Yep, that's pretty much the Amazon approach!

Re:Signing .jars is not worth the effort by closeparen on Monday July 27, 2020 @01:06PM (#23967043)
Caring about MITM inside the VPC already assumes cloud provider compromise.
Re:Signing .jars is not worth the effort by MaxBarraclough on Monday July 27, 2020 @04:43PM (#23969195)
It's not inside the VPC, I'm connecting from the outside. I agree there's little need to check fingerprints for VPC-internal sessions.
Re:Signing .jars is not worth the effort by detaro on Monday July 27, 2020 @05:20AM (#23963464)
Note that you've introduced the additional measure of "inside a providers VPC". Which indeed is a solution, but not something every environment provides and not everyone uses.
Re:Signing .jars is not worth the effort by closeparen on Monday July 27, 2020 @01:07PM (#23967061)
How many organizations are paranoid enough to care about MITM but not enough to have private networking?