Skip to content

Back to the catalog

dfir.chwriteup

Two in a row - You mitigated wrong (Kentico CMS RCE)

A DFIR consultant details two investigations (five months apart) into a compromised IIS/Kentico CMS server. Attackers exploited a Kentico Staging SyncServer .NET deserialization RCE (via a public exploit and a Metasploit module using the WindowsIdentity gadget chain) to plant a rewrite-rule redirect to Vietnamese black-hat SEO content, then later returned with a malicious IIS native module (HTTPCacheLog.dll) that hooked BeginRequest to execute commands from HTTP cookies, plus multiple .ashx webshells and PrintNotifyPotato.exe for privilege escalation. The piece walks through using Chainsaw, Sysmon, PowerShell logs, and Velociraptor/YARA hunts to trace the intrusion and lists file-hash IOCs.

TL;DR DFIR writeup on a Kentico CMS deserialization RCE leading to IIS rewrite-rule SEO poisoning, a malicious IIS native module backdoor (HTTPCacheLog.dll), and multiple .ashx webshells, with Chainsaw/Sysmon/Velociraptor-based investigation and IOCs.
Document

What it is

A two-part DFIR case study from dfir.ch on a Kentico CMS server compromised via a deserialization RCE at /CMSPages/Staging/SyncServer.asmx. Beyond the summary, the value here is the concrete mitigation that was applied and why it did not hold: the customer added an IIS rewrite rule blocking .asmx files to external source ranges, yet a second intrusion followed five months later on the same server.

How it works

The exploit POSTs a serialized payload to /ProcessSynchronizationTaskData under SyncServer.asmx, using .NET SoapFormatter with the WindowsIdentity gadget chain (stagingTaskData POST var). Post-compromise, the attacker made SEO poisoning stealthy: they added an IIS global rewrite rule and injected code into the legitimate PortalTemplate.aspx so that any request for an {anything}.html file loaded xoso.aspx, which pulled HTML from a remote server — but only served it when the user agent contained the string "oogle" (Googlebot). Privilege escalation used PrintNotifyPotato.exe (PrintNotify COM service) dropped in C:\ProgramData.

What to do

Detection anchors the page. Chainsaw (or DetectRaptor) over Event Logs and MFT flagged PrintNotifyPotato.exe. For webshells, run a Velociraptor YARA hunt with the Thor Webshell rules, and add a trivial custom rule for the site-specific IOC string xoso. Version-check Kentico via CMS.DataEngine.dll.

The attacker's persistence rewrite rule to hunt for:

appcmd.exe set config /section:system.webServer/rewrite/globalRules /[name='xoso'] action.type:"Rewrite" /[name='xoso'] action.url:"/CMSWebParts/Viewers/Effects/Carousel_files/xoso.aspx?id={R:1}" /commit:apphost

Caveats

The customer could not patch Kentico at the time, so they mitigated by blocking .asmx externally. The page states this rule "came a few days too late" — the server was already compromised before it was applied, so restoring from backup and even migrating to a new server did not clear the infection (crashes and re-compromise recurred). Blocking the endpoint does not remediate an existing foothold.

flowchart TD
    A[SyncServer.asmx RCE] --> B[Foothold: webshell + PrintNotifyPotato]
    B --> C[Restore backup / new server]
    C -->|foothold persists| B
    B --> D[Block .asmx externally]
    D -->|applied too late| E[Second intrusion, 5 months later]

The second-intrusion entry vector is only partially shown — the page reveals a hidden encoded PowerShell command fetching dll.bat from http://216.83.45.170:90/dll/ but the excerpt cuts off before the root cause is confirmed.

Organisations named here

  • .ashx webshell
  • DotNetDeserialization
  • IIS native module abuse
  • PrintNotifyPotato
  • SyncServer.asmx
  • WindowsIdentity gadget chain

Technologies named here

  • Chainsaw
  • Kentico CMS
  • DetectRaptor
  • IIS
  • Velociraptor
  • Windows Server
  • Thor Webshell Yara rules
  • Metasploit
  • Sysmon
  • PrintNotifyPotato.exe
  • appcmd.exe
  • YARA
  • PowerShell
  • .NET

Techniques named here

  • Web shell deployment
  • Malicious IIS rewrite rule abuse
  • .NET deserialization RCE
  • Privilege escalation via Potato technique
  • Obfuscated/encoded PowerShell execution
  • Malicious IIS native module installation
  • Parent-child process anomaly