Slashdot Mirror


Cache On Delivery — Memcached Opens an Accidental Security Hole

jamie spotted this eye-opening presentation (here's a longer explanation) about how easy it is to access sensitive data on many sites using memcached, writing "If you already know what memcached is, skim to slide #17. The jaw-drop will happen around slide #33. Turns out many websites expose their totally-non-protected memcached interface to the Internet, including gowalla, bit.ly, and PBS."

5 of 149 comments (clear)

  1. Re:Let me see if I understand this by Firehed · · Score: 5, Informative

    Memcache's one purpose in life is to be as fast as possible. It makes perfect sense for it to drop the overhead of authentication and leave it on the server operator's head to not make it publicly accessible. It's not rare to strip out MySQL's authentication layer (and presumably the same for other DBs) for a speedup when your DB server is sitting behind a firewall.

    --
    How are sites slashdotted when nobody reads TFAs?
  2. A few clarifications by marcoslaviero · · Score: 5, Informative

    In terms of the vendors identified, Bit.ly, GoWalla and Pbs were notified. Bit.ly and GoWalla repaired the flaws within minutes. I am not aware of Pbs repairing the issue. This talk seems to have struck a chord which I can't really explain (suggestions welcome). Yes, exposing your memcached's is bad (the talk shows just how bad), but it's not a clever find to discover them. [fd: that's my name on the slides]

  3. Re:I fail to see why this is news by Anonymous Coward · · Score: 1, Informative

    http://code.google.com/p/memcached/wiki/NewConfiguringServer

    Networking
    By default memcached listens on TCP and UDP ports, both 11211. -l allows you to bind to specific interfaces or IP addresses. Memcached does not spend much, if any, effort in ensuring its defensibility from random internet connections. So you must not expose memcached directly to the internet, or otherwise any untrusted users. Using SASL authentication here helps, but should not be totally trusted.

    From their wiki page detailing how to configure a new server. Surely the part they highlight in bold should have raised a flag to even the dumbest administrator.

  4. Re:I fail to see why this is news by vrmlguy · · Score: 2, Informative

    http://code.google.com/p/memcached/wiki/NewConfiguringServer

    Networking
    By default memcached listens on TCP and UDP ports, both 11211. -l allows you to bind to specific interfaces or IP addresses. Memcached does not spend much, if any, effort in ensuring its defensibility from random internet connections. So you must not expose memcached directly to the internet, or otherwise any untrusted users. Using SASL authentication here helps, but should not be totally trusted.

    From their wiki page detailing how to configure a new server. Surely the part they highlight in bold should have raised a flag to even the dumbest administrator.

    Here's an idea that won't impact performance: At startup, issue a big multi-line warning if the IP addresses that are getting bound aren't on a Private Internet:

    The Internet Assigned Numbers Authority (IANA) has reserved the
          following three blocks of the IP address space for private internets:

              10.0.0.0 - 10.255.255.255 (10/8 prefix)
              172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
              192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

    --
    Nothing for 6-digit uids?
  5. Re:I fail to see why this is news by bjourne · · Score: 2, Informative
    Yes memcached defaults to only accepting connections from the local address. From memcached.conf:

    # Specify which IP address to listen on. The default is to listen on all IP addresses # This parameter is one of the only security measures that memcached has, so make sure # it's listening on a firewalled interface. -l 127.0.0.1