Attacks/Breaches

3/22/2013
11:55 AM
50%
50%

How TeamSpy Turned Legitimate TeamViewer App Into Cyberespionage Tool

Attackers abused TeamViewer's functionality as part of their effort to go undetected for years

The discovery of the so-called TeamSpy espionage campaign marks yet another example of malware sliding under the radar while pilfering data from sensitive systems. But perhaps the most striking element of the attack is its abuse of a legitimate remote access tool (RAT) to administer infected machines.

TeamSpy is a cyberespionage operation targeting government agencies, businesses, and activists that may stretch back as far as roughly a decade. Many of its victims appear to be from Europe. The crew took advantage of the functionality of the TeamViewer application, which is used for remote control, Web conferencing, desktop sharing, online meetings, and transferring files between computers.

The malware installs a version of TeamViewer on infected systems. The attackers then extend TeamViewer's functionality to provide additional stealth, dynamically patching it in memory to remove indications of its presence.

"This set of TeamSpy attacks is unique for a number of reasons, including the attackers' use of TeamViewer, and then extending TeamViewer functionality on target desktops with a DLL hijacking exploit," explains Kurt Baumgartner, senior security researcher at Kaspersky Lab.

The DLL hijacking occurs courtesy of a module called Avicap32, which contains a PE EXE file written in Assembler. That file is stored in the same folder as TeamViewer.exe, and when TeamViewer is launched it will "show no warning, no popups, no systray icons and will silently continue working providing remote access to the infected machine," Kaspersky Lab notes in a report examining the attacks.

"This module not only disables TeamViewer popups but also extends its functionality to the classical HTTP bot supporting a set of commands," according to the report. "This module installed with Teamviewer 6 allows the attackers to access computer desktop remotely, activate webcam or microphone, download or upload files to the infected machine and many more."

Dr. Boldizsar Bencsath, of Laboratory of Cryptography and Systems Security (CrySyS Lab) at the Budapest University of Telecommunications and Economics, says he is not all that surprised to see a legitimate remote access tool used in this way.

"If hackers attack a Linux server, they also abuse regular Linux tools; for many things they don't have to write malware -- just reconfigure or start them to use," he says. "It is a good trick that they don't write the whole tool, just a part, and [antivirus] companies can't set a signature on TeamViewer itself, just for the small malicious modification, which then can be easily modified if detected.

"Of course, it's not that tricky, not impossible to be detected, but if there is no reason for the user to check, it won't be that easy to see he or she has a problem."

In its analysis of TeamSpy, CrySys Lab observed that TeamViewer had also been leveraged in the "Sheldor" attack campaign, which was detected between 2010 and 2011 and resulted in between $600,000 and $832,000 in assets being stolen. Though there were also similarities in command-and-control traffic between the campaigns, CrySys Lab researchers stopped short of saying the campaigns were connected beyond the tool level.

Once inside a network, targeted attackers may attempt to blend in by using legitimate tools and stolen credentials from the network, Kaspersky's Baumgartner says, but he would not call what happened with TeamViewer "common." The most unique aspect of the attack, he opines, is that an almost decade-long cyberespionage operation relied heavily on a digitally signed, well-known RAT.

TeamViewer spokesperson Magdalena Brzakala said in a statement that the presence of the avicap32.dll is an indication of infection, and that users should patch their systems and run up-to-date antivirus to deal with attacks.

The exact number of victims is not known, but security researchers at CrySys Lab and Kaspersky Lab believe the number is less than 1,000.

"An overall number is hard to arrive at, because the operation ran for almost a decade across multiple command and control servers," according to Baumgartner. "I would say overall, victims ran into the high hundreds, partly because of the inefficiencies of running watering hole schemes."

Have a comment on this story? Please click "Add Your Comment" below. If you'd like to contact Dark Reading's editors directly, send us a message.

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
'PowerSnitch' Hacks Androids via Power Banks
Kelly Jackson Higgins, Executive Editor at Dark Reading,  12/8/2018
The Case for a Human Security Officer
Ira Winkler, CISSP, President, Secure Mentem,  12/5/2018
Windows 10 Security Questions Prove Easy for Attackers to Exploit
Kelly Sheridan, Staff Editor, Dark Reading,  12/5/2018
Register for Dark Reading Newsletters
White Papers
Video
Cartoon Contest
Write a Caption, Win a Starbucks Card! Click Here
Latest Comment: This comment is waiting for review by our moderators.
Current Issue
10 Best Practices That Could Reshape Your IT Security Department
This Dark Reading Tech Digest, explores ten best practices that could reshape IT security departments.
Flash Poll
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2018-8651
PUBLISHED: 2018-12-12
A cross site scripting vulnerability exists when Microsoft Dynamics NAV does not properly sanitize a specially crafted web request to an affected Dynamics NAV server, aka "Microsoft Dynamics NAV Cross Site Scripting Vulnerability." This affects Microsoft Dynamics NAV.
CVE-2018-8652
PUBLISHED: 2018-12-12
A Cross-site Scripting (XSS) vulnerability exists when Windows Azure Pack does not properly sanitize user-provided input, aka "Windows Azure Pack Cross Site Scripting Vulnerability." This affects Windows Azure Pack Rollup 13.1.
CVE-2018-8617
PUBLISHED: 2018-12-12
A remote code execution vulnerability exists in the way that the Chakra scripting engine handles objects in memory in Microsoft Edge, aka "Chakra Scripting Engine Memory Corruption Vulnerability." This affects Microsoft Edge, ChakraCore. This CVE ID is unique from CVE-2018-8583, CVE-2018-8...
CVE-2018-8618
PUBLISHED: 2018-12-12
A remote code execution vulnerability exists in the way that the Chakra scripting engine handles objects in memory in Microsoft Edge, aka "Chakra Scripting Engine Memory Corruption Vulnerability." This affects Microsoft Edge, ChakraCore. This CVE ID is unique from CVE-2018-8583, CVE-2018-8...
CVE-2018-8619
PUBLISHED: 2018-12-12
A remote code execution vulnerability exists when the Internet Explorer VBScript execution policy does not properly restrict VBScript under specific conditions, aka "Internet Explorer Remote Code Execution Vulnerability." This affects Internet Explorer 9, Internet Explorer 11, Internet Exp...