99
submitted 9 months ago by KarnaSubarna@lemmy.ml to c/linux@lemmy.ml
top 7 comments
sorted by: hot top controversial new old
[-] InternetCitizen2@lemmy.world 22 points 9 months ago

Also the plot of Hollow Knight.

[-] flashgnash@lemm.ee 7 points 9 months ago* (last edited 9 months ago)

You would think you'd already have problems if someone's managed to compromise one or more of your containers without you knowing though whether they can get the host or not

Could be serving users malware or silently sucking up all the sensitive data the container sees

What if anything do people do about anti virus in containers?

[-] 520@kbin.social 2 points 9 months ago* (last edited 9 months ago)

You would think you’d already have problems if someone’s managed to compromise one or more of your containers without you knowing though whether they can get the host or not

True, but the security idea behind being in a containerised environment is that your problems aren't immediately made worse by the fact that your database server is on the same machine as your web application - since they'd both be on separate but networked containers.

What if anything do people do about anti virus in containers?

The real threat to containers isn't AV-detectable malware, but Remote Code Execution (RCE) exploits.

Containers are best used as single purpose installations. With that configuration, it isn't easy to get non-standard executables - including malware - onto a container.

Most RCE exploits also don't involve the dropping of malware files onto the file system. There are some that do, but that issue is better handled in other ways.

Why? Well AVs only do something about binaries they know or think to be malware. A well crafted, customised Cobalt Strike beacon (aka: malicious remote control software) will blow through any resistance an AV has to offer.

So what do we do? Remember what I said that containers are best used as single purpose installations? Therefore you know exactly what executables should be running, making it trivial to set up executable whitelisting. That means that any executable not on the list will not run.

But even that isn't completely bulletproof. It won't do much against web shells, in which case your best detection mechanism is to look for applications calling /bin/bash or /bin/sh that shouldn't be.

[-] jbk@discuss.tchncs.de 5 points 9 months ago

Wouldn't rootless containers have reduced the impact of these vulnerabilities? I'll happily continue using rootless podman for simple tasks

[-] KarnaSubarna@lemmy.ml 3 points 9 months ago* (last edited 9 months ago)

Docker can be run in rootless mode[1]. Ideally that should be the standard mode unless you have specific requirements not satisfied by rootless mode.

[1] https://docs.docker.com/engine/security/rootless/

[-] youngGoku@lemmy.world 1 points 9 months ago

Dang that's scary. The user would need ssh access to the container for this to work, right?

[-] chameleon@kbin.social 10 points 9 months ago

Even worse than that, they need to be able to make an arbitrary container from an arbitrary attacker-provided Dockerfile, or make fairly arbitrary calls to the Docker daemon (in which case you've already lost).

They're rather uninteresting for anyone self-hosting containers as the runc vuln doesn't offer a way to escape from within an already running container, while the BuildKit vulns all have fairly odd preconditions or require passing untrusted input. Quite the annoyance if you're running some kind of public cloud or public CI/CD service, though.

this post was submitted on 05 Feb 2024
99 points (100.0% liked)

Linux

48376 readers
1268 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS