Restructure the repository per session
session1/ now holds the whole live lab (content, platforms, docs, answer key, README); session2/ keeps the design for the second workshop. The root README indexes both and states that session2 modifies session1 rather than duplicating it. build-bundle.sh builds from session1 and still produces a flat archive, so the documented paths inside a deployment (platforms/<p>/lab.sh) are unchanged. .gitignore follows the move.
This commit is contained in:
Executable
+52
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
# kali-setup.sh — prepare a participant's Kali for the workshop.
|
||||
#
|
||||
# ./scripts/kali-setup.sh
|
||||
#
|
||||
# Installs the toolset used in the lab and copies the targeted wordlist to
|
||||
# /opt/norbourg/wordlists/. Safe to run twice.
|
||||
set -euo pipefail
|
||||
|
||||
HERE=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)
|
||||
WORDLIST="$HERE/wordlists/norbourg.txt"
|
||||
|
||||
info() { printf '[*] %s\n' "$*"; }
|
||||
ok() { printf '[ok] %s\n' "$*"; }
|
||||
warn() { printf '[!] %s\n' "$*" >&2; }
|
||||
|
||||
if [[ $EUID -eq 0 ]]; then
|
||||
SUDO=""
|
||||
else
|
||||
SUDO="sudo"
|
||||
fi
|
||||
|
||||
info "installing packages (this takes a few minutes)"
|
||||
$SUDO apt-get update -qq || warn "apt-get update failed, continuing"
|
||||
$SUDO DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
||||
netexec impacket-scripts bloodyad evil-winrm bloodhound.py \
|
||||
hashcat seclists smbclient dnsutils python3-pip \
|
||||
|| warn "some packages failed to install, see the list below"
|
||||
|
||||
info "installing the lab wordlist"
|
||||
$SUDO mkdir -p /opt/norbourg/wordlists
|
||||
$SUDO cp "$WORDLIST" /opt/norbourg/wordlists/norbourg.txt
|
||||
$SUDO chmod 0644 /opt/norbourg/wordlists/norbourg.txt
|
||||
|
||||
info "checking the toolset"
|
||||
check() {
|
||||
if command -v "$1" >/dev/null 2>&1; then
|
||||
ok "$1"
|
||||
else
|
||||
warn "$1 missing"
|
||||
fi
|
||||
}
|
||||
for tool in nxc netexec evil-winrm hashcat smbclient dig; do
|
||||
check "$tool"
|
||||
done
|
||||
command -v impacket-GetUserSPNs >/dev/null 2>&1 && ok "impacket-GetUserSPNs" \
|
||||
|| warn "impacket scripts missing (impacket-scripts)"
|
||||
command -v bloodhound-python >/dev/null 2>&1 && ok "bloodhound-python" \
|
||||
|| warn "bloodhound-python missing"
|
||||
|
||||
printf '\n'
|
||||
ok "done. Lab access is configured separately: see docs/prerequis.md"
|
||||
Reference in New Issue
Block a user