Home > Backend Development > PHP Tutorial > http://www.56.com/m2v/?magic=1 PHP dangerous function explanation and analysis

http://www.56.com/m2v/?magic=1 PHP dangerous function explanation and analysis

WBOY
Release: 2016-07-29 08:39:47
Original
822 people have browsed it

Can be compiled using –disable-cli. Once PHP in CLI mode is compiled, it may be used by intruders to establish a WEB Shell backdoor process or execute arbitrary code through PHP!
phpinfo()
Function description: Output PHP environment information and related module, WEB environment and other information.
Danger level: Medium
passthru()
Function description: Allows to execute an external program and echo the output, similar to exec().
Danger level: High
exec()
Function description: Allows the execution of an external program (such as UNIX Shell or CMD command, etc.).
Danger level: High
system()
Function description: Allows to execute an external program and echo the output, similar to passthru().
Danger level: High
chroot()
Function description: It can change the working root directory of the current PHP process. It can only work when the system supports CLI mode
PHP, and this function is not applicable to Windows systems.
Danger level: High
scandir()
Function description: List files and directories in the specified path.
Danger level: Medium
chgrp()
Function description: Change the user group to which a file or directory belongs.
Danger level: High
chown()
Function description: Change the owner of a file or directory.
Danger level: High
shell_exec()
Function description: Execute the command through Shell and return the execution result as a string.
Danger level: High
proc_open()
Function description: Execute a command and open the file pointer for reading and writing.
Danger level: High
proc_get_status()
Function description: Get information about the process opened using proc_open().
Danger level: High
error_log()
Function description: Send error information to the specified location (file).
Security Note: In some versions of PHP, error_log() can be used to bypass PHP safe mode and
execute arbitrary commands.
Danger level: low
ini_alter()
Function description: It is an alias function of the ini_set() function and has the same function as ini_set().
See ini_set() for details.
Danger level: High
ini_set()
Function description: Can be used to modify and set PHP environment configuration parameters.
Danger level: High
ini_restore()
Function description: Can be used to restore PHP environment configuration parameters to their initial values.
Danger level: High
dl()
Function description: Load a PHP external module while PHP is running (not when it starts).
Danger level: High
pfsockopen()
Function description: Establish a socket persistent connection in the Internet or UNIX domain.
Danger level: High
syslog()
Function description: The system layer syslog() function of the UNIX system can be called.
Danger level: Medium
readlink()
Function description: Returns the content of the target file pointed to by the symbolic link.
Danger level: Medium
symlink()
Function description: Create a symbolic link in a UNIX system.
Danger level: High
popen()
Function description: A command can be passed through the parameters of popen() and executed on the file opened by popen().
Danger level: High
stream_socket_server()
Function description: Establish an Internet or UNIX server connection.
Danger level: Medium
putenv()
Function description: Used to change the system character set environment when PHP is running. In PHP versions earlier than 5.2.6, you can use this function to modify the system character set environment and use the sendmail command to send special parameters to execute the system SHELL command.
Danger level: high
The above has introduced the explanation and analysis of http://www.56.com/m2v/?magic=1 PHP dangerous functions, including the content of http://www.56.com/m2v/?magic=1. I hope it will be helpful to PHP tutorial is helpful for those who are interested.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template