Skip to contentSkip to conversation

how to hide one file or one directory

DISCUSSION f980215 3 participants 3 messages Apr 29, 2002 SELinux security module

lore
Share & tools
lore

f980215

author
#0 lore raw

hi,all

I install selinux-2.4.18 rpm packages on rh7.2

How to hide one file or one directory from everyone , even root ?

BTW: using LIDS, I can hide file or directory.

Thanks

f980215

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw
Quoted 5 lines · On Mon, 29 Apr 2002, f980215 wrote:

I install selinux-2.4.18 rpm packages on rh7.2

How to hide one file or one directory from everyone , even root ?

BTW: using LIDS, I can hide file or directory.

SELinux doesn't try to hide individual filenames within a directory. You can prevent all accesses to a file, including stat'ing it, but the ability to see a filename is based on the directory's protections, since the filename is part of the directory's state. If a process has read permission to a directory, it can see all names in that directory. Hiding filenames would be possible by filtering directory reads, as is done in some other systems like LIDS, but it isn't clear that this functionality is worth the cost. Even if you hide names, you still need to control all attempted accesses to the file, and a process can still probe for the existence of a file by trying to create a file with the same name.

At present, LSM does not provide a hook for filtering directory reads, since this functionality is not within the scope of LSM. Hence, I don't think that the LSM-based LIDS provides this feature either.

Multi-Level Secure (MLS) systems frequently provide a partitioned directory mechanism known as multi-level directories for things like /tmp, where a process is transparently redirected to a dynamically created subdirectory of /tmp based on its security level. The SELinux architecture includes support for a generalization of this idea, but we haven't implemented the corresponding mechanism in the filesystem. See the discussion of polyinstantiation and security union directories in the Flask paper. This hasn't been a high priority for us yet.

--
Stephen D. Smalley, NAI Labs
[email protected]

--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 3 lines · Stephen Smalley

is worth the cost. Even if you hide names, you still need to control all attempted accesses to the file, and a process can still probe for the existence of a file by trying to create a file with the same name.

Yes, and even more easily you can find things on LIDS systems with file name completion:

cd /etc
ls l*<tab>

will show you that the lids config file is there.

Signature · 10 lines
------------------------------------------------------
    Nuke bin Laden:           Dale Amon, CEO/MD
  improve the global          Islandone Society
     gene pool.               www.islandone.org
------------------------------------------------------

--
You have received this message because you are subscribed to the selinux list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.