PHP Version 3.0 is an HTML embedded scripting language. Most of its syntax is ported to C, Java, and Perl and combines
PHP features. This language allows Web developers to quickly create dynamic Web pages.
PHP has built-in security features called ' Safe_mode ' because it executes on a Web server and allows the user to execute code.
Used to control the execution of commands in a Webroot environment that allows PHP operations.
The implementation mechanism is to route the shell command to the Escapeshellcmd () by forcing a system call to execute the shell command.
function, which is used to confirm that commands cannot be executed outside the Webroot directory.
In some versions of PHP, the Escapeshellcmd () is invalidated when using the Popen () command, causing a malicious user to
To use the ' Popen ' system call for illegal operation.
--------------------------------------------------------------------------------
Test program:
Warning: The following procedures (methods) may be offensive for security research and teaching purposes only. Users are at risk!
1
Total 53
-rwxr-xr-x 1 root root 52292 3 22:05 ls
Uid=30 (Wwwrun) gid=65534 (nogroup) groups=65534 (Nogroup)
And from the configuration values of Phpinfo ():
Safe_mode 0 1
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.