Skip to content

Commit 529b37f

Browse files
Prithviraj03Managorspageektti
authored
aa-*, apparmor_parser: add page (#16844)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> Co-authored-by: Wiktor Perskawiec <git@spageektti.cc> Co-authored-by: Wiktor Perskawiec <wiktor@perskawiec.cc>
1 parent 5435b34 commit 529b37f

File tree

10 files changed

+224
-0
lines changed

10 files changed

+224
-0
lines changed

pages/linux/aa-audit.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# aa-audit
2+
3+
> Set AppArmor security profiles to audit mode.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-audit.8>.
5+
6+
- Set a profile to audit mode:
7+
8+
`sudo aa-audit {{profile_name}}`
9+
10+
- Set multiple profiles to audit mode:
11+
12+
`sudo aa-audit {{profile1 profile2 ...}}`
13+
14+
- Set a profile to audit mode from a specific directory:
15+
16+
`sudo aa-audit {{[-d|--dir]}} {{/path/to/profiles}} {{profile_name}}`
17+
18+
- Force audit mode even if already applied:
19+
20+
`sudo aa-audit --force {{profile_name}}`
21+
22+
- Set a profile to audit mode without reloading it:
23+
24+
`sudo aa-audit --no-reload {{profile_name}}`
25+
26+
- Remove audit mode for a profile:
27+
28+
`sudo aa-audit {{[-r|--remove]}} {{profile_name}}`
29+
30+
- Display help:
31+
32+
`aa-audit {{[-h|--help]}}`

pages/linux/aa-cleanprof.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# aa-cleanprof
2+
3+
> Clean AppArmor security profiles by removing unused rules.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-cleanprof.8>.
5+
6+
- Clean a profile to remove unused rules:
7+
8+
`sudo aa-cleanprof {{profile_name}}`
9+
10+
- Clean multiple profiles at once:
11+
12+
`sudo aa-cleanprof {{profile1 profile2 ...}}`
13+
14+
- Specify the directory containing profiles:
15+
16+
`sudo aa-cleanprof {{[-d|--dir]}} {{/path/to/profiles}} {{profile_name}}`
17+
18+
- Run silently without prompts:
19+
20+
`sudo aa-cleanprof {{[-s|--silent]}} {{profile_name}}`
21+
22+
- Prevent profile reload after cleaning:
23+
24+
`sudo aa-cleanprof --no-reload {{profile_name}}`
25+
26+
- Display help:
27+
28+
`aa-cleanprof {{[-h|--help]}}`

pages/linux/aa-decode.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# aa-decode
2+
3+
> Decode AppArmor audit logs into a human-readable format.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-decode.8>.
5+
6+
- Decode a hex string:
7+
8+
`aa-decode {{hexstring}}`
9+
10+
- Decode a log file:
11+
12+
`sudo aa-decode {{logfile}}`
13+
14+
- Decode logs from standard input (e.g., redirected file):
15+
16+
`sudo aa-decode - < {{logfile}}`
17+
18+
- Display help:
19+
20+
`aa-decode {{[-h|--help]}}`

pages/linux/aa-genprof.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# aa-genprof
2+
3+
> Generate AppArmor security profiles by monitoring program behavior.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-genprof.8>.
5+
6+
- Start generating a profile for a program:
7+
8+
`sudo aa-genprof {{program_path}}`
9+
10+
- Specify a custom directory for profiles:
11+
12+
`sudo aa-genprof {{[-d|--dir]}} {{/path/to/profiles}} {{program_path}}`
13+
14+
- Specify a custom logfile for profiling:
15+
16+
`sudo aa-genprof {{[-f|--file]}} {{/path/to/logfile}} {{program_path}}`
17+
18+
- Display help:
19+
20+
`aa-genprof {{[-h|--help]}}`

pages/linux/aa-logprof.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# aa-logprof
2+
3+
> Interactively update AppArmor security profiles based on logged violations.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-logprof.8>.
5+
6+
- Interactively review and update profiles based on system logs:
7+
8+
`sudo aa-logprof`
9+
10+
- Use a specific directory for AppArmor profiles:
11+
12+
`sudo aa-logprof {{[-d|--dir]}} {{/path/to/profiles}}`
13+
14+
- Use a specific log file instead of the default:
15+
16+
`sudo aa-logprof {{[-f|--file]}} {{/path/to/logfile}}`
17+
18+
- Ignore all log entries before the specified mark:
19+
20+
`sudo aa-logprof {{[-m|--logmark]}} "{{log_marker_text}}"`
21+
22+
- Display help:
23+
24+
`aa-logprof {{[-h|--help]}}`

pages/linux/aa-mergeprof.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# aa-mergeprof
2+
3+
> Merge AppArmor security profile files into the profile directory.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-mergeprof.8>.
5+
6+
- Merge one or more profile files into the default profile directory:
7+
8+
`sudo aa-mergeprof {{file1 file2 ...}}`
9+
10+
- Merge profile files into a specific directory:
11+
12+
`sudo aa-mergeprof {{[-d|--dir]}} {{/path/to/profiles}} {{file1 file2 ...}}`
13+
14+
- Display help:
15+
16+
`aa-mergeprof {{[-h|--help]}}`

pages/linux/aa-remove-unknown.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# aa-remove-unknown
2+
3+
> Remove AppArmor profiles that are no longer present in the configuration directory.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-remove-unknown.8>.
5+
6+
- Perform a dry run to see which profiles would be removed:
7+
8+
`sudo aa-remove-unknown -n`
9+
10+
- Actually remove the profiles:
11+
12+
`sudo aa-remove-unknown`
13+
14+
- Display help:
15+
16+
`aa-remove-unknown {{[-h|--help]}}`

pages/linux/aa-teardown.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# aa-teardown
2+
3+
> Tear down all AppArmor profiles and disable AppArmor enforcement.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-teardown.8>.
5+
6+
- Disable all AppArmor profiles and stop enforcement:
7+
8+
`sudo aa-teardown`
9+
10+
- Display help:
11+
12+
`aa-teardown {{[-h|--help]}}`

pages/linux/aa-unconfined.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# aa-unconfined
2+
3+
> List processes with open TCP/UDP ports that do not have AppArmor profiles loaded.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_aa-unconfined.8>.
5+
6+
- List unconfined processes using the `ss` command (default):
7+
8+
`sudo aa-unconfined`
9+
10+
- Use `netstat` instead of `ss` to detect open network sockets:
11+
12+
`sudo aa-unconfined --with-netstat`
13+
14+
- Show all processes from /proc with TCP/UDP ports and no AppArmor profiles (more detailed):
15+
16+
`sudo aa-unconfined --paranoid`
17+
18+
- Display help:
19+
20+
`aa-unconfined {{[-h|--help]}}`

pages/linux/apparmor_parser.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# apparmor_parser
2+
3+
> Load, compile, and manage AppArmor security profiles.
4+
> More information: <https://gitlab.com/apparmor/apparmor/-/wikis/manpage_apparmor_parser.8>.
5+
6+
- Load a profile into the kernel:
7+
8+
`sudo apparmor_parser {{[-a|--add]}} {{profile_file}}`
9+
10+
- Replace an existing profile:
11+
12+
`sudo apparmor_parser {{[-r|--replace]}} {{profile_file}}`
13+
14+
- Remove a profile from the kernel:
15+
16+
`sudo apparmor_parser {{[-R|--remove]}} {{profile_name}}`
17+
18+
- Load a profile in complain mode (logs violations but doesn't block):
19+
20+
`sudo apparmor_parser {{[-C|--complain]}} {{[-r|--replace]}} {{path/to/profile}}`
21+
22+
- Preprocess a profile (resolve includes) and write binary cache to file:
23+
24+
`apparmor_parser {{[-p|--preprocess]}} {{[-o|--ofile]}} {{path/to/output.cache}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}`
25+
26+
- Preprocess and print binary profile to stdout without loading:
27+
28+
`apparmor_parser {{[-p|--preprocess]}} {{[-S|--stdout]}} {{[-Q|--skip-kernel-load]}} {{path/to/profile}}`
29+
30+
- Replace a profile while skipping cache reads:
31+
32+
`sudo apparmor_parser {{[-r|--replace]}} {{[-T|--skip-read-cache]}} {{path/to/profile}}`
33+
34+
- Replace a profile, rebuild cache, and write it to a custom directory:
35+
36+
`sudo apparmor_parser {{[-r|--replace]}} {{[-W|--write-cache]}} {{[-L|--cache-loc]}} {{/path/to/cache}} {{path/to/profile}}`

0 commit comments

Comments
 (0)