Slashdot Mirror


Hack Allows Escape of Play-With-Docker Containers (threatpost.com)

secwatcher quotes a report from Threatpost: Researchers hacked the Docker test platform called Play-with-Docker, allowing them to access data and manipulate any test Docker containers running on the host system. The proof-of-concept hack does not impact production Docker instances, according to CyberArk researchers that developed the proof-of-concept attack. "The team was able to escape the container and run code remotely right on the host, which has obvious security implications," wrote researchers in a technical write-up posted Monday.

Play-with-Docker is an open source free in-browser online playground designed to help developers learn how to use containers. While Play-with-Docker has the support of Docker, it was not created by nor is it maintained by the firm. The environment approximates having the Alpine Linux Virtual Machine in browser, allowing users to build and run Docker containers in various configurations.
The vulnerability was reported to the developers of the platform on November 6. On January 7, the bug was patched. As for how many instances of Play-with-Docker may have been affected, "CyberArk estimated there were as many as 200 instances of containers running on the platform it analyzed," reports Threatpost. "It also estimates the domain receives 100,000 monthly site visitors."

45 comments

  1. Okay, but... by Anonymous Coward · · Score: 1

    WTF is a docker?

    1. Re:Okay, but... by phantomfive · · Score: 5, Insightful

      OK, imagine you are a dev team, and you don't know how to write an install script for your software. No problem, just load it into docker once, and you don't have to worry about cleaning up your install scripts.

      There are some valid use cases, but what I just described is the main one people use in the modern world. There are people who think things like, "Makefiles (or Maven or whatever) are too complicated because they don't allow you to have loops and functions." Nah, these are signs you are making things too complicated and they should be simplified.

      Oh, and while I'm criticizing things like an old man, I'll just add that the primary use for mongodb is people who don't know SQL or how to write a schema. That isn't everyone, and there are some valid reasons to use NoSQL, but a primary use case is people who don't know databases.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:Okay, but... by Richard_at_work · · Score: 3, Informative

      I describe Docker as "an environment in a tin". You don't need to care about setting up full VMs for two bits of software that normally conflict, just run them on the same host under Docker with less overhead than full VMs. Upgrades are trivial as well.

      Being able to set up complete development environments (cache, database, reverse proxies, app servers etc) on each developers box with a single command - brilliant. Each developer can develop in an environment which mimics the production environment much more closely these days, because the two environments might indeed be created using the same Docker Compose file.

      Docker is brilliant.

      But what it isnt, and what pretty much every experienced Docker user will tell you it isnt, is a security system.

    3. Re:Okay, but... by phantomfive · · Score: 1

      Being able to set up complete development environments (cache, database, reverse proxies, app servers etc) on each developers box with a single command - brilliant

      So, I want you to know, if your install scripts aren't able to do this, your install scripts are broken. You can add "check out and build it" with a single command, too.

      --
      "First they came for the slanderers and i said nothing."
    4. Re:Okay, but... by Richard_at_work · · Score: 1

      Thats some interesting install scripts, if they can set up complex environments, including networks, hosts, DNS and the like... And how does your install scripts handle multiple copies of completely isolated environments, for testing purposes?

      But then there are many ways to do these things - Docker is one of them. And I can remove a Docker environment in seconds (just rm -f the containers and networks - gone, as if they never existed).

    5. Re:Okay, but... by phantomfive · · Score: 1

      , if they can set up complex environments, including networks, hosts, DNS and the like

      Even Windows can do all that on the command-line, are you setting up DNS from a GUI app or something?

      Anyway, it doesn't really matter. There are certainly some cases where Docker is a good idea, and maybe your setup is one of them. You can tell pretty easily: are your install scripts a mess? Or can you install your software to a new target with a single command? Why is your build and deploy so complex?

      --
      "First they came for the slanderers and i said nothing."
    6. Re: Okay, but... by Anonymous Coward · · Score: 0

      But it takes forever to
      apt get install everything
      And then you still have to chown and chmod everything to 777 before you disable the firewall so it just works. Then you can add hard coded entries to the dhcp and hosts file so you don't have to figure out how dhcp or dns work.

      With docker, you can do it once and then you can tell the boss how the IT expert is unnecessary, because you figured out a faster way to do it yourself!

    7. Re:Okay, but... by fwad · · Score: 1

      You hand edit all this stuff? I guess that's call job security - until you get a boss that knows what a computer is and gives you a month to sort your stuff out otherwise you're fired.

      I'm not saying docker doesn't have it uses (I know of one place whos' build process actually automatically builds a cleaner docker image and this gets deployed to the farm) but a work around for writing good software isn't one of them

      --
      -- Kernel Panic: Error reading /dev/caffeine
    8. Re:Okay, but... by Anonymous Coward · · Score: 0

      But then there are many ways to do these things - Docker is one of them. And I can remove a Docker environment in seconds (just rm -f the containers and networks - gone, as if they never existed).

      The proper way to dispose of a persistent container is:
      $ docker rm container_name (active container instance)
      or
      $ docker rmi container_image_name (container image)

      You do not use the command:
      $ rm -f container_name
      or
      $ rm-f container_image_name

    9. Re:Okay, but... by Opportunist · · Score: 1

      At its core, a tar file and instructions how to run it. :)

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    10. Re:Okay, but... by Anonymous Coward · · Score: 0

      This isn't the primary use case... it's how YOU and the teams you work with do things.
      and you're right, it's unimpressive.

    11. Re:Okay, but... by Anonymous Coward · · Score: 0

      >(I know of one place whos' build process actually automatically builds a cleaner docker image and this gets deployed to the farm)
      Yeah phantom5 sucks. This is what people use docker for. This is the most popular use case.

    12. Re:Okay, but... by Anonymous Coward · · Score: 0

      If only we had a way to keep different components separated, and if only we had a way to run different programs in isolation, and if only we had a way to have programs use different ports for talking on the network.

      Oh, wait, we have directories, processes, and configurations....

      Using docker to solve the problems of isolating applications written by developers who didn't understand directories, processes, and configurations is one thing. Making Docker part of your workflow because your developers can't understand how to not splatter their application all over the system is another -- and it surely isn't going to result in success.

      And because _they_ can't see how to escape the container, they're going to assert that Docker *is* a security mechanism, and therefore sufficient in checking off the "secure software" item on your list of requirements.

    13. Re:Okay, but... by UnknownSoldier · · Score: 1
    14. Re:Okay, but... by Anonymous Coward · · Score: 0

      That isn't everyone, and there are some valid reasons to use NoSQL, but a primary use case is people who don't know databases.

      So, NoSQL databases aren't....databases?

      You seem to be conflating two concepts.

  2. That's bad, this is worse. by Anonymous Coward · · Score: 0

    https://theintercept.com/2019/01/10/amazon-ring-security-camera/

    1. Re: That's bad, this is worse. by Anonymous Coward · · Score: 0

      I promise it is the worst

  3. Hipster platform is insecure by Anonymous Coward · · Score: 0

    At least that big Taliban beard will keep those thick black glasses on your head.

    1. Re:Hipster platform is insecure by Opportunist · · Score: 1

      Sorry to tell you, but it's far from being just some hipster platform. That technology is in production in some rather security critical environments.

      No, I'm not any more happy about it than you are.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  4. Used to think containers & virtualization grea by Seven+Spirals · · Score: 2

    Show me a company that's been running VMs or containers for years and I'll likely show you a mess of orphaned guests or containers, oversubscribed hosts, and a management and IT group that's disconnected from their actual resources because they feel they can stretch them forever due to memory balloons, thin disks, HyperThreading||SMT, and other consolidation features that often have a very sharp double edge to them. I'm not saying VMs and containers have no place, I'm just saying they are often a roach motel and often very poorly understood and administered.

  5. I'm not sure why this is news... by Anonymous Coward · · Score: 0

    Container sandboxes like Katakoda have been ripe for exploits like this for years. They don't have anything really stopping you from launching a bunch of cryptocurrency miners on them other than a 30 minute time limit, and I'd imagine that would be pretty easy to get around.

    Yeah... the crypto kitties are the primary reasons we can't have nice things in the cloud, like free trial accounts with access to GPU hardware.

  6. And this is why we use proper containers by Anonymous Coward · · Score: 0

    Whatever kernel/software-level bullshit you try to use will no insulate you from the bugs in those systems.

    Hell, even proper VM's (KVM, et al) don't protect you from spectre/meltdown. Give up now!

    1. Re:And this is why we use proper containers by Opportunist · · Score: 1

      It can be done, but it's far from easy. Docker has SO many attack surfaces that securing them is probably expensive enough that any money you save by lowering your hardware cost is nullified by the amount of money you need to secure it.

      --
      We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
  7. About right by Anonymous Coward · · Score: 0

    So now we add idiot "security researchers" shouting "hacks! hackers! hacking!" in the mix, and look, BeauHD has another content-free post to share!

    Apparently the thing of the times is to do things without knowing how to do these things.

  8. Re: Used to think containers & virtualization by Anonymous Coward · · Score: 0

    Ya, if you're going to do any scaling you need good audits and lifecycle management. Chargeback or showback models help keep attention on resource usage and do a lot to prevent "orohans" since someone has to justify their existence to the beancounters.

  9. Let me get this straight by ArchieBunker · · Score: 1

    Libraries are such a problem that you need virtual filesystems from the developer to actually run their program?

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
  10. When playing doctor... by Aighearach · · Score: 1

    never let them escape the container, not even with a hacksaw.

    Wait, what?! People actually want to run OS containers... in a browser? Isn't this taking "clientless" a bit far? Play-With indeed.

    Play with your own Docker, people, and you won't get infected.

  11. Depends. by Anonymous Coward · · Score: 2, Interesting

    I've worked 3 places since virtualization became mainstream in the early 2000s. In 2003, we mandated that all new systems go onto VMs and mandated that our vendors support it. We were the 25,000 gorilla, so this worked.
    A few specialized systems got dedicated hardware because the system was tied to the hardware, but that was the exception, by far.

    None of the projects I know about ever oversubscribed VMs, RAM, Storage or networking. Our CPU target was 80%. Before we started virtualizing, the average system utilization was 13%. We had over 60K servers. 5-8% of that utilization was monitoring software. We weren't buying $3K servers either. Most were $25K and up. On my projects we were buying $200K - $5M servers almost always.

    Whenever resources are shared, there can be complexities. In general, we treated every VM just like a physical machine and had a chargeback solution so each department paid their share of the costs for power, redundancy, space, storage, CPU, backups, DR, and OS support. Application and DB support was a bill they got directly.

    No free rides, usually. Unless some VP signed a contract with penalty clauses for delays in providing infrastructure. That happened a few times and totally screwed every other project being worked. I hope that VP didn't get any bonus for 5 yrs as a lesson on working together, but I fear they got higher bonuses for not spending their own money and for getting their projects in on time - about 300% faster than the people playing by the rules.

    For us, the hardest problem was handling SAN storage firmware upgrades. There might be 60 physical systems connected to an EMC which needed new firmware. Those computers might have 200 separate projects, so all of them would need to be moved off to other SAN storage before the original hw could be upgraded. In general, no projects would return to their old computers, so new projects would get placed onto it. Sometimes we'd run out of storage and didn't have physical room inside the data center, so we built another across the street. Just try to explain to a business guy spending $5M on computer hardware that the storage isn't in the same building as their computers, but accessing it was "just as fast". ;)

    1. Re:Depends. by Anonymous Coward · · Score: 0

      Your SAN team was doing it wrong.

  12. Containers never made sense to me... by Anonymous Coward · · Score: 0

    VMs make a limited amount of sense, but only if you are REALLY SURE that the VM/sandbox is provably secure. No VM environment yet has been, and thanks to hardware problems unless you are running the combination of an In-Order processor with Registered memory and non-vulnerable virtual machine extensions (which as far as I know, no such combination of features exist!) then you have to assume your vms can be compromised by a sufficiently dedicated attacker, and your containers will fare even less well, since all you need is a single kernel/escalation vulnerability and your containers are likely broken and leaking root namespace kernel information into your nice little sandbox opening the door to complete system control.

    Personally, I question how much we have really improved over the unix rwx or DEC/M$ NT permissions, and how much of this is just obfuscation of the problem to somewhere else in the code/permission chain. Punting it down the road under a pile of complications rather than solving the root issues of each.

    1. Re:Containers never made sense to me... by Anonymous Coward · · Score: 0

      You may be right about that but then there is no machine that is secure - even dedicated HW, with air gap and multiple physical security layers around the bunker in which they stand will be compromised if sufficiently dedicated individual or more likely organisation is after it. Alas this is not all of the use cases for these solutions. I have been installing telecom infrastructure VNFs on HW dedicated for their use. Most of these systems' VMs had containers inside to facilitate separation between configuration for different pieces of functionality not to defend against hackerz but to provide simpler configuration while layers of security have been provided from VM through compute hosts and switches and routers and OAM controllers to the proxies and firewalls etc. This all does not provide absolute security but isolates the core systems ever more from evil people. So this is how I see it yet there is another aspect of this: there is more and more hackerz around who think they can do thinks freely w/o risk of being caught because bitcoins. It reminds me of any natural system in which some beings try to fight their enemies whole life long while the aggressive beings try to circumvent the defenses and catch the big price every day. Struggles of life I suppose. As soon as you become week and cannot protect yourself you are gone. This battle will go on forever or at least as long as life in nature and in humanity originated systems exist.

  13. Re:Used to think containers & virtualization g by ArchieBunker · · Score: 1

    IBM has been doing it properly since the 1980s.

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
  14. Re:Used to think containers & virtualization g by Anonymous Coward · · Score: 0

    FreeBSD box out there running on FreeBSD 11 that has a FreeBSD 10 compatibility layer running a FreeBSD 9 layer, running an 8 layer running a 7 layer ..... running a FreeBSD 4.x layer, that has original FreeBSD 4 executables running to which no one has the original source. It just works.

  15. Re:Used to think containers & virtualization g by Anonymous Coward · · Score: 0

    Show me a company that's been running VMs or containers for years and I'll likely show you a mess of orphaned guests or containers, oversubscribed hosts, and a management and IT group that's disconnected from their actual resources because they feel they can stretch them forever due to memory balloons, thin disks, HyperThreading||SMT, and other consolidation features that often have a very sharp double edge to them. I'm not saying VMs and containers have no place, I'm just saying they are often a roach motel and often very poorly understood and administered.

    The disconnect from the physical resources can happen without VMs. 2Ghz bajillion core processors in a box that needed ten fast ones. Literally more ram than you can use, integrated NICs that go into some kind of high latency polling mode at high pps. All the failed disk lights and powered off decommed servers ready to power on and eat their former IP address like zombies.

    Intel servers are so cheap they are (mis)treated just like VMs basically.

  16. Really? by Anonymous Coward · · Score: 0

    Play with Docker is a playground app. Who cares. It's not like you can escape real Docker containers.

  17. Docker is a Ugly by BrendaEM · · Score: 1

    I've encountered docker with OpenFoam. For the user, it's a mess. In the setup I experimented with, it used virtualization, so right out of the gate, 10% the performance is gone, in electricity and wasted heat. Docker is an ugly, ugly attempt at cross-platform.

    --
    https://www.youtube.com/c/BrendaEM
  18. Mod Parent UP!!! by Anonymous Coward · · Score: 0

    I'm just saying they are often a roach motel and often very poorly understood and administered.

    So much this. Clueless uninformed people making decisions about stuff that they shouldn't, as always. And, the end result is a huge mess and likely breach

    Yet, no one is held responsible, so no one cares and it never changes.

    P.S. you failed to mention the ever popular, run all the containers as root fiasco. FML

  19. Most data is not relational by Somervillain · · Score: 1

    As a 25 year veteran of DB programming on Oracle, SQL Server, Cassandra, Mongo, I would like to state that you are wrong about that. Sure, some people just don't know how to use a relational database properly, so they go schemaless, but what I like to call an "HR problem, not a technology problem." A lot, if not most, problem domains don't fit the relational model very well. A lot of systems store complex, dynamic hierarchical customer data. My daily job is storing unpredictable user-entered data (dynamic tree structures). My last job was storing healthcare data. For both, document-based databases are a much better fit.

    How many transactions have you written that weren't proper transactions, but you simply saving chunks of an object across multiple queries?

    How many systems have you written that broke an object across many tables only to reassemble them back in the exact same format, never querying the individual child tables?

    If either those are true, it's time to start questioning how much value you're getting from your relational database

    Document-based databases are inherently more secure. A relational database returns everything unless you write code to limit it. One mistake or SQL injection and you're leaking data across customers. It leaks data by default and you have to write a WHERE clause to stop that. For a document database, it returns it's single user's document by default. You have to write special code to get data across customers.

    For those reasons, despite building a long and very profitable career off Oracle, I recommend it less and less each day, going more for Cassandra and Mongo for a lot of corporate systems. Some portions of an application are clear fits for Oracle, simple systems with very predictable data structures. But I have taken data processing jobs down from minutes to milliseconds by replacing Oracle for dynamic and complex applications for Mongo because their underlying use case was a poor fit for a relational model and an excellent fit for a document model.

    1. Re:Most data is not relational by phantomfive · · Score: 1

      This is a good post.

      --
      "First they came for the slanderers and i said nothing."
    2. Re:Most data is not relational by Bengie · · Score: 1

      Relational databases are not ideal for non-relational data? I see the opposite in my line of work. People using document database for relational data, then they have to constantly fix data inconsistencies. I always just assumed that I should use the best tool for the job, but I found out in the real world that most just use whatever they're most used to or is the current fad. Technology is magic. If you want your project to succeed, you need to do the current fad rain dance. If that's RDBMS, then you do the RDBMS rain dance, if the current fad is no-sql, then the no-sql rain dance.

  20. Please, not so many details! by Opportunist · · Score: 1

    What is the problem? A configuration error? Then it's a non-story, badly configured docker environments are a dime a dozen. A docker bug? Then say so, so we can patch our docker environments. A fundamental flaw in the docker environment that breaks the whole docker-concept for good? NOW you'd have a story!

    WTF is it?

    --
    We used to have a Bill of Rights. Now, with the rights gone, all we have left is the bill.
    1. Re:Please, not so many details! by Anonymous Coward · · Score: 1

      Aside from the fundamental flaw that docker gives an illusion that it's a safe way to run untrusted code... :-)

      In this case, the debugfs command was available in the container and was able to bypass the AppArmor profile and gain access to the host filesystem. From there they were able to find everything they needed to build a reverse shell kernel module and load it to get full shell access to the host.

  21. Re:Used to think containers & virtualization g by Seven+Spirals · · Score: 1

    I've worked with some z/OS boxes before and experienced their virtualization. I agree and haven't seen the same sprawl or crazy growth->neglect->stagnation->waste cycle that I've seen with VMware shops. However, the reasons aren't obvious. I'd say that the licensing costs are too high and the skillset too narrow so it simply doesn't get used to the same degree as more common VM solutions. Also, the "practices" are different for z/OS to some degree. However, it does have some things in common with VIOS on POWER. That's definitely a VM technology I've seen get overstuffed and under-engineered and that goes double when they eschew NPIV or dedicated HBAs and instead use vSCSI containers and FCoE/DCB for both networking and storage. In fact, some of the worst VM environs I've seen have been VIOS ones. It's not that they can't be done right, it's that most people aren't smart enough to say no to the "converged" (read: inferior shared bandwidth) cheap-out route, nor can they resist hiring no-nothing H1B sysadmins to ignore their problems for cheap. The latter tending to exacerbate over-subscription situations because they just don't give a damn as long as they keep their visa.