SherlockChain:基于高级AI实现的智能合约安全分析框架

关于SherlockChain

SherlockChain是一款功能强大的智能合约安全分析框架,该工具整合了Slither工具(一款针对智能合约的安全工具)的功能,并引入了高级人工智能模型,旨在辅助广大研究人员针对Solidity、Vyper和Plutus智能合约执行安全分析。

核心功能

1、全面的漏洞检测:SherlockChain的检测器可以识别各种不同类型的漏洞,包括重入漏洞和无保护升级等高危安全问题;

2、AI驱动的安全分析:集成的人工智能模型提高了漏洞检测的精准度,为开发人员提供了高价值的安全实践建议;

3、无缝集成:SherlockChain支持与流行的开发框架(如Hardhat、Foundry和Brownie)无缝集成,使其易于融入现有的工作流程;

4、直观的分析报告:SherlockChain可以生成包含有清晰解释和代码段的详细报告,能够帮助开发人员快速理解和解决已发现的安全问题;

5、自定义分析:框架提供了灵活的API,允许用户编写自定义分析和检测器,并根据实际需求对SherlockChain进行自定义开发;

6、持续性监控:我们可以将SherlockChain集成到自己的CI/CD管道中,为智能合约代码库提供持续监控和警报服务;

AI驱动功能

1、智能漏洞优先级确认:人工智能模型分析检测到的漏洞上下文和潜在影响,为开发人员提供一个需要解决的问题优先级列表;

2、自动修复建议:人工智能组件会提供漏洞修复和代码修改方案,以解决已识别的漏洞,加快修复过程;

3、主动安全审计:SherlockChain的人工智能模型会持续监控目标代码库,主动识别新出现的威胁并提供预警信号;

4、自然语言交互:用户可以使用自然语言与SherlockChain进行交互,从而查询工具、请求特定分析并收到详细响应;

工具安装

由于该工具基于Python 3开发,因此我们首先需要在本地设备上安装并配置好最新版本的Python 3环境。

接下来,广大研究人员可以直接使用下列命令将该项目源码克隆至本地:

git clone https://github.com/0xQuantumCoder/SherlockChain.git

然后切换到项目目录中,执行安装脚本即可:

cd SherlockChain

pip install .

工具使用

1、漏洞检测:--detect和--exclude-detectors选项允许用户指定要执行的漏洞检测器,包括内置的和AI驱动的检测器;

2、分析报告:--report-format、--report-output和各种--report-*选项可以控制分析报告的形式,支持以不同格式生成报告,例如JSON、Markdown和SARIF等;

3、过滤器:--filter-*选项可以对报告的问题根据严重性、影响程度、可信度和其他标准进行过滤;

4、AI集成:--ai-*选项允许用户配置和控制SherlockChain的AI功能,例如优先考虑高影响漏洞、启用特定的人工智能检测器和管理人工智能模型配置等;

5、与开发框架的集成:--truffle和--truffle-build-directory选项允许我们将SherlockChain集成到Truffle之类的流行开发框架中;

6、杂项:提供了用于编译智能合约、枚举检测器和自定义分析过程的附加选项;

下列命令可以查看工具的帮助选项:

sherlockchain --help

执行上述命令后,即可查看到SherlockChain框架可提供的全部参数选项以及对应的描述信息:

