Skip to content
PSUT / IoTEngineering learning studio
WORKSPACE
Offline-first portalDr. Mohammad Alja’afreh
Cyber Defense StudioIoT Security and PrivacyExperimentsWorkspaces
ENGINEERING WORKSPACE
Home/WSL Laboratories/Kali WSL Security & Privacy Laboratory
PSUT IoT Engineering StudioPrincess Sumaya University for Technology · Dr. Mohammad Alja’afreh
WSL LABORATORIES / KALI LINUX / SECURITY & PRIVACY
IoT Security and Privacy

Kali IoT security laboratory

Eleven practical experiments using real command-line tools and actual cryptographic operations. Work only with the fictional telemetry and loopback listeners created for this laboratory.

IoT Security and Privacy setup

Target environmentKali WSLClient and target in the same distribution
Dedicated ports18884 / 18885Plain demo / authenticated TLS
Evidence0 / 11Manually recorded completion
One-time Kali installation and toolkit setup · expand
ONE-TIME SETUP

Prepare Kali WSL

Use your existing kali-linux distribution if installed. These experiments run entirely inside Kali, avoiding assumptions about cross-distribution networking. Ubuntu WSL and the existing toolkit remain independent.

PowerShell — list distributions
wsl --list --verbose
✓ Expected: A table of installed distributions, STATE and VERSION appears. Verify the intended distribution is listed with VERSION 2.
PowerShell — only if Kali is missing
wsl --install --distribution kali-linux
✓ Expected: Installation completes or Windows requests a restart. On first launch create your Linux username and password; the prompt resembles username@PC:~$. Verify the distribution with wsl -l -v (VERSION 2). WSL is a Linux environment, not a physical Raspberry Pi.
PowerShell — enter Kali
wsl -d kali-linux
✓ Expected: The selected Linux shell opens; on first launch complete account creation. The prompt ends in $. No physical board is connected by this command.
Kali — open Linux home in File Explorer
cd ~
explorer.exe .
✓ Expected: Your Linux home opens in Windows File Explorer. Extract the toolkit ZIP and copy its kali-labs directory here.

Download the course toolkit

Source files, one-time package installer, dependency check and practical test programs. Extract the archive before copying the folder to Kali.

Download Kali toolkit ↓

Why install packages?

Kali WSL is a base distribution. Install only the tools needed for this course; no full penetration-testing metapackage or desktop is required.

Official Kali package guide

Installed packages: Python 3, cryptography, Paho MQTT, OpenSSL, Mosquitto server and clients, Nmap, tcpdump, iproute2, CA certificates and unzip. No global pip install is used.

Package installation may start the distribution’s default Mosquitto service. Do not modify or stop existing services. The lab uses separate foreground instances on ports 18884 and 18885; if either port is occupied, stop and resolve the conflict with your instructor.

Copy the extracted kali-labs folder to your Kali home directory using File Explorer (run explorer.exe . from Kali). Keep it on the Linux filesystem, not under /mnt/c, so private-file permissions behave as expected.

Kali — enter toolkit folder
cd ~/kali-labs
✓ Expected: The prompt returns; pwd should display your Kali home followed by /kali-labs.
Kali — install dependencies once
bash setup_kali.sh
✓ Expected: APT completes and the script prints PASS: dependency checks. If it fails, resolve the missing dependency before starting K02. Internet access is required for APT.
Kali — verify dependencies after installation
bash verify_kali.sh
✓ Expected: Tool paths and package versions are printed; cryptography and Paho MQTT v2 callback support are available. This does not verify the broker.
Kali — inspect laboratory CLI
python3 lab.py --help
✓ Expected: Available actions include init, mqtt, tls, emit-plain, emit-tls, integrity, replay, crypto, privacy, permissions and capstone.

Download lab.py source · Read execution and cleanup notes

Scope and safety: use 127.0.0.1 only, ports 18884 and 18885 only, and synthetic samples only. Do not use these exercises against public brokers, campus networks or other devices. No real credentials or keys should enter student reports. WSL is not a hardened isolation boundary.

Course progression

01 / FoundationK01–K02 · WSL, service inventory, scope and configuration
02 / Secure networkingK03–K05 · identity, access control, TLS and traffic observation
03 / Data protectionK06–K08 · integrity, freshness, encryption, signatures and key agreement
04 / Privacy and hardeningK09–K10 · minimization, pseudonyms, local access control
05 / Integrated verificationK11 · validation of schema, signed manifest, threat and residual-risk register
06 / Evidence and cleanupRecord positive and negative outcomes, versions, scope, deviations and stop lab listeners
Technical references and alignment (not certification)

Experiment sequence

Follow K01 → K11
K01 · 20 minEnvironment & scopeOpen experiment →K02 · 30 minLocal broker & service inventoryOpen experiment →K03 · 35 minMQTT authentication & least privilegeOpen experiment →K04 · 25 minTLS certificate trust & endpoint identityOpen experiment →K05 · 35 minPlaintext vs TLS packet observationOpen experiment →K06 · 25 minHashing & HMAC telemetry integrityOpen experiment →K07 · 30 minAuthenticated freshness & replay protectionOpen experiment →K08 · 40 minAuthenticated encryption & signaturesOpen experiment →K09 · 25 minPrivacy-preserving telemetryOpen experiment →K10 · 20 minCredential & key protectionOpen experiment →K11 · 50 minThreat modeling & integrated security reviewOpen experiment →

Evidence notebook & cleanup

Export your own notes and completion marks separately from the JSON generated by the command-line programs. They are self-reported, not authenticated grades. Preserve logs and evidence JSON, never keys or passwords. Stop the two foreground brokers using Ctrl+C in terminals A and B; verify the two ports no longer listen. Keep the private directory for review; remove it manually only after backing up non-secret evidence.

Kali WSL documentation · Mosquitto configuration reference · Microsoft WSL networking

Optional advanced experiments

Advanced defensive verification

K18 · Kali WSL

K18 · Comparative AES-GCM and Ascon benchmarking

Measure both implementations under paired host conditions; distinguish implementation overhead from algorithm properties.

Open complete lab →
K19 · Kali WSL

K19 · Certificate revocation lifecycle

Verify certificate revocation using a signed CRL and independent positive and negative controls.

Open complete lab →
K20 · Kali WSL

K20 · Authenticated IoT gateway and defensive monitoring

Enforce bounded authenticated input, per-device freshness and log security decisions with a threshold alert.

Open complete lab →
V16.9 · new laboratory

Advanced Cybersecurity Range

Eight closed defensive experiments, independent local checks, a clickable prerequisite graph and notebook evidence.