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.
$ 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:
| Scenario | Action |
|---|---|
| GORGE | STOP |
| PHREAK | DROP |
| FIRE | ROLL |
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:
- Interactivity — the server expects an immediate response to each scenario
- Scenario format — scenarios can be on the same line as "What do you do?" or on a separate line
- Response format — individual actions are joined by hyphens, no spaces
- Completion — the flag appears after successfully completing several rounds
Solution
Strategy
- Use pwntools for stable interactive connection
- Create a dictionary mapping scenarios to actions
- Parse incoming data, extracting keywords GORGE/PHREAK/FIRE
- Form responses in the required format
- 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
- [misc][free]PyDome— HackTheBox
- [forensics][free]Phreaky— HackTheBox
- [misc][free]Character— hackthebox
- [gamepwn][free]NoMap3D— HackTheBox
- [misc][Pro]Игра (Game)— hackerlab