looking glass
looking glass
Platform: HackTheBox | Category: Web | Difficulty: N/A | Author: D3v0o0Nu11 | Date: 2026-02-10
Description
We've built the most secure networking tool in the market, come and check it out!
Solution Approach
Core idea: Identify the weakness from source review or fingerprinting first. Iterate with incremental payloads instead of guessing.
Steps
-
First, open the host given.
-
Let us click the
pingbutton. -
Based on the output we got, i assume that on the server side, the command shall look like this:
ping -c 4 ip
or
system("ping -c 4 " + ip);
- We can utilize the vulnerable here, by add a semicolon
;. - By adding semicolon, then all the text behind it are interpreted as command.
- Try to add
; lsbehind the ip value.
Actuall command at the server side.
system("ping -c 4 142.93.37.215; ls");
OUTPUT
-
It seems there's only one file and no directory in the current directory.
-
Let us check the root directory by add ->
; ls /. -
Notice there's a directory/file named flag_50j98.
-
Since we don't know whether it's a directory or a file, let us test if it's a file or not by run cat.
-
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.