Lion Cipher Lab

Reimplement an Azure Storage SAS by hand — and measure its blast radius

Why it matters

A Shared Access Signature is how most of the world hands out scoped access to Azure Blob Storage, and almost everyone generates one with a one-line SDK call and never looks inside. That opacity is the security problem. A Service SAS is just a string of query parameters — permissions, a start and expiry time, an optional IP and protocol lock — HMAC-SHA256'd with the storage account key. Once you have built that string by hand you can read any SAS in a log or a referer header and instantly see what it grants and for how long, and you understand the trap that bites teams in production: a Service…

What you'll learn

Steps in this lab

  1. When you'd hand-roll a SAS — and when you absolutely should not
  2. What a Service SAS actually is
  3. The string-to-sign, field by field
  4. Decode the account key with openssl (and see it is fake)
  5. Write the signer
  6. Run it: sign an over-broad SAS and measure the blast radius
  7. Tighten it and re-measure
  8. Prove it is tamper-sensitive (without a published vector)
  9. Assemble the URL — and why that URL is now a bearer secret
  10. The revocation trap: you cannot kill one Service SAS
  11. Honest negatives — what this lab did NOT prove
  12. The pro move: stored access policy or user-delegation SAS

Open the full interactive lab →