The invention discloses an intelligent contract
vulnerability detection method and
system based on semantic comprehension and program path analysis, and belongs to the technical field of
network security. The method comprises the following steps: firstly, analyzing an intelligent contract code by using a large
language model, and reasoning to generate a structured
security rule for defining a taint source, a taint sink and a purifier; secondly, guiding a taint analysis engine by using a
security rule, and tracking on a data flow and a
control flow diagram of a program so as to efficiently screen out a high-risk taint path; then, carrying out
reachability verification on the high-risk path by adopting a
symbolic execution technology; and finally, performing final context review on the verified
vulnerability path by using the large
language model again to generate a
vulnerability report. According to the method, the semantic comprehension ability of the large
language model and the preciseness of traditional
program analysis are subjected to multi-stage cooperation, so that the detection precision and efficiency of the intelligent contract logic vulnerability can be remarkably improved, the
interpretability of a report result is greatly enhanced, and the method has important application value.