MoriartyPuth-Labs/CNCC-2026-WriteUp
GitHub: MoriartyPuth-Labs/CNCC-2026-WriteUp
柬埔寨国家网络安全竞赛 2026 的完整 CTF 解题报告,涵盖 Web、Pwn、Crypto、Reversing 等方向的六道挑战,包含可运行的 exploit 脚本和详细复现步骤。
Stars: 0 | Forks: 0
# CNCC 2026 — CTF Writeups
包含概念验证代码、复现步骤和工具的完整 Writeup。**点击挑战名称以打开其 Writeup。**
| # | 挑战 | 类别 | Flag |
|---|-----------|----------|------|
| 1 | [**IndigoNotes**](writeups/indigonotes/) | Web — NoSQL Injection + Mass Assignment | `MPTC{mforst3r1ng_nosql_1nject10n_in_2026_05ad360526c}` |
| 2 | [**SpeedRun**](writeups/speedrun/) | Pwn — Stack overflow / ret2win (PIE leak) | `MPTC{sw34ty_p4lms_fr4m3_p3rf3ct_n3w_pb}` |
| 3 | [**OffTheRecord**](writeups/offtherecord/) | Pwn — Format string arbitrary read | `MPTC{th3_1nt3rn_15_n0t_g3tt1ng_4_r41s3}` |
| 4 | [**TrojanHorse**](writeups/trojanhorse/) | Crypto/Pwn — Custom protocol + RSA CRT fault (Bellcore) | `MPTC{n3v3r_tru5t_4_p4t13nt_gr33k_b34r1ng_g1ft5}` |
| 5 | [**nevergonna**](writeups/nevergonna/) | Reversing — PyInstaller unpack + XOR-chain cipher | `MPTC{n3v3r_g0nn4_g1v3_y0u_up}` |
| 6 | [**DeathNote**](writeups/deathnote/) | Reversing — garble-obfuscated Go, custom 6-round cipher (decoy trap) | `MPTC{4ll_4cc0rd1ng_t0_k3ik4ku}` |
每个文件夹都包含一个独立的 `README.md` writeup 以及可运行的 `solve.py` / `solve.sh`。
```
writeups/
├── indigonotes/ README.md + solve.sh
├── speedrun/ README.md + solve.py
├── offtherecord/ README.md + solve.py
├── trojanhorse/ README.md + solve.py
├── nevergonna/ README.md + solve.py
└── deathnote/ README.md + solve.py / extract.py / confirm.py
```
## 使用的工具(全局)
- **Recon / HTTP:** `curl`,浏览器 User-Agent 伪造
- **Reversing:** Python 3.11 + [`capstone`](https://www.capstone-engine.org/)、[`pyelftools`](https://github.com/eliben/pyelftools)、`marshal`+`dis`(用于 `.pyc`)、[`pyinstxtractor`](https://github.com/extremecoders-re/pyinstxtractor)、GDB + Python API(用于 garble-obfuscated Go)
- **Pwn / 脚本编写:** 原生 Python `socket`、`struct`、`hashlib`、`openssl`
- **Crypto:** 自定义的 ARX permutation / sponge MAC 的 Python 重实现,以及 RSA fault-attack 数学计算(`math.gcd`、`pow(e,-1,m)`)
```
python -m pip install capstone pyelftools
curl -sL https://raw.githubusercontent.com/extremecoders-re/pyinstxtractor/master/pyinstxtractor.py -o pyinstxtractor.py
```
## 经验 / 总结
- **#1 IndigoNotes** — 永远不要将无类型的 JSON 直接传递给 (No)SQL 查询;强制执行对象属性级别的 authz;在*每一个*路径上应用输出过滤。
- **#2 SpeedRun** — 单个带内文本指针泄露即可攻破 PIE;partial overwrites 并不是唯一的选项。
- **#3 OffTheRecord** — `printf(user)` 永远意味着游戏结束;一个可预测的 stack pointer 就足以泄露基地址。
- **#4 TrojanHorse** — 自己编写 Crypto + CRT signing oracle = Bellcore fault → 瞬间实现 RSA factorization。
- **#5 nevergonna** — PyInstaller 只是一个 zip;bytecode 反汇编胜过与反编译器搏斗;可逆密码可以轻松反转。
- **#6 DeathNote** — garble 的 pclntab 混淆会被 RBP-frame stack walking 击败;不要相信第一个触及的 flag(诱饵陷阱)——反转*真正*的目标。
## 👤 作者
**Eav Puthcambo**
AUPP Cybersecurity Programme
American University of Phnom Penh [](https://github.com/MoriartyPuth-Labs)
AUPP Cybersecurity Programme
American University of Phnom Penh [](https://github.com/MoriartyPuth-Labs)
标签:DNS 反向解析, Web安全, Writeup, XXE攻击, 二进制利用, 云资产清单, 密码学, 手动系统调用, 蓝队分析, 逆向工具, 逆向工程