2021-11-30 17:57:48 +01:00
# exile.h
`exile.h` is a simple header-only library that provides an interface to isolate processes on Linux. Using Seccomp and Linux Namespaces for that purpose requires some knowledge of annoying details which this library aims to abstract away as much as possible, when reasonable. Hence, the goal is to provide a convenient way for processes to restrict themselves in order to mitigate the effect of exploits. Currently, it utilizes technologies like Seccomp, Namespaces and Landlock to this end.
2021-05-22 20:51:09 +02:00
## Status
No release yet, expiremental, API is unstable, builds will break on updates of this library.
2021-08-16 23:33:36 +02:00
Currently, it's mainly evolving according to the needs of my other projects.
2021-05-22 20:51:09 +02:00
## Features
- Systemcall filtering (using seccomp-bpf)
- restricting file system access (using Landlock and/or Namespaces)
2020-09-26 17:21:28 +02:00
- dropping privileges
- isolating the application from the network, etc.
2019-10-13 17:57:12 +02:00
2021-05-22 20:51:09 +02:00
## Requirements
2019-11-15 21:53:26 +01:00
Kernel >=3.17
2021-05-22 20:51:09 +02:00
``sys/capabilities.h`` header. Depending on your distribution, libcap
2019-11-15 21:53:26 +01:00
might be needed for this.
2019-10-13 17:57:12 +02:00
2021-05-22 20:51:09 +02:00
While mostly transparent to users of this API, kernel >= 5.13 is required to take advantage of Landlock.
2019-11-15 21:53:26 +01:00
2021-05-22 20:51:09 +02:00
## FAQ
2019-11-15 21:53:26 +01:00
2021-05-22 20:51:09 +02:00
### Does the process need to be priviliged to utilize the library?
No.
### It doesn't work on Debian!
You can thank a Debian-specific kernel patch for that. In the future,
2019-11-15 21:53:26 +01:00
the library may check against that. Execute
2021-05-22 20:51:09 +02:00
`echo 1 > /proc/sys/kernel/unprivileged_userns_clone` to disable that patch for now.
2019-10-13 17:57:12 +02:00
2021-05-22 20:51:09 +02:00
### Examples
2021-08-16 23:33:36 +02:00
- looqs: https://gitea.quitesimple.org/crtxcr/looqs
2020-09-26 17:21:28 +02:00
- qswiki: https://gitea.quitesimple.org/crtxcr/qswiki
- cgit sandboxed: https://gitea.quitesimple.org/crtxcr/cgitsb
- qpdfviewsb sandboxed (quick and dirty): https://gitea.quitesimple.org/crtxcr/qpdfviewsb
2019-10-13 17:57:12 +02:00
2021-05-22 20:51:09 +02:00
### Contributing
2019-11-15 21:53:26 +01:00
Contributions are very welcome. Options:
2021-05-22 20:51:09 +02:00
2021-11-30 17:57:48 +01:00
1. Pull-Request on [github ](https://github.com/quitesimpleorg/exile.h )
2. Mail to `exile at quitesimple.org` with instructions on where to pull the changes from.
2021-05-22 20:51:09 +02:00
3. Mailing a classic patch/diff to the same address.
2019-10-13 17:57:12 +02:00
License
=======
ISC