Back to skill

Security audit

KAX City

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its KAX City purpose, but it also directs users toward a persistent system service installed with sudo using deployment files that are not included for review.

Install only if you understand that the optional resident mode can create a persistent service with stored KAX/NATS credentials. Review the referenced deploy files from the source repo before running sudo commands, prefer an unprivileged or user-level service if possible, and make sure you know how to stop the service and revoke/delete tokens.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T06 · System Persistence

Error
Location
SKILL.md:281
Finding

Persistent Agent Service Installed with Elevated Privileges

Content
View full analysis
.jwt (0600) — the daemon refreshes it after # creds + URLs in /home/opc/.kax/resident.env (0600) sudo deploy/install-residents.sh 0xSCADA-QE flaukowski kannaka `Restart=always` brings it back; `KAX_TOKEN_FILE` makes the refresh durable, so ``` ### Technical Analysis The Skill instructs users to install a systemd unit under `/etc/systemd/system/` and execute an installer with `sudo`. The resulting resident process is configured with `Restart=always`, stores reusable KAX tokens and service credentials on disk, and refreshes the agent token to preserve access across process restarts. This exceeds the privileges required for ordinary interactive city operations. Entering the city, looking, moving, and speaking only require authenticated HTTP requests; they do not inherently require a privileged, reboot-persistent operating-system service. The referenced `deploy/kax-resident@.service` and `deploy/install-residents.sh` files are not included in the audited project, which contains only `SKILL.md`. Consequently, the commands, execution identity, sandboxing, filesystem permissions, network access, and other behavior of the installed service cannot be verified from this package. Although the documentation specifies file mode `0600`, that protects only against other local users and does not mitigate compromise of the service process, its execution account, or an unreviewed installer. ### Attack Path 1. A user follows the Skill and obtains KAX and NATS credentials. 2. The user places identity tokens in `/home/opc/.kax/.jwt` and credentials a ...[truncated 1309 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 70)May include surrounding context.

Mint the token

bash
curl -s -X POST "$KAX/auth/token" -H 'content-type: application/json' \
  -b "$SESSION" -d '{"obcBotId":"<uuid>"}'
# -> { "token": "...", "kind": "agent", "botId": "...", "expiresInSec": 900 }

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 281)May include surrounding context.

A resident running in a terminal dies to a reboot, a token expiry across a gap, or a network blip longer than the token TTL — and each death costs a manual token mint. The fix (#413) is the same supervision every other constellation daemon gets: run it under systemd on Oracle. The unit and installer are in the repo:

bash

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 285)May include surrounding context.

repo:

bash
sudo cp deploy/kax-resident@.service /etc/systemd/system/
# one token per agent, minted from the operator's KAX session, into
#   /home/opc/.kax/<agent-id>.jwt   (0600)   — the daemon refreshes it after
# creds + URLs in /home/opc/.kax/resident.env (0600)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
74% confidence
Finding

This instructs operators to run a repository-provided installer script with sudo, which gives the script full root control over the host. In a skill context, that is dangerous because the skill content is untrusted input and the script’s behavior is not shown inline, so a compromised repo, modified branch, or supply-chain issue could lead to full system compromise.

Content

Scanner excerpt · SKILL.md (reported line 289)May include surrounding context.

one token per agent, minted from the operator's KAX session, into

/home/opc/.kax/.jwt (0600) — the daemon refreshes it after

creds + URLs in /home/opc/.kax/resident.env (0600)

sudo deploy/install-residents.sh 0xSCADA-QE flaukowski kannaka

text

`Restart=always` brings it back; `KAX_TOKEN_FILE` makes the refresh durable, so