Security Analyzer

Introduction to the Security Analyzer scan engine

Security analyzer is an automatic static analysis tool for detecting smart contract vulnerabilities. In this tool, we adopted the context-sensitive, flow-sensitive, money-sensitive technologies to conduct static analysis. First, we collected the almost-known vulnerable smart contracts, and analyzed how these vulnerabilities happened. Then, we designed our threat analysis model to accurately abstract the pattern of these vulnerabilities. Third, we developed more than 100 rules to automatically detect these vulnerabilities. In total, we have developed 12 categories of vulnerabilities as follows:

  • Compiler: Vulnerabilities that derive from the solidity compilers, such as the array usage in ABIEncoderV2 in 0.5.9 version.

  • Cross-chain: Bugs related with cross-chain bridges, such as the private key leakage.

  • Blockchain: Come from the API usage related blockchain, such as block.number, GasLeft, block.difficulty, etc.

  • Language: Common vulnerabilities in smart contract languages, such as reentrancy, integer overflow.

  • ERC: Happen due to the ERC standards, such as the event missing in some function, the index missing in event emit.

  • Cryptography: Related with the cryptography algorithm and usage, such as signature malleability, ecrecover usage.

  • Controlled resource: Indicate the vulnerabilities that are related controlled source, such as the access control.

  • Protocol: Vulnerabilities in design and implementation of protocol (e.g., DeFi), including the economic model security.

  • DeFi liquidity model: Abnormal settlement and reward collection due to the use of easily manipulated price dependencies in economic model.

  • DeFi economic model: The dangerous DeFi economic model formed by the combination of complex DeFi behaviors.

  • NFT: Additional tokens are minted during NFT minting, causing losses to the project party, such as false deposit.

  • DAO: Dangerous DAO voting design, leading to the main permissions being manipulated by attackers, such as flash-loan based DAO voting attacks.

With the release of MetaScan Verison 1.7, we also provide the integration of AI into the Security Analyzer. Leveraging the advanced capabilities of ChatGPT, our AI augmentation provides enhanced vulnerability detection, comprehensive insights, and actionable recommendations to fix identified issues. We encourage you to test drive this new feature and share feedback so we can refine it further. The AI augmentation makes MetaScan more powerful and easy to use for developers.

Last updated