Pwned Date - 18th July 2022

Enumeration

PORT   STATE SERVICE VERSION
22/tcp open  ssh     OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey: 
|   2048 9d:d0:98:da:0d:32:3d:0b:3f:42:4d:d7:93:4f:fd:60 (RSA)
|   256 4c:f4:2e:24:82:cf:9c:8d:e2:0c:52:4b:2e:a5:12:d9 (ECDSA)
|_  256 a9:fb:e3:f4:ba:d6:1e:72:e7:97:25:82:87:6e:ea:01 (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)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
┌──(kali㉿VirtualBox)-[~]
└─$ gobuster dir -u <http://192.168.158.34/>  -w /usr/share/wordlists/dirb/common.txt -q -t 200
/.htpasswd            (Status: 403) [Size: 279]
/.hta                 (Status: 403) [Size: 279]
/.htaccess            (Status: 403) [Size: 279]
/index.html           (Status: 200) [Size: 11026]
/javascript           (Status: 301) [Size: 321] [--> <http://192.168.158.34/javascript/>]
/phpmyadmin           (Status: 301) [Size: 321] [--> <http://192.168.158.34/phpmyadmin/>]
/server-status        (Status: 403) [Size: 279]                                        
/wordpress            (Status: 301) [Size: 320] [--> <http://192.168.158.34/wordpress/>]

Another WordPress machine

┌──(kali㉿VirtualBox)-[~]
└─$ wpscan --url <http://192.168.158.34/wordpress/>
_______________________________________________________________
         __          _______   _____
         \\ \\        / /  __ \\ / ____|
          \\ \\  /\\  / /| |__) | (___   ___  __ _ _ __ ®
           \\ \\/  \\/ / |  ___/ \\___ \\ / __|/ _` | '_ \\
            \\  /\\  /  | |     ____) | (__| (_| | | | |
             \\/  \\/   |_|    |_____/ \\___|\\__,_|_| |_|

         WordPress Security Scanner by the WPScan Team
                         Version 3.8.22
       Sponsored by Automattic - <https://automattic.com/>
       @_WPScan_, @ethicalhack3r, @erwan_lr, @firefart
_______________________________________________________________

[+] URL: <http://192.168.158.34/wordpress/> [192.168.158.34]
[+] Started: Mon Jul 18 10:12:17 2022

Interesting Finding(s):

[+] Headers
 | Interesting Entry: Server: Apache/2.4.29 (Ubuntu)
 | Found By: Headers (Passive Detection)
 | Confidence: 100%

[+] XML-RPC seems to be enabled: <http://192.168.158.34/wordpress/xmlrpc.php>
 | Found By: Direct Access (Aggressive Detection)
 | Confidence: 100%
 | References:
 |  - <http://codex.wordpress.org/XML-RPC_Pingback_API>
 |  - <https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_ghost_scanner/>
 |  - <https://www.rapid7.com/db/modules/auxiliary/dos/http/wordpress_xmlrpc_dos/>
 |  - <https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_xmlrpc_login/>
 |  - <https://www.rapid7.com/db/modules/auxiliary/scanner/http/wordpress_pingback_access/>

[+] WordPress readme found: <http://192.168.158.34/wordpress/readme.html>
 | Found By: Direct Access (Aggressive Detection)
 | Confidence: 100%

[+] Upload directory has listing enabled: <http://192.168.158.34/wordpress/wp-content/uploads/>
 | Found By: Direct Access (Aggressive Detection)
 | Confidence: 100%

[+] The external WP-Cron seems to be enabled: <http://192.168.158.34/wordpress/wp-cron.php>
 | Found By: Direct Access (Aggressive Detection)
 | Confidence: 60%
 | References:
 |  - <https://www.iplocation.net/defend-wordpress-from-ddos>
 |  - <https://github.com/wpscanteam/wpscan/issues/1299>

[+] WordPress version 5.3.2 identified (Insecure, released on 2019-12-18).
 | Found By: Emoji Settings (Passive Detection)
 |  - <http://192.168.158.34/wordpress/>, Match: 'wp-includes\\/js\\/wp-emoji-release.min.js?ver=5.3.2'
 | Confirmed By: Meta Generator (Passive Detection)
 |  - <http://192.168.158.34/wordpress/>, Match: 'WordPress 5.3.2'

[i] The main theme could not be detected.

[+] Enumerating All Plugins (via Passive Methods)

[i] No plugins Found.

[+] Enumerating Config Backups (via Passive and Aggressive Methods)
 Checking Config Backups - Time: 00:00:10 <=======> (137 / 137) 100.00% Time: 00:00:10

[i] No Config Backups Found.

Looks familiar user which we did from NoName

[i] User(s) Identified:

[+] yash
 | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 | Confirmed By: Login Error Messages (Aggressive Detection)

[+] haclabs
 | Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection)
 | Confirmed By: Login Error Messages (Aggressive Detection)

Don’t move on so quick, even we get /wordpress, just do another ducky fuzz on it

┌──(kali㉿VirtualBox)-[~]
└─$ gobuster dir -u <http://192.168.158.34/wordpress>  -w /usr/share/wordlists/dirb/common.txt -q -t 200
/.htpasswd            (Status: 403) [Size: 279]
/.hta                 (Status: 403) [Size: 279]
/.htaccess            (Status: 403) [Size: 279]
/index.php            (Status: 301) [Size: 0] [--> <http://192.168.158.34/wordpress/>]
/robots.txt           (Status: 200) [Size: 22]                                      
/wp-admin             (Status: 301) [Size: 329] [--> <http://192.168.158.34/wordpress/wp-admin/>]
/wp-content           (Status: 301) [Size: 331] [--> <http://192.168.158.34/wordpress/wp-content/>]
/wp-includes          (Status: 301) [Size: 332] [--> <http://192.168.158.34/wordpress/wp-includes/>]
/xmlrpc.php           (Status: 405) [Size: 42]

This is kinda sus

Untitled

When we move to wordpress/robots.html we see this Query Box

Untitled

We try to input some command such as id and see what it does

Untitled

Meanwhile on the View Page Source we see this script

<html>
<body>
<script>
var count = 1;
function myFunction() {
  if (count<15) {
    var input = document.getElementById("uname").value;
    alert("clicks left for noob "+ input +":"+ (50-count));
    count++;
  }
  else {
   window.location="admindelete.html";
  }
};
</script>
  <input type="text" id="uname" placeholder="your name"</input>
  <br>
  <button onclick="myFunction()">show quest</button>
</body>
</html>

We can move to admindelete.html real quick without clicking one by one

Untitled