Measure the test taker's knowledge about the defense against PHP Trojan attacks.

Source: Internet
Author: User

This article introduces some techniques to defend against PHP Trojan attacks. Through these techniques, you can better prevent Trojans.

1. Avoid jumping out of the web directory and first modify httpd. conf. If you only allow Your php script program to operate in the web directory, you can also modify the httpd. conf file to limit the php operation path. For example, if your web directory is/usr/local/apache/htdocs. add the following lines to the conf file: php_admin_value open_basedir/usr/local/apache/htdocs. If the script needs to read files other than/usr/local/apache/htdocs, if the error is displayed, the following error occurs: Warning: open_basedir restriction in effect. file is in wrong directory in/usr/local/apache/htdocs/open. php on line 4 and so on.

2. Prevent php trojans from executing webshell to open safe_mode. In, set disable_functions = passthru, exec, shell_exec in php. ini. Select either of them or both.

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.