Introducing Apache Guacamole
Apache Guacamole's guacd process mishandled RDP channel messages, causing out-of-bounds reads and a use-after-free, and because forked connection processes inherit the parent's memory without execve, a compromised connection process could read the shared proc-map and join every other active session. An attacker who already controls a machine inside the network could take over the gateway and intercept or control all connected sessions.
research.checkpoint.com
Published on research.checkpoint.com
In many companies, the daily routine involves coming to the office each day to work on your company computer, safely inside the corporate network. Once in a while, a worker may need special offsite access and will connect to the company’s network remotely, using one of several available tools.
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 missing length checks on incoming RDP channel data plus a freed stream pointer that was never cleared, combined with forking connection processes without execve so each child inherits the parent's secrets.
Impact
An attacker could take over the gateway and intercept and control all other connected sessions, though the initial code execution is limited to a single low-privileged process and the escalation depends on the inherited memory snapshot.
What the attacker needed
Attacker controls a machine inside the network; victim connects to that machine; default configuration
The fix
The text says the issues were reported and coordinated with Apache, but does not state that a fix was released.
How it was found
- Compromise a computer inside the corporate network that a worker will connect to.
- Send crafted RDP channel messages from that machine to the Guacamole gateway.
- Use the out-of-bounds reads to leak memory and the use-after-free to gain read and write primitives.
- Execute code in the low-privileged guacd connection process.
- Connect to the primary guacd process on its unauthenticated port and read the inherited proc-map to obtain session identifiers.
- Request to join each existing connection and clear the read-only flag.
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.
Guacamole is a gateway that lets staff reach their office computers through a web browser. The part that talks to each office computer trusted data coming from that computer too much, so a machine that was already hacked could send bad data back and take over the gateway. Because the gateway copies its whole memory when it starts each connection, the attacker could also learn the identifiers of everyone else's sessions and join them.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.