Offensive Security Training - Professional CTF Challenges
This repository contains 9 professional-grade CTF challenges designed to test and develop critical Linux system administration and penetration testing skills. Each challenge focuses on real-world scenarios inspired by Offensive Security training materials.
Perfect for:
- π― OSCP/PEN-100 exam preparation
- πΌ Linux system administrator skill development
- π Security researcher training
- π Cybersecurity students and professionals
# Clone the repository
git clone https://github.com/sermikr0/Linux-CTFs.git
cd Linux-CTFs
# Make all scripts executable
chmod +x *.sh
# Run your first challenge
./build-script-symlink.sh| # | Challenge Name | File | Difficulty | Skills |
|---|---|---|---|---|
| 1.1 | Symlink Maze | build-script-symlink.sh |
ββββ | Symlinks, Navigation |
| 2.1 | Command Line Puzzle | build-script-command-basics.sh |
ββββ | Bash Scripting, Loops |
| 2.2 | History Forensics | build-script-history.sh |
ββββ | Decryption, Forensics |
| 3.1 | Man Page RE | build-script-manual-page.sh |
ββββ | Documentation, Parsing |
| 4.1 | Memory Forensics | build-script-filesystem.sh |
βββββ | Process Memory, /proc |
| 7.1 | Real-time Pipes | build-script-piping_and_redirection.sh |
βββββ | FIFO, Streaming |
| 7.2 | File Descriptors | build-script-piping_and_redirection_2.sh |
βββββ | FD Manipulation |
| 8.1 | Advanced Regex | build-script_searching_and_text_manipulation.sh |
βββββ | Regex, 1GB File |
| 8.2 | Binary Manipulation | build-script_searching_and_text_manipulation_2.sh |
βββββ | Binary Analysis |
Navigate through a complex maze of symbolic links with circular references and broken links.
Flag: FLAG{symlink_maze_survivor}
Time: 30-45 minutes
Skills: ls, readlink, stat, find
Extract flag from 1000 files where each character is hidden in the first letter of filenames.
Flag: FLAG{cli_scripting_legend}
Time: 45-60 minutes
Skills: Bash loops, grep, awk, cut, sort
Decode 3-layer obfuscated command (Base64 β Hex β ROT13) hidden in 10,000+ bash history entries.
Flag: FLAG{history_forensics_expert}
Time: 30-60 minutes
Skills: base64, xxd, tr, multi-layer decryption
Extract ASCII art flag from custom man page groff source code.
Flag: FLAG{man_page_reverse_engineer}
Time: 30-45 minutes
Skills: man, zcat, groff, text parsing
Extract flag from running process memory using /proc virtual filesystem.
Flag: FLAG{proc_memory_forensics}
Time: 45-60 minutes
Skills: ps, /proc/[PID]/mem, strings, memory analysis
Process 1000+ log entries per second through named pipe to decode 10 flag parts with different encodings.
Flag: FLAG{realtime_pipe_master}
Time: 45-60 minutes
Skills: mkfifo, Python, real-time processing, multi-encoding
Navigate 7 nested subshells with custom file descriptors (FD 3-20) to collect flag parts.
Flag: FLAG{fd_manipulation_wizard}
Time: 45-60 minutes
Skills: exec, FD manipulation, process substitution, nested subshells
Process 1GB log file with 50 flag parts using advanced regex patterns including lookahead, lookbehind, and backreferences.
Flag: FLAG{advanced_regex_overlord}
Time: 60-90 minutes
Skills: Python re, PCRE, lookahead/lookbehind, memory-efficient processing
Extract 5 flag parts from mixed binary file containing text, hex, base64, gzip, and XOR-encoded data.
Flag: FLAG{text_binary_manipulation_deity}
Time: 45-60 minutes
Skills: xxd, dd, base64, gzip, XOR decryption
- OS: Linux (Kali Linux, Ubuntu, Debian)
- Disk Space: 2GB+ (1GB for CTF 8.1)
- RAM: 2GB minimum, 4GB recommended
- Permissions:
sudoaccess required for some challenges
Most tools are pre-installed on Kali Linux:
# Verify installations
which gcc python3 base64 gzip xxd sed awk grep
# Install if missing
sudo apt update
sudo apt install -y gcc python3 coreutils gzip xxd# Example: Start CTF 1.1
./build-script-symlink.shThe script will:
- Display challenge information
- Create the CTF environment
- Show starting location
- Provide optional hints
Use your Linux skills to find the flag! Each challenge requires different techniques.
# Always run cleanup when finished
/tmp/cleanup_ctf_X_X.shβ DO:
- Read challenge descriptions carefully
- Check starting locations first
- Use
manpages for command help - Take notes on your approach
- Experiment in isolated environments
β DON'T:
- Skip cleanup scripts (can fill disk space)
- Use excessive
sudowithout understanding - Give up too quickly - struggle builds skills!
- Run unknown commands without reading them first
CTF 1.1 - Symlink Maze:
cd /dev/shm/.secrets/
ls -la
readlink link1
# Follow the chain to find the flagCTF 2.1 - Command Line:
cd /opt/challenge/
for i in {001..026}; do
ls | grep "^.${i}_" | cut -c1
done | tr -d '\n'CTF 4.1 - Process Memory:
ps aux | grep secret_daemon
PID=<found_pid>
sudo strings /proc/$PID/mem | grep FLAGStart with these to build foundational skills:
- CTF 1.1 - Symlink Maze
- CTF 2.1 - Command Line Puzzle
- CTF 3.1 - Man Page Reverse Engineering
Progress to more complex challenges:
- CTF 2.2 - History Forensics
- CTF 4.1 - Memory Forensics
- CTF 8.2 - Binary Manipulation
Master the most challenging scenarios:
- CTF 7.1 - Real-time Processing
- CTF 7.2 - File Descriptors
- CTF 8.1 - Advanced Regex (1GB)
Problem: Permission denied when running scripts
chmod +x build-script-*.shProblem: Command not found
sudo apt install -y <tool-name>Problem: Out of disk space (CTF 8.1)
df -h /tmp
sudo apt cleanProblem: Challenge won't cleanup properly
# Manual cleanup
sudo rm -rf /tmp/ctf_*
sudo rm -rf /opt/challenge
sudo rm -rf /dev/shm/.secretsProblem: Process still running after cleanup
ps aux | grep ctf
kill <PID>Track your completed challenges:
- CTF 1.1 - Symlink Maze
- CTF 2.1 - Command Line Basics
- CTF 2.2 - History Forensics
- CTF 3.1 - Man Page Reverse Engineering
- CTF 4.1 - Process Memory Forensics
- CTF 7.1 - Real-time Pipe Processing
- CTF 7.2 - File Descriptor Manipulation
- CTF 8.1 - Advanced Regex
- CTF 8.2 - Binary Manipulation
π Complete all 9 to become a Linux CTF Master!
Contributions are welcome! Here's how you can help:
- π Report bugs or issues
- π‘ Suggest new challenges
- π Improve documentation
- π§ Submit bug fixes
- β Star the repository
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-challenge) - Make your changes
- Test thoroughly
- Commit (
git commit -m 'Add new challenge') - Push (
git push origin feature/new-challenge) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
TL;DR: You can use, modify, and distribute this code freely. Just keep the license notice.
Special thanks to:
- Offensive Security - For PEN-100 course inspiration
- Linux Community - For amazing tools and documentation
- CTF Community - For challenge design patterns and ideas
- Contributors - Everyone who helps improve these challenges
Author: Sermikro CTF
Email: saidakbarxonmaqsudxonov4@gmail.com
Repository: github.com/sermikr0/Linux-CTFs
- π Bug Reports: Open an Issue
- π¬ Questions: Use GitHub Discussions
- π§ Email: saidakbarxonmaqsudxonov4@gmail.com
If you found these challenges helpful, please:
- β Star this repository
- π Share with others
- π Report issues
- π‘ Suggest improvements
"The best way to learn is by doing. These challenges will push your limits - embrace the struggle!"
Remember:
- π Read error messages carefully
- π RTFM (Read The Fine Manual)
- π‘ Think creatively and outside the box
- π§ͺ Experiment safely in isolated environments
- π Learn from every failure
- π Persistence beats resistance
Version: 1.0.0
Last Updated: November 2025
Status: β
Production Ready
Happy Hacking! π