usage: sherlockchain [-h] [--version] [--solc-remaps SOLC_REMAPS] [--solc-settings SOLC_SETTINGS]

                    [--solc-version SOLC_VERSION] [--truffle] [--truffle-build-directory TRUFFLE_BUILD_DIRECTORY]

                    [--truffle-config-file TRUFFLE_CONFIG_FILE] [--compile] [--list-detectors]

                    [--list-detectors-info] [--detect DETECTORS] [--exclude-detectors EXCLUDE_DETECTORS]

                    [--print-issues] [--json] [--markdown] [--sarif] [--text] [--zip] [--output OUTPUT]

                    [--filter-paths FILTER_PATHS] [--filter-paths-exclude FILTER_PATHS_EXCLUDE]

                    [--filter-contracts FILTER_CONTRACTS] [--filter-contracts-exclude FILTER_CONTRACTS_EXCLUDE]

                    [--filter-severity FILTER_SEVERITY] [--filter-impact FILTER_IMPACT]

                    [--filter-confidence FILTER_CONFIDENCE] [--filter-check-suicidal]

                    [--filter-check-upgradeable] [--filter-check-erc20] [--filter-check-erc721]

                    [--filter-check-reentrancy] [--filter-check-gas-optimization] [--filter-check-code-quality]

                    [--filter-check-best-practices] [--filter-check-ai-detectors] [--filter-check-all]

                    [--filter-check-none] [--check-all] [--check-suicidal] [--check-upgradeable]

                    [--check-erc20] [--check-erc721] [--check-reentrancy] [--check-gas-optimization]

                    [--check-code-quality] [--check-best-practices] [--check-ai-detectors] [--check-none]

                    [--check-all-detectors] [--check-all-severity] [--check-all-impact] [--check-all-confidence]

                    [--check-all-categories] [--check-all-filters] [--check-all-options] [--check-all]

                    [--check-none] [--report-format {json,markdown,sarif,text,zip}] [--report-output OUTPUT]

                    [--report-severity REPORT_SEVERITY] [--report-impact REPORT_IMPACT]

                    [--report-confidence REPORT_CONFIDENCE] [--report-check-suicidal]

                    [--report-check-upgradeable] [--report-check-erc20] [--report-check-erc721]

                    [--report-check-reentrancy] [--report-check-gas-optimization] [--report-check-code-quality]

                    [--report-check-best-practices] [--report-check-ai-detectors] [--report-check-all]

                    [--report-check-none] [--report-all] [--report-suicidal] [--report-upgradeable]

                    [--report-erc20] [--report-erc721] [--report-reentrancy] [--report-gas-optimization]

                    [--report-code-quality] [--report-best-practices] [--report-ai-detectors] [--report-none]

                    [--report-all-detectors] [--report-all-severity] [--report-all-impact]

                    [--report-all-confidence] [--report-all-categories] [--report-all-filters]

                    [--report-all-options] [--report-all] [--report-none] [--ai-enabled] [--ai-disabled]

                    [--ai-priority-high] [--ai-priority-medium] [--ai-priority-low] [--ai-priority-all]

                    [--ai-priority-none] [--ai-confidence-high] [--ai-confidence-medium] [--ai-confidence-low]

                    [--ai-confidence-all] [--ai-confidence-none] [--ai-detectors-all] [--ai-detectors-none]

                    [--ai-detectors-specific AI_DETECTORS_SPECIFIC] [--ai-detectors-exclude AI_DETECTORS_EXCLUDE]

                    [--ai-models-path AI_MODELS_PATH] [--ai-models-update] [--ai-models-download]

                    [--ai-models-list] [--ai-models-info] [--ai-models-version] [--ai-models-check]

                    [--ai-models-upgrade] [--ai-models-remove] [--ai-models-clean] [--ai-models-reset]

                    [--ai-models-backup] [--ai-models-restore] [--ai-models-export] [--ai-models-import]

                    [--ai-models-config AI_MODELS_CONFIG] [--ai-models-config-update] [--ai-models-config-reset]

                    [--ai-models-config-export] [--ai-models-config-import] [--ai-models-config-list]

                    [--ai-models-config-info] [--ai-models-config-version] [--ai-models-config-check]

                    [--ai-models-config-upgrade] [--ai-models-config-remove] [--ai-models-config-clean]

                    [--ai-models-config-reset] [--ai-models-config-backup] [--ai-models-config-restore]

                    [--ai-models-config-export] [--ai-models-config-import] [--ai-models-config-path AI_MODELS_CONFIG_PATH]

                    [--ai-models-config-file AI_MODELS_CONFIG_FILE] [--ai-models-config-url AI_MODELS_CONFIG_URL]

                    [--ai-models-config-name AI_MODELS_CONFIG_NAME] [--ai-models-config-description AI_MODELS_CONFIG_DESCRIPTION]

                    [--ai-models-config-version-major AI_MODELS_CONFIG_VERSION_MAJOR]

                    [--ai-models-config-version-minor AI_MODELS_CONFIG_VERSION_MINOR]

                    [--ai-models-config-version-patch AI_MODELS_CONFIG_VERSION_PATCH]

                    [--ai-models-config-author AI_MODELS_CONFIG_AUTHOR]

                    [--ai-models-config-license AI_MODELS_CONFIG_LICENSE]

                    [--ai-models-config-url-documentation AI_MODELS_CONFIG_URL_DOCUMENTATION]

                    [--ai-models-config-url-source AI_MODELS_CONFIG_URL_SOURCE]

                    [--ai-models-config-url-issues AI_MODELS_CONFIG_URL_ISSUES]

                    [--ai-models-config-url-changelog AI_MODELS_CONFIG_URL_CHANGELOG]

                    [--ai-models-config-url-support AI_MODELS_CONFIG_URL_SUPPORT]

                    [--ai-models-config-url-website AI_MODELS_CONFIG_URL_WEBSITE]

                    [--ai-models-config-url-logo AI_MODELS_CONFIG_URL_LOGO]

                    [--ai-models-config-url-icon AI_MODELS_CONFIG_URL_ICON]

                    [--ai-models-config-url-banner AI_MODELS_CONFIG_URL_BANNER]

                    [--ai-models-config-url-screenshot AI_MODELS_CONFIG_URL_SCREENSHOT]

                    [--ai-models-config-url-video AI_MODELS_CONFIG_URL_VIDEO]

                    [--ai-models-config-url-demo AI_MODELS_CONFIG_URL_DEMO]

                    [--ai-models-config-url-documentation-api AI_MODELS_CONFIG_URL_DOCUMENTATION_API]

                    [--ai-models-config-url-documentation-user AI_MODELS_CONFIG_URL_DOCUMENTATION_USER]

                    [--ai-models-config-url-documentation-developer AI_MODELS_CONFIG_URL_DOCUMENTATION_DEVELOPER]

                    [--ai-models-config-url-documentation-faq AI_MODELS_CONFIG_URL_DOCUMENTATION_FAQ]

                    [--ai-models-config-url-documentation-tutorial AI_MODELS_CONFIG_URL_DOCUMENTATION_TUTORIAL]

                    [--ai-models-config-url-documentation-guide AI_MODELS_CONFIG_URL_DOCUMENTATION_GUIDE]

                    [--ai-models-config-url-documentation-whitepaper AI_MODELS_CONFIG_URL_DOCUMENTATION_WHITEPAPER]

                    [--ai-models-config-url-documentation-roadmap AI_MODELS_CONFIG_URL_DOCUMENTATION_ROADMAP]

                    [--ai-models-config-url-documentation-blog AI_MODELS_CONFIG_URL_DOCUMENTATION_BLOG]

                    [--ai-models-config-url-documentation-community AI_MODELS_CONFIG_URL_DOCUMENTATION_COMMUNITY]

许可证协议

本项目的开发与发布遵循AGPL-3.0开源许可协议。

项目地址

SherlockChain:【GitHub传送门

  • 35
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值