ebpfsnitch
firejail
ebpfsnitch | firejail | |
---|---|---|
9 | 139 | |
688 | 5,449 | |
- | - | |
0.0 | 9.7 | |
6 months ago | 6 days ago | |
C++ | C | |
BSD 3-clause "New" or "Revised" License | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ebpfsnitch
-
Notes on BPF and eBPF
BPF is indeed a pretty interesting technology. As the knowledge about it becomes more widespread, I anticipate that we will unlock some new capabilities both in terms of tracing. Brendan Gregg's book (https://www.brendangregg.com/bpf-performance-tools-book.html) serves as a good intro to this, although you probably only need to read a small chunk of it as a lot of it is reference-book-style material.
The author's mentioned that you can trace MySQL with USDT, which is a tracepoint inserted by the developer at select locations in the code. Unfortunately, this feature has been removed in MySQL 8.0. This makes it significantly more difficult to trace MySQL, although it's not impossible. I've done a proof of concept of this in this repo with uprobe[1], which indeed allow you to hook into any userspace function. This is not stable tho, as any MySQL upgrade risks incompatibilities, while USDT would be stable. My appeal to Oracle to re-add this functionality[2] has been unfortunately rejected, which I think is a mistake.
[1]: https://github.com/shuhaowu/mysqld-bpf
[2]: https://bugs.mysql.com/bug.php?id=105741
Another thing that I've been recently thinking of is using BPF to validate programs written for real-time Linux (via PREEMPT_RT). To my understanding, one of the main thing to avoid is page faults [3]. With the proper BPF tracing scripts, I think we can validate that programs indeed avoids page faults in integration testing. I'm not sure if it is super useful yet, but as I'm trying to write a few RT programs, it's something that came to my mind.
[3]: https://lwn.net/Articles/837019/
In addition to tracing (so bpftrace-based/bcc-based tools), I've recently discovered that there there are:
1. ebpfsnitch (https://github.com/harporoeder/ebpfsnitch): which is an application-level firewall without kernel modules.
2. ebpf-traffic-monitor (https://source.android.com/devices/tech/datausage/ebpf-traff...): which appears to be using BPF to account for traffic for different apps on Android.
There are apparently also use cases in the context of security, but I'm not familiar with it.
-
Little Snitch Linux Alternative
Doesn't look like it's updated any more but there is eBPFSnitch
-
Landlock merged in mainline for Linux 5.13
There is a sort of opensnitch based on ebpf but not sure is fully feature completed as you intended:
https://github.com/harporoeder/ebpfsnitch
- eBPFSnitch - Linux Application Level Firewall based on eBPF and NFQUEUE
- harporoeder/ebpfsnitch
- EBPFSnitch: An eBPF based Linux Application Firewall
- EBPFSnitch: An eBPF Based Linux Application Firewall
firejail
-
Sandboxing All the Things with Flatpak and BubbleBox
bubblewrap is designed as a low-level too. There is nothing quick and dirty about it. It disallows everything by default and you have to be explicit about what you want to share with the host. If your application needs complex permissions/resources, then you will need to have a complex bubblewrap command line.
Once you have figured out which permissions/resources you need for a given program, you can wrap the command line invocation in a shell script.
If you want other people to do the work of defining permissions/resources, then have a look at firejail: https://github.com/netblue30/firejail
-
Ask HN: What are some unpopular technologies you wish people knew more about?
Firejail is cool: https://github.com/netblue30/firejail
Linux namespaces/cgroups but nowhere near as heavy as Docker.
I use it when I want to limit the memory of a Python script:
```
-
Toolship: A (More) Secure Workstation
Firejail can also be a useful option, though no good if you're on Mac https://firejail.wordpress.com/
Uses the same Linux primitives as docker etc, but can be a bit more ergonomic for this use case
-
Firejail: Light, featureful and zero-dependency security sandbox for Linux
Firejail, Flatpak (which uses Bubblewrap under the hood), and Snap (which uses AppArmor) all use the same underlying technology: Linux namespaces.
This question comes up a lot, and has been answered here: https://github.com/netblue30/firejail/wiki/Frequently-Asked-...
TL;DR: Firejail has much more comprehensive features than Flatpak (Bubblewrap). Firejail also has more comprehensive network support, support for AppArmor and SELinux, and easier seccomp filtering.
Compared to Snap (which uses AppArmor), Firejail is compatible with AppArmor and again goes above and beyond with a lot of additional features.
-
Bubblewrap – Low-level unprivileged sandboxing tool used by Flatpak
Wonderful little tool, too bad you must chain various exec calling tools to get cgroups (a bit akin to `ionice ... nice ... cmd`) and Linux users namespaces can't allow UNIX sockets while preventing network access (I think?).
Migrated from Firejail when its complexity annoyed me too much and I hit https://github.com/netblue30/firejail/issues/3001 (Firejail doesn't like parens or brackets in --put/--get parameters) to a badly NIH version using bwrap and bash to have "profiles":
- Firejail: Light featureful and zero-dependency security sandbox for Linux
-
Do, or do not. There is no try
Firejail does this. The profile database is the two "profile" directories in https://github.com/netblue30/firejail/tree/master/etc
-
Strange times make for strange friends...
What do you mean by a Firefox container? Do you mean FireJail?
What are some alternatives?
opensnitch - OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch.
bubblewrap - Low-level unprivileged sandboxing tool used by Flatpak and similar projects
mysqld-bpf
flatpak - Linux application sandboxing and distribution framework
bubblejail - Bubblewrap based sandboxing for desktop applications
Flatseal - Manage Flatpak permissions
yabai - A tiling window manager for macOS based on binary space partitioning
podman - Podman: A tool for managing OCI containers and pods.
namespaced-openvpn - Wrapper for OpenVPN on Linux solving various privacy issues
firewalld - Stateful zone based firewall daemon with D-Bus interface
firejail-profiles - Tight Firejail profiles