Challenge Description

HNF26 Forgotten Page

I visited the target website at http://10.10.10.10:8009, but the homepage only displayed the text “Find Me”:

HNF26 Forgotten Page 2

With nothing else visible on the page, I checked the challenge description for a clue:

Description

A small site is still online, and it is crowded with forgotten pages. Most of them are noise. The pages that matter are the ones a crawler was told to skip. Put those pieces back together.

The reference to a crawler being told to skip pages pointed directly to /robots.txt. “Put those pieces back together” suggested combining data scattered across those restricted paths.

I opened /robots.txt and found a long list of disallowed pages:

User-agent: *
Disallow: /pages/c3pbhtyl.html
Disallow: /pages/1vnnmxfo.html
Disallow: /pages/1l879mpb.html
Disallow: /pages/bjpw6jo3.html
...
Disallow: /pages/1n6mlq8s.html
Disallow: /pages/y6x5n87k.html

Visiting one of the listed pages returned just a single character. Rather than querying each page manually, I wrote a Python script to request each endpoint in sequence and assemble the flag.

Preserve page order

The characters form the flag in the exact order listed in robots.txt, so the script needs to visit them sequentially.

Python
import requests
from bs4 import BeautifulSoup
 
base = "http://10.10.10.10:8009"
 
# Read the disallowed paths straight from robots.txt, in their original order
robots = requests.get(f"{base}/robots.txt", timeout=5).text
paths = [
    line.split(": ", 1)[1].strip()
    for line in robots.splitlines()
    if line.startswith("Disallow:")
]
 
flag = ""
for path in paths:
    response = requests.get(base + path, timeout=5)
    soup = BeautifulSoup(response.text, "html.parser")
 
    if soup.body:
        flag += soup.body.get_text(strip=True)
 
print(flag)

The script reads the disallowed paths from robots.txt itself, so they stay in the original order. It then extracts the text from each page’s body, strips whitespace, and concatenates the characters. Running it printed the completed flag:

Bash
┌──(kali㉿kali-wsl)-[~]
└─$ python3 script.py
HNF26{forgotten_subdomains_are_not_forgotten_forever}

Flag

HNF26{forgotten_subdomains_are_not_forgotten_forever}

Similar