Live data from Hacker News

Ask HN: How do you trust that your personal machine is not compromised?

news.ycombinator.com

411–420 of 469 posts

Re: Ask HN: How do you trust that your personal machine is not compromised?

#411
post #230

Earlier quoted context omitted.

Linux is a security shit show but it is at least publicly auditable, which is a prerequisite to form reasonably confidence in the security of software, or to rapidly correct mistakes found. OpenBSD by contrast has dual auditing and a stellar security reputation, but development is much slower and compatibility is very low. seL4 as an extreme is a micro-kernel with mathematically provable security by design, but no wo…

I find it hard to believe that the Linux codebase being auditable makes Linux more secure by default than MacOS, iOS, and Windows. I doubt it is humanly feasible to fully read and grok the several million LOC running within Linux. I would, however, trust a default MacOS/iOS/Windows system over a default Linux system. The Linux community has a track record of being hostile to the security community - for their own goo…

> The Linux community has a track record of being hostile to the security community - for their own good reasons

I think the reasons are indeed quite good, the security community or industry has a lot of black sheep.

Problem with MS and Apple is that they force intimacy by design. That itself is a security threat to me.

Re: Ask HN: How do you trust that your personal machine is not compromised?

#412
post #230

Earlier quoted context omitted.

Linux is a security shit show but it is at least publicly auditable, which is a prerequisite to form reasonably confidence in the security of software, or to rapidly correct mistakes found. OpenBSD by contrast has dual auditing and a stellar security reputation, but development is much slower and compatibility is very low. seL4 as an extreme is a micro-kernel with mathematically provable security by design, but no wo…

> MacOS, iOS, and Windows are proprietary so they are dramatically worse off than Linux in security out of the gate. No one should use these that desires to maximize freedom, security and privacy. Not sure how fair this is, even though I agree with you with regards to Linux being auditable and the others not. Windows and macOS these days have vendor-provided code signing authorities that can be leveraged (and are by…

I have yet to see this giving security in practice anywhere. I think this is primarily a lock-in mechanism.

Re: Ask HN: How do you trust that your personal machine is not compromised?

#414
post #142

Earlier quoted context omitted.

Maybe you're thinking of privacy, not security? In terms of privacy, Android is "compromised" by default, i.e. Google collects and stores a ton of private information about you. I believe Apple used to be much better, and still is, but getting worse.

> In terms of privacy, Android is "compromised" by default, i.e. Google collects and stores a ton of private information about you. Apple also does the same. Also, this only applies if you're running an Android device "out-of-the-box". Fortunately, there exist AOSP forks that mitigate this type of intrusion (e.g. GrapheneOS).

Apple may collect some minimal information, but the crucial difference is that that data is not the basis of Apple's business model.

Re: Ask HN: How do you trust that your personal machine is not compromised?

#415

Earlier quoted context omitted.

> MacOS, iOS, and Windows are proprietary so they are dramatically worse off than Linux in security out of the gate. No one should use these that desires to maximize freedom, security and privacy. Not sure how fair this is, even though I agree with you with regards to Linux being auditable and the others not. Windows and macOS these days have vendor-provided code signing authorities that can be leveraged (and are by…

> Windows and macOS these days have vendor-provided code signing authorities that can be leveraged (and are by default), which provides at least some protection against malware at the macro level The code-signing is relatively trivial to workaround, you just have to get users to run xattr(1) to remove quarantine status.

But, you would need to get users to do that?

Re: Ask HN: How do you trust that your personal machine is not compromised?

#416
post #61

Earlier quoted context omitted.

If your main computer has had all its files encrypted by ransomware, will the backup NAS know not to replace the good backup with a bad one? i.e. hopefully it's not doing something like `rsync --delete`.

Not the GP but I use ZFS snapshots for such things. Should the files be overwritten or deleted I can always fetch an older copy from snapshots. The trick is to make sure nothing has access to the backup storage, which is obviously easier said than done.

That's not hard. On my backup server, I have an account with a restricted shell that my backed-up machine has an ssh key for. That restricted shell is simply the following script:

  #!/bin/bash
  cd ~/backups
  tar --restrict --keep-old-files -x
So the only thing that the backed-up machine (or an attacker) can do with the ssh key is push new files onto the backup server as a tar stream - it can't overwrite any files, and it can't put any files anywhere except the correct directory.

Re: Ask HN: How do you trust that your personal machine is not compromised?

#417

Great question. I don't anymore. Decades ago when I had a 286 and knew what each file did and what all the software was, and threats were limited and crude, I had good confidence of controlling my machine. Today, when my laptop has millions of files and each website - even hacker news - could inject something malicious and my surface is so broad (browsers applications extensions libraries everything) and virtually an…

You mean the case when ransomware encrypts your backups themselves? Normally they skip encryption of executable files, so you can hide backups like that.

Re: Ask HN: How do you trust that your personal machine is not compromised?

#418
post #331

Earlier quoted context omitted.

i think tanenbaum will be vindicated in the end. monolithic kernels are like 90s computer networks with perimeter security. if i were to guess, i'd guess that the future is microkernels with some sort of hardware accelerated secure message passing facility. zero-trust at kernel design scale.

Obligatory mention of capability based security goes here. We really need a way to run untrusted code and give it just the files we want, at run-time .

Obligatory reminder of the human angle here: we need also a way for untrusted code to not be able to nag the user into granting them extra permissions.

Re: Ask HN: How do you trust that your personal machine is not compromised?

#419
Eveybody in this thread talks about good security practices and prevention tips, while the question of OP is basically:

"how can you confirm that your machine is not compromised" => "how can you check if your machine is already compromised?"

Re: Ask HN: How do you trust that your personal machine is not compromised?

#420

I've taken steps to secure my Linux: * Using Yubikey PAM always as a 2FA for ssh,sudo (also on every Linux in my home network). * Always require authentication on each sudo command (prevents escalating once and then reusing privileges). * Only running Docker with sudo as recommended (requires 2FA now). * Closing all traffic other than services I need with nftables. Regularly look at the journalctl for suspicious acti…

Also, I have a Google Authenticator as a fall-back in case the 1st Yubikey PAM fails or I have no access to the internet to contact the Yubico servers for token validation.

Perhaps somebody can confirm if it's a good idea or not, but I like to generate only 1 emergency code for Authenticator (the least) and then delete that line in ~/.google-authenticator. Also, permissions of 400.

In case interested, check it out in code here: https://github.com/mihaigalos/config/blob/main/services/pam/...

Post reply on HN