If your Azure API Management instances still hold long-lived secrets, tokens and named values in their configuration, when did you last rotate them? That is the question enterprise administrators should be asking themselves after Norway's National Security Authority (NSM) disclosed a security flaw in Microsoft's Azure API Management (APIM) that has affected multiple organisations in the country, including energy companies Equinor and Skagerak Energi.
NSM said it became aware of a vulnerability in APIM affecting several Norwegian businesses, and that "an unknown actor has been actively looking for access tokens, secrets, and named values in APIM." The agency also stated that it remains uncertain how the intruder initially gained access — a detail that matters as much as the patch itself.
Microsoft has since issued a fix for the flaw, as The Hacker News reported in covering the disclosure. But the patch closes one door without answering the more uncomfortable questions: whether stored secrets were already copied out, and how the attacker got in the first place. Patching a vulnerability and rotating the credentials it could expose are separate remediation steps, and only one of them is automatic.
Why APIM Is a Target Worth Understanding
Azure API Management is widely used as a front door for APIs, routing and securing traffic between internal services and external consumers. That centralising role is exactly what makes it attractive to an intruder. Gateway configuration frequently contains named values, connection strings, subscription keys and backend credentials — a single read can yield reusable secrets for many downstream systems, rather than one.
What Administrators Should Do Now
The initial access vector remains unconfirmed, and NSM has not established the full scope of the activity — including whether tenants outside Norway were touched. Until Microsoft or NSM publish more, organisations should treat their own APIM configuration as unverified territory. A practical checklist:
- Inventory named values and secrets. Enumerate every secret, token, connection string and subscription key stored in APIM instances and linked key vaults.
- Rotate anything long-lived. Treat every credential found in gateway configuration as potentially disclosed, regardless of whether misuse is evident.
- Pull APIM diagnostic and activity logs first. Look for unusual reads of named values, configuration exports, or access from unexpected locations or service principals during the affected window.
- Patch the platform flaw. Apply Microsoft's fix, but record it as one line item among several, not the whole response.
- Shrink the secret footprint. Wherever feasible, move long-lived secrets out of gateway configuration toward managed identities, short-lived tokens, or a dedicated secret store — so the next read of APIM configuration yields less.
For IT professionals in Hong Kong and across the region, none of these steps depend on a tenant having been targeted. The pattern Norway disclosed needs no novel exploit chain — only long-lived secrets stored where read access exposes them — which makes it a generic cloud-secrets exposure question rather than a Norway-only incident.
The broader lesson is simple: a platform patch tells you where the hole was, not what was carried through it. Rotation and log review are not optional follow-ups; they are the part of the response that determines whether this becomes a contained incident or a quiet, ongoing compromise.
如果你的 Azure API Management 實例配置中仍然存放著長期有效的機密、token 和具名值,你上一次輪換它們是何時? 這正是企業管理人員在挪威國家安全局(NSM)披露微軟 Azure API Management(APIM)一項安全漏洞後應該反問自己的問題。該漏洞已影響當地多個機構,包括能源公司 Equinor 及 Skagerak Energi。
NSM 表示,該局得悉 APIM 存在一項影響多家挪威企業的漏洞,並指「一名不明行為者一直在 APIM 中積極尋找 access token、機密及具名值」。該局同時指出,入侵者最初如何取得存取權至今仍屬未知——這個細節的重要性不亞於修補程式本身。
微軟其後已就該漏洞發布修復方案,The Hacker News 在報道相關披露時亦已提及。然而,這個補丁只是關上了一道門,卻沒有回應更令人不安的問題:儲存的機密是否早已被複製帶走,以及攻擊者最初究竟是如何入侵。修補漏洞與輪換可能因此外洩的憑證,屬於兩個各自獨立的補救步驟,而其中只有一項會自動完成。
為何 APIM 是一個值得理解的攻擊目標
Azure API Management 廣泛用作 API 的前門,在內部服務與外部消費者之間路由及保護流量。正是這種樞紐角色使其成為入侵者的理想目標。Gateway 配置通常包含具名值、連接字串、subscription key 及後端憑證——一次讀取即可取得可重複使用的機密,涉及多個下游系統,而非只有一個。
管理人員現階段應採取的措施
初始入侵途徑仍未確認,NSM 亦未確定相關活動的完整範圍,包括挪威以外的 tenant 是否同樣受到影響。在微軟或 NSM 公布更多資料之前,各機構應把自己的 APIM 配置視為未經核實的區域。以下是一份實務清單:
- 盤點具名值及機密。 列舉存放在 APIM 實例及相關 key vault 中的每一個機密、token、連接字串及 subscription key。
- 輪換所有長期有效的憑證。 將 gateway 配置中找到的每一項憑證視為可能已外洩,不論是否有明確的濫用跡象。
- 首先提取 APIM 診斷及活動日誌。 檢視受影響期間是否有異常讀取具名值、導出配置,或來自異常位置或 service principal 的存取。
- 修補平台漏洞。 應用微軟的修復方案,但應將其記錄為多個處理項目之一,而非整個應對方案的全部。
- 縮減機密暴露面。 在可行情況下,將長期有效的機密從 gateway 配置轉移至 managed identity、短期 token 或專用的 secret store——令下一次讀取 APIM 配置時取得的資料更少。
對於香港及整個地區的 IT 專業人士而言,上述任何一步都不取決於自身 tenant 是否曾成為目標。挪威披露的入侵模式無需任何新穎的 exploit chain——只需要長期有效的機密存放在讀取即可暴露的位置——這使其成為一個普遍性的雲端機密外洩問題,而非僅限挪威的個別事件。
更深遠的教訓其實很簡單:平台補丁告訴你漏洞在哪裡,卻沒有告訴你甚麼東西被從那裡帶走。輪換與日誌審查並非可有可無的後續工作;它們才是決定這宗事件會否被控制,抑或演變成一場悄無聲息、持續存在的入侵的關鍵環節。
