2024 Business CTF - Vault of Hope: Survivor
Challenge Information
| Attribute | Details |
|---|---|
| Event | 2024 Business CTF - Vault of Hope |
| Category | Full Penetration Test |
| Challenge | Survivor |
| Difficulty | Hard |
Summary
Survivor is a full penetration test challenge targeting an Ubuntu Linux server with SSH and HTTP services exposed. The challenge requires port scanning, service enumeration, vulnerability identification, and exploitation to achieve remote code execution and system access. Participants must navigate through multiple attack vectors to compromise the target system.
Analysis
Initial Reconnaissance:
-
Port Scanning:
Terminal window nmap -sC -sV 10.129.231.187Results:
- Port 22: OpenSSH 8.9p1 Ubuntu 3ubuntu0.7
- Port 80: nginx 1.18.0 (Ubuntu)
- Service info: Ubuntu Linux
-
Service Details:
- SSH running on standard port 22
- HTTP server redirecting to
survivor.htbhostname - nginx 1.18.0 (potential version-based vulnerabilities)
-
Port Discovery:
- Full TCP port scan reveals only ports 22 and 80 open
- No obvious RDP or other remote access services
Solution
Phase 1: HTTP Enumeration
-
Virtual Host Resolution:
Terminal window echo "10.129.231.187 survivor.htb" >> /etc/hostscurl http://survivor.htb -
Web Content Discovery:
Terminal window nmap -sC -sV 10.129.231.187# Analyze HTTP response headers and content -
Directory Brute-Forcing (if needed):
Terminal window gobuster dir -u http://survivor.htb -w /usr/share/wordlists/dirb/common.txt
Phase 2: SSH Enumeration
-
SSH Banner Grabbing:
Terminal window ssh -v survivor.htb# Reveals: OpenSSH 8.9p1 Ubuntu 3ubuntu0.7 -
Check for Known SSH Vulnerabilities:
- OpenSSH 8.9p1 is relatively recent with limited known exploits
- Password-based brute-forcing may be necessary
-
Username Enumeration:
Terminal window # Attempt common usernames: root, administrator, ubuntu, survivor
Phase 3: Web Application Exploitation
Depending on the web application discovered:
-
Identify Technologies:
- nginx 1.18.0
- Backend technology (PHP, Node.js, Python, etc.)
-
Look for Common Vulnerabilities:
- SQL Injection
- Cross-Site Scripting (XSS)
- Command Injection
- Arbitrary File Upload
- Path Traversal
-
Exploit Web Vulnerabilities:
- Execute remote code if applicable
- Establish reverse shell connection
Phase 4: Credential Discovery
-
Default Credentials Testing:
- Common default credentials for services found
- Weak password patterns
-
Credential Extraction:
- From web application databases
- Configuration files
- Application source code
Phase 5: Initial Access
Options depending on discovered vulnerabilities:
-
Web-Based RCE:
Terminal window # Execute command injection or PHP injection# Establish reverse shell -
SSH Access:
Terminal window # Use discovered/brute-forced credentialsssh user@survivor.htb -
File Upload Exploitation:
Terminal window # Upload shell if file upload vulnerability exists
Phase 6: Privilege Escalation
-
Initial User Enumeration:
Terminal window whoamiidgroups -
Sudo Capabilities:
Terminal window sudo -l -
Kernel Exploits:
Terminal window uname -a# Check for known Linux kernel vulnerabilities -
SUID Binaries:
Terminal window find / -perm -4000 2>/dev/null -
Privilege Escalation Methods:
- SUDO misconfiguration exploitation
- Kernel vulnerability exploitation
- SUID binary abuse
- Cron job hijacking
Phase 7: Proof of Compromise
Capture system flags:
cat /root/root.txtcat /home/*/user.txtKey Techniques
- Port scanning to identify exposed services
- Virtual host enumeration for web applications
- Service fingerprinting to identify software versions
- Vulnerability research based on identified versions
- Exploitation of discovered vulnerabilities
- Reverse shell establishment for interactive access
- Privilege escalation through system misconfiguration or kernel exploits
Key Takeaways
- Initial reconnaissance is critical for understanding attack surface
- Default credentials and weak passwords should be checked first
- Service-specific vulnerabilities depend on version information
- Both web and network-based attack vectors must be considered
- Privilege escalation often involves finding system misconfigurations
- Proof of exploitation requires capturing sensitive system files
- Ubuntu systems typically have ssh and web services as primary entry points
- Kernel version identification is essential for privilege escalation planning