Detection Lab: Threat hunting and automated detection
Finally had time to build my own Detection Lab, the idea is to build a complete environment for Threat Hunting and Detection, using the latest best practices to create secure environments. Eventually building it via Infrastructure as a Code in the Cloud using DevOps Tool chain – (Git, Docker, Vagrant, Terraform, Powershell, Python, WMI and shell bash script.), . I am adding tools for PenTesting, Threat Detection, Threat Intelligence and DFIR .
Final goal is to expose it to the wild using honeypots and do some real world threat detection. But, that is long time away. There really isn’t many options like this to get access to a complete lab environment. Few options like OSCP and SANs training provide very specific lab environments. (e.g. SANs NetWars.) Each of these would cost circa $2,000 for training and lab access.
This is my home lab configuration to build Detection Lab based on Chris Long, I will migrate this to AWS or GCP using Terraform in the near future, after testing the automation scripts.
My Lab Setup
My home lab (aka The Best) is based on a HP DL350 running Windows 2012R (MSDN licensing.) I was able to buy this at HP Cost pice via my contacts! I can add another CPU and more storage if required, but this is enough power to run multiple VM up without any issues. I was running Hyper-V but changed to VirtualBox (due to issues with Vagrant. But,VirtualBox is extremely unstable, compared to Hyper-V which is more stand and has higher performance.). I use TeamViewer to connect to it remotely and over the internet. Of course the name of my server is TRON. I installed a Nvidia GTX 980 so I can also play games and get at least 30-60 FPS on Squad.

