🌐 Some Assembly Required 2
A detailed write-up of the Web challenge 'Some Assembly Required 2' from PicoCTF - 2021
📊 Challenge Overview
Category Details Additional Info 🏆 Event PicoGym Event Link 🔰 Category Web 🌐 💎 Points 500 Out of 500 total ⭐ Difficulty 🟡 Medium Personal Rating: 1/10 👤 Author Sears Schulz Profile 🎮 Solves (At the time of flag submission) 7.544 solve rate 📅 Date 21-02-2025 PicoGym 🦾 Solved By mH4ck3r0n3 Team:
📝 Challenge Information
🎯 Challenge Files & Infrastructure
Provided Files
1
Files: None
🔍 Initial Analysis
First Steps
Initially, the website appears as follows:
I immediately opened the network section of
ChromeDevTools
, given the previous challenge Some Assembly Required 1. I quickly found theWASM
file namedaD8SvhyVkb
, and the first thing I did was download it and runstrings
on it, just like I did for the first challenge in this series of three challenges:The last string immediately caught my attention, and I suspected it might be the flag, possibly encoded. So, let’s proceed with the exploitation phase.
🔬 Vulnerability Analysis
Potential Vulnerabilities
- XOR Encryption Weakness
🎯 Solution Path
Exploitation Steps
Initial setup
Having obtained the flag string, we can now proceed with the exploitation phase and decoding.
Exploitation
To analyze it, the first thing I did was insert it into CyberChef using the
Magic
filter withIntense Mode
enabled, which successfully revealed the valid flag. As we can see from the next CyberChef screenshot, the encoding was simply done using anXOR
operation with the character8
.
Flag capture
🛠️ Exploitation Process
Approach
The automatic exploit downloads the
wasm
file from the server, then usessubprocess
to executestrings
on the downloaded file. It then extracts the last string from the output, removing the+
character at the beginning. Finally, it applies anXOR
operation with the character8
and prints the flag.
🚩 Flag Capture
Flag
Proof of Execution
🔧 Tools Used
Tool Purpose Python Exploit Strings Static Analysis CyberChef Decoding
💡 Key Learnings
Time Optimization
When we have an encoded string, always try using the
Magic
filter andIntensive Mode
in CyberChef.
Skills Improved
- Binary Exploitation
- Reverse Engineering
- Web Exploitation
- Cryptography
- Forensics
- OSINT
- Miscellaneous
📚 References & Resources
[!info]+ Additional Information
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) | Challenge ranking | |
Points Earned | 500 | Team contribution |
Created: 21-02-2025 • Last Modified: 21-02-2025 *Author: mH4ck3r0n3 • Team: *