Skip to content
Memory corruption Write-up Advanced

Cloud Attack Part II

A heap-based buffer overflow in the DWASSVC service of Azure App Service allowed an attacker to send a crafted message to a named pipe and crash the service, potentially escalating privileges to NT AUTHORITY/SYSTEM. The vulnerability could be exploited by a tenant running a C# Azure function to compromise the App Service infrastructure and, on shared plans, other tenants' apps and data.

research.checkpoint.com

Published on research.checkpoint.com

In the previous partwe talked about the Azure Stack architecture and mentioned that it can be extended with features that are not part of its core. Using the ability to research cloud components offline, we took this opportunity to research Azure App Service.

etal, on research.checkpoint.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

The DWASSVC service allocated a buffer using the data length from the message but copied data using the total message size, leading to a heap overflow when these sizes differed.

Impact

Exploiting this vulnerability could allow compromise of Microsoft's App Service infrastructure, and on Free/Shared plans could also compromise other tenant apps, data, and accounts, though the researchers only demonstrated a crash.

What the attacker needed

Ability to run code in an Azure App Service app; Access to the named pipe used by DWASSVC

How it was found

  1. Create a C# Azure function that loads a native DLL and calls its load function.
  2. The native function brute-forces handles to find an open named pipe whose name starts with 'iisipm'.
  3. Construct a malicious message with a dataLength of 0 and a long data string.
  4. Send the message to the named pipe, causing DWASSVC to crash.

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.

Azure App Service lets you run your own web apps in Microsoft's cloud. A service called DWASSVC manages these apps and communicates with them through a private channel called a named pipe. The researchers found that by sending a specially crafted message to this pipe, an attacker could overflow a memory buffer and crash the service, which could potentially let them take control of the underlying system.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.