T06 · System Persistence
- Location
SKILL.md:118- Finding
Hidden Login Startup and Watchdog Establish Cross-Session Persistence
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 118–123 and line 137
Vulnerability Type: Hidden startup execution and automatic process restart
Risk Level: HighEvidence
The following is an English rendering of the relevant documentation, with commands, paths, and configuration literals preserved:
text ## 11. Automatic startup, watchdog, and manual startup by the agent GBrain has no built-in automatic startup or watchdog. `gbrain serve --http` runs a standalone HTTP service on port 3131 with the MCP endpoint `/mcp`. Watchdog batch file: C:\Users\<username>\.gbrain\gbrain-serve.bat The batch file performs a port check, uses a `:loop` to restart the service after a crash, and writes to `gbrain-serve.log`. Login startup file: C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\GBrainServe.vbs VBS execution: ws.Run "...\gbrain-serve.bat", 0, False `0` hides the execution window. The VBS file is executed at Windows login without passing through WorkBuddy, allowing the hidden watchdog to operate. Long-term startup continues to rely on the VBS file in the Startup directory and takes effect at the next login.Technical Analysis
The Skill instructs the operator or agent to place a VBS launcher in the current user's Windows Startup directory. Files in this directory are executed automatically when that user logs in.
The launcher invokes a batch-file watchdog with
ws.Runand the window-style argument0, which hides the process window. The watchdog contains a restart loop, causing the GBrain HTTP/MCP service to return after failure. These mechanisms jointly provide:- Automatic execution at future user logins.
- Operation beyond the lifetime of the initiating Skill session.
- Hidden execution with reduced user visibility.
- Automatic process recovery after crashes.
- A persistent local MCP endpoint on port 3131.
Pers ...[truncated 1991 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove instructions that create
GBrainServe.vbsin the Windows Startup directory. - Remove hidden-window execution through
ws.Run ..., 0, False. - Do not create a restart loop unless the user has explicitly approved installing a persistent service.
- Require separate, informed confirmation before making any cross-session system modification.
- If continuous operation is legitimately required, use an administrator-approved service manager with:
- A descriptive service name.
- A documented executable path and arguments.
- Least-privilege service credentials.
- Explicit startup and recovery policies.
- Visible status and audit logs.
- A documented disable and uninstall procedure.
- Bind the MCP service only to the required interface, preferably loopback, and verify that it cannot accept remote connections.
- Require authentication and authorization for tools that read, import, modify, or administer knowledge-base content.
- Document all created files, processes, ports, and persistence entries before installation.
- Provide removal instructions for both
GBrainServe.vbsandgbrain-serve.bat. - Treat persistence as an optional deployment action, not as an automatic behavior of the Skill.
- Remove instructions that create
