Linux namespaces and seccomp-bpf sandbox
Find a file
2015-10-29 10:18:35 -04:00
etc enable --protocol by default in profiles 2015-10-28 13:52:29 -04:00
platform release 0.9.34-rc1 testing 2015-10-29 10:18:35 -04:00
src dual i386/amd64 seccomp support for --seccomp option 2015-10-28 22:02:45 -04:00
test testing 2015-10-29 08:58:11 -04:00
.gitignore Add tags file and vim temporary files to .gitignore 2015-09-01 09:09:29 +10:00
chromium-whitelist.png cleanup 2015-10-28 09:14:22 -04:00
configure release 0.9.34-rc1 testing 2015-10-29 10:18:35 -04:00
configure.ac release 0.9.34-rc1 testing 2015-10-29 10:18:35 -04:00
COPYING Baseline firejail 0.9.28 2015-08-08 19:12:30 -04:00
firefox-whitelist.png default Firefox whitelisting 2015-10-25 10:45:25 -04:00
install.sh Baseline firejail 0.9.28 2015-08-08 19:12:30 -04:00
Makefile.in profile work 2015-10-28 09:24:24 -04:00
mkdeb.sh Copyright headers 2015-10-24 12:21:35 -04:00
mkman.sh Baseline firejail 0.9.28 2015-08-08 19:12:30 -04:00
README admin 2015-10-26 12:47:35 -04:00
README.md readme.md 2015-10-29 08:35:00 -04:00
RELNOTES release 0.9.34-rc1 testing 2015-10-29 10:18:35 -04:00
todo vimperator, seccomp 2015-10-28 07:32:47 -04:00

Firejail

Firejail is a SUID sandbox program that reduces the risk of security breaches by restricting the running environment of untrusted applications using Linux namespaces, seccomp-bpf and Linux capabilities. It allows a process and all its descendants to have their own private view of the globally shared kernel resources, such as the network stack, process table, mount table. Firejail can work in a SELinux or AppArmor environment, and it is integrated with Linux Control Groups.

Written in C with virtually no dependencies, the software runs on any Linux computer with a 3.x kernel version or newer. It can sandbox any type of processes: servers, graphical applications, and even user login sessions. The software includes sandbox profiles for a number of more common Linux programs, such as Mozilla Firefox, Chromium, VLC, Transmission etc.

The sandbox is lightweight, the overhead is low. There are no complicated configuration files to edit, no socket connections open, no daemons running in the background. All security features are implemented directly in Linux kernel and available on any Linux computer. To start the sandbox, prefix your command with “firejail”:

$ firejail firefox            # starting Mozilla Firefox
$ firejail transmission-gtk   # starting Transmission BitTorrent 
$ firejail vlc                # starting VideoLAN Client
$ sudo firejail "/etc/init.d/nginx start && sleep inf"

Project webpage: https://l3net.wordpress.com/projects/firejail/

Download and Installation: https://l3net.wordpress.com/projects/firejail/firejail-download-and-install/

Features: https://l3net.wordpress.com/projects/firejail/firejail-features/

Usage: https://l3net.wordpress.com/projects/firejail/firejail-usage/

FAQ: https://l3net.wordpress.com/projects/firejail/firejail-faq/

New features in the development version

Whitelisting in default Firefox profile

The next release will bring in default whitelisting for Firefox files and folders under /home/user. If you start the sandbox without any other options, this is what you'll get:

Whitelisted home directory

The code is located in etc/firefox.inc file:

whitelist ~/.mozilla
whitelist ~/Downloads
whitelist ~/dwhelper
whitelist ~/.zotero
whitelist ~/.lastpass
whitelist ~/.gtkrc-2.0
whitelist ~/.vimperatorrc
whitelist ~/.vimperator

I intend to bring in all files and directories used by Firefox addons and plugins. So far I have Video DownloadHelper, Zotero, LastPass, and Vimperator If you're using a anything else, please let me know.

Whitelisting in default Chromium profile

Whitelisted home directory

--ignore option

Ignore commands in profile files. Example:

$ firejail --ignore=seccomp wine

--protocol option

Enable protocol filter. It is based on seccomp and it filters the first argument to socket system call. If the value is not recognized, seccomp will kill the process. Valid values: unix, inet, inet6, netlink and packet.

Example:

$ firejail --protocol=unix,inet,inet6

"unix" describes the regular Unix socket connections, and "inet" and "inet6" describe the regular IPv4 and IPv6 traffic. Most GUI applications need "unix,inet,inet6". "netlink" is the protocol used to talk to Linux kernel. You'll only need this for applications such as iproute2 used in system administration, and "packet" is used by sniffers to talk directly with the Ethernet layer.

Protocol filter is enabled in all default security profiles for GUI applications ("protocol unix,inet,inet6").

Dual i386/amd64 seccomp filter

--seccomp option now installs a dual i386/amd64 default filter. 32bit applications, such as Skype, running on regular 64bit computers, are protected by i386 seccomp filter.

New security profiles

Steam, Skype, Wine. The dual seccomp filter is enabled by default for these applications.