LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

aa-genprof

Generate AppArmor profiles by monitoring program behavior

TLDR

Begin learning a profile, then exercise the program in another terminal
$ sudo aa-genprof [/usr/bin/program]
copy
Write the resulting profile into a directory of your own
$ sudo aa-genprof --dir [path/to/profiles] [/usr/bin/program]
copy
Read the events from a specific log rather than the system one
$ sudo aa-genprof --file [path/to/logfile] [/usr/bin/program]
copy
List the options it accepts
$ aa-genprof --help
copy

SYNOPSIS

aa-genprof executable [-d /path/to/profiles] [-f /path/to/logfile]

DESCRIPTION

aa-genprof is a profile generation utility for AppArmor that automates the creation of security profiles by monitoring program behavior. If no profile exists, it creates one using aa-autodep. It then sets the profile to complain mode, writes a mark to the system log, and instructs the user to exercise the application in another window.When the user selects (S)can, aa-genprof parses complain mode logs and iterates through violations using aa-logprof. When (F)inish is selected, all generated profiles are set to enforce mode.

PARAMETERS

-d, --dir /path/to/profiles

Specifies where to look for the AppArmor security profile set; defaults to /etc/apparmor.d
-f, --file /path/to/logfile
Specifies the location of the logfile; default locations are read from /etc/apparmor/logprof.conf
-h, --help
Display help information

CONFIGURATION

/etc/apparmor/logprof.conf

Controls default logfile location, repository settings, and other options used during profile generation.

INSTALL

sudo apk add apparmor-utils
copy
sudo zypper install apparmor-utils
copy
nix profile install nixpkgs#apparmor-utils
copy

CAVEATS

Profile generation requires running the target application through all its normal operations to capture the necessary access patterns. Incomplete testing may result in profiles that block legitimate functionality. Requires root privileges.

HISTORY

Part of the apparmor-utils package for managing application security profiles on Linux systems.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid