Posts

GitLab XSS Via Autocomplete Results

Overview

The SonicWall Capture Labs threat research team became aware of a cross-site scripting vulnerability in GitLab, assessed its impact and developed mitigation measures. GitLab, an open-source code-sharing platform, published an advisory on this vulnerability affecting GitLab CE/EE in all versions starting from 16.7 to 16.8.6, 16.9 before 16.9.4 and 16.10 before 16.10.2. Identified as CVE-2024-2279, it allows remote threat actors to perform arbitrary actions on behalf of victims, earning a high CVSS score of 8.7. To mitigate this threat, GitLab users are strongly encouraged to upgrade their instances to the latest versions, as mentioned in the vendor advisory.

Technical Overview

This vulnerability arises due to a flaw in the input validation mechanism while displaying suggestions to the user using the feature called ‘autocomplete for issues reference’ in the rich text editor. Autocomplete characters are a handy way for users to enter field values into markdown fields swiftly. While creating and displaying an issue enforces the escape of the special characters, the same is missing when the user types the character “#” and the backend engine tries to autocomplete from the list of issues.

This enables an attacker with access to ‘issues’ in the project to create an ‘issue’ using a crafted payload in the title field, leading to stored cross-site scripting. The exploit payload triggers when a victim is trying to mention any issue in the textbox using the autocomplete character #, which leads to an automatic execution of arbitrary action specified in the payload. This could include actions such as requesting a resource from the attacker-controlled server.

An escape method from the Lodash library is used to address this vulnerability, as seen in the related diff between version 16.10.1 and 16.10.2 in Figure 1. This method replaces special characters like &, <, >, “, and ‘ with their corresponding HTML entities before adding them to the Document Object Model (DOM).

Figure 1: Utilization of the escape method to resolve the issue

Triggering the Vulnerability

Leveraging this XSS vulnerability requires the attacker to meet the prerequisites below.

  • The attacker must have network access to the target vulnerable system along with the rights to create the ‘issue’.
  • The attacker must create an issue with a malformed payload. For instance, Malicious issue <img src=”http[:]//<attacker_controlled_server>/x.svg”>. This payload will load images from the server if the vulnerability is present.
  • The victim must try to mention any issue using the autocomplete character #.

Exploitation

While the steps to trigger the vulnerability are straightforward, it can test the attacker’s patience since the exploitation requires the victim to try to mention any issue using the rich text editor, to be specific.

To begin with, the issue needs to be created with the crafted payload as seen in Figure 2. The attacker needs to host the x.svg image file at the server specified in the payload.

Figure 2: Malicious issue creation

The created issue will be listed as shown in Figure 3.

Figure 3: Issues list

When a user tries to refer to any issue by typing # in the rich text box, for instance, in the comment box of any other issue, the payload will be triggered. The exploitation can be verified by checking the access logs of the web server, where the access request on behalf of the victim can be seen, as shown in Figure 4.

Figure 4: Triggering XSS

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: 4383 GitLab Autocomplete Results XSS
  • IPS: 4385 GitLab Autocomplete Results XSS 2

Remediation Recommendations

GitLab users are strongly encouraged to upgrade their instances to the latest versions as mentioned in the vendor advisory.

Relevant Links

Analysis of Native Process CLR Hosting Used by AgentTesla

Overview

SonicWall Capture Labs threat research team has observed fileless .Net managed code injection in a native 64-bit process.  Native code or unmanaged code refers to low-level compiled code such as C/C++.  Managed code refers to code that is written to target .NET and will not work without the CLR (Microsoft .NET engine) runtime libraries. The injected code belongs to AgentTesla malware.

Technical Analysis

The initial infection vector is a Word document that the client received as an email attachment. Upon opening this document, it will ask the user to enable a VBA macro. If enabled, this VBA macro downloads a 64-bit executable from the internet and executes it.

The downloaded binary is a 64-bit, Rust-compiled binary. We are focusing on the techniques used by this binary to inject the malicious AgentTesla payload into its own process memory using CLR Hosting.

The following are details of the 64-bit downloaded executable file.

MD5 : 4521162D45EFC83FA76C4B5C0D405265

SHA256 :  F00ED06A1D402ECF760EC92F3280EF6C09E76036854ABACADCAC9311706ED97D

URL from which 64-bit executable downloaded:

https[:]//New-Coder[.]cc/Users/signed_20240329011751156[.]exe

Disabling Event Tracing for Windows (ETW)

On execution of the Rust binary, it patches the “EtwEventWrite” API from NTDLL using the NtProtectVirtualMemory, WriteProcessMemory and FlushInstructionCache APIs.

Figure 1:  After the malware patches the “EtwEventWrite” API

This 64-bit malware process downloads an encoded shellcode from the following URL which contains the AgenetTesla payload.

URL of the shellcode:

https[:]//New-Coder[.]cc/Users/shellcodeAny_20240329011339585[.]bin

Next, the malware starts the execution of the downloaded shellcode using the “EnumSystemLocalesA” API by passing the address of the shellcode to the API as the callback function argument.

Figure 2: Moved shellcode from read-write memory to executable memory and starts its execution

The shellcode parses PEB and PEB_LDR_DATA to resolve the API dynamically. It will resolve the VirtualAlloc, VirtualFree, and RtlExitUserProcess APIs using an API hashing technique.

Next, the shellcode allocates read-write memory using the “VirtualAlloc” API and moves 0x3E3C0 bytes from the shellcode to the allocated memory.  These bytes are the encoded AgentTesla payload.

Figure 3: Moved shellcode data in read-write memory and starts decryption routine

As shown in Figure 3 above, the first 4bytes (DWORD) are the size of encoded data followed by encoded data.

Next, it proceeds to decrypt the payload. The shellcode uses a customized decryption routine where it performs single-byte XOR decryption in a loop, and for every iteration, it decrypts 0x10 bytes in the payload with a 0x10-byte encryption key. In a decryption loop, every time the malware uses a different encryption key derived from a combination of XOR and arithmetic operations. It decrypts the 0x3E184 bytes of the memory buffer to get the final payload.

Figure 4: Single-byte XOR decryption

Next, the shellcode reads the DLL name array, which contains the names of DLLs that are required for the malware to perform its operation. This array is “ole32;oleaut32;wininet;mscoree;shell32”.

