Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 4y ago · link · parent

Jesus Christ you're touchy.

comment 4y ago · link · parent

> For example our brain _depends_ on glucose for energy.

Right, but you don't need to eat sugar. Your body is capable of manufacturing glucose as-is from fat or protein. If you have 0 grams of sugar in your diet it's not like your brain will starve.

> it is a valuable nutrient.

No it isn't. Your body does not require that you eat sugar and it does not benefit from it either.

comment 4y ago · link · parent

What is the right amount of sugar? What are the health benefits of sugar? Your body does not require it at all, it is strictly negative impact unless you're literally starving or trying to gain fat to avoid starvation.

You're making this weirdly personal. No one is saying you're a bad person for eating sugar or "as bad as" a smoker. There's no pedestal.

comment 4y ago · link · parent

> "let's just use docker, then we don't have to think about complicated linux things like priviledges and permissions"

Honestly, that's fine. What more do you want? For developers to roll their own SELinux and Apparmor profiles? For them to manually implement seccomp filtering? No one does that.

The reality is that no one is choosing between "containers or some other approach", they're choosing between "containers or nothing".

comment 4y ago · link · parent

Containers are a security mechanism. We can say that now. For a long time they weren't, and then it wasn't really clear, but at this point they are. How good are they? Questionable - there are footguns (running privileged) and they rely on the Linux kernel (garbage), but they are a barrier.

If you put a process into a container, even a fairly default config'd container, it will require an additional vulnerability for an attacker to escape that container. That makes it a security boundary, period. There is no universal "ask to leave the container" by default.

This post is attacking a non-default configuration ie: you have to explicitly pass in "--privileged". Don't do that (the post says this repeatedly).

The fact that people are using docker and we're basically getting a half decent sandbox for free, everywhere, is an incredible security win.

I wouldn't rely on them for multi-tenant workloads, but as a nice way to restrict attackers given RCE, yeah, sure.

comment 4y ago · link · parent

Malware authors have tooling to run their payloads across many vendors all at once. I'm sure Defender is on the shortlist, but it probably doesn't matter much.

Further, AV is inherently a "catches known threats" technology, as much as any AV may pretend otherwise. Some people will always get owned but by virtue of those users' AV picking up samples the sample will eventually make it to various AVs.

If your goal is to avoid AV bypasses, I'd suggest changing your goals. Instead, treat AV as it is - a technology for finding known bad things. If you want to avoid unknown bad things you need to take another approach.

comment 4y ago · link · parent

FAANGs are full of terrible programmers. It's obvious. What they do have though is a higher number of good programmers, and they try to leverage them as best they can to make use of the bad ones.

comment 4y ago · link · parent

> How many 750k engineers are actually producing 7x a 100k engineer?

A huge part of the market is hilarious bad. It's insane. People graduate from school and can barely program, and even after years they don't get a whole lot better.

So yeah, absolutely there are people 7x better.

comment 4y ago · link · parent

I still think it's overly optimistic to say "everyone in infosec knows this". Most people in infosec don't know anything.

comment 4y ago · link · parent

No one cares about portability on the backend. This is a service - github dictates where it runs. I don't see this as being any more complex or involving any more "subtle semantics" than bringing an entire VM and new compiler target along.

Nothing I mentioned requires knowledge of OS security mechanisms beyond what I've described in my short comment.

comment 4y ago · link · parent

My understanding is that gvisor supports two modes of execution - one with virtualization and one without. AFAIK the official recommendation is to use the one with virtualization, but I've never dug into it.

comment 4y ago · link · parent

> But anyone who has been in security for more than 1 month knows that regular password rotation has not been a recommendation for over 5 years.

So optimistic. We just got dinged on this for SOC2 and I had to send over the so800-83b document that states as much.

comment 4y ago · link · parent

OK, I apologize - that was my misunderstanding, and I should have worded it as "I think you're confusing" rather than accusatory. I wouldn't hold it against anyone to do so - the naming collision is unfortunate and has been a source of confusion for as long as it has existed.

comment 4y ago · link · parent

Well defined and it also panics in debug mode. Unit tests tend not to catch these sorts of bugs tbh, but still, nice to have :)

comment 4y ago · link · parent

