Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

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

@insanitybit
Submissions

comment 5y ago · link · parent

Windows is sort of an easy one since it's hardly a minimal server OS, but idk, even then, post-Windows7 I imagine things started getting far less common.

OpenBSD's claim is fine and all it's just not all that important. No one just ships OpenBSD without adding something to it.

comment 5y ago · link · parent

Are remote exploits in minimal server installs particularly common? Like for any OS? Feels like probably not very. I can think of one off the top of my head in Windows.

But like, let's imagine a minimal Linux server install, not even something hardened - I feel like there probably aren't too many RCEs in there. Even fewer that are legitimately exploitable with a bit of work to harden.

It's not really to diss OpenBSD so much as to say that, yes, a lack of RCE in a default install is cool, but you also have to wonder what anyone is doing with a default install, and if that's really something you should care much about.

comment 5y ago · link · parent

The company I've founded is very much about providing better detection capabilities, but I'd say this is an oversimplification.

First of all, detection is methodologically bankrupt. We have almost no one out there saying how detection should be done with consensus - only in the last 5 years have we even started to improve here.

In my opinion, detection of attackers, which is what the industry focuses on today, is a huge waste of time and resources - it's the last step in the process that I would recommend.

I would personally say that detection should be staged as:

1. System inventory (can you attribute an IP or Hostname to a device identitiy, a user, etc)

2. Policy enforcement (can you detect when policies change, or are violated?)

3. Unexpected behaviors - go to the people building systems - ask them what's expected, what isn't, and build rules for that, or even better, have them build and maintain the rules under your guidance.

4. Attacker behaviors - finally, spend some time building rules for attacker behaviors.

Most organizations skip straight to 4, and then you have a team of defenders who have no idea how the network they're supposed to detect is supposed to actually work. This is throwing away the greatest advantage defenders have - that they know where the attack will take place, and they know all of the stakeholders for those environments.

Here's the chief of the NSA Tailored Access Operations saying this at USENIX four years ago.

https://youtu.be/bDJb8WOJYdA?t=83

"If you really want to protect your network you really have to know your network"

None of this is as simple as "detection" - it means working with the policy teams, with your infrastructure teams, with your product teams, to better understand your environment.

comment 5y ago · link · parent

I don't really see it that way. From my perspective it isn't toxicity as the driver, but a strong sense of user preservation. Many people I know in security value the customers more than they value the company itself. They're the antithesis of political - their inability to understand higher order company-level or product-level issues often hamstrings them because their goals aren't aligned with the company goals. Though I have a limited view - I'm sure there are many companies that are operating as you've said.

The teams I really strongly respect, for example at Square/Microsoft, manage to align user interest and company interest very well - that's a very hard thing to do and requires top to bottom investment. Microsoft's approach has been to monetize security, which makes that easier.

Both organizations also have resisted the mistake that you and I both agree most orgs make - they've invested heavily into hiring engineers to solve security problems, and you generally have to pass a coding interview even for security roles.

edit: Reflecting more, I suspect that the described behavior of hyper-political teams that have a self-preserving structure is probably something prevalent, but that I haven't had the misfortune of being involved in. I would imagine companies like that are generally toxic across orgs, and not just in IT, but probably any area where investment is forced and it isn't revenue-generating.

comment 5y ago · link · parent

Ah! Bummer, but also, that's enough to deal with what felt like a big inconsistency in Rust - inability to work well with arrays.

comment 5y ago · link · parent

const generics are a feature I've been looking forward to since 1.0, really cool to see that work making it to stable.

This solves another of the ergonomic issues in Rust. It really feels like within 2021 Rust will hit a point where it feels totally consistent.

comment 5y ago · link · parent

    code = 'f"here it is {eval(input())}"'
    (lambda: eval(code))()
k, there we go

comment 5y ago · link · parent

Something along the lines of...

    code = 'f"{input()} {x}"'

    lambda x: eval(code)
