Skip to content
XXE Write-up Intermediate

XXE in IBM’s MaaS360 Platform

An XML payload submitted as a URL-encoded form parameter to an IBM MaaS360 mobile device management endpoint was parsed with external entities enabled, so the server fetched attacker-supplied DTDs. The attacker could read local files and send their contents out over FTP to a server they controlled.

Cody Wass Follow

Published on blog.netspi.com

Technical / Web Application Pentesting

Cody Wass, on blog.netspi.com

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 XML parser used for the URL-encoded form parameter had external entity and external DTD resolution enabled, unlike the other XML endpoints that ignored inline DTDs.

Impact

An attacker could read files on the server and exfiltrate them out of band, since the empty HTTP 200 response made in-band data return impossible but outbound access was unrestricted.

What the attacker needed

Network access to the MaaS360 service; ability to send crafted POST requests

The fix

The issue was fixed; IBM confirmed the endpoint was patched on 9 June 2018.

How it was found

  1. Send XML payloads in POST requests to the MaaS360 service and note that inline DTDs are ignored and malformed XML is rejected.
  2. Find a request where the XML is URL-encoded inside a form parameter.
  3. Inject an external entity pointing at a collaborator host and observe a DNS lookup and HTTP request.
  4. Host a malicious DTD on a controlled server and reference it from the injected DOCTYPE.
  5. Use parameter entities in that DTD to read a local file and send it to an FTP listener.
  6. Capture the exfiltrated file contents in the FTP service log.

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.

XML is a text format that lets a document define shortcuts called entities, which the parser swaps for other text. An external entity points at a file or URL instead of plain text, so a careless parser will go and fetch it. Here the server did that, letting the tester make it read a local file and send the contents to a machine they controlled.

What is XXE?

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.

More from IBM

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.