Hook

MediumWeb Security

Overview

A protected file is accessible only through the provided web endpoint. Your task is to interact with the service and recover that file flag format: flag{}

Lab Details

Prerequisites & Requirements

  • Understanding HTTP requests (GET/POST), how web servers handle requests, and basic API interactions
  • Familiarity with SSRF (Server-Side Request Forgery) and why it's dangerous
  • How domain name resolution works, what TTL means, and the basics of DNS caching
  • Ability to read and understand Python/Flask code
  • Understanding of IP addresses, private vs public IP ranges, and localhost

What will you learn?

  • DNS Rebinding Attacks: A sophisticated technique to bypass IP-based security controls
  • Time-of-Check to Time-of-Use (TOCTOU) Vulnerabilities and the gap between validation and execution
  • SSRF Bypass Techniques and how to circumvent common protections that rely on DNS resolution
  • Code Auditing: Identifying security flaws in server-side code by analyzing logic flow

Tools

  • Python 3.x for running the exploit script
  • requests library for making HTTP requests programmatically
  • rbndr.us: DNS Rebinding service (no setup required)
  • cURL / Browser for manual testing and interaction
  • Text Editor / IDE for analyzing the source code

Job Positions

Penetration Tester

Tags

SsrfSource Code ReviewLogic FlawRace ConditionPython