Riding The Inforail To Exploit Ivanti Avalanche
The Ivanti Avalanche services communicate over a custom protocol (InfoRail) that uses a hardcoded encryption key and a registration scheme whose secrets are visible in the source code, so an attacker can register as a service and send messages to any backend. Several services deserialise the XML payload with XStream without an allowlist, allowing remote code execution, and a race condition in the authentication flow lets an attacker spoof a successful login response.
Published on zerodayinitiative.com
Back in 2021, I stumbled upon a proof of concept describing an arbitrary file read vulnerability in the Ivanti Avalanche mobile device management tool. As I was not aware of this product, I decided to take a quick look at the vendor’s website to learn more:
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 custom protocol relies on a hardcoded key and predictable registration values for authentication, and several services deserialise untrusted XML with XStream without an allowlist.
Impact
An attacker who can reach the InfoRail port could run code with SYSTEM privileges on five services and could race the login flow to authenticate without valid credentials.
What the attacker needed
Network access to the InfoRail port; ability to read the product source or binaries
How it was found
- Analyse the services and the InfoRail protocol to learn the message structure and encryption.
- Recover the hardcoded key and build a valid registration message to register with InfoRail.
- Send a message with the right distribution list and subcategory to a service that deserialises without an allowlist.
- Deliver an XStream gadget in the XML payload to upload a web shell and run commands.
- For the Web File Server, point a JNDI lookup at a malicious LDAP server serving a Tomcat BeanFactory.
- For the race, register as an Enterprise Server and answer an authentication message with a success response before the real server does.
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.
The product's internal services talk to each other over a private network protocol, and the password-like values that protect it are baked into the program itself. Anyone who reads the program can therefore pretend to be a trusted service and send their own messages. Some of those services then turn the message content into live objects, which can run the attacker's code.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.