Discuz! WeChat public Platform Plug-in patches bypass unauthorized deletion of databases

Source: Internet
Author: User

Discuz! Public Platform Plug-in patches bypass unauthorized deletion of databases

Discuz! The public Platform Plug-in patches can bypass unauthorized database deletion and bypass Baidu cloud waf.

 

The previous vulnerability was published by getshell. As a result, the plug-in responded quickly. Today, we installed a patch, so we have to say that dz is awesome.



Are you sure you want to fix it:



Look at the code again:


if (!strpos($_GET['mod'],'/') && !strpos($_GET['mod'],'\\') && !strpos($_GET['ac'],'/') && !strpos($_GET['ac'],'\\')) {include DISCUZ_ROOT.'./source/plugin/hux_wx/mod/'.$_GET['mod'].'/'.$_GET['ac'].'.php';}





This is the repaired code, and the backslash and forward slash are filtered out.



1. $ _ GET ['mod'] = '..' Bypass



2. $ _ GET ['ac'] = "uninstall"; bypass



The final result of this sentence is the execution of hux_wx/uninstall. php



Let's take a look at this file.

<?phpif(!defined('IN_DISCUZ')) {exit('Access Denied');}$sql = <<<EOFDROP TABLE IF EXISTS pre_hux_wx;DROP TABLE IF EXISTS pre_hux_wx_action;DROP TABLE IF EXISTS pre_hux_wx_config;DROP TABLE IF EXISTS pre_hux_wx_userjp;EOF;runquery($sql);$finish = TRUE;?></code>





Did you see it? It's just if (! Defined ('in _ discuz ')){

Exit ('Access Denied ');

}



This is obviously accessible to any user.



After the OK code analysis is complete, you don't need to do the demonstration. Otherwise, you can try it on the plug-in center homepage. This can bypass Baidu cloud waf, haha

  Solution:

Filter

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.