找到
4
篇与
Go
相关的结果
-
fscan 绿色软件分享 推荐一个实用的开源工具——fscan。项目由shadow1ng开发维护,GitHub上获得了 14514 个Star。简单来说,它是一款一款内网综合扫描工具方便一键自动化、全方位漏扫扫描。(内网综合扫描工具,实现一键自动化、全方位漏洞扫描),对于站长和开发者来说是个不错的工具。 工具功能介绍 English内网综合扫描工具,一键自动化漏扫。版本: 2.2.1 功能特性 扫描能力 主机发现 - ICMP/Ping存活探测,支持大网段B/C段存活统计 端口扫描 - TCP全连接扫描,内置133个常用端口,支持端口组(web/db/service/all) 服务识别 - 智能协议识别,支持20+种服务指纹匹配 Web探测 - 网站标题、CMS指纹、Web中间件、WAF/CDN识别(40+指纹) 爆破能力 弱密码爆破 - 28种服务爆破(SSH/RDP/SMB/FTP/MySQL/MSSQL/Oracle/Redis等) Hash碰撞 - 支持NTLM Hash认证(SMB/WMI) SSH密钥登录 - 支持私钥认证方式 智能字典 - 内置100+常见弱密码,支持{user}变量替换 漏洞检测 高危漏洞 - MS17-010(永恒之蓝)、SMBGhost(CVE-2020-0796) 未授权访问 - Redis/MongoDB/Memcached/Elasticsearch等未授权检测 POC扫描 - 集成Web漏洞POC,支持Xray POC格式 DNSLog - 支持DNSLog外带检测 漏洞利用 Redis利用 - 写公钥、写计划任务、写WebShell、主从复制RCE MS17-010利用 - ShellCode注入,支持添加用户、执行命令 SSH命令执行 - 认证成功后自动执行命令 本地模块 信息收集 - 系统信息、环境变量、域控信息、网卡配置 凭据获取 - 内存转储(MiniDump)、键盘记录、注册表导出 权限维持 - Systemd服务、Windows服务、计划任务、启动项、LD_PRELOAD 反弹Shell - 正向Shell、反向Shell、SOCKS5代理服务 杀软检测 - 识别目标主机安装的安全软件 痕迹清理 - 日志清理工具 输入输出 目标输入 - IP/CIDR/域名/URL,支持文件批量导入 排除规则 - 支持排除特定主机、端口 输出格式 - TXT/JSON/CSV多格式输出 静默模式 - 无Banner、无进度条、无颜色输出 网络控制 代理支持 - HTTP/SOCKS5代理,支持指定网卡 发包控制 - 速率限制、最大发包数量控制 超时控制 - 端口超时、Web超时、全局超时独立配置 并发控制 - 端口扫描线程、服务扫描线程独立配置 扩展功能 SDK嵌入 - pkg/fscan提供Go SDK,可嵌入Agent或安全平台,支持任务控制(Pause/Resume)、实时进度回调、TaskID追溯 Web管理界面 - 可视化扫描任务管理(条件编译 -tags web) Lab靶场环境 - 内置Docker靶场用于测试学习 插件化架构 - 服务插件/Web插件/本地插件分离,易于扩展 多语言支持 - 中英文界面切换(-lang zh/en) 性能统计 - JSON格式性能报告(-perf) v2.1.0 更新日志> 本次更新包含 262个提交,涵盖30项新功能、120项修复、54项重构、14项性能优化、20项测试增强。 架构重构 全局变量消除 - 迁移至Config/State对象,提升并发安全和可测试性 SMB插件融合 - 整合smb/smb2/smbghost/smbinfo为统一插件,新增smb_protocol.go 服务探测重构 - 实现Nmap风格fallback机制,优化端口指纹识别策略 输出系统重构 - TXT实时刷盘+双写机制,解决结果丢失和乱序问题 i18n框架升级 - 迁移至go-i18n,完整覆盖core/plugins/webscan模块 HostInfo重构 - Ports字段从string改为int,类型安全 函数复杂度优化 - clusterpoc(125→30)、EnhancedPortScan(111→20) 代码审计 - 修复P0-P2级别问题,清理deadcode 日志系统优化 - LogDebug调用清理(71→18),精简启动日志输出 性能优化 正则预编译 - 全局正则表达式预编译,避免重复编译开销 内存优化 - map[string]bool改为map[string]struct{}节省内存 并发指纹匹配 - 多协程并行匹配,提升识别速度 连接复用 - SOCKS5全局拨号器复用,避免重复握手 滑动窗口调度 - 自适应线程池+流式迭代器,优化端口扫描 CEL缓存优化 - POC扫描CEL环境缓存,减少重复初始化 包级变量提取 - proxyFailurePatterns/resourceExhaustedPatterns/sslSecondProbes等 预分配容量 - 简化转换链、单次字符串替换 并发安全优化 - 优化锁粒度和内存分配 新功能 Web管理界面 - 可视化扫描任务管理,响应式布局和进度显示 多格式POC适配 - 支持xray和afrog格式POC 智能扫描模式 - 布隆过滤器去重+代理优化 增强指纹库 - 集成FingerprintHub(3139条指纹) Favicon指纹识别 - 支持mmh3和MD5双格式hash匹配 通用版本提取器 - 自动提取服务版本信息 指纹优先级排序 - 智能排序匹配结果 智能协议检测 - 自动识别HTTP/HTTPS协议类型 网卡指定功能 - 支持VPN场景(-iface参数) 排除主机文件 - 支持从文件读取排除主机(-ehf参数) ICMP令牌桶限速 - 防止高速扫描导致路由器崩溃 端口扫描重试 - 失败自动重扫机制 RDP真实认证 - 集成grdp库实现系统指纹识别 SMB/FTP文件列表 - 匿名访问时自动列出文件 302跳转双重识别 - 同时识别原始响应和跳转后响应指纹 TXT输出URL汇总 - 末尾添加Web服务URL列表便于批量测试 nmap核心集成 - 三大改进:探测策略/匹配引擎/版本解析 插件选择性编译 - Build Tags系统,支持服务/本地/Web插件独立编译 默认端口扩展 - 从62个扩展到133个常用端口 全端口扫描支持 - 扩大端口范围限制 HTTP重定向控制 - 可配置的重定向次数限制 性能分析支持 - 添加pprof性能分析和benchmark测试 TCP包统计 - 服务插件支持TCP包发送统计 fscan-lab靶场 - 内网渗透训练平台,覆盖全部漏洞场景(未完成) Redis利用增强 - 移植完整Redis利用功能(写公钥/计划任务/WebShell/主从RCE) rsync插件重构 - 使用go-rsync库重构认证逻辑 Bug修复(120项,列出关键修复) RDP空指针panic - 修复证书解析导致的崩溃(#551) 批量扫描漏报 - 修复大规模扫描遗漏问题(#304) JSON输出格式 - 修复输出格式错误(#446) Redis弱密码检测 - 修复检测遗漏问题(#447) 结果实时保存 - 修复扫描结果未及时保存(#469) Nmap解析溢出 - 修复八进制转义解析bug(#478) 指纹识别竞态 - 修复webtitle/webpoc竞态问题(#474) MySQL连接验证 - 改用information_schema库验证 代理端口误判 - 修复代理模式下端口状态判断错误 Context超时 - 修复22处插件超时未响应问题 ICMP竞态条件 - 修复并发扫描竞争问题 IPv6地址格式 - 修复4处地址格式化问题 POC高并发卡死 - 修复Context未传播问题 Ctrl+C结果丢失 - 添加信号处理确保结果写入 SOCKS5全回显 - 添加代理连接验证 服务探测泄漏 - 修复连接未正确关闭问题 webtitle响应丢弃 - 修复部分响应数据被丢弃导致识别失败 TXT漏洞信息缺失 - 修复输出遗漏漏洞详情 JSON指纹缺失 - 统一SERVICE结果Target格式 扫描耗时显示 - 修复完成耗时显示为0的问题 虚假漏洞记录 - 重构TXT输出系统消除误报 Redis跨平台路径 - 修复利用功能的路径和超时问题 Windows编译警告 - 修复fscan-lite平台兼容性 Go 1.20兼容 - 降级依赖保持兼容性 测试增强(20项) 单元测试 - 核心模块覆盖率74-100% 并发安全测试 - State对象、指纹匹配引擎专项测试 集成测试 - Web扫描/端口扫描/服务探测/SSH认证/ICMP探测 CLI参数测试 - 命令行参数解析验证 性能基准测试 - AdaptivePool、服务探测策略benchmark ResultBuffer测试 - 去重和完整度评分验证 工程化改进 CI流程优化 - golangci-lint v2升级,简化构建步骤 Issue自动化 - GitHub Issue模板优化,Project自动化工作流 Lint全量修复 - revive/errcheck/shadow/staticcheck/gosimple全部通过 README重写 - 中英文文档全面更新 代码格式统一 - gofmt/goimports规范化 快速开始 bash # 扫描C段 ./fscan -h 192.168.1.1/24 # 指定端口 ./fscan -h 192.168.1.1 -p 22,80,443,3389 # 仅存活探测 ./fscan -h 192.168.1.1/24 -ao # 禁用爆破 ./fscan -h 192.168.1.1/24 -nobr # Web扫描 ./fscan -u http://192.168.1.1 # 本地插件 ./fscan -local systeminfo # Hash碰撞 ./fscan -h 192.168.1.1 -m smb2 -user admin -hash xxxxx # Redis写公钥 ./fscan -h 192.168.1.1 -m redis -rf id_rsa.pub 编译 bash # 标准编译 go build -ldflags="-s -w" -trimpath -o fscan . # 带Web管理界面 go build -tags web -ldflags="-s -w" -trimpath -o fscan-web . 安装 bash # Arch Linux yay -S fscan-git 运行截图fscan.exe -h 192.168.x.x 图片fscan.exe -h 192.168.x.x -rf id_rsa.pub (Redis写公钥) 图片fscan.exe -h 192.168.x.x -m ssh -user root -pwd password 图片fscan.exe -h 192.168.x.x -m ssh -user root -pwda pass1 pass2 pass3 (追加多个密码)fscan.exe -h 192.168.x.x -p80 -proxy http://127.0.0.1:8080 图片fscan.exe -h 192.168.x.x -socks5 socks5://user:pass@127.0.0.1:1080 (SOCKS5认证代理)fscan.exe -h 192.168.x.x -p 139 -m netbios 图片fscan.exe -h 192.0.0.0/8 -m icmp img.png图片2.0-1图片2.0-2图片 路线图 更新计划 更新周期 - 每月一次版本发布 前两周 - 新功能开发与特性更新 后两周 - Bug修复与代码整合 欢迎PR - 期待您的贡献! SDK & Agent 集成 扩展SDK能力,完善端侧Agent嵌入支持 断点续扫、带宽级限速、内存水位控制 更多Agent场景的集成示例 插件生态 持续扩展服务插件覆盖范围 为每个服务插件开发更多漏洞检测和利用能力 保持插件API向后兼容,确保旧版本POC持续可用 Fscan-lite C语言重写的轻量版本 更小的体积,更少的依赖 支持更多嵌入式/受限环境 目录: fscan-lite Fscan-lab 内网渗透测试靶场环境 覆盖所有fscan支持的漏洞场景 开发测试与功能验证平台 新手学习与技能练习环境 目录: fscan-lab 免责声明本工具仅面向合法授权的企业安全建设行为。使用前请确保已获得授权,符合当地法律法规,不对非授权目标扫描。作者不承担任何非法使用产生的后果。 404StarLink图片fscan 是 404Team 星链计划2.0 成员项目。 Star趋势 捐赠请作者喝饮料 参考- https://github.com/Adminisme/ServerScan https://github.com/netxfly/x-crack https://github.com/hack2fun/Gscan https://github.com/k8gege/LadonGo https://github.com/jjf012/gopoc https://github.com/chainreactors/gogo https://github.com/0x727/FingerprintHub https://github.com/killmonday/fscanx {card-default label="📦 工具信息"} 🔗 项目地址:https://github.com/shadow1ng/fscan ⭐ Star数:14514 💻 开发语言:Go 📝 项目描述:一款内网综合扫描工具方便一键自动化、全方位漏扫扫描。(内网综合扫描工具,实现一键自动化、全方位漏洞扫描) {/card-default} 总的来说,fscan是一个功能比较实用的开源工具,适合日常工作和学习使用。如果你正在寻找一款相关工具,不妨下载试试。使用前建议仔细阅读项目文档。 本文介绍的工具来源于GitHub开源社区,仅供学习交流使用,请遵守原项目开源协议。 -
vuls - 提升工作效率的好帮手 推荐一个实用的开源工具——vuls。项目由future-architect开发维护,GitHub上获得了 12253 个Star。简单来说,它是一款适用于Linux、FreeBSD、Container、WordPress、编程语言库、网络设备的无代理漏洞扫描程序,对于站长和开发者来说是个不错的工具。 工具功能介绍 Vuls-logo图片Vulnerability scanner for Linux/FreeBSD, agent-less, written in Go. Twitter: @vuls_enVuls-Abstract图片Vulsrepo图片Vuls-slack图片---- Abstract For a system administrator, having to perform security vulnerability analysis and software update on a daily basis can be a burden. To avoid downtime in a production environment, it is common for a system administrator to choose not to use the automatic update option provided by the package manager and to perform update manually. This leads to the following problems.- The system administrator will have to constantly watch out for any new vulnerabilities in NVD (National Vulnerability Database) or similar databases. It might be impossible for the system administrator to monitor all the software if there are a large number of software packages installed in the server. It is expensive to perform analysis to determine the servers affected by new vulnerabilities. The possibility of overlooking a server or two during analysis is there.Vuls is a tool created to solve the problems listed above. It has the following characteristics.- Informs users of the vulnerabilities that are related to the system. Informs users of the servers that are affected. Vulnerability detection is done automatically to prevent any oversight. A report is generated on a regular basis using CRON or other methods. to manage vulnerability.Vuls-Motivation图片---- Main Features Scan for any vulnerabilities in Linux/FreeBSD/Windows/macOSSupports major Linux/FreeBSD/Windows/macOS- Alpine, Amazon Linux, CentOS, AlmaLinux, Rocky Linux, Debian, Oracle Linux, Raspbian, RHEL, openSUSE, openSUSE Leap, SUSE Enterprise Linux, Fedora, and Ubuntu FreeBSD Windows macOS Cloud, on-premise, Running Docker Container High-quality scan- Vulnerability Database NVD JVN(Japanese)- OVAL Red Hat Debian Ubuntu SUSE Oracle Linux- Security Advisory Alpine-secdb Red Hat Security Advisories Debian Security Bug Tracker Ubuntu CVE Tracker Microsoft CVRF- Commands(yum, zypper, pkg-audit) RHSA / ALAS / ELSA / FreeBSD-SA Changelog- PoC, Exploit Exploit Database Metasploit-Framework modules qazbnm456/awesome-cve-poc nomi-sec/PoC-in-GitHub gmatuz/inthewilddb projectdiscovery/nuclei-templates- CERT US-CERT JPCERT- KEV CISA(Cybersecurity & Infrastructure Security Agency): Known Exploited Vulnerabilities Catalog VulnCheck: VulnCheck KEV- Cyber Threat Intelligence(MITRE ATT&CK and CAPEC) mitre/cti- Libraries aquasecurity/vuln-list- WordPress wpscan Scan modeFast Scan- Scan without root privilege, no dependencies Almost no load on the scan target server Offline mode scan with no internet access. (CentOS, Alma Linux, Rocky Linux, Debian, Oracle Linux, Red Hat, Fedora, and Ubuntu)Fast Root Scan- Scan with root privilege Almost no load on the scan target server Detect processes affected by update using yum-ps (Amazon Linux, CentOS, Alma Linux, Rocky Linux, Oracle Linux, Fedora, and RedHat) Detect processes which updated before but not restarting yet using checkrestart of debian-goodies (Debian and Ubuntu) Offline mode scan with no internet access. (CentOS, Alma Linux, Rocky Linux, Debian, Oracle Linux, Red Hat, Fedora, and Ubuntu) Remote, Local scan mode, Server modeRemote scan mode- User is required to only set up one machine that is connected to other target servers via SSHLocal scan mode- If you don't want the central Vuls server to connect to each server by SSH, you can use Vuls in the Local Scan mode.Server mode- First, start Vuls in server mode and listen as an HTTP server. Next, issue a command on the scan target server to collect software information. Then send the result to Vuls Server via HTTP. You receive the scan results as JSON format. No SSH needed, No Scanner needed. Only issuing Linux commands directory on the scan target server. Dynamic Analysis- It is possible to acquire the state of the server by connecting via SSH and executing the command. Vuls warns when the scan target server was updated the kernel etc. but not restarting it. Scan vulnerabilities of non-OS-packages- Libraries of programming language Self-compiled software Network DevicesVuls has some options to detect the vulnerabilities- Lockfile based Scan GitHub Integration Common Platform Enumeration (CPE) based Scan OWASP Dependency Check Integration Scan WordPress core, themes, plugins- Scan WordPress MISC- Nondestructive testing Pre-authorization is NOT necessary before scanning on AWS Vuls works well with Continuous Integration since tests can be run every day. This allows you to find vulnerabilities very quickly. Auto-generation of configuration file template Auto-detection of servers set using CIDR, generate configuration file template Email and Slack notification is possible (supports Japanese language) Scan result is viewable on accessory software, TUI Viewer in a terminal or Web UI (VulsRepo).---- What Vuls Doesn't Do- Vuls doesn't update the vulnerable packages.---- Document For more information such as Installation, Tutorial, Usage, visit vuls.io 日本語翻訳ドキュメント---- Authorskotakanbe (@kotakanbe) created vuls and these fine people have contributed. Contributesee vulsdoc---- Sponsors| | | Tines is no-code automation for security teams. Build powerful, reliable workflows without a development team. SAKURA internet Inc. is an Internet company founded in 1996. We provide cloud computing services such as "Sakura's Shared Server", "Sakura's VPS", and "Sakura's Cloud" to meet the needs of a wide range of customers, from individuals and corporations to the education and public sectors, using its own data centers in Japan. Based on the philosophy of "changing what you want to do into what you can do," we offer DX solutions for all fields.----License Please see LICENSE. {card-default label="📦 工具信息"} 🔗 项目地址:https://github.com/future-architect/vuls ⭐ Star数:12253 💻 开发语言:Go 📝 项目描述:适用于Linux、FreeBSD、Container、WordPress、编程语言库、网络设备的无代理漏洞扫描程序 {/card-default} 总的来说,vuls是一个功能比较实用的开源工具,适合日常工作和学习使用。如果你正在寻找一款相关工具,不妨下载试试。使用前建议仔细阅读项目文档。 本文介绍的工具来源于GitHub开源社区,仅供学习交流使用,请遵守原项目开源协议。 -
运维安全必备:subfinder 工具解析 推荐一个实用的开源工具——subfinder。项目由projectdiscovery开发维护,GitHub上获得了 14394 个Star。简单来说,它是一款快速被动子域枚举工具。,对于站长和开发者来说是个不错的工具。 工具功能介绍 Fast passive subdomain enumeration tool. Features • Install • Usage • API Setup • Library • Join Discord ---subfinder is a subdomain discovery tool that returns valid subdomains for websites, using passive online sources. It has a simple, modular architecture and is optimized for speed. subfinder is built for doing one thing only - passive subdomain enumeration, and it does that very well.We have made it to comply with all the used passive source licenses and usage restrictions. The passive model guarantees speed and stealthiness that can be leveraged by both penetration testers and bug bounty hunters alike. Fast and powerful resolution and wildcard elimination modules Curated passive sources to maximize results Multiple output formats supported (JSON, file, stdout) Optimized for speed and lightweight on resources STDIN/OUT support enables easy integration into workflows Usage sh subfinder -h This will display help for the tool. Here are all the switches it supports. yaml Usage: ./subfinder [flags]Flags: INPUT: -d, -domain string[] domains to find subdomains for -dL, -list string file containing list of domains for subdomain discoverySOURCE: -s, -sources string[] specific sources to use for discovery (-s crtsh,github). Use -ls to display all available sources. -recursive use only sources that can handle subdomains recursively (e.g. subdomain.domain.tld vs domain.tld) -all use all sources for enumeration (slow) -es, -exclude-sources string[] sources to exclude from enumeration (-es alienvault,zoomeyeapi)FILTER: -m, -match string[] subdomain or list of subdomain to match (file or comma separated) -f, -filter string[] subdomain or list of subdomain to filter (file or comma separated)RATE-LIMIT: -rl, -rate-limit int maximum number of http requests to send per second -rls value maximum number of http requests to send per second for providers in key=value format (-rls "hackertarget=10/s,shodan=15/s") -t int number of concurrent goroutines for resolving (-active only) (default 10)UPDATE: -up, -update update subfinder to latest version -duc, -disable-update-check disable automatic subfinder update checkOUTPUT: -o, -output string file to write output to -oJ, -json write output in JSONL(ines) format -oD, -output-dir string directory to write output (-dL only) -cs, -collect-sources include all sources in the output (-json only) -oI, -ip include host IP in output (-active only)CONFIGURATION: -config string flag config file (default "$CONFIG/subfinder/config.yaml") -pc, -provider-config string provider config file (default "$CONFIG/subfinder/provider-config.yaml") -r string[] comma separated list of resolvers to use -rL, -rlist string file containing list of resolvers to use -nW, -active display active subdomains only -proxy string http proxy to use with subfinder -ei, -exclude-ip exclude IPs from the list of domains -mr, -max-results int limit the number of results per source (0 = unlimited; honored by paginating sources)DEBUG: -silent show only subdomains in output -version show version of subfinder -v show verbose output -nc, -no-color disable color in output -ls, -list-sources list all available sources (-oJ for JSON)OPTIMIZATION: -timeout int seconds to wait before timing out (default 30) -max-time int minutes to wait for enumeration results (default 10) -rsr, -response-size-read int max response body size to read in bytes from passive sources (0 = unlimited) Environment VariablesSubfinder supports environment variables to specify custom paths for configuration files:- SUBFINDER_CONFIG - Path to config.yaml file (overrides default $CONFIG/subfinder/config.yaml) SUBFINDER_PROVIDER_CONFIG - Path to provider-config.yaml file (overrides default $CONFIG/subfinder/provider-config.yaml) Installationsubfinder requires go1.24 to install successfully. Run the following command to install the latest version: sh go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest Learn about more ways to install subfinder here: https://docs.projectdiscovery.io/tools/subfinder/install. Post Installation Instructionssubfinder can be used right after the installation, however many sources required API keys to work. Learn more here: https://docs.projectdiscovery.io/tools/subfinder/install#post-install-configuration. Running SubfinderLearn about how to run Subfinder here: https://docs.projectdiscovery.io/tools/subfinder/running. Subfinder Go librarySubfinder can also be used as library and a minimal examples of using subfinder SDK is available here Resources- Recon with Me !!! Licensesubfinder is made with 🖤 by the projectdiscovery team. Community contributions have made the project what it is. See the THANKS.md file for more details.Read the usage disclaimer at DISCLAIMER.md and contact us for any API removal. {card-default label="📦 工具信息"} 🔗 项目地址:https://github.com/projectdiscovery/subfinder ⭐ Star数:14394 💻 开发语言:Go 📝 项目描述:快速被动子域枚举工具。 {/card-default} 总的来说,subfinder是一个功能比较实用的开源工具,适合日常工作和学习使用。如果你正在寻找一款相关工具,不妨下载试试。使用前建议仔细阅读项目文档。 本文介绍的工具来源于GitHub开源社区,仅供学习交流使用,请遵守原项目开源协议。 -
分享一个不错的开源工具:osv-scanner 推荐一个实用的开源工具——osv-scanner。项目由google开发维护,GitHub上获得了 10990 个Star。简单来说,它是一款用Go编写的漏洞扫描程序,使用https://osv.dev提供的数据,对于站长和开发者来说是个不错的工具。 工具功能介绍 ---Use OSV-Scanner to find existing vulnerabilities affecting your project's dependencies. OSV-Scanner provides an officially supported frontend to the OSV database and CLI interface to OSV-Scalibr that connects a project’s list of dependencies with the vulnerabilities that affect them.OSV-Scanner supports a wide range of project types, package managers and features, including but not limited to:- Languages: C/C++, Dart, Elixir, Go, Java, Javascript, PHP, Python, R, Ruby, Rust. Package Managers: npm, pip, yarn, maven, go modules, cargo, gem, composer, nuget and others. Operating Systems: Detects vulnerabilities in OS packages on Linux systems. Containers: Scans container images for vulnerabilities in their base images and included packages. Guided Remediation: Provides recommendations for package version upgrades based on criteria such as dependency depth, minimum severity, fix strategy, and return on investment.OSV-Scanner uses the extensible OSV-Scalibr library under the hood to provide this functionality. If a language or package manager is not supported currently, please file a feature request.The underlying database, OSV.dev has several benefits in comparison with closed source advisory databases and scanners:- Covering most open source language and OS ecosystems (including Git), it’s comprehensive. Each advisory comes from an open and authoritative source (e.g. GitHub Security Advisories, RustSec Advisory Database, Ubuntu security notices) Anyone can suggest improvements to advisories, resulting in a very high quality database. The OSV format unambiguously stores information about affected versions in a machine-readable format that precisely maps onto a developer’s list of packagesThe above all results in accurate and actionable vulnerability notifications, which reduces the time needed to resolve them. Check out OSV.dev for more details! Basic installationTo install OSV-Scanner, please refer to the installation section of our documentation. OSV-Scanner releases can be found on the releases page of the GitHub repository. The recommended method is to download a prebuilt binary for your platform. Alternatively, you can use go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest to build it from source. Key FeaturesFor more information, please read our detailed documentation to learn how to use OSV-Scanner. For detailed information about each feature, click their titles in this README.Please note: These are the instructions for the latest OSV-Scanner V2 beta. If you are using V1, checkout the V1 README and documentation instead. Scanning a source directory bash $ osv-scanner scan source -r /path/to/your/dir This command will recursively scan the specified directory for any supported package files, such as package.json, go.mod, pom.xml, etc. and output any discovered vulnerabilities.OSV-Scanner has the option of using call analysis to determine if a vulnerable function is actually being used in the project, resulting in fewer false positives, and actionable alerts.OSV-Scanner can also detect vendored C/C++ code for vulnerability scanning. See here for details. Supported LockfilesOSV-Scanner supports 11+ language ecosystems and 19+ lockfile types. To check if your ecosystem is covered, please check out our detailed documentation. Container ScanningOSV-Scanner also supports comprehensive, layer-aware scanning for container images to detect vulnerabilities in the following operating system packages and language-specific dependencies.| Distro Support | Language Artifacts Support | Alpine OSGoDebianJavaUbuntuNode PythonSee the full documentation for details on support.Usage: bash $ osv-scanner scan image my-image-name:tag screencast of html output of container scanning图片 License ScanningCheck your dependencies' licenses using deps.dev data. For a summary: bash osv-scanner --licenses path/to/repository To check against an allowed license list (SPDX format): bash osv-scanner --licenses="MIT,Apache-2.0" path/to/directory Offline ScanningScan your project against a local OSV database. No network connection is required after the initial database download. The database can also be manually downloaded. bash osv-scanner --offline --download-offline-databases ./path/to/your/dir Guided Remediation (Experimental)> [!WARNING] Guided remediation (the fix command) can be risky when run on untrusted projects. It may trigger the package manager to execute scripts or follow external registries specified in the project. Please ensure you trust the source code and artifacts before proceeding.OSV-Scanner provides guided remediation, a feature that suggests package version upgrades based on criteria such as dependency depth, minimum severity, fix strategy, and return on investment. We currently support remediating vulnerabilities in the following files:| Ecosystem | File Format (Type) | Supported Remediation Strategies |npmpackage-lock.json (lockfile)in-placenpmpackage.json (manifest)relockMavenpom.xml (manifest)overrideThis is available as a headless CLI command, as well as an interactive mode.Example (for npm) bash $ osv-scanner fix \ --max-depth=3 \ --min-severity=5 \ --ignore-dev \ --strategy=in-place \ -L path/to/package-lock.json Interactive mode (for npm) bash $ osv-scanner fix \ -M path/to/package.json \ -L path/to/package-lock.json Data Sources and PrivacyOSV-Scanner communicates with the following external services during operation: OSV.dev APIThe primary data source for vulnerability information. OSV-Scanner queries this API to check packages for known vulnerabilities and to identify vendored C/C++ dependencies. Data sent includes package names, versions, ecosystems, and file hashes. Use --offline mode to disable network requests and scan against a local database instead. deps.dev APIUsed for supplementary package information:- Dependency resolution: Resolves dependency graphs for vulnerability scanning and remediation Container image scanning: Queries container image metadata for vulnerability detection License scanning (--licenses flag): Retrieves license information for packages Package deprecation: Checks if packages are deprecatedData sent includes package names, versions, and ecosystems. No source code is transmitted. Package RegistriesWhen using native registry for dependency resolution (instead of deps.dev), OSV-Scanner may query:| Registry | URL | Used For | Maven Centralrepo.maven.apache.org/maven2Maven package metadata and POM filesnpm Registryregistry.npmjs.orgnpm package metadataPyPIpypi.orgPython package metadataContribute Report ProblemsIf you have what looks like a bug, please use the GitHub issue tracking system. Before you file an issue, please search existing issues to see if your issue is already covered. Contributing code to osv-scannerSee CONTRIBUTING.md for documentation on how to contribute code. Star History {card-default label="📦 工具信息"} 🔗 项目地址:https://github.com/google/osv-scanner ⭐ Star数:10990 💻 开发语言:Go 📝 项目描述:用Go编写的漏洞扫描程序,使用https://osv.dev提供的数据 {/card-default} 总的来说,osv-scanner是一个功能比较实用的开源工具,适合日常工作和学习使用。如果你正在寻找一款相关工具,不妨下载试试。使用前建议仔细阅读项目文档。 本文介绍的工具来源于GitHub开源社区,仅供学习交流使用,请遵守原项目开源协议。