Lucene search

K
huntrQuandqnE368BE37-1CB4-4292-8D48-07132725F622
HistoryMar 09, 2022 - 6:14 p.m.

Abusing Backup/Restore feature to achieve Remote Code Execution

2022-03-0918:14:16
quandqn
www.huntr.dev
16
admin
backup module
remote code execution
malicious php file
upload
restore
import format not supported
userfiles
rce
impact

EPSS

0.001

Percentile

44.0%

Description

Admin can use Backup modules to upload a malicious PHP file, which can lead to RCE.

Proof of Concept

  • Log in as admin, navigate to Modules ->Backup: https://demo.microweber.org/demo/admin/view:modules/load_module:admin__backup

Module

  • Prepare a malicious PHP file, in this case info2.php
<?php system($_GET['cm']); ?>
  • Compress this file to info2php.zip, then click Upload your backup.

Upload

  • After successfully uploaded, click to Restore, chooseTry to overwrite content by Names & Titles, thenStart Restore

Restore

  • The system returns Import format not supported

Restore

  • However, the malicious file info2.php is unzipped and located in /userfiles/, and that malicious PHP file can be accessible by anyone:

Upload

Impact

Remote code execution (RCE) attacks allow an attacker to remotely execute malicious code on a computer. The impact of an RCE vulnerability can range from malware execution to an attacker gaining full control over a compromised machine.

EPSS

0.001

Percentile

44.0%

Related for E368BE37-1CB4-4292-8D48-07132725F622