Kodjocares/NEXUS

GitHub: Kodjocares/NEXUS

一款通过手机即时通讯控制的自主多源 OSINT 情报平台,支持威胁评分、关联图谱可视化和自动报告生成。

Stars: 0 | Forks: 0

# ⬡ NEXUS
![NEXUS Banner](https://img.shields.io/badge/NEXUS-Autonomous_OSINT-e24b4a?style=for-the-badge&logo=target&logoColor=white) [![CI](https://github.com/Kodjocares/nexus/actions/workflows/ci.yml/badge.svg)](https://github.com/Kodjocares/nexus/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-378add.svg)](LICENSE) [![Python 3.10+](https://img.shields.io/badge/Python-3.10+-3776ab?logo=python&logoColor=white)](https://python.org) ![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux-5dcaa5) [![OpenClaw](https://img.shields.io/badge/OpenClaw-Skill-7f77dd)](https://github.com/steipete/openclaw) **自主多域 OSINT 和威胁情报系统** 由 Claude 驱动 · 通过 WhatsApp 和 Telegram 控制 · 通过 OpenClaw 持久运行
## 什么是 NEXUS? NEXUS 是一个你可以通过手机控制的独立情报平台。向你的 Telegram bot 或 WhatsApp 号码发送消息,NEXUS 就会自主运行多源 OSINT 侦察,计算加权威胁评分,生成可在浏览器中点击打开的交互式链接图谱,并将结构化报告推送到 Notion 和 Obsidian —— 所有这些都无需触碰终端。 ``` You (WhatsApp / Telegram) | v nexus_bot.py <-----------------------------------------+ | | v | dispatch.sh proactive alerts | (score delta, events) +----+------------------------+ | v v v | Security Dev Monitor --------------------+ Agent Agent Agent | | v v osint.sh github.sh |-- VirusTotal |-- Shodan |-- Censys |-- AbuseIPDB +-- CVE/NVD + EPSS | v threat_score.sh --> weighted 0-100 score | v graph.sh --> POST --> graph_server.py --> URL sent to phone | v report.sh --> Notion page + Obsidian vault note ``` ## 功能特性 | 功能 | 详情 | |---|---| | 🔬 **6 层 OSINT** | VirusTotal, Shodan, Censys, AbuseIPDB, CVE/NVD, WHOIS/DNS | | 🧮 **威胁评分** | 加权 0-100 分,等级为 CLEAN / LOW / MEDIUM / HIGH / CRITICAL | | 🕸 **链接图谱** | 自动渲染的交互式 D3 图谱 URL,在聊天中发送回 | | 📲 **双机器人** | Telegram Bot API + WhatsApp (via Twilio) | | 📋 **自动报告** | 每次扫描生成 Notion 数据库页面 + Obsidian 库笔记 | | 👁 **监控** | 监控列表,每 15 分钟 cron 重新扫描并差异报警 | | 🤖 **Dev 代理** | GitHub PR/issue 管理,代码审查摘要 | | 🔌 **OpenClaw 技能** | 嵌入式 ClawHub 技能,用于持久的自主使用 | ## 项目结构 ``` nexus/ ├── bot/ │ └── nexus_bot.py Telegram + WhatsApp unified bot ├── server/ │ └── graph_server.py Flask: stores graph JSON, serves D3 pages ├── tools/ │ ├── osint.sh All 5 OSINT engines in one file │ ├── dispatch.sh Master command router │ ├── recon.sh Full 6-layer recon runner │ ├── threat_score.sh Weighted score aggregator │ ├── graph.sh Link graph JSON builder │ ├── report.sh Notion + Obsidian reporter │ ├── monitor.sh Watchlist + cron + alerting │ └── github.sh GitHub dev automation ├── agents/ │ ├── orchestrator.md Master routing prompt │ ├── security.md Security agent prompt │ ├── dev.md Dev agent prompt │ └── monitor.md Monitor agent prompt ├── skills/ │ └── SKILL.md OpenClaw / ClawHub skill definition ├── .github/ │ └── workflows/ci.yml Lint + test CI pipeline ├── .env.example All required env vars documented ├── install.sh One-command installer ├── requirements.txt Python dependencies ├── CONTRIBUTING.md └── LICENSE ``` ## 快速开始 ### 前置条件 - macOS 或 Linux - Python 3.10+ - `curl`, `dig`, `whois` (macOS 标准) - `gh` CLI 用于 Dev 代理: `brew install gh` - Telegram bot token **或** Twilio 账户用于 WhatsApp ### 1 — 克隆并安装 ``` git clone https://github.com/Kodjocares/nexus.git cd nexus bash install.sh ``` ### 2 — 配置 ``` nano .env ``` 至少填写:一个机器人平台,`VIRUSTOTAL_API_KEY`,`SHODAN_API_KEY`,`GRAPH_SERVER_URL`,`GRAPH_SERVER_SECRET`。 ### 3 — 启动图谱服务器 ``` python3 server/graph_server.py ``` 为了从手机外部访问: ``` ngrok http 5555 # 将 https://xxxx.ngrok.io URL 复制到 .env 中的 GRAPH_SERVER_URL ``` ### 4 — 启动机器人 ``` python3 bot/nexus_bot.py ``` ### 5 — 测试 向你的 Telegram bot 或 WhatsApp 号码发送: ``` nexus scan 8.8.8.8 ``` ## 配置参考 ### 机器人平台 | 变量 | 描述 | 获取位置 | |---|---|---| | `TELEGRAM_BOT_TOKEN` | Bot token | [@BotFather](https://t.me/botfather) | | `TELEGRAM_CHAT_ID` | 你的聊天 ID | [@userinfobot](https://t.me/userinfobot) | | `TWILIO_ACCOUNT_SID` | 账户 SID | [console.twilio.com](https://console.twilio.com) | | `TWILIO_AUTH_TOKEN` | 认证 token | [console.twilio.com](https://console.twilio.com) | | `TWILIO_WHATSAPP_FROM` | 沙箱号码 | Twilio WhatsApp 沙箱 | | `WHATSAPP_TO` | 你的号码 | `+358XXXXXXXXX` 格式 | ### OSINT API | 变量 | 免费额度 | 注册 | |---|---|---| | `VIRUSTOTAL_API_KEY` | 500 次/天 | [virustotal.com/gui/join-us](https://www.virustotal.com/gui/join-us) | | `SHODAN_API_KEY` | 100 积分/月 | [account.shodan.io](https://account.shodan.io) | | `CENSYS_API_ID` + `CENSYS_API_SECRET` | 250 次查询/月 | [search.censys.io/register](https://search.censys.io/register) | | `ABUSEIPDB_API_KEY` | 1,000 次检查/天 | [abuseipdb.com/account/api](https://www.abuseipdb.com/account/api) | CVE/NVD 查询免费且无需密钥。 ### 报告(可选) | 变量 | 描述 | |---|---| | `NOTION_API_TOKEN` | 来自 [notion.so/my-integrations](https://www.notion.so/my-integrations) | | `NOTION_DATABASE_ID` | 你的 Notion 数据库 URL 中的 ID | | `OBSIDIAN_VAULT_PATH` | 绝对路径,例如 `/Users/you/Documents/Vault` | ### 图谱服务器 | 变量 | 描述 | |---|---| | `GRAPH_SERVER_URL` | 可访问的 URL,例如 `https://xxxx.ngrok.io` | | `GRAPH_SERVER_PORT` | 端口(默认:`5555`) | | `GRAPH_SERVER_SECRET` | 用于保护 `/graph/store` 的随机字符串 | ### GitHub | 变量 | 描述 | |---|---| | `GITHUB_TOKEN` | 具有 `repo` + `read:user` 权限的 Token | ## 机器人命令 ``` nexus scan Full 6-layer recon + score + graph link nexus score Threat score only nexus graph Interactive link graph URL nexus vt VirusTotal nexus shodan Shodan host / search nexus censys Censys host / search nexus abuse AbuseIPDB nexus cve CVE-2024-1234 CVE detail + EPSS score nexus cve log4j CVE keyword search nexus report Push to Notion + Obsidian nexus report notion Notion only nexus report obsidian Obsidian only nexus pr list Open pull requests nexus issue list Open issues nexus watch ip Add to watchlist nexus watch domain Add to watchlist nexus watch repo Watch GitHub repo nexus monitor list Active watches nexus status System health nexus help Full command reference ``` ## 监控和警报 ``` bash tools/monitor.sh watch ip 185.220.101.47 bash tools/monitor.sh watch domain suspicious.ru bash tools/monitor.sh watch repo Kodjocares/nexus bash tools/monitor.sh cron # install 15-min cron job bash tools/monitor.sh list # show active watches ``` 当威胁评分变化达到 20+ 分时,NEXUS 会向两个平台发送主动警报: ``` NEXUS ALERT [a3f92b1c] Target : 185.220.101.47 Score : 34.0 -> 71.5 (delta 37.5) Risk : HIGH Time : 2025-03-15 14:22 UTC ``` ## OpenClaw 集成 ``` cp skills/SKILL.md ~/.openclaw/skills/nexus/SKILL.md ``` NEXUS 随后可作为 ClawHub 技能使用,并通过关键词自动触发:`scan`、`recon`、`cve`、`threat`、`shodan` 等。 ## 生产部署 ``` # 使用 PM2 npm install -g pm2 pm2 start "python3 bot/nexus_bot.py" --name nexus-bot pm2 start "python3 server/graph_server.py" --name nexus-graph pm2 save && pm2 startup ``` ## 免责声明 NEXUS 仅用于授权的安全研究和防御用途。切勿在未经明确许可的情况下扫描目标。作者不对滥用行为负责。 ## 许可证 MIT — 详见 [LICENSE](LICENSE)
@Kodjocares 使用 OpenClaw + Claude 构建
标签:ESC4, Notion集成, Obsidian, OSINT, Python, Telegram机器人, WhatsApp集成, 多源侦察, 威胁情报, 威胁评分, 安全运营, 实时处理, 密码管理, 应用安全, 开发者工具, 情报平台, 扫描框架, 无后门, 移动端控制, 网络安全, 自主智能体, 自动化报告, 赛博侦察, 逆向工具, 隐私保护, 风险分析