The risks of device code authentication for AI coding agents
Microsoft warns that device code phishing lets attackers take over accounts by tricking users into approving sign-ins with a code.
Overview
Microsoft Security Blog reported on a method where attackers trick users into approving a sign-in request using a device code instead of stealing a password. This technique, known as device code phishingTricking a user into entering an attacker's activation code on a real login page, allows an attacker to gain access to email, files, or other cloud services based on the permissionsThe specific rights granted to an account or app to read, write, or run files and services granted. The blog explains that this risk extends to AI coding agents, using GitHub Copilot CLIA text-based terminal interface where users type commands instead of clicking buttons in a graphical window as an example of a tool that supports this sign-in method. In a controlled lab simulation, researchers showed that an attacker could use a phished authorizationChecking whether an already logged-in user or program has permission to perform a specific action to steer an active session, add misleading entries to the agent's memory, read synchronized sessionsAn active logged-in period of communication between a user or device and a server, or access private repositories. These outcomes depend on the specific configurationA text file that stores settings, network addresses, and options for how a program or server runs and permissions of the user's account. The findings demonstrate that existing features working as designed can be abused if a user approves a request initiated by an attacker.
Terms in this story
- device code phishing
- Tricking a user into entering an attacker's activation code on a real login page. The login flow meant for smart televisions and command-line tools displays a short code, and in device code phishing the scammer gives their code to the victim to approve.
- Device code phishing
- Tricking a victim into entering a short login code that links the attacker's device to their account. Smart televisions use a short code flow to sign in without a keyboard, and attackers abuse this in device-code phishing by convincing employees to type the attacker's code into a real corporate login page.
- phishing
- Tricking people into handing over passwords or money through fake messages that look real. Attackers send fake emails or messages that copy a bank, school, or login page so a reader types in their password or opens a malicious attachment. Security+ objective 2.2 lists the term
- permissions
- The specific rights granted to an account or app to read, write, or run files and services. When a mobile app or browser extension asks for broad permissions, such as reading every web page you visit, a malicious update can abuse those rights to steal passwords.
- CLI
- A text-based terminal interface where users type commands instead of clicking buttons in a graphical window. Software teams and administrators manage cloud servers and code repositories through a CLI because text commands are fast and easy to automate in scripts.
- authorization
- Checking whether an already logged-in user or program has permission to perform a specific action. Authentication checks who you are at the front door, while authorization decides whether your student account is allowed to read only your own grades or edit the class roster.
- sessions
- An active logged-in period of communication between a user or device and a server. Once you log in to a website, the server tracks your session so you can click from page to page without retyping your password on every screen.
- configuration
- A text file that stores settings, network addresses, and options for how a program or server runs. Attackers who gain read access to a server look for its configuration file first because it often contains database passwords, API keys, and internal server paths.
- authentication
- Verifying that a user, device, or program really is who it claims to be before allowing access. When you enter a password, scan a fingerprint, or present a key, authentication checks your identity before a server decides what your account is allowed to do.
- account takeover
- When an attacker steals login access to a real user's account and locks the owner out. After an account takeover through phishing or credential stuffing, criminals change the victim's recovery email or phone number and use the account for fraud or further attacks. Security+ objective 2.4 lists the term
- OAuth
- An open standard that lets one app use another service without sharing your password. When you click a button to sign in with an existing account or let a calendar app read your schedule, OAuth issues an access token without sharing your password. Security+ objective 4.6 lists the term
- proof-of-concept
- A working sample of code or steps that shows a reported security flaw can really be triggered. When researchers publish a proof-of-concept for a new bug, defenders can test their own systems, but criminals also watch for that code and adapt it for real attacks.
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the Microsoft Security Blog website. Cite the article, not this page.
Read the full article on Microsoft Security Blog (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Research and reports
We explored this scenario in a controlled lab... Found by reading the article; these words are close to its own - Who is affected: "...victim test account..."
Copied word for word from the article - Security+ 2.2 Explain common threat vectors and attack surfaces.
"Lab research shows how device code phishing, a technique that applies to any..." Found in the opening sentences - Security+ 5.6 Given a scenario, implement security awareness practices.
"Lab research shows how device code phishing, a technique that applies to any..." Found in the opening sentences - CYBR 101 week 10: the web, cookies, phishing, incident response and logs
"Lab research shows how device code phishing, a technique that applies to any..." Found in the opening sentences - CYBR 101 week 2: the CIA triad, threat actors, risk and CVEs
"The risks of device code authentication for AI coding agents..." Found in the headline - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"The risks of device code authentication for AI coding agents..." Found in the headline
How a story is connected to the course, and every objective, week and job role