Skip to content
Cloud Security

Logic App 17 - Abusing a Logic App Workflow to Read a Blob I Had No Access To

Using edit rights on an Azure Logic App workflow to pull a flag out of a blob storage container my user couldn't read directly.

This one’s from the Altered Security Red Labs, “Logic App 17 (Modify Workflow and Abuse Storage Blob).” It’s rated Hard, and the scenario is pretty simple on paper: the user I’ve compromised has permission to edit a Logic App’s workflow. The goal is to abuse that permission and read a flag sitting in blob storage. The official hint just says to make use of the Blob connector action, so that’s the direction to go in.

Here’s the attack path, roughly:

Attack path diagram showing the route from the compromised user, through the storage account and container with no direct blob access, over to editing the Logic App workflow and reading the flag through the browser

The idea is that direct access to the blob is a dead end, but the Logic App has its own way in.

Enumeration

I logged into the Azure portal with the creds I was given and then dropped into PowerShell to see what I actually had access to.

powershell
PS C:\Users\J.Wahi\Azure> Get-AzResource

That came back with three resources: a storage account (asbelqxj448), a web connection (asanrjxz448), and a Logic App workflow (asckmenb448), all sitting in the same resource group.

PowerShell output from Get-AzResource listing the storage account, web connection, and Logic App workflow resources

A storage account and a Logic App in the same resource group is already a pretty strong hint for where this is going, but let’s actually check what I can touch.

I went into the storage account through the portal first, and that’s where it stopped being easy. The storage browser threw a permissions error the moment it tried to list the access keys: my user doesn’t have Microsoft.Storage/storageAccounts/listKeys/action on it. I could still see that a blob container called asxofskr448 exists, I just can’t get into it this way.

Azure portal showing an access denied error when trying to list storage account keys, with the blob container asxofskr448 visible in the sidebar

So read access on the storage account and the container, but not on whatever’s actually inside the container. Classic.

Checking Out the Logic App

Since the storage account is a wall, I moved on to the other thing sitting in the resource group: the Logic App asckmenb448. Opening its overview page showed a Workflow URL, which is the HTTP trigger endpoint for whatever this thing runs.

Logic App overview page in the Azure portal with the Workflow URL field highlighted

I copied that URL and just hit it in the browser to see what came back before touching anything.

Browser showing the Logic App’s HTTP trigger returning the text “Hi Welcome to the challenge”

“Hi Welcome to the challenge.” Fine, so right now the workflow just returns a static string. Nothing blob-related yet. Time to pop open the designer and see what this thing is actually built from.

Logic App designer showing a workflow with a manual trigger connected directly to a Response action

Two steps: a manual (HTTP request) trigger, and a Response action that sends back that static “Hi Welcome to the challenge” text. And since my user has edit rights on this workflow, I can add whatever I want in between.

Editing the Workflow to Reach the Blob

This is the actual abuse. I added a new step between the trigger and the response, searched for “Azure Blob” in the connector list, and picked the Azure Blob Storage connector’s Get blob content (V2) action.

The important part here is the connection. There was already an existing connection available (asanrjxz448, pointing at the storage account asbelqxj448), and it let me select it straight away without having to authenticate again. That connection resource holds its own credentials to the storage account, completely separate from my user’s RBAC permissions. I can’t list keys on the storage account myself, but the connection already can, because someone else set it up that way. All I need is permission to wire it into a workflow, which I have.

For the blob path, I clicked the folder icon next to the field instead of typing blind, and it let me browse straight to the container and file: /asxofskr448/asyifbpt448.txt.

Logic app designer with the Get blob content (V2) action configured, showing the storage account connection and the blob path /asxofskr448/asyifbpt448.txt

So that confirms it: there’s a text file called asyifbpt448.txt sitting in the container I couldn’t read, and the Logic App’s connection can pull its content just fine.

Getting the Blob Content Back Out

Having the blob content inside the workflow doesn’t help unless I can actually see it, and the only way to get anything back out of this trigger is through the existing Response action. So I opened it up, clicked into the Body field, hit “Add dynamic content,” and picked File Content from the Get blob content action I’d just added. That appended it right after the existing static text.

Response action body field showing the static text “Hi Welcome to the challenge” followed by the dynamic File Content token from the blob action

Saved the workflow, which republishes it immediately, no separate deploy step needed.

Triggering the Workflow and Grabbing the Flag

Back to the same trigger URL from earlier, pasted into the browser again. This time the response wasn’t just the static message.

Browser showing the triggered Logic App response with the flag appended after the static welcome text

code
Hi Welcome to the challenge ascaxgiu448aszhdgun448

That’s the blob content tacked onto the end, and it’s the flag.

Flag / Result

Flag: ascaxgiu448aszhdgun448

Got there without ever directly reading the storage account or the container. The Logic App’s existing connection did the reading for me, I just had to be allowed to edit the workflow that used it.

Mitigation

  • Treat Logic App Contributor / workflow-edit rights as equivalent to the permissions of every connection that workflow can use, not just the user’s own RBAC roles.
  • Audit existing API connections (Microsoft.Web/connections) regularly, since they carry their own credentials independent of whoever is editing the workflow.
  • Prefer managed identities scoped to specific containers over shared, pre-authenticated storage connections that any workflow editor can reuse.
  • Alert on workflow definition changes and on trigger invocations that don’t match the Logic App’s normal usage pattern.

References