diff --git a/Vagrant/Vagrantfile b/Vagrant/Vagrantfile index f6a0fb1..4688a1a 100644 --- a/Vagrant/Vagrantfile +++ b/Vagrant/Vagrantfile @@ -43,8 +43,6 @@ Vagrant.configure("2") do |config| cfg.vm.provision "shell", path: "scripts/provision.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/download_palantir_wef.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/download_palantir_osquery.ps1", privileged: false - cfg.vm.provision "shell", path: "scripts/install-splunkuf.ps1", privileged: false - cfg.vm.provision "shell", path: "scripts/install-inputsconf.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-utilities.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-redteam.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-choco-extras.ps1", privileged: false @@ -101,7 +99,6 @@ Vagrant.configure("2") do |config| cfg.vm.provision "shell", path: "scripts/install-wefsubscriptions.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-splunkuf.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-windows_ta.ps1", privileged: false - cfg.vm.provision "shell", path: "scripts/install-inputsconf.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-utilities.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-redteam.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-choco-extras.ps1", privileged: false @@ -151,12 +148,10 @@ Vagrant.configure("2") do |config| cfg.vm.provision "shell", path: "scripts/download_palantir_wef.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/download_palantir_osquery.ps1", privileged: false cfg.vm.provision "shell", inline: 'wevtutil el | Select-String -notmatch "Microsoft-Windows-LiveId" | Foreach-Object {wevtutil cl "$_"}', privileged: false - cfg.vm.provision "shell", path: "scripts/install-splunkuf.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-utilities.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-redteam.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-choco-extras.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-osquery.ps1", privileged: false - cfg.vm.provision "shell", path: "scripts/install-inputsconf.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-sysinternals.ps1", privileged: false cfg.vm.provision "shell", path: "scripts/install-autorunstowineventlog.ps1", privileged: false diff --git a/Vagrant/bootstrap.sh b/Vagrant/bootstrap.sh index b6f2a3e..a26116d 100644 --- a/Vagrant/bootstrap.sh +++ b/Vagrant/bootstrap.sh @@ -6,6 +6,7 @@ echo "apt-fast apt-fast/dlflag boolean true" | debconf-set-selections; sed -i "2ideb mirror://mirrors.ubuntu.com/mirrors.txt xenial main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-updates main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-backports main restricted universe multiverse\ndeb mirror://mirrors.ubuntu.com/mirrors.txt xenial-security main restricted universe multiverse" /etc/apt/sources.list apt_install_prerequisites() { + echo "[$(date +%H:%M:%S)]: Adding apt repositories..." # Add repository for apt-fast add-apt-repository -y ppa:apt-fast/stable # Add repository for yq @@ -22,6 +23,18 @@ apt_install_prerequisites() { apt-fast -qq install -y jq whois build-essential git docker docker-compose unzip htop yq } +modify_motd() { + echo "[$(date +%H:%M:%S)]: Updating the MOTD..." + # Force color terminal + sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/g' /root/.bashrc + sed -i 's/#force_color_prompt=yes/force_color_prompt=yes/g' /home/vagrant/.bashrc + # Remove some stock Ubuntu MOTD content + chmod -x /etc/update-motd.d/10-help-text + # Copy the DetectionLab MOTD + cp /vagrant/resources/logger/20-detectionlab /etc/update-motd.d/ + chmod +x /etc/update-motd.d/20-detectionlab +} + test_prerequisites() { for package in jq whois build-essential git docker docker-compose unzip yq do @@ -453,6 +466,7 @@ postinstall_tasks() { main() { apt_install_prerequisites + modify_motd test_prerequisites fix_eth1_static_ip install_splunk diff --git a/Vagrant/resources/logger/20-detectionlab b/Vagrant/resources/logger/20-detectionlab new file mode 100644 index 0000000..dda4277 --- /dev/null +++ b/Vagrant/resources/logger/20-detectionlab @@ -0,0 +1,71 @@ +#! /bin/sh + +txtred='\033[1;31m' +txtcyan='\033[1;36m' +txtblue='\033[1;34m' +txtwhite='\033[1;37m' +reset='\033[1;0m' + +cat << EOM +$(echo "${txtwhite} +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%${txtcyan}(((((((((((${txtwhite}@@@@${txtcyan}(((((((((((${txtwhite}#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#${txtcyan}((((((((((((${txtwhite}@@@@@@@@#${txtcyan}((((((((((((&${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtcyan}&((((((((((((${txtwhite}#@@@@@@@@@@@@@@${txtcyan}&((((((((((((%${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtcyan}(((((((((((((${txtwhite}@@@@@@@@@@@@@@@@@@@@@@#${txtcyan}((((((((((((&${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtcyan}((((((((%${txtwhite}@@@@@@@@@@${txtred}&%#((#%&${txtwhite}@@@@@@@@@@${txtcyan}&((((((((&${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtcyan}((${txtwhite}@@@@@@@@@${txtred}&(((((#%&&%#(((((${txtwhite}#@@@@@@@@@#${txtcyan}(${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}(${txtwhite}@@@@@@@@@@@@@@@@@@@${txtred}(((&${txtwhite}@@@@@@@@@@@@@@@${txtred}(((&${txtwhite}@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,&${txtwhite}@@@@@@@@@@@@@${txtred}((&${txtwhite}@@@@#${txtred}(((((((((((${txtwhite}@@@@@${txtred}((%${txtwhite}@@@@@@@@@@@@@${txtblue}*,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,,,%${txtwhite}@@@@@@@@@@@@@@${txtred}&(((((((((((((((((${txtwhite}@@@@@@@@@@@@@@${txtblue}&,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,,,,,&${txtwhite}@@@@@@@@@@@@@#${txtred}(((((((((((((((&${txtwhite}@@@@@@@@@@@@@${txtblue},,,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,,,,,${txtwhite}&@${txtblue},,*${txtwhite}@@@@@@@@@@@@${txtred}((((((((((&${txtwhite}@@@@@@@@@@@%${txtblue},,${txtwhite}@@${txtblue},,,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&${txtblue},,,,,,${txtwhite}&@${txtblue},,,,,${txtwhite}*@@@@@@@@@@@@${txtred}((((&${txtwhite}@@@@@@@@@@@/${txtblue},,,,,${txtwhite}@@${txtblue},,,,,,%${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,${txtwhite}&@@/${txtblue},,${txtwhite}&@${txtblue},,,,,,,,${txtwhite}%@@@@@@@@@@@@@@@@@@@@@@&${txtblue},,,,,,,,${txtwhite}@@${txtblue},,*${txtwhite}@@@${txtblue},,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,,${txtwhite}&@@@@${txtblue},,,,,,,,${txtwhite}%@${txtblue},,${txtwhite}(@@@@@@@@@@@@@@%${txtblue},,${txtwhite}@&${txtblue},,,,,,,,${txtwhite}@@@@@*${txtblue},,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,,,,,${txtwhite}&@@${txtblue}%,,,,,,${txtwhite}%@${txtblue},,,,,/${txtwhite}@@@@@@@@${txtblue}(,,,,,${txtwhite}@&${txtblue},,,,,,/${txtwhite}@@@${txtblue},,,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,,,,,${txtwhite}&@,/@@&${txtblue},,,${txtwhite}%@${txtblue},,,,,,,,${txtwhite}@@@@${txtblue},,,,,,,,${txtwhite}@&${txtblue},,,${txtwhite}#@@%,${txtwhite}@@${txtblue},,,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#${txtblue},,,,,,${txtwhite}&@${txtblue},,,,,${txtwhite}&@@&@${txtblue},,,,,,,,${txtwhite}@@@@${txtblue},,,,,,,,${txtwhite}@@@@@*${txtblue},,,,${txtwhite}@@${txtblue},,,,,,(${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,${txtwhite}(@@&${txtblue},,,${txtwhite}&@${txtblue},,,,,,,,${txtwhite}&@@#${txtblue},,,,,,${txtwhite}@@@@${txtblue},,,,,,/${txtwhite}@@@${txtblue},,,,,,,,${txtwhite}@@${txtblue},,,(${txtwhite}@@#${txtblue},,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}*,,,,${txtwhite}*@@&&@${txtblue},,,,,,,,${txtwhite}%@${txtblue},(${txtwhite}@@%${txtblue},,,${txtwhite}@@@@${txtblue},,,(${txtwhite}@@&${txtblue},${txtwhite}@&${txtblue},,,,,,,,${txtwhite}@@%@@#${txtblue},,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}*,,,,,,,*${txtwhite}@@@${txtblue}*,,,,,,${txtwhite}%@${txtblue},,,,(${txtwhite}@@&@@@@%@@#${txtblue},,,,${txtwhite}@&${txtblue},,,,,,,${txtwhite}@@@${txtblue}/,,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}*,,,,,,,,${txtwhite}&@,&@@${txtblue}/,,,${txtwhite}%@${txtblue},,,,,,,${txtwhite}*@@@@${txtblue}/,,,,,,,${txtwhite}@&${txtblue},,,*${txtwhite}@@@${txtblue},${txtwhite}@@${txtblue},,,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}#,,,,,,,${txtwhite}&@${txtblue},,,,${txtwhite}(@@&%@${txtblue},,,,,,,,${txtwhite}&@@@${txtblue},,,,,,,,${txtwhite}@&#@@%${txtblue},,,,${txtwhite}@@${txtblue},,,,,,,/${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}&,,,,${txtwhite}&@${txtblue},,,,,,,*${txtwhite}@@@${txtblue}*,,,,,,${txtwhite}&@@@${txtblue},,,,,,,${txtwhite}%@@(${txtblue},,,,,,,${txtwhite}@@${txtblue},,,,(${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}&,${txtwhite}&@${txtblue},,,,,,,,%${txtwhite}@,@@@*${txtblue},,,${txtwhite}&@@@${txtblue},,,,${txtwhite}&@@/@&${txtblue},,,,,,,,${txtwhite}@@${txtblue},${txtwhite}%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}*,,,,,,,${txtwhite}%@${txtblue},,,,${txtwhite}&@@/&@@@*@@@*${txtblue},,,${txtwhite}@&${txtblue},,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}%,,,,${txtwhite}#@${txtblue},,,,,,,${txtwhite}/@@@@#${txtblue},,,,,,,${txtwhite}@&${txtblue},,,,/${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue}%,${txtwhite}#@${txtblue},,,,,,,,${txtwhite}&@@@${txtblue},,,,,,,,${txtwhite}@&${txtblue}${txtwhite},#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,,,,${txtwhite}&@@@${txtblue},,,,,,,,${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@${txtblue},,,,,${txtwhite}&@@@${txtblue},,,,,&${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@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(#&${txtwhite}@@@@@@${txtblue}&${txtwhite}@@@@@@@@${txtblue}&${txtwhite}@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@${txtblue},&${txtwhite}@@@@${txtblue}/,/${txtwhite}@@@${txtblue}(,${txtwhite}@@@@@@@@@@@@${txtblue},%${txtwhite}@@@@@${txtblue},(${txtwhite}@@@@@@@@@${txtblue}(,/${txtwhite}@@@@${txtblue}(,(${txtwhite}@@@@${txtblue}%,${txtwhite}@@@@@${txtblue}&,${txtwhite}@@@@${txtblue},,&${txtwhite}@@@@${txtblue},,${txtwhite}@@@@${txtblue},,*${txtwhite}@@@@@${txtblue}#,${txtwhite}@@@${txtcyan}((${txtwhite}@@@@@@@@@@@${txtcyan}(((%${txtwhite}@@@@@${txtcyan}((%%%%${txtcyan}(((${txtwhite}@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@${txtblue},&${txtwhite}@@@@@@${txtblue}/,${txtwhite}@@${txtblue}(,${txtwhite}@@@@@@@@@@@@${txtblue},%${txtwhite}@@@@@${txtblue},(${txtwhite}@@@@@@@@${txtblue}*,${txtwhite}@@@@@@@@@@@@@${txtblue}%,${txtwhite}@@@@@${txtblue}&,${txtwhite}@@@${txtblue},#${txtwhite}@@@@@@@${txtblue}&,%${txtwhite}@@${txtblue},&*,${txtwhite}@@@@${txtblue}#,${txtwhite}@@@${txtcyan}((${txtwhite}@@@@@@@@@@${txtcyan}((${txtwhite}@${txtcyan}((&${txtwhite}@@@@${txtcyan}(#${txtwhite}@@@@@${txtcyan}((${txtwhite}@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@${txtblue},&${txtwhite}@@@@@@@${txtblue},#${txtwhite}@${txtblue}(,,,,,,,(${txtwhite}@@@@@${txtblue},%${txtwhite}@@@@@${txtblue},,,,,,,,${txtwhite}@@${txtblue},%${txtwhite}@@@@@@@@@@@@@${txtblue}%,${txtwhite}@@@@@${txtblue}&,${txtwhite}@@${txtblue}(,${txtwhite}@@@@@@@@@${txtblue}*,${txtwhite}@@${txtblue},&${txtwhite}@${txtblue}&,/${txtwhite}@@${txtblue}#,${txtwhite}@@@${txtcyan}((${txtwhite}@@@@@@@@@${txtcyan}((${txtwhite}@@@${txtcyan}((${txtwhite}@@@@${txtcyan}((((((((${txtwhite}@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@${txtblue},&${txtwhite}@@@@@@${txtblue}%,&${txtwhite}@${txtblue}(,${txtwhite}@@@@@@@@@@@@${txtblue},%${txtwhite}@@@@@${txtblue},(${txtwhite}@@@@@@@@${txtblue},/${txtwhite}@@@@@@@@@@@@@${txtblue}%,${txtwhite}@@@@@${txtblue}&,${txtwhite}@@${txtblue}%,${txtwhite}@@@@@@@@@${txtblue},/${txtwhite}@@${txtblue},&${txtwhite}@@@${txtblue}/,&#,${txtwhite}@@@${txtcyan}((${txtwhite}@@@@@@@@${txtcyan}#(#${txtwite}&&&&${txtcyan}((${txtwhite}@@@${txtcyan}(#${txtwhite}@@@@@${txtcyan}((${txtwhite}@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@${txtblue},&${txtwhite}@@@@@${txtblue}(,%${txtwhite}@@${txtblue}(,${txtwhite}@@@@@@@@@@@@${txtblue},%${txtwhite}@@@@@${txtblue},(${txtwhite}@@@@@@@@@${txtblue},*${txtwhite}@@@@@@${txtblue}/%${txtwhite}@@@@${txtblue}%,${txtwhite}@@@@@${txtblue}&,${txtwhite}@@@${txtblue}/,&${txtwhite}@@@@@@${txtblue},*${txtwhite}@@@${txtblue},&${txtwhite}@@@@@${txtblue},*,${txtwhite}@@@${txtcyan}((${txtwhite}@@@@@@@${txtcyan}%((${txtwhite}&&&&&${txtcyan}%((${txtwhite}@@${txtcyan}(#${txtwhite}@@@@@${txtcyan}((${txtwhite}@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@${txtblue},,,,,,*${txtwhite}@@@@@${txtblue}(,,,,,,,*${txtwhite}@@@@@${txtblue},%${txtwhite}@@@@@${txtblue},,,,,,,,${txtwhite}@@@@@${txtblue}*,,,,,&${txtwhite}@@@@@${txtblue}%,${txtwhite}@@@@@${txtblue}&,${txtwhite}@@@@@${txtblue}(,,,,,/${txtwhite}@@@@@${txtblue},&${txtwhite}@@@@@@${txtblue},,${txtwhite}@@@${txtcyan}((((((((${txtwhite}&${txtcyan}((${txtwhite}@@@@@@@${txtcyan}%((${txtwhite}@${txtblue}((((((((${txtwhite}@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +${reset}") +EOM \ No newline at end of file diff --git a/Vagrant/resources/splunk_forwarder/inputs.conf b/Vagrant/resources/splunk_forwarder/inputs.conf deleted file mode 100755 index cf1d39f..0000000 --- a/Vagrant/resources/splunk_forwarder/inputs.conf +++ /dev/null @@ -1,29 +0,0 @@ -[WinEventLog://Microsoft-Windows-Sysmon/Operational] -index = sysmon -disabled = false -renderXml = true - -[monitor://c:\Program Files\osquery\log\osqueryd.results.log] -index = osquery -disabled = false -sourcetype = osquery:json - -[monitor://c:\Program Files\osquery\log\osqueryd.snapshots.log] -index = osquery -disabled = false -sourcetype = osquery:json - -[monitor://c:\Program Files\osquery\log\osqueryd.INFO.*] -index = osquery-status -disabled = false -sourcetype = osquery-info:syslog - -[monitor://c:\Program Files\osquery\log\osqueryd.WARNING.*] -index = osquery-status -disabled = false -sourcetype = osquery-warn:syslog - -[monitor://c:\Program Files\osquery\log\osqueryd.ERROR.*] -index = osquery-status -disabled = false -sourcetype = osquery-error:syslog diff --git a/Vagrant/resources/splunk_forwarder/wef_inputs.conf b/Vagrant/resources/splunk_forwarder/wef_inputs.conf index 02e48bc..02018be 100755 --- a/Vagrant/resources/splunk_forwarder/wef_inputs.conf +++ b/Vagrant/resources/splunk_forwarder/wef_inputs.conf @@ -322,9 +322,9 @@ current_only = 0 checkpointInterval = 5 [WinEventLog://WEC6-Sysmon] -sourcetype = WinEventLog:Sysmon +sourcetype = "XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" source = WinEventLog:Sysmon -index=wineventlog +index=sysmon disabled = 0 start_from = oldest current_only = 0 diff --git a/Vagrant/scripts/install-osquery.ps1 b/Vagrant/scripts/install-osquery.ps1 index b46e1ee..e5ffec3 100755 --- a/Vagrant/scripts/install-osquery.ps1 +++ b/Vagrant/scripts/install-osquery.ps1 @@ -14,11 +14,7 @@ If (-not ($service)) { Copy-Item "c:\Users\vagrant\AppData\Local\Temp\osquery-configuration-master\Classic\Endpoints\Windows\*" "c:\Program Files\osquery" Copy-Item "c:\Users\vagrant\AppData\Local\Temp\osquery-configuration-master\Classic\Endpoints\packs" -Path "c:\Program Files\osquery" - ## Use the TLS config by default. Un-comment the line below to use the local configuration and avoid connecting to Fleet. - # Copy-Item "c:\Program Files\osquery\osquery_no_tls.flags" -Path "c:\Program Files\osquery\osquery.flags" -Force - - ### --- TLS CONFIG BEGINS --- - ### COMMENT ALL LINES BELOW UNTIL "TLS CONFIG ENDS" if using local configuration + ## Use the TLS config ## Add entry to hosts file for Kolide for SSL validation Add-Content "c:\windows\system32\drivers\etc\hosts" " 192.168.38.105 kolide" ## Add kolide secret and avoid BOM @@ -32,7 +28,7 @@ If (-not ($service)) { (Get-Content "c:\Program Files\osquery\osquery.flags") -replace 'c:\\ProgramData\\osquery\\certfile.crt', 'c:\Program Files\osquery\certfile.crt' | Set-Content "c:\Program Files\osquery\osquery.flags" ## Add certfile.crt Copy-Item "c:\vagrant\resources\fleet\server.crt" "c:\Program Files\osquery\certfile.crt" - ### --- TLS CONFIG ENDS --- + ## Start the service Start-Service osqueryd } else { diff --git a/ci/build_machine_bootstrap.sh b/ci/build_machine_bootstrap.sh index 8b33a47..d8c3a52 100755 --- a/ci/build_machine_bootstrap.sh +++ b/ci/build_machine_bootstrap.sh @@ -75,8 +75,8 @@ ufw --force enable echo "[$(date +%H:%M:%S)]: Installing Vagrant..." mkdir /opt/vagrant cd /opt/vagrant || exit 1 -wget --progress=bar:force https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.deb -dpkg -i vagrant_2.2.5_x86_64.deb +wget --progress=bar:force https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.deb +dpkg -i vagrant_2.2.6_x86_64.deb echo "[$(date +%H:%M:%S)]: Installing vagrant-reload plugin..." vagrant plugin install vagrant-reload diff --git a/ci/manual_machine_bootstrap.sh b/ci/manual_machine_bootstrap.sh index 8d4d8c6..2e00ac9 100644 --- a/ci/manual_machine_bootstrap.sh +++ b/ci/manual_machine_bootstrap.sh @@ -22,8 +22,8 @@ git clone https://github.com/clong/DetectionLab.git /opt/DetectionLab # Install Vagrant mkdir /opt/vagrant cd /opt/vagrant || exit 1 -wget https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.deb -dpkg -i vagrant_2.2.5_x86_64.deb +wget https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.deb +dpkg -i vagrant_2.2.6_x86_64.deb # Disable IPv6 - may help with the vagrant-reload plugin: https://github.com/hashicorp/vagrant/issues/8795#issuecomment-468945063 echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf diff --git a/ci/manual_machine_bootstrap_vmware.sh b/ci/manual_machine_bootstrap_vmware.sh index 2ba70be..7e188ea 100644 --- a/ci/manual_machine_bootstrap_vmware.sh +++ b/ci/manual_machine_bootstrap_vmware.sh @@ -14,9 +14,9 @@ apt-get install -y linux-headers-"$(uname -r)" build-essential unzip git ufw apa pip install awscli --upgrade --user cp /root/.local/bin/aws /usr/local/bin/aws && chmod +x /usr/local/bin/aws -wget -O VMware-Workstation-Full-15.0.4-12990004.x86_64.bundle "https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-15.0.4-12990004.x86_64.bundle?HashKey=6f83753e4d9e94da7f920c32b5808033¶ms=%7B%22custnumber%22%3A%22KipkcHRoJWVlZA%3D%3D%22%2C%22sourcefilesize%22%3A%22472.70+MB%22%2C%22dlgcode%22%3A%22WKST-1504-LX%22%2C%22languagecode%22%3A%22en%22%2C%22source%22%3A%22DOWNLOADS%22%2C%22downloadtype%22%3A%22manual%22%2C%22eula%22%3A%22Y%22%2C%22downloaduuid%22%3A%225caee685-d5ad-4f6b-94db-2ddc4f7f3a97%22%2C%22purchased%22%3A%22N%22%2C%22dlgtype%22%3A%22Product+Binaries%22%2C%22productversion%22%3A%2215.0.4%22%2C%22productfamily%22%3A%22VMware+Workstation+Pro%22%7D&AuthKey=1556427011_a994b5252f29429710c077c8dcab1c19" -chmod +x VMware-Workstation-Full-15.0.4-12990004.x86_64.bundle -sudo sh VMware-Workstation-Full-15.0.4-12990004.x86_64.bundle --console --required --eulas-agreed --set-setting vmware-workstation serialNumber $SERIALNUMBER +wget -O VMware-Workstation-Full-15.5.1-15018445.x86_64.bundle "https://download3.vmware.com/software/wkst/file/VMware-Workstation-Full-15.5.1-15018445.x86_64.bundle" +chmod +x VMware-Workstation-Full-15.5.1-15018445.x86_64.bundle +sudo sh VMware-Workstation-Full-15.5.1-15018445.x86_64.bundle --console --required --eulas-agreed --set-setting vmware-workstation serialNumber $SERIALNUMBER # Set up firewall ufw allow ssh @@ -28,8 +28,8 @@ git clone https://github.com/clong/DetectionLab.git /opt/DetectionLab # Install Vagrant mkdir /opt/vagrant cd /opt/vagrant || exit 1 -wget --progress=bar:force https://releases.hashicorp.com/vagrant/2.2.5/vagrant_2.2.5_x86_64.deb -dpkg -i vagrant_2.2.5_x86_64.deb +wget --progress=bar:force https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.deb +dpkg -i vagrant_2.2.6_x86_64.deb # Disable IPv6 - may help with the vagrant-reload plugin: https://github.com/hashicorp/vagrant/issues/8795#issuecomment-468945063 echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf sysctl -p /etc/sysctl.conf > /dev/null