13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 5y ago · link · parent
But yeah, ptrace is definitely something to watch out for. Monitoring ptrace is also something defenders can do if they're not in a position to disable it (if you're working for a software company your engineers will ptrace).
comment 5y ago · link · parent
It's valuable to hear how companies are protecting their infrastructure if they're going to break down how they accomplished it, how they continue to maintain it, etc.
comment 5y ago · link · parent
But a far more likely scenario is that the attacker will simply leverage existing sessions/ steal a socket, which, notably, will bypass any sort of 2FA on SSH connections.
comment 5y ago · link · parent
It's like, super detectable. You have endpoint logs for the file access, you have network logs, you have sshd logs (which contain the public key and the IP), etc.
> if you have your ssh private key on several machines, you have to remember to copy it to all those places
Your ssh key should never leave a host. That should be a policy and you should write rules to detect when that policy is being violated (check for processes accessing the file).
If you need access from N computers you should be generating N keys.
The reason rotation isn't recommended is because it leads to bad practices (people just add a '1' to their password), it's a hassle, and it can never be fast enough to meaningfully impact an attacker - once they have SSH keys it's likely they can gain persistence and C2 before your rotation takes place. Not because people reuse their passwords in multiple places.
Setting up a CA for SSH is definitely a really good practice but I think that most companies would find it far simpler to just enforce 2FA for SSH access. Still, I'd really like to see an article about how you set that up, especially if it targets smaller enterprise customers.
For others who might be interested, here's bless from Netflix:
https://github.com/Netflix/bless
edit: Oh, and just to be clear, 2FA for your SSH is not a silver bullet - even a yubikey. But it's a cheap, scalable, near-zero overhead way to protect against an attacker who's got access to your key (but not one who has access to your system, assuming an active session!).
comment 5y ago · link · parent
I would perhaps call this "Bug first policy" vs "Feature first policy", or some such thing, versus "0 bugs"
comment 5y ago · link · parent
Capabilities are really sort of a poorly thought out boundary. It's like, yes this is technically better than full root, but ultimately most individual capabilities are still extremely powerful/ can be leveraged for root.
At the end of the day I highly recommend capabilities as a measure of last resort - it's a "may as well", not a goal.
comment 5y ago · link · parent
I feel like you could just google SOA and Microservice architecture, pick up a book, and answer that for yourself.
comment 5y ago · link · parent
I see it all the time. It's simply wrong to say that microservices is just "services". Many people being wrong changes nothing.
comment 5y ago · link · parent
This is completely untrue, and I think it's part of the problem with discussions about microservices. People think it means "lots of small services". That is not what it means. That would be closer to SOA. Microservices is not SOA, and it is not "technobabble".
It has defined constructs, methodologies, and patterns.
comment 5y ago · link · parent
> at this point security people simply don't believe that any of the following (each one the very best technology available at the time) is totally safe
To be fair, we don't think anything is totally safe :) that's the point. Actually a lot of those things listed are why Chrome is so secure. I think this is a bit pessimistic about process isolation, which is actually quite powerful, but I get the point - there's no gap like an air gap.
I prefer to think of monoliths and microservices as being completely unrelated ideas - they aren't on a spectrum of "big to small", they're just two totally different ways of approaching software development. I might put "monoliths" closer to SOA, in that they both describe a very basic approach to a problem, whereas Microservices is not "small services" it's about bounded contexts, patterns, organizations, etc.
Anyways, I appreciated this post.
[0] https://www.graplsecurity.com/post/architecting-for-performa...
comment 5y ago · link · parent
I don't think that the linked article really reflects a consensus among the security community at all. I don't really find the "dynamic libraries are more secure" argument overly compelling, certainly not stated so broadly.
comment 5y ago · link · parent
I doubt that this is supposed to be true. Erlang is based on the idea of isolated processes and transactions - it's fundamental to Armstrong's thesis, which means being on a network shouldn't change how your code is built or designed.
Maybe it ends up being true, because you add more actual failures (but not more failure cases). That's fine. In Erlang that's the case. I wouldn't call that resiliency though, the resiliency is the same - uptime, sure, could be lower.
What about in other languages that don't model systems this way? Where mutable state can be shared? Where exceptions can crop up, and you don't know how to roll back state because it's been mutated?
In a system where you have a network boundary, and if you follow Microservice architecture you're given patterns to deal with many others.
It's not a silver bullet. Just splitting code across a network boundary won't magically make it better. But isolating state is a powerful way to improve resiliency if you leverage it properly (, which is what Microservice architecture intends).
You could also use immutable values and all sorts of other things to help get that isolation of state. There's lots of ways to write resilient software.
comment 5y ago · link · parent
Microservices put function calls behind a network call. This adds uncertainty to the call - but you could argue this is a good thing.
In the actor model, as implemented in Erlang, actors are implemented almost as isolated processes over a network. You can't accidentally share memory, you can't bind state through a function call - you have to send a message, and await a response.
And yet this model has led to extremely reliable systems, despite being extremely similar to service oriented architecture in many ways.
Why? Because putting things behind a network can, counter intuitively, lead to more resilient systems.
comment 5y ago · link · parent
In this model the attacker already can execute code on the victim's host, but the VM attempts to limit what the attacker can do via restricted APIs. It's just a completely different threat.
comment 5y ago · link · parent
I'm kinda confused by this. Java is an extremely popular language and dominated web services for decades.
> you only ever hear about the rare, high profile mistakes.
It's more like we constantly hear about these mistakes. Rare? What constitutes rare? Monthly CVE reports from every browser vendor?
It's just so strange to me that you would say it's rare lol it's just... so wrong?
As for memory safe C/C++ code, again, it's just kind of so absurd. Think of how much time and effort goes into testing, fuzzing, and improving C++ code from companies like Microsoft, Google, AWS, etc, and how they're still finding issues all the time. Literally hundreds of millions of dollars a year are spent on this - cutting edge, new research and tooling are developed just for this problem and it's still there.
But you're saying it's rare and actually not a problem? How do you reconcile the very public, very frequent issues with this idea? How do you reconcile companies pouring hundreds of millions of dollars into this, still discovering issues, with the idea that someone somewhere is for sure just doing it way better and it's totally memory safe?