All Projects → Messi-Q → GraphDeeSmartContract

Messi-Q / GraphDeeSmartContract

Licence: other
Smart contract vulnerability detection using graph neural network (DR-GCN).

Programming Languages

python
139335 projects - #7 most used programming language
solidity
1140 projects
c
50402 projects - #5 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to GraphDeeSmartContract

PDN
The official PyTorch implementation of "Pathfinder Discovery Networks for Neural Message Passing" (WebConf '21)
Stars: ✭ 44 (-47.62%)
Mutual labels:  gcn, graph2vec, graph-neural-network
Graph Neural Net
Graph Convolutional Networks, Graph Attention Networks, Gated Graph Neural Net, Mixhop
Stars: ✭ 27 (-67.86%)
Mutual labels:  gcn, graph-neural-network
Detexploit
OSS Vulnerability Scanner for Windows Platform
Stars: ✭ 146 (+73.81%)
Mutual labels:  vulnerability-detection
GNN-Recommendation
毕业设计:基于图神经网络的异构图表示学习和推荐算法研究
Stars: ✭ 52 (-38.1%)
Mutual labels:  graph-neural-network
Qsfuzz
qsfuzz (Query String Fuzz) allows you to build your own rules to fuzz query strings and easily identify vulnerabilities.
Stars: ✭ 201 (+139.29%)
Mutual labels:  vulnerability-detection
Asset Scan
asset-scan是一款适用甲方企业的外网资产周期性扫描监控系统
Stars: ✭ 149 (+77.38%)
Mutual labels:  vulnerability-detection
Wazuh Kibana App
Wazuh - Kibana plugin
Stars: ✭ 212 (+152.38%)
Mutual labels:  vulnerability-detection
Burp Molly Pack
Security checks pack for Burp Suite
Stars: ✭ 123 (+46.43%)
Mutual labels:  vulnerability-detection
koinos-miner
The Koinos Miner (CLI) provides a functional command line interface that allows users to mine the KOIN ERC-20 which will be used to deliver an equitable initial token distribution on the Koinos blockchain.
Stars: ✭ 15 (-82.14%)
Mutual labels:  smart-contract
Wazuh
Wazuh - The Open Source Security Platform
Stars: ✭ 3,154 (+3654.76%)
Mutual labels:  vulnerability-detection
Dr checker
DR.CHECKER : A Soundy Vulnerability Detection Tool for Linux Kernel Drivers
Stars: ✭ 251 (+198.81%)
Mutual labels:  vulnerability-detection
Rebel Framework
Advanced and easy to use penetration testing framework 💣🔎
Stars: ✭ 183 (+117.86%)
Mutual labels:  vulnerability-detection
Patrowlengines
PatrOwl - Open Source, Free and Scalable Security Operations Orchestration Platform
Stars: ✭ 162 (+92.86%)
Mutual labels:  vulnerability-detection
Killshot
A Penetration Testing Framework, Information gathering tool & Website Vulnerability Scanner
Stars: ✭ 237 (+182.14%)
Mutual labels:  vulnerability-detection
Lein Nvd
National Vulnerability Database dependency-checker plugin for Leiningen
Stars: ✭ 146 (+73.81%)
Mutual labels:  vulnerability-detection
BokkyPooBahsRedBlackTreeLibrary
BokkyPooBah's Red-Black Binary Search Tree Library
Stars: ✭ 117 (+39.29%)
Mutual labels:  smart-contract
Cve Search
cve-search - a tool to perform local searches for known vulnerabilities
Stars: ✭ 1,765 (+2001.19%)
Mutual labels:  vulnerability-detection
Sensitivefilescan
Stars: ✭ 174 (+107.14%)
Mutual labels:  vulnerability-detection
Wazuh Docker
Wazuh - Docker containers
Stars: ✭ 213 (+153.57%)
Mutual labels:  vulnerability-detection
GP-GNN
Code and dataset of ACL2019 Paper: Graph Neural Networks with Generated Parameters for Relation Extraction.
Stars: ✭ 52 (-38.1%)
Mutual labels:  graph-neural-network

GraphDeeSmartContract GitHub stars GitHub forks License

This repo is a python implementation of smart contract vulnerability detection using graph neural networks (DR-GCN).

Requirements

Required Packages

  • python3 or above
  • PyTorch1.0.0
  • numpy1.18.2
  • sklearn for model evaluation

Run the following script to install the required packages.

pip install --upgrade pip
pip install torch==1.0.0
pip install numpy==1.18.2
pip install scikit-learn

Citation

Please use this citation if you want to cite our paper or codebase in your paper:

@inproceedings{zhuang2020smart,
  title={Smart Contract Vulnerability Detection using Graph Neural Network.},
  author={Zhuang, Yuan and Liu, Zhenguang and Qian, Peng and Liu, Qi and Wang, Xiang and He, Qinming},
  booktitle={IJCAI},
  pages={3283--3290},
  year={2020}
}

Running project

  • To run program, use this command: python SMVulDetector.py.
  • In addition, you can use specific hyper-parameters to train the model. All the hyper-parameters can be found in parser.py.

Examples:

python SMVulDetector.py --dataset training_data/REENTRANCY_CORENODES_1671
python SMVulDetector.py --dataset training_data/REENTRANCY_CORENODES_1671 --model gcn_modify --n_hidden 192 --lr 0.001 -f 64,64,64 --dropout 0.1 --vector_dim 100 --epochs 50 --lr_decay_steps 10,20 

Using script: Repeating 10 times for different seeds with train.sh.

for i in $(seq 1 10);
do seed=$(( ( RANDOM % 10000 )  + 1 ));
python SMVulDetector.py --model gcn_modify --seed $seed | tee logs/smartcheck_"$i".log;
done

Then, you can find the training results in the logs/.

Dataset

ESC: Ethereum Smart Contracts

VSC: Vntchain Smart Contacts

The train data after normalization:

training_data/LOOP_CORENODES_1317, LOOP_FULLNODES_1317, REENTRANCY_CORENODES_1671, REENTRANCY_FULLNODES_1671

Reference

  1. A fraction of the code reuses the code of graph_unet.
  2. Thomas N. Kipf, Max Welling, Semi-Supervised Classification with Graph Convolutional Networks, ICLR 2017.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].