HGAT: smart contract vulnerability detection method based on hierarchical graph attention network

Autor: Chuang Ma, Shuaiwu Liu, Guangxia Xu
Jazyk: angličtina
Rok vydání: 2023
Předmět:
Zdroj: Journal of Cloud Computing: Advances, Systems and Applications, Vol 12, Iss 1, Pp 1-13 (2023)
Druh dokumentu: article
ISSN: 2192-113X
DOI: 10.1186/s13677-023-00459-x
Popis: Abstract With the widespread use of blockchain, more and more smart contracts are being deployed, and their internal logic is getting more and more sophisticated. Due to the large false positive rate and low detection accuracy of most current detection methods, which heavily rely on already established detection criteria, certain smart contracts additionally call for human secondary detection, resulting in low detection efficiency. In this study, we propose HGAT, a hierarchical graph attention network-based detection model, in order to address the aforementioned issues as well as the shortcomings of current smart contract vulnerability detection approaches. First, using Abstract Syntax Tree (AST) and Control Flow Graph, the functions in the smart contract are abstracted into code graphs (CFG). Then abstract each node in the code subgraph, extract the node features, utilize the graph attention mechanism GAT, splice the obtained vectors to form the features of each line of statements and use these features to detect smart contracts. To create test data and assess HGAT, we leverage the open-source smart contract vulnerability sample dataset. The findings of the experiment indicate that this method can identify smart contract vulnerabilities more quickly and precisely than other detection techniques.
Databáze: Directory of Open Access Journals