The shellcode parses the PEB structure to check for the presence of the above-mentioned DLLs in the loaded modules list and loads the DLL using the “LoadLibraryA” API if they are not present.

Once the required DLLs are loaded into memory, it resolves a few more APIs such as “VirtualProtect”, “SafeArrayCreate”, “CLRCreateInstance” etc., using the API Hashing technique.

AMSI Bypass Using Memory Patching

Next, the shellcode patches the “AmsiScanBuffer” and “AmsiScanString” API, as shown below.

Figure 5: “AmsiScanBuffer” API after patching

Figure 6: “AmsiScanString” API after patching

Disabling Event Tracing (2nd time)

We have observed the second time patching in shellcode to disable Event Tracing, this might be to confirm the patching continues. It patches “EtwEventWrite” API with a single byte “0xCC” (return instruction).

Next, the shellcode starts CLR hosting.

These are the steps required to perform CLR Hosting, in order:

  • Create a CLR MetaHost instance:

ICLRMetaHost* pMetaHost = NULL;

CLRCreateInstance(CLSID_CLRMetaHost, IID_ICLRMetaHost, (LPVOID*)&pMetaHost);

  • Enumerate the installed runtimes:

pMetaHost->EnumerateInstalledRuntimes(&installedRuntimes);

Enumerate through runtimes and try to locate a specific dotnet version installed on the system.

One has to use “GetVersionString” method from the ICLRRuntimeInfo interface to find the supported .NET Framework version.  This .NET Framework version string will be passed to the GetRuntime API.

  • Get RuntimeInfo using “GetRuntime”:

ICLRRuntimeInfo* runtimeInfo = NULL;

pMetaHost->GetRuntime(sz_runtimeVersion, IID_ICLRRuntimeInfo, (LPVOID*)&runtimeInfo);

  • Get ICorRuntimeHost interface:

ICorRuntimeHost Interface allows more control over the managed runtime from the native code, It can be retrieved using ICLRRuntimeInfo::GetInterface

ICorRuntimeHost* pCorRuntimeHost =NULL;

runtimeInfo->GetInterface(CLSID_CorRuntimeHost,IID_ICorRuntimeHost,(LPVOID*)& pCorRuntimeHost);

  • Retrieve the default AppDomain for the current process:

ICorRuntimeHost interface allows retrieval of the default AppDomain for the current process.

IUnknown* appDomainThunk;

pCorRuntimeHost->GetDefaultDomain(&appDomainThunk);

_AppDomain* defaultAppDomain = NULL;

appDomainThunk->QueryInterface(IID_AppDomain, &defaultAppDomain);

  • Create SafeArray:

we must create SafeArray and copy the MSIL payload to this SafeArray since we can’t provide an unmanaged byte array to the “Load_3” method which loads the assembly into the app domain.

SAFEARRAYBOUND bounds[1];

bounds[0].cElements = sizeof (rawAssemblyByteArray);

bounds[0].lLbound = 0;

SAFEARRAY* safeArray = SafeArrayCreate(VT_UI1, 1, bounds);

SafeArrayLock(safeArray);

memcpy(safeArray->pvData, rawAssemblyByteArray, sizeof (rawAssemblyByteArray));

SafeArrayUnlock(safeArray);

  • Load the assembly to the AppDomain:

_AssemblyPtr  managedAssembly = NULL;

defaultAppDomain->Load_3(safeArray, &managedAssembly)

  • Find an entry point to the loaded assembly:

_MethodInfoPtr  pMethodInfo = NULL;

managedAssembly->get_EntryPoint(&pMethodInfo)

  • Call the entry point:

pMethodInfo->Invoke_3(VARIANT(), SafeArray_Pointer_To_Arguement , &VARIANT())

The second parameter for the “Invoke_3” function is the SafeArray pointer to the arguments that will be passed to the MSIL payload.

ShellCode Executing Managed Code from a Native Code Using CLR hosting

Next, the shellcode calls the “CLRCreateInstance” API from mscoree.dll. The CLRCreateInstance API returns the new CLR MetaHost instance which will be used by malware to prepare a runtime so it can execute the MSIL AgentTesla payload in memory.

We can see in the below figure that multiple GUIDs have been used while retrieving CLR Hosting Interfaces, for e.g., to retrieve “ICorRuntimeHost” interface, it passed “CLSID_CorRuntimeHost” ,  “IID_ICorRuntimeHost” as an argument to the “GetInterface” API.

Figure 7: GUID used while CLR hosting

Next, the shellcode retrieves the ICorRuntimeHost interface and starts the CLR.

Figure 8: Call to GetInterface API to retrieve the ICorRuntimeHost interface

Figure 9: Call start method from ICorRuntimeHost interface to start CLR

Next, the shellcode retrieves the default app domain for the current process, as shown below.

Figure 10: Retrieve the default AppDomain for the current process.

Next, the shellcode creates SafeArray using the “SafeArrayCreate“ API by passing an argument as the size of managed code which is 0x3CC00. This SafeArray does have a pointer to the buffer where malware copies the MSIL payload.

Figure 11: Create a SafeArray and copy AgentTesla payload to it

Once a SafeArray was created, it could be loaded into an AppDomain with the “Load_3” method, this “Load_3” method gives a pointer to an Assembly object.

Figure 12:  Calls “Load_3” method to load the SafeArray into AppDomain

Next, the shellcode zeros out the MSIL payload from the region where it got decrypted then it destroys the SafeArray using the “SafeArrayDestroy” API.

Finally, the shellcode retrieves the entry point for the assembly and calls the “Invoke_3” method to start the 32-bit MSIL AgentTesla process within the context of the 64-bit native process.

Figure 13: Starts the MSIL AgentTesla process

Figure 14: Browser folder enumerated by 64-bit process once the fileless managed code injection has been done

In Figure 14 above, it looks like the 64-bit process is enumerating the browser folder, but its AgentTesla malware started its execution within the .NET engine.

SonicWall Protections

SonicWall Capture Labs provides protection against analyzed 64-bit executable (4521162d45efc83fa76c4b5c0d405265) as GAV: MalAgent.QZ (Trojan).

This threat was also detected by SonicWall Capture ATP w/RTDMI.

The initial infection vector which is a Word document file has been detected by SonicWall Capture ATP w/RTDMI.

IOCs

Document file:

MD5 : D99020C900069E737B3F4AB8C6947375

