
# 1. Get vulnx
go install github.com/projectdiscovery/vulnx/v2/cmd/vulnx@latest
# 2. Explore commands
vulnx --help
vulnx search --help
# 3. Start exploring vulnerabilities (no API key required)
vulnx filters # See all available search fields
vulnx search apache # Basic search (subject to rate limits)
# 4. Set up your API key (recommended to avoid rate limits)
vulnx auth # Get free API key at https://cloud.projectdiscovery.io
# 5. Enhanced exploration with higher limits
vulnx search apache # No rate limits
vulnx id CVE-2021-44228 # Faster responses
精确搜索漏洞:
vulnx search "severity:critical && is_remote:true"
vulnx search "apache || nginx" --limit 20
vulnx search "cvss_score:>8.0 && cve_created_at:2024"
获取详细漏洞信息:
vulnx id CVE-2021-44228
vulnx id CVE-2024-1234 --json
分析漏洞模式:
vulnx analyze --fields severity
vulnx analyze --fields affected_products.vendor
输出格式:
vulnx search "apache" --json # Machine-readable JSON
vulnx search "apache" --output results.json # Save to file
vulnx search "apache" --silent # Quiet output
搜索控制:
vulnx search "apache" --limit 50 # Get 50 results
vulnx search "apache" --sort-desc cvss_score # Sort by CVSS score
vulnx search "apache" --fields cve_id,severity # Specific fields only
高级搜索:
vulnx search --term-facets severity=5,tags=10 "apache"
vulnx search --range-facets numeric:cvss_score:high:8:10 "remote"
vulnx search --highlight "apache" # Enable search highlighting
vulnx search --facet-size 20 "nginx" # More facet buckets
vulnx search --detailed "xss" # Detailed output like 'id' command
探索你可以搜索的内容:
vulnx filters # Show all available search fields
vulnx filters --json # Machine-readable field list
vulnx filters --output fields.json # Save field info to file
filters 命令显示所有可搜索字段的详细信息,包括:
示例输出:
Field: severity
Data Type: string
Description: Vulnerability severity level (e.g., critical, high, medium, low, info)
Can Sort: Yes
Facet Possible: Yes
Search Analyzer: keyword-lower
Examples: severity:critical, severity:high
Enum Values: critical, high, medium, low, info, unknown
Total: 69 filters available
使用此命令发现新的搜索可能性,并在构建复杂查询前了解字段语法。
查找高风险漏洞:
vulnx search "severity:critical && is_remote:true && is_kev:true"
vulnx search "cvss_score:>8.0 && cve_created_at:>=2024" # High CVSS from 2024
vulnx search "is_kev:true && age_in_days:<90" # Recent KEV exploits
按技术搜索:
vulnx search "apache" # Apache vulnerabilities
vulnx search "apache || nginx" # Multiple technologies
vulnx search "affected_products.vendor:microsoft" # By vendor
按严重性和分数过滤:
vulnx search "severity:high" # High severity
vulnx search "cvss_score:>7.0" # CVSS score above 7
vulnx search "epss_score:>0.8" # High EPSS score
基于时间的搜索:
vulnx search "cve_created_at:>=2024" # Published in 2024 or later
vulnx search "cve_created_at:>=2024-01-01 && cve_created_at:<2024-07-01" # First half of 2024
vulnx search "age_in_days:<30" # Recent vulnerabilities (last 30 days)
查找可利用的漏洞:
vulnx search "is_poc:true" # Has proof of concept
vulnx search "is_kev:true" # Known exploited vulns
vulnx search "is_template:true" # Has Nuclei templates
vulnx search --detailed "log4j" # Detailed analysis of specific vuln
产品和供应商过滤:
vulnx search --product apache,nginx # Filter by products (searches both vendor and product fields)
vulnx search --vendor microsoft,oracle # Filter by vendors only
vulnx search "NOT apache" # Exclude products using query syntax
vulnx search "NOT affected_products.vendor:microsoft" # Exclude vendors using query syntax
严重性和评分:
vulnx search --severity critical,high # Filter by severity
vulnx search "NOT severity:low" # Exclude severities using query syntax
vulnx search --cvss-score ">8.0" # Filter by CVSS score
vulnx search --epss-score ">0.8" # Filter by EPSS score
vulnx search --vuln-status confirmed # Filter by status
vulnx search --vuln-age "<30" # Recent vulnerabilities
漏洞利用特征:
vulnx search --kev # KEV vulnerabilities only
vulnx search --template # Has Nuclei templates
vulnx search --poc # Has proof of concept
vulnx search --hackerone # HackerOne reported
vulnx search --remote-exploit # Remotely exploitable
多种输入方式:
# Single ID lookup
vulnx id CVE-2024-1234
# Multiple IDs (comma-separated)
vulnx id CVE-2024-1234,CVE-2024-5678,CVE-2023-9999
# Auto-detection from stdin (no 'id' command needed!)
echo "CVE-2024-1234" | vulnx
echo -e "CVE-2024-1234\nCVE-2024-5678" | vulnx
# File input
vulnx id --file ids.txt
批量处理:
# JSON output for automation
vulnx id --json CVE-2024-1234 CVE-2024-5678
# Save to file
vulnx id --output vulns.json --file ids.txt
# Pipeline integration
cat report.txt | grep -o 'CVE-[0-9]\{4\}-[0-9]\+' | vulnx id --json
基本搜索:
vulnx search "apache" # Simple term
vulnx search "remote code execution" # Phrase search
vulnx search "severity:critical" # Field search
布尔逻辑:
vulnx search "apache && nginx" # Both terms
vulnx search "apache || nginx" # Either term
vulnx search "apache NOT tomcat" # Exclude term
vulnx search "(apache || nginx) && severity:high" # Grouped
范围和通配符:
vulnx search "cvss_score:>8.0" # Greater than
vulnx search "cvss_score:<9.0" # Less than
vulnx search "cve_created_at:>=2024-01-01" # Date comparison
vulnx search "age_in_days:<30" # Recent vulnerabilities
vulnx search "apache*" # Wildcard
重要:日期字段需要使用比较运算符(>=, >, <, <=)。
单日期比较:
vulnx search "cve_created_at:>=2024" # CVEs from 2024 onward
vulnx search "cve_created_at:<2024" # CVEs before 2024
vulnx search "cve_created_at:>2024-06-01" # CVEs after June 1, 2024
日期范围:
# CVEs from January 2024 only
vulnx search "cve_created_at:>=2024-01-01 && cve_created_at:<2024-02-01"
# High CVSS CVEs from 2024
vulnx search "cvss_score:>8.0 && cve_created_at:>=2024"
# Recent vulnerabilities (age-based)
vulnx search "age_in_days:<30" # Last 30 days
vulnx search "age_in_days:>365" # Older than 1 year
支持的格式:
2024(年)2024-01(年-月)2024-01-15(完整日期)vulnx 无需 API 密钥即可使用,但身份认证可带来显著优势:
⚠️ 无 API 密钥:
✅ 有 API 密钥:
设置身份认证:
vulnx auth # Interactive setup
vulnx auth --api-key YOUR_API_KEY # Non-interactive (automation)
vulnx auth --test # Test current API key
export PDCP_API_KEY="your-key-here" # Environment variable
身份认证模式:
vulnx auth - 带提示的引导式设置vulnx auth --api-key KEY - 适合自动化/CI/CDvulnx auth --test - 验证当前配置版本管理:
vulnx version # Show version and check for updates
vulnx version --disable-update-check # Show version without update check
vulnx update # Update to latest version
vulnx --update # Alternative update command
全局选项:
vulnx --json search "apache" # JSON output
vulnx --silent search "apache" # No banner
vulnx --timeout 60s search "apache" # Custom timeout
vulnx --disable-update-check search "apache" # Disable automatic update checks
速率限制问题:
Rate limit exceeded! API key required for higher limits.
→ Run: vulnx auth to configure API key and get higher limits
自动化/CI/CD 设置:
# Docker containers
vulnx auth --api-key "$SECRET_API_KEY"
# CI/CD pipelines
vulnx auth --api-key "${PDCP_API_KEY}"
# Kubernetes init containers
vulnx auth --api-key "$(cat /secrets/api-key)"
# Test authentication in scripts
vulnx auth --test && echo "Auth OK" || echo "Auth failed"
速率限制建议:
Configure API key with 'vulnx auth' to avoid rate limits
→ This appears when no API key is configured. To remove:
1. Set up API key: vulnx auth
2. Or use --silent flag to suppress informational messages
无结果:
vulnx search "is_kev:true" --limit 1 # Test with known results
vulnx healthcheck # Check connectivity
大量结果集:
vulnx search "apache" --limit 100 # Increase limit
vulnx search "apache" --offset 100 # Pagination
vulnx search --fields cve_id,severity "apache" # Fewer fields
连接问题:
vulnx --timeout 60s search "apache" # Increase timeout
vulnx --proxy http://localhost:8080 search "apache" # Use proxy
vulnx --debug search "apache" # Debug mode
帮助命令(无需 API 密钥):
vulnx --help # All commands overview
vulnx search --help # Search command help
vulnx id --help # ID command help
vulnx filters --help # Filters command help
vulnx analyze --help # Analyze command help
vulnx version # Version info with update check
vulnx version --disable-update-check # Version info without update check
数据探索(无 API 密钥时受速率限制):
vulnx filters # Show all searchable fields
vulnx search help # Detailed search fields
vulnx analyze help # Available analyze fields
⚠️ 注意 所有命令无需 API 密钥即可使用,但会受到速率限制。使用
vulnx auth配置 API 密钥以获得更高的限制和更好的性能。
vulnx search apachevulnx auth 配置 API 密钥--disable-update-check 可禁用vulnx filters 发现所有可用的搜索字段及其语法--jsonanalyze 了解数据模式有关高级用法模式和示例,请参阅 USAGE.md。
有关开发环境设置、代码质量检查和贡献指南,请参阅 DEVELOPMENT.md。
vulnx 根据 MIT License 分发。
| 命令 | 用途 | 示例 |
|---|
search | 使用高级过滤器查找漏洞 | vulnx search "apache && severity:high" |
id | 获取特定 CVE 的详情 | vulnx id CVE-2021-44228 |
filters | 列出所有可用的搜索字段和过滤器 | vulnx filters |
analyze | 按字段聚合数据 | vulnx analyze -f severity |
auth | 配置 API 访问 | vulnx auth |
version | 显示版本信息并检查更新 | vulnx version |
update | 将 vulnx 更新到最新版本 | vulnx update |
healthcheck | 测试连通性 | vulnx healthcheck |
| 标志 | 简写 | 描述 | 示例 |
|---|
--product | -p | 按产品过滤 | --product apache,nginx |
--vendor | 按供应商过滤 | --vendor microsoft,oracle | |
--severity | -s | 按严重性过滤 | --severity critical,high |
--tags | 按标签过滤 | --tags rce,injection | |
--cvss-score | 按 CVSS 分数过滤 | --cvss-score ">8.0" | |
--epss-score | 按 EPSS 分数过滤 | --epss-score ">0.8" | |
--vuln-age | -a | 按期限过滤 | --vuln-age "<30" |
--vuln-type | 按漏洞类型过滤 | --vuln-type sql_injection | |
--kev | 仅 KEV 漏洞 | --kev | |
--template | -t | 具有 Nuclei 模板 | --template |
--poc | 具有概念验证 | --poc | |
--hackerone | HackerOne 已报告 | --hackerone | |
--remote-exploit | 可远程利用 | --remote-exploit | |
--vuln-status | 按漏洞状态过滤 | --vuln-status confirmed |
| 标志 | 简写 | 描述 | 示例 |
|---|
--detailed | 详细输出,如 'id' | --detailed | |
--highlight | 启用搜索高亮 | --highlight | |
--limit | -n | 结果数量 | --limit 50 |
--offset | 分页偏移 | --offset 100 | |
--sort-asc | 升序排序 | --sort-asc cvss_score | |
--sort-desc | 降序排序 | --sort-desc cve_created_at | |
--fields | 选择特定字段 | --fields cve_id,severity | |
--term-facets | 计算词项分面 | --term-facets severity=5 | |
--range-facets | 计算范围分面 | --range-facets numeric:cvss_score:high:8:10 | |
--facet-size | 分面桶数量 | --facet-size 20 |
| 字段 | 描述 | 示例值 |
|---|
severity | 漏洞严重性 | low, medium, high, critical |
cvss_score | CVSS 分数(0-10) | 7.5, >8.0, <9.0 |
cve_id | CVE 标识符 | CVE-2021-44228 |
is_remote | 可远程利用 | true, false |
is_kev | 已知被利用漏洞 | true, false |
is_poc | 具有概念验证 | true, false |
affected_products.vendor | 供应商名称 | apache, microsoft |
affected_products.product | 产品名称 | tomcat, windows |
cve_created_at | 发布日期 | >=2024, >2024-01-01, <2023 |
age_in_days | 发布以来的天数 | <30, >365, <=90 |