This script gives attackers the opportunity to execute any php code on your server. for example, if the script is added after the browser url? Module = http://example.com/my. When php receives this url, the value of the "$ module" variable in the script will be set.
1. be careful when using include. check whether the file exists locally to avoid security vulnerabilities.
For example:
Include $ module. '. php ';
?>
Assume that $ module is a global variable.
This script gives attackers the opportunity to execute any php code on your server. for example, if the script is added after the browser url? Module = http://example.com/my. When php receives this url, the value of the "$ module" variable in the script will be set to http://example.com/my. So it is dangerous to execute include in php ......
Solution: close the register_globals or include in php. ini and check whether it is correct.
If (file_exists ($ module. '. php ')){
Include $ module. '. php ';
}
?>
Php. ini contains a setting. After open_basedir is set, only php scripts under the specified directory and subdirectory are executed.
If you use php to read a directory or file other than open_basedir, an error is reported.
Insufficient permissions. generally, virtual host providers are set to/tmp and/home.
2. run the script across sites.
Simply put, attackers can execute some client scripts, such as js, on the user's browser side, and then steal users' cookies or other important data.
For example