From owner-freebsd-security Fri Aug 28 22:37:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA14034 for freebsd-security-outgoing; Fri, 28 Aug 1998 22:37:28 -0700 (PDT) (envelope-from owner-freebsd-security@FreeBSD.ORG) Received: from empnet.com (empnet.com [12.7.96.3]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA14029 for ; Fri, 28 Aug 1998 22:37:26 -0700 (PDT) (envelope-from scex@dqc.org) Received: from dqc.org (scex@dqc.org [12.7.119.10]) by empnet.com (8.8.8/EmpireNet-1) with SMTP id WAA11637; Fri, 28 Aug 1998 22:38:05 -0700 (PDT) Date: Fri, 28 Aug 1998 22:30:44 -0700 (PDT) From: scex To: "Jan B. Koum " cc: "Jeffrey J. Mountin" , security@FreeBSD.ORG Subject: Re: Shell history In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > >> Once can just "cp" the executable. > >But in order to 'cp' you must be able to read. > >Why have more permissions than needed? > Uhm.. I don't have to read. If I want to execute something and it > is in my path, I just "cp `which vi` ./..." and then "./..." > Taking away read permissions from directories such as /bin, /sbin > and etc. is just security through obscurity IMHO unless you are doing some > other things such as trusted path execution, chroot'ed environment, etc. [scex@twist] [~]$ cd bin [scex@twist] [bin]$ ll bash -rwx------ 1 scex users - 389120 Aug 20 03:31 bash* [scex@twist] [bin]$ chmod 711 bash [scex@twist] [bin]$ ll bash -rwx--x--x 1 scex users - 389120 Aug 20 03:31 bash* [scex@twist] [bin]$ su nobody Password: [nobody@twist] [bin]$ cp bash /tmp/... cp: bash: permission denied no-one's talking about taking away read permissions from directories (although that also has its applications); you have to have read permission on a file to be able to copy it (unless you fancy mucking around in /proc & streams). scex To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message