Dark Reading is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them.Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

ABTV

5/30/2019
08:00 AM
Larry Loeb
Larry Loeb
Larry Loeb
50%
50%

'NanshOu' China-Based Attack Uses APT-Like Techniques to Infect Servers Worldwide

Breached machines include more than 50,000 servers belonging to companies in the healthcare, telecommunications, media and IT sectors.

During the past two months, the Guardicore Labs team says that it has been following a China-based campaigntrying to infect Windows MS-SQL and PHPMyAdmin servers worldwide.

They observed that the breached machines included over 50,000 servers belonging to companies in the healthcare, telecommunications, media and IT sectors. The servers were infected with malicious payloads which then dropped a crypto-miner and -- this is the interesting part of it -- installed a sophisticated kernel-mode rootkit to prevent the malware from being terminated.

This attack -- they call it NanshOu -- leverages some techniques that have often been seen in advanced persistence threats (APTs) such as fake certificates and privilege escalation exploits.

They first found the attacks, which had a source IP address in South Africa, in April. They were all hosted by an ISP named VolumeDrive. The same process was seen in all the attacks, ranging from breaching to post-compromise.

Using this discovered pattern and looking back, they found evidence of attacks starting on February 28 with over 700 new victims per day. Guardicore found 20 versions of malicious payloads that were used in the overall attack campaigns. New payloads were seen to be created at least once a week and then used immediately after their creation time.

The attacks began with authentication attempts to a MS-SQL server using known and common credentials. This credential-stuffing approach eventually led to a successful login with administrative privileges thrown in for good measure.

The attacker then configured server settings to allow a "smooth" and errorless attack flow. The attacker's servers were all running HTTP File Server (HFS) and serving files of different types.

Three major functional units were seen in the attack: 1. Port scanner known since 2014. It was used to detect MS-SQL servers by scanning IP addresses and checking whether typical MS-SQL ports were open. Scanning results were then fed to the brute-force module.

2. MS-SQL brute-force tool. The attacker attempted to login to each MS-SQL server using tens of thousands of common credentials. If the authentication succeeds then the server's address, username and password are saved to a file for future use.

3. Remote Code Executor. Carries out the breaching process through the use of a script and an executable.

The attack continues with a privilege escalation using the Apolmy exploit and it affects both Desktop and Server versions of Windows (XP to 8.1 and 2003 to 2012 R2, respectively). The executable used to do this will run any program with SYSTEM privileges. It copies the SYSTEM process access token to its own process. With that token, the exploiting process runs the payload with full control over the victim machine.

Another exploit using SetDebugPriviege has also been seen in use.

The attack goes out and gets a payload a wrapper which has several functionalities:

  • Execute the crypto-currency miner;
  • Create persistency by writing registry run-keys;
  • Protect the miner process from termination using a kernel-mode rootkit;
  • Ensure the miner's continuous execution using a watchdog mechanism. Unlike many other malicious drivers, the driver for it is protected and obfuscated.

It creates a device named SA6482, allowing processes to communicate with it. The device receives process IDs (PIDs) meant to be protected -- in this case, the miner PID.

This kernel-leveraging driver has been previously seen used in a past Chinese APT to target various companies. Other tools used in the attacks suggest that they were originally APT-level hacks that have now been used for non-state sponsored efforts -- sort of like a Chinese Shadow Brokers situation.

Guardicore thinks that because of various typos and mistakes made in the attack that this was not a thoroughly tested operation. But it shows that common passwords still comprise the weakest link in today's attack flows.

— Larry Loeb has written for many of the last century's major "dead tree" computer magazines, having been, among other things, a consulting editor for BYTE magazine and senior editor for the launch of WebWeek.

Comment  | 
Print  | 
More Insights
Comments
Newest First  |  Oldest First  |  Threaded View
Edge-DRsplash-10-edge-articles
I Smell a RAT! New Cybersecurity Threats for the Crypto Industry
David Trepp, Partner, IT Assurance with accounting and advisory firm BPM LLP,  7/9/2021
News
Attacks on Kaseya Servers Led to Ransomware in Less Than 2 Hours
Robert Lemos, Contributing Writer,  7/7/2021
Commentary
It's in the Game (but It Shouldn't Be)
Tal Memran, Cybersecurity Expert, CYE,  7/9/2021
Register for Dark Reading Newsletters
White Papers
Video
Cartoon
Current Issue
How Enterprises Are Assessing Cybersecurity Risk in Today's Environment
The adoption of cloud services spurred by the COVID-19 pandemic has resulted in pressure on cyber-risk professionals to focus on vulnerabilities and new exposures that stem from pandemic-driven changes. Many cybersecurity pros expect fundamental, long-term changes to their organization's computing and data security due to the shift to more remote work and accelerated cloud adoption. Download this report from Dark Reading to learn more about their challenges and concerns.
Flash Poll
Twitter Feed
Dark Reading - Bug Report
Bug Report
Enterprise Vulnerabilities
From DHS/US-CERT's National Vulnerability Database
CVE-2021-46547
PUBLISHED: 2022-01-27
Cesanta MJS v2.20.0 was discovered to contain a SEGV vulnerability via /usr/local/bin/mjs+0x2c17e. This vulnerability can lead to a Denial of Service (DoS).
CVE-2021-46548
PUBLISHED: 2022-01-27
Cesanta MJS v2.20.0 was discovered to contain a SEGV vulnerability via add_lineno_map_item at src/mjs_bcode.c. This vulnerability can lead to a Denial of Service (DoS).
CVE-2021-46549
PUBLISHED: 2022-01-27
Cesanta MJS v2.20.0 was discovered to contain a SEGV vulnerability via parse_cval_type at src/mjs_ffi.c. This vulnerability can lead to a Denial of Service (DoS).
CVE-2021-46550
PUBLISHED: 2022-01-27
Cesanta MJS v2.20.0 was discovered to contain a SEGV vulnerability via free_json_frame at src/mjs_json.c. This vulnerability can lead to a Denial of Service (DoS).
CVE-2021-46553
PUBLISHED: 2022-01-27
Cesanta MJS v2.20.0 was discovered to contain a SEGV vulnerability via mjs_set_internal at src/mjs_object.c. This vulnerability can lead to a Denial of Service (DoS).