SHA256 : A6562D8F34D4C25A94313EBBED1137514EED90B233A94A9125E087781C733B37

64-bit downloaded executable:

MD5 : 4521162D45EFC83FA76C4B5C0D405265

SHA256 : F00ED06A1D402ECF760EC92F3280EF6C09E76036854ABACADCAC9311706ED97D

Shellcode blob:

MD5 : CD485BF146E942EC6BB51351FA42B1FF

SHA256 : 02C03E2E8CA28849969AE9A8AAA7FDE8A8B918B5A29548840367F3ECAC543E2D

Injected AgentTesla Payload:

MD5 : 6999D02AA08B56EFE8B2DBBD6FDC9A78

SHA256 : 7B6867606027BFCA492F95E2197A3571D3332D59B65E1850CB20AA6854486B41

URLs used by malware:

https[:]//New-Coder[.]cc/Users/signed_20240329011751156[.]exe  (64-bit exe downloaded)

https[:]//New-Coder[.]cc/Users/shellcodeAny_20240329011339585[.]bin (shellcode downloaded)

HydraCrypt Ransomware Targets Brazil and Charges $5,000 for Decryption

Overview

The SonicWall Capture Labs threat research team has recently been tracking ransomware known as HydraCrypt. HydraCrypt originates from the CryptBoss ransomware family and was first seen in early 2016.  The sample that we analyzed demands $5,000 in Bitcoin for file retrieval, but no contact information is given to ensure this or to negotiate a price.  This variant of HydraCrypt is aimed at Brazil and claims to have successfully attacked many Brazilian firms.

The malware is written in .NET.  We can see the inner workings of the malware after decompilation. It first checks if an instance of itself is already running by looking for a mutex matching a specific pattern:

After passing the above check, the malware injects itself into svchost.exe and then proceeds to encrypt files:

Files on the system are encrypted.  Each encrypted file is given a random four-alphanumeric-character file extension.  After file encryption, a file called “read_it.txt” is dropped into directories containing encrypted files.  It contains the following message in Portuguese and is displayed on the desktop using Notepad:

The message roughly translates to:

” … :::: Legal warning :::: …

Due to numerous flaws in the company Infomach, you have suffered this ransomware attack.

We were indignantly indignant to all the customers of this company. For, as a company that supposedly sells security, has no security?

They live deceiving their customers, offering Pentest and delivering vulnerabilities scanner that solves nothing.

And another, besides selling cat by hare, like to entice the guys of IT. Giving goodies, taking to trips, paying dinners lunch anyway. If you are receiving this message, we suggest you look for a new Cyber security company most responsible.

This time our attack was very simple. Next time will lose everything: data, backup, and all your files will be leaked on the internet for everyone to download.

Infomach you are an amateur company that deceives your customers. Her owners is worth nothing. It is very rich selling dreams.

We did our homework, we studied all your steps to many, many years.

The price of the software is $ 5,000. Payment can be made only in bitcoin

 

Payment Information Amount: 0.08 BTC

Bitcoin Address: BC1QH2K3S6Z32V6787XN2QX4V655ZK5ZADP9ES4DTZ

Other customers who are exposed due to the incompetence of Infomach.

…. ”

A list of targeted directories can be seen in the code:

A list of targeted file extensions is also visible:

The malware takes several measures to disable system recovery:

An jpeg image is embedded in the malware file and is base64 encoded:

After being decoded and written to disk, it is set as the desktop wallpaper:

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

  • GAV: HydraCrypt.RSM_1(Trojan)

 

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

Atlassian’s Confluence Server Unauthenticated Remote Code Execution

Overview

The SonicWall Capture Labs threat research team became aware of a noteworthy vulnerability—an Unauthenticated Template Injection —in Atlassian Confluence platforms, assessed its impact and developed mitigation measures for it. Atlassian’s Confluence Server and Data Center published an advisory on this vulnerability affecting multiple Confluence releases. Confluence is a web-based corporate wiki software. Atlassian wrote Confluence in the Java programming language and it is utilized for collaboration, project management, process and quality management, and knowledge management.

This vulnerability is identified as CVE-2023-22527 and was assigned a critical CVSS score of 10.0.  Considering the sizeable user base, low attack complexity and publicly available exploit code(s) including a Metasploit module, Confluence users are strongly encouraged to upgrade their instances to the latest versions with utmost priority. According to ShadowServer, around 11,000 Atlassian Confluence instances are publicly exposed, and adversaries are scanning for vulnerable instances.

As per the advisory, the affected Confluence Data Center and Server versions are 8.0.x, 8.1.x, 8.2.x, 8.3.x, 8.4.x, and 8.5.0-8.5.3.

Technical Overview

This vulnerability allows threat actors to circumvent the authentication mechanism by sending a crafted request to the web server.

The primary condition that led to exploiting the vulnerability in Atlassian’s Confluence Server and Data Center is improper user input handling. As a result, attackers can leverage the injection of malicious templates without any authentication, leading to remote code execution. As Confluence is written in Java, OGNL expressions are associated with code. A specially crafted exploit that can inject an arbitrary OGNL object can execute Java code. When the application fails to validate and sanitize user input before using it in OGNL expressions, it may lead to an OGNL injection vulnerability. In OGNL injection attacks, nefarious actors input specially crafted strings containing OGNL expressions into user interfaces or input fields. When the application processes this input without proper validation, the injected OGNL expressions get executed within the application’s context. This can lead to various security issues, including authentication bypass, unauthorized access to sensitive data and remote code execution.

Triggering the Vulnerability

Within the Confluence server, it was observed that actual “views” are rendered using Velocity template files. To trigger the vulnerability, an attacker sends a POST request to “/template/aui/text-inline.vm”, demonstrating that including a .vm file helps get a hands-on unauthenticated attack surface to the Confluence instance. In this scenario, findValue is an OGNL expression that accepts a crafted string in $parameters that are not sanitized properly. As seen in Figure 2, using the OGNL expression #request[‘.KEY_velocity.struts2.context’].internalGet(‘ognl’) will grant access to the class  org.apache.struts2.views.jsp.ui.OgnlTool and calls the method Ognl.findValue(String, Object) method. Furthermore, in a comparison between the unpatched Confluence instance and the patched one, there is a .vm file named text-inline.vm. Figure 1 shows the text-inline.vm file code – the one that is deprecated in patched versions of Confluence.

