-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathapparmor.profile
More file actions
81 lines (66 loc) · 1.7 KB
/
apparmor.profile
File metadata and controls
81 lines (66 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
abi <abi/3.0>,
include <tunables/global>
/usr/local/bin/aminerwrapper.sh,
/usr/lib/logdata-anomaly-miner/aminer.py {
include <abstractions/base>
include <abstractions/bash>
include <abstractions/consoles>
include <abstractions/dovecot-common>
include <abstractions/postfix-common>
include <abstractions/python>
capability chown,
capability dac_override,
capability dac_read_search,
network inet stream,
# config files may only be located in allowed locations such as /etc/aminer
# test with `sudo journalctl -xe | grep DENIED` to adapt the profile for specific needs.
# Allow temporary files
/tmp/ rw,
/tmp/** rwlix,
# Executables
/usr/local/bin/aminerwrapper.sh r,
/usr/bin/aminerwrapper.sh r,
/usr/bin/python3 ix,
/usr/bin/python3.* ix,
/usr/bin/bash ix,
/usr/bin/basename mrix,
/usr/bin/lscpu ix,
/usr/bin/dpkg-divert ix,
/usr/bin/fgrep rix,
/usr/bin/grep ix,
/usr/sbin/cupsd ix,
# Runtime sockets and directories
/run/aminer-remote.socket rwkl,
/run/** rwkl,
# Application data and libraries
/**/logdata-anomaly-miner/** rwix,
# System configuration files
/etc/aminer/** rw,
/etc/hosts r,
/etc/host.conf r,
/etc/group r,
/etc/nsswitch.conf r,
/etc/passwd r,
/etc/login.defs r,
# Apt and dpkg related
/etc/apt/apt.conf.d/** rkl,
/etc/apt/apt.conf.d/ rkl,
/usr/share/dpkg/* r,
/var/lib/dpkg/** r,
# Application data storage
/var/lib/aminer/ rwkl,
/var/lib/aminer/** rwkl,
# System info and proc/sys
/proc/ r,
/proc/** r,
/sys/** r,
# Crash reports
/var/crash/ rw,
/var/crash/** rwk,
/var/log/** rwk,
# Deny sensitive files
deny /root/** rwklx,
deny /etc/shadow r,
deny /etc/sudoers r,
deny /boot/** r,
}