xe1phix

Xe1phix-Compile-[Firejail]-Enable-[Apparmor]-Cheatsheet.sh

Sep 21st, 2022 (edited)
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.81 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3.  
  4.  
  5. ## ================================================================================== ##
  6. ##  [+] Cloning The Firejail Github Repo..."
  7. ## ================================================================================== ##
  8. git clone https://github.com/netblue30/firejail.git
  9.  
  10.  
  11. ## ================================================================================== ##
  12. ##  [+] Moving To That Directory..."
  13. ## ================================================================================== ##
  14. cd firejail
  15.  
  16.  
  17. ## ================================================================================== ##
  18. ##  [+] Initiate Firejail Setup Using The Make Compiler..."
  19. ## ================================================================================== ##
  20. ./configure && make && sudo make install-strip
  21.  
  22.  
  23. ## ================================================================================== ##
  24. ##  [+] Load The Apparmor Kernel Module, Then Compile Into Firejail Source..."
  25. ## ================================================================================== ##
  26. ./configure --prefix=/usr --enable-apparmor
  27.  
  28.  
  29. ## ================================================================================== ##
  30. ##  [+] The Apparmor Profile Needs To Be Loaded Into The Kernel...
  31. ## ================================================================================== ##
  32. aa-enforce firejail-default
  33.  
  34.  
  35.  
  36. ##-=======================================================-##
  37. ##  [+] Check if process is using AppArmor confinement.
  38. ##-=======================================================-##
  39. firemon --apparmor $PID
  40.  
  41.  
  42. ##-=======================================================-##
  43. ##  [+] Check if process is using AppArmor confinement.
  44. ##-=======================================================-##
  45. firejail --apparmor.print=$PID
Add Comment
Please, Sign In to add comment