Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

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

@insanitybit
Submissions

comment 8y ago · link · parent

The attacker's assumed capability is arbitrary execution locally.

Assuming an attacker is running as a separate user from the secret they want to steal (reasonable assumption, in my opinion) they need a vulnerability in the kernel, or some service running as root. Probably the kernel.

SGX pushes that further - you need a vulnerability in the hardware.

The attack surface of your hardware is < the attack surface of your hardware + kernel, so it seems like a win.

We'll continue to see attacks against hardware, but this is still a technology worth exploring.

comment 8y ago · link · parent

Yes, it's young and that shows in some places. But I think the team has done an excellent job and it happens to fit my use case very well.

comment 8y ago · link · parent

Not anything serious, no. I'm decently familiar with it though - I'm fascinated by the actor model, and have read a decent portion of Joe Armstrong's thesis.

comment 8y ago · link · parent

The only data stores I currently use are redis and dgraph. I write raw dgraph queries, though I have a small, highly focused library that I use to generate some of them.

As for redis, I use it as a dumb KV store, no need for an abstraction layer.

comment 8y ago · link · parent

No.

I would be refactoring in any language - the idea behind the service, the requirements, etc, are changing a lot as I'm building these services out. These are external factors that would exist regardless of the language, as I continue to explore the problem space.

comment 8y ago · link · parent

I write web services in Rust.

I'm extremely productive in Rust vs other languages, especially for young projects where I spend a lot of time refactoring. Things like borrow checker errors just don't happen very often to me anymore, or they catch legitimate bugs and are generally quite easy to fix. I just don't run into them very often at this point.

I've written Python and Java professionally. In both cases I felt like I just couldn't express what I wanted to, at all times, in my program. This led to me being a lot less comfortable refactoring - relying on tests that were far too heavily tied to implementation details.

I had some really complex logic I needed to write for one of my services. Basically I needed to represent a 'thing' and that 'thing' could be in a few different states. I wrote out the code, types first, so that every state had a type. I was able to do this generically using Rust's associated types in a way that allowed me to implement the state machine for multiple 'things'. It was very testable, very readable code that I had high confidence in. I would have had a much harder time doing this in Java/ Python (I have done similar things, and you can get value from the approach, but not the same level). I've refactored that code a lot with confidence.

Speed is a nice bonus, but mostly secondary.

comment 8y ago · link · parent

Way more than that.

comment 8y ago · link · parent

Sounds like macros.

comment 8y ago · link · parent

> This is presumably about making the output of the random number generator harder to predict.

Randomly deciding to add an extra byte of entropy only adds 1 bit of entropy. Adding the extra byte always adds 8 bits of entropy.

There is no cryptographic reason to do this. It is just to break assumptions about the API.

comment 8y ago · link · parent

As in, the reason has nothing to do with entropy, and it is just about breaking code relying on an unspecified behavior.

comment 8y ago · link · parent

So for no reason, it is about forcing code not to rely on the behavior.

comment 8y ago · link · parent

Why would it do it randomly then? Just read in the extra byte if you want extra entropy.

comment 8y ago · link · parent

Hence the need for oracle tests.

comment 8y ago · link · parent

It is as simple as the C code, whether that is simple or not.

comment 8y ago · link · parent

The premise here must be that the translator (human) has the original C code. So answering questions like "is this an array" is as simple as reading the C code to determine that.

Allocating too much space or getting a subscript error seems preferable to unsafety, and something one can hammer out with oracle testing.

Actually, it would be cool if there were generated quickcheck-like oracle testcases alongside this so you could start your translation to safe rust and test along the way.

comment 8y ago · link · parent

Well if you translate it to safe rust at least the worst that could happen is a design flaw.

And you can write oracle tests to catch those.

comment 8y ago · link · parent

VR and phones come to mind. On a laptop? Yeah, not quite sure.

comment 8y ago · link · parent

Yeah, same way I 'favorite' something on Twitter. I might disagree with the tweet, but I want to come back to it later to read the conversation, etc.

comment 8y ago · link · parent

Netflix seems to also have a really strong culture around this though, so I wouldn't be surprised if it's a lot less hoopy than you'd imagine.

comment 8y ago · link · parent

I disagree with the idea that users won't see benefits - the benefit is that upgrades to a critical protocol can be rolled out more smoothly in the face of compliant middleware. This benefit will be significant for end users.

Sending messages to Congress would be very different - that's squarely outside of the purview of a browser. TLS is not.

As for Microsoft having Windows 10 insert things to support a proprietary technology, again, this is a flawed analogy - it's simply not what's happening here.

Why draw the line if we know that we haven't crossed it? You have put forth two cases that seem obviously on the other side. This case seems obviously on the 'we good' side.

Would you say A/B testing means 'users are pawns'? I really disagree with that. Again, this is all in the interest of end users who have voluntarily installed this software, at least in part because of the secure reputation.

comment 8y ago · link · parent

I think that's a really overly simplistic view of the Rust situation and an unnecessary comment on the current situation. Daniel did not 'quit in a huff' or even quit at all.

This belittles his contributions and the situation he's been put in.

comment 8y ago · link · parent

Would you argue against Chrome sending out random LLMNR requests at boot to detect attackers on the network? They aren't "hijacking" computers of users who voluntarily installed chrome - in part due to the promise of a safer browsing experience, which this is all about.

comment 8y ago · link · parent

No one could seize control of the company, that's the point. The signing keys were wiped - compromise is now impossible through that avenue.

comment 8y ago · link · parent

What are you trying to imply? This seems entirely unrelated.

comment 8y ago · link · parent

Thanks for the more in depth explanation.

comment 8y ago · link · parent

I disagree for exactly the reasons I've stated - "more vulns" doesn't take impact into account. "More vulns" doesn't take who is reporting them into account (internal? paid pentester?). These things matter a lot.

Again, look at projects that pay for vulns. They have hundreds a year - this is a good thing. They come in at a continuous rate.

Counting is pointless.

comment 8y ago · link · parent

> The ability to have the infrastructure isolated from the raw code being written. (Think more of a grid computing and automatic planning being included)

Can you elaborate? It sounds like you're saying that if you write code that's deployed to a serverless infra you end up with 'serverless code'. This hasn't been my (very limited) experience - where the serverless stuff is just a thin layer around your business logic.

comment 8y ago · link · parent

There is no limit - as I said, counting is pointless.

As an example, lots of projects have active bug bounty programs where they pay people to disclose vulns. This generates more CVEs than a competing product that does not pay for more vulns. Would we then call the project with a bug bounty program less secure? I'd hope not.

Alternatively, what about impact? Maybe 100 DOS's is less serious than 5 RCE's, or 10 privescs is more serious than 1 RCE? How do we convert between these severities to understand risk?

Counting vulns is pointless.

comment 8y ago · link · parent

> Anecdotally, these basic mistakes seem to happen more in Node packages or JS-based projects

It's just bias. Python code is riddled with vulns - especially since it's all C under the hood.

https://hackernoon.com/python-sandbox-escape-via-a-memory-co...

Here's a great post that covers some issues in Python modules and why they're extra exploitable because they execute under CPython.

This is a particularly relevant quote:

> Perhaps less recognized is the fact that memory corruption bugs are reported in popular Python modules all the time without so much as a CVE, a security advisory, or even a mention of security fixes in release notes.

1
147148149
164