In his career-ending extramarital affair that came to light in 2012, General David Petraeus used a stealthy technique to communicate with his lover Paula Broadwell: the pair left messages for each other in the drafts folder of a shared Gmail account. Now hackers have learned the same trick. Only instead of a mistress, theyâ€™re sharing their love letters with data-stealing malware buried deep on a victimâ€™s computer.
Researchers at the security startup Shape Security say theyâ€™ve found a strain of malware on a clientâ€™s network that uses thatÂ new, furtiveÂ form of â€œcommand and controlâ€â€”the communications channel that connects hackers to their malicious softwareâ€”allowing them to send the programs updates and instructions and retrieve stolen data. Because the commands are hidden in unassuming Gmail drafts that are never even sent, the hidden communications channel is particularly difficult to detect.
â€œWhat weâ€™re seeing here is command and control thatâ€™s using a fully allowed service, and that makes it superstealthy and very hard to identify,â€ says Wade Williamson, a security researcher at Shape. â€œItâ€™s stealthily passing messages back and forth without even having to press send. You never see the bullet fired.â€
Hereâ€™s how the attack worked in the case ShapeÂ observed: The hacker first set up anÂ anonymous Gmail account, then infected a computer on theÂ targetâ€™s network with malware. (Shape declined to name the victim of the attack.) After gaining control of theÂ target machine, the hacker opened their anonymous Gmail account on the victimâ€™s computerÂ in an invisible instance of Internet Explorerâ€”IE allows itself to be run by Windows programs so that they can seamlessly query web pages for information,Â so the user has no idea a web page is even open on the computer.
With the Gmail drafts folder open and hidden, the malware is programmed to use a Python script to retrieve commands and code that the hacker enters into that draft field. The malware responds with its own acknowledgments in Gmail draft form, along with the target data itâ€™s programmed to exfiltrate from the victimâ€™s network. All the communication is encoded to prevent it being spotted by intrusion detection or data-leak prevention. The use of a reputable web service instead of the usual IRC or HTTP protocols that hackers typically use to command their malware also helps keep the hack hidden.
Williamson says the new infection is in fact a variant of a remote access trojan (RAT) called Icoscript first found by the German security firm G-Data in August. At the time, G-Data said that Icoscript had been infecting machines since 2012, and that its use of Yahoo Mail emails to obscure its command and control had helped to keep it from being discovered. The switch to Gmail drafts, says Williamson, could make the malware stealthier still.
Thanks in part to that stealth, Shape doesnâ€™t have any sense of just how many computers might be infected with the Icoscript variant they found. But given its data-stealing intent, they believe itâ€™s likely a closely targeted attack rather than a widespread infection.
For victims of the malware, Shape says thereâ€™s no easy way to detect its surreptitious data theft without blocking Gmail altogether. The responsibility may instead fall on Google to make its webmail less friendly to automated malware. A Google spokesperson responded to an email from WIRED with only a statement that â€œour systems actively track malicious and programmatic usage of Gmail and we quickly remove abusive accounts we identify.â€
Until the automated malware communication is cut off, however, Williamson says Gmail will offer a problematic new path for malware to adapt and update itself. â€œIt makes the malware that much more dynamic,â€ says Williamson. â€œItâ€™s the lifeblood of this attack.â€