(Please don't do this)

comment 5y ago · link · parent

I wasn't implying that Mozilla had explicit control over the project, but to say that it just "employed some team members" really undersells things. They employed critical team members, including as I recall the majority of the core team. They were also leveraging the project for R&D, allowing for fast feedback loops between core members and Servo developers.

Rust always, thankfully, made sure to be independent of Mozilla, but it would be silly to think that they had no influence over the project and that by firing major contributors they've lost that.

comment 5y ago · link · parent

Mozilla was sort of de-facto the steward of the language up until recently. They stupidly fired the teams behind their most promising R&D project and lost any semblance of control over it.

comment 5y ago · link · parent

This book is awesome, I highly recommend it. It's one I've meant to go back to, just haven't had the time.

comment 5y ago · link · parent

I know many people who wouldn't necessarily understand that compiled programs tend to be faster, because it just hasn't come up, or because in their domain it's not really important or even clear.

If you've been working primarily with Javascript, for example, or even worse, Typescript, the question of "is this thing compiled or interpreted" is "yes". Compilation becomes a piece of either build tooling, where the artifact isn't a concrete binary, or even an attribute of runtime.

It really wouldn't be too hard to imagine a shop built on Javascript and Python, where compilation just doesn't factor into the system in a meaningful way.

comment 5y ago · link · parent

I'm kinda confused. Is that not the case for literally everything? "You can send me data of format X, all I ask is that you be able to produce format X" ?

I'm assuming that I'm missing something fwiw, not trying to diminish the value.

comment 5y ago · link · parent

It's not obvious at all that one piece of information is completely wrong and another, much more difficult to consume piece of information, is accurate.

comment 5y ago · link · parent

Binary logs sound like a good thing to me since in most cases I want to just ship them off, and if I don't, a local consumer that can parse is just fine.

Is there something I'm missing?

comment 5y ago · link · parent

I misread then. Though you did ironically just say that pony does prevent race conditions :P

comment 5y ago · link · parent

While Pony is awesome, I think what you describe is a weakness and not a strength. If Pony were to move more of its hardest concepts to standard libraries, it would be a far simpler language, even if it maintained the actor/behavior concepts.

Much of Pony can be done with Arc/Mutex/&/move in Rust, but with special syntax, and it's that special syntax that kills the language frankly.

You can implement actors in Rust pretty easily. I've done it multiple times, including in a way that provides a pony-like nominal interface. It isn't as powerful, and it isn't as efficient, because frankly I'm not very good at this sort of thing and don't have time to work on it, but it's possible.

What pony gives is some syntactic sugar in some important places (the actor keyword, the be keyword) and a very strong runtime.

comment 5y ago · link · parent

Pony does not prevent race conditions. Two actors can wait forever for the other to send a message, deadlocking.

comment 5y ago · link · parent

Yeah I think that's an absurd reduction. Rewriting code means that you can solve fundamental architectural issues, that you can start fresh with better tooling, that you have the lessons learned without the technical debt, etc.

comment 5y ago · link · parent

A lot of your statements are pretty strong, and imo totally incorrect.

> Complexity breeds bugs, including security bugs, and memory safety doesn't change that.

Yes, memory safety changes that radically.

> A simpler program will generally be more secure than a complicated one, no matter what language either is written in.

Disagree, but the statement is really weak anyways, especially since 'complexity' is an ill-defined term. More features? Cyclomatic?

> urthermore, rewriting an established program from one language to another will always introduce more bugs than it fixes, and more severely the more complex the program is.

Should be obvious to anyone that this isn't true.

> The single best way to improve security is to reduce the attack surface,

Not true, but it's a great way to start.

comment 5y ago · link · parent

Then why have we seen ITW exploits against Chrome, or Linux? These are C and C++ codebases that undergo tons of static analysis and testing - tons of research goes into both of those projects to make them safer.

Still vulns. Still exploits.

comment 5y ago · link · parent

This goes for most things. We buy Dell laptops, and the price drops like 20-40% easy.

comment 5y ago · link · parent

The criticism of YubiKey seems kind of unfair. For one thing, it doesn't actually explicitly state that they totally address the major issues in the article.

Instead it's "in theory" and "can help". No, it totally addresses the issue of phishing your 2FA token and it does so in practice.

The pricepoint mentioned is over twice what the cheapest Yubikey is - $24.99 [0]. The author states the "average" cost is £50 and "there are a few around £30". Again, 24.99USD for USB + NFC yubikeys that support U2F/webauthn.

'usability' and 'convenience' are the same thing but split into two points, which give the impression that there's a whole other issue, but it's really the same thing.

> Buy a device, register it, install the app, configure it, find the setting in the website, enable it, hope your machine has the right sort of USB ports, press the button at the right time

So for TOTP it's install the app, configure it, find the setting on the website, enable it. So Yubikey adds the one additional step of "buy it", all of the others are the same for all other forms of 2FA. "Press the button at the right time" come on... as opposed to "find the TOTP and type it in on time" ?

The 24.99 USB Yubikey also supports NFC, so like, "has USB or NFC" is the requirement - I'm seriously struggling to think of a device that doesn't meet this requirement.

The author states that leaving the yubikey in the laptop increases risk. I find this to be a mixing of threat models personally - we've solved credential phishing with the 2FA token, but now you're talking about a threat where the attacker has unfettered physical access? I just don't see why that's relevant, sorry.

And for support, I think it's important to note that most sites are not sensitive. But a couple of important sites are. The most important is probably email, since email is effectively an auth mechanism for most other sites via account recovery. So just by protecting email you're protecting every other site. That's really important.

IMO,

Yes, Yubikeys should get cheaper. I certainly hope they do. At my company I give every employee 2 Yubikeys and they are theirs to keep - they're free to use them for personal accounts. I hope more companies do this in the future, essentially distributed U2F to the workforce.

But, otherwise, I really think that the benefits are being drastically undersold and I think that the criticisms are really not particularly fair.

[0] https://www.yubico.com/product/security-key-nfc-by-yubico/

comment 5y ago · link · parent

That's strange - they won't send you a document from their auditors certifying that they've undergone some sort of SOC2-type audit? I don't really get why you'd withhold that, it's what you paid for.

comment 5y ago · link · parent

We're saying the same thing.

comment 5y ago · link · parent

This is what I was referring to at the end of my post:

> Few work directly on strings. But they do it naturally, without enforcement - so like, a function might take a 'str', but the 'str' passed in was parsed into a wrapping structure already.

ie: Most programs in typed languages already do what you're saying - they parse the data directly into a structure, and therefor they validate some aspects of it naturally, so even when you do see a 'str' in typed code it's very often already gone through some sort of parsing phase.

comment 5y ago · link · parent

You can do this with any language with a type system by wrapping reads with a 'Tainted' type.

ie:

fn safe_read(path: str) -> Tainted<IO> { Tainted(unsafe_read(path)) }

And then you can apply functions to Tainted<IO> or whatever type that convert it into something structured / validated.

So long as your functions only take in those validated types (ie: you do not write functions that take str) you can ensure that new reads will fail to typcheck without first parsing.

To be honest this is how most programs I see work anyways, at least in typed languages. Few work directly on strings. But they do it naturally, without enforcement - so like, a function might take a 'str', but the 'str' passed in was parsed into a wrapping structure already.

1
105106107
164