What Dropbox did for this sort of thing is ideal. You spawn a child process that has two file handles piped to/from the parent - stdin, stdout.

That child process does the scary stuff - parsing. Parsing requires zero system calls. Reading to/from the parent requires only read and write, but not open, so they can only read and write to those file descriptors.

And exit.

That's it. Seccomp v1 is trivial to apply, gives 4 system calls, and makes the process virtually useless to an attacker. If you want to get fancy and allow for multithreading you can use seccomp v2 and create your threadpool before you drop privs, and probably add futex and memmap.

You pay a latency cost but the security win is huge.

comment 4y ago · link · parent

You're confusing capabilities systems. Linux capabilities are not "capabilities", they're a misnomer. They're just groupings of privileges.

Here is what capabilities are.

https://en.wikipedia.org/wiki/Capability-based_security

I don't think what you're advocating for makes a ton of sense tbh. You're basically saying "just make it impossible to privesc", which, yeah, that would be nice... but it's not like you can just do that.

I think your point is more that least privilege should be more common - that way exploits have less impact. I agree. That said, Linux Capabilities are extremely coarse, and most container escapes involve owning the Kernel, which from a real Capabilities model would be the trusted broker of capabilities to begin with.

comment 4y ago · link · parent

It's not a binary thing. I would say something is a boundary if it requires an additional vulnerability to bypass. Containers these days fit that model. The nuance is how strong of a boundary it is.

Containers rely on the Linux kernel. The Linux kernel is shit, in terms of security, for a number of reasons. So all one requires is to own the kernel, and there are a lot of ways to do that. Containers block some system calls and can lower attack surface to a degree, which is great - I think it's a huge win that containers are so popular and, finally, some degree of isolation is widespread.

We'll be stuck in retroactive security mode until developers care to change that, especially ones with influence like kernel maintainers.

> My point is that if it were designed from the ground up with the hard security boundary in mind, would we have ended up with containers in the first place?

Absolutely not. We'd have ended up with something like Firecracker or GVisor. The issues with containers are fundamental to the concept of having a shared Linux kernel, which is basically what makes a container a container.

> If not, is there any realistic way to go from where we are to where we should be?

Use Firecracker or GVisor.

> Those have the downside of actually needing to run a VM though

I think at this point VMs are not that big of a deal. It's clearly good enough for the vast majority of people who are running on the cloud.

> don't allow nested virtualization so you're stuck running on an enormous bare metal box.

This part is a bummer.

The other option though is to just not care if your OS gets owned. Split your services up, move capabilities across other boundaries like mTLS.

comment 4y ago · link · parent

I mean, they're also designed to run, and they do that most of the time.

comment 4y ago · link · parent

Or running JVM GC. Or on pointer chasing. etc. Most code is just not well optimizesd.

comment 4y ago · link · parent

People gonna people

comment 4y ago · link · parent

Yeah, I'm totally with you on that. I was just trying to get across that distilling to principles is easy and effective, whereas the paper is going to describe a specific implementation.

If someone is interested in ZTN they would be best presented with both imo

comment 4y ago · link · parent

The paper's definitely worth reading, although it's worth noting that:

a) This is implementation heavy

b) The implementation is tied to a specific company migrating to this approach incrementally

I would say it's a great case study for moving to a ZTN, but if I were to explain ZTN I'd probably just propose a definition. I'm technically a vendor but the definition serves me in no way.

1. Requests are mutually authenticated and always encrypted (ex: mtls)

2. Requests are authorized; policy oriented, granular, and contextual authorization

3. Requests are monitored and audited

The paper lists a bunch of ways to accomplish those goals. SSO, device inventories, an authorizing proxy, a monitor, etc.

Of course, you're right. Vendors are horribly self serving and have already significantly degraded the term and confused people.

comment 4y ago · link · parent

Security vendors gonna security vendor.

comment 4y ago · link · parent

I'm not sure what the difference is with regards to pointers. They're both garbage collected languages with value types.

There are definitely differences in the languages, but I'm not sure that Go really had anything to figure out or invent. I don't buy that argument.

comment 4y ago · link · parent

I don't really see how that's relevant to the issue of pointer types.

comment 4y ago · link · parent

OK but Go carries around a runtime too?

comment 4y ago · link · parent

How is Go lower level than C#?
1
575859
164