# Security Analyzer

## 简介

Security Analyzer是一款自动静态分析工具，旨在检测智能合约中的漏洞。我们采用了上下文敏感、流敏感和价值敏感的静态分析技术。首先，我们收集并分析了几乎所有已知的漏洞智能合约。然后，我们设计了威胁分析模型，以准确地抽象这些漏洞的模式。接下来，我们开发了100多条规则来自动检测这些漏洞。总共，我们识别了12类漏洞，如下所示：

* 编译器：源于Solidity编译器的漏洞，如0.5.9版本中ABIEncoderV2的数组使用。
* 跨链：与跨链桥接相关的问题，如私钥泄露。
* 区块链：与区块链API使用相关的问题，如block.number、GasLeft、block.difficulty等。
* 语言：智能合约语言中的常见漏洞，如重入、整数溢出。
* ERC：由ERC标准引发的问题，如函数缺少事件、事件发射缺少索引。
* 加密：与加密算法及其使用相关的漏洞，如签名可变性、ecrecover使用。
* 受控资源：涉及受控资源的漏洞，如访问控制。
* 协议：协议（如DeFi）设计和实现中的漏洞，包括经济模型安全。
* DeFi流动性模型：由于在经济模型中使用易于操纵的价格依赖性而导致的异常结算和奖励收集。
* DeFi经济模型：复杂的DeFi行为组合形成的危险DeFi经济模型。
* NFT：NFT铸造过程中额外铸造代币，导致项目方损失，如虚假存款。
* DAO：危险的DAO投票设计，导致主要权限被攻击者操纵，如基于闪电贷的DAO投票攻击。

我们致力于为客户提供专业的智能合约安全扫描服务。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.metatrust.io/docs-zh/introduction/metascan/security-analyzer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
