Guide · Phishing & scams

A shared file gave you a code? Don't paste it

A PDF says someone shared a payment report with you. Click through, and a page shows a short code, copies it for you, and sends you to Microsoft’s real sign-in page to paste it. You sign in like normal, and you have just given a stranger access to your Microsoft account. The trick is called device code phishing, and your two-step login doesn’t stop it, because you are the one approving the sign-in.

In under a minute:

  • Never paste a code a webpage gave you into microsoft.com/devicelogin. Device codes are for signing in on things like smart TVs and conference-room devices, not for opening a document.
  • Didn’t start a device sign-in yourself? Cancel, close the page and report the email.
  • Already did it? Tell whoever runs your IT now, so they can sign out your sessions and check the account.

Turn “don’t paste that code” into a rule everyone knows. The Small Business Security Essentials Toolkit ($79) includes Decision tree 4 for suspicious emails and links, the SEC-02 Password & MFA Policy, and incident playbooks for when an account is already compromised.

What happened

On October 29, 2026, Group-IB published research on a phishing kit it calls MadApe, after the name on the kit’s own operator panel. It targets Microsoft 365 accounts without ever asking for a password on a fake page. Group-IB tied the kit to 155 root domains, with phishing components found on 97 of them, and lures in at least nine languages. The lure filenames are routine business documents such as “Payment Report 2025 – Confidential,” invoices, contracts and proposals.

The trap, step by step

  1. The email: a business-looking message with a PDF that resembles a SharePoint “a file was shared with you” notice.
  2. A document-access page or a “human verification” check (Group-IB says it exists to keep security scanners out).
  3. The code page: SharePoint, OneDrive, Teams voicemail, Adobe Acrobat or DocuSign themed. It shows a code and copies it to your clipboard when you click it.
  4. Microsoft’s real page: the “Open File” button opens microsoft.com/devicelogin. You paste the code and sign in, and the attacker’s side receives the access tokens for your account.

The tells

TellWhat it looks like
A code to “open” a document“Copy your access code and verify on the Microsoft page”
You didn’t start anythingNo TV, printer or app of yours is waiting to sign in
The confirmation prompt names an app you didn’t openMicrosoft asks if you’re trying to sign in to an app. If you didn’t start it, choose Cancel.
Unexpected shared filesPayment reports, invoices or contracts from someone you weren’t expecting

What to do

  1. Don’t enter a device code you didn’t request. Close the page and report the email.
  2. Check shared files another way. Open SharePoint or OneDrive yourself, or ask the sender through a contact you already have.
  3. If you pasted a code and signed in, report it right away, even if nothing looks wrong. Group-IB notes the attacker doesn’t need your password once you approve the sign-in.

If you run a team

Bottom line

Every page you type into in this scam can be genuinely Microsoft’s, which is what makes it work. The giveaway is the request itself: a shared file that wants you to copy a code. Don’t paste it.

Prefer video? Watch the under-a-minute version on YouTube: A Shared File Gave You a Code? Don't Paste It.

Free next step: Get the Small Business Cybersecurity Checklist — download it now, or sign up there to get it by email and hear about new guides.