← Back to Writeups
HTBN/AWeb

looking glass

XESXOR8/23/20261 min read
#web#htb#n/a

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

  1. First, open the host given.

  2. Let us click the ping button.

  3. 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);
  1. We can utilize the vulnerable here, by add a semicolon ;.
  2. By adding semicolon, then all the text behind it are interpreted as command.
  3. Try to add ; ls behind the ip value.

Actuall command at the server side.

system("ping -c 4 142.93.37.215; ls");

OUTPUT

  1. It seems there's only one file and no directory in the current directory.

  2. Let us check the root directory by add -> ; ls /.

  3. Notice there's a directory/file named flag_50j98.

  4. 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.

  5. Got the flag!

Flag

REDACTED

Lessons Learned

  1. Identify the weakness from source review or fingerprinting first.
  2. Iterate with incremental payloads instead of guessing.
  3. Reuse the same pattern in future engagements.