This report describes real-world social engineering where victims are tricked into copying and pasting commands that install malware on macOS and Windows. It also highlights device code phishing activity targeting Microsoft Entra ID/Microsoft 365 tokens, enabling attackers to access accounts and data without needing passwords in some cases.
How the attack worked
This reporting describes two related social engineering patterns. The first involves copy-paste lures that instruct victims to run a command in Terminal (macOS) or Command Prompt (Windows) to fix a problem or complete a setup step. On macOS, these commands used curl and osascript to fetch and execute Phexia, which then established persistence through LaunchAgents. On Windows, similar lures tricked users into running commands that downloaded and silently installed an MSI file containing EtherRAT, using flags that hide the installation from the user.
The second pattern involves device code phishing using GraphSpy, an open-source tool that abuses the legitimate Microsoft device code sign-in flow to capture Entra ID and Microsoft 365 authentication tokens. This can give attackers account access without needing the victim's password.
Why it succeeded
- The instructions were framed as routine troubleshooting or setup steps, which made an unusual request feel normal.
- Pasting a command into Terminal or Command Prompt bypasses standard software installation channels like an App Store, MDM, or self-service portal, so there is no obvious approval step to question.
- Silent install flags on the Windows MSI hid what was actually being installed from the user.
- Device code phishing rides on a real Microsoft sign-in flow, so it can look like a legitimate security verification step rather than an attack.
- Some of these threats use dead drop resolution, including via Telegram, Steam, and blockchain smart contracts, to locate command-and-control infrastructure, which blends malicious traffic in with normal activity to trusted services.
What to watch for
- Any request, especially by email, to copy and paste a command into Terminal or Command Prompt.
- Commands that reference curl, osascript, or msiexec with silent install flags.
- Downloads pointed at unfamiliar external domains rather than internal or vendor-approved sources.
- Unexpected device code sign-in requests that were not initiated by the user, particularly when paired with urgency about security verification.
How to build resistance
- Treat copy-paste command instructions as a major red flag and verify requests with IT through a known, separate channel before running anything.
- Restrict or block the device code authentication flow through Conditional Access policies where it is not required for legitimate business use.
- If device code phishing is suspected, revoke the affected user's refresh tokens and active sessions, reset credentials, and require re-authentication.
- Reinforce awareness across finance, IT helpdesk, IT administrators, and general staff, since these lures target macOS and Windows users broadly rather than a single team.
Key findings
- GraphSpy is an open-source tool used to phish and abuse Microsoft Entra ID and Microsoft 365 authentication tokens, including device code phishing and refresh token abuse.
- Phexia (macOS) has been distributed via malicious copy-and-paste lures that get users to run curl/osascript commands, leading to persistence via LaunchAgents.
- EtherRAT (Windows) has been delivered by tricking users into executing copy-and-paste commands that download and silently install an MSI.
- Multiple threats use “dead drop resolution” (including via blockchain smart contracts) to dynamically retrieve command-and-control (C2) URLs, making blocking harder.
Who’s being targeted
- Commonly targeted roles: All employees, Finance, IT helpdesk / Service desk, IT administrators, macOS users, Windows users, Security operations.
- Affected industries: Cross-industry (general business users and IT endpoints).
- Attack channels: email, website.
- Impersonated: Unspecified (attacker provides “instructions” to the user), Unspecified (attacker provides “support” instructions), Microsoft sign-in / organization security.
Red flags to watch for
- Unusual request to run a Terminal command from an untrusted source
- Command downloads content from an unfamiliar domain
- Instructions bypass normal software installation processes (App Store/MDM/self-service portal)
- Copy/paste into Command Prompt is rarely a normal business workflow
- Downloads an installer (MSI) from an unfamiliar external domain
- Silent install flags (e.g., `/qn`) hide what is being installed
- Unexpected request to complete a device-code sign-in
- Urgency around “security verification” without a ticket or prior context
- Sign-in flow initiated by someone else (you didn’t start it)
Frequently asked questions
What is a copy-paste lure attack?
It is a social engineering technique where victims are told to copy and paste a command into Terminal or Command Prompt to fix an issue or complete setup, but the command actually downloads and installs malware.
What malware has been distributed through copy-paste lures?
Phexia targets macOS through curl and osascript commands leading to persistence via LaunchAgents, while EtherRAT targets Windows through commands that silently download and install a malicious MSI file.
What is device code phishing and why does it matter?
Device code phishing uses a legitimate Microsoft sign-in flow to trick users into entering a code that lets attackers capture Entra ID or Microsoft 365 authentication tokens, sometimes bypassing the need for a password.
How should organizations respond to suspected device code phishing?
Recommended steps include revoking the affected user's refresh tokens and active sessions, resetting account credentials, and requiring re-authentication.
Read the video transcript
If an email ever says, “Just copy and paste this command into Terminal or Command Prompt,” stop right there. We’re seeing real campaigns where macOS Phexia and Windows EtherRAT get installed just by you pasting commands like curl gl1nto.spiintforge[.]ru or an msiexec line from reeemso.forwardbox[.]co[.]uk. Once that runs, malware can sit in LaunchAgents or silently install an MSI, then use tools like GraphSpy and device code phishing to grab your Microsoft 365 tokens, no password needed. Your move: any email or chat that tells you to copy and paste a command into Terminal or Command Prompt, pause, don’t run it, and send it to IT using our normal helpdesk channel.