!atvIbxHoEqNcAIxYpN:nixos.org

NixOS AWS

64 Members
16 Servers

Load older messages


SenderMessageTime
15 Oct 2024
@arianvp:matrix.orgArianand any time you make a mistake; AWS will take around 3-8 hours to reboot the machine09:55:49
@arianvp:matrix.orgArianit's the most frustrating, painful product I have ever used09:56:03
@arianvp:matrix.orgArianno you're not as you dont have control over amazon's certificates10:07:56
@arianvp:matrix.orgArianthat's why you cant spoof EIC keys (after they fixed the vuln in the post)10:08:09
@arianvp:matrix.orgArianbut the root key is just plopped on disk by cloud-init without any checks10:08:22
@arianvp:matrix.orgArianI guess you're "protected" because cloud-init does this on first boot and then leaves it alone10:08:41
@arianvp:matrix.orgArian But my problem is you want to replace with with a ProxyCommand which makes it a continuous risk. EIC has hardening agaisnt this by signing the payloads with an AWS Cert. but the main SSH key doesnt have this protection 10:09:18
@arianvp:matrix.orgArianThe fact that the key is written to disk only once at bootup is kind of a security feature in this way10:09:40
@arianvp:matrix.orgArianas later IMDS spoofing doesn't lead people to be able to change the key10:09:53
@arianvp:matrix.orgArianEIC doesn't have this issue due to the Certificate being in play and not being able to spoof the IMDS payload10:10:15
@arianvp:matrix.orgArian * that's why you cant spoof EIC keys (after they fixed the vuln of incorrect cert validation in the post. which they seem they have) 10:10:37
@arianvp:matrix.orgArian I mean AuthorizedKeysCommand when I wrote ProxyCommand 10:11:58
@commiterate:matrix.orgcommiteratehmm assuming the trusted root CAs are baked onto the host and the attacker can only spoof off-instance stuff (e.g. IMDS), the attacker can just only inject responses in the get SSH keys endpoint. Basically, as long as the certs from the cert endpoint are valid, it just blindly trusts the SSH keys endpoint response.17:24:34
@commiterate:matrix.orgcommiterateUnless this line is actually doing some kind of validation my thing is missing: https://github.com/aws/aws-ec2-instance-connect-config/blob/551c73e8ec1f5ade4c8b1f52cf616e75b47879b4/src/bin/eic_parse_authorized_keys#L30717:25:09
@commiterate:matrix.orgcommiterateIf it is then I need to fix that and probably also drop the EC2 Key Pair handling17:25:44
@commiterate:matrix.orgcommiterateYeah installing Nix on the bare instance doesn't work due to macOS's "security" feature that requires UI access to approve access17:29:07
@commiterate:matrix.orgcommiterateit works if you do a nested VM though (e.g. Tart VM)17:29:16
@commiterate:matrix.orgcommiteratehowever I think they removed the need for full disk access as of v0.27.0 https://github.com/DeterminateSystems/nix-installer/pull/121017:30:04
@commiterate:matrix.orgcommiterate *

however I think they removed the need for full disk access as of v0.27.0

https://github.com/DeterminateSystems/nix-installer/releases/tag/v0.27.0

https://github.com/DeterminateSystems/nix-installer/pull/1210

17:30:26
@commiterate:matrix.orgcommiterateunless that's what you mean by the instance store (local hard disk)18:31:19
@commiterate:matrix.orgcommiterateas for MacOS pains, you can actually blame Apple's EULA and security features for that18:31:33
@commiterate:matrix.orgcommiterateApple requires machines to be held for 24 hours minimum by a single tenant, hence why EC2 requires a dedicated host reservation for 24 hours minimum18:32:10
@commiterate:matrix.orgcommiterateand the long instance scrubbing is due to the processes Apple needs for firmware and software updates18:32:36
@commiterate:matrix.orgcommiterateyou can skip scrubbing from instance stop and terminate with a root volume replacement though18:32:47
@arianvp:matrix.orgArianEven when you keep the host reservation changing the AMI takes a few hours though ;/18:33:02
@commiterate:matrix.orgcommiteratebut eventually you must go through a scrubbing cycle if you want updated firmware18:33:04
@arianvp:matrix.orgArianAh didn't know that18:33:08
@commiterate:matrix.orgcommiterateI also talked with the ASG PMs and they're looking at root volume replacement for instance refresh18:33:28
@commiterate:matrix.orgcommiteratebut yeah due to Apple's EULA, Mac instances are the most inelastic instances of all time18:33:42
@commiterate:matrix.orgcommiteratesince elasticity requires it to be fast to take from and return to the free capacity pool18:33:58

Show newer messages


Back to Room ListRoom Version: 10