sudo apt-get install apparmor-profiles
이것만 설치
주의 이걸 설치 하면 백신 프로그램이 제거 되네요 -_-;;
apparmor-utilsX 설치 주의
apparmor-profiles 사용법 http://ubuntuforums.org/showthread.php?t=1008906
sudo /etc/init.d/apparmor start 시작
sudo /etc/init.d/apparmor stop 멈추기
sudo /etc/init.d/apparmor reload 다시 로딩
sudo /etc/init.d/apparmor status 보기
sudo apparmor_parser -r /etc/apparmor.d/<profile>사용 하고자 하는 프로그램 등록
sudo apparmor_parser -r /etc/apparmor.d/usr.bin.firefox
/etc/apparmor.d/ 에 가보면 등록 할수 있는 놈들이 보인다.. usr.bin.firefox
disable 폴더에 이상하게 파이어 폭스가 등록 되어 있는대 제거 해주어야 한다 활성화 해야 보안이 될듯
rm -r /etc/apparmor.d/disable 비활성화 하고자 하면 이 폴더에 넣으면 될듯 함으로 제거 하지 않아도 된다..
옛날 자료
- /etc/init.d/apparmor status
- ls /sys/kernel/security/apparmor
- cat /sys/module/apparmor/parameters/enabled
sudo apparmor_status-
aa-complain places a profile into complain mode.
sudo aa-complain /path/to/bin -
aa-enforce places a profile into enforce mode.
sudo aa-enforce /path/to/bin -
The
/etc/apparmor.ddirectory is where the AppArmor profiles are located. It can be used to manipulate the mode of all profiles.Enter the following to place all profiles into complain mode:
sudo aa-complain /etc/apparmor.d/*To place all profiles in enforce mode:
sudo aa-enforce /etc/apparmor.d/* -
apparmor_parser is used to load a profile into the kernel. It can also be used to reload a currently loaded profile using the -r option. To load a profile:
cat /etc/apparmor.d/profile.name | sudo apparmor_parser -aTo reload a profile:
cat /etc/apparmor.d/profile.name | sudo apparmor_parser -r -
/etc/init.d/apparmorcan be used to reload all profiles:sudo /etc/init.d/apparmor reload -
The
/etc/apparmor.d/disabledirectory can be used along with the apparmor_parser -R option to disable a profile.sudo ln -s /etc/apparmor.d/profile.name /etc/apparmor.d/disable/ sudo apparmor_parser -R /etc/apparmor.d/profile.name
To re-enable a disabled profile remove the symbolic link to the profile in
/etc/apparmor.d/disable/. Then load the profile using the -a option.sudo rm /etc/apparmor.d/disable/profile.name cat /etc/apparmor.d/profile.name | sudo apparmor_parser -a
-
AppArmor can be disabled, and the kernel module unloaded by entering the following:
sudo /etc/init.d/apparmor stop sudo update-rc.d -f apparmor remove
-
To re-enable AppArmor enter:
sudo /etc/init.d/apparmor start sudo update-rc.d apparmor defaults
sudo cat /sys/module/apparmor/parameters/audit
sudo sh -c 'echo -n "all" > /sys/module/apparmor/parameters/audit'http://wiki.apparmor.net/index.php/AppArmor_Failures#Is_AppArmor_enabled.3F