-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Curator to HELK build, added email alerts to Elastalert, exposed ES port to host #352
Open
NEUR0515
wants to merge
19
commits into
Cyb3rWard0g:master
Choose a base branch
from
NEUR0515:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
267be30
Update helk-kibana-analysis-basic.yml
NEUR0515 2fca673
Update helk-kibana-analysis-alert-basic.yml
NEUR0515 f71965b
Update helk-kibana-analysis-alert-trial.yml
NEUR0515 a794662
Update helk-kibana-notebook-analysis-alert-basic.yml
NEUR0515 4955330
Update helk-kibana-analysis-trial.yml
NEUR0515 a9efc60
Update helk-kibana-notebook-analysis-basic.yml
NEUR0515 0d5dbb9
Update helk-kibana-notebook-analysis-trial.yml
NEUR0515 4dea56d
Update helk_powershell_susp_ps_commands.yml
NEUR0515 5c7cbd3
Merged HELK-CUSTOM with HELK
NEUR0515 69a70fa
Added defaults for PR
NEUR0515 dfb5d44
Fixed Typo in Readme, Changed license in Curator
NEUR0515 19b4513
Added ES URL to final information
NEUR0515 9d85a1e
Added Curator to Architecture-Overview
NEUR0515 5326d4e
Added Curator Reference
NEUR0515 10f36e0
Removed local Wiki from fork
NEUR0515 c82c11e
Added ELASTIC_PASSWORD var to Curator
NEUR0515 2eea87f
Updated Curator container version
NEUR0515 2ab14b9
Amended helk-curator-cron
NEUR0515 6d7e954
Amended helk-curator-cron
NEUR0515 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# HELK script: HELK Curator Dockerfile | ||
# HELK build Stage: Alpha | ||
# Author: Ashlee Jones (@AshleeJones04) | ||
# License: GPL-3.0 | ||
|
||
# References: | ||
# https://github.com/elastic/curator | ||
|
||
FROM cyb3rward0g/helk-base:0.0.3 | ||
LABEL maintainer="Roberto Rodriguez @Cyb3rWard0g" | ||
LABEL description="Dockerfile base for the HELK Curator." | ||
|
||
ENV CURATOR_GID=934 | ||
ENV CURATOR_UID=934 | ||
ENV CURATOR_USER=curatoruser | ||
ENV CURATOR_HOME=/usr/share/curator | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# *********** Installing Prerequisites *************** | ||
# -qq : No output except for errors | ||
RUN apt-get update -qq && apt-get install -qqy --no-install-recommends \ | ||
libmagic-dev \ | ||
build-essential \ | ||
python3-setuptools \ | ||
git \ | ||
python3-pip \ | ||
python3-dev \ | ||
tzdata \ | ||
nano \ | ||
cron \ | ||
# ********* Clean **************************** | ||
&& apt-get -qy clean \ | ||
autoremove \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
# ********* Install Curator ************** | ||
&& bash -c 'mkdir -pv /usr/share/curator' \ | ||
&& cd ${CURATOR_HOME} \ | ||
&& wget https://raw.githubusercontent.com/elastic/curator/master/requirements.txt \ | ||
&& pip3 install wheel \ | ||
&& pip3 install -r requirements.txt \ | ||
&& pip3 install elasticsearch-curator | ||
|
||
# ********* Copy Curator files and setup cron ************** | ||
COPY actions.yaml ${CURATOR_HOME}/ | ||
COPY curator.yml ${CURATOR_HOME}/ | ||
COPY helk-curator-cron /etc/cron.d/helk-curator-cron | ||
RUN chmod 0644 /etc/cron.d/helk-curator-cron | ||
RUN crontab /etc/cron.d/helk-curator-cron | ||
RUN touch /var/log/helk-curator-cron.log | ||
|
||
|
||
# *********** RUN Curator *************** | ||
WORKDIR ${CURATOR_HOME} | ||
#ENTRYPOINT ["./curator-entrypoint.sh"] | ||
#CMD ["curator","--config","/usr/share/curator/curator.yml","/usr/share/curator/actions.yaml"] | ||
CMD cron && tail -f /var/log/helk-curator-cron.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
--- | ||
# Remember, leave a key empty if there is no value. None will be a string, | ||
# not a Python "NoneType" | ||
# | ||
# Also remember that all examples have 'disable_action' set to True. If you | ||
# want to use this action as a template, be sure to set this to False after | ||
# copying it. | ||
actions: | ||
1: | ||
action: delete_indices | ||
description: >- | ||
Delete indices older than 7 days (based on index name), for winlogbeat- | ||
prefixed indices. Ignore the error if the filter does not result in an | ||
actionable list of indices (ignore_empty_list) and exit cleanly. | ||
options: | ||
ignore_empty_list: True | ||
timeout_override: | ||
continue_if_exception: False | ||
disable_action: False | ||
filters: | ||
- filtertype: pattern | ||
kind: prefix | ||
value: logs-endpoint-winevent- | ||
exclude: | ||
- filtertype: age | ||
source: name | ||
direction: older | ||
timestring: '%Y.%m.%d' | ||
unit: days | ||
unit_count: 7 | ||
exclude: | ||
2: | ||
action: delete_indices | ||
description: >- | ||
Delete indices older than 7 days (based on index name), for filebeat- | ||
prefixed indices. Ignore the error if the filter does not result in an | ||
actionable list of indices (ignore_empty_list) and exit cleanly. | ||
options: | ||
ignore_empty_list: True | ||
timeout_override: | ||
continue_if_exception: False | ||
disable_action: False | ||
filters: | ||
- filtertype: pattern | ||
kind: prefix | ||
value: winlogbeat- | ||
exclude: | ||
- filtertype: age | ||
source: name | ||
direction: older | ||
timestring: '%Y.%m.%d' | ||
unit: days | ||
unit_count: 7 | ||
exclude: | ||
3: | ||
action: delete_indices | ||
description: >- | ||
Delete indices older than 7 days (based on index name), for packetbeat- | ||
prefixed indices. Ignore the error if the filter does not result in an | ||
actionable list of indices (ignore_empty_list) and exit cleanly. | ||
options: | ||
ignore_empty_list: True | ||
timeout_override: | ||
continue_if_exception: False | ||
disable_action: False | ||
filters: | ||
- filtertype: pattern | ||
kind: prefix | ||
value: .monitoring-kibana- | ||
exclude: | ||
- filtertype: age | ||
source: name | ||
direction: older | ||
timestring: '%Y.%m.%d' | ||
unit: days | ||
unit_count: 7 | ||
exclude: | ||
4: | ||
action: delete_indices | ||
description: >- | ||
Delete indices older than 7 days (based on index name), for metricbeat- | ||
prefixed indices. Ignore the error if the filter does not result in an | ||
actionable list of indices (ignore_empty_list) and exit cleanly. | ||
options: | ||
ignore_empty_list: True | ||
timeout_override: | ||
continue_if_exception: False | ||
disable_action: False | ||
filters: | ||
- filtertype: pattern | ||
kind: prefix | ||
value: mitre-attack- | ||
exclude: | ||
- filtertype: age | ||
source: name | ||
direction: older | ||
timestring: '%Y.%m.%d' | ||
unit: days | ||
unit_count: 7 | ||
exclude: | ||
5: | ||
action: delete_indices | ||
description: >- | ||
Delete indices older than 7 days (based on index name), for metricbeat- | ||
prefixed indices. Ignore the error if the filter does not result in an | ||
actionable list of indices (ignore_empty_list) and exit cleanly. | ||
options: | ||
ignore_empty_list: True | ||
timeout_override: | ||
continue_if_exception: False | ||
disable_action: False | ||
filters: | ||
- filtertype: pattern | ||
kind: prefix | ||
value: .monitoring-logstash- | ||
exclude: | ||
- filtertype: age | ||
source: name | ||
direction: older | ||
timestring: '%Y.%m.%d' | ||
unit: days | ||
unit_count: 7 | ||
exclude: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
# Remember, leave a key empty if there is no value. None will be a string, | ||
# not a Python "NoneType" | ||
client: | ||
hosts: | ||
- localhost | ||
port: 9200 | ||
url_prefix: | ||
use_ssl: False | ||
certificate: | ||
client_cert: | ||
client_key: | ||
ssl_no_validate: False | ||
http_auth: | ||
timeout: 30 | ||
master_only: False | ||
|
||
logging: | ||
loglevel: INFO | ||
logfile: | ||
logformat: default | ||
blacklist: ['elasticsearch', 'urllib3'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
0 0 * * * /usr/local/bin/curator --config /usr/share/curator/curator.yml /usr/share/curator/actions.yaml >> /var/log/helk-curator-cron.log 2>&1 | ||
# An empty line is required at the end of this file for a valid cron file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects potential suspicious powershell parameters | ||
filter: | ||
- query: | ||
|
@@ -10,4 +18,4 @@ name: Windows-Suspicious-Powershell-commands_0 | |
priority: 2 | ||
realert: | ||
minutes: 0 | ||
type: any | ||
type: any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects potential DCSync backdoor user | ||
filter: | ||
- query: | ||
|
@@ -10,4 +18,4 @@ name: Windows-DCSync-backdoor-user_0 | |
priority: 2 | ||
realert: | ||
minutes: 0 | ||
type: any | ||
type: any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects potential DCSync from non-dcs | ||
filter: | ||
- query: | ||
|
@@ -10,4 +18,4 @@ name: Windows-dcsync-non-dc_0 | |
priority: 2 | ||
realert: | ||
minutes: 0 | ||
type: any | ||
type: any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects potential use of rubeus via the trusted logon process | ||
filter: | ||
- query: | ||
|
@@ -10,4 +18,4 @@ name: Windows-Rubeus-logon-process_0 | |
priority: 2 | ||
realert: | ||
minutes: 0 | ||
type: any | ||
type: any |
8 changes: 8 additions & 0 deletions
8
docker/helk-elastalert/rules/helk_security_share_chrome_pipe.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects suspicious use the common chrome named pipe | ||
filter: | ||
- query: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects suspicious bits activity | ||
filter: | ||
- query: | ||
|
8 changes: 8 additions & 0 deletions
8
docker/helk-elastalert/rules/helk_sysmon_cmdline_file_creation.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects cmdline files being created on victim | ||
filter: | ||
- query: | ||
|
8 changes: 8 additions & 0 deletions
8
docker/helk-elastalert/rules/helk_sysmon_cobalt_strike_msagent.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects potential use of named pipes by Cobalt Strike agents | ||
filter: | ||
- query: | ||
|
8 changes: 8 additions & 0 deletions
8
docker/helk-elastalert/rules/helk_sysmon_cs_rundll32_network.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
alert: | ||
- debug | ||
email: | ||
- "[email protected]" | ||
smtp_host: "smtp.outlook.com" #for O365 email addresses | ||
smtp_port: 587 #for O365 email addresses | ||
smtp_ssl: true | ||
from_addr: "[email protected]" | ||
smtp_auth_file: "/etc/elastalert/smtp_auth_file.yaml" | ||
description: Detects potential use of CS with rundll32 calling out | ||
filter: | ||
- query: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this remain
helk-elasticsearch
?