Walkthrough: Web Machine

Initial Reconnaissance

First, identify the machine's IP address on the local network:

netdiscover

Target IP: 192.168.1.8

Port Scanning

We run a full TCP port scan with service version detection:

nmap -sS -sV -p- 192.168.1.8 -vv

The scan confirms a web server is running on port 80.

Directory Enumeration

Using Gobuster to look for common file extensions:

gobuster dir -u http://192.168.1.8/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,txt,html

An interesting file is found at exploit.html. Upon inspecting the source code, we see a form targeting localhost. By changing this to the target IP (192.168.1.8) and submitting, we retrieve the first half of the flag:

First Half: FLAG{N7

Deep Enumeration & Burp Suite

Further fuzzing reveals a hidden directory: /enter_network.

gobuster dir -u http://192.168.1.8/enter_network -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,txt -t 200 2>/dev/null

By intercepting the request in Burp Suite, we notice a cookie named role. It appears to be encoded. By changing the value to admin (or the encoded equivalent used by the site), the application reveals the second half of the flag.

Final Flag

Full Flag: FLAG{N7 KSA_01}