跳到正文
Skillpedia
安全35k · #7613

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-ethereum-smart-contract-vulnerabilities/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7613
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能