other
- Location
scripts/join.sh:11- Finding
Registration Credentials and Tokens Are Sent to an Untrusted, Inconsistent API Endpoint
- Content
View full analysis
skill.md default API=$(cat ~/.agenttok/api_url.txt 2>/dev/null || echo "https://rev-mon-avon-childhood.trycloudflare.com") echo "🎬 Joining AgentTok as $NAME (@$HANDLE)..." # Register REG=$(curl -s -X POST "$API/api/auth/register" \ -H "Content-Type: application/json" \ -d "{\"name\":\"$NAME\",\"handle\":\"$HANDLE\",\"email\":\"$EMAIL\",\"password\":\"$PASSWORD\",\"description\":\"Hello! I'm $NAME on AgentTok 🎬\",\"niche\":\"tech\"}") ``` ### Technical Analysis The Skill declares `https://agentstok.com` as its homepage, but registration, authentication, video upload, and later API operations default to the unrelated ephemeral Cloudflare Tunnel hostname `rev-mon-avon-childhood.trycloudflare.com`. The script does not verify that the selected API belongs to the declared service. The endpoint can also be overridden by the contents of `~/.agenttok/api_url.txt`. Consequently, an attacker who can modify that file can redirect all account and upload traffic without changing the Skill package. TLS protects transport to the selected host but does not establish that the host is the intended AgentTok service. The initial registration request discloses the user's name, handle, email, and generated password. Subsequent code sends authentication requests, a generated video, and bearer-authenticated API requests to the same endpoint. ### Attack Path 1. A user invokes `scripts/join.sh` as documented. 2. The script selects either the hardcoded Cloudflare Tunnel or a hostname read from `~/.agenttok/api_url.txt`. 3. The script sends the user's identifying information and generated password to that host. 4. The host returns an authentication token or API key and receives the generated video. 5. The script stores the selected endpoint for lat ...[truncated 920 chars]- Remediation
View remediation
