How I Hacked Facebook Again! Unauthenticated RCE on MobileIron MDM
MobileIron MDM had a Hessian deserialization vulnerability in a Tomcat web service that could be reached through the user enrollment interface by bypassing Apache rewrite rules with path normalisation tricks. An attacker could achieve unauthenticated remote code execution by chaining a JNDI injection with a Groovy gadget, as demonstrated against Facebook.
blog.orange.tw
Published on blog.orange.tw
📌 [繁體中文 | English ]
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
Impact
An unauthenticated attacker could achieve remote code execution on the MDM server, as demonstrated by popping a shell on Facebook's exposed MobileIron instance.
What the attacker needed
MobileIron MDM exposed to the internet; No authentication required
The fix
The vulnerabilities were fixed by MobileIron in June 2020, addressing three CVEs.
How it was found
- Obtain the MobileIron testing RPM package from a listable web root indexed by Google.
- Set up the testing package and identify the exposed ports and services.
- Discover the Hessian deserialization endpoint at /mifs/services/ and /mics/services/.
- Bypass Apache rewrite rules using a path like /mifs/.;/services/someService to reach the web service.
- Trigger the Hessian deserialization to achieve a JNDI injection via the Spring AOP gadget.
- Chain the JNDI injection with Tomcat BeanFactory and a GroovyShell gadget to execute code.
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 MDM server had a hidden web service that accepted data in a format called Hessian, which can be abused to run code. A front-end web server was supposed to block access to this service, but a trick with the URL path let attackers reach it anyway. By combining this with other known Java techniques, the researcher could run commands on the server without logging in.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.