Lab Hardware
- HP ML350e Gen8 E5-2407
- Windows Server 2012 R2 Datacenter
- 36 GB RAM
- Nvidia GTX 980 (So I can play Squad while working and in-between lab builds.)
- Intel Xeon CPU E5-24070 @2.20 Ghz
- Multiple Hard Drives in RAID 1, etc. 2 TBs+ storage
- Hyper-V or VirtualBox
- I had allot of problems trying to using Vagrant and Hyper-V, I am sure I can get it to work, but wasting time troubleshoot. So i decided to convert existing VMs into VirtualBox as the scripts all work.
ENVIRONMENT VMs
- AD
- Domain Controllers, DNS, KMS
- DB
- SQL
- Windows 10
- Shift + Flare
- Offensive-RedTeam
- KALI
- CommandoVM
- https://websploit.org/
- Web Server
- Honeypot
- NGNIX
- ModSecurity
- Pfsense
- https://www.vulnhub.com/lab/
- Defencive-Blue-Team
- Logger
- Docker
- Azure
- Honeypot
- https://mattermost.com/
TODO
- Add my Tool Set into Lab using Automation
- Build on AWS or GCP with strip down script and export of VMs into S3 or Git or another file location.
- Create honey pot and do threat detection.
- Add more tools for DFIR, PenTest, Technologies, etc..
- Create Honeypot
- Create a Secure OS and Web Server with WAF, etc.
- Install Splunk in Docker – Done
- Install LogRythm – Done
- Install ArcSight Logger
- Install Ansible
- Install Python and Tensor Flow, etc.
- Install GNS Simulator
- UTM, Router and Event Data
- Setup a Real time, Isolated Honeypot with with full monitoring.
Building Splunk lab for spelunking, Get a license for Splunk.
Splunk offers few options for Labs, Developer license, Free Version and NFT license for partners.
To generate your NFR keys, do the following:
- Login to the partner portal (if you don’t have a login, you need to go to splunk.com and create a Splunk account name first) or Splunk Dev license – https://dev.splunk.com/
- Scroll over the person icon
- Go to “Licenses”
- Click on “Generate License” next to “Splunk Enterprise – Splunk Partner+ NFR License”
By selecting this option, ES will be delivered to you too
- Be on a look out for 2 emails – one for your license key and one from splunkbase with instructions on how to download ES and other Apps
- https://dev.splunk.com/enterprise/dev_license
- https://www.splunk.com/en_us/download/universal-forwarder/thank-you-universalforwarder.html
- https://www.splunk.com/en_us/download.html
- https://docs.splunk.com/Documentation/Splunk/latest/Admin/Installyourlicense
- https://www.bitsioinc.com/tutorials/install-splunk-centos/
Install a license for a standalone instance
To install a license for a standalone instance of Splunk Enterprise:
-
On the instance, navigate to Settings > Licensing.
-
Click Add license.
-
Do one of the following:
-
Click Choose file and browse for your license file and select it, or
-
Click copy & paste the license XML directly… and paste the text of your license file into the provided field.
-
-
Click Install.
-
If this is the first Enterprise license that you are installing on the instance, you must restart Splunk Enterprise.
*Kindly note that as per NFR program, we only allow 1 instance of 50GB NFR per account per year.
Threat Datasets
- APT Simulator
- https://github.com/NextronSystems/APTSimulator
- Intrusion detection evaluation dataset – https://www.unb.ca/cic/datasets/ids.html?source=post_page—————————
- https://pralab.diee.unica.it/en/AdversariaLib
- https://github.com/jivoi/awesome-ml-for-cybersecurity
- https://www.owasp.org/index.php/OWASP_Machine_Learning_Resources
- Public pcaps – https://www.netresec.com/?page=PcapFiles
- https://security.stackexchange.com/questions/209642/public-availability-of-a-good-dataset-in-pcap-tcpdump-format-for-ids-ips-testi
- https://www.quora.com/Where-can-I-get-the-latest-dataset-for-a-network-intrusion-detection-system
- https://towardsdatascience.com/building-an-intrusion-detection-system-using-deep-learning-b9488332b321
- https://medium.com/secjuice/playing-around-with-virustotal-graph-8cce7a1681ee
- https://arxiv.org/pdf/1804.04637.pdf
- https://www.kaggle.com/c/malware-classification
- https://www.researchgate.net/post/Where_can_I_find_huge_data_sets_of_analyzed_malwares_for_data_mining
- https://eqllib.readthedocs.io/en/latest/atomicblue.html
- https://splunkbase.splunk.com/app/1924/
- https://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/GetthetutorialdataintoSplunk
- Splunk Bots
- https://packetstormsecurity.com/files/123731/
- Allot inside here – https://github.com/Neo23x0?tab=stars
- https://github.com/redcanaryco
- Mordor – https://github.com/hunters-forge/mordor
- Simulate a Reconnaissance attack – https://docs.microsoft.com/en-us/azure-advanced-threat-protection/atp-playbook-reconnaissance
- https://www.knowbe4.com/ransomware-simulator
- GridAttackSim: A Cyber Attack Simulation Framework for Smart Grids
- https://opal-rt.com/cybersecurity-overview/
- https://attack-community.org/directory/
- https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES
- https://mordordatasets.com/introduction.html
- https://github.com/sbousseaden/PCAP-ATTACK
- https://github.com/scythe-io/community-threats/tree/master/PowerShell
- https://www.scythe.io/threatthursday
- https://summitroute.com/blog/2020/10/09/public_dataset_of_cloudtrail_logs_from_flaws_cloud/
- http://flaws.cloud/
- https://www.honeynet.org/projects/
- https://www.honeynet.org/projects/
- https://github.com/telekom-security/tpotce
- https://gist.github.com/Neo23x0
here is what I have in my notes. Not tested, but recommended by good people: generate data in AD https://github.com/KevOtt/AD-Lab-Generator https://github.com/PaulSec/awesome-windows-domain-hardening build an AD with 0 efforts, other reco: https://github.com/clong/DetectionLab or in several steps: create: https://blog.focal-point.com/how-to-build-a-cheap-active-directory-pen-test-lab-in-aws-without-any-effort populate: https://github.com/davidprowe/BadBlood add misconfigs: https://medium.com/@vartaisecurity/lab-building-guide-virtual-active-directory-5f0d0c8eb907 other reco to build an AD with little effort: https://aaladha0.medium.com/automated-ad-lab-with-badblood-installed-automatically-part-1-ab2a1b8a68c4
Breach Simulation
- Caldera – https://github.com/mitre/caldera
- Safebreach – https://safebreach.com/
- Cymulate – https://cymulate.com/
- Verodin – https://www.fireeye.com/mandiant/security-validation.html
- Infection Monkey – https://www.guardicore.com/infectionmonkey/
- Atomic Red Team – https://github.com/redcanaryco/atomic-red-team
- CobaltStrike – https://www.cobaltstrike.com/
- Leonidas – https://github.com/FSecureLABS/leonidas
- Florian Roth’s APTSimulto – https://github.com/Neo23x0
Mailware
- https://talosintelligence.com/flokibot
- https://github.com/ytisf/theZoo
- https://zeltser.com/malware-sample-sources/
- https://www.varonis.com/blog/malware-coding-lessons-people-part-learning-write-custom-fud-fully-undetected-malware/
- https://niiconsulting.com/checkmate/2018/02/malware-development-welcome-dark-side-part-1/
- https://0x00sec.org/
- https://www.honeynet.org/
- https://www.guardicore.com/infectionmonkey/
- https://www.opennetworking.org/incubator-projects/delta/
- https://www.foregenix.com/blog/a-first-look-at-todays-command-and-control-frameworks
- https://objective-see.com/malware.html
- https://www.unb.ca/cic/datasets/ddos-2019.html
- https://www.fireeye.com/blog/threat-research/2020/08/emulation-of-malicious-shellcode-with-speakeasy.html?s=09
- https://www.specterops.io/resources/research-and-development
- https://github.com/GuidePointSecurity/RedCommander
- https://github.com/sbousseaden/EVTX-ATTACK-SAMPLES/tree/master/Credential%20Access
- https://posts.specterops.io/enter-mordor-pre-recorded-security-events-from-simulated-adversarial-techniques-fdf5555c9eb1
Detection Lab Build
- Enable or Disable Hypver-v on Windows – https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
-
[sourcecode] Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All remove-windowsfeature -name Hyper-V dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All dism.exe /Online /Disable-Feature:Microsoft-Hyper-V bcdedit /set hypervisorlaunchtype off bcdedit /set hypervisorlaunchtype auto [/sourcecode]
- Install X2Go Remote control for Linux
- Install Windows Package manager – https://chocolatey.org/
-
[sourcecode]@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"[/sourcecode] -
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
- Install Git, packer, Cygwi (for future packing) and Vagrant
-
cinst git.install -y choco install git -params '"/GitAndUnixToolsOnPath"' cinst vagrant -y choco install vagrant choco install packer choco install cygwin choco install putty setx path "c:\tools\cygwin\bin" choco install vagrant --upgrade choco install vagrant --force shutdown /r /t 00 vagrant global-status Get-SmbServerConfiguration
-
- Vagrant Usage
-
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "clear" vagrant init vagrant up --provider=hyperv vagrant box add {name-of-box} {path-to-box.box} vagrant box list //Example Box //This will add box from https://app.vagrantup.com/boxes/search?provider=hyperv vagrant box add hashicorp/precise64 --provider=hyperv vagrant init vagrant up --provider=hyperv vagrant ssh // Enable Vagrant Debug Logs set VAGRANT_LOG=info vagrant up vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log" vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log" //Set Default Provider //https://www.twelve21.io/installing-samuraiwtf-on-hyper-v-with-vagrant/ SET $Env:VAGRANT_DEFAULT_PROVIDER = "hyperv" [Environment]::SetEnvironmentVariable("VAGRANT_DEFAULT_PROVIDER", "hyperv", "User") //Install Plugin vagrant plugin update vagrant plugin install vagrant-reload //Remove all Boxes //https://www.jeffgeerling.com/blog/2016/remove-all-your-local-vagrant-boxes-bash-command vagrant box list | cut -f 1 -d ' ' | xargs -L 1 vagrant box remove -f //Uninstall Vagrant C:\Users\YourUsername\Vagrantfile C:\HashiCorp D:\Users\Administrator\.vagrant D:\Users\Administrator\.vagrant.d
-
- Create Hyperv Virtual Switch and setup permissions

