Overview
Users submit artifacts (URLs, emails, texts, Solana transactions). The Go service performs deterministic checks and produces a signed report.json. Python uAgents coordinate the flow and optionally log a hash of the report on-chain. The enclave path is developed with QEMU vsock and can be swapped for Nitro.
- Deterministic signal extraction in Go
- Cryptographic signatures and verification
- Thin Python agents using the Chat Protocol
- MeTTa rules integration planned (severity mapping)
Repo Structure
tee-phishing-analyzer/ ├─ cmd/ │ ├─ analyzer/ # HTTP API: /analyze, /verify │ └─ enclave-server/ # Vsock guest (mock attestation) ├─ internal/ │ ├─ api/ # DTOs │ ├─ analyzer/ # Pipeline, signing │ ├─ detect/ # URL/Text/Email/Solana │ ├─ rules/ # Severity engine │ ├─ report/ # Canonical JSON + Ed25519 │ ├─ server/ # HTTP handlers │ ├─ vsock/ # Host/guest stubs │ └─ util/ # Helpers ├─ agents/ # uAgents (Python) └─ tests/golden/ # Deterministic I/O
Architecture
Agents receive artifacts and call the Go API. The Go service computes signals, produces a signed report, and (optionally) delegates to a vsock enclave. The RefereeAgent verifies signatures and attestation; OnchainAgent can log report hashes to Solana.
API: POST /analyze
curl -s http://localhost:8080/analyze -H "Content-Type: application/json" -d '{
"nonce": "123e4567",
"artifact": { "kind": "url", "payload": { "final_url": "https://example.com" } },
"snapshots": { "html_b64": "..." },
"hashes": { "artifact_sha256": "..." },
"client_version": "v0.1.0"
}'
Returns { report, signature, attestation } with deterministic fields for verification.
API: POST /verify
curl -s http://localhost:8080/verify -H "Content-Type: application/json" -d '{
"report": { "...": "..." },
"signature": "..."
}'
Checks Ed25519 signature (Nitro attestation verification is a drop-in upgrade).
Agents
- IntakeAgent: User entry via Chat Protocol; sanitizes and classifies artifact types.
- AnalyzerAgent: Sends snapshots and hashes to Go; returns the signed report.
- RefereeAgent: Verifies signatures and attestation and returns the final verdict.
- OnchainAgent: Optionally logs
sha256(report.json)to Solana.
Detections (MVP)
- URL: punycode, suspicious subdomains, wallet drainer scripts
- Email: SPF/DKIM/DMARC failures, reply-to mismatch
- Text: urgency and seed-phrase requests
- Solana: risky SPL-Token instructions (Approve/SetAuthority/Transfer/CloseAccount)
Quick Start
- Build Go service:
make build && ./bin/analyzer - Run Python agents:
cd agents && pip install -r requirements.txt && python intake_agent.py - Call
/analyzeand/verifyas shown above. - (Optional) Run QEMU guest with
enclave-serverand setTEE_MODE=vsock.
Team
- Josh — Python agents and integration
- Laurence — TEE and Go backend
- Manar — Threat detection and rules