Cyberspies tap free tools to make powerful malware framework

The Netrepser cyberespionage group managed to infect hundreds of computers belonging to government agencies and organizations

Over the past year, a group of attackers has managed to infect hundreds of computers belonging to government agencies with a malware framework stitched together from JavaScript code and publicly available tools.

The attack, analyzed by researchers from antivirus firm Bitdefender, shows that cyberespionage groups don't necessarily need to invest a lot of money in developing unique and powerful malware programs to achieve their goals. In fact, the use of publicly available tools designed for system administration can increase an attack's efficiency and makes it harder for security vendors to detect it and link it to a particular threat actor.

The Bitdefender researchers have dubbed the newly discovered attack group Netrepser and traced back some of its attack campaigns to May 2016. The group is still active, but to Bitdefender's knowledge its attacks have never been publicly documented before, which might be in part because its campaigns are highly targeted.

After analyzing the way in which Netrepser's command-and-control server assigns unique tracking IDs to infections, the Bitdefender researchers believe that the attack group has compromised around 500 computers to date. The vast majority of those systems belong to government agencies and organizations, indicating that Netrepser's goal is cyberespionage, not financially motivated cybercrime.

Bitdefender declined to disclose the countries whose government agencies have been targeted, but some of the spear-phishing emails sent by the cyberespionage group contained malicious Microsoft Office documents with Russian names and text. This doesn't necessarily limit attacks to Russia, because the Russian language is used in many former Soviet Union member countries.

The rogue documents had malicious macros embedded in them and contained instructions for users to allow the execution of that code. This is a common malware distribution technique that has been used in many attacks over the past few years.

Once executed, the macros drop an obfuscated JavaScript file with a .JS or .JSE extension that is executed natively on Windows through the Windows Script Host (WScript.exe). The code also creates registry start-up entries or scheduled tasks, depending on the Windows version, to ensure that the JS or JSE script is executed after every system reboot.

JavaScript code makes up the core of Netrepser's malware platform. It handles communication with the command-and-control server and downloads additional components based on commands received from it. It can also execute shell commands via cmd.exe to get information about the system, list running processes or enumerate files in directories.

The malware's modules are actually free tools used by system administrators. For example, Netrepser downloads and installs the WinRAR archiving utility, which it then uses to compress and password-protect stolen information before extracting it from an infected computer.

It also uses several utilities developed by a company called NirSoft, including its Email Password Recovery and IM Password Recovery tools. These tools can be used to recover forgotten passwords, but Netrepser uses them to steal account credentials from email and instant messaging applications.

Another NirSoft tool, called WebBrowserPassView, is used to extract passwords stored inside browsers, while the sdelete utility that's part of the Windows Sysinternals package is used to securely wipe files.

The Netrepser malware can also download and install a keylogger and steal files stored on the computer. Ultimately, it has all the features that one would expect to find in a malware program designed for information theft.

While the NirSoft programs are not inherently malicious, they've been abused by cybercriminals in the past, so many antivirus and security programs detect them as potentially risky applications. To avoid such detections, the Netrepser attackers modify the utilities before deploying them by using a custom binary packing technique that the Bitdefender researchers haven't seen before.

"By relying on readily-available tools for high-level cyber espionage, the threat actor behind Netrepser not only minimized its development and operational costs, but also made sure that the attack cannot be attributed to known threat actors or nation states," said Bogdan Botezatu, a senior e-threat analyst at Bitdefender, via email.

Moreover, even if one of these tools is detected on a system, the organization's security team might dismiss the alert as a false positive or a case where an administrator or user attempted to troubleshoot an IT issue, rather than a serious malware incident that needs investigating, Botezatu said.

The use of malicious scripts rather than binary malware is a trend. Last year, security researchers found a file-encrypting ransomware program called RAA written entirely in JavaScript and executed through the Windows Script Host.

Over the past year there's also been a wave of attacks that heavily rely on PowerShell, a powerful scripting language built into Windows that's used to automate system administration tasks.

The use of standard Windows utilities and third-party dual-use tools like Meterpreter and Mimikatz in attacks is also increasingly common. Documents leaked in March by WikiLeaks also showed that well-funded intelligence agencies like the CIA intentionally repurpose bits of open-source code in their cyber operations and even techniques and components from known malware. Such false flag operations are intended to throw malware analysts on false leads and complicate attribution efforts.

To block JavaScript-based attacks on Windows, organizations can enforce the use of digitally-signed scripts or disable the Windows Script Host entirely on computers if it's not needed.

Join the PC World newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Lucian Constantin

IDG News Service
Show Comments

Most Popular Reviews

Latest Articles


PCW Evaluation Team

Matthew Stivala

HP OfficeJet 250 Mobile Printer

The HP OfficeJet 250 Mobile Printer is a great device that fits perfectly into my fast paced and mobile lifestyle. My first impression of the printer itself was how incredibly compact and sleek the device was.

Armand Abogado

HP OfficeJet 250 Mobile Printer

Wireless printing from my iPhone was also a handy feature, the whole experience was quick and seamless with no setup requirements - accessed through the default iOS printing menu options.

Azadeh Williams

HP OfficeJet Pro 8730

A smarter way to print for busy small business owners, combining speedy printing with scanning and copying, making it easier to produce high quality documents and images at a touch of a button.

Andrew Grant

HP OfficeJet Pro 8730

I've had a multifunction printer in the office going on 10 years now. It was a neat bit of kit back in the day -- print, copy, scan, fax -- when printing over WiFi felt a bit like magic. It’s seen better days though and an upgrade’s well overdue. This HP OfficeJet Pro 8730 looks like it ticks all the same boxes: print, copy, scan, and fax. (Really? Does anyone fax anything any more? I guess it's good to know the facility’s there, just in case.) Printing over WiFi is more-or- less standard these days.

Ed Dawson

HP OfficeJet Pro 8730

As a freelance writer who is always on the go, I like my technology to be both efficient and effective so I can do my job well. The HP OfficeJet Pro 8730 Inkjet Printer ticks all the boxes in terms of form factor, performance and user interface.

Michael Hargreaves

Windows 10 for Business / Dell XPS 13

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?