🌐 KnightCal
A detailed write-up of the Web challenge 'KnightCal' from KnightCTF - 2025
📊 Challenge Overview
Category Details Additional Info 🏆 Event KnightCTF - 2025 Event Link 🔰 Category Web 🌐 💎 Points 150 Out of XXXX total ⭐ Difficulty 🟢 Easy Personal Rating: 1/10 👤 Author NomanProdhan Profile 🎮 Solves (At the time of flag submission) 269 XX% solve rate 📅 Date 20-01-2025 KnightCTF - 2025 Day X 🦾 Solved By mH4ck3r0n3 Team: QnQSec
📝 Challenge Information
In the realm of ancient codes, only those who enumerate correctly can unveil the hidden flag. Craft your mathematical expressions wisely and uncover the secrets that lie within.
Flag Format: KCTF{FLaG_HeRe}
🎯 Challenge Files & Infrastructure
Provided Files
1
Files: None
🔍 Initial Analysis
First Steps
Initially, the website appears as follows:
by trying to enter something in the numeric input box and submitting, I get letters in the file name:
so, I assume it’s about finding the correct combination to print the contents of the file
flag.txt
.
🎯 Solution Path
Exploitation Steps
Initial setup
After understanding how it works, I moved on to the exploit, doing a bit of guessing on the letters to figure out which number corresponded to which letter.
Exploitation
After a couple of attempts, I came up with this:
continuing to experiment, I found the correct combination,
7195
, which allowed me to read theflag.txt
file.
Flag capture
🛠️ Exploitation Process
Approach
The exploit is very simple: it’s a POST request to the page where I pass the parameter expression=7195, which is the correct combination. Then, I extract the flag from the response text using bs4:
🚩 Flag Capture
Flag
Proof of Execution
🔧 Tools Used
Tool Purpose Python Exploit
💡 Key Learnings
Skills Improved
- Binary Exploitation
- Reverse Engineering
- Web Exploitation
- Cryptography
- Forensics
- OSINT
- Miscellaneous
📊 Final Statistics
Metric | Value | Notes |
---|---|---|
Time to Solve | 00:04 | From start to flag |
Global Ranking (At the time of flag submission) | 9/445 | Challenge ranking |
Points Earned | 150 | Team contribution |
Created: 20-01-2025 • Last Modified: 20-01-2025 Author: mH4ck3r0n3 • Team: QnQSec