$npx -y skills add vinayaklatthe/microsoft-security-skills --skill defender-for-storageGuidance for Microsoft Defender for Storage — threat protection for Azure Storage accounts (Blob, Files, Data Lake Gen2). Covers the v2 (per-storage-account) plan, on-upload malware scanning powered by Defender Antivirus, sensitive data threat detection (integrated with Purview c
| 1 | # Microsoft Defender for Storage |
| 2 | |
| 3 | Defender for Storage protects Azure Blob Storage, Azure Files, and Azure Data Lake Storage |
| 4 | Gen2 against malicious uploads, sensitive data exfiltration, and suspicious access patterns. |
| 5 | The current generation is **Defender for Storage v2**, billed per storage account, with |
| 6 | optional add-ons for **on-upload malware scanning** and **sensitive data threat detection**. |
| 7 | |
| 8 | ## When to use |
| 9 | Protecting Azure Storage accounts that receive uploads from untrusted or partner sources, |
| 10 | host application content (web apps, ML datasets), or contain sensitive data classified by |
| 11 | Purview. Use this skill for plan rollout, malware-scan tuning, and incident response on |
| 12 | storage alerts. |
| 13 | |
| 14 | **Do not use this skill** for SQL/Cosmos data plane protection (`defender-for-cloud-hardening`), |
| 15 | VM disk-level malware (`defender-for-servers`), or M365 file workloads |
| 16 | (`defender-for-office-365`). |
| 17 | |
| 18 | ## Plan and add-ons |
| 19 | |
| 20 | | Component | What it does | Cost model | |
| 21 | |---|---|---| |
| 22 | | **Defender for Storage v2 (base)** | Activity monitoring: anomalous access, suspicious extraction, unusual deletion | Per storage account / month | |
| 23 | | **On-upload malware scanning** | Defender AV scans every uploaded blob up to 2 GB; result tag + Event Grid event | Per GB scanned (capped per-account configurable) | |
| 24 | | **Sensitive data threat detection** | Integrates with Purview sensitive-info-types; alerts when sensitive blobs are accessed by suspicious principals | Included in v2 (no extra fee) | |
| 25 | |
| 26 | > **v1 (per-transaction) is deprecated.** Migrate any v1-enabled accounts to v2 — it's |
| 27 | > cheaper and predictable. |
| 28 | |
| 29 | ## Approach |
| 30 | |
| 31 | 1. **Enable Defender for Storage v2 at subscription scope** with malware scanning **on** |
| 32 | and a per-account monthly GB cap (default 5,000 GB). Cap prevents runaway costs on |
| 33 | high-throughput accounts. |
| 34 | *Verify: Defender for Cloud → Environment settings → Subscription → Storage shows v2 plan |
| 35 | On with malware scanning enabled.* |
| 36 | |
| 37 | 2. **Override per storage account** for outliers: |
| 38 | - **Disable malware scan** on append-only logging accounts, large telemetry sinks, or |
| 39 | accounts already scanning at the application layer. |
| 40 | - **Disable plan entirely** on tenant-scoped diagnostic accounts (Activity Logs export, |
| 41 | NSG flow logs) where threat detection adds no value. |
| 42 | |
| 43 | 3. **Wire scan results to Event Grid.** Set up an Event Grid system topic per protected |
| 44 | account; subscribe a Function/Logic App that: |
| 45 | - Moves malicious blobs to a quarantine container (or deletes). |
| 46 | - Writes the verdict to the blob's index tag (`Malware-Scanning-scan-result-tag`). |
| 47 | - Notifies the SOC. |
| 48 | *Verify: upload an EICAR test file; within 2 minutes the blob is tagged Malicious and the |
| 49 | quarantine workflow fires.* |
| 50 | |
| 51 | 4. **Sensitive data threat detection** — turn on after Purview classifies the accounts. |
| 52 | Without classification, this just runs on file extensions/header heuristics. Pair with |
| 53 | Purview Data Map for full value (see `purview-data-map`). |
| 54 | |
| 55 | 5. **Tune alerts.** Baseline 7 days then suppress noisy ones (e.g., expected SAS-token use |
| 56 | from CDN edge IPs). Send remaining alerts into Sentinel via the Defender for Cloud |
| 57 | connector. |
| 58 | |
| 59 | 6. **Block public anonymous access at the storage account.** Defender alerts on suspicious |
| 60 | anonymous reads, but the right control is `allowBlobPublicAccess = false` and Azure Policy |
| 61 | to enforce. Defender is detection, not prevention. |
| 62 | |
| 63 | 7. **Response runbook for "Malicious blob uploaded" alert:** |
| 64 | 1. Confirm the verdict tag on the blob. |
| 65 | 2. Move to quarantine container; revoke any SAS/keys for the upload identity. |
| 66 | 3. Hunt sibling uploads from same principal in the past 24h via KQL on |
| 67 | `StorageBlobLogs`. |
| 68 | 4. Notify owner; close the alert with evidence. |
| 69 | |
| 70 | ## Guardrails |
| 71 | - **Always set a per-account GB cap** on malware scanning. Without it, a misbehaving client |
| 72 | uploading the same 50 GB file 1,000 times can produce a si |