Skip to content

Commit ad63efd

Browse files
committed
Initial clone from lightforge\Logstash-configs
1 parent b0b560f commit ad63efd

File tree

126 files changed

+27485
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+27485
-0
lines changed

.gitattributes

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.gitignore

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Windows image file caches
2+
Thumbs.db
3+
ehthumbs.db
4+
5+
# Folder config file
6+
Desktop.ini
7+
8+
# Recycle Bin used on file shares
9+
$RECYCLE.BIN/
10+
11+
# Windows Installer files
12+
*.cab
13+
*.msi
14+
*.msm
15+
*.msp
16+
17+
# Windows shortcuts
18+
*.lnk
19+
20+
# =========================
21+
# Operating System Files
22+
# =========================
23+
24+
# OSX
25+
# =========================
26+
27+
.DS_Store
28+
.AppleDouble
29+
.LSOverride
30+
31+
# Thumbnails
32+
._*
33+
34+
# Files that might appear on external disk
35+
.Spotlight-V100
36+
.Trashes
37+
38+
# Directories potentially created on remote AFP share
39+
.AppleDB
40+
.AppleDesktop
41+
Network Trash Folder
42+
Temporary Items
43+
.apdisk

Field Name Guidelines.docx

14.3 KB
Binary file not shown.

autorun.conf

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Author: Justin Henderson
2+
3+
# Last Update: 11/18/2015
4+
#
5+
# This conf file is based on accepting logs for autorunsc that are in tab delimited format
6+
# The command ran to generate these logs is : NEED_TO_ADD_COMMAND
7+
input {
8+
tcp {
9+
port => 5001
10+
type => "autorun"
11+
}
12+
}
13+
14+
filter {
15+
if [type] == "autorun" {
16+
# This is the initial parsing of the log
17+
grok {
18+
match => { "message" => "%{DATA:Time}\t%{DATA:EntryLocation}\t%{DATA:Entry}\t%{DATA:Enabled}\t%{DATA:Category}\t%{DATA:Profile}\t%{DATA:Description}\t%{DATA:Publisher}\t%{DATA:ImagePath}\t%{DATA:Version}\t%{DATA:LaunchString}\t%{DATA:MD5}\t%{DATA:SHA1}\t%{DATA:PESHA1}\t%{DATA:PESHA256}\t%{GREEDYDATA:IMP}"}
19+
}
20+
# Drop the message field as it is not very readable and unneccessary
21+
mutate {
22+
remove_field => [ "message"]
23+
}
24+
}
25+
}
26+
27+
28+
output {
29+
if [type] == "autorun" {
30+
elasticsearch {
31+
# Because of the amount of data and the data usage of this type of log I prefer it in a different index.
32+
# If you do not want this then comment out the index field below
33+
index => "autorun-%{+YYYY.MM.dd}"
34+
}
35+
}
36+
}
37+

bro.tar

