Nyx:1 - Walkthrough [Vulnhub]
Here's my solution for Nyx:1.
The machine can be downloaded from here.
Nmap
Scanning for all TCP ports.
$ nmap -sC -sV -p- 192.168.1.106

We find 2 ports open.
Enumeration
Since port 80 (http) is open, we browse the web and also check the source of the page, but no any hint.


We brute-force the directories using gobuster, with some file extension.
$ gobuster dir -u http://192.168.1.106/ -w /usr/share/wordlists/dirbuster/directory-list-2.3-medium.txt -x php,html,txt

By the name /key.php, seems interesting. We browse it.
The page seems asking for a key.

Checking the source of the page, again no hints.

At this point tried different ways to exploits, but not result. But let us not forget nmap does have a script, which effectively brute forces web server paths.
$ nmap -sV --script=http-enum 192.168.1.106

Browsing /d41d8cd98f00b204e9800998ecf8427e.php, seems to be private key.
If we carefully look the title of the page or source page, its says- mpampis key. So we can guess that the mpampis can be a username and its his private key.

We copy it and save to a file.
Getting Access
Before accessing SSH, we change the permission of the file- key.
$ chmod 600 key
$ ssh -i key mpampis@192.168.1.106

User Flag

Privilege Escalation
We check for SUDO rights.

Let us escalate and grab the root flag.
Comments
Post a Comment