| 1 |
# Firejail profile used by Shellbox when shelling out |
| 2 |
# Most rules are applied via command-line flags controlled by the |
| 3 |
# Shell::RESTRICTION_* constants. |
| 4 |
# Rules added to this file must be compatible with every command that could |
| 5 |
# be invoked. If something might need to be disabled, then it should be added |
| 6 |
# as a Shell:RESTRICTION_* constant instead so that commands can opt-in/out. |
| 7 |
|
| 8 |
# See <https://firejail.wordpress.com/features-3/man-firejail-profile/> for |
| 9 |
# syntax documentation. |
| 10 |
|
| 11 |
# Optionally allow sysadmins to set extra restrictions that apply to their |
| 12 |
# Shellbox setup, e.g. disallowing access to extra private directories. |
| 13 |
include /etc/firejail/shellbox.local |
| 14 |
|
| 15 |
# Include any global firejail customizations. |
| 16 |
include /etc/firejail/globals.local |
| 17 |
|
| 18 |
# Drop all capabilities |
| 19 |
caps.drop all |
| 20 |
|
| 21 |
# Disallow system directories |
| 22 |
blacklist /sbin |
| 23 |
blacklist /usr/sbin |
| 24 |
blacklist /usr/local/sbin |
| 25 |
# /run typically contains many exploitable UNIX sockets |
| 26 |
# But also /run/firejail which needs to be available |
| 27 |
noblacklist /run/firejail |
| 28 |
blacklist /run/* |
| 29 |
|
| 30 |
# Disallow system files |
| 31 |
blacklist /etc/shadow |
| 32 |
blacklist /etc/ssh |
| 33 |
blacklist /root |
| 34 |
|
| 35 |
# Disallow system management |
| 36 |
blacklist ${PATH}/umount |
| 37 |
blacklist ${PATH}/mount |
| 38 |
blacklist ${PATH}/fusermount |
| 39 |
blacklist ${PATH}/su |
| 40 |
blacklist ${PATH}/sudo |
| 41 |
blacklist ${PATH}/xinput |
| 42 |
blacklist ${PATH}/evtest |
| 43 |
blacklist ${PATH}/xev |
| 44 |
blacklist ${PATH}/strace |
| 45 |
blacklist ${PATH}/nc |
| 46 |
blacklist ${PATH}/ncat |