Skip to content
RCE Write-up Advanced

Story of my two (but actually three) RCEs in SharePoint in 2018

The author found remote code execution flaws in SharePoint workflows, one a logical bypass of workflow protection and one a .NET deserialisation issue in XOML workflows. An attacker able to supply workflow content could run code on the SharePoint server, including SharePoint Online.

soroush.me

Published on soroush.me

I became interested in looking at .NET deserialization issues in Jan. 2018 when a work colleague (Daniele Costa) asked me whether I had worked with the ysoserial.net tool before (and the answer was a no!).

The author, on soroush.me

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 insufficient validation and unsafe deserialisation of untrusted workflow data, including XOML, allowed attacker-controlled content to be compiled or deserialised on the server.

Impact

An attacker could achieve remote code execution on SharePoint, including SharePoint Online, though the text gives no technical detail on the exploit itself.

What the attacker needed

Ability to supply workflow content

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.

SharePoint lets people build automated workflows, and the server processes files that describe those workflows. If the server trusts that content too much, a crafted workflow file can make the server run the attacker's code, which is called remote code execution. The author found two ways to do this, one by getting around a protection check and one by abusing how .NET turns stored data back into objects.

What is RCE?

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

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.