root@sparrow:~/writeups$ cat extract.md
// Offensive
Extract
19 May 2023
· 5 min read
· root access
Executive summary — Extract is a TryHackMe Hard room that isn't solved by a single bug but by chaining web vulnerabilities: an SSRF in/preview.phpreaches internal services, the gopher protocol turns that SSRF into a proxy against a Next.js app bound only tolocalhost, a Next.js authentication bypass (CVE-2025-29927) hands over the first flag plus a set of credentials, and finally tampering with a poorly designed 2FA cookie unlocks the management panel and the second flag. A very realistic SSRF → Gopher → Auth bypass → 2FA bypass path.
| Platform | TryHackMe |
| Operating system | Linux |
| Difficulty | Hard |
| Room | Extract |
| Target IP | 10.10.212.133 |
Attack map
[80/HTTP] TryBookMe — Online Library
│ /preview.php?url= → SSRF (http:// and gopher:// OK, file:// blocked)
▼
[SSRF] internal port scan (ffuf) → 127.0.0.1:10000
│ Next.js app reachable only from localhost
▼
[Next.js:10000] gopher:// proxy + x-middleware-subrequest header
│ CVE-2025-29927 (authentication bypass) → /customapi
▼
[Flag 1 + credentials] librarian:L[REDACTED]!
│ SSRF proxy to :80 /management/ (IP-restriction bypass)
▼
[2FA cookie] AuthToken validated b:0 → b:1
▼
[Flag 2] full compromise1. Reconnaissance
We start by mapping the attack surface with an nmap scan (default scripts + version detection) across every port:
nmap -T4 -n -sC -sV -Pn -p- 10.10.212.133Relevant ports:
| Port | Service | Version |
|---|---|---|
| 22/tcp | SSH | OpenSSH 9.6p1 |
| 80/tcp | HTTP | Apache 2.4.58 |
Analysis: with a well-patched SSH and a single web port exposed, the entry vector is almost certainly the web application. All initial enumeration focuses there.
🔒 Clearance required
Root Access unlocks the content you can't see — everything else on the site is already open.
See Root Access plansNo account? Create one free then upgrade from your console.