Ivan Suzdal | 50a360f | 2018-06-04 16:07:41 +0400 | [diff] [blame] | 1 | |
| 2 | ================================== |
| 3 | Auditd Formula |
| 4 | ================================== |
| 5 | |
| 6 | The Linux Audit system provides a way to track security-relevant information on |
| 7 | your system. Based on pre-configured rules, Audit generates log entries to |
| 8 | record as much information about the events that are happening on your system |
| 9 | as possible. This information is crucial for mission-critical environments to |
| 10 | determine the violator of the security policy and the actions they performed. |
| 11 | Audit does not provide additional security to your system; rather, it can be |
| 12 | used to discover violations of security policies used on your system. |
| 13 | These violations can further be prevented by additional security |
| 14 | measures such as SELinux. |
| 15 | |
Ivan Suzdal | 91e0245 | 2018-06-20 12:33:16 +0400 | [diff] [blame^] | 16 | Please, be aware of one *feature*. |
| 17 | If you enable auditd.rules.rules.privileged it will dynamically generate a list |
| 18 | of binaries which have suid/sgid bit for all mounted file systems which do not |
| 19 | have **nosuid** or **noexec** mount option (except the *special* file systems |
| 20 | such as **sysfs**, **nsfs**, **cgroup**, **proc** and so one). |
| 21 | It was done because it is nearly impossible to create that list manually. It |
| 22 | always will differ from one installation to another. |
| 23 | This behavior can not be changed but it can be extended manually by putting |
| 24 | necessary rules into the **rule_list** list). |
Ivan Suzdal | 50a360f | 2018-06-04 16:07:41 +0400 | [diff] [blame] | 25 | |
| 26 | |
| 27 | Sample Metadata |
| 28 | =============== |
| 29 | |
| 30 | Single auditd service |
| 31 | |
| 32 | .. code-block:: yaml |
| 33 | auditd: |
| 34 | service: |
| 35 | enabled: true |
| 36 | log_file: /var/log/audit/audit.log |
| 37 | log_format: NOLOG |
| 38 | log_group: root |
| 39 | priority_boost: 4 |
| 40 | flush: INCREMENTAL |
| 41 | freq: 20 |
| 42 | num_logs: 5 |
| 43 | disp_qos: lossy |
| 44 | dispatcher: /sbin/audispd |
| 45 | name_format: HOSTNAME |
| 46 | max_log_file: 6 |
| 47 | max_log_file_action: ROTATE |
| 48 | space_left: 75 |
| 49 | space_left_action: SYSLOG |
| 50 | action_mail_acct: root |
| 51 | admin_space_left: 50 |
| 52 | admin_space_left_action: SUSPEND |
| 53 | disk_full_action: SUSPEND |
| 54 | disk_error_action: SUSPEND |
| 55 | tcp_listen_queue: 5 |
| 56 | tcp_max_per_addr: 1 |
| 57 | tcp_client_max_idle: 0 |
| 58 | enable_krb5: 'no' |
| 59 | krb5_principal: auditd |
| 60 | audisp: |
| 61 | enabled: true |
| 62 | rules: |
| 63 | options: |
| 64 | enabled: 0 |
| 65 | bufsize: 8192 |
| 66 | rules: |
| 67 | some_rule_key: |
| 68 | enabled: true |
| 69 | rule_list: |
| 70 | - '-w /etc/passwd -p wa' |
| 71 | - '-a always,exit -F arch=b64 -S mount' |
| 72 | |
Oleksii Chupryn | 509fe27 | 2018-06-12 13:39:26 +0300 | [diff] [blame] | 73 | Auditd service with syslog plugin configuration |
| 74 | |
| 75 | .. code-block:: yaml |
| 76 | |
| 77 | auditd: |
| 78 | service: |
| 79 | enabled: true |
| 80 | log_format: NOLOG |
| 81 | ... |
| 82 | audisp: |
| 83 | enabled: true |
| 84 | plugins: |
| 85 | syslog: |
| 86 | active: 'yes' |
| 87 | direction: out |
| 88 | path: builtin_syslog |
| 89 | type: builtin |
| 90 | args: 'LOG_INFO LOG_LOCAL6' |
| 91 | format: string |
Ivan Suzdal | 50a360f | 2018-06-04 16:07:41 +0400 | [diff] [blame] | 92 | |
| 93 | References |
| 94 | ========= |
| 95 | https://github.com/linux-audit/audit-documentation/wiki |
| 96 | https://linux-audit.com |
| 97 | https://github.com/linux-audit/audit-userspace |
| 98 | |
| 99 | Documentation and Bugs |
| 100 | ====================== |
| 101 | |
| 102 | To learn how to install and update salt-formulas, consult the documentation |
| 103 | available online at: |
| 104 | |
| 105 | http://salt-formulas.readthedocs.io/ |
| 106 | |
| 107 | In the unfortunate event that bugs are discovered, they should be reported to |
| 108 | the appropriate issue tracker. Use GitHub issue tracker for specific salt |
| 109 | formula: |
| 110 | |
| 111 | https://github.com/salt-formulas/salt-formula-auditd/issues |
| 112 | |
| 113 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 114 | use Launchpad salt-formulas project: |
| 115 | |
| 116 | https://launchpad.net/salt-formulas |
| 117 | |
| 118 | Developers wishing to work on the salt-formulas projects should always base |
| 119 | their work on master branch and submit pull request against specific formula. |
| 120 | |
| 121 | You should also subscribe to mailing list (salt-formulas@freelists.org): |
| 122 | |
| 123 | https://www.freelists.org/list/salt-formulas |
| 124 | |
| 125 | Any questions or feedback is always welcome so feel free to join our IRC |
| 126 | channel: |
| 127 | |
| 128 | #salt-formulas @ irc.freenode.net |