chore: import TideSec/TscanPlus main docs snapshot
History-free lightweight snapshot (docs/skill only). Large binaries and media published via Gitea Releases.
This commit is contained in:
@@ -0,0 +1,115 @@
|
||||
# TscanPlus Agent Skill(skillpack)
|
||||
|
||||
本目录为 **唯一权威** Skill 来源,与 IDE/产品无关,供 MCP Agent、GUI 导出 zip、Cursor 等使用。
|
||||
|
||||
| 文件 | 说明 |
|
||||
|------|------|
|
||||
| `SKILL.md` | Agent 行为说明(授权、八大模块、工具参数、MCP 接入、汇报格式) |
|
||||
| `examples.md` | 各模块 MCP 对话与参数示例 |
|
||||
| `mcp-config-example.json` | MCP `mcpServers` 配置示例 |
|
||||
|
||||
|
||||
MCP 服务配置(`mcp stdio` / `mcp serve`)见 `SKILL.md` 正文。
|
||||
|
||||
---
|
||||
|
||||
## 获取 Skill 包
|
||||
|
||||
请用下列方式之一取得与 `TscanPlus-skill` 相同的文件(`SKILL.md`、`examples.md`、`README.md`、`mcp-config-example.json`):
|
||||
|
||||
| 方式 | 说明 |
|
||||
|------|------|
|
||||
| **GUI 导出(推荐)** | TscanPlus → **AI 辅助** → **MCP 服务配置** → **导出 Skill 模板**,得到 `TscanPlus-skill.zip`,解压到任意目录 |
|
||||
| **仓库源码** | 使用 `TscanPlus-skill/` 下文件,或克隆项目后从该目录复制 |
|
||||
|
||||
解压 zip 后目录示例:
|
||||
|
||||
```text
|
||||
tscanplus-mcp-skill/
|
||||
SKILL.md
|
||||
examples.md
|
||||
README.md
|
||||
mcp-config-example.json
|
||||
```
|
||||
|
||||
再按下方「各宿主如何引用」**导入或手工配置**;仅配置 MCP、不导入 Skill 时见文末「无 Skill、仅 MCP」。
|
||||
|
||||
---
|
||||
|
||||
## 各宿主如何引用
|
||||
|
||||
|
||||
### Claude Desktop
|
||||
|
||||
**Skill:** 从 zip 解压得到 `SKILL.md`,将「授权」至「排错」章节复制到 **Settings → Profile → Custom Instructions**(无内置 Skill 目录,只能手工粘贴)。
|
||||
|
||||
**MCP:** 在 `claude_desktop_config.json` 的 `mcpServers` 中加入 `stdio` 或 `url`(可参考 `mcp-config-example.json`),修改后重启应用。
|
||||
|
||||
### VS Code / JetBrains 等(支持 MCP 的扩展)
|
||||
|
||||
**Skill:** 将解压后的 `SKILL.md` 要点写入 `.github/copilot-instructions.md` 或扩展指定的 `AGENTS.md` / rules 目录。
|
||||
|
||||
**MCP:** 在扩展 MCP 设置中添加 `tscanplus`,JSON 结构见 `mcp-config-example.json`。
|
||||
|
||||
### Cline、Roo Code、Continue 等 IDE 插件
|
||||
|
||||
**Skill:** 将解压后的 `SKILL.md` 全文或核心章节粘贴到插件的 **Custom Rules / .clinerules / 系统提示**;`examples.md` 可作参考,不必全部导入。
|
||||
|
||||
**MCP:** 插件中添加 MCP Server(stdio 或 sse),参数见 `SKILL.md` 或 `mcp-config-example.json`。
|
||||
|
||||
|
||||
### Cursor(Cursor IDE / Cursor CLI)
|
||||
|
||||
**Skill(下载后导入或手工配置)**
|
||||
|
||||
1. **获取文件**:GUI 导出 `TscanPlus-skill.zip` 并解压(见上文「获取 Skill 包」)。
|
||||
2. **创建目录**(二选一):
|
||||
- **当前项目**:`<你的项目根>/.cursor/skills/tscanplus/`
|
||||
- **全局(所有项目)**:`~/.cursor/skills/tscanplus/`(Windows 为 `%USERPROFILE%\.cursor\skills\tscanplus\`)
|
||||
3. **复制文件**:将解压得到的 `SKILL.md` 放入该目录;建议同时放入 `examples.md`(Agent 可读同目录示例)。
|
||||
4. **重载**:保存后重启 Cursor,或在设置中重载窗口,使 Skill 生效。
|
||||
5. **使用**:对话输入 `@tscanplus` 引用技能,或依赖 `SKILL.md` 头部 `description` 自动匹配。
|
||||
|
||||
目录结构示例:
|
||||
|
||||
```text
|
||||
.cursor/skills/tscanplus/
|
||||
SKILL.md
|
||||
examples.md # 可选,建议保留
|
||||
```
|
||||
|
||||
**MCP**
|
||||
|
||||
- 全局:`~/.cursor/mcp.json`
|
||||
- 项目:`<仓库>/.cursor/mcp.json`
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"tscanplus": {
|
||||
"command": "/绝对路径/TscanPlus",
|
||||
"args": ["mcp", "stdio"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 自托管 Agent / 其他 MCP 客户端
|
||||
|
||||
1. **MCP:** 按 `mcp-config-example.json` 配置 `mcpServers`,推荐 `stdio`。
|
||||
2. **行为:** 将解压后的 `SKILL.md` 作为系统提示附件,或写入自有 Agent 策略 YAML。
|
||||
3. **HTTP:** 默认 Streamable HTTP:`TscanPlus mcp serve -listen 127.0.0.1:8088`,客户端填 `http://127.0.0.1:8088/mcp`;旧客户端可用 `-transport sse`,填 `http://127.0.0.1:8088/sse`。
|
||||
|
||||
### 无 Skill、仅 MCP
|
||||
|
||||
仅配置 MCP 时 Agent 仍可调用工具,但可能缺少授权策略、默认 `MCP` 项目语义与汇报格式。建议至少合并 `SKILL.md` 的「授权」「项目名 MCP」「调用后如何汇报」三节。
|
||||
|
||||
---
|
||||
|
||||
## 文件对照
|
||||
|
||||
| 用途 | 开发者(仓库内) | 普通用户(导出 zip 后) |
|
||||
|------|------------------|-------------------------|
|
||||
| Skill 源文件 | `TscanPlus-skill/SKILL.md` | 解压目录中的 `SKILL.md` |
|
||||
| 示例 | `TscanPlus-skill/examples.md` | 解压目录中的 `examples.md` |
|
||||
| Cursor 生效位置 | `.cursor/skills/tscanplus/SKILL.md` | 自行复制到 `~/.cursor/skills/tscanplus/` 或项目 `.cursor/skills/tscanplus/` |
|
||||
@@ -0,0 +1,375 @@
|
||||
---
|
||||
name: tscanplus
|
||||
description: >-
|
||||
Operates TscanPlus security scanner via MCP tools or CLI for authorized targets only.
|
||||
Use when the user mentions TscanPlus, port/URL/POC/subdomain scanning, MCP integration,
|
||||
ip_scan, tscan_scan, or recon on IPs, domains, or URLs in any AI assistant with MCP support.
|
||||
---
|
||||
|
||||
# TscanPlus 扫描助手
|
||||
|
||||
通过 **MCP 工具**(首选)或 **CLI** 驱动 TscanPlus(与无影 GUI 版共享 `config.yaml`、`config.db`)。参数语义对齐 **TscanClient** 命令行版(`-m` 八大模块、`-h/-u/-d/-ck` 等)。
|
||||
|
||||
> 本文档为 Agent Skill,可放入宿主技能目录,或复制章节到自定义系统提示。对话示例见 [examples.md](examples.md)。
|
||||
|
||||
## 授权(强制)
|
||||
|
||||
- 仅对用户**明确拥有书面授权**的目标扫描(自有 lab、渗透项目 scope 内)。
|
||||
- 未获授权时:**拒绝扫描**,并说明原因。
|
||||
- 默认避免:全端口 `1-65535`、大范围 C 段、生产环境、开启 `poc_check`/`pwd_check`/`poc_full`,除非用户明确要求。
|
||||
- 资产过多时不要一次开启全部模块,以免耗时过久或占满 CPU。
|
||||
- 扫描前用一句话复述:目标、模块、是否含 POC/爆破。
|
||||
|
||||
## 产品能力概览
|
||||
|
||||
TscanPlus / CLI 集成八大安全检测模块:
|
||||
|
||||
| 模块 | CLI `-m` | MCP 单工具 | 说明 |
|
||||
|------|----------|------------|------|
|
||||
| 端口扫描 | `port` | `ip_scan` | IP/CIDR、存活探测、端口、可选服务指纹/POC/弱口令 |
|
||||
| Web 指纹 | `url` | `url_scan` | URL 指纹识别、Title、可选联动 POC |
|
||||
| POC 验证 | `poc` | `poc_scan` | xray 1.0 格式 POC,可按指纹或全量 |
|
||||
| 弱口令 | `crack` | `pwd_crack` | 多协议爆破,`targets` 为 `host:port` |
|
||||
| 目录枚举 | `dir` | `dir_scan` | 路径爆破,可自定义字典 |
|
||||
| JS 敏感信息 | `js` | `js_scan` | JS 文件中密钥、接口等 |
|
||||
| 子域名 | `domain` | `subdomain_scan` | 字典 + 可选 API(key 在 config.yaml) |
|
||||
| 空间测绘 | `cyber` | `cyber_search` | Hunter/FOFA 等(引擎在 config.yaml) |
|
||||
|
||||
**多模块联动**使用 `tscan_scan`,`modules` 对应 `-m`,流程与 GUI 项目管理一致:
|
||||
|
||||
**cyber → domain → port → crack → url → poc → dir → js**
|
||||
|
||||
前一项的**全部结果**会作为下一项的输入。常用组合(授权 lab 内):
|
||||
|
||||
| 场景 | `modules` / CLI `-m` |
|
||||
|------|----------------------|
|
||||
| 内网主机摸底 | `port,url,poc` 或 `port,poc,crack` |
|
||||
| Web 专项 | `url,poc,dir,js` |
|
||||
| 域名资产 | `domain,port,url,poc` |
|
||||
| 测绘后深挖 | `cyber,port,url,poc` |
|
||||
|
||||
## MCP 工具选型
|
||||
|
||||
| 用户意图 | 优先工具 | 说明 |
|
||||
|----------|----------|------|
|
||||
| 单 IP/CIDR 看端口 | `ip_scan` | `target` 必填;先小范围 `ports` |
|
||||
| 多目标只扫端口+弱口令+POC | `ip_scan` 或 `tscan_scan` | `ip_scan` 用 `pwd_check`/`poc_check` |
|
||||
| 一批 URL 指纹/Web | `url_scan` | `targets` 逗号分隔 |
|
||||
| 已知 URL 打 POC | `poc_scan` | 慎用 `poc_full` |
|
||||
| 弱口令 | `pwd_crack` | `targets`: `192.168.1.1:22,192.168.1.1:3306` |
|
||||
| 目录 / JS | `dir_scan` / `js_scan` | 需完整 URL |
|
||||
| 子域名 | `subdomain_scan` | `domains`;API 需 config |
|
||||
| 空间测绘 | `cyber_search` | `query` 对齐 `-ck` |
|
||||
| 多阶段、结果传递 | `tscan_scan` | 大任务可分阶段执行 |
|
||||
|
||||
## 通用参数(MCP / CLI)
|
||||
|
||||
| MCP / 含义 | CLI | 默认 | 说明 |
|
||||
|------------|-----|------|------|
|
||||
| `project` | `-pr` | 未指定→`MCP` | 写入 `config.db` 的项目名;见下文「项目 MCP」 |
|
||||
| `fresh_project` | — | `false` | 指定 `project` 时是否先清空该项目 |
|
||||
| `proxy` | `-proxy` | 配置全局代理 | HTTP/SOCKS5;**端口扫描仅 SOCKS5** |
|
||||
| `include_results` | — | `true` | 响应 JSON 是否带 `data.results` |
|
||||
| `result_limit` | — | `200` | 每类结果最多条数,最大 `2000` |
|
||||
| `ping_scan` | 未用 `-np` 即探测 | `true` | 存活探测 |
|
||||
| `smart_scan` | 未用 `-nosmart` | `true` | 大网段启发式扫描(`tscan_scan`) |
|
||||
| `timeout` | `-time` | `3` | 通用超时(秒) |
|
||||
| `web_timeout` | `-wt` | `10` | Web 超时(秒) |
|
||||
|
||||
**结果存放:**
|
||||
|
||||
- MCP 工具返回 JSON(`data.results`、`data.counts`)。
|
||||
- CLI 写日志 `TscanPlus-Result.txt` 及各模块 txt,并写入 **`config.db`**(可与 GUI 共用)。
|
||||
|
||||
## 项目名 `MCP` 的行为
|
||||
|
||||
| 情况 | 行为 |
|
||||
|------|------|
|
||||
| 未传 `project` | 使用 **`MCP`**,**本次工具调用前**自动清空该项目数据 |
|
||||
| 传 `project=自定义名` | 默认**追加**;清空则 `fresh_project=true` |
|
||||
|
||||
**GUI 注意:** 单工具(如 `ip_scan`)可能不在项目列表显示行,但 `ipscan` 等表可有 `Project='MCP'`;`tscan_scan` 会在 `project` 表登记。
|
||||
|
||||
---
|
||||
|
||||
## 各模块参数(MCP ↔ CLI)
|
||||
|
||||
### 1. 端口扫描 `ip_scan`(`port`)
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `target` | `-h` | 必填 | `192.168.1.1`、`192.168.1.0/24`、范围 |
|
||||
| `ports` | `-p` | `Top100` | `22`、`1-65535`、`22,80,443` |
|
||||
| `thread` | `-t` | `600` | 并发 |
|
||||
| `timeout` | `-time` | `3` | 秒 |
|
||||
| `ping_scan` | 默认探测 / `-np` 关闭 | `true` | 存活探测 |
|
||||
| `ip_finger` | 服务指纹 | 配置项 | 服务识别 |
|
||||
| `poc_check` | 联动 POC | `false` | 开放端口转 URL 后 POC |
|
||||
| `pwd_check` | 联动 crack | `false` | 弱口令 |
|
||||
| `proxy` | `-proxy` | — | 建议 SOCKS5 |
|
||||
|
||||
`tscan_scan` 额外:`ports_add`→`-pa`,`exclude_hosts`→`-hn`,`smart_scan`→`-nosmart` 取反。
|
||||
|
||||
### 2. Web 指纹 `url_scan`(`url`)
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `targets` | `-u` / `-uf` 内容 | 必填 | URL,逗号或换行分隔 |
|
||||
| `thread` | URL 线程 | `50` | |
|
||||
| `web_timeout` | `-wt` | `10` | 秒 |
|
||||
| `finger` | `-finger` | `tiny` | `tiny` / `min` / `all` |
|
||||
| `cookie` | `-cookie` | — | 认证场景 |
|
||||
| `poc_check` | 联动 POC | `false` | |
|
||||
| `proxy` | `-proxy` | — | |
|
||||
|
||||
### 3. POC `poc_scan`(`poc`)
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `targets` | `-u` | 必填 | HTTP(S) URL |
|
||||
| `thread` | `-num` | `20` | POC 并发 |
|
||||
| `poc_full` | `-full` | `false` | `true` 时不匹配指纹,扫全部 POC |
|
||||
| `poc_name` | `-pocname` | — | 如 `weblogic` |
|
||||
| `poc_level` | `-poclevel` | `1+2+3+4+5` | 级别过滤 |
|
||||
| `proxy` | `-proxy` | — | |
|
||||
|
||||
POC 路径在 `config.yaml`(xray 1.0 格式),与 GUI 一致。
|
||||
|
||||
### 4. 弱口令 `pwd_crack`(`crack`)
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `targets` | `-h` | 必填 | **`host:port`**,逗号分隔 |
|
||||
| `services` | `-s` | `all` | `ssh,mysql,rdp` 等 |
|
||||
| `user` | `-user` | 内置字典 | 逗号分隔多个 |
|
||||
| `pwd` | `-pwd` | 内置字典 | |
|
||||
| `cmd` | `-c` | `whoami` | 成功后执行命令 |
|
||||
| `thread` | `-br` | `1` | 爆破线程 |
|
||||
| `timeout` | `-time` | `3` | |
|
||||
|
||||
### 5. 子域名 `subdomain_scan`(`domain`)
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `domains` | `-d` | 必填 | 逗号分隔主域 |
|
||||
| `sub_api` | `-api` | `false` | API key 在 `config.yaml` |
|
||||
| `sub_dict` | `-dc` | 内置 | **绝对路径** |
|
||||
| `ports` | 联动扫描端口 | `80,443` | 发现子域后的端口 |
|
||||
| `proxy` | `-proxy` | — | |
|
||||
|
||||
### 6. 目录 `dir_scan`(`dir`)
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `urls` | `-u` | 必填 | 基 URL |
|
||||
| `thread` | `-ds` | `20` | |
|
||||
| `dict` | `-dd` | 内置 10k | **绝对路径** |
|
||||
| `timeout` | `-time` | `3` | |
|
||||
| `proxy` | `-proxy` | — | |
|
||||
|
||||
### 7. JS `js_scan`(`js`)
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `urls` | `-u` | 必填 | |
|
||||
| `timeout` | `-time` / Web | `3` | |
|
||||
| `proxy` | `-proxy` | — | |
|
||||
|
||||
### 8. 空间测绘 `cyber_search`(`cyber`)
|
||||
|
||||
与 GUI「空间测绘」页字段下拉一致;`field` 决定如何把 `query` 转成各引擎 API 语句。
|
||||
|
||||
| MCP 参数 | CLI | 默认 | 说明 |
|
||||
|----------|-----|------|------|
|
||||
| `query` | `-ck` | 必填 | 见下表「query 写法」 |
|
||||
| `field` | 查询类型 | `domain` | 见下表 |
|
||||
| `engines` | — | config 已启用 | 逗号分隔引擎名 |
|
||||
| `project` / `fresh_project` | `-pr` | `MCP` / `false` | 同通用参数 |
|
||||
| `include_results` / `result_limit` | — | `true` / `200` | 同通用参数 |
|
||||
|
||||
**`field` 可选值(对齐 GUI):**
|
||||
|
||||
| `field` | GUI 名称 | `query` 示例(不加引号) |
|
||||
|---------|----------|-------------------------|
|
||||
| `domain` | 域名 | `example.com` |
|
||||
| `ip` | IP 地址 | `1.1.1.1`、`192.168.1.0/24` |
|
||||
| `port` | 端口 | `80`、`3306` |
|
||||
| `product` | 应用 | `nginx`、`apache` |
|
||||
| `title` | 标题 | `管理后台` |
|
||||
| `service` | 服务 | `mysql`、`ssh` |
|
||||
| `cert` | 证书 | 证书关键词 |
|
||||
| `icp` | 备案 | 备案号或主体名 |
|
||||
| `body` | Body | 页面正文关键词 |
|
||||
| `icon` | Icon | Icon URL 或 hash |
|
||||
| `custom` | 自定义 | 各平台完整语法,如 `domain="example.com" && port="443"` |
|
||||
|
||||
**用法要点:**
|
||||
|
||||
- **推荐**:选具体 `field`,`query` 只填关键词(与 GUI 搜索框相同),不要写 `domain="xxx"` 这类包装语法。
|
||||
- **`custom`**:各测绘平台语法不同,一般无法跨平台通用;需自行按平台调试。
|
||||
- **多关键词**:逗号分隔,如 `example.com,example.net`(与 GUI 一致)。
|
||||
- CLI `-ck` 常写完整语句时,MCP 应设 `field=custom`;或 `-ck example.com` 配合默认 `domain`。
|
||||
|
||||
`tscan_scan` 中用 `cyber_query` 传查询内容,`cyber_field` 传上表字段类型(默认 `domain`)。
|
||||
|
||||
### 9. 综合扫描 `tscan_scan`
|
||||
|
||||
在单模块参数基础上,常用额外字段:
|
||||
|
||||
| MCP 参数 | CLI | 说明 |
|
||||
|----------|-----|------|
|
||||
| `targets` | `-h/-u/-d/-ck` 等 | 按 `modules` 解析目标 |
|
||||
| `modules` | `-m` | 默认 `port,url,poc` |
|
||||
| `domains` | `-d` | `domain` 模块主域 |
|
||||
| `cyber_query` | `-ck` | 测绘语句 |
|
||||
| `ports` / `ports_add` | `-p` / `-pa` | |
|
||||
| `exclude_hosts` | `-hn` | |
|
||||
| `thread` / `url_thread` / `poc_thread` / `dir_thread` | `-t` 等 | |
|
||||
| `finger` | `-finger` | |
|
||||
| `poc_full` / `poc_name` / `poc_level` | POC 相关 | |
|
||||
| `crack_*` | `-s/-user/-pwd/-c/-br` | 弱口令 |
|
||||
| `sub_api` / `sub_dict` | 子域 | |
|
||||
| `dir_dict` | `-dd` | |
|
||||
|
||||
---
|
||||
|
||||
## 推荐参数(默认保守)
|
||||
|
||||
**单主机端口(首选入门):**
|
||||
|
||||
```yaml
|
||||
tool: ip_scan
|
||||
target: "10.0.0.1"
|
||||
ports: "80,443,8080,8443,22"
|
||||
ping_scan: true
|
||||
ip_finger: false
|
||||
poc_check: false
|
||||
pwd_check: false
|
||||
thread: 200
|
||||
timeout: 3
|
||||
include_results: true
|
||||
result_limit: 100
|
||||
```
|
||||
|
||||
**内网 C 段(lab,控制范围):**
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "192.168.1.0/24"
|
||||
modules: "port,url"
|
||||
ports: "Top100"
|
||||
thread: "300"
|
||||
ping_scan: true
|
||||
smart_scan: true
|
||||
include_results: true
|
||||
result_limit: 200
|
||||
```
|
||||
|
||||
**仅在用户明确要求时启用:** `poc_check`、`pwd_check`、`poc_full`、`modules` 含 `poc`/`crack`、全端口。
|
||||
|
||||
---
|
||||
|
||||
## MCP 接入
|
||||
|
||||
### stdio(推荐)
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"tscanplus": {
|
||||
"command": "/绝对路径/TscanPlus",
|
||||
"args": ["mcp", "stdio"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Streamable HTTP(推荐远程传输)
|
||||
|
||||
```bash
|
||||
TscanPlus mcp serve -listen 127.0.0.1:8088
|
||||
# 或显式指定:-transport streamable
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"tscanplus": {
|
||||
"url": "http://127.0.0.1:8088/mcp"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### HTTP+SSE(旧版兼容)
|
||||
|
||||
```bash
|
||||
TscanPlus mcp serve -listen 127.0.0.1:8088 -transport sse
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"tscanplus": {
|
||||
"url": "http://127.0.0.1:8088/sse"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
GUI:**AI 辅助 → MCP 服务配置** 可选择传输模式(Streamable HTTP / HTTP+SSE),启停服务并导出 Skill 模板 zip。
|
||||
|
||||
各宿主引用见 [README.md](README.md)。
|
||||
|
||||
---
|
||||
|
||||
## 调用后如何汇报
|
||||
|
||||
解析 JSON(`success`、`message`、`data`):
|
||||
|
||||
1. **摘要**:目标、模块、开放端口/URL 数、高危 `poc_vul`。
|
||||
2. **表格化列表**:`results.ipscan` / `urlscan` / `poccheck` / `pwdcrack` / `dirscan` / `jsfinder` / `subdomain` / `cyber` 关键字段。
|
||||
3. **`project_cleared: true`**:已清空默认 `MCP` 项目旧数据。
|
||||
4. `counts` > `result_limit`:说明仅返回前 N 条,全量在 `config.db` 或 GUI。
|
||||
|
||||
不要只回复「扫描完成」。
|
||||
|
||||
---
|
||||
|
||||
## 常见工作流
|
||||
|
||||
1. **IP → Web → 漏洞:** `ip_scan`(常见 Web 端口)→ 拼 URL → `url_scan` → 用户确认 → `poc_scan`
|
||||
2. **子域 → 端口 → Web:** `subdomain_scan` → `tscan_scan`(`modules=port,url`)→ 按需 POC
|
||||
3. **测绘 → 扫描:** `cyber_search` → 提取 IP/URL → 用户确认 → `ip_scan` / `url_scan`
|
||||
4. **单项目持续:** 全程 `project=pentest-xx`,阶段结束用 `fresh_project=true` 重扫
|
||||
|
||||
## 排错
|
||||
|
||||
| 现象 | 处理 |
|
||||
|------|------|
|
||||
| 看不到 TscanPlus 工具 | 检查 MCP 配置、二进制绝对路径、重载 MCP |
|
||||
| 长时间无响应 | 同步阻塞扫描;缩小 `ports`/`targets`,先关 POC/爆破 |
|
||||
| 卡在 `xxx open` | 升级版本;重启 `mcp serve` 或 GUI 内 MCP 服务 |
|
||||
| GUI 无 MCP 项目行 | 单工具可能不写 `project` 表;查库表或改用 `tscan_scan` |
|
||||
| 测绘/子域无结果 | 检查 `config.yaml` 中 API Key、Engines |
|
||||
| 结果与 GUI 不一致 | 共用同一 `config.yaml` / `config.db` |
|
||||
|
||||
## MCP 不可用时的 CLI
|
||||
|
||||
```bash
|
||||
# 默认:port + url + poc(-h 触发)
|
||||
TscanPlus -h 192.168.1.1/24
|
||||
|
||||
TscanPlus -m port -h 192.168.1.1 -p 80,443,3306 -t 600
|
||||
TscanPlus -m url,poc,dir,js -uf urls.txt -finger tiny
|
||||
TscanPlus -m domain,port,url,poc -d example.com -api
|
||||
TscanPlus -m crack -h 192.168.1.1 -p 22 -s ssh -user root -pwd 123456
|
||||
TscanPlus -m cyber,port,poc -ck 'domain="example.com"'
|
||||
TscanPlus -pr MyProject -m port,url,poc -h 192.168.1.1
|
||||
|
||||
TscanPlus mcp stdio
|
||||
TscanPlus mcp serve -listen 127.0.0.1:8088
|
||||
TscanPlus mcp serve -listen 127.0.0.1:8088 -transport sse
|
||||
```
|
||||
|
||||
CLI 不自动清空项目;MCP 未指定 `project` 时默认 `MCP` 且每次调用前清空。
|
||||
@@ -0,0 +1,709 @@
|
||||
# TscanPlus MCP 对话与模块示例
|
||||
|
||||
以下示例适用于任何能调用 TscanPlus MCP 工具的 AI 助手。参数语义对齐 **TscanClient** / **TscanPlus CLI**(`-m` 八大模块)。执行前须确认**授权**。
|
||||
|
||||
**模块对照:** `port`→`ip_scan`,`url`→`url_scan`,`poc`→`poc_scan`,`crack`→`pwd_crack`,`dir`→`dir_scan`,`js`→`js_scan`,`domain`→`subdomain_scan`,`cyber`→`cyber_search`,多模块联动→`tscan_scan`。
|
||||
|
||||
---
|
||||
|
||||
## 一、端口扫描 `ip_scan`(port)
|
||||
|
||||
### 示例 1-1:单 IP 常见 Web 端口
|
||||
|
||||
**用户:** 帮我扫 10.211.55.2 有哪些常见 Web 端口。
|
||||
|
||||
**Agent:**
|
||||
|
||||
1. 确认授权。
|
||||
2. 调用 `ip_scan`:
|
||||
|
||||
```yaml
|
||||
target: "10.211.55.2"
|
||||
ports: "80,443,8080,8443,8000,8888,22"
|
||||
ping_scan: true
|
||||
ip_finger: false
|
||||
poc_check: false
|
||||
pwd_check: false
|
||||
thread: 200
|
||||
timeout: 3
|
||||
include_results: true
|
||||
```
|
||||
|
||||
3. 汇报 `data.results.ipscan` 的 `host`、`port`、`target`、`title`。
|
||||
|
||||
**CLI 等价:** `TscanPlus -m port -h 10.211.55.2 -p 80,443,8080,8443,8000,8888,22 -t 200`
|
||||
|
||||
---
|
||||
|
||||
### 示例 1-2:C 段 Top100(lab)
|
||||
|
||||
**用户:** 扫 192.168.1.0/24 的 Top100 端口,不要 POC。
|
||||
|
||||
```yaml
|
||||
tool: ip_scan
|
||||
target: "192.168.1.0/24"
|
||||
ports: "Top100"
|
||||
thread: 400
|
||||
ping_scan: true
|
||||
poc_check: false
|
||||
pwd_check: false
|
||||
include_results: true
|
||||
result_limit: 300
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m port -h 192.168.1.0/24 -t 400`
|
||||
|
||||
---
|
||||
|
||||
### 示例 1-3:指定端口 + 服务指纹
|
||||
|
||||
**用户:** 对 192.168.1.10 扫 22,80,443,3306,3389 并识别服务。
|
||||
|
||||
```yaml
|
||||
tool: ip_scan
|
||||
target: "192.168.1.10"
|
||||
ports: "22,80,443,3306,3389"
|
||||
ip_finger: true
|
||||
poc_check: false
|
||||
thread: 300
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 示例 1-4:端口扫描联动弱口令(需明确授权)
|
||||
|
||||
**用户:** 已对 192.168.1.5 授权,对 22 和 3306 做弱口令检测。
|
||||
|
||||
```yaml
|
||||
tool: ip_scan
|
||||
target: "192.168.1.5"
|
||||
ports: "22,3306"
|
||||
pwd_check: true
|
||||
poc_check: false
|
||||
thread: 100
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m port,crack -h 192.168.1.5 -p 22,3306`
|
||||
|
||||
---
|
||||
|
||||
### 示例 1-5:端口 + POC(需明确授权)
|
||||
|
||||
```yaml
|
||||
tool: ip_scan
|
||||
target: "10.0.0.100"
|
||||
ports: "80,443,8080"
|
||||
poc_check: true
|
||||
pwd_check: false
|
||||
thread: 200
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 二、Web 指纹 `url_scan`(url)
|
||||
|
||||
### 示例 2-1:单 URL 指纹
|
||||
|
||||
**用户:** 识别 http://test.com:8080 的 Web 指纹。
|
||||
|
||||
```yaml
|
||||
tool: url_scan
|
||||
targets: "http://test.com:8080"
|
||||
finger: tiny
|
||||
web_timeout: 10
|
||||
poc_check: false
|
||||
thread: 30
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m url -u http://test.com:8080 -finger tiny`
|
||||
|
||||
---
|
||||
|
||||
### 示例 2-2:批量 URL
|
||||
|
||||
**用户:** 对这些站做 Web 探测:a.com 和 b.com 的 https。
|
||||
|
||||
```yaml
|
||||
tool: url_scan
|
||||
targets: "https://a.com,https://www.b.com"
|
||||
finger: min
|
||||
thread: 50
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m url -u https://a.com,https://www.b.com -finger min`
|
||||
|
||||
---
|
||||
|
||||
### 示例 2-3:带 Cookie 的认证站
|
||||
|
||||
```yaml
|
||||
tool: url_scan
|
||||
targets: "http://internal.com/admin/"
|
||||
cookie: "session=abc123; token=xyz"
|
||||
finger: tiny
|
||||
web_timeout: 15
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m url -u http://internal.com/admin/ -cookie "session=abc123"`
|
||||
|
||||
---
|
||||
|
||||
### 示例 2-4:URL 指纹 + 联动 POC
|
||||
|
||||
**用户:** 已对下列 URL 授权打 POC。
|
||||
|
||||
```yaml
|
||||
tool: url_scan
|
||||
targets: "http://10.0.0.1:8080,http://10.0.0.2"
|
||||
poc_check: true
|
||||
finger: tiny
|
||||
thread: 30
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m url,poc -u http://10.0.0.1:8080,http://10.0.0.2`
|
||||
|
||||
---
|
||||
|
||||
### 示例 2-5:代理访问
|
||||
|
||||
```yaml
|
||||
tool: url_scan
|
||||
targets: "http://target.com"
|
||||
proxy: "http://127.0.0.1:8080"
|
||||
finger: all
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 三、POC 漏洞 `poc_scan`(poc)
|
||||
|
||||
### 示例 3-1:默认 POC(匹配指纹)
|
||||
|
||||
```yaml
|
||||
tool: poc_scan
|
||||
targets: "http://test.com"
|
||||
thread: 20
|
||||
poc_full: false
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m poc -u http://test.com`
|
||||
|
||||
---
|
||||
|
||||
### 示例 3-2:指定 POC 名称
|
||||
|
||||
**用户:** 用 weblogic 相关 POC 测 http://10.0.0.8:7001。
|
||||
|
||||
```yaml
|
||||
tool: poc_scan
|
||||
targets: "http://10.0.0.8:7001"
|
||||
poc_name: weblogic
|
||||
thread: 15
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m poc -u http://10.0.0.8:7001 -pocname weblogic`
|
||||
|
||||
---
|
||||
|
||||
### 示例 3-3:全量 POC(高危,需授权)
|
||||
|
||||
```yaml
|
||||
tool: poc_scan
|
||||
targets: "http://vuln.com"
|
||||
poc_full: true
|
||||
thread: 10
|
||||
poc_level: "1+2+3"
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m poc -u http://vuln.com -full -poclevel 1+2+3`
|
||||
|
||||
---
|
||||
|
||||
### 示例 3-4:批量 URL 文件场景(Agent 拆分)
|
||||
|
||||
**用户:** 我有 50 个 URL 要打 POC。
|
||||
|
||||
Agent:分批逗号传入(每批 ≤20),或建议用户改用 CLI `-uf urls.txt`。
|
||||
|
||||
```yaml
|
||||
tool: poc_scan
|
||||
targets: "http://a.com,http://b.com"
|
||||
thread: 20
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 四、弱口令 `pwd_crack`(crack)
|
||||
|
||||
### 示例 4-1:SSH 单主机
|
||||
|
||||
```yaml
|
||||
tool: pwd_crack
|
||||
targets: "192.168.1.1:22"
|
||||
services: ssh
|
||||
user: "root,admin"
|
||||
pwd: "123456,password,admin123"
|
||||
thread: 2
|
||||
timeout: 5
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m crack -h 192.168.1.1 -p 22 -s ssh -user root,admin -pwd 123456,password`
|
||||
|
||||
---
|
||||
|
||||
### 示例 4-2:MySQL
|
||||
|
||||
```yaml
|
||||
tool: pwd_crack
|
||||
targets: "192.168.1.20:3306"
|
||||
services: mysql
|
||||
thread: 1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 示例 4-3:多目标多服务
|
||||
|
||||
```yaml
|
||||
tool: pwd_crack
|
||||
targets: "10.0.0.1:22,10.0.0.1:3389,10.0.0.2:3306"
|
||||
services: "ssh,rdp,mysql"
|
||||
thread: 1
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 示例 4-4:爆破成功后执行命令
|
||||
|
||||
```yaml
|
||||
tool: pwd_crack
|
||||
targets: "192.168.1.1:22"
|
||||
services: ssh
|
||||
cmd: "id"
|
||||
user: root
|
||||
pwd: "toor,123456"
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m crack -h 192.168.1.1 -p 22 -s ssh -c "id"`
|
||||
|
||||
---
|
||||
|
||||
## 五、子域名 `subdomain_scan`(domain)
|
||||
|
||||
### 示例 5-1:单域字典枚举
|
||||
|
||||
```yaml
|
||||
tool: subdomain_scan
|
||||
domains: "example.com"
|
||||
sub_api: false
|
||||
ports: "80,443"
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m domain -d example.com`
|
||||
|
||||
---
|
||||
|
||||
### 示例 5-2:多域 + API(config 已配 key)
|
||||
|
||||
```yaml
|
||||
tool: subdomain_scan
|
||||
domains: "example.com,example.org"
|
||||
sub_api: true
|
||||
ports: "80,443,8080"
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m domain -d example.com,example.org -api`
|
||||
|
||||
---
|
||||
|
||||
### 示例 5-3:自定义字典
|
||||
|
||||
```yaml
|
||||
tool: subdomain_scan
|
||||
domains: "target.com"
|
||||
sub_dict: "/path/to/subdomains.txt"
|
||||
sub_api: false
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m domain -d target.com -dc /path/to/subdomains.txt`
|
||||
|
||||
---
|
||||
|
||||
## 六、目录扫描 `dir_scan`(dir)
|
||||
|
||||
### 示例 6-1:内置字典
|
||||
|
||||
```yaml
|
||||
tool: dir_scan
|
||||
urls: "http://test.com"
|
||||
thread: 30
|
||||
timeout: 5
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m dir -u http://test.com`
|
||||
|
||||
---
|
||||
|
||||
### 示例 6-2:自定义字典 + 高线程
|
||||
|
||||
```yaml
|
||||
tool: dir_scan
|
||||
urls: "https://test.com"
|
||||
dict: "/path/to/dirlist.txt"
|
||||
thread: 50
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m dir -u https://test.com -dd /path/to/dirlist.txt -ds 50`
|
||||
|
||||
---
|
||||
|
||||
## 七、JS 敏感信息 `js_scan`(js)
|
||||
|
||||
### 示例 7-1:单站 JS 收集
|
||||
|
||||
```yaml
|
||||
tool: js_scan
|
||||
urls: "https://test.com"
|
||||
timeout: 10
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m js -u https://test.com -wt 10`
|
||||
|
||||
---
|
||||
|
||||
### 示例 7-2:多 URL
|
||||
|
||||
```yaml
|
||||
tool: js_scan
|
||||
urls: "https://a.com,https://b.com"
|
||||
proxy: "socks5://127.0.0.1:1080"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 八、空间测绘 `cyber_search`(cyber)
|
||||
|
||||
> 须在 `config.yaml` 配置 Hunter/FOFA 等引擎与 Key。
|
||||
|
||||
### 示例 8-1:按域名查资产(与 GUI 相同)
|
||||
|
||||
```yaml
|
||||
tool: cyber_search
|
||||
query: example.com
|
||||
field: domain
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m cyber -ck example.com`(或完整语法 `-ck 'domain="example.com"'` 时需 `field=custom`)
|
||||
|
||||
---
|
||||
|
||||
### 示例 8-2:按 IP 段
|
||||
|
||||
```yaml
|
||||
tool: cyber_search
|
||||
query: 192.168.1.0/24
|
||||
field: ip
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 示例 8-3:按标题查(指定引擎)
|
||||
|
||||
```yaml
|
||||
tool: cyber_search
|
||||
query: 管理后台
|
||||
field: title
|
||||
engines: "hunter,fofa"
|
||||
include_results: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 示例 8-4:自定义平台语法
|
||||
|
||||
```yaml
|
||||
tool: cyber_search
|
||||
query: 'domain="example.com" && port="443"'
|
||||
field: custom
|
||||
engines: "fofa"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 九、综合扫描 `tscan_scan`(多模块联动)
|
||||
|
||||
联动顺序:**cyber → domain → port → crack → url → poc → dir → js**
|
||||
|
||||
### 示例 9-1:端口 + Web(最常用)
|
||||
|
||||
**用户:** 对 192.168.1.100 做端口和 Web 指纹,先不要 POC。
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "192.168.1.100"
|
||||
modules: "port,url"
|
||||
ports: "Top100"
|
||||
thread: "300"
|
||||
url_thread: "50"
|
||||
finger: tiny
|
||||
ping_scan: true
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m port,url -h 192.168.1.100 -finger tiny`
|
||||
|
||||
---
|
||||
|
||||
### 示例 9-2:内网 C 段 端口+URL+POC(授权)
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "192.168.1.0/24"
|
||||
modules: "port,url,poc"
|
||||
ports: "Top100"
|
||||
thread: "400"
|
||||
poc_thread: "15"
|
||||
finger: tiny
|
||||
include_results: true
|
||||
result_limit: 500
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -h 192.168.1.0/24 -m port,url,poc`(默认 -m)
|
||||
|
||||
---
|
||||
|
||||
### 示例 9-3:端口 + 弱口令 + POC
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "192.168.1.0/24"
|
||||
modules: "port,crack,url,poc"
|
||||
ports: "22,80,443,3306,3389,8080"
|
||||
crack_services: "ssh,mysql,rdp"
|
||||
thread: "300"
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m port,poc,crack -h 192.168.1.0/24 -p 22,80,443,3306,3389,8080`
|
||||
|
||||
---
|
||||
|
||||
### 示例 9-4:子域 → 端口 → Web → POC
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "example.com"
|
||||
domains: "example.com"
|
||||
modules: "domain,port,url,poc"
|
||||
sub_api: true
|
||||
ports: "80,443,8080"
|
||||
thread: "200"
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m domain,port,url,poc -d example.com -api`
|
||||
|
||||
---
|
||||
|
||||
### 示例 9-5:Web 全链路 url+poc+dir+js
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "http://test.com,http://api.test.com"
|
||||
modules: "url,poc,dir,js"
|
||||
finger: tiny
|
||||
dir_thread: "30"
|
||||
include_results: true
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m url,poc,dir,js -u http://test.com,http://api.test.com`
|
||||
|
||||
---
|
||||
|
||||
### 示例 9-6:测绘后联动扫描
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: target.com
|
||||
cyber_query: target.com
|
||||
cyber_field: domain
|
||||
modules: "cyber,port,url"
|
||||
ports: "Top100"
|
||||
thread: "300"
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m cyber,port,url -ck target.com`
|
||||
|
||||
---
|
||||
|
||||
### 示例 9-7:追加端口、排除主机
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "10.0.0.0/24"
|
||||
modules: "port,url"
|
||||
ports: "Top100"
|
||||
ports_add: "3389,5985,6379"
|
||||
exclude_hosts: "10.0.0.1"
|
||||
smart_scan: true
|
||||
thread: "400"
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m port,url -h 10.0.0.0/24 -pa 3389,5985,6379 -hn 10.0.0.1`
|
||||
|
||||
---
|
||||
|
||||
### 示例 9-8:关闭启发式大网段扫描
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "10.0.0.0/16"
|
||||
modules: "port"
|
||||
ports: "80,443"
|
||||
smart_scan: false
|
||||
thread: "200"
|
||||
```
|
||||
|
||||
**CLI:** `TscanPlus -m port -h 10.0.0.0/16 -p 80,443 -nosmart`
|
||||
|
||||
---
|
||||
|
||||
## 十、项目管理
|
||||
|
||||
### 示例 10-1:默认 MCP 项目(每次清空)
|
||||
|
||||
未传 `project` 时自动使用 `MCP` 并在调用前清空,适合一次性对话扫描。
|
||||
|
||||
### 示例 10-2:命名项目、累积结果
|
||||
|
||||
```yaml
|
||||
tool: subdomain_scan
|
||||
domains: "example.com"
|
||||
project: pentest-acme
|
||||
# fresh_project 默认 false → 追加
|
||||
```
|
||||
|
||||
### 示例 10-3:清空后重扫
|
||||
|
||||
```yaml
|
||||
tool: ip_scan
|
||||
target: "10.0.0.0/24"
|
||||
ports: "Top100"
|
||||
project: pentest-acme
|
||||
fresh_project: true
|
||||
```
|
||||
|
||||
### 示例 10-4:综合项目登记
|
||||
|
||||
```yaml
|
||||
tool: tscan_scan
|
||||
targets: "192.168.1.0/24"
|
||||
modules: "port,url,poc"
|
||||
project: pentest-acme
|
||||
fresh_project: true
|
||||
```
|
||||
|
||||
` tscan_scan` 会在 GUI `project` 表登记;单工具可能仅写分表。
|
||||
|
||||
---
|
||||
|
||||
## 十一、分阶段工作流(推荐 Agent 策略)
|
||||
|
||||
### 工作流 A:IP → Web → 漏洞
|
||||
|
||||
1. `ip_scan`:`ports: "80,443,8080,8443"`
|
||||
2. 从 `results.ipscan` 提取 `target` URL
|
||||
3. `url_scan`:`finger: tiny`
|
||||
4. 用户确认后 `poc_scan` 或 `tscan_scan` 仅 `poc` 模块
|
||||
|
||||
### 工作流 B:子域资产扩张
|
||||
|
||||
1. `subdomain_scan` + `sub_api: true`
|
||||
2. `tscan_scan`:`modules: "port,url"`,`targets` 为子域列表
|
||||
3. 对高危 URL 单独 `poc_scan`
|
||||
|
||||
### 工作流 C:测绘驱动
|
||||
|
||||
1. `cyber_search` 获取 IP/域名
|
||||
2. 向用户展示摘要,确认范围
|
||||
3. `ip_scan` / `url_scan` 分批执行(控制 `result_limit`)
|
||||
|
||||
---
|
||||
|
||||
## 十二、拒绝未授权扫描
|
||||
|
||||
**用户:** 扫一下 https://www.baidu.com 有没有漏洞。
|
||||
|
||||
**Agent 应:**
|
||||
|
||||
说明无法对未授权的第三方生产站点执行扫描;可改为在用户自有 lab 靶机上演示 `poc_scan` 参数与返回结构,不进行真实请求。
|
||||
|
||||
---
|
||||
|
||||
## 十三、返回 JSON 结构参考
|
||||
|
||||
```json
|
||||
{
|
||||
"success": true,
|
||||
"message": "ip_scan completed",
|
||||
"data": {
|
||||
"project": "MCP",
|
||||
"project_cleared": true,
|
||||
"target": "10.211.55.2",
|
||||
"ports": "80,443,8080",
|
||||
"result_limit": 200,
|
||||
"counts": { "ipscan": 3, "urlscan": 1, "poccheck": 0 },
|
||||
"results": {
|
||||
"ipscan": [
|
||||
{
|
||||
"host": "10.211.55.2",
|
||||
"port": "8083",
|
||||
"target": "http://10.211.55.2:8083",
|
||||
"title": "..."
|
||||
}
|
||||
],
|
||||
"urlscan": [],
|
||||
"poccheck": []
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**各表关键字段(汇报时优先提取):**
|
||||
|
||||
| 表名 | 字段 |
|
||||
|------|------|
|
||||
| `ipscan` | `host`, `port`, `target`, `title`, `banner` |
|
||||
| `urlscan` | `target`, `title`, `finger`, `status` |
|
||||
| `poccheck` | `target`, `poc_vul`, `level`, `request` |
|
||||
| `pwdcrack` | `host`, `port`, `service`, `user`, `pass` |
|
||||
| `dirscan` | `url`, `path`, `status`, `len` |
|
||||
| `jsfinder` | `url`, `match`, `type` |
|
||||
| `subdomain` | `domain`, `subdomain`, `ips` |
|
||||
| `cyber` | `ip`, `domain`, `port`, `title`, `source` |
|
||||
|
||||
---
|
||||
|
||||
## 十四、CLI 批量对照(无 MCP 时)
|
||||
|
||||
```bash
|
||||
# C 段全面(慎用范围)
|
||||
TscanPlus -h 192.168.1.0/24 -m port,url,poc,crack
|
||||
|
||||
# URL 文件
|
||||
TscanPlus -uf target-urls.txt -m url,poc,dir,js
|
||||
|
||||
# 全功能(lab 仅限)
|
||||
TscanPlus -h 192.168.1.0/24 -d example.com -m port,url,poc,crack,dir,js,domain,cyber
|
||||
|
||||
# 指定项目
|
||||
TscanPlus -pr MyProject -m port,url,poc -h 192.168.1.1
|
||||
```
|
||||
|
||||
Agent 在 MCP 可用时应优先调用工具并解析 JSON,CLI 仅作备选说明。
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"mcpServers": {
|
||||
"tscanplus-stdio": {
|
||||
"command": "/绝对路径/TscanPlus",
|
||||
"args": ["mcp", "stdio"]
|
||||
},
|
||||
"tscanplus-http": {
|
||||
"url": "http://127.0.0.1:8088/mcp"
|
||||
},
|
||||
"tscanplus-sse-legacy": {
|
||||
"url": "http://127.0.0.1:8088/sse"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user