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

We find only 1 port open.
Directory Scan
Browsing the web, and checking the source did not reveal any hints.
Browsing the web, and checking the source did not reveal any hints.

Using dirb for directory scanning.
dirb http://192.168.1.107/
dirb http://192.168.1.107/

We find 2 interesting pages /info.php and /index.php
Browsing /info.php, we see it is a phpinfo() page.

We find a hidden parameter- filename, at /index.php, which is vulnerable to Local File Inclusion(LFI).


We find an awesome exploit, it can be downloaded from here.
To run the exploit, we need to provide the path of phpinfo page and the path which is vulnerable to LFI.



Lets run the exploit and on the other hand we start our netcat listener.



We have a reverse shell.
Flag-1

Privilege Escalation
From www-data > root
Under / directory we find a hidden file- .oldkeys.tgz, lets copy this file to /tmp directory and extract it.
From www-data > root
Under / directory we find a hidden file- .oldkeys.tgz, lets copy this file to /tmp directory and extract it.


We get 2 files- root and root.pub
On noticing the contents of file- root, seems to be private key, lets copy it and crack it on our machine.

We get the password as- choclate93
If we notice the content of file- root.pub, we find the user as- root.

Switching to root.
su -P root
Password: choclate93
su -P root
Password: choclate93

Flag-2

From root > admin
We find ssh keys for user- admin.
We find ssh keys for user- admin.



Flag-3

From admin > Root
We see that user- admin, belongs to docker group.
We see that user- admin, belongs to docker group.

Flag-4
Comments
Post a Comment