From 3fde431699f907ef1dd53432d6ca8db4aafcbaff Mon Sep 17 00:00:00 2001 From: Chris Long Date: Tue, 14 Apr 2020 13:29:58 -0700 Subject: [PATCH] Small logger bugfixes --- Vagrant/bootstrap.sh | 10 +++++++++- Vagrant/resources/windows/MenuStyle_Default_Win7.reg | 4 ++++ Vagrant/scripts/MakeWindows10GreatAgain.ps1 | 2 +- Vagrant/scripts/install-utilities.ps1 | 1 + ci/manual_machine_bootstrap_vmware.sh | 9 ++++----- 5 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 Vagrant/resources/windows/MenuStyle_Default_Win7.reg diff --git a/Vagrant/bootstrap.sh b/Vagrant/bootstrap.sh index b083599..cc3248f 100644 --- a/Vagrant/bootstrap.sh +++ b/Vagrant/bootstrap.sh @@ -129,7 +129,15 @@ install_splunk() { # Download Hardcoded Splunk wget --progress=bar:force -O /opt/splunk-8.0.2-a7f645ddaf91-linux-2.6-amd64.deb 'https://download.splunk.com/products/splunk/releases/8.0.2/linux/splunk-8.0.2-a7f645ddaf91-linux-2.6-amd64.deb&wget=true' fi - dpkg -i /opt/splunk*.deb + if ! ls /opt/splunk*.deb 1> /dev/null 2>&1; then + echo "Something went wrong while trying to download Splunk. This script cannot continue. Exiting." + exit 1 + fi + if ! dpkg -i /opt/splunk*.deb > /dev/null; then + echo "Something went wrong while trying to install Splunk. This script cannot continue. Exiting." + exit 1 + fi + /opt/splunk/bin/splunk start --accept-license --answer-yes --no-prompt --seed-passwd changeme /opt/splunk/bin/splunk add index wineventlog -auth 'admin:changeme' /opt/splunk/bin/splunk add index osquery -auth 'admin:changeme' diff --git a/Vagrant/resources/windows/MenuStyle_Default_Win7.reg b/Vagrant/resources/windows/MenuStyle_Default_Win7.reg new file mode 100644 index 0000000..5b85b9e --- /dev/null +++ b/Vagrant/resources/windows/MenuStyle_Default_Win7.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_LOCAL_MACHINE\SOFTWARE\IvoSoft\ClassicStartMenu] +"MenuStyle_Default"="Win7" \ No newline at end of file diff --git a/Vagrant/scripts/MakeWindows10GreatAgain.ps1 b/Vagrant/scripts/MakeWindows10GreatAgain.ps1 index 870ac27..d8a4659 100644 --- a/Vagrant/scripts/MakeWindows10GreatAgain.ps1 +++ b/Vagrant/scripts/MakeWindows10GreatAgain.ps1 @@ -1,7 +1,7 @@ # Import the registry keys Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Making Windows 10 Great again" Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Importing registry keys..." -regedit /s a:\MakeWindows10GreatAgain.reg +regedit /s c:\vagrant\scripts\MakeWindows10GreatAgain.reg # Remove OneDrive from the System Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Removing OneDrive..." diff --git a/Vagrant/scripts/install-utilities.ps1 b/Vagrant/scripts/install-utilities.ps1 index b79d0fa..eb337fa 100755 --- a/Vagrant/scripts/install-utilities.ps1 +++ b/Vagrant/scripts/install-utilities.ps1 @@ -13,6 +13,7 @@ If ($(hostname) -eq "win10") { # Because the Windows10 start menu sucks choco install -y --limit-output --no-progress classic-shell -installArgs ADDLOCAL=ClassicStartMenu & "C:\Program Files\Classic Shell\ClassicStartMenu.exe" "-xml" "c:\vagrant\resources\windows\MenuSettings.xml" + regedit /s c:\vagrant\resources\MenuStyle_Default_Win7.reg } choco install -y --limit-output --no-progress NotepadPlusPlus GoogleChrome WinRar diff --git a/ci/manual_machine_bootstrap_vmware.sh b/ci/manual_machine_bootstrap_vmware.sh index 8ba17e2..a65521f 100644 --- a/ci/manual_machine_bootstrap_vmware.sh +++ b/ci/manual_machine_bootstrap_vmware.sh @@ -2,11 +2,10 @@ # This script is used to manually prepare an Ubuntu 16.04 server for DetectionLab building - # eth1: - # dhcp4: true - # gateway4: 192.168.76.1 - # nameservers: - # addresses: [8.8.8.8,8.8.4.4] +# Put this code in bootstrap.sh +# echo -e " eth1:\n dhcp4: true\n nameservers:\n addresses: [8.8.8.8,8.8.4.4]" >> /etc/netplan/01-netcfg.yaml +# netplan apply +# sed -i 's/nameserver 127.0.0.53/nameserver 8.8.8.8/g' /etc/resolv.conf && chattr +i /etc/resolv.conf export DEBIAN_FRONTEND=noninteractive export SERIALNUMBER="SECRET"