· 6 years ago · Apr 03, 2020, 10:40 PM
1auditbeat.modules:
2- module: auditd
3 audit_rule_files: [ '${path.config}/audit.rules.d/*.conf' ]
4 audit_rules: |
5 ## Define audit rules here.
6 ## Create file watches (-w) or syscall audits (-a or -A). Uncomment these
7 ## examples or add your own rules.
8
9 ## If you are on a 64 bit platform, everything should be running
10 ## in 64 bit mode. This rule will detect any use of the 32 bit syscalls
11 ## because this might be a sign of someone exploiting a hole in the 32
12 ## bit API.
13 #-a always,exit -F arch=b32 -S all -F key=32bit-abi
14
15 ## Executions.
16 #-a always,exit -F arch=b64 -S execve,execveat -k exec
17
18 ## External access (warning: these can be expensive to audit).
19 #-a always,exit -F arch=b64 -S accept,bind,connect -F key=external-access
20
21 ## Identity changes.
22 #-w /etc/group -p wa -k identity
23 #-w /etc/passwd -p wa -k identity
24 #-w /etc/gshadow -p wa -k identity
25
26 ## Unauthorized access attempts.
27 #-a always,exit -F arch=b64 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EACCES -k access
28 #-a always,exit -F arch=b64 -S open,creat,truncate,ftruncate,openat,open_by_handle_at -F exit=-EPERM -k access
29
30- module: file_integrity
31 paths:
32 - /bin
33 - /usr/bin
34 - /sbin
35 - /usr/sbin
36 - /etc
37
38- module: system
39 datasets:
40 - host # General host information, e.g. uptime, IPs
41 - login # User logins, logouts, and system boots.
42 - package # Installed, updated, and removed packages
43 - process # Started and stopped processes
44 - socket # Opened and closed sockets
45 - user # User information
46
47 # How often datasets send state updates with the
48 # current state of the system (e.g. all currently
49 # running processes, all open sockets).
50 state.period: 12h
51
52 # Enabled by default. Auditbeat will read password fields in
53 # /etc/passwd and /etc/shadow and store a hash locally to
54 # detect any changes.
55 user.detect_password_changes: true
56
57 # File patterns of the login record files.
58 login.wtmp_file_pattern: /var/log/wtmp*
59 login.btmp_file_pattern: /var/log/btmp*
60
61#==================== Elasticsearch template setting ==========================
62setup.template.settings:
63 index.number_of_shards: 1
64 #index.codec: best_compression
65#================================ General =====================================
66
67# The name of the shipper that publishes the network data. It can be used to group
68# all the transactions sent by a single shipper in the web interface.
69#name:
70
71# The tags of the shipper are included in their own field with each
72# transaction published.
73#tags: ["service-X", "web-tier"]
74
75# Optional fields that you can specify to add additional information to the
76# output.
77#fields:
78# env: staging
79
80#============================== Dashboards =====================================
81# These settings control loading the sample dashboards to the Kibana index. Loading
82# the dashboards is disabled by default and can be enabled either by setting the
83# options here or by using the `setup` command.
84#setup.dashboards.enabled: false
85
86# The URL from where to download the dashboards archive. By default this URL
87# has a value which is computed based on the Beat name and version. For released
88# versions, this URL points to the dashboard archive on the artifacts.elastic.co
89# website.
90#setup.dashboards.url:
91
92#============================== Kibana =====================================
93
94# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
95# This requires a Kibana endpoint configuration.
96setup.kibana:
97
98 # Kibana Host
99 # Scheme and port can be left out and will be set to the default (http and 5601)
100 # In case you specify and additional path, the scheme is required: http://localhost:5601/path
101 # IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
102 host: "https://ad961b2e62a548d680ba8056024e1680.us-east-1.aws.found:9243"
103
104 # Kibana Space ID
105 # ID of the Kibana Space into which the dashboards should be loaded. By default,
106 # the Default Space will be used.
107 #space.id:
108
109#============================= Elastic Cloud ==================================
110
111# These settings simplify using Auditbeat with the Elastic Cloud (https://cloud.elastic.co/).
112
113# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
114# `setup.kibana.host` options.
115# You can find the `cloud.id` in the Elastic Cloud web UI.
116#cloud.id:
117
118# The cloud.auth setting overwrites the `output.elasticsearch.username` and
119# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
120#cloud.auth:
121
122#================================ Outputs =====================================
123
124# Configure what output to use when sending the data collected by the beat.
125
126#-------------------------- Elasticsearch output ------------------------------
127output.elasticsearch:
128 # Array of hosts to connect to.
129 hosts: ["url"]
130
131 # Protocol - either `http` (default) or `https`.
132 protocol: "https"
133
134 # Authentication credentials - either API key or username/password.
135 #api_key: "id:api_key"
136 username: "user
137 password: "pw"
138
139#----------------------------- Logstash output --------------------------------
140#output.logstash:
141 # The Logstash hosts
142 #hosts: ["localhost:5044"]
143
144 # Optional SSL. By default is off.
145 # List of root certificates for HTTPS server verifications
146 #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
147
148 # Certificate for SSL client authentication
149 #ssl.certificate: "/etc/pki/client/cert.pem"
150
151 # Client Certificate Key
152 #ssl.key: "/etc/pki/client/cert.key"
153
154#================================ Processors =====================================
155
156# Configure processors to enhance or manipulate events generated by the beat.
157
158processors:
159 - add_host_metadata: ~
160 # - add_cloud_metadata: ~
161 # - add_docker_metadata: ~
162
163#================================ Logging =====================================
164
165# Sets log level. The default log level is info.
166# Available log levels are: error, warning, info, debug
167logging.level: info
168logging.to_files: true
169logging.files:
170 path: /var/log/auditbeat
171 name: auditbeat.log
172 keepfiles: 7
173 permissions: 0644
174
175# At debug level, you can selectively enable logging only for some components.
176# To enable all selectors use ["*"]. Examples of other selectors are "beat",
177# "publish", "service".
178#logging.selectors: ["*"]
179
180#============================== X-Pack Monitoring ===============================
181# auditbeat can export internal metrics to a central Elasticsearch monitoring
182# cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
183# reporting is disabled by default.
184
185# Set to true to enable the monitoring reporter.
186#monitoring.enabled: false
187
188# Sets the UUID of the Elasticsearch cluster under which monitoring data for this
189# Auditbeat instance will appear in the Stack Monitoring UI. If output.elasticsearch
190# is enabled, the UUID is derived from the Elasticsearch cluster referenced by output.elasticsearch.
191#monitoring.cluster_uuid:
192
193# Uncomment to send the metrics to Elasticsearch. Most settings from the
194# Elasticsearch output are accepted here as well.
195# Note that the settings should point to your Elasticsearch *monitoring* cluster.
196# Any setting that is not set is automatically inherited from the Elasticsearch
197# output configuration, so if you have the Elasticsearch output configured such
198# that it is pointing to your Elasticsearch monitoring cluster, you can simply
199# uncomment the following line.
200#monitoring.elasticsearch:
201
202#================================= Migration ==================================
203
204# This allows to enable 6.7 migration aliases
205#migration.6_to_7.enabled: true