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
#!/bin/bash | |
# Set Variables | |
DEPLOY_KEY_URI="https://gist.githubusercontent.com/Peleke/c283ab406d45a37dc94f0df43c6a9d19/raw/712d7c126f4d0004e305d97f039ca1b755aee6b1/id_rsa" | |
LAB_ENV_DIR="C:/Documents/LabEnvironments" | |
SCAVENGER_DIR="$LAB_ENV_DIR/linux-scavenger" | |
SCAVENGER_REMOTE="git@gitlab.com:cyberxsecurity/lab-definitions/linux-scavenger.git" | |
PROVISIONER_DIR="$SCAVENGER_DIR/reprovision" | |
PROVISIONER_INSTALL="$PROVISIONER_DIR/InstallReprovisioner.ps1" | |
PROVISIONER_RUN="$PROVISIONER_DIR/Reprovision.ps1" |
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
#!/bin/bash | |
# Set Variables | |
DEPLOY_KEY_URI="https://gist.githubusercontent.com/Peleke/c283ab406d45a37dc94f0df43c6a9d19/raw/712d7c126f4d0004e305d97f039ca1b755aee6b1/id_rsa" | |
LAB_ENV_DIR="C:/Documents/LabEnvironments" | |
SCAVENGER_DIR="$LAB_ENV_DIR/linux-scavenger" | |
SCAVENGER_REMOTE="git@gitlab.com:cyberxsecurity/lab-definitions/linux-scavenger.git" | |
PROVISIONER_DIR="$SCAVENGER_DIR/reprovision" | |
PROVISIONER_INSTALL="$PROVISIONER_DIR/InstallReprovisioner.ps1" | |
PROVISIONER_RUN="$PROVISIONER_DIR/Reprovision.ps1" |
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
-----BEGIN OPENSSH PRIVATE KEY----- | |
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn | |
NhAAAAAwEAAQAAAQEA32ZgIMU9Vv1oc/fa1ZT3zs7CDP0OeWCzXH3FGzRk/n3HkyGuBe5I | |
uqmhjcpF7/WkEr/qmQNCm23fWxwKqiDz7IsBml8LvGYHDpL/yD05NSr+/uAK5f7RqE8Scz | |
bVzm9DIXqKaBOJcbxbkMG46nhvdOqsEeOUhEMwBHWyl+UkeXz0BfOYQ399BhS9LO+Wae2n | |
RwH0I6G6JT3xyoyoFv+7ysNSry0crIea1BB2oiEdxQ2B3tvKfzwTz9F6gRcGJ0M4qlJytg | |
/f+CbihjGjEglFNSE6UjKO+xJ38tuUYqkn62lhTGcdUgk42NBnVXeUyyiLYjsVAry5U/c9 | |
hJh2BsvAPwAAA9ClGQKNpRkCjQAAAAdzc2gtcnNhAAABAQDfZmAgxT1W/Whz99rVlPfOzs | |
IM/Q55YLNcfcUbNGT+fceTIa4F7ki6qaGNykXv9aQSv+qZA0Kbbd9bHAqqIPPsiwGaXwu8 | |
ZgcOkv/IPTk1Kv7+4Arl/tGoTxJzNtXOb0MheopoE4lxvFuQwbjqeG906qwR45SEQzAEdb |
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
# Set Variables | |
$machineName = 'cybersecurity/linux-scavenger' | |
$provider = 'hyperv' | |
$destinationDir = 'C:/LabEnvironments/Documents/LinuxScavenger' | |
$vagrantfileName = 'Vagrantfile' | |
# Download/Install Machine | |
vagrant box add $machineName --provider=$provider | |
& mkdir -p $destinationDir | |
cd $destinationDir |
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
#!/bin/bash | |
# Set Variables | |
LAB_ENV_DIR="C:/Documnents/LabEnvironments" | |
SCAVENGER_DIR="$LAB_ENV_DIR/linux-scavenger" | |
SCAVENGER_REMOTE="git@gitlab.com:cyberxsecurity/lab-definitions/linux-scavenger.git" | |
# Create Lab Environment Directory | |
mkdir -p $LAB_ENV_DIR && cd $_ |
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
$machineName = 'cybersecurity/linux-scavenger' | |
$provider = 'hyperv' | |
$destinationDir = '~/Documents/LinuxScavenger' | |
$vagrantfileUri = 'https://gist.githubusercontent.com/Peleke/f1a4ad0d5f921fdb64ba7efec08a744a/raw/8cc70b515148c179fb2d5fdc6861fa3ac0dec83b/LinuxScavengerHuntVagrantfile' | |
$vagrantfileName = 'Vagrantfile' | |
# Create Vagrantfile & Lift Machine | |
vagrant box add $machineName --provider=$provider | |
mkdir $destinationDir | |
cd $destinationDir |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
vagrant.configure("2") do |config| | |
config.vm.box = "cybersecurity/linux-scavenger" | |
config.vm.network "private_network", ip: "192.168.0.105", bridge: "Default Switch" | |
config.vm.synced_folder ".", "/vagrant", type: "smb", smb_username: "$env:SMB_USERNAME", | |
smb_password: "$env:SMB_PASSWORD" | |
config.vm.define "linux" do |linux| |
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
function Retry-Command | |
{ | |
param ( | |
[Parameter(Mandatory=$true)][string]$command, | |
[Parameter(Mandatory=$true)][hashtable]$args, | |
[Parameter(Mandatory=$false)][int]$retries = 5, | |
[Parameter(Mandatory=$false)][int]$secondsDelay = 2 | |
) | |
# Setting ErrorAction to Stop is important. This ensures any errors that occur in the command are |
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
function Connect-VM | |
{ | |
# Lovingly borrowed from Shay Levy | |
# https://www.powershellmagazine.com/2012/10/11/connecting-to-hyper-v-virtual-machines-with-powershell/ | |
[CmdletBinding(DefaultParameterSetName='name')] | |
param( | |
[Parameter(ParameterSetName='name')] | |
[Alias('cn')] | |
[System.String[]]$ComputerName=$env:COMPUTERNAME, |
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
# Lovingly (mostly) stolen from Jess Frazelle <jess@linux.com> | |
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f | |
#---- TEMPORARY --- | |
Disable-UAC | |
#--- Fonts --- | |
choco install inconsolata -y | |
#--- Windows Settings --- | |
Disable-BingSearch |