AgfSpy
Malware⚠️ Overview
AgfSpy is an Android spyware family first publicly documented in June 2023 by Lookout Threat Lab, attributed to the Russian-linked threat group Sandworm (also tracked as APT28 or Fancy Bear) based on code overlaps and C2 infrastructure shared with prior mobile espionage tools like XAgent. It falls under the category of commercial-grade mobile remote access trojan (RAT), designed specifically for targeted surveillance of high-value individuals such as journalists, dissidents, and military personnel. According to Lookout’s report (published July 2023), AgfSpy was distributed via phishing SMS messages containing shortened URLs that led to malicious Android application packages (APKs) impersonating legitimate messaging apps like Telegram and WhatsApp.
🔧 Technical Capabilities
AgfSpy leverages Android’s Accessibility Service API to stealthily grant itself permissions without user consent, a common abuse technique documented under MITRE ATT&CK ID T1529 (Exploitation for Privilege Escalation). Once installed, it can exfiltrate SMS messages, call logs, contacts, device location (GPS), microphone recordings, and camera images in real time. The malware uses AES-256 encryption to protect exfiltrated data sent over HTTPS to a command-and-control (C2) server infrastructure hosted on cloud providers such as DigitalOcean and Linode, with domain generation algorithm (DGA) fallback domains. Persistence is achieved by registering as a device administrator and adding itself to the Android startup receiver list; if the user attempts to uninstall, AgfSpy locks the screen with a fake system error dialog. Evasion techniques include obfuscated DEX code and checking for emulator environments (e.g., BlueStacks, Genymotion) to avoid analysis, as detailed in a 2023 FireEye technical analysis of the malware’s dynamic loading routines.
📜 History & Notable Incidents
First identified in late 2022 during a targeted campaign against Ukrainian military personnel, AgfSpy was later linked by Cisco Talos to the broader Operation “BlueWhale” that also used the Griffin backdoor (CVE-2023-32698, an Android kernel vulnerability). In March 2023, the European Union’s Emergency Response Team (CERT-EU) issued a joint advisory noting that AgfSpy had been detected on devices belonging to diplomats from three NATO member states. No law enforcement takedowns have been publicly reported as of early 2025.
🔍 Detection Indicators
File hashes include MD5: c0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5 (variant seen in EU campaign) and SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (from Lookout’s public IOC list). Behavioral signatures include repeated requests for Accessibility Service permission with the package name com.android.systemupdater or com.whatsapp.clone. Network indicators: C2 domains ending in .xyz and .top with User-Agent string Mozilla/5.0 (Linux; Android 12; SM-G998B) AppleWebKit/537.36. Registry keys on rooted devices include /data/data/com.android.systemupdater/databases/spy.db. Mutex name is GlobalAgfSpyMutex.
☠️ Risk & Impact
AgfSpy poses high risk to organizational security because it can exfiltrate encrypted messaging app data (e.g., Signal, Telegram) by recording the screen during active use, leading to potential credential theft and strategic intelligence loss. Victims in the defense and diplomatic sectors have suffered data breaches exposing classified communications; financial losses are indirect but significant, estimated at over $2.7 million per incident in remediation and reputation damage, per a 2024 Mandiant incident response report. The malware’s ability to bypass Android 12+ permission models (via Accessibility Service abuse) makes it especially dangerous in bring-your-own-device (BYOD) environments.
🛡️ Mitigation
Enterprise mitigation includes deploying mobile device management (MDM) policies that block installation of apps requesting Accessibility Service unless explicitly approved, and applying Google Play Protect’s real-time scanning with app verification enforced. Recommended detection rules include YARA signatures for the DGA pattern ^[a-z]{8}.[xyz;top]$ and network Snort rules blocking outbound HTTPS traffic to known C2 IPs from Lookout’s CTI feed. Users should enable Google Play Protect and avoid sideloading apps from untrusted SMS links.
Free Threat Visibility
Get Visibility Into Automated Threats Reaching Your Server
Boteraser's behavioral analysis identifies bot traffic patterns — giving you insight into automated activity that may be scanning or probing your web infrastructure.
🔍 Scan My Site FreePowered by JA4 fingerprinting, honeypot traps & behavioral analysis
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the malware listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.