• Resolved lovingboth

    (@lovingboth)


    I have had strong server-based protection on wp-login.php for ages. Any IP address failing to get the username/password right in a couple of attempts is banned for a significant time.

    Users have moaned about this, but I have always gone ‘Tough, it’s kept all the sites secure.’

    Last month, it didn’t.

    That’s because some bot used xmlrpc.php to find all users* and then hammered it with hundreds of username / password combos per request until they found one that worked.

    And used it.**

    Doing some searches here, I can see some staggering complacency about the xmlrpc ‘feature’, despite it featuring in several security holes in the past decade. (Literally: see the release notes for 1.5.1.3 back in June 2005.)

    So when someone reported a year ago that “Our hosting company has recently seen a new kind of attack on the WordPress xmlrpc.php file: a password guessing attack that uses the wp.getUsersBlogs feature” the response from a moderator was “It’s really not that big of a deal, to be honest.”

    Well, it is.

    At the moment, users have a choice between blocking access to xmlrpc.php or being vulnerable. The simplest ways of blocking it stop the WordPress apps and much of JetPack from working. You can get around the latter (there’s an interesting plugin that looks for Automattic’s IP addressess and whitelists those.. if it’s on Apache 2.2) but not the former if you want to use them at random locations away from home.

    On a server level, you can slow down accesses to the file, but a) a huge proportion of the userbase does not have the ability to do that, and b) the ‘La la la, it’s not a problem’ attitude doesn’t inspire those of us who can to do it until – in my case – it’s too late.

    What should amaze me (but sadly doesn’t: there’s a long track record of prioritizing convenience over ‘out of the box’ security) is that looking at make.ww.wp.xz.cn, I can’t spot any efforts to stop this.

    Even something as simple as limiting the number of username / password attempts in a single request would be good.

    Have I missed something or is this attack going to be allowed to continue in the same way that there is still no limit on how many times someone can access wp-login before the core code slows or blocks them?

    .

    * I have also not had users called ‘admin’ for years – as soon as WP allowed you to pick the name of the first admin account, and long before it stopped stupidly suggesting it as a good name.

    But the effect of that change has been that instead of going after ‘admin’, bots do this.

    ** I don’t post with admin accounts, so the names have not been visible to site visitors, but xmlrpc allows anyone to get them and it’s a pretty good guess that the first user has admin rights.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Moderator James Huff

    (@macmanx)

    I don’t suspect core will adopt further XML-RPC protections, but that’s not my place to say for sure, though I suspect that the API work will replace XML-RPC in a big way.

    Some quick thoughts on the subject though:

    1. Blocking xmlrpc.php entirely not only breaks Jetpack, it breaks mobile and desktop blogging apps too. And, if you whitelist Automattic’s IPs to allow Jetpack, you’re still blocking mobile and desktop blogging apps. And, if you allow bloggers to whitelist their home IP, that helps for desktop blogging apps, but you’ll never whitelist the IP of every cell tower out there.

    1b. So, in a simple whitelist-or-block structure, it’s not so much “convenience vs. security” as it is “the ability to use your blog away from home vs. security”, it’s honestly a much harder sell.

    1c. All of the major hosting providers I work with have found a way to utilize mod_security to block or mitigate the current attack itself without affecting legitimate usage of xmlrpc.php, unfortunately they don’t make those rules available (for obvious reasons), but I’m just making note that it is possible.

    2. If you’re already using Jetpack, switch on its Protect module at Jetpack -> Settings, which protects *both* wp-login.php and xmlrpc.php from brute force attacks, including the newer method: https://samhotchkiss.wordpress.com/2015/10/12/testing-for-xml-rpc-multicall-vulnerabilities-in-wordpress/

    3. At the end of it all, these are all brute force attacks, they’re guesses based on known common passwords. If you use a strong password, they’re never getting in this way, and there just so happens to be a great plugin for that: https://ww.wp.xz.cn/plugins/force-strong-passwords/

    Thread Starter lovingboth

    (@lovingboth)

    Thanks. You were, of course, the person who said it wasn’t a big deal a year ago.

    1. Yes, absolutely. I said that.

    1b. Well, there’s nothing to stop people using the browser interface away from home.

    1c. That’s great… for those using such services. One rule is easy: limit the rate at which something can access it.

    2. I don’t use Jetpack. Along with many others, I think it’s bloated, trying to do too much in one plugin, leading to slowing down sites. It has also had its own security problems.

    I do allow one client to use it (this is how I know about the plugin that whitelists the Automattic IP addresses… and that it doesn’t work without patching if you’re using Apache 2.4’s access syntax!)

    But if Automattic think it’s a good idea to limit this in Jetpack, why on WordPress isn’t it a good idea to do this in core?? (And why is it a good idea to make it optional in Jetpack?)

    What legitimate use is there for the system.multicall method? Do the apps use it? If not, stop supporting it or have it off by default! If JetPack needs it, it can enable it…

    3. No, it’s not. The password that got me was an long meaningless phrase (involving one non-dictionary word and punctuation too) that – when I look just now – appears nowhere in a Google search and was not used by me anywhere else. Clearly, some weeks of trying hundreds of passwords at a time was enough to get it.

    And again, as with the way WordPress allows infinite failed login attempts as fast as the server will manage them without a murmur, this sort of ‘Yes, that’s a problem, it’s fixed in a plugin’ is only ok if people install the plugin. Which they don’t. As Google easily proves, a least a million people haven’t even enabled the Akismet plugin that has come with WordPress for ages.

    0. As far as the json-based API goes, a) how long will xmlrpc remain there ‘because legacy’ and b) do you want to accept a bet says there’s a security issue with the new API within six months?

    Moderator James Huff

    (@macmanx)

    But if Automattic think it’s a good idea to limit this in Jetpack, why on WordPress isn’t it a good idea to do this in core??

    Automattic is not WordPress, just because Jetpack does something doesn’t mean it will wind up in core. That’s kind of why Jetpack exists.

    Automattic is a for-profit company that uses WordPress and happens to be CEO’d by the co-founder of WordPress, but that’s largely where the relationship ends.

    To the rest of your statements, all I can say is, please get involved and help out the other developers who are volunteering their time: https://make.ww.wp.xz.cn/core/

    Hi,

    First thanks for all the work on this great CMS.

    As for XML-RPC feature, I doubt a bit it’s a hugely requested feature. For my humble tests, I guess I used it 2/3 times in a bunch of years (close to 10). And if it’s a potential hole, well, why not scrub it?

    Auttomattic is not WordPress. For WordPress.com sure, but I wonder who is paying for the whole servers to fulfill bandwith on ww.wp.xz.cn (some articles states a cloud of around 100 servers).

    JetPack is very nice, and I won’t criticize strategy nor model behind it if it finance well WP.

    Though, I won’t say WP is the most efficient CMS, in terms of speed.

    In the end, it might need just to invent a kind of “logo” or “brand” to cleary state difference between the 2. A bit like Red Hat did with Openshift. 2 different names might help.

    My humble 2 cents and o/

    Moderator James Huff

    (@macmanx)

    As for XML-RPC feature, I doubt a bit it’s a hugely requested feature. For my humble tests, I guess I used it 2/3 times in a bunch of years (close to 10). And if it’s a potential hole, well, why not scrub it?

    It’s a bit more difficult than just scrubbing it because a few people never use it. 😉

    WordPress now powers 25% of known websites: http://ma.tt/2015/11/seventy-five-to-go/

    And, XML-RPC powers all mobile and desktop blogging apps. It also powers Jetpack on a few million installations, some commenting plugins, a few other plugins with connected services, a few blog-to-print services, and I know I’m missing some, but you get the idea. 🙂

    Tossing XML-RPC now would mean tossing all that, for 25% of known websites.

    The good news is, the REST API is being built to be a secure and stable replacement for most of that. It’s happening, it’s in development in public view, and the start of it will be in WordPress 4.4 in just a few weeks.

    There is a mountain to climb, and we’ll get over it for sure, we just can’t teleport to the other side right this minute. 🙂

    Hi James,

    About XML-RPC, my mistake, I thought it was less widely used by these 25% 🙁
    Anyways, I have no idea what it implies to manage a project of that size. So kudos.

    As for REST API, good luck.

    Also, I just read about new php 7 benchmarks that includes WP like there, all seems good news.

    https://kinsta.com/blog/hhvm-vs-php-7/

    As for mountain talk, I’d add WP organization created reachable peaks for many people over the world. And growing. Summit is yet to be found (if any).

    Moderator James Huff

    (@macmanx)

    PHP 7 is going to be exciting. Speed and stability improvements for everyone!

    Thanks for the kind words! 🙂

    Thread Starter lovingboth

    (@lovingboth)

    Automattic is not WordPress (and vice versa) but..

    a) It is highly privileged within WordPress – its very good anti-spam plugin is in every WP installation; when you go to install a new plugin, three of the six you’re shown are Automattic’s (and two of the others are projects started by guess who); and their icon system is on by default.

    b) When the people running the largest installation of WordPress think something is a good idea… it might be.

    Again, what legitimate use is there for the system.multicall method?

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I am sure I’ll regret chiming in. 😉

    Automattic is not WordPress (and vice versa) but..

    There really is no buts about it. Automattic isn’t ww.wp.xz.cn, period. 😉

    Again, what legitimate use is there for the system.multicall method?

    I can’t find it, but I think there is a patch to handle that call. It’s in the XML-RPC spec (that call) but disabling an unused call might be in the works.

    *Drinks more coffee*

    My Google Fu is weak at the moment, if I find that trac link I’ll post it.

    Edit: I think this may be the ticket.

    https://core.trac.ww.wp.xz.cn/ticket/34336

    Moderator James Huff

    (@macmanx)

    Thanks, Jan!

    Thread Starter lovingboth

    (@lovingboth)

    Ah, great! I did do several searches but didn’t find it.

    Only a year after the problem was originally mentioned too 🙂

    Now, about the lack of bruteforce prevention on wp-login.php … 🙂

    Moderator James Huff

    (@macmanx)

    Plenty of plugins for that. Some people don’t want to be locked out of their sites because they forget their passwords but are *really* sure they’re just typing it wrong. 😉

    Now, about the lack of bruteforce prevention on wp-login.php … 🙂

    For that issue and from a security standpoint, I read some good ways to fully customize this URL, even without plugin.

    If you manage your vps or dedicated server, it’s cleary possible. Which is also handy to save bandwith with damn rogue bots, trying to catch any form they can get (and bruteforce it).

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Limiting what attackers can do via xmlrpc.php’ is closed to new replies.