News for hackers. Stuff that matters.
Re:WireGuard Merged into OpenBSD by tptacek on Sunday June 21, 2020 @06:00PM (#23595753)
OpenBSD has a different security culture. "Stronger" hasn't been the right word in over a decade.
Re:WireGuard Merged into OpenBSD by atonse on Sunday June 21, 2020 @06:31PM (#23595897)
Yeah I don’t know if at this point it even matters. I was nervous about even leaving this comment. Maybe showing my decade old bias.
Re:WireGuard Merged into OpenBSD by sirtoffski on Sunday June 21, 2020 @09:53PM (#23596810)
Same sentiment here. I could come up with one "advantage" of OpenBSD over Linux - smaller user base. In a simplistic kind of a view that should make it less compelling to put in as much effort into developing exploits vs more common OS'. I couldn't back this up with any concrete data though.
Re:WireGuard Merged into OpenBSD by Hnrobert42 on Monday June 22, 2020 @02:12AM (#23597671)
Security through obscurity isn’t foolproof, but it isn’t entirely foolish, either. It can reduce risk if part of a layered defense strategy.

It is important to remember though that it is not the number of users but but the value of the compromise that determines how compelling the O/S is. There are like vintage mainframe O/Ses for which folks are actively developing compromises because some government or telco hasn’t migrated off. Then again, those teams aren’t going to waste a exploit on somebody’s home Usenet archive.

TL;DR: nevermind. I am too busy arguing with myself to be coherent.

Re:WireGuard Merged into OpenBSD by dicknuckle on Sunday June 21, 2020 @08:13PM (#23596371)
I use alpine for my bastion machine, but I'm not even sure if it's the best solution.
Re:WireGuard Merged into OpenBSD by jooize on Sunday June 21, 2020 @06:52PM (#23595990)
What do you mean?
Re:WireGuard Merged into OpenBSD by woodruffw on Sunday June 21, 2020 @07:09PM (#23596090)
OpenBSD has historically been eager to add new security mitigations without explaining their intended threat model.

Here's an excellent talk (in website form) on the subject: https://isopenbsdsecu.re/about/

Re:WireGuard Merged into OpenBSD by bawolff on Sunday June 21, 2020 @08:43PM (#23596509)
I dont think that website is very compelling. It claims a bunch of things as not good practise, and then asserts without evidence or example that openbsd does them.

Quite frankly it reads like someone with an axe to grind against openbsd.

Re:WireGuard Merged into OpenBSD by woodruffw on Sunday June 21, 2020 @09:58PM (#23596830)
> I dont think that website is very compelling. It claims a bunch of things as not good practise, and then asserts without evidence or example that openbsd does them.

Here's a material example: OpenBSD has expended considerable effort into removing ROP gadgets from their compilation products[1].

As the website documents[2], these efforts haven't made a single exploit harder to write.

GCC even removed their (mostly equivalent) ROP mitigation approach, documenting it as "fairly ineffective" and "lur[ing] developers to the land of false security"[3].

(Another good example is PID randomization: OpenBSD added this over 20 years ago as part of their "randomize anything that can be randomized" approach. It's never had any real positive security impact, and has made other PID-based vulnerabilities more viable.)

[1]: https://www.openbsd.org/papers/eurobsdcon2018-rop.pdf

[2]: https://isopenbsdsecu.re/mitigations/rop_removal/

[3]: https://patchwork.ozlabs.org/project/gcc/patch/CAFULd4ZL-wa3...

Re:WireGuard Merged into OpenBSD by sanxiyn on Sunday June 21, 2020 @10:29PM (#23596955)
I agree some OpenBSD security mitigations are dubious, but if I am forced to choose between Linux (too little) and OpenBSD (too much), it seems to me OpenBSD is definitely preferrable. (Of course, the best is to implement only effective ones.) Do you disagree?
Re:WireGuard Merged into OpenBSD by woodruffw on Sunday June 21, 2020 @10:52PM (#23597040)
I think that Linux is a security mess in its own ways.

That being said, I think Linux’s guts get far more attention than OpenBSD’s do, and that the (fewer) mitigations that Linux chooses to implement are much better supported by both information on real-world attacks and by the literature. Given that, I have a slight preference for Linux. But that shouldn’t be taken as praise.

Re:WireGuard Merged into OpenBSD by beachhead on Sunday June 21, 2020 @10:20PM (#23596920)
Where are all the OpenBSD exploits that bypass these mitigations? Serious question.
Re:WireGuard Merged into OpenBSD by IcePic on Wednesday June 24, 2020 @04:02AM (#23625368)
at the time, lots and lots of scripts would place things in /tmp/scriptname-$PID so you could race them, since you can know where it will write things, other scripts would use PID for random which is equally bad, especially for things that run from rc scripts at startup, so I would say "nothing was gained" is a bit of a stretch.

After a while, mktemp got more usage (which is good) and $RANDOM became available for scripts and so forth, but the situation was quite bad 20+ years ago as far as vendor installation scripts went.

Perhaps exactly noone was saved on OpenBSD because few installed linux-compat Netscape 1.1N for i386 with a bad installation script while having adversarial users logged in, but there is no reason to be equally bad as the then-more-popular OSes who did see /tmp races being won by users.

Re:WireGuard Merged into OpenBSD by asveikau on Sunday June 21, 2020 @11:58PM (#23597236)
I think the review on that website is actually more mixed than "axe to grind". I just spent some time reading the "mitigations" section. Some mitigations are criticized as questionable or easily defeated, but others are praised for a good implementation.

At any rate, I think some people may forget what stock Linux distros or even a commercial *nix install used to look like at the default install, before people like the OpenBSD folks raised awareness of some of these issues. In the late 90s I recall default installs elsewhere that had a bunch of ports open and no firewall right out of the box in a default install. In the same timeframe OpenBSD was making a bit of a PR-ish stink about a secure default install. In the same timeframe OpenSSH came on the scene.

But honestly, there are a few things that OpenBSD is only really just starting to get really right in the last few years. syspatch and pkg_add-able binary updates in the stable branch are two that come to mind. Also sysupgrade; I used to dread upgrading OpenBSD [xkcd had the joke about it leading to shark attacks], but now it's really simple.

Re:WireGuard Merged into OpenBSD by beachhead on Monday June 22, 2020 @12:27AM (#23597341)
If you look at some of the comments, sources, and just the attitude of the guy that put this together it seems he does have an axe to grind. It kinda says so in the about section. I think if you dive into the mitigations section without looking at that it seems less like that because he ends up having to admit some of them are decent ideas... try as he might to come up with ways in which they're not. There are plenty of OpenBSD users going around talking nonsense but this "systematic evaluation" is not an actual systematic evaluation.

I especially like the part where it lists people who helped but it's all redacted. All of this "research" came from google and twitter. I'd like to see some bypasses to OpenBSD's mitigations and perhaps some ideas and/or code to help improve them or implement ones that these folks say work better. If they're all so bad then it shouldn't be hard for someone like the author or so called security experts he quoted to do these things. Yeah, maybe no one is going to pay for that work to be done... that seems to always be the response when someone asks for proof, code, etc. No one has the time. They sure spend enough time making websites, blog posts, and tweeting about it though.

Re:WireGuard Merged into OpenBSD by Accacin on Monday June 22, 2020 @01:49AM (#23597585)
The guy who wrote this did a talk about it, this website was to list sources etc. I’m an OpenBSD user and I did not personally feel like he had an axe to grind, and overall thought he was fair and had well made points. I’ll be the first to admit a lot of what he said was rather too technical for me, but if I’m remembering correctly I never saw many counter points to his claims.

I personally feel that OpenBSD is more secure for my use case, but I’m happy that people bring up points like this as humans make mistakes and not even OpenBSD is perfect.

Re:WireGuard Merged into OpenBSD by beachhead on Monday June 22, 2020 @02:40AM (#23597811)
I watched the talk. The guy was wearing a t-shirt with the OpenBSD mascot with "got hacked" under it. Again if you read the about section it seems pretty clear. You're parroting the same language from the talk. Why should there be counter points to some random internet person's claims? Where are those bypasses at? Where are the patches to incorporate these better mitigations or to improve existing ones?

I don't think OpenBSD has perfect security and I'm not sure why that needs to be said. I don't see anyone involved in the project making that claim either. What I'm saying is this talk/website is just as dubious as some of y'all think OpenBSD mitigations are and if that's not obvious from looking at the sources I'm not sure what else to say here.

Re:WireGuard Merged into OpenBSD by lmm on Monday June 22, 2020 @02:50AM (#23597857)
Is anyone denying that OpenBSD's mitigations follow those practices? You can look at OpenBSD's own presentations about, say, pledge, and it seems like that website's characterisation is fair: no characterisation of what the threat model is, what vulnerabilities this is intended to make impossible, and no assessment of whether it actually succeeds in this.
Re:WireGuard Merged into OpenBSD by IcePic on Wednesday June 24, 2020 @03:39AM (#23625189)
And I think it is rather obvious. Pledge lessens the amount of syscalls available to a program after it has called pledge(), so the threats it means to protect against is if someone tries to trick "ls" into opening a socket and doing network calls for instance, if ls pledges that from this point onward it will only do disk reads via the fs and output via text console.

Just as a guide telling you to "chmod 600 webserver.key" doesn't really state anymore that it tries to protect non-webserver access to the https key, because it is implied that removing random access to the key (or to non-useful syscalls in the case of pledge) means the threat was unexpected reads of the key by someone who shouldn't be allowed to do just that. No assessments would be found to say "chmod'ing 600 removes 56% of the unexpected read attempts, Posix ACLs 9% more, apparmor another 14%, and correct SELinux tags will stop upto 96% of the keyfile reads by the wrong user". If my wildly invented numbers were right would anyone suggest only using SELinux and leave keyfiles at chmod 777?

One can then put up an angry webpage claiming people who chmod their keys are crap at security, it is uneffective, no listing of what it even was meant to protect against and of course no hard numbers to it. But 0600 would help you the day some junior admin turned off selinux on the webserver because random HOWTO said colorls works better with it off.

Re:WireGuard Merged into OpenBSD by lmm on Wednesday June 24, 2020 @06:06AM (#23626154)
> Pledge lessens the amount of syscalls available to a program after it has called pledge(), so the threats it means to protect against is if someone tries to trick "ls" into opening a socket and doing network calls for instance, if ls pledges that from this point onward it will only do disk reads via the fs and output via text console.

Does that improve security? By how much? What exploitation would it have prevented? At what cost? If you're not measuring the impact then it's pretty much voodoo security.

> Just as a guide telling you to "chmod 600 webserver.key" doesn't really state anymore that it tries to protect non-webserver access to the https key, because it is implied that removing random access to the key (or to non-useful syscalls in the case of pledge) means the threat was unexpected reads of the key by someone who shouldn't be allowed to do just that.

Then that guide is of little practical use. On a multi-user server that chmod makes sense. Inside a single-user container/VM, it's completely pointless. If the guide isn't telling you what the threat model is, you have no idea whether the mitigations you're applying are relevant or not.

> No assessments would be found to say "chmod'ing 600 removes 56% of the unexpected read attempts, Posix ACLs 9% more, apparmor another 14%, and correct SELinux tags will stop upto 96% of the keyfile reads by the wrong user". If my wildly invented numbers were right would anyone suggest only using SELinux and leave keyfiles at chmod 777?

Yes! Of course. Would you not?

> But 0600 would help you the day some junior admin turned off selinux on the webserver because random HOWTO said colorls works better with it off.

If you think that's a real danger then include it in your threat model. Maybe SELinux is harder to understand, or configure, or too many people have access to its settings. Maybe it's the opposite (I've seen junior admins chmodding everything to 777 many times, I've yet to see one turn SELinux off). Either way, you need to explain that so that people understand it, otherwise you're encouraging people to cargo cult their security practices.

Re:WireGuard Merged into OpenBSD by bawolff on Monday June 22, 2020 @03:42AM (#23598047)
Im not super familar with openbsd or pledge, but isn't pledge just an extension of standard privledge segregation stuff? People have been using privledge segregation for decades at this point.
Re:WireGuard Merged into OpenBSD by lmm on Monday June 22, 2020 @04:12AM (#23598182)
Privilege separation has indeed been in use for decades, but the same criticisms apply to it (and indeed it seems to mostly be an OpenBSD technique).
Re:WireGuard Merged into OpenBSD by ta17711771 on Sunday June 21, 2020 @07:56PM (#23596293)
In the face of the Linux kernel not taking care of known exploits, regardless of their usability, I'll take it.
Re:WireGuard Merged into OpenBSD by moviuro on Monday June 22, 2020 @09:21AM (#23599849)
See https://www.openbsd.org/security.html and https://www.openbsd.org/innovations.html

Some snippets:

> OpenBSD believes in strong security. Our aspiration is to be NUMBER ONE in the industry for security (if we are not already there). Our open software development model permits us to take a more uncompromising view towards increased security than most vendors are able to. We can make changes the vendors would not make. Also, since OpenBSD is exported with cryptography, we are able to take cryptographic approaches towards fixing security problems.

> ASLR: OpenBSD 3.4 [Nov 2003] was the first widely used operating system to provide it by default.

> W^X: First used for sparc, sparc64, alpha, and hppa in OpenBSD 3.3. Strictly enforced by default since OpenBSD 6.0: a program can only violate it if the executable is marked with PT_OPENBSD_WXNEEDED and it is located on a filesystem mounted with the wxallowed mount(8) option.

> Kernel relinking at boot: the .o files of the kernel are relinked in random order from a link-kit, before every reboot. This provides substantial interior randomization in the kernel's text and data segments for layout and relative branches/calls. Basically a unique address space for each kernel boot, similar to the userland fork+exec model described above but for the kernel. Theo de Raadt, June 2017.