Figure 1: text-inline.vm

Attackers can leverage this vm file to create a payload utilizing #parameters which pass arguments to the exec method, bypassing authentication and executing system commands.

Figure 2: CVE-2023-22527 OGNL payload

A crafted POST request sent to unpatched Confluence servers leads to OGNL template injection, which results in arbitrary command execution. By changing the payload parameter value, one can execute different commands remotely.

The attack request has the command id injected in the exec() function, as shown in Figure 3. Once this crafted request is sent, the response from the server includes the user id(uid), group id (gid), and groups from the Confluence server.

Figure 3: CVE-2023-22527 attack request

Exploiting the Vulnerability

The working PoC is an exploit tool for Confluence servers vulnerable to CVE-2023-22527. It leads to RCE in vulnerable instances of Confluence data centers and servers. Using this, an attacker can execute arbitrary code on a vulnerable instance.

Figure 4: CVE-2023-22527 PoC

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: 2366 – Atlassian Confluence Data Center and Server SSTI
  • IPS: 4249 – Atlassian Confluence Data Center and Server SSTI 2

Remediation Recommendations

Considering the severe consequences of this vulnerability and the trending of unauthenticated nefarious activists trying to get Confluence Data Center & Confluence Server access using the exploit in the wild, users are strongly encouraged to upgrade their instances as published in the vendor advisory.

Relevant Links

Microsoft Security Bulletin Coverage for April 2024

Overview
Microsoft’s April 2024 Patch Tuesday has 147 vulnerabilities, 68 of which are Remote Code Execution (RCE) vulnerabilities. The SonicWall Capture Labs threat research team has analyzed and addressed Microsoft’s security advisories for April 2024 and has produced coverage for 8 of the reported vulnerabilities.

Vulnerabilities with Detections

CVECVE TitleSignature
CVE-2024-26158Microsoft Install Service Elevation of Privilege VulnerabilityASPY 558 Exploit-exe exe.MP_378
CVE-2024-26209Microsoft Local Security Authority Subsystem Service Information Disclosure VulnerabilityASPY 557 Exploit-exe exe.MP_377
CVE-2024-26211Windows Remote Access Connection Manager Elevation of Privilege VulnerabilityASPY 560 Exploit-exe exe.MP_380
CVE-2024-26212DHCP Server Service Denial of Service VulnerabilityASPY 559 Exploit-exe exe.MP_379
CVE-2024-26218Windows Kernel Elevation of Privilege VulnerabilityASPY 561 Exploit-exe exe.MP_381
CVE-2024-26230Windows Telephony Server Elevation of Privilege VulnerabilityASPY 555 Exploit-exe exe.MP_376
CVE-2024-26234Proxy Driver Spoofing VulnerabilityASPY 554 Exploit-exe exe.MP_375
CVE-2024-26256Windows Compressed Folders (zip) Remote Code Execution VulnerabilityASPY 556 Malformed-File zip.MP.2

Release Breakdown

The vulnerabilities can be classified into the following categories:

For April there are 142 critical, 3 Important and 2 moderate vulnerabilities.

2024 Patch Tuesday Monthly Comparison

Microsoft tracks vulnerabilities that are being actively exploited at the time of discovery and those that have been disclosed publicly before the Patch Tuesday release for each month. The above chart displays these metrics as seen each month.

Denial of Service Vulnerabilities 

CVE-2024-20685Azure Private 5G Core Denial of Service Vulnerability
CVE-2024-26183Windows Kerberos Denial of Service Vulnerability
CVE-2024-26212DHCP Server Service Denial of Service Vulnerability
CVE-2024-26215DHCP Server Service Denial of Service Vulnerability
CVE-2024-26219HTTP.sys Denial of Service Vulnerability
CVE-2024-26254Microsoft Virtual Machine Bus (VMBus) Denial of Service Vulnerability
CVE-2024-29064Windows Hyper-V Denial of Service Vulnerability

Elevation of Privilege Vulnerabilities

CVE-2024-20693Windows Kernel Elevation of Privilege Vulnerability
CVE-2024-21324Microsoft Defender for IoT Elevation of Privilege Vulnerability
CVE-2024-21424Azure Compute Gallery Elevation of Privilege Vulnerability
CVE-2024-21447Windows Authentication Elevation of Privilege Vulnerability
CVE-2024-26158Microsoft Install Service Elevation of Privilege Vulnerability
CVE-2024-26211Windows Remote Access Connection Manager Elevation of Privilege Vulnerability
CVE-2024-26213Microsoft Brokering File System Elevation of Privilege Vulnerability
CVE-2024-26216Windows File Server Resource Management Service Elevation of Privilege Vulnerability
CVE-2024-26218Windows Kernel Elevation of Privilege Vulnerability
CVE-2024-26229Windows CSC Service Elevation of Privilege Vulnerability
CVE-2024-26230Windows Telephony Server Elevation of Privilege Vulnerability
CVE-2024-26235Windows Update Stack Elevation of Privilege Vulnerability
CVE-2024-26236Windows Update Stack Elevation of Privilege Vulnerability
CVE-2024-26237Windows Defender Credential Guard Elevation of Privilege Vulnerability
CVE-2024-26239Windows Telephony Server Elevation of Privilege Vulnerability
CVE-2024-26241Win32k Elevation of Privilege Vulnerability
CVE-2024-26242Windows Telephony Server Elevation of Privilege Vulnerability
CVE-2024-26243Windows USB Print Driver Elevation of Privilege Vulnerability
CVE-2024-26245Windows SMB Elevation of Privilege Vulnerability
CVE-2024-26248Windows Kerberos Elevation of Privilege Vulnerability
CVE-2024-28904Microsoft Brokering File System Elevation of Privilege Vulnerability
CVE-2024-28905Microsoft Brokering File System Elevation of Privilege Vulnerability
CVE-2024-28907Microsoft Brokering File System Elevation of Privilege Vulnerability
CVE-2024-28917Azure Arc-enabled Kubernetes Extension Cluster-Scope Elevation of Privilege Vulnerability
CVE-2024-29052Windows Storage Elevation of Privilege Vulnerability
CVE-2024-29054Microsoft Defender for IoT Elevation of Privilege Vulnerability
CVE-2024-29055Microsoft Defender for IoT Elevation of Privilege Vulnerability
CVE-2024-29056Windows Authentication Elevation of Privilege Vulnerability
CVE-2024-29989Azure Monitor Agent Elevation of Privilege Vulnerability
CVE-2024-29990Microsoft Azure Kubernetes Service Confidential Container Elevation of Privilege Vulnerability
CVE-2024-29993Azure CycleCloud Elevation of Privilege Vulnerability

