TEE Phishing Agent System

TEE‑verified, agentic phishing analyzer

Deterministic Go backend with cryptographic signing, Python uAgents for orchestration, and optional Solana on-chain logging. Designed for the ASI Alliance track and real‑world security use.

Go 1.22 uAgents (Python) Ed25519 signing TEE-ready (QEMU/Nitro) Solana optional

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

IntakeAgent (Python) AnalyzerAgent (Python) Go HTTP API Enclave (QEMU/Nitro) RefereeAgent (Python) OnchainAgent (Python)

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

  1. Build Go service: make build && ./bin/analyzer
  2. Run Python agents: cd agents && pip install -r requirements.txt && python intake_agent.py
  3. Call /analyze and /verify as shown above.
  4. (Optional) Run QEMU guest with enclave-server and set TEE_MODE=vsock.

Team

  • Josh — Python agents and integration
  • Laurence — TEE and Go backend
  • Manar — Threat detection and rules