The invention discloses a taint type
vulnerability detection method and
system oriented to a native PHP application, and belongs to the technical field of
vulnerability detection. The method comprises the following steps: generating a
control flow diagram of each function in a PHP program
source code; the method comprises the following steps of: initializing a function
call graph which does not contain any node for a PHP program
source code; determining a value range of each variable in the PHP program based on the
control flow graph and the initialized function
call graph, and carrying out iterative updating on an initial
value set analysis result and the initialized function
call graph; fusing the final function call graph and the
control flow graph to generate an inter-
process control flow graph, and executing inter-process arrival constant value analysis based on the inter-
process control flow graph and a final
value set analysis result to generate a
data dependency graph; and propagating the
stain information along the
data dependence graph, and combining the final
value set analysis result to obtain a
stain type
vulnerability detection result of the PHP program. According to the method, the dynamic value can be accurately deduced, and potential taint type vulnerabilities in the
Web application can be found as early as possible.