107 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Author: Justin Henderson
2+
# SANS Instructor and author of SANS SEC555: SIEM and Tactical Analytics
3+
4+
# Last Update: 12/9/2016
5+
6+
filter {
7+
ruby {
8+
code => "event['task_start'] = Time.now.to_f;"
9+
}
10+
mutate {
11+
#add_tag => [ "conf_file_1000"]
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Author: Justin Henderson
2+
# SANS Instructor and author of SANS SEC555: SIEM and Tactical Analytics
3+
4+
# Last Update: 12/9/2016
5+
6+
filter {
7+
ruby {
8+
code => "event['task_end'] = Time.now.to_f;"
9+
}
10+
ruby {
11+
code => "event['logstash_time'] = event['task_end'] - event['task_start']"
12+
}
13+
mutate {
14+
remove_field => [ 'task_start', 'task_end' ]
15+
}
16+
mutate {
17+
#add_tag => [ "conf_file_8998"]
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Author: Justin Henderson
2+
# SANS Instructor and author of SANS SEC555: SIEM and Tactical Analytics
3+
4+
# Last Update: 4/11/2017
5+
6+
filter {
7+
if [type] == "dns" {
8+
if [highest_registered_domain] {
9+
rest {
10+
request => {
11+
url => "http://localhost:20000/alexa/%{highest_registered_domain}"
12+
}
13+
sprintf => true
14+
json => false
15+
target => "site"
16+
}
17+
if [site] != "0" and [site] {
18+
mutate {
19+
add_tag => [ "top-1m" ]
20+
remove_field => [ "site" ]
21+
}
22+
}
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Author: Justin Henderson
2+
# SANS Instructor and author of SANS SEC555: SIEM and Tactical Analytics
3+
4+
# Last Update: 4/11/2017
5+
6+
filter {
7+
if [type] == "dns" {
8+
# If Query exists run a frequency analysis against it. In order for this to work you must have
9+
# freq.py and the corresponding frequency table in /opt/freq/. This is a huge boost to security
10+
# and I highly recommend you set this up. Example, if a frequency score less than 6 exists
11+
# then there is a likelihood that something malicious is happening.
12+
#
13+
# For higher accuracy, please generate your own frequency tables. For questions on setup,
14+
# please refer to https://github.com/SMAPPER
15+
if [query_type_name] == "A" or [query_type_name] == "AAAA" and "top-1m" not in [tags] {
16+
if [parent_domain] and [parent_domain_length] > 5 {
17+
mutate {
18+
add_field => { "freq_parent_domain" => "%{parent_domain}"}
19+
}
20+
mutate {
21+
gsub => [ "freq_parent_domain", "\W", "" ]
22+
}
23+
rest {
24+
request => {
25+
url => "http://localhost:10004/measure/%{freq_parent_domain}"
26+
}
27+
sprintf => true
28+
json => false
29+
target => "parent_domain_frequency_score"
30+
}
31+
mutate {
32+
remove_field => [ "freq_parent_domain" ]
33+
}
34+
if [parent_domain_frequency_score] {
35+
mutate {
36+
convert => [ "parent_domain_frequency_score", "float" ]
37+
add_field => { "frequency_scores" => "%{parent_domain_frequency_score}" }
38+
}
39+
}
40+
}
41+
if [subdomain] and [subdomain_length] > 5 {
42+
mutate {
43+
add_field => { "freq_subdomain" => "%{subdomain}"}
44+
}
45+
mutate {
46+
gsub => [ "freq_subdomain", "\W", "" ]
47+
}
48+
rest {
49+
request => {
50+
url => "http://localhost:10004/measure/%{freq_subdomain}"
51+
}
52+
sprintf => true
53+
json => false
54+
target => "subdomain_frequency_score"
55+
}
56+
mutate {
57+
remove_field => [ "freq_subdomain" ]
58+
}
59+
if [subdomain_frequency_score] {
60+
mutate {
61+
convert => [ "subdomain_frequency_score", "float" ]
62+
add_field => { "frequency_scores" => "%{subdomain_frequency_score}" }
63+
}
64+
}
65+
}
66+
}
67+
mutate {
68+
#add_tag => [ "conf_file_8502"]
69+
}
70+
}
71+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Author: Justin Henderson
2+
# SANS Instructor and author of SANS SEC555: SIEM and Tactical Analytics
3+
4+
# Last Update: 12/9/2016
5+
6+
filter {
7+
if [type] == "bro_http" {
8+
# If uri exists run a frequency analysis against it. In order for this to work you must have
9+
# freq.py and the corresponding frequency table in /opt/freq/. This is a huge boost to security
10+
# and I highly recommend you set this up. Example, if a frequency score less than 6 exists
11+
# then there is a likelihood that something malicious is happening.
12+
#
13+
# For higher accuracy, please generate your own frequency tables. For questions on setup,
14+
# please refer to https://github.com/SMAPPER
15+
if [virtual_host]{
16+
if [sub_domain] and [sub_domain_length] > 5 {
17+
mutate {
18+
add_field => { "freq_virtual_host" => "%{virtual_host}" }
19+
}
20+
mutate {
21+
gsub => [ "freq_virtual_host", "\W", "" ]
22+
}
23+
rest {
24+
request => {
25+
url => "http://localhost:10002/measure/%{freq_virtual_host}"
26+
}
27+
sprintf => true
28+
target => "virtual_host_frequency_score"
29+
}
30+
mutate {
31+
remove_field => [ "freq_virtual_host" ]
32+
}
33+
}
34+
if [virtual_host_frequency_score] {
35+
mutate {
36+
convert => [ "virtual_host_frequency_score", "float" ]
37+
add_field => { "frequency_scores" => "%{virtual_host_frequency_score}" }
38+
}
39+
}
40+
}
41+
mutate {
42+
#add_tag => [ "conf_file_8503"]
43+
}
44+
}
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Author: Justin Henderson
2+
# SANS Instructor and author of SANS SEC555: SIEM and Tactical Analytics
3+
4+
# Last Update: 12/9/2016
5+
6+
filter {
7+
if [type] == "bro_ssl" {
8+
# If CHANGE_ME exists run a frequency analysis against it. In order for this to work you must have
9+
# freq.py and the corresponding frequency table in /opt/freq/. This is a huge boost to security
10+
# and I highly recommend you set this up. Example, if a frequency score less than 6 exists
11+
# then there is a likelihood that something malicious is happening.
12+
#
13+
# For higher accuracy, please generate your own frequency tables. For questions on setup,
14+
# please refer to https://github.com/SMAPPER
15+
if [server_name] {
16+
mutate {
17+
add_field => { "freq_common_name" => "%{server_name}" }
18+
}
19+
mutate {
20+
gsub => [ "freq_common_name", "\W", "" ]
21+
}
22+
rest {
23+
request => {
24+
url => "http://localhost:10004/measure/%{freq_common_name}"
25+
}
26+
sprintf => true
27+
target => "server_name_frequency_score"
28+
}
29+
mutate {
30+
remove_field => [ "freq_common_name" ]
31+
}
32+
if [server_name_frequency_score] {
33+
mutate {
34+
convert => [ "server_name_frequency_score", "float" ]
35+
add_field => { "frequency_scores" => "%{server_name_frequency_score}" }
36+
}
37+
}
38+
}
39+
if [issuer_common_name] {
40+
mutate {
41+
add_field => { "freq_common_name" => "%{issuer_common_name}" }
42+
}
43+
mutate {
44+
gsub => [ "freq_common_name", "\W", "" ]
45+
}
46+
rest {
47+
request => {
48+
url => "http://localhost:10004/measure/%{freq_common_name}"
49+
}
50+
sprintf => true
51+
target => "issuer_common_name_frequency_score"
52+
}
53+
mutate {
54+
remove_field => [ "freq_common_name" ]
55+
}
56+
if [issuer_common_name_frequency_score] {
57+
mutate {
58+
convert => [ "issuer_common_name_frequency_score", "float" ]
59+
add_field => { "frequency_scores" => "%{issuer_common_name_frequency_score}" }
60+
}
61+
}
62+
}
63+
if [certificate_common_name] {
64+
mutate {
65+
add_field => { "freq_common_name" => "%{certificate_common_name}" }
66+
}
67+
mutate {
68+
gsub => [ "freq_common_name", "\W", "" ]
69+
}
70+
rest {
71+
request => {
72+
url => "http://localhost:10004/measure/%{freq_common_name}"
73+
}
74+
sprintf => true
75+
target => "certificate_common_name_frequency_score"
76+
}
77+
mutate {
78+
remove_field => [ "freq_common_name" ]
79+
}
80+
if [certificate_common_name_frequency_score] {
81+
mutate {
82+
convert => [ "certificate_common_name_frequency_score", "float" ]
83+
add_field => { "frequency_scores" => "%{certificate_common_name_frequency_score}" }
84+
}
85+
}
86+
}
87+
mutate {
88+
#add_tag => [ "conf_file_8504"]
89+
}
90+
}
91+
}

0 commit comments

Comments
 (0)