Skip to main content

Wolfcore Cyber Security

Azure API Management Secrets Targeted: Rotate Your Keys Now

Azure API Management Secrets Targeted: Rotate Your Keys Now

By Ruben Selby, founder and penetration tester at Wolfcore

Attackers have been going after Azure API Management secrets, the keys stored inside Microsoft’s service. Microsoft has closed the hole, but fixing the door does not change the locks. If your business, or the agency that built your apps, uses this service, the keys inside it need replacing.

What happened to Azure API Management secrets

Per SecurityWeek, Microsoft found the issue in Azure API Management (APIM) on 18 November and closed the access path the next day. SecurityWeek says this comes from a private Microsoft notice that a customer shared on Reddit. Microsoft has not published it, so treat the detail as reported, not confirmed in public.

Exposed data can include named values, identity provider client secrets, subscription keys and tokens for APIM’s management APIs. Microsoft says Classic tiers that do not follow its security guidance are affected, and v2 tiers are not.

Norway’s National Security Authority (NSM) says an unknown actor targeted tokens, secrets and named values. It says organisations in several sectors, in Norway and abroad, are affected. Equinor and Skagerak Energi reported incidents and say they found no evidence of data theft. NSM says it is still unclear how widely the flaw was exploited.

Why it matters if you run a small or mid-sized business

APIM sits in front of your applications and handles how they talk to each other and to outside services. To do that job it holds credentials. That makes it a tidy target. One successful read gives an attacker a bundle of keys without needing to break into each system behind it.

This is the mechanism to understand. A stolen key is not a hack of your website. It is a login. The attacker arrives with valid credentials, so nothing looks broken. SecurityWeek quotes security expert Anders Kristiansen warning that credentials lifted from APIM could be used against outside services, and that the damage depends on what each credential is allowed to do.

Two lessons carry over to any business, whether or not you use Azure.

First, patching the platform does not make old keys safe. Anything that could have been read before the fix is still valid until you change it. That is why NSM tells APIM users to treat their secrets and named values as compromised.

Second, many small firms do not know where their keys live. If an agency or contractor set up your apps, the answer may be “inside a gateway nobody has looked at since launch.” A secret rotation routine, done calmly on a normal Tuesday, turns a crisis into a chore. Keys also open more than they should when API access is too broad, which is the kind of problem we describe in our API authorisation case study.

What to do this week

  1. Ask your IT person or agency in writing whether you use Azure API Management Classic, including old test and staging instances.
  2. If you do, rotate every token, secret and named value stored in it, as NSM advises, and confirm the old ones no longer work.
  3. Check the runtime version using NSM’s steps: NSM says 0.52.x is patched at build 31936 or higher, and 0.53.x at 31938 or higher. If yours is lower, contact Microsoft.
  4. List what sits behind each key, so you know what an attacker could have reached, and review the logs for those systems for unusual sign-ins.
  5. Move secrets out of the gateway where you can, and keep a record of who owns each key and when it was last changed.

How Wolfcore helps

Wolfcore is a UK-based offensive security firm working with businesses worldwide. Breachy will not look inside your Azure setup. It does cover the other half of the problem: Breachy checks your staff email addresses against known data breaches, scores your exposure and gives plain steps to fix each finding, so leaked logins get changed before someone uses them. To see what an attacker could reach through your applications and APIs, see our web application penetration testing and penetration testing services, and our pricing.

FAQ

Is Azure API Management affected if I use the v2 tiers? Per SecurityWeek, Microsoft says Classic tiers that do not follow its security guidance are affected and v2 tiers are not.

If Microsoft has fixed the flaw, do I still need to rotate keys? Yes. NSM tells APIM users to treat their secrets and named values as compromised, because patching does not change keys that could already have been read.

What can be exposed from Azure API Management? SecurityWeek says exposed data can include named values, identity provider client secrets, subscription keys and tokens for APIM’s management APIs.

Sources

Related reading: Infostealer Malware: Why a Password Reset Is Not Enough

Ruben Selby, founder and penetration tester at Wolfcore

Wolfcore

Would your staff click a phishing email?

Run a real, safe phishing test on your team with Phishy. Free for 14 days, up to 10 staff, no card. We help you set it up.

Start a free phishing testFree website security scanor book a 30 minute call