News for hackers. Stuff that matters.
Re:Desktop Linux Hardening by dannymi on Monday June 12, 2023 @10:24AM (#36293957)
If you run programs that you can't trust (for example because the source is unavailable and/or nobody reads it, no one is a gatekeeper of program updates etc), then you are opening yourself to attack because the default unix security model is just as bad as the Windows one. (The Windows one used to be much worse, but it isn't anymore, now they are the same badness)

Nowadays, the web browser is used as a platform to run programs on and so it has a lot of access to weird things (multiple monitors, local filesystem, ...) so one has to be careful what you enable there--since you probably run a lot of Javascript written by shady people you don't know.

The Linux desktop security model has user accounts, and then files have permissions for those users (yeah, there are also user groups, whatever). That means if you have a misbehaving (or malicious) program, it can read stuff in your home directory since that's owned by the same user account--so it can read your saved passwords, delete all your photos, figure out your banking info--but hey, at least it can't remove your printer (since for the latter you need to use the root user account :P) /s .

There are mitigations against that and the easiest (and crappiest) one is containerization: just run each program in an isolated virtual-machine-like-thing and they can't access other program's data (i.e. the rest of YOUR data) in the first place.

Then there's SELinux which flips this entire thing on its head. By default, nobody can do anything (that's the first very good decision!). If a process wants to do things, there has to be a policy installed that mentions that specific thing to be allowed and when. Otherwise no go. This way of working is much safer, BUT someone has to maintain those policies! And it must not be the program's author since he could just add whatever line he wants to have to the policy--and that's obviously bad. So who does it? Usually the Linux distribution's maintainer. Or, more commonly, nobody--so there's no policy for your favorite program and so it won't work.

Re:Desktop Linux Hardening by anthk on Monday June 12, 2023 @12:14PM (#36295909)
Containers are not virtual machines.
Re:Desktop Linux Hardening by egberts1 on Monday June 12, 2023 @01:49PM (#36297859)
But container is a form of virtualization.
Re:Desktop Linux Hardening by anthk on Monday June 12, 2023 @01:58PM (#36298018)
No. Just a form of setting namespaces. Nothing it's virtualized.
Re:Desktop Linux Hardening by red-iron-pine on Monday June 12, 2023 @02:59PM (#36299160)
essentially just a very robust deployment of a chroot jail.

which can totally happen on a VM, but not a VM in-and-of-itself

Re:Desktop Linux Hardening by anthk on Monday June 12, 2023 @03:19PM (#36299470)
Then you don't have a container. You have a VM with a container.
Re:Desktop Linux Hardening by kmarc on Monday June 12, 2023 @05:09PM (#36301161)
Although I use the term "virtualization" the same way as you want to understand it, containers are still called "virtualization", as this wikipedia page suggests:

https://en.wikipedia.org/wiki/OS-level_virtualization

Good to know about it. Especially once you meet decades-experienced folks (mainframe guys), they rather use the word "virtualization" in its broader sense, yet they understand the difference between containers and virtual machines.

Re:Desktop Linux Hardening by anthk on Monday June 12, 2023 @06:00PM (#36301853)
Userspace namespaces/chroots/jails are NOT virtualizations, period. Plan9/9front it's composed/run on namespaces and no one would say every window(1) process it's being virtualized because it has instances of different Plan9 devices such as their own /dev/draw.
Re:Desktop Linux Hardening by egberts1 on Monday June 12, 2023 @07:06PM (#36302652)
Here's what those IBM guys have to say about container and virtualization:

https://www.ibm.com/cloud/blog/containers-vs-vms#:~:text=Con....

Carnegie Melon University chimes in as well:

https://insights.sei.cmu.edu/blog/virtualization-via-contain...

Amazon AWS:

is container virtualization

Re:Desktop Linux Hardening by ElectricalUnion on Monday June 12, 2023 @08:02PM (#36303211)
> Amazon AWS: is container virtualization

Well, if you rent containers, you get containers. If you rent bare-metal machines, you get bare metal machines. So I don't see how this assertion makes any sense.

The CMU article skims around the names but call containers "virtual runtime environment" instead of straight "virtualization". But by that definition everything in any modern computer is "virtualized" because it runs over Virtual Memory.