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
Crowdsourced vs. Traditional Pen Testing
Alex Haynes, Chief Information Security Officer, CDL,  3/19/2019
BEC Scammer Pleads Guilty
Dark Reading Staff 3/20/2019
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
5 Emerging Cyber Threats to Watch for in 2019
Online attackers are constantly developing new, innovative ways to break into the enterprise. This Dark Reading Tech Digest gives an in-depth look at five emerging attack trends and exploits your security team should look out for, along with helpful recommendations on how you can prevent your organization from falling victim.
Flash Poll
The State of Cyber Security Incident Response
The State of Cyber Security Incident Response
Organizations are responding to new threats with new processes for detecting and mitigating them. Here's a look at how the discipline of incident response is evolving.
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2018-18913
PUBLISHED: 2019-03-21
Opera before 57.0.3098.106 is vulnerable to a DLL Search Order hijacking attack where an attacker can send a ZIP archive composed of an HTML page along with a malicious DLL to the target. Once the document is opened, it may allow the attacker to take full control of the system from any location with...
CVE-2018-20031
PUBLISHED: 2019-03-21
A Denial of Service vulnerability related to preemptive item deletion in lmgrd and vendor daemon components of FlexNet Publisher version 11.16.1.0 and earlier allows a remote attacker to send a combination of messages to lmgrd or the vendor daemon, causing the heartbeat between lmgrd and the vendor ...
CVE-2018-20032
PUBLISHED: 2019-03-21
A Denial of Service vulnerability related to message decoding in lmgrd and vendor daemon components of FlexNet Publisher version 11.16.1.0 and earlier allows a remote attacker to send a combination of messages to lmgrd or the vendor daemon, causing the heartbeat between lmgrd and the vendor daemon t...
CVE-2018-20034
PUBLISHED: 2019-03-21
A Denial of Service vulnerability related to adding an item to a list in lmgrd and vendor daemon components of FlexNet Publisher version 11.16.1.0 and earlier allows a remote attacker to send a combination of messages to lmgrd or the vendor daemon, causing the heartbeat between lmgrd and the vendor ...
CVE-2019-3855
PUBLISHED: 2019-03-21
An integer overflow flaw which could lead to an out of bounds write was discovered in libssh2 before 1.8.1 in the way packets are read from the server. A remote attacker who compromises a SSH server may be able to execute code on the client system when a user connects to the server.