Information Disclosure Vulnerabilities

CVE-2024-26172Windows DWM Core Library Information Disclosure  Vulnerability
CVE-2024-26207Windows Remote Access Connection Manager Information Disclosure Vulnerability
CVE-2024-26209Microsoft Local Security Authority Subsystem Service Information Disclosure Vulnerability
CVE-2024-26217Windows Remote Access Connection Manager Information Disclosure Vulnerability
CVE-2024-26220Windows Mobile Hotspot Information Disclosure Vulnerability
CVE-2024-26226Windows Distributed File System (DFS) Information Disclosure Vulnerability
CVE-2024-26255Windows Remote Access Connection Manager Information Disclosure Vulnerability
CVE-2024-28900Windows Remote Access Connection Manager Information Disclosure Vulnerability
CVE-2024-28901Windows Remote Access Connection Manager Information Disclosure Vulnerability
CVE-2024-28902Windows Remote Access Connection Manager Information Disclosure Vulnerability
CVE-2024-29063Azure AI Search Information Disclosure Vulnerability
CVE-2024-29992Azure Identity Library for .NET Information Disclosure Vulnerability

 Remote Code Execution Vulnerabilities 

CVE-2024-20678Remote Procedure Call Runtime Remote Code Execution Vulnerability
CVE-2024-21322Microsoft Defender for IoT Remote Code Execution Vulnerability
CVE-2024-21323Microsoft Defender for IoT Remote Code Execution Vulnerability
CVE-2024-21409.NET, .NET Framework, and Visual Studio Remote Code Execution Vulnerability
CVE-2024-26179Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability
CVE-2024-26193Azure Migrate Remote Code Execution Vulnerability
CVE-2024-26195DHCP Server Service Remote Code Execution Vulnerability
CVE-2024-26200Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability
CVE-2024-26202DHCP Server Service Remote Code Execution Vulnerability
CVE-2024-26205Windows Routing and Remote Access Service (RRAS) Remote Code Execution Vulnerability
CVE-2024-26208Microsoft Message Queuing (MSMQ) Remote Code Execution Vulnerability
CVE-2024-26210Microsoft WDAC OLE DB Provider for SQL Server Remote Code Execution Vulnerability
CVE-2024-26214Microsoft WDAC SQL Server ODBC Driver Remote Code Execution Vulnerability
CVE-2024-26221Windows DNS Server Remote Code Execution Vulnerability
CVE-2024-26222Windows DNS Server Remote Code Execution Vulnerability
CVE-2024-26223Windows DNS Server Remote Code Execution Vulnerability
CVE-2024-26224Windows DNS Server Remote Code Execution Vulnerability
CVE-2024-26227Windows DNS Server Remote Code Execution Vulnerability
CVE-2024-26231Windows DNS Server Remote Code Execution Vulnerability
CVE-2024-26232Microsoft Message Queuing (MSMQ) Remote Code Execution Vulnerability
CVE-2024-26233Windows DNS Server Remote Code Execution Vulnerability
CVE-2024-26244Microsoft WDAC OLE DB Provider for SQL Server Remote Code Execution Vulnerability
CVE-2024-26252Windows rndismp6.sys Remote Code Execution Vulnerability
CVE-2024-26253Windows rndismp6.sys Remote Code Execution Vulnerability
CVE-2024-26256libarchive Remote Code Execution Vulnerability
CVE-2024-26257Microsoft Excel Remote Code Execution Vulnerability
CVE-2024-28906Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28908Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28909Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28910Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28911Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28912Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28913Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28914Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28915Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28926Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28927Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28929Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28930Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28931Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28932Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28933Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28934Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28935Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28936Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28937Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28938Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28939Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28940Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28941Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28942Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28943Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28944Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-28945Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29043Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29044Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29045Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29046Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29047Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29048Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29050Windows Cryptographic Services Remote Code Execution Vulnerability
CVE-2024-29053Microsoft Defender for IoT Remote Code Execution Vulnerability
CVE-2024-29066Windows Distributed File System (DFS) Remote Code Execution Vulnerability
CVE-2024-29982Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29983Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29984Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29985Microsoft OLE DB Driver for SQL Server Remote Code Execution Vulnerability
CVE-2024-29988SmartScreen Prompt Security Feature Bypass Vulnerability

 Security Feature Bypass Vulnerabilities 

CVE-2024-20665BitLocker Security Feature Bypass Vulnerability
CVE-2024-20669Secure Boot Security Feature Bypass Vulnerability
CVE-2024-20688Secure Boot Security Feature Bypass Vulnerability
CVE-2024-20689Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26168Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26171Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26175Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26180Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26189Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26194Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26228Windows Cryptographic Services Security Feature Bypass Vulnerability
CVE-2024-26240Secure Boot Security Feature Bypass Vulnerability
CVE-2024-26250Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28896Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28897Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28898Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28903Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28919Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28920Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28921Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28922Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28923Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28924Secure Boot Security Feature Bypass Vulnerability
CVE-2024-28925Secure Boot Security Feature Bypass Vulnerability
CVE-2024-29061Secure Boot Security Feature Bypass Vulnerability
CVE-2024-29062Secure Boot Security Feature Bypass Vulnerability

 Spoofing Vulnerabilities 

CVE-2024-20670Outlook for Windows Spoofing Vulnerability
CVE-2024-26234Proxy Driver Spoofing Vulnerability
CVE-2024-26251Microsoft SharePoint Server Spoofing Vulnerability

Cryptominer Poses as Fake Java Utility

Overview

The SonicWall Capture Labs threat research team analyzed a malware purporting to be a Java utility. It arrives as an installer for Java Access Bridge, but ultimately installs the popular open-source cryptominer, XMRig.

Infection Cycle

The sample arrives as a Windows installer package (msi) file using the following file name:

  • JavaAccessBridge-64.msi

Figure 1: Malware installer’s file properties showing Java Access Bridge

Upon execution, a typical installation window pops up.

Figure 2: Fake Java Access Bridge installation window

