analyzing-ethereum-smart-contract-vulnerabilities
它能做什么
这个工具可以分析以太坊智能合约的代码,在合约上线之前找出安全漏洞。它使用两种主要技术,识别那些可能导致资金损失的常见问题。
适用场景
- ✓在使用某个合约之前,想先检查它的安全性时。
- ✓某个已有合约出过问题,需要进行调查时。
- ✓你正在学习加密货币合约的安全知识时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-ethereum-smart-contract-vulnerabilities/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“分析这份以太坊合约是否存在安全漏洞:[在此粘贴代码]”
每周 5 个新技能,1 分钟读完。
工作原理
这个工具会进行两项分析:先用 Slither 快速查找已知的漏洞,再用 Mythril 进行更深入的分析,模拟合约可能遭受的攻击方式。随后,它会综合两者的结果,并报告最严重的问题。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Analyzing Ethereum Smart Contract Vulnerabilities
Overview
Smart contract vulnerabilities have led to billions of dollars in losses across DeFi protocols. Unlike traditional software, deployed smart contracts are immutable and handle real financial assets, making pre-deployment security analysis critical. Slither performs fast static analysis using an intermediate representation to detect over 90 vulnerability patterns in seconds, while Mythril uses symbolic execution and SMT solving to discover complex execution path vulnerabilities like reentrancy and integer overflows. This skill covers running both tools against Solidity contracts, interpreting results, triaging findings by severity, and generating audit reports.
When to Use
- When investigating security incidents that require analyzing ethereum smart contract vulnerabilities
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Python 3.10+ with pip
- Slither (pip install slither-analyzer) and solc compiler
- Mythril (pip install mythril) with solc-select for compiler version management
- Solidity source code or compiled contract bytecode
- Foundry or Hardhat development framework (optional, for project-level analysis)
Steps
Step 1: Run Slither Static Analysis
Execute Slither against the contract codebase to identify vulnerability patterns, optimization opportunities, and code quality issues using its 90+ built-in detectors.
Step 2: Run Mythril Symbolic Execution
Run Mythril deep analysis to explore execution paths and discover reentrancy, unchecked external calls, and arithmetic vulnerabilities that require path-sensitive analysis.
Step 3: Triage and Correlate Findings
Combine results from both tools, deduplicate findings, assess severity based on exploitability and financial impact, and filter false positives.
Step 4: Generate Audit Report
Produce a structured audit report with vulnerability descriptions, affected code locations, exploit scenarios, and remediation recommendations.
Expected Output
JSON report listing vulnerabilities with SWC (Smart Contract Weakness Classification) identifiers, severity ratings, affected functions, and suggested fixes.
常见问题
什么是以太坊智能合约?
它们是运行在以太坊网络上的程序,满足特定条件时会自动执行约定的操作,比如转账。
为什么智能合约的安全很重要?
智能合约会处理真实的资金,而且一旦部署就无法修改。如果存在漏洞,黑客就可能盗走资金。
什么是“重入”和“整数溢出”?
它们都是安全漏洞的类型。“重入”是指攻击者在函数第一次执行结束前,反复调用该函数;“整数溢出”是指计算结果超出了系统能存储的数值范围,从而被攻击者利用。
详情
作者的原始描述
Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to detect reentrancy, integer overflow, access control, and other vulnerability classes before deployment to Ethereum mainnet.
热度
- GitHub 星标
- 35k
- 排名
- #7613
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/31
评论
- …
同一仓库的更多技能
abusing-dpapi-for-credential-access
35k为你的 AI 智能体提供针对特定任务的现成指令,让它完成得更好、更快。
abusing-shadow-credentials-for-privesc
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。