- Select the NIC connected to the internet / Ethernet Properties / Sharing / Enable Internet Sharing with the VirtualBox or HyperV External Network or Birdge.
- Vagrant Configuration file for Hyperv
-
[sourcecode]# -*- mode: ruby -*- # vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what # you're doing. Vagrant.configure("2") do |config| config.vm.box = "hashicorp/precise64" config.vm.provider "hyperv" config.vm.network "public_network" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.provider "hyperv" do |h| h.enable_virtualization_extensions = true h.linked_clone = true end end [/sourcecode] - Convert from HyperV to VirtualBox (VT-x is not available (VERR_VMX_NO_VMX).)
- VBoxManage clonehd input.vhdx output.vdi –format VDI
Added this new disk as an IDE drive (“PIIX4”)
Enabled System/EFI Setting for this VM.
VT-x is not available (VERR_VMX_NO_VMX).
- VBoxManage clonehd input.vhdx output.vdi –format VDI
- Vagrant Hyper-V 2012 R2 issue
- https://github.com/hashicorp/vagrant/issues/10132
- https://github.com/hashicorp/vagrant/issues/11409
Detection Lab Reference
-
-
- https://taosecurity.blogspot.com/2019/01/trying-detectionlab.html
- https://github.com/clong/DetectionLab
- https://boxstarter.org/
- http://www.hurryupandwait.io/blog/creating-a-hyper-v-vagrant-box-from-a-virtualbox-vmdk-or-vdi-image
- https://pioneercode.com/post/building-a-hyper-v-windows-10-vagrant-box
- https://github.com/PioneerCode/pioneer-windows-development-environment
- http://vagrantmanager.com/windows/
- https://techcommunity.microsoft.com/t5/Virtualization/Vagrant-and-Hyper-V-Tips-and-Tricks/ba-p/382373
- Domain Active Directory Automated Builds – https://browninfosecguy.com/Active-Directory-Lab-Setup-Tool
- Offensive Terraform – https://offensive-terraform.github.io/offensive-terraform.github.io/
- Running commands on your Linux instance at launch – https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html
- Hyper-V AutomationLab – https://github.com/AutomatedLab/AutomatedLab
-
Other Technology Deployment
- Enterprise Software
- Phantom – https://my.phantom.us/downloads/
- Demisto – https://go.demisto.com/sign-up-for-demisto-free-edition?utm_referrer=https%3A%2F%2Fwww.demisto.com%2F
- Splunk Dev License
- LogRhythm
- LogRhythm Install Wizard: http://content.logrhythm.com/current/LogRhythmInstallWizard_current.zipDatabase Install Tool: http://content.logrhythm.com/current/LogRhythmDatabaseInstallTool_current.zip
- Data Indexer Install Tool: http://content.logrhythm.com/current/DX_current.iso
- Cybereason
- anomali.com
- UberAgent – https://uberagent.com/pricing-and-licensing/free-consultant-licenses/
- FireEye OpenIOC
- Cyber Attack Simulation
- https://geekflare.com/cyberattack-simulation-tools/
- Verodin
- https://cymulate.com/
- .pcysys.com
- https://specterops.io/resources/research-and-development
- https://github.com/praetorian-code/purple-team-attack-automation
- https://www.praetorian.com/blog/getting-started-with-praetorians-attack-automation
- https://github.com/praetorian-code
- https://www.praetorian.com/blog/why-praetorian-benchmarks-to-mitre-attack?edition=2019
- https://github.com/infosecn1nja/awesome-mitre-attack
- https://www.activecountermeasures.com/mitre-attck-https/
- https://www.slideshare.net/attackcon2018/mitre-attckcon-20-lessons-in-purple-team-testing-with-mitre-attck-daniel-wyleczukstern-praetorian-and-matt-southworth-priceline
- https://pentestit.com/adversary-emulation-tools-list/
- Cyber Ranges
- ELK-Ansible – https://github.com/lmakonem/ELK-SIEM-Ansible-Playbook
- CyberRange – https://github.com/secdevops-cuse/CyberRange
- CloudGoat – https://rhinosecuritylabs.com/aws/introducing-cloudgoat-2/
- Opensource
- Beagle – https://github.com/yampelo/beagle
- Splunk InfoSec App (Firewall, AD, AV.) – https://splunkbase.splunk.com/app/4240/
- https://securityonion.net/
- https://www.volatilityfoundation.org/
- https://github.com/uber-common/metta
- https://www.velocidex.com/
- https://suricata-ids.org/
- ELK
- Security Onion
- Bro
- https://hackertarget.com/10-open-source-security-tools/
- Audix
- Zeek
- Atomic Blue Team
- Syslog-ng
- MITRE Caldera
- Brian Hussey Labs
- https://suricata-ids.org/
- Infection Monkey
- Velectoraptor
- SANs Tools
- SIFT Workstation
- REMnux
- EZTools
- Slingshot
- SOF-ELK
- KAPE
- bstrings
- AmcacheParser
- EZViewer
- Jumplist Explore
- https://csirt-kit.org/#about
- https://ninjutsu-os.github.io/Download/
- Spiderlabs Tools
- FireEye tools
- Cisco Talso
- https://edr.cwatch.comodo.com/features
- Labs
- https://medium.com/threat-hunters-forge/jupyter-notebooks-from-sigma-rules-%EF%B8%8F-to-query-elasticsearch-31a74cc59b99
- https://github.com/Kirtar22/ATTACK-Threat_Intel
- https://shirosaidev.github.io/diskover/
- https://neo4j.com/live-demos/?ref=menu-fr
- https://pynet.twb-tech.com/blog/automation/stackstorm-nagios-p1.html
- https://openargus.org/index.php/getting-argus
- https://openargus.org/index.php/using-argus
- Other
- Must learn Tools
- mimikatz – https://github.com/gentilkiwi/mimikatz
- Revoke Obfuscation – bhttps://github.com/danielbohannon/Revoke-Obfuscation
- evilginx2 – https://github.com/kgretzky/evilginx2
- Modlishka – https://github.com/drk1wi/Modlishka
- Veil – https://github.com/Veil-Framework
- Powershell Empire – https://github.com/EmpireProject/Empire
- BureSuite
- Metasploit – https://github.com/rapid7/metasploit-framework
- nmap
- MITRE – tool Carbanka FIn7
- Autospy- ttps://www.autopsy.com/
- Beef – https://tools.kali.org/exploitation-tools/beef-xss
- Hastcat – https://hashcat.net/hashcat/
- Bloodhound – https://github.com/BloodHoundAD
- Velcratopt
- Wireshark
- THC hydra – https://github.com/vanhauser-thc/thc-hydra
- https://github.com/emilyanncr/Windows-Post-Exploitation/#post-exploitation-tools
- Colbat Strike
Install Splunk in Docker
[code] // Install SSH Server sudo iptables -L | grep ssh sudo netstat -anp | grep sshd sudo ufw disable sudo ufw verbose sudo ufw allow ssh sudo ufw allow 22 sudo apt-get update sudo apt-get install openssh-server sudo apt update sudo apt install openssh-server sudo apt-get remove openssh-client openssh-server sudo apt-get install openssh-client openssh-server sudo systemctl status ssh [/code]
$ sudo apt-get remove docker docker-engine docker.io containerd runc //Upgrade linux to latest edition sudo apt-get update sudo apt-get upgrade sudo do-release-upgrade uname -r lsb_release -a // Fun stuff sudo apt-get install asciinema asciinema auth asciinema rec demo.cas asciinema upload // Install Docker sudo apt install docker.io sudo systemctl start docker sudo systemctl enable docker docker --version // Install Docker from Official Repository sudo apt-get update sudo apt-get install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add – sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - sudo apt-key fingerprint 0EBFCD88 sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable" $ sudo apt-get install docker-ce docker-ce-cli containerd.io sudo docker run hello-world
//Install Splunk in Docker docker pull splunk/splunk:latest docker run -d -p 8000:8000 -e 'SPLUNK_START_ARGS=--accept-license' -e 'SPLUNK_PASSWORD=' splunk/splunk:latest docker ps -aq docker ps -l docker container rm docker ps -a -f id= docker container start ..id docker stop //docker exec -it bash …license" -v ~/Desktop/local_app:/opt/splunk/etc/apps/container_app splunk/s… http://localhost:8000
[/sourcecode]
Getting access to Windows Operating System License
- The easiest way to get access to Windows OS 7 or other license is to use AWS, GCP or Azure VMs as per – https://learn.microsoft.com/en-gb/archive/blogs/motiba/building-a-security-lab-in-azure
- You will also need access to Office application such as Outlook, Excel or Word for testing, you can download them via https://www.microsoft.com/en-us/software-download/
- Use Windows Attack Simulator – https://learn.microsoft.com/en-us/microsoft-365/security/office-365-security/attack-simulation-training-get-started?view=o365-worldwide
- Use NIST VHD – https://csrc.nist.gov/Projects/United-States-Government-Configuration-Baseline/USGCB-Content/Microsoft-Content/Virtual-Hard-Disks
- Convert the VM using https://learn.microsoft.com/en-us/azure/lab-services/class-type-ethical-hacking
Reference;
- https://www.splunk.com/blog/2018/10/24/announcing-splunk-on-docker.html
- https://hub.docker.com/r/splunk/splunk/https://docs.splunk.com/Documentation/Splunk/7.3.0/Installation/DeployandrunSplunkEnterpriseinsideDockercontainers
- https://www.splunk.com/blog/2018/01/17/hands-on-lab-sandboxing-with-splunk-with-docker.html
- https://docs.splunk.com/Documentation/Splunk/8.0.2/Installation/DeployandrunSplunkEnterpriseinsideDockercontainershttps://docs.docker.com/install/linux/docker-ce/debian/#prerequisiteshttps://conf.splunk.com/files/2019/slides/DEV1114.pdf
- https://app.vagrantup.com/badarsebard/boxes/centos-7.5-splunk
- https://github.com/gallilama/vagrant-splunk
- https://www.avocado.com.au/resources/tech-tips/building-multi-node-vagrant-splunk-environment-part-1/
- https://gitlab.com/badarsebard/vagabondhttps://github.com/badarsebard/vagabondhttps://docs.splunk.com/Documentation/Splunk/8.0.2/Installation/DeployandrunSplunkEnterpriseinsideDockercontainers
Install Microfocus ArcSight Logger on Centos
Kernel Panic on Hyper-V The latest versions of Ubuntu and CentOS both get Kernel panic errors on Hyper-V, and the only work around is to use a previous version and then upgrade. (very frustrating.) 
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1814069
- https://forums.centos.org/viewtopic.php?t=64855
- https://bugs.centos.org/view.php?id=12797
- CentOS 7.2 seems to work on Hyper-V
- http://ftp.iij.ad.jp/pub/linux/centos-vault/
Install ArcSight Logger
[code]
// Setup Static IP Address
nmtui edit eth0
// Install asciinema.org
sudo yum install epel-release
sudo yum install asciinema
asciinema auth
asciinema record cast.cast
//Update hostname
sudo nano /etc/sysconfig/network
HOSTNAME=myserver.domain.com
nano /etc/host
hostnamectl set-hostname hostname.domain.com
/etc/init.d/network restart
sudo systemctl restart NetworkManager.service
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.1 hostname hostanme.localdomain.com
// Install wget, unzip, tmux,tar and nano
yum install wget unzip nano tmux tar -y
sudo yum install -y nano
// Hyper-V Optimization
sudo nano /etc/udev/rules.d/100-balloon.rules
SUBSYSTEM=="memory", ACTION=="add", ATTR{state}="online"
sudo yum install -y hyperv-daemons
sudo yum list installed | grep hyperv
//Disable IP 6
//https://www.thegeekdiary.com/centos-rhel-7-how-to-disable-ipv6/
// Change the Disk I/O Scheduler
su root
echo noop > /sys/block/sda/queue/scheduler
exit
// Defaults
yum install - unzip
yum install -y fontconfig \ dejavu-sans-fonts
// Make sure that you have the latestsupported tzdata rpm, tzdata2019c, installed on your OS before
installing Logger. https://phoenixnap.com/kb/how-to-install-rpm-file-centos-linux
// https://centos.pkgs.org/7/centos-x86_64/tzdata-2019b-1.el7.noarch.rpm.html
// https://centos.pkgs.org/7/centos-updates-x86_64/tzdata-2019c-1.el7.noarch.rpm.html
yum install tzdata
yum install tzdata
wget http://some_website/sample_file.rpm
sudo rpm –i sample_file.rpm
sudo yum localinstall sample_file.rpm
sudo rpm –i sample_file.rpm
sudo dnf localinstall sample_file.rpm
// A non-root user account must exist on the system on which you are installing Logger, or the installer will
ask you to provide one. Even if you install as root, a non-root user account is still required. The userid
and its primary groupid should be the same for this account. The UID for the non-root user should be
1500 and the GID should be 750. For example, to create the non-root user, run these commands as
groupadd –g 750 arcsight
useradd –m –g arcsight –u 1500 arcsight
chown -R arcsight:arcsight /opt/arcsight/
// Increase default user process limit
nano /etc/security/limits.d/20-nproc.conf
// delete all connets in file and add the follwing
* soft nproc 10240
* hard nproc 10240
* soft nofile 65536
* hard nofile 65536
// then log out and verify open files 65536 / max user processes 10240
ulimit -a
// modify login.conf .. RemoveIPC=no
nano /etc/systemd/logind.conf
cd /etc/systemd
systemctl restart systemd-logind.service
// Map CIFS share to software
yum install samba-client samba-common cifs-utils
mkdir /mnt/win
nano /etc/fstab
\\winbox\getme /mnt/win cifs user,uid=500,rw,suid,username=sushi,password=yummy 0 0 mount.cifs \\\\.....\\share /mnt/software cifs user,uid=500,rw,suid,username=,password= 0 0
mkdir /opt/arcsight
mkdir /mnt/software
mount.cifs \\\\192.168.1.114\\synology /mnt/software cifs user,uid=500,rw,suid,username=,password= 0 0
cd /mnt/software/ISOLibary/Software/ArcSightLogger
cp ArcSight-logger-7.0.0.8280.0.bin /opt/arcsight
chmod u+x ArcSight-logger-7.0.[8280].0.bin
./ArcSight-logger-7.0.[8280].0.bin -i console
// Gnome Desktop
yum groupinstall “GNOME Desktop” “Graphical Administration Tools”
sudo yum groupinstall -y "KDE Plasma Workspaces"
[/code]
[code]
// START SERVICES
/etc/init.d/arcsight_logger status {start|stop|restart|status|quit}
/etc/init.d/arcsight_logger start all
// DISABLE FIREWALL FOR LABS ONLY
systemctl disable firewalld
systemctl stop firewalld
systemctl status firewalld
// Access Logger Dashboard
https://....1.121/platform-ui/ admin|password
[/code]
Upgrade CentOS
[code] //upgrade CentOS - log in as root cat /etc/centos-release sudo yum check-update sudo yum clean all reboot sudo yum update reboot [/code]
- https://unix.stackexchange.com/questions/298110/centos-7-yum-install-not-working//
- https://www.techsupportpk.com/2019/11/how-to-upgrade-from-centos-7-to-centos-8.html
- https://www.tecmint.com/upgrade-centos-7-to-centos-8/
Reference
- Microfocus ArcSight Logger install in Docker – https://github.com/mitchese/docker-arcsight-esm
- Microfocus ArcSight Logger Documentation – https://community.microfocus.com/t5/Logger-Documentation/ct-p/LoggerDoc
- CentOS download – https://wiki.centos.org/Download
- Upgrade Centos 7 to 8 – https://www.tecmint.com/upgrade-centos-7-to-centos-8/
- Ubuntu download – http://old-releases.ubuntu.com/releases/bionic/
- CentOS on Hyper – https://www.altaro.com/hyper-v/centos-linux-hyper-v/
- CentOS Hyper-V support – https://github.com/hashicorp/vagrant/issues/11409
Vmware KALI Mount shared Folder
[code] ls /mnt/hgfs sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other ln -s /mnt/hgfs// /root/Desktop/ [/code]
Reference
- AWS Kali
- https://github.com/juanjoSanz/aws-pentesting-lab#how-to
- Vagrant Getting Started
- https://learn.hashicorp.com/vagrant/getting-started/up
- https://riptutorial.com/vagrant
- https://riptutorial.com/Download/vagrant.pdf
- Vagrant Networking – https://technology.amis.nl/2018/07/27/virtualbox-networking-explained/
- https://github.com/olafhartong/ThreatHunting
- https://rastamouse.me/2017/08/automated-red-team-infrastructure-deployment-with-terraform-part-1/
- https://splunkbase.splunk.com/app/4617/
- Datasource and use case Optimisation – https://conf.splunk.com/files/2017/slides/drive-more-value-through-data-source-and-use-case-optimization.pdf
- Anisble Splunk Build
- https://medium.com/splunkuserdeveloperadministrator/automating-your-splunk-installation-with-ansible-c47bbf65eb52
- https://wordpress.com/post/virtualizationandstorage.wordpress.com/7574
- https://github.com/tsailiming/ansible-hyperv
- https://www.reddit.com/r/ansible/comments/73ithb/ansible_hyperv_and_windows_provisioning/
- https://mwclearning.com/?p=1935
- https://argonsys.com/microsoft-cloud/articles/configuring-ansible-manage-windows-servers-step-step/
- Windows ATP Lab
- Hyper-V VM build automation
- Splunk docker
- Simulating the Adversary to Test Your Splunk Security Analytics
- Splunk Simulation Runner – http://dev.splunk.com/view/simdata/SP-CAAAFGS
- Phantom
- Splunk Dev License
- https://www.splunk.com/en_us/resources/personalized-dev-test-licenses.html
- http://dev.splunk.com/view/quickstart/SP-CAAAFDB
- Splunk BOSS of SOC
- Splunk Developer software download
- Splunk Sandbox
- Learning Splunk – https://www.linkedin.com/learning/learning-splunk/install-splunk-free-edition
- Splunk Cyber Range
- https://github.com/splunk/attack_range_cloud
- https://github.com/splunk/attack_range
- SEC1395C – Developing cloud detections using Cloud Attack Range
- https://conf.splunk.com/files/2020/recordings/SEC1395C.mp4
- https://conf.splunk.com/files/2020/slides/SEC1395C.pdf
- Detection Lab
- https://medium.com/@clong/introducing-detection-lab-61db34bed6ae
- https://github.com/clong/DetectionLab
- https://securityonline.info/detectionlab/
- https://isc.sans.edu/forums/diary/Detection+Lab+Visibility+Introspection+for+Defenders/23135/
- https://taosecurity.blogspot.com/2019/01/trying-detectionlab.html
- https://mpilking.github.io/Misc/detectionlab/
- https://coolx28.github.io/DetectionLab/
- https://blog.agood.cloud/posts/2019/02/13/building-detection-lab-in-aws/
- https://blog.agood.cloud/posts/2019/02/17/building-detection-lab-in-aws-part-ii/
- https://github.com/wtfbbqhax/Snort-boxes/blob/master/Vagrantfile
- https://www.sans.org/reading-room/whitepapers/assurance/vagrant-build-manageable-sharable-intrusion-detection-lab-37292
- Uber Meta
- LogRythm
- SYSMON
- OpenArgus

