The website (apache + php) was attacked by hackers, and many PHP probes and webshell scripts were uploaded. Where do hackers upload these files? I am not planning to find any program vulnerabilities. how can I solve them?

Source: Internet
Author: User
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... Reply content: Thank you!

The following two steps are the foundation of server security protection

  1. Use the sandbox/mandatory access control Solution to disable all unnecessary path access, file read/write, and process execution permissions of the apache process. In Linux, SELinux and AppArmor are used.
  2. Start the apache process with a minimum account. Use setcap to listen to port 1024 or lower for apache's execution File (httpd)
"He does not know the path from which the hacker uploads these files, nor is he planning to find program vulnerabilities .』

Is there only a way to "turn off the server" and add a firewall?
Disable all unnecessary ports
Tomcat access and password
Do not use ssh tools for various attacks. There may be Trojans, to Download PHP files securely from the official website, use url rewriting to restrict access to PHP files other than the whitelist (that is, hackers cannot execute php files even if they have uploaded php files ). I think it is feasible, but is there a better way? The program must have a place to upload files. check whether the code is vulnerable.

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.