Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

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

@insanitybit
Submissions

comment 6y ago · link · parent

Ok, at that point, why not just write the Python directly in your Rust application?

comment 6y ago · link · parent

There are exploits though - for example, the lowest barrier to exploit vulns like 'zoom bombing' are being exploited quite often.

Others, like perhaps an RCE, are not being seen. This is for a lot of reasons.

* Many are being found by whitehats/ researchers, so by the time they're made public an attacker is already playing catch-up - it can take days or weeks to build a good exploit chain, so starting from "A patch is out" or "The vuln is disclosed" is not encouraging.

* In general, exploitation of vulnerabilities is actually quite rare. Patching practices, mitigation strategies, etc, have radically improved over the last decade. It isn't that the attackers can't do it, but the majority of attacks will just phish you, install malware, and try to make money the simplest way possible.

Does that mean you accept that risk of vulnerable software? These are not strong mitigating factors and are mostly about risk profiling and motivation. So that decision is up to you.

comment 6y ago · link · parent

To me, a company that wants 2% of a pool has to be extremely competitive. 2% is a lot.

comment 6y ago · link · parent

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

612k engineers. Let's assume that Amazon aims to hire the top 20% (I would expect software engineering skills to follow a power curve), so roughly 100k qualified workers.

That's pretty small if you're looking to employ 2-5k of them. That's a lot of competition given that there are likely at least 50 companies making Amazon-type offers.

I'm not saying they can't hire people if 10% of that pool decides they won't work there, but I'd imagine they would want to extend their pool to maybe top 30% at some point.

comment 6y ago · link · parent

I am referring to programmers, and specifically a subset of programmers that can pass a difficult interview - most developers are absolutely terrible, probably > 50%, so cut that number in half at least. It's a relatively small number.

comment 6y ago · link · parent

Their pool is not the entire US workforce, it's a relatively small group of highly skilled workers in a market where those workers can make tons of money at many different companies.

Alienating a fraction of that workforce will impact them, I think.

comment 6y ago · link · parent

It's definitely a fine sanity check but I'd have to really think about whether it's a barrier.

Immediate things I worry about are around URL parsing.

Is evil.com<insert something here>steampowered.com going to pass as "steampowered.com" when it isn't? Will it handle punycode? All sorts of shit can go wrong when parsing a URL, and it's a real world problem when people implement the mitigation you're describing[0].

https://labs.detectify.com/2016/07/27/how-i-made-lastpass-gi...

This is just for starters. I think if I were being paid to think about it I'd probably be able to come up with some more. Can I mess with DNS? Can I inject some other malicious payload into the page, to take advantage of other vulns? etc etc etc

I would be extremely wary of this technique as a real boundary rather than just an assertion in code.

comment 6y ago · link · parent

> Past behavior is a good predictor of future behavior.

Is it? Past behavior on the scale of decades, with leadership and org changes, market changes, culture changes in between?

I don't think that my behavior 10 or 20 years ago is a very good predictor for my behavior today.

comment 6y ago · link · parent

I'm curious why you need the SOC2 report itself instead of some sort of signed statement of compliance. The details of the SOC2 don't seem like they should be important?

comment 6y ago · link · parent

I've never personally seen or used mem::forget. I'm sure it happens, of course, and I'm in agreement that the API should be unsafe. I'm just saying it's not clear that they "don't care".

comment 6y ago · link · parent

This doesn't read to me as "the maintainer doesn't seem to care" so much as they feel that the unsafety is likely an edge case and, in another issue, there's some more discussion around fixing it.

https://github.com/spacejam/rio/issues/12#issuecomment-58375...

comment 6y ago · link · parent

> Longer term, there is absolutely nothing inherent to being a “startup” that will make it any better at weathering the future than any other type of business.

I think the assumption is that "longer term" is "within your runway" for some set of startups. Early stage startups can have years of runway.

If you're a startup that's recently closed an amount that will carry you through this period I think you're probably in the ideal position. There is an open and obvious question as to how long that may be, but if you have multiple years of runway it feels safe.

comment 6y ago · link · parent

It's harder to extract patterns from high entropy data. I don't think anyone's saying that this is even an OK thing to rely on, at all, just that the nature of the data means that this specific weakness is likely more difficult to take advantage of.

If zoom were transmitting text this would be relatively more serious.

comment 6y ago · link · parent

> Don't use agent forwarding unless you know you can trust the machine on the other end.

On both ends. Agent hijacking can happen on client or server, with an attacker present. And is there any machine you can 'trust' ? That's a big ask, and I think the modern 'zero trust' is fundamentally averse to the concept.

comment 6y ago · link · parent

https://dropbox.tech/infrastructure/rewriting-the-heart-of-o...

