Skip to main content
Glama
README.md
# Wireshark MCP — Painel Web Blue Team & Radar LAN

Painel web local-first (`127.0.0.1:4173`) integrado ao `Wireshark-MCP`.

Combina **Radar LAN ativo** (Camada 2/3/4) com **triagem Blue Team baseada em evidências** e integração opcional via JSON-RPC `stdio` com o servidor `wireshark-mcp` (`tshark`).

---

## Principais Recursos

- **Estado Inicial Limpo (Zero Alucinação):** Exibe apenas os dados reais da interface local, IP, sub-rede, gateway e status de conexão do `wireshark-mcp`.
- **Radar Topológico 360° (`<canvas>`):**
  - **Anel interno:** Gateways / Roteadores
  - **Anel intermediário:** Computadores / Estações / Este Host
  - **Anel externo:** Demais dispositivos e MACs privados/randomizados (detecção pelo bit U/L `byte[0] & 0x02`).
- **Triagem Blue Team + Gaveta Forense de Evidências:**
  - Separação entre achados **`confirmed`** (*Confirmado*) e **`candidate`** (*Candidato*).
  - Cada achado traz **Observação**, **Impacto**, **Filtro de Exibição do Wireshark**, **Comando `tshark` equivalente** e **Mitigação**.
- **Verificação Manual de Host & Auditoria Local:**
  - Teste individual de IP e portas TCP personalizadas (`/api/radar/verify-host`).
  - Listagem de interfaces locais e portas em escuta (`ss -tuln`).
- **Integração com Wireshark MCP (`stdio`):**
  - Quando `wireshark-mcp` e `tshark` estão instalados no ambiente, o painel conecta automaticamente e disponibiliza `/api/mcp/interfaces` e `/api/mcp/analyze` para arquivos `.pcap`/`.pcapng` em `panel/data/captures/`.

---

## Estrutura de Diretórios

```text
Wireshark-MCP/panel/
├── package.json
├── README.md
├── data/captures/          # Diretório confinado para capturas .pcap/.pcapng
├── server/
│   ├── index.js            # Servidor HTTP (127.0.0.1:4173) e rotas /api/*
│   ├── radar.js            # Motor de Radar LAN, detecção U/L e achados Blue Team
│   └── mcp-client.js       # Cliente JSON-RPC 2.0 sobre stdio para wireshark-mcp
├── public/
│   ├── index.html          # Interface principal + Gaveta Forense
│   ├── styles.css          # Tema escuro SOC / Blue Team
│   └── app.js              # Radar 360°, filtros, verificação e drawer
└── test/
    └── radar.test.js       # Testes automatizados (node --test)
```

---

## Como Executar

Não requer dependências externas de npm (usa apenas módulos nativos do Node.js 20+).

```bash
cd /home/wdson/Documentos/skill/Wireshark-MCP/panel
npm start
```

Abra no navegador: **[http://127.0.0.1:4173](http://127.0.0.1:4173)**

### Variáveis de Ambiente Opcionais

| Variável | Padrão | Descrição |
| :--- | :--- | :--- |
| `HOST` | `127.0.0.1` | Endereço de bind do painel |
| `PORT` | `4173` | Porta HTTP do painel |
| `WIRESHARK_MCP_COMMAND` | `wireshark-mcp` | Binário/comando do servidor Wireshark MCP |
| `WIRESHARK_MCP_ARGS` | `serve --profile full` | Argumentos passados ao `wireshark-mcp` |

---

## Testes

```bash
cd /home/wdson/Documentos/skill/Wireshark-MCP/panel
npm test
```

TDQS

C2.9/5.0

Scored across 54 tools

Disambiguation4/5

The tools are organized into clear functional clusters (packet reading, statistics, security detection, editcap file surgery, case management), and each description states its specific purpose. A few boundaries blur, e.g. wireshark_quick_analysis vs wireshark_open_file as entry points, wireshark_stats_expert_info vs wireshark_detect_protocol_anomalies, and wireshark_extract_http_requests/extract_dns_queries vs wireshark_analyze_protocol; the deprecated wireshark_read_packets also lingers alongside get_packet_list/get_packet_details.

Naming Consistency4/5

All names share a wireshark_ prefix, snake_case, and readable verb_noun or noun_noun structure, with subsystem prefixes (stats_, detect_, extract_, editcap_, decrypt_) that group related tools predictably. Minor deviations exist (e.g. wireshark_case performing multiple operations via subcommands, text2pcap_import embedding a tool name), but the scheme is consistent overall.

Tool Count2/5

54 tools is far beyond the 3-15 well-scoped range and creates a large surface an agent must navigate, with many near-sibling analysis and detection tools to choose among. The breadth is partly justified by covering capture, editing, statistics, forensics, and case management, but the set could be consolidated substantially.

Completeness4/5

The surface covers the full capture lifecycle: live capture, opening, merging/splitting/trimming, field extraction, stream reassembly, decryption, object export, YARA, and case tracking, with few dead ends. Minor gaps remain, such as HTTP response-side extraction (only requests are parsed) and limited packet-editing beyond trim/split/shift/dedupe.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues