miscfreeeasy

Stop Drop and Roll

hackthebox

Task: Interactive text game requiring automated responses to scenarios (GORGE→STOP, PHREAK→DROP, FIRE→ROLL). Solution: Used pwntools for interactive connection and regex parsing to extract scenarios and send correct responses.

$ ls tags/ techniques/
interactive_exploitationstring_parsing

$ cat /etc/rate-limit

Rate limit reached (20 reads/hour per IP). Showing preview only — full content returns at the next hour roll-over.

Stop Drop and Roll — HTB

Description

An interactive HackTheBox challenge featuring a text-based game "The Fray: The Video Game". The player must respond to various scenarios with the correct actions:

ScenarioAction
GORGESTOP
PHREAKDROP
FIREROLL

When multiple scenarios are presented together (e.g., "GORGE, FIRE, PHREAK"), the response should be "STOP-ROLL-DROP" (actions joined by hyphens).

Reconnaissance

Connecting to the Service

nc 94.237.120.233 51681

Upon connection, we receive a prompt to start the game:

Welcome to The Fray: The Video Game!

We will present you with various scenarios that you must react to.
If you have any questions, please direct them to the organisers.
Do you want to start? (y/n):

After sending 'y', the game starts with an endless stream of scenarios:

What do you do?
GORGE

Your response:

Protocol Analysis

Key observations:

  1. Interactivity — the server expects an immediate response to each scenario
  2. Scenario format — scenarios can be on the same line as "What do you do?" or on a separate line
  3. Response format — individual actions are joined by hyphens, no spaces
  4. Completion — the flag appears after successfully completing several rounds

Solution

Strategy

  1. Use pwntools for stable interactive connection
  2. Create a dictionary mapping scenarios to actions
  3. Parse incoming data, extracting keywords GORGE/PHREAK/FIRE
  4. Form responses in the required format
  5. Continue until receiving the flag

Implementation

#!/usr/bin/env python3 """ HTB - Stop Drop and Roll Interactive challenge solution using pwntools. The challenge simulates a video game where the player must respond to scenarios with correct actions: - GORGE → STOP - PHREAK → DROP - FIRE → ROLL """ ...

$ grep --similar

Similar writeups