Skip to content

xplshn/hidefs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

(1) HideFS - A kernel module that allows hiding files in ANY filesystem

I was inspired by gobohide, but I didn't like the following about GoboHide:

  1. Not a module, it is ALWAYS enabled
  2. Uses Netlink, instead of just exposing a character device that can be interfaced with shell, C, or anything else
  3. Bugs out in 6.1+
  4. The license

So I decided to start from scratch

(2) HideFS - Interface:

  • /sys/kernel/hidefs/hide: write here the filepaths which you wish to hide, (1 path per line)
  • /sys/kernel/hidefs/unhide: write here the filepaths which you wish to unhide, (1 path per line)
  • /sys/kernel/hidefs/list: the list of currently hidden files, (1 path per line)

(3) Limitations (help wanted ; we need ports to i386, arm64, armv7)

  • Architecture support:

Currently, only amd64 is supported. We could support other architectures if I had access to other hardware or hardware capable enough to emulate other architectures. In order to support other architectures, we'd just have to wrap the kprobes-related code around macros.

(4) TODOs

  • Benchmark, a-utils/walk, 100 runs, without the kernel module. Then again, 100 runs, with the kernel module.
  • Use dynamic memory management, and benchmark once again.
  • Fork 9front, add a compatibility layer with Linux, implement +200 POSIX system calls + linux's, then check if this module works, if so, break it, because 9front is a sacred zen space. (may actually be done in the near future, I just want 9front + Chromium || Ladybird)

Note

This module tracks the current generation of the kernel (6.1 and onwards), support for non-current generations is just sheer luck.


⑨ Show & tell

A screenshot that shows off: the build process for hidefs, the loading process, and how it is used to hide various FHS paths like /bin, /lib, /usr, etc, on a that has those paths linked to /System/Variable, /System/Libraries, etc.