Skip to content
RCE Write-up Advanced

Shells And SOAP: Websphere Deserialization To RCE

The IBM WebSphere SOAP Connector service deserialised untrusted Java objects, allowing an attacker to execute arbitrary commands via a ysoserial CommonsCollections1 gadget. The author used this to write a JSP webshell to a default application directory and gain remote code execution.

Wyatt Dahlenburg Follow

Published on web.archive.org

IBM Websphere Application Server is a popular software that can be found commonly in enterprise environments. It allows applications to deployed and centrally managed.

Wyatt Dahlenburg (@wdahlenb), on web.archive.org

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

The SOAP Connector service deserialised Java objects from untrusted HTTP requests without adequate validation, enabling gadget-chain exploitation.

Impact

An unauthenticated attacker could execute arbitrary commands on the server, leading to full compromise; however, the exploit required a vulnerable WebSphere version and the ability to write to a known path, and some attempts were blocked by AV or network restrictions.

What the attacker needed

Vulnerable WebSphere version (7, 8, or 8.5); SOAP Connector service enabled; Network access to the SOAP port; Known writable path for webshell

The fix

The vulnerability was fixed in later WebSphere versions, which no longer deserialise the CommonsCollections1 gadget.

How it was found

  1. Send a request to the SOAP Connector service and observe the base64-encoded Java serialised object in the response.
  2. Use a known exploit for CVE-2015-7450 that sends a SOAP request with a serialised CommonsCollections1 payload in the params XML parameter.
  3. Confirm command execution by causing a DNS lookup to a Collaborator domain.
  4. Use the command execution to write a JSP webshell to a known path in a default application directory.
  5. Access the webshell via the HTTP transport port to run commands.

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.

Java serialisation turns objects into a stream of bytes so they can be saved or sent over a network. If a server accepts such bytes from an untrusted source and turns them back into objects without checking, an attacker can craft a malicious object that runs code when it is rebuilt. Here, the SOAP service did exactly that, letting the attacker run commands on the server.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Wyatt Dahlenburg

View all

2 more disclosed reports, best first.

More from IBM

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.