You are not logged in.

#1 2017-04-26 19:17:56

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 419

suid binaries: is it correct to have so much?

Hi to all,
today I've done a search for all the suid files in my system using this commnad:

# find / -user root -perm -4000 -exec ls -ldb {} \; > specialFiles.txt

and this is the output:

-rwsr-xr-x 1 root root 14464 19 apr 02.47 /opt/google/chrome/chrome-sandbox
-rwsr-xr-x 1 root root 10496 18 apr 10.04 /usr/lib/kde4/libexec/start_kdeinit
-rwsr-xr-x 1 root root 11019 14 apr 11.21 /usr/lib/kde4/libexec/fileshareset
-rwsr-xr-x 1 root root 10480  7 apr 19.46 /usr/lib/xorg-server/Xorg.wrap
-rwsr-xr-x 1 root root 154064 20 apr 22.25 /usr/lib/virtualbox/VBoxNetNAT
-rwsr-xr-x 1 root root 154064 20 apr 22.25 /usr/lib/virtualbox/VBoxNetDHCP
-rwsr-xr-x 1 root root 154064 20 apr 22.25 /usr/lib/virtualbox/VBoxSDL
-rwsr-xr-x 1 root root 154064 20 apr 22.25 /usr/lib/virtualbox/VirtualBox
-rwsr-xr-x 1 root root 14640 20 apr 22.25 /usr/lib/virtualbox/VBoxNetAdpCtl
-rwsr-xr-x 1 root root 154064 20 apr 22.25 /usr/lib/virtualbox/VBoxHeadless
-rwsr-xr-x 1 root root 14784 20 gen 13.38 /usr/lib/polkit-1/polkit-agent-helper-1
-rwsr-xr-x 1 root root 6272 20 apr 16.30 /usr/lib/xf86-video-intel-backlight-helper
-rwsr-x--- 1 root dbus 56744 22 apr 02.43 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
-rws--x--x 1 root root 444784 20 mar 22.29 /usr/lib/ssh/ssh-keysign
-r-sr-xr-x 1 root root 13944  5 mar 00.02 /usr/lib/mail-privsep
-rwsr-xr-x 1 root root 18360 20 apr 06.36 /usr/lib/chromium/chrome-sandbox
-rwsr-xr-x 1 root root 11019  1 apr 21.31 /usr/lib/kf5/fileshareset
-rwsr-xr-x 1 root root 64616 29 ott 17.54 /usr/bin/chage
-rwsr-xr-x 1 root root 37128 29 ott 17.54 /usr/bin/sg
-rws--x--x 1 root root 312424 22 gen 20.04 /usr/bin/readcd
-rwsr-xr-x 1 root root 10704 26 mar 23.54 /usr/bin/newgrp
-rwsr-xr-x 1 root root 31360 13 dic 06.51 /usr/bin/fusermount
-rws--x--x 1 root root 118536 22 gen 20.04 /usr/bin/rscsi
-rwsr-xr-x 1 root root 23376 26 mar 23.54 /usr/bin/chsh
-rwsr-xr-x 1 root root 31720 26 mar 23.54 /usr/bin/su
-rwsr-xr-x 1 root root 44512 30 giu  2016 /usr/bin/crontab
-rws--x--x 1 root root 354312 22 gen 20.04 /usr/bin/cdda2wav
-rws--x--x 1 root root 496712 22 gen 20.04 /usr/bin/cdrecord
-rwsr-xr-x 1 root root 52528 29 ott 17.54 /usr/bin/passwd
-rwsr-sr-x 1 root root 35568 17 mar 12.50 /usr/bin/mount.cifs
-rwsr-xr-x 1 root root 23496 29 ott 17.54 /usr/bin/expiry
-rwsr-xr-x 1 root root 130360 18 gen 14.28 /usr/bin/sudo
-rwsr-xr-x 1 root root 27624 26 mar 23.54 /usr/bin/umount
-rwsr-xr-x 1 root root 56104 30 mar 11.32 /usr/bin/maidag
-rwsr-xr-x 1 root root 362720 20 mar 16.03 /usr/bin/firejail
-rwsr-xr-x 1 root root 52184 11 feb 11.37 /usr/bin/ksu
-rwsr-xr-x 1 root root 68696 29 ott 17.54 /usr/bin/gpasswd
-rwsr-xr-x 1 root root 27568 26 mar 23.54 /usr/bin/chfn
-rwsr-sr-x 1 root root 31392  9 giu  2016 /usr/bin/unix_chkpwd
-rwsr-xr-x 1 root root 23304 20 gen 13.38 /usr/bin/pkexec
-rwsr-xr-x 1 root root 40160 26 mar 23.54 /usr/bin/mount

Is it correct to have so much suid binaries?

Offline

#2 2017-04-26 23:43:41

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: suid binaries: is it correct to have so much?

I would say so, yes.

jbs @ dmb-gaming-laptop -> cat suidFiles.txt 
-rwsr-xr-x 1 root root 14128 Sep 27  2016 /home/jbs/.utils/brightup
-rwsr-xr-x 1 root root 10480 Apr  7 11:46 /usr/lib/xorg-server/Xorg.wrap
-rws--x--x 1 root root 444784 Mar 20 15:29 /usr/lib/ssh/ssh-keysign
-rwsr-x--- 1 root dbus 56744 Apr 21 18:43 /usr/lib/dbus-1.0/dbus-daemon-launch-helper
-rwsr-xr-x 1 root root 6272 Apr 20 08:30 /usr/lib/xf86-video-intel-backlight-helper
-rwsr-xr-x 1 root root 18360 Apr 19 22:36 /usr/lib/chromium/chrome-sandbox
-r-sr-xr-x 1 root root 13944 Mar  4 16:02 /usr/lib/mail-privsep
-rwsr-xr-x 1 root root 14784 Jan 20 05:38 /usr/lib/polkit-1/polkit-agent-helper-1
-rwsr-xr-x 1 root root 37128 Oct 29 09:54 /usr/bin/sg
-rwsr-xr-x 1 root root 27568 Mar 26 15:54 /usr/bin/chfn
-rwsr-xr-x 1 root root 23376 Mar 26 15:54 /usr/bin/chsh
-rwsr-xr-x 1 root root 23496 Oct 29 09:54 /usr/bin/expiry
-rwsr-xr-x 1 root root 68696 Oct 29 09:54 /usr/bin/gpasswd
-rwsr-xr-x 1 root root 40160 Mar 26 15:54 /usr/bin/mount
-rwsr-xr-x 1 root root 64616 Oct 29 09:54 /usr/bin/chage
-rwsr-xr-x 1 root root 52184 Feb 11 03:37 /usr/bin/ksu
-rwsr-xr-x 1 root root 10704 Mar 26 15:54 /usr/bin/newgrp
-rwsr-xr-x 1 root root 52528 Oct 29 09:54 /usr/bin/passwd
-rwsr-xr-x 1 root root 27624 Mar 26 15:54 /usr/bin/umount
-rwsr-xr-x 1 root root 130360 Jan 18 06:28 /usr/bin/sudo
-rwsr-xr-x 1 root root 23304 Jan 20 05:38 /usr/bin/pkexec
-rwsr-xr-x 1 root root 31360 Dec 12 22:51 /usr/bin/fusermount
-rwsr-xr-x 1 root root 31720 Mar 26 15:54 /usr/bin/su
-rwsr-sr-x 1 root root 31392 Jun  9  2016 /usr/bin/unix_chkpwd
jbs @ dmb-gaming-laptop -> cat suidFiles.txt | wc -l
24
jbs @ dmb-gaming-laptop -> 

Is there an underlying problem with having so many of them? On a non-compromised system these files are relatively harmless and, AFAIK, hard to access/change/modify maliciously.


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2017-04-27 09:04:47

Xwang
Member
From: EU
Registered: 2012-05-14
Posts: 419

Re: suid binaries: is it correct to have so much?

I was reading about capabilities ad as far as I have understood it should be a newer, finer and safer method to grant only the permission needed to binaries instead of the "global" permission suid.
But I don't know if archlinux will replace suid binaries with their capabilities counterparts and in such a case if it will be a transparent update or if a manual  intervention will be required.

Offline

#4 2017-04-27 12:47:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,891

Re: suid binaries: is it correct to have so much?

https://bugs.archlinux.org/task/36969

"user namepsaces" - not undisputed and just recently hit by yet another privilegue escalation  (https://security.archlinux.org/CVE-2017-7184)
Presently not enabled by arch - please don't start a flamewar on this. At least not here ;-)

Once this is reconsidered, I don't expect to have to take any further action.

Offline

Board footer

Powered by FluxBB