Earlier quoted context omitted.
Yes, it's more complicated than just SSH'ing into the server. But on a compromised machine you can't trust anybody, not even the kernel. Assuming the worst, the attacker could have gained root privileges and modified the kernel or the base tools like ls and grep. You also can't trust the log files if they're not stored off-site. The modified kernel or ls could hide the attacker's traces from you. Thus, the only possi…
Live forensics are preferred to just reading disk; lots of problems with that and solutions to those problems on various types of machine.
Security Incident on FreeBSD Infrastructure
21–30 of 37 posts
Re: Security Incident on FreeBSD Infrastructure
#22Earlier quoted context omitted.
What's wrong with svn?
Nothing, if you don't mind using a centralized development model. The BSD's tend to be ultra-conservative in regard to version control systems - for example OpenBSD is still on CVS and developed their own version: http://www.opencvs.org
I use git-svn at work, so I have everything but easy (svn) branching and I find it super useful.
Re: Security Incident on FreeBSD Infrastructure
#23They use SVN still?
What's wrong with svn?
It's much easier with git or hg, even in the single-master-repo model, even if all developers are using the CVS gateway so they don't have local copies of commit history. All such a project would need in order to protect against compromise (ignoring physical redundancy) is a backup git or hg repo, kept offline except for periodic pulls. As long as there are no warnings about upstream rebases, and you trust all visible commits, then everything's fine[1].
With SVN, as long as there's no built-in cryptographically secure way to connect one snapshot to the next when backing up SVN repos, determining the existence of a backdoor requires comparing entire backup SVN repos against the live main repo. Even if sufficient backups exist, the process is slow and requires taking the main SVN repo offline if there's any chance of a root compromise.
[1] Caveat 1: in any RCS, there could be backdoors masquerading as legitimate-looking commits if the attacker had commit access. Caveat 2: The security is subject to the cryptographic security of SHA-1.
In this FreeBSD case, if they're certain the svn repo wasn't compromised, all they have to do is validate the checkout on the two compromised machines against the svn repo.
Re: Security Incident on FreeBSD Infrastructure
#24Earlier quoted context omitted.
Live forensics are preferred to just reading disk; lots of problems with that and solutions to those problems on various types of machine.
Could you please elaborate on that? How do you do "trusted" live forensics on systems with possibly infected kernels and stuff? Assuming these servers were normal COTS and nothing fancy (thinking of CPU-bypassing memory access...)
Re: Security Incident on FreeBSD Infrastructure
#25"We unfortunately cannot guarantee the integrity of any packages available for installation between 19th September 2012 and 11th November 2012, or of any ports compiled from trees obtained via any means other than through svn.freebsd.org or one of its mirrors. Although we have no evidence to suggest any tampering took place and believe such interference is unlikely, we have to recommend you consider reinstalling any machine from scratch, using trusted sources."
Re: Security Incident on FreeBSD Infrastructure
#26Earlier quoted context omitted.
What's wrong with svn?
Lacking cryptographic hashes used by most DVCS software, SVN repositories need some external mechanism to be pretty sure the source repository hasn't been compromised. For instance, one might have snapshots of the SVN tree taken every week. It's much easier with git or hg, even in the single-master-repo model, even if all developers are using the CVS gateway so they don't have local copies of commit history. All such…
There are lots of things that are great about git, but it's not a security cure-all.
Re: Security Incident on FreeBSD Infrastructure
#27Please use passwords for your keys and allow key access only to a small set of known IP addresses.
Also do share other security techniques you're using besides the ones above.
Re: Security Incident on FreeBSD Infrastructure
#28Interesting choice that some machines will not be reinstalled, only "thoroughly audited".
There are some systems (generally speaking, ones which were installed in the past few weeks) for which we know exactly what files should be installed and what their SHA256 hashes are. Thoroughly audited means "every single bit is correct".
Re: Security Incident on FreeBSD Infrastructure
#29Earlier quoted context omitted.
Could you please elaborate on that? How do you do "trusted" live forensics on systems with possibly infected kernels and stuff? Assuming these servers were normal COTS and nothing fancy (thinking of CPU-bypassing memory access...)
DMA memory out using FireWire (if available)? That would be my approach!
Another option is a reboot onto a custom OS which is designed specifically to preserve memory (you get a safe few seconds of holdover). LiveKd is pretty cool (sysinternals)
There are PCIe cards which do processor/network and let you explore main memory -- WindowsSCOPE CaptureGUARD for PCIe or ExpressCard. Probably enough time to pop the case open and throw one in before memory degrades.
Countermeasures are numerous -- everything from doing memory encryption inside the CPU die (putting code in the cache, like TRESOR) and doing hypervisor tricks ("TresorVisor") (http://www1.informatik.uni-erlangen.de/tresor) to using Hardware Security Modules (like the SafeNet or Thales nCipher) to just keeping your servers physically secured from intruders who might memory-analyze them (although a software bootloader and remote-reboot could still be applied).
Forensics as a field seems to be a lot more interested in attacking mobile phones (which is one of the things I'm talking about at RSA 2013), but desktops and servers are still interesting targets.
Re: Security Incident on FreeBSD Infrastructure
#30Scary stuff. Please use passwords for your keys and allow key access only to a small set of known IP addresses. Also do share other security techniques you're using besides the ones above.