public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Towards less insecure permissions on gentoo
@ 2003-06-03 20:10 Ned Ludd
  2003-06-05 14:50 ` Anthony de Boer
  0 siblings, 1 reply; 3+ messages in thread
From: Ned Ludd @ 2003-06-03 20:10 UTC (permalink / raw
  To: gentoo-dev

Alot of the suid binarys that get installed on a gentoo system seem to
have had there default permissions overlooked.

Today we will cover group and other readable bits and why I think they
should be removed on installed setid ELF's.

Alot of the common buffer overflows exploits these days rely on knowing
a predefined offsets or relocation addresses. Sometimes these offsets
are not known to the exploit itself at compile time and the author often
leaves it up to the local attacker to find the offsets using tools such
as objdump,readelf,examminer. Now if the local attacker is unable read
the binary he/she wont be able to discover these offsets thus making
future exploitation harder to exploit on a gentoo system.

The "least privilege" rule, strictly applied, can save us from a lot of 
unexpected trouble.

You can use the following command to see what setid files you have and
what port they came from. -requires gentoolkit

find / \( -perm 04000 -o -perm -02000 \) -type f -ls 2> /dev/null |
while read line; do suid=`echo $line | awk '{print $11}'` ; echo $line
"[`qpkg -nc -f $suid`]" ; done

Over the next week or so I will be looking over the permissions of
eveything I use and offering unified diffs/patches when/where feasible.

If you currently are a maintainer of a port that installs files 4755(I
hope you all know who you are) please try to get your port to install
4711 or with even less privs. However if your program is a setid
executable script then you should leave the permissions alone.

Below is a suggested patch to the current util-linux ebuild.

http://cvs.gentoo.org/~solar/util-linux-2.11z-r4.ebuild.diff
-- 
Ned Ludd <solar@gentoo.org>
Gentoo Linux (Hardened)


--
gentoo-dev@gentoo.org mailing list


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-05 22:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-03 20:10 [gentoo-dev] Towards less insecure permissions on gentoo Ned Ludd
2003-06-05 14:50 ` Anthony de Boer
2003-06-05 22:54   ` Ned Ludd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox