From: Ned Ludd <solar@gentoo.org>
To: gentoo-dev@gentoo.org
Subject: [gentoo-dev] Towards less insecure permissions on gentoo
Date: 03 Jun 2003 16:10:12 -0400 [thread overview]
Message-ID: <1054671011.20032.320.camel@simple> (raw)
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
next reply other threads:[~2003-06-03 20:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-03 20:10 Ned Ludd [this message]
2003-06-05 14:50 ` [gentoo-dev] Towards less insecure permissions on gentoo Anthony de Boer
2003-06-05 22:54 ` Ned Ludd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1054671011.20032.320.camel@simple \
--to=solar@gentoo.org \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox