Linux namespaces and seccomp-bpf sandbox
Find a file
2016-01-29 11:40:25 -05:00
etc 0.9.38-rc1 testing 2016-01-29 09:20:19 -05:00
platform added uGet profile 2016-01-27 08:13:25 -05:00
src 0.9.38-rc1 testing 2016-01-29 09:20:19 -05:00
test testing 2016-01-26 09:52:24 -05:00
.gitignore Add tags file and vim temporary files to .gitignore 2015-09-01 09:09:29 +10:00
configure 0.9.38-rc1 testing 2016-01-29 09:20:19 -05:00
configure.ac 0.9.38-rc1 testing 2016-01-29 09:20:19 -05:00
COPYING Baseline firejail 0.9.28 2015-08-08 19:12:30 -04:00
install.sh Baseline firejail 0.9.28 2015-08-08 19:12:30 -04:00
Makefile.in added uGet profile 2016-01-27 08:13:25 -05:00
mkasc.sh fix SHA1 issue when signing the realease 2016-01-14 15:25:10 -05:00
mkdeb.sh Fixing lintian warnings 2016-01-20 19:38:07 +03:00
mketc.sh mketc.sh fix 2015-11-30 07:27:17 -05:00
mkman.sh Embed deterministic timestamp in manpages 2015-12-16 23:27:59 +01:00
README Centos 6 support 2016-01-29 08:09:30 -05:00
README.md symlink invocation 2016-01-17 12:57:35 -05:00
RELNOTES release 0.9.38-rc1 testing 2016-01-29 11:40:25 -05:00
todo profile cleanup 2016-01-22 09:08:35 -05: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

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

Download and Installation: https://firejail.wordpress.com/download-2/

Features: https://firejail.wordpress.com/features-3/

Documentation: https://firejail.wordpress.com/documentation-2/

FAQ: https://firejail.wordpress.com/support/frequently-asked-questions/

Current development version: 0.9.37

This is a small thing, but very convenient. Make a symbolic link (ln -s) to /usr/bin/firejail under the name of the program you want to run, and put the link in the first $PATH position (for example in /usr/local/bin). Example:

$ which -a transmission-gtk 
/usr/bin/transmission-gtk

$ sudo ln -s /usr/bin/firejail /usr/local/bin/transmission-gtk

$ which -a transmission-gtk 
/usr/local/bin/transmission-gtk
/usr/bin/transmission-gtk

We have in this moment two entries in $PATH for transmission. The first one is a symlink to firejail. The second one is the real program. Starting transmission in this moment, invokes "firejail transmission-gtk"

$ transmission-gtk
Redirecting symlink to /usr/bin/transmission-gtk
Reading profile /etc/firejail/transmission-gtk.profile
Reading profile /etc/firejail/disable-mgmt.inc
Reading profile /etc/firejail/disable-secret.inc
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-devel.inc
Parent pid 19343, child pid 19344
Blacklist violations are logged to syslog
Child process initialized

IPv6 support:

      --ip6=address
              Assign IPv6 addresses to the last network interface defined by a
              --net option.

              Example:
              $ firejail --net=eth0 --ip6=2001:0db8:0:f101::1/64 firefox

       --netfilter6=filename
              Enable the IPv6 network filter specified by filename in the  new
              network  namespace.  The  filter  file  format  is the format of
              ip6tables-save  and  ip6table-restore  commands.   New   network
              namespaces  are  created  using  --net  option. If a new network
              namespaces is not created, --netfilter6 option does nothing.

join command enhancements

       --join-filesystem=name
              Join the mount namespace of the sandbox identified by  name.  By
              default  a /bin/bash shell is started after joining the sandbox.
              If a program is specified, the program is run  in  the  sandbox.
              This  command is available only to root user.  Security filters,
              cgroups and cpus configurations are not applied to  the  process
              joining the sandbox.

       --join-filesystem=pid
              Join  the  mount  namespace of the sandbox identified by process
              ID. By default a /bin/bash shell is started  after  joining  the
              sandbox.   If  a program is specified, the program is run in the
              sandbox. This command is available only to root user.   Security
              filters,  cgroups and cpus configurations are not applied to the
              process joining the sandbox.

      --join-network=name
              Join the network namespace of the sandbox identified by name. By
              default  a /bin/bash shell is started after joining the sandbox.
              If a program is specified, the program is run  in  the  sandbox.
              This  command is available only to root user.  Security filters,
              cgroups and cpus configurations are not applied to  the  process
              joining the sandbox.

       --join-network=pid
              Join  the network namespace of the sandbox identified by process
              ID. By default a /bin/bash shell is started  after  joining  the
              sandbox.   If  a program is specified, the program is run in the
              sandbox. This command is available only to root user.   Security
              filters,  cgroups and cpus configurations are not applied to the
              process joining the sandbox.

New profiles: KMail