One Click Rce Moltbot
The Clawdbot Gateway Control UI accepted a gatewayUrl query parameter that caused the browser to connect to an attacker-controlled WebSocket server and leak the stored authentication token. An attacker could then use that token to open a session and execute arbitrary commands on the victim's machine, even if the gateway was only reachable on localhost.
ethiack.com
Published on ethiack.com
In the past few days, the AI community has been taken back by a new AI assistant that stands out due to its native, seamless integration with an enormous number of messaging services.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the dashboard trusted a URL parameter to set the WebSocket gateway address and sent the stored token to it, while the gateway also failed to validate the origin of WebSocket connections.
Impact
A victim who visits an attacker-controlled website could have their authentication token stolen and arbitrary commands executed on their machine, including local instances, because the browser can reach localhost over WebSockets and Chrome does not yet prompt for local network access.
What the attacker needed
Victim visits an attacker-controlled website; victim has Clawdbot Gateway Control UI open or accessible; attacker controls a WebSocket server
The fix
The issue was fixed in a commit that likely stops the dashboard from accepting a gatewayUrl parameter and/or validates WebSocket origins.
How it was found
- Set up a WebSocket server that listens for incoming requests and saves the leaked gateway token.
- Serve a first-stage page that opens a window to the second stage and redirects the current window to the Clawdbot Gateway Dashboard with the gatewayUrl parameter pointing to the attacker server.
- In the second stage, fetch the token from the attacker server and implement the signature algorithms to validate it against the Gateway server.
- Open a session and send a message to the Clawdbot agent asking it to run commands, exfiltrating results to the attacker server.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A web page can be tricked into connecting to a server controlled by an attacker. The Clawdbot dashboard stored a secret login token in the browser, and a crafted link made the browser send that token to the attacker. With the token, the attacker could pretend to be the victim and ask the assistant to run commands.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.