Eternal Loop
D3v0o0Nu119/2/20261 min read
#misc#htb#easy
Eternal Loop
Platform: HackTheBox | Category: Misc | Difficulty: Easy | Author: D3v0o0Nu11 | Date: 2026-02-10
Description
Can you find a way out of this loop?
Solution Approach
Core idea: Identify the weakness from source review or fingerprinting first. Iterate with incremental payloads instead of guessing.
Steps
-
First, unzip the
.zipfile given. -
Hmm.. Let's unzip it again.
-
It seems we can't enter the same password as before.
-
Let's use
fcrackzipthen. -
Got no result, so i tried to unzip it using it's own name as the password. Turns out got it right!
-
Let's keep going.
-
Seems we need to automate this. So i did a small outsource on the internet for a script to automate this unzipping. Found this bash script.
sh read-only • copy allowed#!/bin/bash ZIPFILE=$1 RESULT=0 while [ $RESULT -eq 0 ] do PASSWORD=$( unzip -l $ZIPFILE | grep -E "^\s+[0-9]+" | grep -Eo "[0-9]+\.zip" | grep -Eo "[0-9]+" ) unzip -P "$PASSWORD" "$ZIPFILE" RESULT=$? ZIPFILE="$PASSWORD.zip" done
- Stopped at 6969.
- Let's use fcrackzip for it.
USE THE PASS, THEN STRINGS THE FILE WE GOT - RESULT
- Got the flag!
Flag
REDACTED
Lessons Learned
- Identify the weakness from source review or fingerprinting first.
- Iterate with incremental payloads instead of guessing.
- Reuse the same pattern in future engagements.