Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
sb hermit
Dec 13, 2016





selinux is completely unfriendly to new sysadmins and unintuitive for anyone coming from any other OS

it feels so bolted-on, since you have to pass in special flags for ls to get security labels and read a special man page for the service that you’re configuring.

Adbot
ADBOT LOVES YOU

BangersInMyKnickers
Nov 3, 2004

I have a thing for courageous dongles

so sorry doing things correctly required a modicum of effort

spankmeister
Jun 15, 2008






el dorito posted:

selinux is completely unfriendly to new sysadmins and unintuitive for anyone coming from any other OS

it feels so bolted-on, since you have to pass in special flags for ls to get security labels and read a special man page for the service that you’re configuring.

it's 2018

sb hermit
Dec 13, 2016






I’ve gotten used to selinux. I think it’s fine. But it could use more documentation.

FlapYoJacks
Feb 12, 2009

el dorito posted:

I’ve gotten used to selinux. I think it’s fine. But it could use more documentation.

There’s literally a GUI that shows you what’s wrong and how to fix it.

hifi
Jul 25, 2012

el dorito posted:

selinux is completely unfriendly to new sysadmins and unintuitive for anyone coming from any other OS

it feels so bolted-on, since you have to pass in special flags for ls to get security labels and read a special man page for the service that you’re configuring.

you have to pass flags to ls to get file sizes

crazypenguin
Mar 9, 2005
nothing witty here, move along
fwiw, selinux is a confusing design. Red hat has figured out how to make it work pretty well, but it's pretty much a bunch of well-engineered workarounds for a crummy core design.

containers are a lot more friendly. Instead of writing a policy that says nginx can only read things labeled for it, and writing a tool that'll easily relabel /var/www for you, you just only mount /var/www inside the nginx container.

way simpler to understand, even easier to get right.

pram
Jun 10, 2001

ratbert90 posted:

There’s literally a GUI that shows you what’s wrong and how to fix it.

ah yes because linux servers have x running

pram
Jun 10, 2001
firewalld is easy though if you cant figure it out yr dumb as poo poo

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
my favorite selinux thing is the feature tells you how to add an ignore rule for a process by grepping through audit.log and looking for a match on the first 8 characters of the process name. audit.log has attacker-provided strings in it.

nsa level security here

FlapYoJacks
Feb 12, 2009

pram posted:

ah yes because linux servers have x running

Fine.

https://www.youtube.com/watch?v=cNoVgDqqJmM&hd=1&t=6s

That should be required watching for every single Linux sysadmin.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
also this thing is what makes your linux secure. so secure that github cannot even let you audit the whole thing. https://github.com/fedora-selinux/selinux-policy-contrib

sb hermit
Dec 13, 2016





ratbert90 posted:

There’s literally a GUI that shows you what’s wrong and how to fix it.

What about people that install a minimal system and don’t have X?

and yes, I understand that this is a linux desktop thread

hifi posted:

you have to pass flags to ls to get file sizes

the flag I use, “-l”, gives me file sizes and owner/group and unix acls and dates, but not selinux labels

I know why it doesn’t get added in there but my point still stands

hifi
Jul 25, 2012

selinux seems to randomly log the helper error messages that give you the policy fixes or tell you to roll your own policy. i dunno why it sometimes doesn't but it does tell you what to do eventually.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
More like messy linux

Notorious b.s.d.
Jan 25, 2003

by Reene

crazypenguin posted:

containers are a lot more friendly. Instead of writing a policy that says nginx can only read things labeled for it, and writing a tool that'll easily relabel /var/www for you, you just only mount /var/www inside the nginx container.

you know nothing in here is true right. if you compromise nginx badly enough inside a container, you compromised the entire system. an lxc container is just an enhanced chroot: as soon as uid=0, you are no longer restricted to the chroot.

there's no security story on linux containers, unless you wrote selinux policy to contain your containers

Notorious b.s.d.
Jan 25, 2003

by Reene

el dorito posted:

What about people that install a minimal system and don’t have X?

there is a command line utility that does the exact same log processing as the gui utility

(there is no corner case too stupid for a red hat customer to have demanded it)

Notorious b.s.d.
Jan 25, 2003

by Reene

el dorito posted:

selinux is completely unfriendly to new sysadmins and unintuitive for anyone coming from any other OS

i don't really care about new sysadmins, but if i did, i would point them at the vendor documentation

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/security_guide/index

Notorious b.s.d.
Jan 25, 2003

by Reene

Suspicious Dish posted:

also this thing is what makes your linux secure. so secure that github cannot even let you audit the whole thing. https://github.com/fedora-selinux/selinux-policy-contrib

it's a giant monorepo containing thousands of security policies

no poo poo the repo has many files

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
SELinux is like an undercover cop on a prostitution sting, u have to tell it what you want

sb hermit
Dec 13, 2016





Gazpacho posted:

SELinux is like an undercover cop on a prostitution sting, u have to tell it what you want

I want a hawaiian pizza.

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
sounds kinky