Meanwhile, the following files are created in these directories:

  • /User/Public/Music/ContentStore.bat
  • /User/Public/Music/DMIDD11.tmp (certificate file)
  • /User/Public/Music/DMIDD12.tmp (certificate file)
  • /User/Public/Music/DMIDD13.tmp (certificate file)
  • /User/Public/Music/DMIDD14.tmp (certificate file)
  • /User/Public/Videos/JavaAccessBridge-64.exe (main XMRig executable)
  • /User/Public/Videos/config.json (miner config file)
  • /User/Public/Videos/WinRing0x64.sys (WinRing0 driver file used by XMRig)

The Windows command prompt utility is then spawned to execute the batch file name ContentStore.bat which runs the commands seen on the screenshot below.

Figure 3: Contents of the batch file ContentStore.bat

The .tmp files created are all certificate files as shown in the screenshot below.

Figure 4: DMIDD14.tmp contains a certificate

The main cryptominer file is then executed via the command line.

Figure 5: Initial execution of JavaAccessBridge-64.exe via the command line.

XMRig is ran using the configuration in the config.json file.

Figure 6: Configuration in the config.json file

Figure 7: XMRig window running in the background

We urge our users to only use official and reputable websites as their source for software downloads. Always be vigilant and cautious when installing software programs – particularly if you are not certain of the source.

SonicWall Protections

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

  • GAV: Malagent.JAV (Trojan)
  • GAV: XMRig.XMR_4 (Trojan)

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

Multiple Remote Code Execution Vulnerabilities in JumpServer

Overview

The SonicWall Capture Labs threat research team became aware of a couple of remote code execution vulnerabilities in JumpServer, assessed their impact and developed mitigation measures. JumpServer is an open-source bastion host and a professional operation and maintenance security audit system with a substantial presence in the China region. A bastion host is a specialized computer, intentionally exposed on a public network, designed to withstand attacks on a network named after a military fortification.

Identified as CVE-2024-29201 and CVE-2024-29202, JumpServer before version 3.10.7 allows low-privileged threat actors to execute arbitrary code within the Celery container with root privileges, earning a critical CVSS score of 9.9.

Technical Overview

CVE-2024-29201

This vulnerability arises due to a flaw in the input validation mechanism in JumpServer’s Ansible (An IT automation engine), which allows a threat actor with a low-privileged user account to execute arbitrary code in the context of a root user within one of its containers named ‘jms_celery’.

JumpServer enforces a mechanism to disallow the usage of a set of unsafe keywords to prevent users from running local injection commands while running a playbook job, as seen in Figure 1 (left). However, it can be circumvented using the Unicode representation of the character in place of the actual character, for instance, ‘\u0064’ instead of the character ‘d’. Figure 1 (right) illustrates an example of a malicious template that could exploit this vulnerability by running the command specified in the ‘shell’ field. It can be used to create a playbook job and then run a job to execute a specified command.

Figure 1: The set of defined unsafe keywords (left) and the playbook template to bypass validation (right).

CVE-2024-29202

This vulnerability allows the threat actor with a low-privileged user account to inject a malicious Jinja2 template in JumpServer’s Ansible that leads to the execution of arbitrary code within the ‘jms_celery’ container with root privileges. The malicious template, as seen in Figure 2 can be used to create a playbook job and then run the same to execute the desired command.

Figure 2: Malicious jinja2 template

Triggering the Vulnerability

Leveraging the vulnerabilities mentioned above requires the attacker to meet the following prerequisites:

  • The attacker must have network access to the target vulnerable system along with the low-privileged user account.
  • The attacker must have permission to access at least a single valid asset.
  • A playbook needs to be fabricated using any of the above templates from the ‘Job > Template > Playbook manage’ section.
  • A playbook job needs to be created from the ‘Job > Job list’ section, leveraging the playbook created in the previous step.
  • The created job needs to be run.

Exploitation

While steps to trigger the vulnerability look tricky, the exploitation is straightforward. Since the Celery container runs with the root privileges, it yields the threat actor database access and access to the sensitive information across all the managed assets, such as hosts, devices, database, cloud service, web and GPT. Additionally, considering the crucial functionality of the jump host, it can lead to the exposure and compromise of the private network. Achieving remote code execution by leveraging the discussed vulnerabilities is demonstrated in the video below.

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: 19849 JumpServer Ansible Playbook Input Validation Bypass
  • IPS: 19850 JumpServer Ansible Playbook Jinja2 Template Injection

Remediation Recommendations

Considering the pivotal position of a bastion host on a network, JumpServer users are strongly encouraged to upgrade their instances to the latest version (v3.10.7). If one cannot upgrade immediately, then the feature ‘Operation Center’ can be disabled temporarily by visiting System Settings > Features > Task Center.

Relevant Links

Chaos Ransomware Operator Gives Up Decryption Tool for Free

Overview

The SonicWall CaptureLabs threat research team have been recently tracking ransomware created using the Chaos ransomware builder.  The builder appeared in June 2021 and has been used by many operators to infect victims and demand payment for file retrieval.  The sample we analyzed lead us to a conversation with the operator who freely gave up the decryptor program.

Infection Cycle

Upon initial infection, files on the system are encrypted and given a random filename extension made up of 4 alphanumeric characters:

Figure 1: Encrypted files

hahaha.txt is written to all directories containing encrypted files.  It contains the following message:

Figure 2: Ransom note

The code is written in .NET and easy to decompile using an open source decompiler.

The decompiled code shows a list of target directories:

Figure 3: Targeted directories

It contains a list of file extensions to target:

Figure 4: Targeted file extensions

It disables system recovery modes and deletes shadow copies and system backups:

Figure 5: Disabling system recovery

An image is embedded in the executable file and is base64 encoded:

Figure 6: Image base64 encoded

Figure 7: Converting image from base64

After base64 decoding, the following image is displayed on the desktop background:

Figure 8: Ransom desktop image

The ransom note states “pls write to discord kakoy_to_chel_ on discord”. We contacted the operator on discord and had the following conversation:

Figure 9: Initial conversation with operator

decryptor-decrypter.zip contains the following files:

Figure 10: Contents of zip file

It contains the private key for decrypting files:

Figure 11: Private key for decryptor

We ask the operator why they created the malware but their intentions are unclear:

Figure 12: Conversation with operator continued

Figure 13: Asking the operator about their reason for creating the malware

