News for hackers. Stuff that matters.
Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @07:59AM (#35068449)
pledge and unveil are not even close to being full alternatives to something like SELinux.
Re:Initial support for guided disk encryption in OpenBSD ins... by nix23 on Wednesday March 08, 2023 @08:19AM (#35068634)
You are not wrong but also not right, it's something different.

For example FreeBSD has a MAC framework (a massive one btw) and also the "SELinux/SEBSD" framework on top of it (FLASK/TE), but you don't need to use it (not on Linux nor on FBSD).

OpenBSD has no MAC implementation, and with that no framework (SE*) on top of it, but has different/other way's to secure a system.

And TBH i have seen just 3 Customers until now who really develop highly secure/complicated policies (Two use MLS and one uses Brewer-Nash)

I think MAC should be used much more, but it's time intensive and hard to do it right, also to keep the policies clean and understandable need's LOTS of documentation and dedication.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @08:45AM (#35068877)
What massive MAC framework does FreeBSD has? Last I heard SELinux was attempting to be ported (SEBSD) but that was never finished?

The 'different/other/ ways to secure the system are inferior since they offer no protection if root is compromised.

I don't think MAC is as hard to use as it was, there are so many policies and issues known this much later, but people still just disable it by default because they don't want to put in the time.

Re:Initial support for guided disk encryption in OpenBSD ins... by twic on Wednesday March 08, 2023 @08:49AM (#35068929)
> What massive MAC framework does FreeBSD has?

Capsicum?

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @09:29AM (#35069328)
That's capabilities, not MAC
Re:Initial support for guided disk encryption in OpenBSD ins... by nix23 on Wednesday March 08, 2023 @09:46AM (#35069539)
>What massive MAC framework does FreeBSD has?

That's NOT what i said, the FreeBSD MAC implementation is big and pretty much feature complete, NOT SEBSD.

>The 'different/other/ ways to secure the system are inferior since they offer no protection if root is compromised.

There is no such thing as "inferior" but different approaches, from completely deleting root as a user to using Container/Jail/Zones, Sandbox's, VM's etc. MAC is one of just many methods and OpenBSD voted against it and went another route (and that is totally fine and understandable).

>I don't think MAC is as hard to use as it was

MAC is still very hard, you are talking about SELinux that is just one implementation called FLASK/TE.

Try to implement Brewer-Nash MAC-policy on a Fileserver and i will see you sweating ;)

But as you can see, there is you and me (in this thread) who understand what a MAC even is, and that on HN....that just tells you how many people really have even a understanding what it even is.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @09:53AM (#35069651)
> That's NOT what i said, the FreeBSD MAC implementation is big and pretty much feature complete, NOT SEBSD.

It is what you said. I never said you claimed SEBSD.

You said FreeBSD has a massive MAC framework. I was asking which one, and the only one I know of is SEBSD, which is not at all massive.

You are saying now FreeBSD has its own MAC framework, but I've never heard of it. What is it called?

> There is no such thing as "inferior" but different approaches,

Well that's not true. A screen door vs a heavy deadbolted door is clearly an inferior approach, not just a different approach to security, and that analogy extends to OS security technologies.

MAC is the only system that can 100% protect against an attacker getting remote root.

> There is no such thing as "inferior" but different approaches,

I've been dealing with MAC for 20 years, so I don't find it hard at all, and if people are willing to put in the effort to learn it the reward is worth it. But this is a world where most people want to get home to watch their latest story instead of doing any kind of mental work, and admins are no different.

Re:Initial support for guided disk encryption in OpenBSD ins... by nix23 on Wednesday March 08, 2023 @10:28AM (#35070163)
>I was asking which one, and the only one I know of is SEBSD, which is not at all massive.

SEBSE is a Framework, MAC is an implementation, those are two different things on different levels.

>MAC framework, but I've never heard of it. What is it called?

It's called MAC...you still don't see the difference?

https://docs.freebsd.org/en/books/handbook/mac/

Look i stop here you have obviously no knowledge of MAC.

>I've been dealing with MAC for 20 years

Yeah no you don't since you don't even know the difference of SELinux and the/a MAC implementation.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @10:52AM (#35070516)
This is frustrating. I don't know why you are trying to explain things when the issue is you simply were not clear with your first comment, and then acted like I misquoted you.

> SEBSE is a Framework, MAC is an implementation, those are two different things on different levels.

This is incredibly wrong unless you are referring to something other than mandatory access controls when you say MAC.

MAC is a concept. SELinux AND SEBSD are implementations. And yes, you can say they are implementations of FLASK, or call them frameworks, but semantics aside none of that changes that SELinux and SEBSD are implementations of a concept.

Saying MAC is an implementation is just flat out wrong.

And for what it's worth, I was correct when I said it was SEBSD, even though it isn't called that anymore. That's what the project started off as before it was merged: http://www.trustedbsd.org/sebsd.html

> Yeah no you don't since you don't even know the difference of SELinux and the/a MAC implementation.

The irony here lol.

Re:Initial support for guided disk encryption in OpenBSD ins... by nix23 on Wednesday March 08, 2023 @01:19PM (#35072677)
>Linux Security Modules (LSM) is a framework allowing the Linux kernel to support without bias a variety of computer security models. LSM is licensed under the terms of the GNU General Public License and is a standard part of the Linux kernel since Linux 2.6. AppArmor, SELinux, Smack, and TOMOYO Linux are the currently approved security modules in the official kernel.

https://en.wikipedia.org/wiki/Linux_Security_Modules

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @01:34PM (#35072903)
I have no idea why you think linking that proves some kind of point, it only proves to me that as I said you are very much out of your depth in joining this conversation.

Please don't reply to me again.

Re:Initial support for guided disk encryption in OpenBSD ins... by nix23 on Thursday March 09, 2023 @03:17AM (#35079281)
You are wrong and you know it.

Please don't reply ever to me again ;)

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Thursday March 09, 2023 @03:29AM (#35079337)
You're an idiot, clearly. But go on, have the last word like your ignorant ass needs to.
Re:Initial support for guided disk encryption in OpenBSD ins... by nix23 on Thursday March 09, 2023 @04:34AM (#35079671)
Don't do that here, self reflection would suit you better.
Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Thursday March 09, 2023 @07:07AM (#35080439)
You're not in any position to give advice until you can a) show you can understand and comprehend what you are replying to, and b) learn to admit when you are wrong.
Re:Initial support for guided disk encryption in OpenBSD ins... by dang on Saturday March 11, 2023 @12:07AM (#35105573)
We've banned this account for reasons I've explained here: https://news.ycombinator.com/item?id=35105542.

If you don't want to be banned, you're welcome to email [email protected] and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html.

Re:Initial support for guided disk encryption in OpenBSD ins... by dang on Saturday March 11, 2023 @12:07AM (#35105567)
We've banned this account for breaking the site guidelines badly and repeatedly in this thread, and for ignoring our many requests to stop doing that.

If you don't want to be banned, you're welcome to email [email protected] and give us reason to believe that you'll follow the rules in the future. They're here: https://news.ycombinator.com/newsguidelines.html.

https://news.ycombinator.com/item?id=34130077 (Dec 2022)

https://news.ycombinator.com/item?id=31589813 (June 2022)

https://news.ycombinator.com/item?id=29665662 (Dec 2021)

https://news.ycombinator.com/item?id=27875046 (July 2021)

https://news.ycombinator.com/item?id=25826399 (Jan 2021)

Re:Initial support for guided disk encryption in OpenBSD ins... by anthk on Wednesday March 08, 2023 @09:15AM (#35069176)
SeLinux it's snake oill compared to pledge an unveil. Intrinsic vs extrinsic. The first one always wins.
Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @09:32AM (#35069369)
lol, you clearly have no clue. SELinux and other MAC systems are the only thing that can protect against a hostile actor getting remote root.
Re:Initial support for guided disk encryption in OpenBSD ins... by anthk on Wednesday March 08, 2023 @01:23PM (#35072730)
You need to get root in first place. Good luck trying to crack any pledged process running something outside it's allowed syscalls without being ABRT'd in zero time.
Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @01:35PM (#35072918)
Yeah, it's not like OpenBSD hasn't had remote root issues before...

And this is exactly what I'm talking about. Putting more energy into hoping no one ever gets root rather than providing anything to protect against the scenario where it is obtained.

Re:Initial support for guided disk encryption in OpenBSD ins... by jmclnx on Wednesday March 08, 2023 @09:19AM (#35069214)
What ?

You can say that, but unveil(2) will hide whole portions of any file system from a application. I do not think selinux does that (correct?). For example, firefox can only access ~/.mozilla/firefox, ~/Downloads and that is it (IIRC). There may be other directories I forgot.

pledge(2) will hide system calls to prevent unintended processing.

But, for the application programmer, it may be a bit harder and you need to know what you are doing. One hopes the programmer knows what he is doing :)

IMHO, pledge(2) and unveil(2) is far easier to maintain than selinux, containers etc. But of course the programmer needs to code it. And not to mention, these calls are far more efficient than the multiple containers out there.

(edit) I also saw somewhere a person is tring to get pledge(2) and unveil(2) into Linux, but I forgot all the details.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @09:34AM (#35069389)
Hiding filesystems is security via obscurity more than anything else, and probably won't hold up if someone has root.

Things like SELinux by contrast allow you to remove all access and power from the root account except for what it specifically needs, while allowing you to grant root capabilities to other accounts as needed.

pledge and unveil are toys by comparison.

Re:Initial support for guided disk encryption in OpenBSD ins... by ori_b on Wednesday March 08, 2023 @12:45PM (#35072193)
> Hiding filesystems is security via obscurity more than anything else, and probably won't hold up if someone has root.

Can you show me a proof of concept here?

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @01:07PM (#35072504)
If someone has remote root you are telling me they can't unhide a filesystem? Otherwise what are you disputing and what would you accept as evidence?
Re:Initial support for guided disk encryption in OpenBSD ins... by ori_b on Wednesday March 08, 2023 @02:58PM (#35073950)
> If someone has remote root you are telling me they can't unhide a filesystem?

Yes. There is no mechanism at all to unmask the vnode. If you believe otherwise, I'd like to see a proof of concept.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @03:08PM (#35074068)
It's absolutely possible. No idea about a proof of concept, but I don't even think it matters, honestly.

It's cute that the OS might play some tricks to hide them from you, but at the end of the day, that's all it is doing, is hiding. Security by obscurity.

You're just betting you hid them really really well and that no one will be able to find them. With zero preparation in the event someone does.

If you have root, you have access to the files, period. Someone determined enough could search, read and write to the disk directly, bypassing the filesystem.

unveil is defense in depth, but it shouldn't be treated as a final line of defense which too many obsd fans seem to want to do.

Re:Initial support for guided disk encryption in OpenBSD ins... by ori_b on Wednesday March 08, 2023 @03:30PM (#35074334)
How? you don't have access to the devices. They're not in your namespace.

Again, proof of concept please.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @03:50PM (#35074546)
lol, ok. You really think root can't access the devices? lol.

So you just want to have blind faith in what is basically security via obscurity with extra steps.

That's fine, but it's not an approach to be taken seriously or advocated.

Re:Initial support for guided disk encryption in OpenBSD ins... by ori_b on Wednesday March 08, 2023 @04:44PM (#35075161)
Alright then -- can you tell me what exact sequence of system calls you'd make from a pledged and unveiled process in order to get raw device access?

Right now, you'd need root and a kernel-level exploit to do what you're talking about. I'm not seeing any evidence you have that.

You're just spouting crap.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @05:01PM (#35075346)
I'm not spouting crap at all, you just really have your head buried in the sand. YOu've drunk more of the OBSD koolaid then even mac zealots drink of the mac kooolaid.

I won't be replying again as I don't see how this is wroth my time when you can't even support anything you've said.

Re:Initial support for guided disk encryption in OpenBSD ins... by ori_b on Wednesday March 08, 2023 @10:19PM (#35077964)
Again, you haven't given an example of how you'd even open the raw device after you've been unveiled to /home/Zurrrrr/Downloads, and had your syscalls pledged (so, no mknod -- there's no pledge that allows it at all).

You haven't replied the first time to my questions with anything of substance, so what exactly do you mean by "replying again"?

Re:Initial support for guided disk encryption in OpenBSD ins... by witheld on Thursday March 09, 2023 @10:10AM (#35081965)
You don’t understand namespaces, there are no mechanisms, or root specific mechanisms, you could use to elevate a namespace.

You don’t get any kind of god powers like kernel memory access, if you don’t have access to the system call you can’t debug.

Like I don’t understand how to explain to you that SELinux locks down system calls in an identical way conceptually.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Thursday March 09, 2023 @01:14PM (#35084597)
And I don't think you understand just how many syscalls big third party applications are going to require.
Re:Initial support for guided disk encryption in OpenBSD ins... by witheld on Thursday March 09, 2023 @05:14PM (#35087560)
They aren’t (and do not) require any privleged system calls, whatsoever.

If you can actually exploit a system call, neither a MAC based approach or a pledge will help.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Thursday March 09, 2023 @06:17PM (#35088239)
> They aren’t (and do not) require any privleged system calls, whatsoever.

You're making a distinction about 'privileged' system calls, why, exactly? You really think something like Oracle won't require access to a ton of syscalls to work correctly?

> If you can actually exploit a system call, neither a MAC based approach or a pledge will help.

MAC will, pledge won't.

For example with SELinux:https://www.kernel.org/doc/Documentation/prctl/seccomp_filte...

Re:Initial support for guided disk encryption in OpenBSD ins... by ori_b on Friday March 10, 2023 @09:25AM (#35094629)
Did you realize your link points to a more fragile version of pledge?
Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Friday March 10, 2023 @10:02AM (#35095136)
Stop spreading misinformation. Hell stop replying to me. You're basically a cultist at this point with your irrational emotional devotion.

That's not a 'weaker version of pledge', it's part of a much larger framework with much greater enforcement capabilities.

Re:Initial support for guided disk encryption in OpenBSD ins... by ori_b on Friday March 10, 2023 @07:18PM (#35103337)
I've used it. I know what it does. For a while, I've even run a linux with a slightly patched version of it for some quirky needs of my own.

seccomp-bpf is a more fragile version of pledge; you need to keep changing your sandbox whenever you upgrade glibc, because there's no mechanism to keep syscall usage in sync between the kernel and userspace.

It was fine for my case, because I was implemeting my own direct system calls, and froze any external dependencies, but it's typically very fragile across system and dependency upgrades.

Re:Initial support for guided disk encryption in OpenBSD ins... by witheld on Saturday March 11, 2023 @11:56PM (#35116825)
> System call filtering isn't a sandbox. It provides a clearly defined mechanism for minimizing the exposed kernel surface. It is meant to be a tool for sandbox developers to use. Beyond that, policy for logical behavior and information flow should be managed with a combination of other system hardening techniques and, potentially, an LSM of your choosing
Re:Initial support for guided disk encryption in OpenBSD ins... by dang on Saturday March 11, 2023 @12:05AM (#35105562)
Please don't respond to a bad comment by breaking the site guidelines yourself. That only makes things worse.

Also, can you please not perpetuate flamewars on HN generally? It's not what this site is for, and destroys what it is for.

I've banned the other account and I'm not banning yours because as far as I can tell you didn't break the rules as badly and you haven't been making a habit of it—but if you'd please review https://news.ycombinator.com/newsguidelines.html and not do this kind of thing in the future, we'd appreciate it.

Re:Initial support for guided disk encryption in OpenBSD ins... by jmclnx on Wednesday March 08, 2023 @02:21PM (#35073521)
>Hiding filesystems is security via obscurity more than anything else, and probably won't hold up if someone has root.

That statement indicates you do not fully understand pledge(2) and unveil(2).

For example, if you are running Firefox using the default settings as root on OpenBSD. Firefox will not be able to see anything outside of the directories allowed by unveil(2). So an errant JS will not be able to peruse "veiled" Directories. For instance, Firefox cannot see any data in ~/.ssh no matter what ID you are using.

Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @02:35PM (#35073697)
> That statement indicates you do not fully understand pledge(2) and unveil(2).

Not so, not so at all. You have to take my statement in context.

The point was those technologies, while nifty, are entirely irrelevant if an attacker gains remote root.

Re:Initial support for guided disk encryption in OpenBSD ins... by bentley on Wednesday March 08, 2023 @02:41PM (#35073769)
OpenBSD’s heavy use of pledge, unveil, privilege separation, unprivileged processes, chroot, and strong memory protections do an excellent job of keeping attackers from gaining root.
Re:Initial support for guided disk encryption in OpenBSD ins... by Zurrrrr on Wednesday March 08, 2023 @03:06PM (#35074053)
A car can have all the tech in the world to avoid an accident, but I still expect it to have seatbelts.