A Capture The Flag (CTF) challenge that simulates real-world privilege escalation in a Linux system, using authentic RCE (Remote Code Execution) and privilege escalation techniques with a complete web interface.
Obtain the flag located at /root/flag.txt using:
- Cryptanalysis to access the vulnerable endpoint
- RCE exploitation through PyYAML
- Real privilege escalation using SUID techniques
- Data exfiltration to web-accessible directory
solutions/SOLUTION.md- Complete step-by-step solutionsolutions/exploit.py- Automated exploit script
Complete the challenge first, then check the solutions!
- Docker
- Docker Compose
- Linux system (or WSL2 on Windows)
# Clone the repository
git clone <your-repo-url>
cd hackfest-ctf
# Deploy with Docker
sudo docker-compose up -d
# Verify it's working
curl http://localhost:3000/- ๐ Web Interface: http://localhost:3000 (Graphical CTF interface)
- ๐ API Endpoint: http://localhost:3000/api/system (For direct API exploitation)
# Check that services are running
sudo docker ps | grep hackfest
# View logs if there are issues
sudo docker-compose logs- Navigate to: http://localhost:3000
- Explore the different sections:
- ๐ Home: Information about the compromised festival
- ๐ป System: Reconnaissance and enumeration
- ๐ก Hints: Encrypted Caesar cipher messages
- Use the information gathered to perform manual exploits
- Use curl commands directly against http://localhost:3000
- Discover and exploit vulnerabilities manually
- Follow your own methodology and reconnaissance
This CTF teaches real-world techniques:
- ๐ Cryptanalysis: Caesar cipher decryption
- ๐ป RCE: PyYAML unsafe load exploitation
- โฌ๏ธ Privilege Escalation: SUID binaries exploitation
- ๐ค Data Exfiltration: File copying to web-accessible directories
- ๐ Post-Exploitation: System enumeration after compromise
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Frontend โ โ Backend โ
โ (React) โโโโโโ (Flask) โ
โ Port: 3000 โ โ Internal โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโโ โโโโโโโโโโโ
โ Nginx โ โ Python โ
โ Proxy โ โ App โ
โโโโโโโโโโโ โโโโโโโโโโโ
hackfest-ctf/
โโโ frontend/ # React + Nginx Frontend
โโโ backend/ # Flask + Python Backend
โโโ solutions/ # ๐จ SPOILER: Solution files
โ โโโ SOLUTION.md # Complete walkthrough
โ โโโ exploit.py # Automated exploit
โโโ docker-compose.yml # Docker configuration
โโโ README.md # This file
The flag follows the format: HACKFEST{...}
- EDUCATIONAL USE ONLY: Contains intentional vulnerabilities
- ISOLATED ENVIRONMENT: Run only in Docker containers
- REAL TECHNIQUES: All vulnerabilities are from the real world
- NO ARTIFICIAL MECHANISMS: No fake or magical files
Feel free to:
- Report bugs or issues
- Suggest improvements
- Add new challenges
- Improve documentation
This project is for educational purposes. Use responsibly.
๐ฏ Prove your real-world hacking skills with authentic pentesting techniques!