Skip to content

Commit

Permalink
Merged small improvements into search command
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Bareiss committed Dec 19, 2019
2 parents f645dae + 1a085b3 commit f742c02
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/search_head/tasks/install_asx_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url: "https://127.0.0.1:8089/services/apps/local"
method: POST
user: "admin"
password: "{{ splunk_pass }}"
password: "{{ splunk_admin_password }}"
validate_certs: false
body: "name=/tmp/asx_app.tgz&update=true&filename=true"
headers:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/search_head/tasks/install_cim_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url: "https://127.0.0.1:8089/services/apps/local"
method: POST
user: "admin"
password: "{{ splunk_pass }}"
password: "{{ splunk_admin_password }}"
validate_certs: false
body: "name=/tmp/cim_app.tgz&update=true&filename=true"
headers:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/search_head/tasks/install_escu_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url: "https://127.0.0.1:8089/services/apps/local"
method: POST
user: "admin"
password: "{{ splunk_pass }}"
password: "{{ splunk_admin_password }}"
validate_certs: false
body: "name=/tmp/escu_app.tgz&update=true&filename=true"
headers:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/search_head/tasks/install_stream_app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url: "https://127.0.0.1:8089/services/apps/local"
method: POST
user: "admin"
password: "{{ splunk_pass }}"
password: "{{ splunk_admin_password }}"
validate_certs: false
body: "name=/tmp/stream_app.tgz&update=true&filename=true"
headers:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/search_head/tasks/install_sysmon_ta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url: "https://127.0.0.1:8089/services/apps/local"
method: POST
user: "admin"
password: "{{ splunk_pass }}"
password: "{{ splunk_admin_password }}"
validate_certs: false
body: "name=/tmp/sysmon_ta.tgz&update=true&filename=true"
headers:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/search_head/tasks/install_windows_ta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
url: "https://127.0.0.1:8089/services/apps/local"
method: POST
user: "admin"
password: "{{ splunk_pass }}"
password: "{{ splunk_admin_password }}"
validate_certs: false
body: "name=/tmp/windows_ta.tgz&update=true&filename=true"
headers:
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/search_head/tasks/splunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
- name: accept license and start splunk
tags:
- install
shell: /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd {{splunk_pass}}
shell: /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd {{splunk_admin_password}}
become: yes
become_user: splunk
when: splunk_path.stat.exists == false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- name: Install Splunk_UF MSI
win_package:
path: C:\splunkuf.msi
arguments: 'WINEVENTLOG_SEC_ENABLE=0 WINEVENTLOG_SYS_ENABLE=0 WINEVENTLOG_APP_ENABLE=0 SPLUNKPASSWORD={{ splunk_pass }} RECEIVING_INDEXER="{{ splunk_indexer_ip }}:9997" AGREETOLICENSE=YES /quiet'
arguments: 'WINEVENTLOG_SEC_ENABLE=0 WINEVENTLOG_SYS_ENABLE=0 WINEVENTLOG_APP_ENABLE=0 SPLUNKPASSWORD={{ splunk_admin_password }} RECEIVING_INDEXER="{{ splunk_indexer_ip }}:9997" AGREETOLICENSE=YES /quiet'

- name: Start Splunk
win_service:
Expand Down
8 changes: 4 additions & 4 deletions ansible/vars/vars.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Variables for Splunk Search Head
splunk_url: https://www.splunk.com/page/download_track?file=7.3.2/linux/splunk-7.3.2-c60db69f8e32-Linux-x86_64.tgz&ac=&wget=true&name=wget&platform=Linux&architecture=x86_64&version=7.3.2&product=splunk&typed=release
splunk_binary: splunk-7.3.2-c60db69f8e32-Linux-x86_64.tgz
splunk_pass: changeme
splunk_admin_password: changeme

# Apps
sysmon: true
Expand All @@ -12,12 +12,12 @@ splunk_uf_win_url: https://www.splunk.com/page/download_track?file=7.3.2/windows

# Apps and TAs
s3_bucket_url: https://attack-range-appbinaries.s3-us-west-2.amazonaws.com
splunk_windows_ta: splunk-add-on-for-microsoft-windows_600.tgz
splunk_sysmon_ta: add-on-for-microsoft-sysmon_800.tgz
splunk_windows_ta: splunk-add-on-for-microsoft-windows_700.tgz
splunk_sysmon_ta: add-on-for-microsoft-sysmon_810.tgz
splunk_stream_ta: Splunk_TA_stream.zip
splunk_stream_app: splunk-stream_713.tgz
splunk_cim_app: splunk-common-information-model-cim_4130.tgz
splunk_escu_app: DA-ESS-ContentUpdate-v1.0.41.tar.gz
splunk_escu_app: splunk-es-content-update_1046.tgz
splunk_asx_app: Splunk_Analytic_Story_Execution-latest.tar.gz

