๐ Apriti Sesamo
A detailed write-up of the Web challenge 'Apriti Sesamo' from PicoCTF - 2025
๐ Challenge Overview
Category Details Additional Info ๐ Event PicoCTF - 2025 Event Link ๐ฐ Category Web ๐ ๐ Points 300 Out of 500 total โญ Difficulty ๐ก Medium Personal Rating: 2/10 ๐ค Author Junias Bonou Profile ๐ฎ Solves (At the time of flag submission) 627 solve rate ๐ Date 12-03-2025 PicoCTF - 2025 ๐ฆพ Solved By mH4ck3r0n3 Team:
๐ Challenge Information
I found a web app that claims to be impossible to hack! Try it here!
๐ฏ Challenge Files & Infrastructure
Provided Files
1
Files: None
๐ Initial Analysis
First Steps
Initially, the website appears as follows:
Clicking on the
Login
button, I was redirected to the following page:Inspecting the page source, I didn’t find anything interesting, so I decided to inspect the request using
burpsuite
:Since there’s not much information provided here, I considered a possible bypass with a
PHP Type Confusion
. Let’s move on to the exploitation phase.
๐ฌ Vulnerability Analysis
Potential Vulnerabilities
- PHP Type Confusion
- PHP Type Juggling
๐ฏ Solution Path
Exploitation Steps
Initial setup
In PHP, when using the weak comparison operator (
==
), the values being compared are type-converted before the comparison (which doesn’t happen with===
). By sending a data type different from the one used for comparison, you can trigger strange behaviors that result in aTrue
comparison, allowing you to bypass restrictions.
Exploitation
The exploitation is quite simple. Instead of sending a string (as shown in the BurpSuite screenshot), I sent an array in this way:
username[]=&pwd[]=a
, for example. Once the comparison is made and type juggling occurs, I achieved the bypass and, consequently, obtained the flag.
Flag capture
๐ ๏ธ Exploitation Process
Approach
The automatic exploit sends a POST request with the parameters
username[]=&pwd[]=a
to leverage the type confusion and extracts the flag from the response using a regex.
๐ฉ Flag Capture
FlagpicoCTF{w3Ll_d3sErV3d_Ch4mp_b88bdb32}
Proof of Execution
๐ง Tools Used
Tool Purpose Python Exploit
๐ก Key Learnings
Time Optimization
- When there are
if
statements with comparisons (==
) of manipulable parameters, always try to bypass them using type confusion.
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:02 | From start to flag |
Global Ranking (At the time of flag submission) | 1900/9697 | Challenge ranking |
Points Earned | 300 | Team contribution |
Created: 12-03-2025 โข Last Modified: 12-03-2025 *Author: mH4ck3r0n3 โข Team: *