The operator confirms that Chaos ransomware builder was used to create the malware:

Figure 14: The operator confirms the use of the Chaos Ransomware Builder

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

  • GAV: Chaos.RSM(Trojan)

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

 

Updated StrelaStealer Targeting European Countries

Overview

SonicWall Capture Labs threat research team has observed an updated variant of StrelaStealer. StrelaStealer is an infostealer malware known for targeting Spanish-speaking users and focuses on stealing email account credentials from Outlook and Thunderbird. StrelaStealer was reported in the wild in early November 2022. StrelaStealer has been updated with an obfuscation technique and anti-analysis technique.

Technical Analysis

MD5: 1E37C3902284DD865C20220A9EF8B6A9

SHA256: F2D7CF39392D394D6CCD0F9372DB7D486D4CB2BB6C3BBFD0D8BFBB6117A5E211

This updated version of malware delivered via JavaScript comes in archive files as attachments in emails. The initial vector is JavaScript which will drop the 64-bit executable file in the %userprofile% folder and execute the malware process. We have observed that StrelaStealer is being delivered as a 64-bit exe as well as a DLL via JavaScript. We are explaining the analysis for the 64-bit executable in this blog. This 64-bit executable is a wrapper that will act as a loader for the actual payload.

In the main 64-bit executable file, the data section has an encryption key, and the size of the encryption key is 0x2714 bytes. The encoded payload is embedded in the data section at the end of the encryption key. The size of the payload is 0x1C600. A single-byte XOR encryption is performed to decrypt an encoded PE file from the data section.

Figure 1:  Encryption key started from 0x10th offset in the data section

Figure 2:  Obfuscated Jumps

Figure 3: Graph view for obfuscated function

Figure 4: Another graph view of the obfuscated function

Figure 5:  PEB parsing code fragments inside the jump code block

This obfuscation is quite effective. Anti-analysis techniques delay the execution, and the researcher has to search the code fragments inside the jump blocks, which is a tedious task.

Along with jump blocks and multiple loops, there are multiple dummy functions that are not doing anything but wasting time while analyzing the sample.

Figure 6: Dummy functions inside nested Jumps

Figure 7: Dummy functions

Figure 8: XOR decryption to decrypt the encoded payload

Once it decrypts the payload, it reads the encoded API string array at the end of the encoded payload embedded in the data section. Within the payload, the first DWORD is the size of the array and next is the API function array. This array is of size 0x52 bytes and the encryption key used earlier to decrypt the payload will also be used to decrypt the API array. The only difference between the decryption of the payload and the array  is malware uses an encryption key of size 0x52 bytes from the 4th offset of encryption key.

Figure 9: Encoded API array

Figure 10: Malware calculates the start offset of the encoded API string and starts decrypting it

Figure 11: API array after an XOR decryption

It accesses the PEB structure and parses it to get the list of loaded modules in process memory.

The following is an example of the instructions set to parse the PEB.

Figure 11B: Instructions

Here InLoadOrderModuleList is a doubly-linked list that contains the loaded modules for the process.

The malware parses this “InLoadOrderModuleList” to get the Imagebase address of kernel32.dll with the goal of resolving the VirutalAlloc API Then the malware will parse the PE structure of kernel32.dll to get the name of each exported function and matches them with the API string that got decrypted earlier in 0x52 byte array. If the API name matches the exported function name, then the malware will read the associated function RVA from the export directory and add it to the Imagebase of kernel32.dll,. Using this method, the malware resolves each API dynamically. It will resolve 4 APIs – here VirtualAlloc,  LoadLibraryA , GetProcAddress , and MessageBoxTimeoutA. Once its finished resolving the APIs, the malware will show the error massage box and then continue execution.

Now, the malware calls the “VirtualAlloc” API to allocate memory in the process and start its task as loader to load the actual payload.

  • The malware parses the PE file structure of the payload from the data section where previously it decrypted the PE file and read each section header one by one.
  • To map the process as per section alignment, it reads the virtual address of each section and adds it to the image base of the injected PE and copies each section of data to this offset in memory.
  • The malware will not copy the PE header to the injected PE, this has been done intentionally to evade detection from AV products.
  • It reads the relocation section and does the fixup as it gets loaded at the different base address in the memory.
  • It reads the import address table of the payload file from the data section region and resolves the API address dynamically using the “LoadLibraryA” and “GetProcAddress”  APIs and copies these all function pointers to the IAT of the injected payload.
  • When the injected PE file is ready for execution, it will read the RVA of the address from the entry point from the PE file in the data section and add the base address of the injected payload and redirect execution to the injected code.

Figure 12: Configuration setting for the payload

The injected payload is 64-bit executable file, it will call the “GetKeyboardLayout” API and check the lower words of the return value with the hardcoded values in binary. It tries to check if the keyboard layout is from the following countries. If it is, then the malware will continue its execution, otherwise it terminates itself.

LanguageLocation (or type)Language ID
GermanGermany0x0407
SpanishSpain0x040A
SpanishSpain0x0C0A
CatalanSpain0x0403
BasqueSpain0x042D
ItalianItaly0x0410
PolishPoland0x0415

Figure 13: Call to the “GetKeyboardLayout” API and check language identifiers

Now, the payload retrieves the computer name by calling the “GetComputerNameA” API and encrypts the first 4 bytes of the computer name string using single byte XOR encryption. The encryption key is “MIR24”, which is hardcoded in binary. It will create a Mutex with the name of this partially encrypted computer name string. If a Mutex already exists, it will terminate it.

Figure 14: Creating a Mutex and executing its core functionality to steal data from the infected machine

As we can see in Figure 14, it will execute the function which will steal confidential data from the infected machine.

Here, we have found two functions in the malware. The first is used to steal data from Mozilla Thunderbird, which is a free and open-source email client software. The other function is intended to steal data from Outlook.

  • It searches for the folder path “C:\Users\<username>\AppData\Roaming\Thunderbird\Profiles\”

All of your data such as messages, passwords and user preferences as well as changes made while you use Thunderbird are stored in a special folder called profile.

  • If it finds this folder path on the system, it will call the FindFirstFileAand FindNextFileA APIs to search for two files in the subdirectory. The first is “logins.json” (account and password) and the second is “key4.db” (password database).
  • It reads the data from both of these files and appends both files’ data one after another, starting network communication.
  • It establishes a connection to its server and prepares an HTTP post request with the user-agent “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36” and then exfiltrates this data to its server.

