Home Project Archive Internship Download CV LinkedIn
Lab Design · Case Study 03

The Cyber Dojo —
Adversarial Lab

A fully isolated VirtualBox environment with an intentionally vulnerable Ubuntu target — engineered for safe exploitation, privilege escalation practice, and hardening analysis without touching live systems.

Lab Design SUID Escalation SMB Exploitation SSH Brute-Force Linux Network Isolation
Case IDDOJO-04
TypeIsolated attack lab
TargetUbuntu / SMB / SSH
FinishRoot via SUID chain

The Architecture

A true security professional needs a safe, isolated place to fail, learn, and succeed. The Cyber Dojo is a fully isolated virtual laboratory built on VirtualBox with Host-Only adapters — creating a walled garden where traffic cannot leak to the LAN or internet under any circumstances.

The lab consists of two machines: a Kali Linux attacker and a custom Ubuntu Server target engineered with deliberate, realistic vulnerabilities that mirror common corporate misconfigurations.

Engineering the Target

The Ubuntu Server was built from scratch and hardened in reverse — intentional flaws were introduced methodically so each vulnerability could be exploited cleanly and the corresponding fix documented.

Weakened SSH Configuration
Critical
PermitRootLogin yes and PasswordAuthentication yes set in /etc/ssh/sshd_config. Weak user noob:password123 and root with trivial password created.
Disable password authentication, enforce key-only auth, set PermitRootLogin no, and remove all default/weak accounts.
Unauthenticated Samba Share
Critical
Anonymous SMB share mapped to /var/www/html with guest ok = yes, writable = yes, and force user = root — any guest upload gains root file ownership on the web root.
Restrict SMB write access with proper authentication, never map shares to the web root, and remove force user = root from all configurations.
SUID Bit on /usr/bin/find
High
chmod u+s /usr/bin/find allows any user to invoke find with root-level execution via the -exec flag — trivially spawning a root shell.
Remove unnecessary SUID bits. Audit regularly with find / -perm -4000 -type f and apply least-privilege to all binaries.

Attack Chain: Entry to Root

01
SSH Brute-Force — Initial Access
Used Hydra with a focused custom wordlist against the SSH service. PermitRootLogin and password auth enabled — low-privilege account noob compromised. Foothold established as a standard user.
02
Samba Abuse — Lateral Persistence
Discovered anonymous Samba share mapped to /var/www/html via SMB enumeration. Uploaded a PHP reverse shell through the open share. force user = root meant the file landed with root ownership — reverse shell executed via the web server.
03
SUID find — Privilege Escalation to Root
Enumerated SUID binaries. Found /usr/bin/find with SUID bit set. Exploited via GTFOBins technique to spawn a root shell — privilege escalation complete.

SUID Escalation Command

GTFOBins — find SUID exploit
# Enumerate SUID binaries first
find / -perm -4000 -type f 2>/dev/null

# Exploit — spawns root shell via -exec
/usr/bin/find . -exec /bin/sh -p \;

# Confirm
id
uid=0(root) gid=0(root) groups=0(root)

Documentation Output

Each vulnerability was documented with reproduction steps, impact analysis, and hardening guidance — producing a structured manual that can be used to rebuild the machine from scratch and re-test after remediation.