Apache HTTP Server
TMA-APACHE-12.3
Ensure Apache AppArmor Profile is in Enforce Mode
Mô tả
AppArmor profiles may be in one of three modes: disabled, complain or enforce. In the complain mode, any violations of the access controls are logged but the restrictions are not enforced. Also, once a profile mode has been changed, it is recommended to restart the Apache server, otherwise the currently running process may not be confined by the policy. aa-status must list running apache2 processes only under "processes are in enforce mode" (none unconfined or in complain mode); fails when Apache is not running. Not applicable without /etc/apparmor.d.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
out=$(aa-status 2>/dev/null) || exit 1; printf '%s\n' "$out" | awk '/processes are in enforce mode/{s="e"; next} /processes are (in complain|unconfined|in kill|in prompt)/{s="x"; next} /profiles are/{s=""; next} /apache2|httpd/{if(s=="e") e=1; if(s=="x") bad=1} END{print (e&&!bad)?"compliant":"noncompliant"}'- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
aa-enforce /usr/sbin/apache2 (after tuning the profile in complain mode), then restart Apache.
Thuộc tính
- Hệ điều hành
- Bất kỳ
- Thẻ
- apacheapparmor
- Tham chiếu
- CIS Apache HTTP Server 2.4 Benchmark v2.4.0 - 12.3 Ensure Apache AppArmor Profile is in Enforce Mode
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
tmaegis scan --target apache --level 2