http[:]//45[.]9[.]74.12/server.php .

  • The server IP is hardcoded in binary which is “45.9.74[.]12”
  • Before sending data to the server, it will encrypt it with the single byte XOR encryption. The encryption key is hardcoded in binary which is “00ca8abe-6ab2-4b10-97c8-925934cf0423”

Figure 15: Searches for the “logins.json” and “key4.db” files from the profile folder

Figure 16: StrelaStealer is expecting the response from its server

We have analysed the second function statically where it reads the windows registry key, enumerates data from it and tries to locate the ‘IMAP User’, ‘IMAP Server’ and ‘IMAP Password’ values.

The IMAP Password contains the user password in encrypted form. The malware will call the Windows “CryptUnprotectData”  API to decrypt it.

The following registry key is enumerated to steal Outlook data:

“SOFTWARE\Microsoft\Office\16.0\Outlook\Profiles\Outlook\9375CFF0413111d3B88A00104B2A6676\”

Figure 17: Outlook registry key would have been enumerated to steal data from the infected machine

Figure 18: Network communication with server

The archive file cannot be found in any of the popular threat intelligence sharing portals like VirusTotal at the time of writing this blog.

Figure 19: File is not available on VirusTotal

This threat is detected by SonicWall Capture ATP w/RTDMI . Evidence of the detection by our RTDMI engine can be seen below in the Capture ATP report for this file.

Figure 20: Capture report

IOCs

Archive file
MD5: ca4797bf995c91864c8b290ebd4e1c7b
SHA256: 74f21472fed71aaccbd60b34615a8390725cbab6cb25bbc6a51bd723ff8bd01a

JavaScript (Initial vector)
Md5 : C235CE3765F9B1606BDA81E96B71C23B
SHA256 : E083662C896C47064FD47411D47459BF4B1CB26847B5D26AEDD7F9D701CABD43

Main 64-bit executable file
MD5 : 1E37C3902284DD865C20220A9EF8B6A9
SHA256 : F2D7CF39392D394D6CCD0F9372DB7D486D4CB2BB6C3BBFD0D8BFBB6117A5E211

Injected 64-bit Payload
MD5 : 95F51B48FB079ED4E5F3499D45B7F14E
SHA256 : C02BB26582576261645271763A17DE925C2D90D430E723204BAEC82030DC889A

Server IP : “45[.]9.74[.]12”

Progress Kemp LoadMaster Unauthenticated Command Injection Vulnerability

Overview

The SonicWall Capture Labs threat research team became aware of a noteworthy vulnerability — an Unauthenticated Command Injection — in Progress Kemp Loadmaster, assessed its impact and developed mitigation measures for it. Kemp Technologies’ LoadMaster, an application delivery controller and load balancer, published an advisory on this vulnerability affecting all LoadMaster releases after 7.2.48.1 and the LoadMaster Multi-Tenant (MT) VFNs. LoadMaster can be deployed on various platforms such as hardware, cloud and virtual machines. This vulnerability is identified as CVE-2024-1212 and was assigned a critical CVSS score of 9.8.  Considering the sizeable user base, low attack complexity and publicly available exploit code including a Metasploit module, LoadMaster users are strongly encouraged to upgrade their instances to the latest versions with utmost priority.

Technical Overview

This vulnerability allows threat actors to circumvent the authentication mechanism by sending a crafted request to the web server.

The conditions that led to the exploitation of the vulnerability in the Progress Kemp LoadMaster load balancer were:

  • Bypassing Disabled API Restrictions: It was possible to access the REST API, even when disabled, by crafting a specific request path and parameters. This bypass allowed researchers to reach critical functions that were supposed to be inaccessible with the API disabled.
  • Unauthenticated User Input Handling: The system did not properly validate or sanitize the “REMOTE_USER” and “REMOTE_PASS” environment variables, which were set based on user-provided basic authentication headers. This flaw allowed for the injection of arbitrary commands.
  • Command Injection via System Call: The lack of validation and sanitization led to constructing a command with user-controllable input that was then passed to a system() call. This behavior facilitated the execution of arbitrary commands on the system.
  • Exploiting Basic Authentication for Command Execution: By manipulating the base64-encoded authorization string sent in the HTTP headers, attackers could inject commands that the server would execute, enabling a direct path to command injection and system compromise.

Triggering the Vulnerability

The flaw is in the processing of the “/access/” RESTful API Interface to the LoadMaster.

Figure 1: LoadMaster CGI Bash Script

As seen in the code shared by RhinoSecurity Labs in Figure 1,  user input to the “/access/” API is directly put into a bash script leading to a critical vulnerability tracked as CVE-2024-1212. Before being passed to any function(s), the user input should be mandatorily parameterized and sanitized.

Leveraging this unauthenticated command injection vulnerability requires access to the vulnerable LoadMaster administrator web user interface. The publicly available also shows the possibility of privilege escalation once the shell is obtained.

An example request to trigger the vulnerability would look like this http[:]//target-ip:port/access/set?param=enableapi&value=1 with the Authorization parameter containing the command injection, as shown in Figure 2.

Figure 2: Triggering CVE-2024-1212 PoC packet capture

Notice the command injection is base64 encoded. When decoded, the attacker is sending the ‘;echo ‘[S]’hostname;echo’[E]’;’:anything as shown in Figure 3.

Figure 3: Decoded-authorization-header

The default admin configuration of a LoadMaster instance is a user named “bal”, as shown in Figure 4. One can fully control the system by manipulating sudo user entries via the management interface.

Figure 4: Default LoadMaster interface

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 4362 – Progress Kemp LoadMaster Command Injection

Threat Graphs

SonicWall sensors have confirmed exploitation attempts of this vulnerability. The graph below indicates increased exploitation attempts over the last 6 days.

Figure 5: Threat graph

Remediation Recommendations

Considering the severe consequences of this vulnerability and the trending of unauthenticated nefarious activists trying to get Loadmaster management interface access using the exploit in the wild, users are strongly encouraged to upgrade their instances as published in the vendor advisory.

Relevant Links

*Originally this article claimed we had confirmed active exploitation of this vulnerability. This was a mistake. We have confirmed exploitation attempts, and the article now reflects that.