Skip to content

Ports, files and API ​

Ports ​

PortDirectionPurpose
443/tcpadmin browsers and endpoints to serverConsole, REST API /api, MSI download /downloads/KestrelAgent.msi
8443/tcpendpoints to serverAgent gRPC with mutual TLS; signed update packages /downloads/updates/<file>
18443, 18444localscripts/e2e.sh test server (HTTPS, gRPC)

Host ports are set with KESTREL_HTTPS_PORT and KESTREL_GRPC_PORT; the port agents dial with KESTREL_GRPC_PUBLIC_PORT.

Files on an endpoint ​

PathContents
C:\Program Files\Kestrel\kestrel-agent.exeAgent service binary
C:\Program Files\Kestrel\kestrel-scan.exeYARA-X scanner
C:\Program Files\Kestrel\kestrel-tray.exeEmployee tray app
C:\ProgramData\Kestrel\State folder, SYSTEM and Administrators only
C:\ProgramData\Kestrel\agent.tomlAgent configuration (server, pinned CA, uninstall token hash, remote-access ceiling)
C:\ProgramData\Kestrel\agent.dbSQLite outbox and local state
C:\ProgramData\Kestrel\keys\Device private key and client certificate
C:\ProgramData\Kestrel\logs\Agent logs
C:\ProgramData\Kestrel\quarantine\Encrypted quarantine vault
C:\ProgramData\Kestrel\triage\Triage packages before upload
C:\ProgramData\Kestrel\updates\Downloaded update packages
C:\ProgramData\Kestrel\uninstall-token.txtOnly with old servers that issue no uninstall token

Other names on an endpoint:

NameWhat
KestrelAgentWindows service (LocalSystem, automatic start)
Kestrel-Core, Kestrel-IO, Kestrel-ProcCmdETW sessions (logman query -ets)
\\.\pipe\kestrel-trayNamed pipe between tray and agent
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run, value KestrelTrayStarts the tray at sign-in
HKLM\SOFTWARE\Kestrel\InstallerInstaller bookkeeping for upgrades

Files on the server ​

Path (in deploy/)Contents
.envConfiguration, including KESTREL_MASTER_KEY. Never commit it; back it up separately.
installers/KestrelAgent.msi, installers/VERSIONMSI served at /downloads/KestrelAgent.msi (mounted at /app/agent)
installers/updates/Signed update packages served on port 8443
tls/Your web certificate and key (mounted at /app/tls)
Docker volumes pgdata, chdataPostgreSQL and ClickHouse data

REST API ​

The console uses the same REST API that automation can use. Base path /api, JSON with snake_case keys, timestamps in milliseconds since the epoch.

  • Sessions: POST /api/auth/login returns a csrf_token and sets a session cookie. Send X-CSRF-Token on every change.
  • API tokens: Authorization: Bearer kst_..., created under Settings > API tokens. Tokens skip CSRF and carry only the privileges you give them.
  • Errors: {"error": {"code": "...", "message": "..."}} with bad_request, unauthorized, forbidden, not_found, conflict, rate_limited, internal.
  • Lists: ?limit=50&cursor=..., returning {items, next_cursor, total}.

Useful endpoints:

Method and pathPurpose
GET /api/healthzHealth (no authentication)
GET /api/auth/setup-statusWhether first-run setup is needed (no authentication)
GET /api/agent/installerAgent CA PEM and MSI SHA-256
GET /api/devices, GET /api/devices/{id}Devices
POST /api/devices/{id}/actionsResponse action, body {"action": {...}}
GET /api/incidents, GET /api/incidents/{id}Incidents
GET /api/alertsAlerts
POST /api/huntHunt, body {query, from, to, limit}
GET /api/audit-log/verifyVerify the audit chain

The full contract (every endpoint, payload and privilege) is in docs/contracts.md in the repository. scripts/vm/api.sh is a minimal shell client for it.

Released under the Apache License 2.0. SigmaHQ rules are under the Detection Rule License 1.1.