The invention discloses a RugPull detection method and
system based on taint analysis and a large
language model and a medium, and relates to the technical field of intelligent contract
attack detection.The method comprises the following steps that S1,
byte codes of an intelligent contract to be detected are obtained and preprocessed, the
byte codes are converted into an
assembly-level
instruction sequence and analyzed, and the
assembly-level
instruction sequence is obtained; identifying the basic blocks and constructing a
program structure chart; s2, a variable related to fund input is marked as a
stain source and initialization is carried out, then the fund flow direction is analyzed, and a fund flow graph is constructed; s3, based on the fund flow graph, identifying suspicious asset
flow logic, and generating a structured logic fragment; and S4, inputting the fund flow graph and the structured logic fragments into a large
language model, and performing semantic reasoning and risk judgment. According to the method,
byte codes can be analyzed without depending on source codes, and higher adaptability and practicability are achieved.
Program structure analysis and
language model semantic comprehension ability are fused, and RugPull risks in hidden complex logic can be accurately recognized.