#Variables for Firedrill
Expand Down
2 changes: 1 addition & 1 deletion ansible/vars/vars.yml.default
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Variables for Splunk Search Head
splunk_url: https://www.splunk.com/page/download_track?file=7.3.2/linux/splunk-7.3.2-c60db69f8e32-Linux-x86_64.tgz&ac=&wget=true&name=wget&platform=Linux&architecture=x86_64&version=7.3.2&product=splunk&typed=release
splunk_binary: splunk-7.3.2-c60db69f8e32-Linux-x86_64.tgz
splunk_pass: changeme
splunk_admin_password: changeme

# Apps
sysmon: true
Expand Down
6 changes: 3 additions & 3 deletions attack_range.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ splunk_binary = splunk-7.3.2-c60db69f8e32-Linux-x86_64.tgz

# s3 bucket where the Splunk TA's are located
s3_bucket_url = https://attack-range-appbinaries.s3-us-west-2.amazonaws.com
splunk_windows_ta = splunk-add-on-for-microsoft-windows_600.tgz
splunk_sysmon_ta = add-on-for-microsoft-sysmon_800.tgz
splunk_windows_ta = splunk-add-on-for-microsoft-windows_700.tgz
splunk_sysmon_ta = add-on-for-microsoft-sysmon_810.tgz
splunk_stream_ta = Splunk_TA_stream.zip
splunk_stream_app = splunk-stream_713.tgz
splunk_cim_app = splunk-common-information-model-cim_4130.tgz
splunk_escu_app = DA-ESS-ContentUpdate-v1.0.41.tar.gz
splunk_escu_app = splunk-es-content-update_1046.tgz
splunk_asx_app = Splunk_Analytic_Story_Execution-latest.tar.gz


Expand Down
2 changes: 1 addition & 1 deletion attack_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def prep_ansible(settings):
# Replace the ansible variables
ansiblevars = re.sub(r'domain_admin_password: .+', 'domain_admin_password: ' + str(settings['win_password']),
ansiblevars, re.M)
ansiblevars = re.sub(r'splunk_pass: .+', 'splunk_pass: ' + str(settings['splunk_admin_password']),
ansiblevars = re.sub(r'splunk_admin_password: .+', 'splunk_admin_password: ' + str(settings['splunk_admin_password']),
ansiblevars, re.M)
ansiblevars = re.sub(r's3_bucket_url: .+', 's3_bucket_url: ' + str(settings['s3_bucket_url']),
ansiblevars, re.M)
Expand Down
9 changes: 4 additions & 5 deletions default/attack_range.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,18 @@ win_password = myTempPassword123
private_key_path = ~/.ssh/id_rsa

[splunk_settings]
splunk_admin_password = changeme
splunk_url = https://www.splunk.com/page/download_track?file=7.3.2/linux/splunk-7.3.2-c60db69f8e32-Linux-x86_64.tgz&ac=&wget=true&name=wget&platform=Linux&architecture=x86_64&version=7.3.2&product=splunk&typed=release
splunk_binary = splunk-7.3.2-c60db69f8e32-Linux-x86_64.tgz
splunk_pass = changeme

# s3 bucket where the Splunk TA's are located
s3_bucket_url = https://attack-range-appbinaries.s3-us-west-2.amazonaws.com
splunk_admin_password = changeme
splunk_windows_ta = splunk-add-on-for-microsoft-windows_600.tgz
splunk_sysmon_ta = add-on-for-microsoft-sysmon_800.tgz
splunk_windows_ta = splunk-add-on-for-microsoft-windows_700.tgz
splunk_sysmon_ta = add-on-for-microsoft-sysmon_810.tgz
splunk_stream_ta = Splunk_TA_stream.zip
splunk_stream_app = splunk-stream_713.tgz
splunk_cim_app = splunk-common-information-model-cim_4130.tgz
splunk_escu_app = DA-ESS-ContentUpdate-v1.0.41.tar.gz
splunk_escu_app = splunk-es-content-update_1046.tgz
splunk_asx_app = Splunk_Analytic_Story_Execution-latest.tar.gz


Expand Down
6 changes: 5 additions & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ resource "aws_eip" "splunk_ip" {
instance = aws_instance.splunk-server.id
}


resource "aws_ebs_volume" "win2016_volume" {
availability_zone = "us-west-2a"
size = 50

}


Expand Down Expand Up @@ -132,6 +132,10 @@ EOF

}

resource "aws_eip" "windows_server_ip" {
instance = aws_instance.windows_2016_dc.id
}


output "splunk_server" {
value = "http://${aws_eip.splunk_ip.public_ip}:8000"
Expand Down

0 comments on commit f742c02

Please sign in to comment.