> The Control thread is designed to be entirely deterministic when its inputs and scheduling decisions are fixed. We use this property to fuzz it with pseudorandom simulation testing. With a seed for our random number generator, we can generate random initial filesystem state, schedules, and system perturbations and let the engine run to completion. Then, if we fail any of our sync correctness checks, we can always reproduce the bug from the original seed. We run millions of scenarios every day in our testing infrastructure.

comment 6y ago · link · parent

Dropbox does, essentially, fuzzing of Rust async code and it is determistic.

I couldn't find a post about it, sadly, but I know the information is out there somewhere.

comment 6y ago · link · parent

I've repeatedly seen requests of this nature handled by AWS - 75% cuts to billing, 90% cuts even.

comment 6y ago · link · parent

You ever run a pip install? Maybe an apt-get install?

comment 6y ago · link · parent

Disclaimer: I'm the author of Grapl[0], which aims to do what you're talking about. Normally I don't really comment on the product on HN, but you're describing Grapl's raison d'être.

So, audit is one subsystem people use. ebpf is another.

OSQuery[1] is a tool that'll make it pretty easy to hook into audit and collect things like process executions.

Once you have instrumentation you want to start writing those rules. This is where systems like ElasticSearch, Splunk, or in the case of my product, Grapl, come in.

What Grapl makes particularly easy, and what other systems make quite hard, is the type of detection you're talking about - process tree analysis, or generally any kind of analysis that spans many events/ entities. This is because Grapl will take the instrumentation output and generate a graph, which makes joins across the data quite efficient, and it exposes the graph via Python, so you can express pretty arbitrary logic. Other systems make joins quite painful and slow[2][3]

Grapl's not at the point where a power user could just get it up and running - though it will be very soon. I've written detection logic very much like what you're describing though[4].

Linux is actually doing fairly well here, in my opinion. OSX was probably the worst, but the ESF will change this. Windows, with Sysmon, is still probably the simplest and best solution for instrumentation (though ETW is pretty strong too).

[0]https://github.com/insanitybit/grapl [1]https://osquery.readthedocs.io/en/stable/

[2]https://docs.splunk.com/Documentation/Splunk/8.0.2/SearchTut... (ctrl + f 'In large production environments, it is possible that the subsearch in this example will timeout before it completes.')

[3]https://www.elastic.co/guide/en/elasticsearch/reference/curr...

[4] https://github.com/insanitybit/grapl-analyzers/blob/master/a... , https://github.com/insanitybit/grapl-analyzers/blob/master/a...

comment 6y ago · link · parent

The point is that the existing behavior is de-facto correct by virtue of being the existing behavior.

The goal here is not "Prove this software meets a spec" it is "This software is the spec, and we must not regress". There are many more systems that act as a defacto spec than that are built to an external one.

If you choose to then move to a world where you want an external spec, as I said, at that point some of these tests will be thrown away or refactored. Most systems never make it to that stage.

This is especially common when you have legacy software where the person or team that wrote the code is no longer there. It takes a monstrous amount of effort to derive a meaningful spec, and step 0 is always preserving existing behavior.

comment 6y ago · link · parent

Very simple - I really like that, thanks for sharing.

comment 6y ago · link · parent

If your goal is "I have a blackbox of code, I must make a change, and I will assume existing behaviors are correct", this approach should be reasonable to ensure that the code doesn't break after your change.

You don't have an external spec to test against in this case, the existing implementation details are the spec, and so the goal is to preserve them.

I'd say going from: * Find one input * Get coverage * Mutation test to ensure you have assertion density

is probably a fine way to accomplish the goal.

Eventually you'd want to define an external specification for the code that isn't just "the service works, therefor ensure the service does what it's been doing", at which point some of these tests may be removed, or at least enhanced.

comment 6y ago · link · parent

Congrats Jack. Really excited to see where Panther is headed - code based detection is the future!

comment 6y ago · link · parent

Maybe it's the more niche use case of deploying to AWS Lambda before custom runtimes.

comment 6y ago · link · parent

Maybe not the only way, but it was the easiest and most widely recommended way when I was figuring out how to do musl builds around 2 years ago.

comment 6y ago · link · parent

It's possible, but my laptop runs fairly cool - it's elevated on a stand and is 18 inches, with a lot of ventilation. Of course it doesn't compare to a desktop system, but even still, this thing is hardly weak. It's a bit absurd to require 16 cores and 32GB of RAM to be productive.

comment 6y ago · link · parent

Yeah I have 8 cores(HT) and 16GB, which is apparently just not enough.

I think my plan is to just move builds to some kinda EC2 instance that I can bulk up.

comment 6y ago · link · parent

I also work on a ~15kloc rust project. I use cargo check all the time. Still extremely slow, not to mention that my whole system can be locked up by rustc, which really kills development.

I'll probably find a way to cgroup rustc just to deal with this issue.

comment 6y ago · link · parent

At one point docker was the only way to do this, I think. So if you start searching the internet for how to do static linking with musl you're very likely to find links to the docker'd approach.
1
123124125
164