# Wazuh - Filebeat configuration file
filebeat.modules:
- module: wazuh
alerts:
enabled: true
archives:
enabled: false
- module: suricata
setup.template.json.enabled: true
setup.template.json.path: '/etc/filebeat/wazuh-template.json'
setup.template.json.name: 'wazuh'
setup.template.overwrite: false
setup.ilm.enabled: false
output.elasticsearch.hosts: ['http://[ELASTICSEARCH-IP]:9200']
systemctl stop filebeat
[Unit]
Description=filebeat2
Documentation=https://www.elastic.co/guide/en/beats/filebeat/current/index.html
Wants=network-online.target
After=network-online.target
[Service]
ExecStart=/usr/share/filebeat/bin/filebeat -c /etc/filebeat2/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat2 -path.data /var/lib/filebeat -path.logs /var/log/filebeat/filebeat2
Restart=always
[Install]
WantedBy=multi-user.targetcp /etc/filebeat/* /etc/filebeat2/systemctl daemon-reload
systemctl restart filebeat
[root@localhost vagrant]# ps aux | grep filebeat
root 6237 0.0 0.6 480092 18120 ? Ssl 14:48 0:00 /usr/share/filebeat/bin/filebeat -c /etc/filebeat2/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat2 -path.data /var/lib/filebeat -path.logs /var/log/filebeat/filebeat2
root 6264 0.0 0.6 414556 18016 ? Ssl 14:48 0:00 /usr/share/filebeat/bin/filebeat -e -c /etc/filebeat/filebeat.yml -path.home /usr/share/filebeat -path.config /etc/filebeat -path.data /var/lib/filebeat -path.logs /var/log/filebeat
root 6332 0.0 0.0 112712 980 pts/0 R+ 14:51 0:00 grep --color=auto filebeat
[root@localhost vagrant]# lsof /var/ossec/logs/alerts/alerts.json
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ossec-ana 2942 ossec 9w REG 8,1 254156 67369809 /var/ossec/logs/alerts/alerts.json
filebeat 6237 root 5r REG 8,1 254156 67369809 /var/ossec/logs/alerts/alerts.json
filebeat 6264 root 3r REG 8,1 254156 67369809 /var/ossec/logs/alerts/alerts.jsoncurl -so /etc/logstash/wazuh-template.json https://raw.githubusercontent.com/wazuh/wazuh/v3.10.2/extensions/elasticsearch/7.x/wazuh-template.json
chmod go+r /etc/logstash/wazuh-template.jsonDirectories:
Path Dir : /var/lib/logstash
Config Dir : /usr/share/logstash/logstash.conf
Pipeline : /usr/share/logstash/config/pipelines.yml
Other Config : /etc/logstash/conf.d/01-wazuh.conf
Duplicate Config : /usr/share/logstash/conf.d/01-wazuh.conf
[root@localhost vagrant]# ls -ll /etc/logstash/
total 84
drwxrwxr-x. 2 root root 27 Feb 7 17:01 conf.d
-rw-r--r--. 1 root root 2019 Jan 15 13:39 jvm.options
-rw-r--r--. 1 root root 7482 Jan 15 13:39 log4j2.properties
-rw-r--r--. 1 root root 342 Jan 15 13:39 logstash-sample.conf
-rw-r--r--. 1 root root 8404 Feb 7 16:53 logstash.yml
-rw-r--r--. 1 root root 285 Jan 15 13:39 pipelines.yml
-rw-------. 1 root root 1696 Jan 15 13:39 startup.options
-rw-r--r--. 1 root root 46821 Feb 7 16:55 wazuh-template.json
[root@localhost vagrant]# ls -ll /etc/logstash/conf.d/
total 4
-rw-r--r--. 1 root root 1156 Feb 7 17:01 01-wazuh.conf
[root@localhost vagrant]# cat /etc/logstash/logstash.yml | grep -v "#"
path.data: /var/lib/logstash
path.logs: /var/log/logstash
[root@localhost vagrant]# ls /var/lib/logstash/
dead_letter_queue queue uuid
[root@localhost vagrant]# grep -v "#" /etc/logstash/logstash.yml
path.data: /var/lib/logstash
path.logs: /var/log/logstash
[root@localhost vagrant]# grep -v "#" /etc/logstash/conf.d/01-wazuh.conf
input {
beats {
port => 5000
}
}
filter {
json {
source => "message"
}
}
filter {
if [data][srcip] {
mutate {
add_field => [ "@src_ip", "%{[data][srcip]}" ]
}
}
if [data][aws][sourceIPAddress] {
mutate {
add_field => [ "@src_ip", "%{[data][aws][sourceIPAddress]}" ]
}
}
if [data][win][eventdata][ipAddress] {
mutate {
add_field => [ "@src_ip", "%{[data][win][eventdata][ipAddress]}" ]
}
}
}
filter {
date {
match => ["timestamp", "ISO8601"]
target => "timestamp"
}
mutate {
remove_field => [ "message", "beat", "input_type", "tags", "count", "@version", "ecs", "log", "offset", "type", "@src_ip", "host" ]
}
}
output {
elasticsearch {
hosts => ["x.x.x.x:9200"]
manage_template => true
template_overwrite => true
template => "/etc/logstash/wazuh-template.json"
template_name => "wazuh"
index => "wazuh-alerts-3.x-%{+YYYY.MM.dd}"
}
}
curl -so /etc/logstash/wazuh-template.json https://raw.githubusercontent.com/wazuh/wazuh/v3.10.2/extensions/elasticsearch/7.x/wazuh-template.json
chmod go+r /etc/logstash/wazuh-template.jsonnode.name: ETA10_test
path.data: /var/lib/logstash
pipeline.ordered: auto
path.config: /etc/logstash/conf.d/
config.debug: true
path.queue: /usr/share/logstash/data/queue
queue.max_events: 0
http.host: "10.0.106.144"
http.port: 9610
log.level: trace
path.logs: /var/log/logstash/
xpack.monitoring.enabled: true
xpack.monitoring.elasticsearch.username: elastic
xpack.monitoring.elasticsearch.password: *LARCadmin2011*
xpack.monitoring.elasticsearch.hosts: ["http://10.0.106.144:9200"]# Wazuh - Logstash configuration file
## Local Wazuh Manager - JSON file input
input {
file {
type => "wazuh-alerts"
path => "/var/ossec/logs/alerts/alerts.json"
codec => "json"
}
}
input {
beats {
port => 5000
codec => "json_lines"
# ssl => true
# ssl_certificate => "/etc/logstash/logstash.crt"
# ssl_key => "/etc/logstash/logstash.key"
}
}
filter {
if [data][srcip] {
mutate {
add_field => [ "@src_ip", "%{[data][srcip]}" ]
}
}
if [data][aws][sourceIPAddress] {
mutate {
add_field => [ "@src_ip", "%{[data][aws][sourceIPAddress]}" ]
}
}
}
filter {
geoip {
source => "@src_ip"
target => "GeoLocation"
fields => ["city_name", "country_name", "region_name", "location"]
}
date {
match => ["timestamp", "ISO8601"]
target => "@timestamp"
}
mutate {
remove_field => [ "timestamp", "beat", "input_type", "tags", "count", "@version", "log", "offset", "type", "@src_ip", "host"]
}
}
output {
elasticsearch {
hosts => [ "xxx" ]
index => "wazuh-alerts-3.x-%{+YYYY.MM.dd}"
user => "xxx"
password => "*xxxxx*"
}
}
#Output
output {
if [fileset][module] == "system" {
elasticsearch {
hosts => [ "xxxx:9200" ]
manage_template => false
index => "%{[@metadata][beat]}-system-%{+YYYY.MM}"
pipeline => "%{[@metadata][pipeline]}"
user => "xxxx"
password => "*xxxxx*"
}
}
}
output {
if [fileset][module] == "nginx" {
elasticsearch {
hosts => [ "xxxxxxx:9200" ]
manage_template => false
index => "%{[@metadata][beat]}-nginx-%{+YYYY.MM}"
pipeline => "%{[@metadata][pipeline]}"
user => "xxx"
password => "*xxxx*"
}
}
}#Output to Elasticsearch
output {
elasticsearch {
hosts => ["xxxxx:9200"]
user => "xxxxx"
password => "*xxxxx*"
manage_template => false
index => "nginx-%{+YYYY.MM.dd}"
}
# stout { code => rubydebug }
}cat /var/log/logstash/logstash-plain.log | grep -E "(ERROR|WARN|CRITICAL|FATAL)"
[root@localhost vagrant]# grep -v "#" /etc/logstash/logstash.yml
path.data: /var/lib/logstash
path.logs: /var/log/logstash
[root@localhost vagrant]# grep -v "#" /etc/logstash/pipelines.yml
- pipeline.id: main
path.config: "/etc/logstash/conf.d/*.conf"
cat /var/log/logstash/logstash-plain.log | grep -E "(ERROR|WARN|CRITICAL|FATAL)"
[root@localhost vagrant]# ls -ll /etc/logstash/
total 84
drwxrwxr-x. 2 root root 27 Feb 7 17:01 conf.d
-rw-r--r--. 1 root root 2019 Jan 15 13:39 jvm.options
-rw-r--r--. 1 root root 7482 Jan 15 13:39 log4j2.properties
-rw-r--r--. 1 root root 342 Jan 15 13:39 logstash-sample.conf
-rw-r--r--. 1 root root 8404 Feb 7 16:53 logstash.yml
-rw-r--r--. 1 root root 285 Jan 15 13:39 pipelines.yml
-rw-------. 1 root root 1696 Jan 15 13:39 startup.options
-rw-r--r--. 1 root root 46821 Feb 7 16:55 wazuh-template.json
[root@localhost vagrant]# ls -llR /etc/logstash/
/etc/logstash/:
total 84
drwxrwxr-x. 2 root root 27 Feb 7 17:01 conf.d
-rw-r--r--. 1 root root 2019 Jan 15 13:39 jvm.options
-rw-r--r--. 1 root root 7482 Jan 15 13:39 log4j2.properties
-rw-r--r--. 1 root root 342 Jan 15 13:39 logstash-sample.conf
-rw-r--r--. 1 root root 8404 Feb 7 16:53 logstash.yml
-rw-r--r--. 1 root root 285 Jan 15 13:39 pipelines.yml
-rw-------. 1 root root 1696 Jan 15 13:39 startup.options
-rw-r--r--. 1 root root 46821 Feb 7 16:55 wazuh-template.json
/etc/logstash/conf.d:
total 4
-rw-r--r--. 1 root root 1156 Feb 7 17:01 01-wazuh.conf
drwxr-xr-x. 3 root root 183 Feb 7 17:11 logstash
[root@localhost vagrant]# ls -ll /usr/share/logstash/
total 848
drwxr-xr-x. 2 logstash logstash 4096 Feb 7 16:53 bin
-rw-r--r--. 1 logstash logstash 2276 Jan 15 13:39 CONTRIBUTORS
drwxrwxr-x. 2 logstash logstash 6 Jan 15 13:39 data
-rw-r--r--. 1 logstash logstash 4097 Jan 15 13:39 Gemfile
-rw-r--r--. 1 logstash logstash 22792 Jan 15 13:39 Gemfile.lock
drwxr-xr-x. 6 logstash logstash 84 Feb 7 16:53 lib
-rw-r--r--. 1 logstash logstash 13675 Jan 15 13:39 LICENSE.txt
drwxr-xr-x. 4 logstash logstash 90 Feb 7 16:53 logstash-core
drwxr-xr-x. 3 logstash logstash 86 Feb 7 16:53 logstash-core-plugin-api
drwxr-xr-x. 4 logstash logstash 55 Feb 7 16:53 modules
-rw-r--r--. 1 logstash logstash 808305 Jan 15 13:39 NOTICE.TXT
drwxr-xr-x. 3 logstash logstash 30 Feb 7 16:53 tools
drwxr-xr-x. 4 logstash logstash 33 Feb 7 16:53 vendor
drwxr-xr-x. 9 logstash logstash 193 Feb 7 16:53 x-pack
drwxr-xr-x. 11 logstash logstash 241 Feb 7 16:53 logstash
cat </s
[root@localhost vagrant]# cat /etc/systemd/system/logstash.service
[Unit]
Description=logstash
[Service]
Type=simple
User=logstash
Group=logstash
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/logstash
EnvironmentFile=-/etc/sysconfig/logstash
ExecStart=/usr/share/logstash/bin/logstash "--path.settings" "/etc/logstash"
Restart=always
WorkingDirectory=/
Nice=19
LimitNOFILE=16384
[Install]
WantedBy=multi-user.target
filebeat test output
elasticsearch: http://ip:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: ip
dial up... OK
TLS... WARN secure connection disabled
talk to server... OK
version: 7.3.2cat /var/log</spa
cat /var<sp
# Wazuh - Filebeat configuration file
filebeat.modules:
# Normal module, path: /var/ossec/logs/alerts/alerts.json, index: wazuh-alerts-3.x-yyyy.mm.dd
- module: wazuh
alerts:
enabled: true
archives:
enabled: false
# Custom input, path: /var/custom/alerts/suricata.json, index: wazuh-suricata-yyyy.mm.dd
- module: suricata
alerts:
enabled: true
input:
paths:
- "/var/custom/alerts/suricata.json"
fields:
index_prefix: "wazuh-suricata-"
setup.template.json.enabled: true
setup.template.json.path: '/etc/filebeat/wazuh-template.json'
setup.template.json.name: 'wazuh'
setup.template.overwrite: true
setup.ilm.enabled: false
output.elasticsearch.hosts: ['http://localhost:9200']
-rw-------. 1 root root <span style="color:#06
filebeat test config
filebeat test output
# Wazuh - Filebeat configuration file
filebeat.modules:
- module: kibana
- module: wazuh
alerts:
enabled: true
archives:
enabled: true
# Custom input, path: /var/custom/alerts/suricata.json, index: wazuh-suricata-yyyy.mm.dd
- module: nginx
access:
enabled: true
- module: suricata
alerts:
enabled: true
input:
paths:
- "/var/custom/alerts/suricata.json"
fields:
index_prefix: "wazuh-suricata-"
/etc<span
<div style="background-color:rgb(250,250,250);border-color:rgb(187,187,187);border-s
filebeat -e -d "publish"
drwxr-xr-x. 3 root root 183 Feb 7 17<span style="color:
filebeat -e -d "publish"
2020-03-24T15:41:52.074+0800 INFO instance/beat.go:571 Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2020-03-24T15:41:52.075+0800 INFO instance/beat.go:579 Beat ID: 9e68d952-0a9c-42da-9aae-78ad191170e2
2020-03-24T15:41:52.075+0800 INFO [index-management.ilm] ilm/ilm.go:129 Policy name: filebeat-7.1.1
2020-03-24T15:41:55.079+0800 INFO add_cloud_metadata/add_cloud_metadata.go:346 add_cloud_metadata: hosting provider type not detected.
2020-03-24T15:41:55.079+0800 INFO [seccomp] seccomp/seccomp.go:116 Syscall filter successfully installed
2020-03-24T15:41:55.079+0800 INFO [beat] instance/beat.go:827 Beat info {"system_info": {"beat": {"path": {"config": "/etc/filebeat", "data": "/var/lib/filebeat", "home": "/usr/share/filebeat", "logs": "/var/log/filebeat"}, "type": "filebeat", "uuid": "9e68d952-0a9c-42da-9aae-78ad191170e2"}}}
2020-03-24T15:41:55.079+0800 INFO [beat] instance/beat.go:836 Build info {"system_info": {"build": {"commit": "3358d9a5a09e3c6709a2d3aaafde628ea34e8419", "libbeat": "7.1.1", "time": "2019-05-23T13:21:33.000Z", "version": "7.1.1"}}}
2020-03-24T15:41:55.079+0800 INFO [beat] instance/beat.go:839 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":32,"version":"go1.11.5"}}}
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64","fe80::7c38:c4ff:fee9:732/64","172.28.0.1/16","fe80::42:3ff:fe07:b1a6/64","172.29.0.1/16","fe80::42:ceff:fe01:37cb/64","fe80::1c18:2dff:fe05:c8c0/64","fe80::b055:29ff:fe3b:6398/64","fe80::6ce3:2fff:fe1b:c12a/64","fe80::a0ab:22ff:feb5:41a9/64","fe80::5840:17ff:fe78:7f2e/64"],"kernel_version":"4.4.0-154-generic","mac":["f8:bc:12:3b:3a:dc","f8:bc:12:3b:3a:dd","f8:bc:12:3b:3a:de","f8:bc:12:3b:3a:df","52:54:00:4e:f6:54","52:54:00:4e:f6:54","02:42:62:23:53:2f","02:42:cc:db:f7:40","02:42:d9:1a:fe:bd","2a:31:74:70:75:ec","32:09:83:e1:19:56","46:43:c2:d6:4d:18","7e:38:c4:e9:07:32","02:42:03:07:b1:a6","02:42:ce:01:37:cb","1e:18:2d:05:c8:c0","b2:55:29:3b:63:98","6e:e3:2f:1b:c1:2a","a2:ab:22:b5:41:a9","5a:40:17:78:7f:2e"],"os":{"family":"debian","platform":"ubuntu","name":"Ubuntu","version":"16.04.6 LTS (Xenial Xerus)","major":16,"minor":4,"patch":6,"codename":"xenial"},"timezone":"+08","timezone_offset_sec":28800,"id":"b4f8b9056e219987a75e0c1a5b729cdc"}}}
2020-03-24T15:41:55.083+0800 INFO [beat] instance/beat.go:872 Process info {"system_info": {"process": {"capabilities": {"inheritable":null,"permitted":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend","audit_read"],"effective":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend","audit_read"],"bounding":["chown","dac_override","dac_read_search","fowner","fsetid","kill","setgid","setuid","setpcap","linux_immutable","net_bind_service","net_broadcast","net_admin","net_raw","ipc_lock","ipc_owner","sys_module","sys_rawio","sys_chroot","sys_ptrace","sys_pacct","sys_admin","sys_boot","sys_nice","sys_resource","sys_time","sys_tty_config","mknod","lease","audit_write","audit_control","setfcap","mac_override","mac_admin","syslog","wake_alarm","block_suspend","audit_read"],"ambient":null}, "cwd": "/etc/filebeat", "exe": "/usr/share/filebeat/bin/filebeat", "name": "filebeat", "pid": 21066, "ppid": 34069, "seccomp": {"mode":"filter"}, "start_time": "2020-03-24T15:41:51.780+0800"}}}
2020-03-24T15:41:55.083+0800 INFO instance/beat.go:280 Setup Beat: filebeat; Version: 7.1.1
2020-03-24T15:41:55.083+0800 INFO [index-management] idxmgmt/std.go:165 Set output.elasticsearch.index to 'filebeat-7.1.1' as ILM is enabled.
2020-03-24T15:41:55.083+0800 INFO elasticsearch/client.go:165 Elasticsearch url: http://10.0.106.144:9200
2020-03-24T15:41:55.084+0800 INFO [publisher] pipeline/module.go:97 Beat name: eta10
2020-03-24T15:41:55.103+0800 INFO instance/beat.go:361 filebeat stopped.
2020-03-24T15:41:55.103+0800 ERROR instance/beat.go:802 Exiting: Fileset suricata/alerts is configured but doesn't exist
Exiting: Fileset suricata/alerts is configured but doesn't existERROR instance/beat.go:802 Exiting: Fileset suricata/alerts is configured but doesn't exist
filebeat -e -d "publish"
2020-03-24T15:41:52.074+0800 INFO instance/beat.go:571 Home path: [/usr/share/filebeat] Config path: [/etc/filebeat] Data path: [/var/lib/filebeat] Logs path: [/var/log/filebeat]
2020-03-24T15:41:52.075+0800 INFO instance/beat.go:579 Beat ID: 9e68d952-0a9c-42da-9aae-78ad191170e2
2020-03-24T15:41:52.075+0800 INFO [index-management.ilm] ilm/ilm.go:129 Policy name: filebeat-7.1.1
2020-03-24T15:41:55.079+0800 INFO add_cloud_metadata/add_cloud_metadata.go:346 add_cloud_metadata: hosting provider type not detected.
2020-03-24T15:41:55.079+0800 INFO [seccomp] seccomp/seccomp.go:116 Syscall filter successfully installed
2020-03-24T15:41:55.079+0800 INFO [beat] instance/beat.go:827 Beat info {"system_info": {"beat": {"path": {"config": "/etc/filebeat", "data": "/var/lib/filebeat", "home": "/usr/share/filebeat", "logs": "/var/log/filebeat"}, "type": "filebeat", "uuid": "9e68d952-0a9c-42da-9aae-78ad191170e2"}}}
2020-03-24T15:41:55.079+0800 INFO [beat] instance/beat.go:836 Build info {"system_info": {"build": {"commit": "3358d9a5a09e3c6709a2d3aaafde628ea34e8419", "libbeat": "7.1.1", "time": "2019-05-23T13:21:33.000Z", "version": "7.1.1"}}}
2020-03-24T15:41:55.079+0800 INFO [beat] instance/beat.go:839 Go runtime info {"system_info": {"go": {"os":"linux","arch":"amd64","max_procs":32,"version":"go1.11.5"}}}
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64","fe80::7c38:c4ff:fee9:732/64","172.28.0.1/16","fe80::42:3ff:fe07:b1a6/64","172.29.0.1/16","fe80::42:ceff:fe01:37cb/64","fe80::1c18:2dff:fe05:c8c0/64","fe80::b055:29ff:fe3b:6398/64","fe80::6ce3:2fff:fe1b:c12a/64","fe80::a0ab:22ff:feb5:41a9/64","fe80::5840:17ff:fe78:7f2e/64"],"kernel_version":"4.4.0-154-generic","mac":["f8:bc:12:3b:3a:dc","f8:bc:12:3b:3a:dd","f8:bc:12:3b:3a:de","f8:bc:12:3b:3a:df","52:54:00:4e:f6:54","52:54:00:4e:f6:54","02:42:62:23:53:2f","02:42:cc:db:f7:40","02:42:d9:1a:fe:bd","2a:31:74:70:75:ec","32:09:83:e1:19:56","46:43:c2:d6:4d:18","7e:38:c4:e9:07:32","02:42:03:07:b1:a6","02:42:ce:01:37:cb","1e:18:2d:05:c8:c0","b2:55:29:3b:63:98","6e:e3:2f:1b:c1:2a","a2:ab:22:b5:41:a9","5a:40:17:78:7f:2e"],"os":{"family":"debian","platform":"ubuntu","name":"Ubuntu","version":"16.04.6 LTS (Xenial Xerus)","major":16,"minor":4,"patch":6,"codename":"xenial"},"timezone":"+08","timezone_offset_sec":28800,"id":"b4f8b9056e219987a75e0c1a5b729cdc"}}}
2020-03-24T15:41:55.083+0800 INFO [beat] instance/beat.go<spa
ERROR instance/beat.go:802 Exiting: Fileset suricata/alerts is configured but doesn't exist
#default modules
filebeat.config.modules.path: '${path.config}/modules.d/*.yml'
# Wazuh - Filebeat configuration file
filebeat.modules:
- module: wazuh
alerts:
enabled: true
archives:
enabled: false
setup.template.json.enabled: true
setup.template.json.path: '/etc/filebeat/wazuh-template.json'
setup.template.json.name: 'wazuh'
setup.template.overwrite: true
setup.ilm.enabled: false
output.elasticsearch.hosts: ['http://YOUR_ELASTIC_SERVER_IP:9200']
filebeat modules enable suricata
systemctl restart filebeat.service
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64","fe80::7c38:c4ff:fee9:732/64","172.28.0.1/16","fe80::42:3ff:fe07:b1a6/64","172.29.0.1/16","fe80::42:ceff:fe01:37cb/64","fe80::1c18:2dff:fe05:c8c0/64","fe80::b055:29ff:fe3b:6398/64","fe80::6ce3:2fff:fe1b:c12a/64","fe80::a0ab:22ff:feb5:41a9/64","fe80::5840:17ff:fe78:7f2e/64"],"kernel_version":"4.4.0-154-generic","mac":["f8:bc:12:3b:3a:dc","f8:bc:12:3b:3a:dd","f8:bc:12:3b:3a:de","f8:bc:12:3b:3a:df","52:54:00:4e:f6:54","52:54:00:4e:f6:54","02:42:62:23:53:2f","02:42:cc:db:f7:40","02:42:d9:1a:fe:bd","2a:31:74:70:75:ec","32:09:83:e1:19:56","46:43:c2:d6:4d:18","7e:38:c4:e9:07:32","02:42:03:07:b1:a6","02:42:ce:01:37:cb","1e:18:2d:05:c8:c0","b2:55:29:3b:63:98","6e:e3:2f:1b:c1:2a","a2:ab:22:b5:41:a9","5a:40:17:78:7f:2e"],"os":{"family"<span style="color:#660"
filebeat -e -M "suricata.var.paths=[/var/log/suricata/eve.json]"2020-03-31T16:56:08.466+0800 ERROR instance/beat.go:802 Exiting: 1 error: invalid config: yaml: line 9: mapping values are not allowed in this context
Exiting: 1 error: invalid config: yaml: line 9: mapping values are not allowed in this context[root@localhost vagrant]# grep -v "#" /etc/filebeat/modules.d/suricata.yml
- module: suricata
eve:
enabled: true
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64","fe80::7c38:c4ff:fee9:732/64","172.28.0.1/16","fe80::42:3ff:fe07:b1a6/64","<a href="http://172.29.0.1/16" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3d
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64","fe80::7c38:c4ff:fee9:732/64","172.28.0.1/16","fe80::42:3ff:fe07:b1a6/64","<a href="<a hre
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64","fe80::7c38:c4ff:fee9:732/64","172.28.0.1/16",&qu
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64","fe80::7c38:c4ff:fee9:732/64","<a href="http://172.28.0.1/16" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2F172.28.0.1%2F16\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG2ZkLW7maM79
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","172.19.0.1/16","fe80::42:d9ff:fe1a:febd/64","fe80::2831:74ff:fe70:75ec/64","fe80::3009:83ff:fee1:1956/64","fe80::4443:c2ff:fed6:4d18/64",</span
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","172.17.0.1/16","fe80::42:ccff:fedb:f740/64","<a href="http://172.19.0.1/16" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2F172.19.0.1%2F16\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH0UqP49dQypL5fDhiVL6KwbTb_Gw';return true;" onclick="this.href='http://www.go
hosts:
- default:
url: https://localhost
port: 55000
user: wazapi
password: 'Mypassword^'
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["127.0.0.1/8","::1/128","10.0.106.144/24","fe80::fabc:12ff:fe3b:3ade/64","192.168.122.1/24","172.18.0.1/16","fe80::42:62ff:fe23:532f/64","<a href="http://172.17.0.1/16" rel="nofollow" target="_blank" onmo
2020-03-24T15:41:55.082+0800 INFO [beat] instance/beat.go:843 Host info {"system_info": {"host": {"architecture":"x86_64","boot_time":"2019-12-30T13:38:47+08:00","containerized":false,"name":"eta10","ip":["<a href="http://127.0.0.1/8" rel