rhaist/marq

GitHub: rhaist/marq

一个模型无关的网络安全 AI 助手,将约 80 个 Kali 工具和 73 个专家技能 playbook 统一封装为可审计、沙箱隔离的 MCP 服务。

Stars: 3 | Forks: 0

marq ### 你的通用网络安全助手 询问任何有关安全的问题,并获得合适的工具和最新的专业知识来 解答 —— 无论你选择哪种模型,本地还是前沿模型。 [![CI](https://static.pigsec.cn/wp-content/uploads/repos/cas/99/993938d8ce5e902ccfb9d6747725c320d855dea3235ed9a304cedf0d94c9321f.svg)](https://github.com/rhaist/marq/actions/workflows/ci.yml)
``` "Threat-model this payment API." → architecture "Map our pentest findings to ISO 27001 and SOC 2." → GRC + standards "What does this malware sample actually do?" → malware "Run an authorized pentest of *.acme.com." → offensive "Our breach-notification clock under GDPR + US law?" → regulation "Build the ransomware incident runbook." → IR + resilience ``` **~80 个安全工具 + ~73 个专家 playbook(符合 2026 年最新标准),集成于一个** 可审计的二进制文件中。** 你只需提供模型;marq 提供工具和知识。 ## 开始使用 ``` # Get marq (prebuilt image — or build from source: docker build -t marq .) docker pull ghcr.io/rhaist/marq && docker tag ghcr.io/rhaist/marq marq ``` 无需 Docker Desktop —— **OrbStack** (macOS) 或 **Podman / Colima** (Linux) 同样可以很好地运行 该镜像 ([`docs/SETUP.md`](docs/SETUP.md))。 ### 完全本地运行 —— 推荐 在你自己的机器上运行未经审查的模型:没有云,没有拒绝响应,没有任何数据离开 主机。通过 [llama.cpp](https://github.com/ggml-org/llama.cpp) 使用 [Pi](https://pi.dev/) 驱动 marq: ``` # 1. the model — full flags matter: --reasoning-format keeps chain-of-thought # out of the reply, --jinja makes tool calls parse (see docs/SETUP.md §2a) llama-server -hf HauhauCS/Gemma4-12B-QAT-Uncensored-HauhauCS-Balanced:Q4_K_M \ --host 127.0.0.1 --port 8080 -ngl 99 --ctx-size 65536 --jinja \ --reasoning-format deepseek \ -fa on -ctk q8_0 -ctv q8_0 \ --temp 0.6 --top-p 0.9 --top-k 64 --min-p 0.05 --repeat-penalty 1.1 # 2. marq in a long-lived container bound to your workspace install -m 0755 pi/marq ~/.local/bin/marq && marq up ~/work # 3. one-time Pi config — llama.cpp provider + marq's system prompt + skill. # Without SYSTEM.md a small model narrates instead of driving marq. → docs/SETUP.md §4 ln -sf "$PWD/pi/SYSTEM.md" ~/.pi/agent/SYSTEM.md # then run `pi` ``` 然后只需与它对话:_"Set scope to scanme.nmap.org and run a quick nmap,"_,或者 _"Load the nis2-dora skill — what's our breach clock?"_ 完整的本地演练指南 (Pi provider、skill、调优)→ [`docs/SETUP.md`](docs/SETUP.md#4-run-with-a-local-model-pi--the-marq-skill)。 ### 或者退而使用前沿模型 对于最繁重的推理任务(架构、GRC、IR 报告撰写),可以将前沿 MCP 客户端指向 marq: ``` claude mcp add marq -- docker run --rm -i \ --security-opt no-new-privileges:true --cap-drop ALL \ --cap-add NET_RAW --cap-add NET_ADMIN --cap-add NET_BIND_SERVICE \ -v marq-audit:/var/log/marq -v marq-work:/work -e MARQ_OPERATOR=marq marq ``` 任何 MCP 客户端都可以运行(Codex、Claude Desktop)→ [`docs/CLIENTS.md`](docs/CLIENTS.md)。 (这些权限仅为 SYN 扫描所需;完整配置(包含 API keys)请见 [`mcp.json.example`](mcp.json.example)。) ## 你将获得什么 - **执行能力** — ~80 个封装的 Kali 工具(侦察、Web、AD/内部网络、漏洞利用、 凭据破解、恶意软件静态分析、OSINT),每个工具都经过审计日志记录和沙箱隔离; 扫描结果将渲染为 `findings.md` / `.csv`(可选包含 CVSS + CWE)。 - **专业知识** — 涵盖 14 个领域的 ~73 个 `load_skill` playbook,基于最新的(2026 年) 标准进行网络调研,告诉模型 _如何_ 使用工具,以及在没有工具的情况下 _做些什么_: 进攻、恶意软件、威胁情报、安全运营、架构、GRC、标准与欧美法规、CISO、红队/紫队、 弹性恢复、人为因素、DevSecOps/隐私保护。 - **天生可审计** — 每个外部工具调用都会通过一个汇聚点:一个只追加的、经过 `fsync` 的 审计日志、超时机制和输出上限。文件访问权限被沙箱隔离至 `/work`+`/tmp`,且镜像以 非 root 用户运行(推荐的运行参数还会移除所有 Linux capabilities + `no-new-privileges`)。
完整的工具套件 — 基于 Kali 的 ~80 个工具(点击展开) | 类别 | 工具 | | :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **侦察 / 网络** | `nmap` · `masscan` · `naabu` · `dnsx` · `dnsrecon` · `subfinder` · `httpx_probe` · `dns_lookup` · `whois_lookup` · `ssh_audit` · `fping_sweep` · `snmp_walk` · `snmp_check` · `snmp_brute` · `smtp_user_enum` · `smtp_test` · `asnmap` · `cdncheck` · `censys_search` | | **OSINT — 组织/域名** | `theharvester` · `spiderfoot` · `shodan_host` · `shodan_search` · `gitleaks` · `trufflehog` · `gau_urls` · `exif_metadata` | | **OSINT — 人员** | `sherlock` · `maigret_username` · `holehe_email` · `h8mail_breach` · `phoneinfoga` | | **Web 应用** | `nuclei` · `nikto` · `feroxbuster` · `katana` · `ffuf` · `gobuster_dir` · `arjun` · `whatweb` · `wafw00f` · `cmseek` · `wpscan` · `testssl` · `dalfox` · `sqlmap` · `jwt_tool` · `trivy` · `interactsh` · `paramspider` · `sstimap` | | **漏洞利用** | `donut` · `hydra` · `searchsploit` | | **AD / 内部网络** | `impacket_secretsdump` · `impacket_kerberoast` · `impacket_asreproast` · `impacket_psexec` · `impacket_wmiexec` · `impacket_ntlmrelayx` · `netexec` · `certipy_find` · `bloodhound_collect` · `evil_winrm` · `enum4linux` · `smb_enum` · `ldap_search` · `responder` · `nbtscan` | | **凭据** | `john` · `hashcat` · `hash_identify` | | **恶意软件研究** (静态) | `capa` · `yara_scan` · `olevba` · `bin_headers` | | **文件** (沙箱隔离 `/work`, `/tmp`) | `list_dir` · `read_file` · `write_file` | | **结果与任务** | `report_finding` · `render_report` · `list_jobs` · `job_status` | | **知识** | `load_skill` | | **逃生舱** (选择开启) | `run_shell` |
工作原理 — 一个注册中心,两个前端(点击展开) ``` MCP client ──stdio JSON-RPC──▶ marq serve ┐ terminal agent (Pi) ──bash──▶ pi/marq shim ─┤ both hit the same registry (docker exec) │ ▼ registry.All() ── one Tool list ├─ recon nmap, naabu, dnsx, masscan… ├─ osint theHarvester, spiderfoot, shodan, gitleaks… ├─ people sherlock, maigret, holehe, phoneinfoga… ├─ web nuclei, katana, feroxbuster, sqlmap… ├─ exploit donut, hydra, searchsploit ├─ internal impacket, netexec, certipy, bloodhound, enum4linux… ├─ creds john, hashcat, name-that-hash ├─ malware capa, yara_scan, olevba, bin_headers ├─ files read/write/list (sandboxed /work) └─ extras report_finding, render_report, list_jobs, load_skill │ runner.Run ──▶ audit.jsonl (every call) load_skill ──▶ skills library (markdown, ~73 playbooks / 14 domains) ``` 每个执行工具都会通过 `internal/runner/runner.go::Run` 汇聚 —— 这是用于审计日志、 超时处理和输出截断的单一节点。
## 文档 | 文档 | 包含内容 | | :------------------------------------- | :------------------------------------------------------- | | [`docs/SETUP.md`](docs/SETUP.md) | 按操作系统安装(macOS 和 Debian),两种运行模式 | | [`docs/CLIENTS.md`](docs/CLIENTS.md) | 选择客户端/模型 — Claude Code、Codex、Pi + llama.cpp | | [`docs/USAGE.md`](docs/USAGE.md) | 每个工具、环境变量、API keys、阅读审计日志 | | [`docs/SECURITY.md`](docs/SECURITY.md) | 法律/道德基准、防护模型、强化指南 | ## License **GNU AGPLv3** — 详见 [`LICENSE`](LICENSE)。© 2026 marq 贡献者。自由软件; 如果将修改后的版本作为网络服务运行,你必须向用户提供其源代码。 仅用于授权的安全测试和教育目的,**不提供任何担保** — 请负责任地使用。
标签:DLL 劫持, EVTX分析, IP 地址批量处理, MCP, 人工智能助手, 域名收集, 大语言模型, 安全合规, 实时处理, 密码管理, 日志审计, 网络代理, 网络安全, 请求拦截, 隐私保护