12 ms·
As someone who has just spent the last two weeks attempting to secure and standardize a WordPress install, my sincerest condolences to Wired's system administra
by falcolas 12y ago
As someone who has just spent the last two weeks attempting to secure and standardize a WordPress install, my sincerest condolences to Wired's system administrators.
WordPress has achieved the complexity promised by Zawinski's Law, and is a true nightmare to attempt to secure. Not only do you have software which writes its own full URLs (including the scheme), you have software which checks and optionally triggers a built-in cron with every request, one PHP file which rules them all, an average of four cookies for every visit (which messes with some caching attempts), a mish-mash of JS and CSS files, static assets spread throughout the wordpress base, every plugin, and every theme, executable PHP in the DB...
It can even install its own plugins, if you give it the credentials to FTP to the server which hosts it.
I'm glad this project is nearing its completion. The promises made by Wordpress to content creators is backed by the nightmares of system administrators.
Zawinski's Law: “Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.”
EDIT:
Dear WordPress Sysadmins:
You still have some work to do in securing your site. For example, I can tell just from your headers that you're running on Apache 2.4.6, on PHP 5.6.6, and using Varnish 4 as your caching mechanism from your somewhat verbose headers.
Good luck!
- skywhopper 12y agoEverything you say about Wordpress is totally true in my experience. But I expect this team is in a much better position than most Wordpress hosts in terms of security potential. For the scale of someone like Wired, I expect they have an internal network they can restrict the administrative interface to. And I would also presume they are doing some aggressive caching to a CDN or to some sort of dedicated public-facing servers that. There's no reason to even worry about letting Wordpress itself respond directly to user requests. Or if they do, they can trim out the riskiest bits of code--no reason to run a vanilla install. This sort of separation would pretty much negate the standard issues with Wordpress's security.
- br-g 12y agoNope: http://wired.com/wp-admin http://wired.com/wp-admin
- krapp 12y agoIt would be hilarous if that was a honeypot that led to a completely useless, sandboxed admin panel..
- mikeschinkel 12y agoSecurity by obscurity. Yeah, that's a valid strategy.
- mgkimsal 12y ago"I can tell just from your headers that you're running on Apache 2.4.6, on PHP 5.6.6, and using Varnish 4 as your caching mechanism" or maybe that's just what they want you think...
- drzaiusapelord 12y agoWP is a perfectly fine tool for many scenarios. There's something nice about having a blogging platform that's easy to install and use. The problem I see if that this blogging platform gets shoe-horned into a CMS-like role with half-assed extensions and modifications, many of which are written by amateurs running a freemium-style model and often have little to no community source code review. I find popular extensions are okay, its just when you start looking at more obscure stuff because now your WP needs to be Drupal-light and SugarCRM-like that you run into trouble. WP is pretty much a victim of its own success. Lots of people have made sure the Wrong Way to do things is easy in the WP ecosystem and that hurts the core product. I'm really surprised to see a site that gets as much traffic as Wired using WP. I could see Drupal taking this role. Drupal, of course, is not without its faults. I've been part of a few Drupal roll-outs and have done development on it, and my god, there's an ugly learning curve here. If money is an issue, you can get a decent WP dev a lot less a Drupal shop would charge you. I imagine Wired, being a print magazine in the age of dying print, probably didn't have a big budget. Personally, I'd love to see something as solid as Drupal but with the ease of WP. Maybe this middle ground is impossible, but it would be nice to whip up a Drupal instance and have certain roles or templates ready to go, like WP does. Instead, stock Drupal is pretty much nothing out of the box and the dollars/time involved to make it something usable and finished can be significant. >an average of four cookies for every visit (which messes with some caching attempts) That's a trivial fix in Varnish. I run Varnish in front of WP for my own personal blog. >, I can tell just from your headers that you're running on Apache 2.4.6, on PHP 5.6.6, and using Varnish 4 If that's the worst sin they've committed, then I'd say they're doing pretty well. Securing WP isn't that tough. I find most LAMP apps are security nightmares and WP is just the posterboy for this and because of its popularity gets all the attention. If you're not running an IDS/IPS and locking down WP, securing permissions on your server, running SELinux, etc then you're just asking for trouble. I used to feel pretty confident about Drupal from a security POV until SA-2014-003. Considering how bad that was, it scared me a bit and makes me wonder why no one can make a CMS without major security issues in this day and age. I need to do the same amount of locking down with Drupal as I do WP. From a server admin role, there's not much difference between the two. I still need to do all that security stuff and admins who say, "Oh Drupal is secure I dont need to do that stuff" are the ones who are going to continue to get burned.
- jdub 12y agoLet's listen to security advice from the person who thinks obscurity means anything. :-)
- falcolas 12y agoObscurity gains you many things. It gains you protection from non-targeted attacks. Sure, for Wired this means less, but if you're not Wired, moving your SSH port will reduce the number of drive-by attacks made against SSH. Removing the version from your headers will reduce the number of "use Google to find vulnerable wordpress versions", and require an attacker to expend significantly more resources to identify vulnerabilities in your site. Obscurity means you only have to worry about being directly targeted, not randomly targeted. It certainly won't make you secure, but neither does it reduce your security, either.
- aikah 12y ago> Let's listen to security advice from the person who thinks obscurity means anything. :-) People shouldn't publish their login credentials on the net.That's security by obscurity. If you think of an alternative to that,let me know. Security is a matter of layers. The more layers you add, the more secure it gets. A smart thing to do is not to choose site.com/wp-admin.php as an admin URL accessible all over the net. Unfortunatly WP makes it very hard not to do that. Using WP is bad for small businesses that think WP makes webdev easy,because it tends to promote non secure habits for the sake of easy installation and use. WP is bad for big businesses because it's an serious attack vector. WP is good for security consultants on the other hand that make quite a lot of money fixing all WP security flaws,basically rewriting a good chunk of the CMS.
- mikeschinkel 12y ago> WP is bad for big businesses because it's an serious attack vector. That's FUD. WordPress is not hard to secure if you follow some best practices and do not use crap plugins. That said, one would hope with the projects budgets that big businesses offer to agencies that agencies would hire competent people to build their sites. Full disclosure: that's what we do; build WP sites for agencies on behalf their big business clients.
- romaniv 12y agoWhile I agree with the overall assertion that Wordpress is ridiculously bloated, slow and insecure, a lot of the specific things you mentioned have nothing to do with it and actually are pretty sensible features for websites of a certain size. For example, the built-in Cron thing is invaluable for smaller shared hosting installations, which do not allow you to schedule actual Cron jobs. Moreover, it allows you to copy Wordpress (or unroll if from a database backup) without having to worry about recreating those Cron jobs. Not everyone has root access to their hosting. Heck, not everyone has shell access to their hosting. Even people who do do not always have time and expertise to set up, maintain and use Docker/Puppet/openVZ or whatever you use for sysops. one PHP file which rules them all What do you mean?
- falcolas 12y ago> What do you mean? `/index.php` is the default handler for most requests which go through Wordpress, so even if you block access to a .php file further down the tree, there are generally ways to gain access to that file via `/index.php`. > the built-in Cron thing is invaluable for smaller shared hosting installations I don't disagree that it's useful; after all, reading Email is a useful feature for quite a few different pieces of software. The problem lies in that features like this also makes larger, dedicated hosting installations significantly harder to secure, and opens up a number of potential attack vectors. > Not everyone has root access to their hosting. No. And again, what makes a piece of software valuable for an individual can make it a liability for a corporation. Since I work for a corporation, having to deal with WordPress is a pain.
- mikeschinkel 12y agoI don't understand why you say WordPress is difficult to secure. Just disconnect the ethernet cable, turn off the wifi and lock the machine in a steel box. Or you can go with absolute security and just disconnect the power cable from the machine; problem solved.
- smacktoward 12y agoHe/she is referring to WordPress' use of the Front Controller design pattern (http://en.wikipedia.org/wiki/Front_Controller_pattern http://en.wikipedia.org/wiki/Front_Controller_pattern), which of all the things about WordPress you could choose to hyperventilate over seems like a strange one to go with.
- snowwrestler 12y agoI'm not aware of an security implications of knowing the application version. If it's properly patched, it doesn't matter if the bad guys know you're running the patched version. If it's not properly patched, automated exploit attempts will succeed whether or not they can see the version number.
- billyhoffman 12y agoIt's simple: "No Easy Buckets". Yes, some people just want to compromise a lot of sites, and don't care what they are. Those attackers will just blast huge swaths of the internet with an automated tool. But there is a spectrum of attackers, and "someone who only uses an automated tool" is just one extreme of it. Many attackers want a specific site, and Wired is a good example of a high profile target that attracts that kind of attention. If you are telling me your version number, andthere are known CVEs, but an automated exploit seems to be failing, I will try other things. Maybe there is a WAF or IDS in place I need to evade. Maybe there is an encoding issue I can use to work around it. Maybe its just a honey pot and you are lying to me about the version number. Or maybe there are no known issues, but I take the version number and go look at the source... Your security posture should not be "I don't think this will help an attacker, so its OK". It should instead be, expose as little information as possible for the site to function. (Update: Years ago during an audit, I found a version string inside an HTML comment. The software was open source, and I learned that this version stored sensitive data in an oddly named file in the web root. This sensitive file was not on a list of juicy files like what you find in Nikto or a similar tool. The version number is what did it. Granted, this was a targeted attack, but Wired is the type of site that gets targeted attacks from determined attackers who do more than run w3af or Nikto or Nexpose with default options)
- smacktoward 12y ago> If you are telling me your version number, andthere are known CVEs, but an automated exploit seems to be failing, I will try other things. But that has nothing to do with you knowing the version number. The problem there is running an old version with known CVEs. In that scenario you're vulnerable whether the version number is public or not. Keep your software up to date and it won't matter if an attacker can get the version number, because all it will tell them is that there's no old exploits they can take advantage of.
- csixty4 12y ago> It can even install its own plugins, if you give it the credentials to FTP to the server which hosts it. If it's asking for FTP credentials, you need to fix your file permissions[1] [1] http://codex.wordpress.org/Changing_File_Permissions
- falcolas 12y agoHere's the problem with that - most of these recommendations are for convenience, and tend to run counter to security recommendations. Files and directories on a web server should never be owned by or writable by the web user. They typically don't need to be world readable either (if they are, and your web server is compromised, then you start to leak a lot of unrelated data out over the compromised service). Here's a pretty minimalistic list of recommendations worth looking at on properly securing a web server: http://resources.infosecinstitute.com/securing-linux-web-server/ http://resources.infosecinstitute.com/securing-linux-web-ser...
- csixty4 12y agoYep. Welcome to administering systems for a web site. There's always a trade-off between convenience & security. If you make it hard for people to install plugins, they're not going to use your software (or your server). If you add "define('DISALLOW_FILE_MODS', true);" to wp-config.php, it removes the ability to install themes & plugins through WordPress itself. Then it's more like a traditional web application.