root@thehacksparrow:~/writeups$ SYSTEM ONLINE
root@sparrow:~/writeups$ cat extract.md
// Offensive

Extract

19 May 2023 · 9 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.php reaches internal services, the gopher protocol turns that SSRF into a proxy against a Next.js app bound only to localhost, 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.
PlatformTryHackMe
Operating systemLinux
DifficultyHard
RoomExtract
Target IP10.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 compromise

1. 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.133

Relevant ports:

PortServiceVersion
22/tcpSSHOpenSSH 9.6p1
80/tcpHTTPApache 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

This content is Root Access only. Everything else on the site — the free tier, the whole public library — stays open.

See Root Access plans

No account? Create one free then upgrade from your console.