akadajet
Sep 14, 2003

ratbert90 posted:

That should be required watching for every single Linux sysadmin.

So thankful that I'm exempt.

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
sorry, no its bad not good

selinux is the worst possible thing, even worse than systemd

which is also bad and not good

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
i will fight you

FlapYoJacks
Feb 12, 2009

Poopernickel posted:

sorry, no its bad not good

selinux is the worst possible thing, even worse than systemd

which is also bad and not good

never touch Linux again.

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
(actually systemd is pretty ok for desktops when a distro packager is janitoring it for you)

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe

ratbert90 posted:

never touch Linux again.

i always touch a linux

FlapYoJacks
Feb 12, 2009

Poopernickel posted:

i always touch a linux

Not liking SELinux, or systemd is bad and not cool.

BobHoward
Feb 13, 2012

The only thing white people deserve is a bullet to their empty skull
oh poo poo im stuck in the middle of this war i hate selinux and like systemd

although tbh my main beef with selinux is not the concept, it’s the execution and (lack of) adoption. nobody but red hate uses it and therefore lots of Linux software is not tested against it upstream. it’s on a single downstream distro to make sure tens of thousands of packages work under its draconian security paranoia, and lol if u think that is going to go smoothly all the time. (lol once more at the idea, pushed by some itt, that the linux distro ecosystem is a good thing)

my other beef: the occasional breakage wouldn’t be so bad if it weren’t for the extreme obtuseness of the resulting errors, which, every time i forget about the last time i had to do it, results in me wasting a few hours just figuring out it’s selinux again, and then more time figuring out the right arcane incarnation to tell selinux to gently caress off re: that thing, assuming i don’t just shut it off to give it the finger

pram
Jun 10, 2001
always be (not) enforcing

crazypenguin
Mar 9, 2005
nothing witty here, move along

Notorious b.s.d. posted:

you know nothing in here is true right. if you compromise nginx badly enough inside a container, you compromised the entire system. an lxc container is just an enhanced chroot: as soon as uid=0, you are no longer restricted to the chroot.

there's no security story on linux containers, unless you wrote selinux policy to contain your containers

nah, I'm right. "containers" have a fantastic security story, depending on what you mean by "containers". because of course, the linux kernel has no concept of a container, you build a container abstraction out of all the little parts. the same little parts are used to e.g. sandbox chrome processes. they're very much meant for security here.

but what you say is absolutely untrue for, e.g., docker containers. if you believe otherwise, here's a root shell in a docker container:

https://contained.af/

capture that flag

Last Chance
Dec 31, 2004

selinux wasnt that hard to learn and im a huge dunce

Notorious b.s.d.
Jan 25, 2003

by Reene

crazypenguin posted:

nah, I'm right. "containers" have a fantastic security story, depending on what you mean by "containers". because of course, the linux kernel has no concept of a container, you build a container abstraction out of all the little parts. the same little parts are used to e.g. sandbox chrome processes. they're very much meant for security here.

but what you say is absolutely untrue for, e.g., docker containers. if you believe otherwise, here's a root shell in a docker container:

https://contained.af/

capture that flag

this is a root shell, sort of -- it's a user namespace. so your effective uid is 0 but you will fail all the uid=0 checks in the kernel

betcha they keep a real close eye on zero days...

you are a complete idiot if you do not enclose docker containers in an selinux context.

Fiedler
Jun 29, 2002

I, for one, welcome our new mouse overlords.

Notorious b.s.d. posted:

you are a complete idiot if you do not enclose docker containers in an selinux context.

What if I run them with hyper-v isolation instead?

Notorious b.s.d.
Jan 25, 2003

by Reene

Fiedler posted:

What if I run them with hyper-v isolation instead?

that is probably ok, at least in theory

you need a priv escalation bug in hyperv instead of a priv escalation bug in the linux kernel. it is a smaller attack surface.

of course, attackers are highly motivated. finding a good bug in hardware virt leads to mass compromises on aws and azure...

TimWinter
Mar 30, 2015

https://timsthebomb.com
Wasn't the last docker breakout in October?

crazypenguin
Mar 9, 2005
nothing witty here, move along

TimWinter posted:

Wasn't the last docker breakout in October?

there was a recent thing involving CAP_NET_RAW, that might have been it. wasn't really a root escalation though

most of the time, when actually trying to use containers for security, that capability is removed too. its left on by default because they like being able to ping from containers to help people debug, heh

like, the linux kernel is a big attack surface sure, but that's true for both containers and selinux, and containers routinely cut down the attack surface a lot with things like seccomp restricting syscalls, too...

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Notorious b.s.d. posted:

betcha they keep a real close eye on zero days...

lol "zero day" is so diluted now

Adbot
ADBOT LOVES YOU

Best Bi Geek Squid
Mar 25, 2016
they call them zero days because that is how long it will take you to decide to uninstall your Linux and use a real os

Best Bi Geek Squid fucked around with this message at 15:19 on May 1, 2018

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply