Login Register


Linux Beginners? Bug me! filter_list
Author
Message
RE: Linux Beginners? Bug me! #11
(03-31-2014, 04:02 PM)roger_smith Wrote: SELinux is great....when you can get it working right, lol. It's somewhat difficult to administer at first, but once you get the hang of it it's not too bad. There's way to make it fix itself, which 9/10 times is a safe thing to do and won't break things. but boy, that 1/10 when it does break stuff... hold on.

The nice thing w/ SELinux is you can set it to enforcing or permitting on the fly, so if something is broken, you can just set to permissive mode while troubleshooting the problem and it will continue logging the exception without actually impeding functionality. Be warned though, DISABLING SELinux (different from permissive mode) requires a FSCK and can take a long time since it has to go thru and analyze each. individual. file.

What about the actual policy administration? Is it troublesome?

I've seen so many systems that will allow a user to hop from a restricted role (HTTP daemon for example) to unconfined_u:unconfined_r:unconfined_t: s0 just by writing out an SSH public key to ~/.ssh/authorized_keys and logging in.
PGP
Sign: F202 79C9 76F7 40BB 54EC 494F 5DEF 1D70 14C1 C4CC
Encrypt: A5B3 1B21 55E1 80AF 4C6E DE83 467B 8EFC 3DEE 681C
Auth: CD55 E8A5 1A08 2933 8BA6 BC88 D81F 1943 739A 3C47

Reply

RE: Linux Beginners? Bug me! #12
(03-31-2014, 04:11 PM)Starfall Wrote: What about the actual policy administration? Is it troublesome?

I've seen so many systems that will allow a user to hop from a restricted role (HTTP daemon for example) to unconfined_u:unconfined_r:unconfined_t: s0 just by writing out an SSH public key to ~/.ssh/authorized_keys and logging in.

:-o That sounds wrong... I'll see if I can play with that and see what happens. Were those systems set to enforcing?

I'll break out some of my reference material and see what I can find about SELinux and brush up on it to see if we can explore that issue more.
---
Click here to get started with Linux!

If I helped you, please +rep me, apparently we've started over on Rep and I'd like to break 100 again...

Inori Wrote: got clickbaited by roger

Reply

RE: Linux Beginners? Bug me! #13
They were indeed set to enforcing. They're multi-user systems that are used for web hosting, like you'd see with CPanel, Directadmin, Plesk, etc. The user is allowed to write to his own home directory by DAC and SElinux, and his processes run as children of the HTTP server, so they inherit its role.

The attack scenario here would be a PHP/CGI shell writing the key out, then logging in to remove SEL (and other) restrictions.
PGP
Sign: F202 79C9 76F7 40BB 54EC 494F 5DEF 1D70 14C1 C4CC
Encrypt: A5B3 1B21 55E1 80AF 4C6E DE83 467B 8EFC 3DEE 681C
Auth: CD55 E8A5 1A08 2933 8BA6 BC88 D81F 1943 739A 3C47

Reply

RE: Linux Beginners? Bug me! #14
(03-31-2014, 04:24 PM)Starfall Wrote: They were indeed set to enforcing. They're multi-user systems that are used for web hosting, like you'd see with CPanel, Directadmin, Plesk, etc. The user is allowed to write to his own home directory by DAC and SElinux, and his processes run as children of the HTTP server, so they inherit its role.

The attack scenario here would be a PHP/CGI shell writing the key out, then logging in to remove SEL (and other) restrictions.

DSO PHP Handler? There's something that could be interesting and I'm glad you mentioned that since I'm about to embark on a research project involving SELinux and CPanel. If it was running DSO, meaning PHP and what not runs as user nobody, I could see that potentially causing issues! A very interesting scenario indeed, when I have some extra time later (stupid school and house chores!) I'm going to see if I can play w/ that more.
---
Click here to get started with Linux!

If I helped you, please +rep me, apparently we've started over on Rep and I'd like to break 100 again...

Inori Wrote: got clickbaited by roger

Reply

RE: Linux Beginners? Bug me! #15
SUPHP handler, I think. DSO would stop this cold because nobody (typically) either has no home (/nonexistent) or can't write to his home.
PGP
Sign: F202 79C9 76F7 40BB 54EC 494F 5DEF 1D70 14C1 C4CC
Encrypt: A5B3 1B21 55E1 80AF 4C6E DE83 467B 8EFC 3DEE 681C
Auth: CD55 E8A5 1A08 2933 8BA6 BC88 D81F 1943 739A 3C47

Reply

RE: Linux Beginners? Bug me! #16
(03-31-2014, 04:29 PM)Starfall Wrote: SUPHP handler, I think. DSO would stop this cold because nobody (typically) either has no home (/nonexistent) or can't write to his home.

Duh, you're right.

I'll try and kick a cpanel image and set it up to play w/ this tonight, I'm intrigued :-D
---
Click here to get started with Linux!

If I helped you, please +rep me, apparently we've started over on Rep and I'd like to break 100 again...

Inori Wrote: got clickbaited by roger

Reply

RE: Linux Beginners? Bug me! #17
(03-31-2014, 04:34 PM)roger_smith Wrote: Duh, you're right.

I'll try and kick a cpanel image and set it up to play w/ this tonight, I'm intrigued :-D

Have fun, and if possible let me know what you discovered ^^
Sorry for hijacking your beginners' thread by the way... maybe we should have another one for stuff like this?
PGP
Sign: F202 79C9 76F7 40BB 54EC 494F 5DEF 1D70 14C1 C4CC
Encrypt: A5B3 1B21 55E1 80AF 4C6E DE83 467B 8EFC 3DEE 681C
Auth: CD55 E8A5 1A08 2933 8BA6 BC88 D81F 1943 739A 3C47

Reply

RE: Linux Beginners? Bug me! #18
(03-31-2014, 04:35 PM)Starfall Wrote: Have fun, and if possible let me know what you discovered ^^
Sorry for hijacking your beginners' thread by the way... maybe we should have another one for stuff like this?

I'll keep you posted on anything I find.
As far as the hijack, not worries at all! You've got the gears turning now and what's the point of discussion if one can't be inspired, right? lol.

I'm cool w/ another thread on the topic too if ya like Smile
---
Click here to get started with Linux!

If I helped you, please +rep me, apparently we've started over on Rep and I'd like to break 100 again...

Inori Wrote: got clickbaited by roger

Reply







Users browsing this thread: