Disable 16 high-risk functions in PHP

passthru()
function description: Allows to execute an external program and echo the output, similar to exec().
Hazard level: high

exec()
function description: allow to execute an external program (such as UNIX Shell or CMD command, etc.).
Hazard level: high

system()
function description: Allows to execute an external program and echo the output, similar to passthru().
Hazard 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 PHP in CLI mode, and this function is not applicable to Windows system.
Hazard level: high

chgrp()
function description: change the user group to which a file or directory belongs.
Hazard level: high

chown ()
function description: change the owner of the file or directory.
Hazard level: high

shell_exec()
function description: Execute the command through the shell, and return the execution result as a string.
Hazard level: high

proc_open()
function description: Execute a command and open the file pointer for reading and writing.
Hazard level: high

proc_get_status()
function description: Get the information of the process opened by proc_open().
Hazard level: high

ini_alter()
function description: it is an alias function of ini_set() function, the function is the same as ini_set().
See ini_set() for details.
Hazard level: high

ini_set()
function description: it can be used to modify and set PHP environment configuration parameters.
Hazard level: high

ini_restore()
function description: it can be used to restore PHP environment configuration parameters to their initial values.
Hazard level: high

dl()
function description: Load a PHP external module during the running of PHP (not at startup).
Hazard level: high

Function description of pfsockopen()
: establish a socket persistent connection in Internet or UNIX domain.
Hazard level: high

popen()
function description: A command can be passed through the parameters of popen(), and the file opened by popen() will be executed.
Hazard level: high

putenv ()
function description: used to change the system character set environment when PHP is running. In PHP version lower than 5.2.6, this function can be used to
modify the system character set environment, and then use the sendmail command to send special parameters to execute the system SHELL command.
Hazard level: high

Guess you like

Origin blog.csdn.net/qq_26429153/article/details/131674623