All Projects → eth-sri → Securify2

eth-sri / Securify2

Licence: apache-2.0
Securify v2.0

Programming Languages

python
139335 projects - #7 most used programming language
solidity
1140 projects

Projects that are alternatives of or similar to Securify2

Jaadas
Joint Advanced Defect assEsment for android applications
Stars: ✭ 304 (+230.43%)
Mutual labels:  static-analysis, vulnerability
Securify
[DEPRECATED] Security Scanner for Ethereum Smart Contracts
Stars: ✭ 177 (+92.39%)
Mutual labels:  ethereum, static-analysis
Grype
A vulnerability scanner for container images and filesystems
Stars: ✭ 362 (+293.48%)
Mutual labels:  static-analysis, vulnerability
Vehicle-Security-Toolkit
汽车/安卓/固件/代码安全测试工具集
Stars: ✭ 367 (+298.91%)
Mutual labels:  static-analysis, vulnerability
Slither
Static Analyzer for Solidity
Stars: ✭ 759 (+725%)
Mutual labels:  ethereum, static-analysis
Awesome Ethereum
A Curated List of Awesome Ethereum Resources
Stars: ✭ 85 (-7.61%)
Mutual labels:  ethereum
Audit Check
🛡️ GitHub Action for security audits
Stars: ✭ 90 (-2.17%)
Mutual labels:  vulnerability
In Spectre Meltdown
This tool allows to check speculative execution side-channel attacks that affect many modern processors and operating systems designs. CVE-2017-5754 (Meltdown) and CVE-2017-5715 (Spectre) allows unprivileged processes to steal secrets from privileged processes. These attacks present 3 different ways of attacking data protection measures on CPUs enabling attackers to read data they shouldn't be able to. This tool is originally based on Microsoft: https://support.microsoft.com/en-us/help/4073119/protect-against-speculative-execution-side-channel-vulnerabilities-in
Stars: ✭ 86 (-6.52%)
Mutual labels:  vulnerability
Awesome Privacy On Blockchains
A curated list of privacy on blockchains resources
Stars: ✭ 86 (-6.52%)
Mutual labels:  ethereum
Vue Ethereum Ipfs
Distributed Application Starter: Vue front-end, Ethereum / IPFS Backend
Stars: ✭ 1,312 (+1326.09%)
Mutual labels:  ethereum
Sea Dsa
A new context, field, and array-sensitive heap analysis for LLVM bitcode based on DSA.
Stars: ✭ 90 (-2.17%)
Mutual labels:  static-analysis
Jscpwn
PoC exploit for CVE-2016-4622
Stars: ✭ 89 (-3.26%)
Mutual labels:  vulnerability
Reverse Shell
Reverse Shell as a Service
Stars: ✭ 1,281 (+1292.39%)
Mutual labels:  vulnerability
H4cker
This repository is primarily maintained by Omar Santos and includes thousands of resources related to ethical hacking / penetration testing, digital forensics and incident response (DFIR), vulnerability research, exploit development, reverse engineering, and more.
Stars: ✭ 10,451 (+11259.78%)
Mutual labels:  vulnerability
Thoron
Thoron Framework is a Linux post-exploitation framework that exploits Linux TCP vulnerability to provide a shell-like connection. Thoron Framework has the ability to create simple payloads to provide Linux TCP attack.
Stars: ✭ 87 (-5.43%)
Mutual labels:  vulnerability
Coincurve
Cross-platform Python bindings for libsecp256k1
Stars: ✭ 89 (-3.26%)
Mutual labels:  ethereum
Mrspicky
MrsPicky - An IDAPython decompiler script that helps auditing calls to the memcpy() and memmove() functions.
Stars: ✭ 86 (-6.52%)
Mutual labels:  vulnerability
Ethereum Etl Airflow
Airflow DAGs for exporting, loading, and parsing the Ethereum blockchain data. What datasets do you want to be added to Ethereum ETL? Vote here: https://blockchain-etl.convas.io.
Stars: ✭ 89 (-3.26%)
Mutual labels:  ethereum
Plasma Chamber
Plasma Chamber is a DApps development framework that guarantees security, scalability, and usability utilizing Plasma technology.
Stars: ✭ 91 (-1.09%)
Mutual labels:  ethereum
Eltwallet
Non-custodial decentralized mobile wallet
Stars: ✭ 88 (-4.35%)
Mutual labels:  ethereum

securify

Securify v2.0

Securify 2.0 is a security scanner for Ethereum smart contracts supported by the Ethereum Foundation and ChainSecurity. The core research behind Securify was conducted at the Secure, Reliable, and Intelligent Systems Lab at ETH Zurich.

