Subscribe to the Non-Human & AI Identity Journal

Notifications
Clear all

OAuth device code attacks: are your session controls keeping up?


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 12518
Topic starter  

TL;DR: Device code phishing and related OAuth abuse are being used in the wild to hijack sessions, change scopes, and persist inside Microsoft environments, according to Widefield Security. The central issue is not just phishing, but broken session modelling that leaves IAM teams unable to see or govern the full authorization chain.

NHIMG editorial — based on content published by Widefield Security: Bunker Down on device code attacks and OAuth abuse

By the numbers:

  • Microsoft OAuth abuse opened lateral movement across over 30 apps, including Azure, with limited logging and controls.

Questions worth separating out

Q: How should security teams detect OAuth device code abuse in enterprise environments?

A: Security teams should correlate interactive approval, token issuance, refresh activity, and downstream app access into a single session view.

Q: Why do OAuth sessions create more risk than traditional login events?

A: OAuth sessions can carry trust forward after the initial authentication step, which means one successful approval can unlock access across multiple services.

Q: What do teams get wrong about device code phishing controls?

A: Teams often focus on blocking the phishing prompt while ignoring the broader authorization chain.

Practitioner guidance

  • Instrument session-level correlation Join interactive and non-interactive events into one trace so device code completion, token issuance, refresh usage, and downstream app access can be analysed together.
  • Tighten consent and brokered app rules Review which first-party and brokered clients can use device code flow, then restrict consent where the resulting token chain can reach admin or high-value workloads.
  • Hunt for scope expansion after initial grant Flag sessions where the original authorization context is followed by broader app access, unusual refresh behaviour, or a new client ID that was not part of the starting interaction.

What's in the full article

Widefield Security's full analysis covers the operational detail this post intentionally leaves for the source:

  • A longer chronology of device code phishing research and how Microsoft controls evolved across 2024
  • Specific examples of app and client behaviours that create lateral movement opportunity across Microsoft services
  • Detection ideas for separating legitimate device code usage from abuse using richer telemetry and model-based analysis

👉 Read Widefield Security's analysis of OAuth device code attacks and session abuse →

OAuth device code attacks: are your session controls keeping up?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 3 months ago
Posts: 12102
 

OAuth session trust is the real attack surface: This abuse pattern works because identity teams still over-index on login events instead of session behaviour. A valid device code completion can hide hostile intent if the programme cannot trace how access evolves after the initial grant. The practitioner takeaway is that delegated sessions need the same governance attention as credentials.

A few things that frame the scale:

  • From our research: 91.6% of secrets remain valid five days after the targeted organisation is notified, showing a critical gap in remediation procedures, according to Ultimate Guide to NHIs.
  • Only 5.7% of organisations have full visibility into their service accounts, which is why session-level identity traces matter when OAuth abuse blends interactive and non-interactive activity.

A question worth separating out:

Q: Who is accountable when OAuth token abuse reaches admin access?

A: Accountability sits with the identity and platform owners who define consent policy, client trust, logging, and revocation behaviour. If a token can be reused across applications without clear session semantics, then the control gap is organisational, not just user-driven. Frameworks such as the NIST Cybersecurity Framework help assign ownership for identity visibility and response.

👉 Read our full editorial: OAuth device code attacks expose session governance gaps



   
ReplyQuote
Share: