root@sparrow:~/writeups$ cat opensecret.md
// writeups
OpenSecret
26 Jan 2026
· 1 min read
A ticketing portal name-drops JWT as a red herring. The flag is hardcoded in the client-side JavaScript — readable in DevTools ▸ Sources without ever touching the token.
Challenge overview
| Field | Value |
|---|---|
| Platform | Hack The Box · Challenge |
| Category | Web |
| Difficulty | Very Easy |
| State | Retired |
Attack map
[Web] helpdesk portal
│
▼
[DevTools ▸ Sources] .js files
│
▼
[JS] hardcoded flag
│
▼
[FLAG]
1. Don't take the bait
The description talks JWT (alg:none, weak secret, role escalation). Before going down that road, the golden web rule is to check the client code first.
2. Open Sources in DevTools
The Sources tab lists every JS/HTML file the browser downloaded. That's where developers accidentally leave secrets.
# F12 ▸ Sources ▸ abrir index / *.js3. Find the hardcoded flag
const secret = "HTB{0p3n_s3cr3ts_ar3_n0t_s3cr3ts}";4. Flag
HTB{0p3n_s3cr3ts_ar3_n0t_s3cr3ts}The name OpenSecret was the hint: a secret in the frontend isn't a secret.
Chain summary
| Phase | Component | Vulnerability | Impact |
|---|---|---|---|
| Recon | Client-side JavaScript | Hardcoded secret | Flag exposed in the browser |
Lessons learned
- Everything that reaches the browser — JS, HTML, comments, localStorage — is accessible to the user.
- On a "Very Easy" web, check Sources, comments, LocalStorage/SessionStorage and Network before attacking the logic.
- Red herrings (JWT here) exist to waste your time — always start with the simple path.