by api · 10y ago · 0 comments
I worked in infosec for a while and saw it at the org level:
1. Security recommends something with no concern for how it inconveniences (or worse) the users.
2. Users ignore or even actively work around security.
3. Users get pwned and blame security.
4. Security gets mad, calls users stupid, goes back to making ham fisted recommendations that everyone ignores because they have to get their work done.
5. Goto 1.
In the end I concluded that we (security) were at fault. In many cases there were user sensitive options and I would make an effort to find them, but most of security actively had contempt for anyone outside security and didn't care.
ntpd is clearly not great software, but OpenNTPD is maybe a little bit too minimal. When ntimed is worthy, I'm sure it'll make it into FreeBSD base, but it's most likely going to be in a .0 release, so it'll be a while and people will be impatient.
OpenSSL is hard. software in base needs libcrypto and libssl, so you need to pick a version and stick with it throughout the release cycle; but the FreeBSD release cycle is longer than the OpenSSL cycle; OpenSSL has also historically not been very good at keeping ABI compatibility. There's a lot of smart people working on this, but I think the least bad option is to not use openssl from base for anything outside of base.
Firewall: I don't think default to no firewall is a problem -- if you want something, you can set it up.
> Five months after this document was published, FreeBSD disabled DSA hostkey and SSHv1 server support in their bundled version of OpenSSH. This was done more than a year after upstream OpenSSH removed them, and both will remain enabled the 10.x branch until its end of life date.
This decision upsets the author, but is the right thing to do. You don't turn off things that people may be depending on in a .x release, you do it in a .0 release. 11.0 was the first .0 release since he wrote this, so it was done as fast as possible. As a FreeBSD user, I appreciate that the .x releases do not contain major changes that break things I may have been depending on. I accept that I need to carefully read the release notes for a .0 release, to see what things I can expect to be broken.
I'm very curious about this one ...
As far as I know, any remote holes without a firewall on a default install would be a ground-breaking, DEFCON-1 level security event to server admins. Complete with CVEs, news coverage on various sites, etc ... right? The only time in history I recall this being a problem was with Windows XP, which led to Blaster and Sasser.
Now I'm absolutely in favor of firewalls, but whenever I spin up a new VPS, there's going to be a window of about 20-30 minutes where I need to get in there, upload my SSH public keys, secure SSHD, tweak my sysctls, write out my pf firewall rules, and then activate them. There are also times when I need to test why a connection is failing, and one of the steps to testing is to turn off the firewall momentarily.
I know that attacks are basically incessant against any server on the net. I see dozens of IPs trying brute-force root login SSH attempts a day against my boxes.
How much danger is there, honestly speaking (not hypothetically), in this window? Would it be worth it to petition VPS providers to allow us to specify our own IP address, and have them enable a default "deny everything except from this one IP" firewall setup on new instances, or is that just total overkill?
sshd is ok enough -- PermitRootLogin is default off, would be nice if password login was disabled, but that's a pretty hard default to change because it's going to affect a lot of people.
ntpd isn't great, but the out of the box config is pretty restricted, so it's probably fine for a while
syslogd is weird, it probably shouldn't be open to the world -- but that's more likely to fill up your disk than to be owned.
I don't think there's a problem with running a firewall and I usually do, it provides a simple way to enforce your intent; but there's no sensible default rules. Api said it well, don't run services you don't need, and don't bind to external interfaces if you don't intend to serve the world.
The really really good ones allow you to install from your own images, in which case you can preconfigure firewall etc.
It's easy to use netstat to list all bound ports for TCP and UDP. I know on Linux there is also a flag to show the owning pid. Do that and then investigate any you don't recognize. If you don't need it turn it off. Otherwise check it's security record and config.
To me, the attitude of we're not going to change the defaults the neckbeards cut their teeth on 20 years ago regardless of the insane threat environment we exist in today and if you get hacked, owned or worse, it's your own damn fault for not knowing all of the tweaks that could have saved your ass that we decided not to make defaults even if they are defaults upstream is the height of Unix elitism IMHO.
In the world we live in, having defaults stay the same for the sake of not inconveniencing people who already know better is incredibly shortsighted. And it makes it way more difficult for newbies who don't have time to cobble together best practices from all the relevant IRC chat rooms, email lists and blog posts to learn FreeBSD’s best practices.
It doesn't make a lot of sense to have a default install of FreeBSD that allows users new to the platform and who are looking around and kicking the tires that also allows users to shoot themselves in the foot unnecessarily.
Thanks to the author’a article, I now disable the default settings for OpenSSH, use OpenNTPD, encrypt swap and build everything I can against libressl-devel.
The fact that so many of what are mostly common sense proposed defaults are perceived as breaking some kind of FreeBSD oath of obfuscation doesn't help grow the FreeBSD community in the long run. That's something to also consider.
http://adversari.es/blog/2013/06/19/cant-we-all-just-get-alo...
Backwards compatibility is not a reason for insecurity. Even Microsoft deprecated wrong options after some time.