It is the successor of the popular Securify security scanner (you can find the old version here).

Features

  • Supports 38 vulnerabilities (see table below)
  • Implements novel context-sensitive static analysis written in Datalog
  • Analyzes contracts written in Solidity >= 0.5.8

Docker

To build the container:

sudo docker build -t securify .

To run the container:

sudo docker run -it -v <contract-dir-full-path>:/share securify /share/<contract>.sol

Install

Prerequisites

The following instructions assume that a Python is already installed. In addition to that, Securify requires solc, souffle and graphviz to be installed on the system:

Solc

sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc

Souffle

Follow the instructions here: https://souffle-lang.github.io/download.html

Please do not opt for the unstable version since it might break at any point.

Graphviz / Dot

sudo apt install graphviz

Setting up the virtual environment

After the prerequisites have been installed, we can set up the python virtual environment from which we will run the scripts in this project.

In the project's root folder, execute the following commands to set up and activate the virtual environment:

virtualenv --python=/usr/bin/python3.7 venv
source venv/bin/activate

Verify that the python version is actually 3.7:

python --version

Set LD_LIBRARY_PATH:

cd <securify_root>/securify/staticanalysis/libfunctors
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd`

Finally, install the project's dependencies by running the following commands from the <securify_root> folder:

pip install --upgrade pip
pip install -r requirements.txt
pip install -e .

Now you're ready to start using the securify framework.

Remember: Before executing the framework's scripts, you'll need to activate the virtual environment with the following command:

source venv/bin/activate

Usage

Analyzing a contract

Currently Securify2 supports only flat contracts, i.e., contracts that do not contain import statements.

To analyze a local contract simply run:

securify <contract_source>.sol [--use-patterns Pattern1 Pattern2 ...]

Or download it from the Blockchain using the Etherscan.io API:

securify <contract_address> --from-blockchain [--key <key-file>]

Notice that you need an API-key from Etherscan.io to use this functionality.

To analyze a contract against specific severity levels run:

securify <contract_source>.sol [--include-severity Severity1 Severity2]
securify <contract_source>.sol [--exclude-severity Severity1 Severity2]

To get all the available patterns run:

securify --list

Supported vulnerabilities

ID Pattern name Severity Slither ID SWC ID Comments
1 TODAmount Critical - SWC-114
2 TODReceiver Critical - SWC-114
3 TODTransfer Critical - SWC-114
4 UnrestrictedWrite Critical - SWC-124
5 RightToLeftOverride High rtlo SWC-130
6 ShadowedStateVariable High shadowing-state, shadowing-abstract SWC-119
7 UnrestrictedSelfdestruct High suicidal SWC-106
8 UninitializedStateVariable High uninitialized-state SWC-109
9 UninitializedStorage High uninitialized-storage SWC-109
10 UnrestrictedDelegateCall High controlled-delegatecall SWC-112
11 DAO High reentrancy-eth SWC-107
12 ERC20Interface Medium erc20-interface -
13 ERC721Interface Medium erc721-interface -
14 IncorrectEquality Medium incorrect-equality SWC-132
15 LockedEther Medium locked-ether -
16 ReentrancyNoETH Medium reentrancy-no-eth SWC-107
17 TxOrigin Medium tx-origin SWC-115
18 UnhandledException Medium unchecked-lowlevel -
19 UnrestrictedEtherFlow Medium unchecked-send SWC-105
20 UninitializedLocal Medium uninitialized-local SWC-109
21 UnusedReturn Medium unused-return SWC-104
22 ShadowedBuiltin Low shadowing-builtin -
23 ShadowedLocalVariable Low shadowing-local -
24 CallToDefaultConstructor? Low void-cst -
25 CallInLoop Low calls-loop SWC-104
26 ReentrancyBenign Low reentrancy-benign SWC-107
27 Timestamp Low timestamp SWC-116
28 AssemblyUsage Info assembly -
29 ERC20Indexed Info erc20-indexed -
30 LowLevelCalls Info low-level-calls -
31 NamingConvention Info naming-convention -
32 SolcVersion Info solc-version SWC-103
33 UnusedStateVariable Info unused-state -
34 TooManyDigits Info too-many-digits -
35 ConstableStates Info constable-states -
36 ExternalFunctions Info external-function -
37 StateVariablesDefaultVisibility Info - SWC-108

The following Slither patterns are not checked by Securify since they are checked by the Solidity compiler (ver. 0.5.8):

  • constant-function
  • deprecated-standards
  • pragma

The following SWC vulnerabilities do not apply to Solidity contracts with pragma >=5.8 and are therefore not checked by Securify:

  • SWC-118 (Incorrect Constructor Name)
  • SWC-129 (Usage of +=)
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].