Attacks/Breaches
3/22/2013
11:55 AM
Connect Directly
RSS
E-Mail
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
Register for Dark Reading Newsletters
White Papers
Flash Poll
Current Issue
Cartoon
Video
Slideshows
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2014-0174
Published: 2014-07-11
Cumin (aka MRG Management Console), as used in Red Hat Enterprise MRG 2.5, does not include the HTTPOnly flag in a Set-Cookie header for the session cookie, which makes it easier for remote attackers to obtain potentially sensitive information via script access to this cookie.

CVE-2014-3485
Published: 2014-07-11
The REST API in the ovirt-engine in oVirt, as used in Red Hat Enterprise Virtualization (rhevm) 3.4, allows remote authenticated users to read arbitrary files and have other unspecified impact via unknown vectors, related to an XML External Entity (XXE) issue.

CVE-2014-3499
Published: 2014-07-11
Docker 1.0.0 uses world-readable and world-writable permissions on the management socket, which allows local users to gain privileges via unspecified vectors.

CVE-2014-3503
Published: 2014-07-11
Apache Syncope 1.1.x before 1.1.8 uses weak random values to generate passwords, which makes it easier for remote attackers to guess the password via a brute force attack.

CVE-2014-3991
Published: 2014-07-11
Multiple cross-site scripting (XSS) vulnerabilities in Dolibarr ERP/CRM 3.5.3 allow remote attackers to inject arbitrary web script or HTML via the (1) dol_use_jmobile, (2) dol_optimize_smallscreen, (3) dol_no_mouse_hover, (4) dol_hide_topmenu, (5) dol_hide_leftmenu, (6) mainmenu, or (7) leftmenu pa...

Best of the Web
Dark Reading Radio
Archived Dark Reading Radio
Marilyn Cohodas and her guests look at the evolving nature of the relationship between CIO and CSO.