Posts

HTML Application (.HTA) files are being used to distribute Smoke Loader malware

Threat actor always targets under the radar file types to deliver malware to the victim’s machine. HTML Applications (HTA) files are known as less suspicious file types by various security providers. SonicWall Capture Labs Threat Research team has observed an HTA file inside an archive is being delivered to the victim’s machine, which further downloads and executes Smoke Loader malware.

 

Infection Cycle:

The archive file name is in German “Zahlungserinnerung-BV-Green-Golfm.zip” acted as a payment reminder for the victim. The HTA file has HTML code to display service estimation by “LM Classic Cars” for Ferrari 348 TB for an Autria customer, additionally it includes JavaScript code to download malware using PowerShell script:

 

The JavaScript code executes the PowerShell executable which further executes another instance of the PowerShell executable using Command Prompt:

 

The PowerShell script contains code to perform below actions on MS Office files:

  • Enables all macros
  • Disable protected view for files belongs to internet zone
  • Disable protected view for attachments opened in Outlook
  • Disable protected view for files in unsafe locations

The PowerShell downloads malware from URL h[t][t]p://www.trimm.at/error/upx.exe

 

The Smoke Loader malware works in multi stages and layers. It uses code obfuscation, anti debugging, anti VM and Living of The Land techniques. The malware makes sure that a memory dump should not expose its intention at any point of time.

 

First Stage Executable

The first stage executable is highly obfuscated, it contains large loops with garbage API calls followed by a conditional jump. The malware uses opaque predicate technique as control never goes to garbage API calls, they are just kept to make analysis difficult. In a long iterations loop, only few operations are actually required by the malware which are executed on a particular iteration. The below iteration loop is intended to calculate the encrypted bytes size at 0x40Ath iteration:

 

The malware decrypts the shellcode into memory which further brings second stage executable:

 

The shellcode uses PEB_LDR_DATA from Process Environment Block, iterates through InLoadOrderModuleList to get the API addresses. The shellcode decrypts next stage executable in memory and does process hollowing to replace current process from the address space and starts execution of new process from entry point:

 

Second Stage Executable:

Second stage executable code is full of techniques used to investigate the controlled environment execution.

Anti-Debug

Checking the BeingDebugged and NtGlobalFlag in Process Environment Block is common across the malware. Here the tricky part is, instead of branching the code based on the flag values, the malware uses the flag values to compute a jump offset. If the malware is running inside a debugger then it will compute a invalid address which makes an impression of corrupted file to the researcher:

 

 

On-Demand Decryption

The malware decrypts the code on demand just before executing it and once the code is executed, the malware encrypts it back. The malware does this, to prevent its complete code exposure in one shot:

Loaded module

The malware checks for below modules in the current process, if any of them is loaded malware terminates the execution.

  • sbiedll (Sandboxie module)
  • aswhook (Avast module)
  • snxhk (Avast module)

 

Virtual Environment

The malware examines registry values “\REGISTRY\MACHINE\System\CurrentControlSet\Enum\IDE” and “\REGISTRY\MACHINE\System\CurrentControlSet\Enum\SCSI” for below substrings to check for virtual environment.

  • qemu
  • virtio
  • vmware
  • vbox
  • xen

 

The malware enumerates through all the running processes and looks for below processes. If any of the process is found the malware terminates the execution. The malware shows laziness in the code here, instead of dynamic size for individual process name, the malware keeps the size to 0x20 bytes for all the process names:

  • qemu-ga.exe
  • qga.exe
  • windanr.exe
  • vboxservice.exe
  • vboxtray.exe
  • vmtoolsd.exe
  • prl_tools.exe

The malware looks for below 7 bytes substrings of filenames into victim’s machine. If any of them is found the malware terminates the execution:

  • vmci.s
  • vmusbm
  • vmmous
  • vm3dmp
  • vmrawd
  • vmmemc
  • vboxgu
  • vboxsf
  • vboxmo
  • vboxvi
  • vboxdi
  • vioser

Code Injection

The malware gets the explorer.exe process id using APIs GetShellWindow and GetWindowThreadProcessId:

The malware creates and maps two sections in explorer.exe, one section has PAGE_READWRITE access attributes to store data and second section has PAGE_EXECUTE_READ access attributes to inject shellcode. Not enabling WRITE access to the shellcode memory makes the debugging little more difficult as this will prevent from putting software breakpoints and modifying code as per researcher’s need:

 

The malware injects shellcode into the mapped section and does NtCreateThreadEx passing data section address as parameter:

 

ShellCode Execution:

The Injected shellcode into explorer.exe spawns two sub-threads which keep an eye on monitoring tools. If the researcher opens any of the monitoring tool or analysis tool that will be immediately terminated by the sub-threads while the main thread doing its job.

Thread 1

This thread enumerates through all running processes, computes hash of the running process name and compares it with its list of hashes to terminate below processes:

  • 56DAB1A9 → Autoruns.exe
  • F3E35F5E → procexp.exe
  • 2407724B → procexp64.exe
  • FBC25850 → procmon.exe
  • 27151A96 → procmon64.exe
  • E6ED4551 → Tcpview.exe
  • 27D7E006 → Wireshark.exe
  • 2CEB6C62 → ProcessHacker.exe
  • EDCD7F5E → ollydbg.exe
  • 70A30042 → x32dbg.exe
  • 4EA30D45 → x64dbg.exe
  • 0CCD4A10 → idaq.exe
  • 0CCD4C3A → idaw.exe
  • 0956AD95 → idaq64.exe
  • 337CAD95 → idaw64.exe

 

 

Thread 2

The malware enumerates through windows, computes hash value of windows name and compares it to terminate processes attached with below windows list:

  • 61C75CDC → Autoruns
  • 4DFA76EB → PROCEXPL
  • 95E8B472 → PROCMON_WINDOW_CLASS
  • 62DC4674 → TCPViewClass
  • 6A0FAA84 → Wireshark
  • 7FF991A1 → ProcessHacker
  • BEDA6295 → OLLYDBG
  • 62DD69FD → IDA

 

Main Thread

The main thread starts with Process Environment Block (PEB) traversal, to get ImageBase of ntdll.dll and kernel32.dll. The malware then enumerates the export functions to get the the addresses of required APIs. Instead of direct API names the malware keeps the hash values list, which is being compared to the hash value of the exported function name:

 

The malware keeps list of RC4 encrypted strings in a structure, in which first bytes tells the string size followed by encrypted string. The malware perform RC4 decryptions just before using them:

 

The malware computes a unique identifier for the victim’s machine using below formula:

MD5(computer name + hardcoded DWORD value + system drive serial number) +  system drive serial number

The malware creates mutex with the unique identifier to restrict execution of another instance of the shellcode and if another instance is already running malware terminates its execution:

 

The malware reads Internet Explorer version information from registry and gets user agent string for it:

 

The malware drops self copy into %APPDATA% directory and the file name is computed by encoding initial 7 bytes from the unique identifier:

 

The malware deletes the current instance of the malware and it deletes zone identifier from the self copy dropped in %APPDATA%:

 

The malware sets dropped file property as FILE_ATTRIBUTE_HIDDEN and FILE_ATTRIBUTE_SYSTEM. The malware steals creation time from advapi32.dll and mark the same creation time for the dropped file to avoid being red flagged from any of the security providers.

 

C&C Communication

The malware contains 4 C&C servers:

  • ostgotahusbilsuthynring.de
  • autoland-ls.de
  • autogalerieseud.de
  • autohuas-e-c.de

The malware calculate CRC32 checksum for one of the C&C server before communicating, to make sure that the C&C has not been modified by the researcher and if the C&C is modified malware terminates the execution. The malware prepares post data which includes the variant id, unique identifier for the victim’s machine, computer name and random 0xA1 bytes. The data is then encrypted by RC4 algorithm and sent to its C&C server:

 

At the time of analysis all 4 C&C server were not responding but digging deep into the malware code reveals that malware is expecting response from C&C server which should contain Variant ID (0x7E6), Plugin size and plugin modules.

 

Unavailability of the archive file in any of the popular threat intelligence sharing portals like the VirusTotal and the ReversingLabs indicates its uniqueness and limited distribution:

 

Evidence of detection by RTDMI ™ engine can be seen below in the Capture ATP report for this file:

Microsoft Security Bulletin Coverage for June 2022

SonicWall Capture Labs threat research team has analyzed and addressed Microsoft’s security advisories for the month of June 2022. A list of issues reported, along with SonicWall coverage information, is as follows:

CVE-2022-30147 Windows Installer Elevation of Privilege Vulnerability
ASPY 331:Malformed-File dll.MP_8

CVE-2022-30160 Windows Advanced Local Procedure Call Elevation of Privilege Vulnerability
ASPY 332:Malformed-File exe.MP_257

CVE-2022-30190 Microsoft Windows Support Diagnostic Tool (MSDT) Remote Code Execution Vulnerability
IPS 2771: Microsoft Support Diagnostic Tool RCE (Follina)
IPS 2772: Microsoft Support Diagnostic Tool RCE (Follina)
IPS 2773: Microsoft Support Diagnostic Tool RCE (Follina)
IPS 2774: Microsoft Support Diagnostic Tool RCE (Follina)
GAV: CVE-2022-30190.X
GAV: CVE-2022-30190.X_1
GAV: CVE-2022-30190.X_2

The following vulnerabilities do not have exploits in the wild :
CVE-2022-21123 Intel: CVE-2022-21123 Shared Buffer Data Read (SBDR)
There are no known exploits in the wild.
CVE-2022-21125 Intel: CVE-2022-21125 Shared Buffers Data Sampling (SBDS)
There are no known exploits in the wild.
CVE-2022-21127 Intel: CVE-2022-21127 Special Register Buffer Data Sampling Update (SRBDS Update)
There are no known exploits in the wild.
CVE-2022-21166 Intel: CVE-2022-21166 Device Register Partial Write (DRPW)
There are no known exploits in the wild.
CVE-2022-22018 HEVC Video Extensions Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-22021 Microsoft Edge (Chromium-based) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29111 HEVC Video Extensions Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29119 HEVC Video Extensions Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29143 Microsoft SQL Server Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29149 Azure Open Management Infrastructure (OMI) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30131 Windows Container Isolation FS Filter Driver Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30132 Windows Container Manager Service Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30135 Windows Media Center Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30136 Windows Network File System Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30137 Azure Service Fabric Container Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30139 Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30140 Windows iSCSI Discovery Service Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30141 Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30142 Windows File History Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30143 Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30145 Windows Encrypting File System (EFS) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30146 Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30148 Windows Desired State Configuration (DSC) Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-30149 Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30150 Windows Defender Remote Credential Guard Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30151 Windows Ancillary Function Driver for WinSock Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30152 Windows Network Address Translation (NAT) Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-30153 Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30154 Microsoft File Server Shadow Copy Agent Service (RVSS) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30155 Windows Kernel Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-30157 Microsoft SharePoint Server Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30158 Microsoft SharePoint Server Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30159 Microsoft Office Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-30161 Windows Lightweight Directory Access Protocol (LDAP) Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30162 Windows Kernel Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-30163 Windows Hyper-V Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30164 Kerberos AppContainer Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-30165 Windows Kerberos Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30166 Local Security Authority Subsystem Service Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-30168 Microsoft Photos App Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30171 Microsoft Office Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-30172 Microsoft Office Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-30173 Microsoft Excel Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30174 Microsoft Office Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30177 Azure RTOS GUIX Studio Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30178 Azure RTOS GUIX Studio Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30179 Azure RTOS GUIX Studio Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30180 Azure RTOS GUIX Studio Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-30184 .NET and Visual Studio Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-30188 HEVC Video Extensions Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30189 Windows Autopilot Device Management and Enrollment Client Spoofing Vulnerability
There are no known exploits in the wild.
CVE-2022-30193 AV1 Video Extension Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-32230 Windows SMB Denial of Service Vulnerability
There are no known exploits in the wild.

Atlassian Confluence OGNL Vulnerability

Overview:

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

  Atlassian Confluence is a collaboration platform that allows you to build a knowledge base for documentation, product requirements, create, collaborate, comment on pages, project plans, share information between teams, and the entire company. It is written primarily in Java and runs on a bundled Apache Tomcat application server.

  An OGNL injection has been reported in the Atlassian Confluence Server and Data Center. The vulnerability is due to insufficient input validation leading to OGNL evaluation of user-supplied input.

  A remote, unauthenticated attacker could exploit this vulnerability by sending a crafted request to the target server. Successful exploitation can result in remote code execution under the security context of the affected server.

  Vendor Homepage

CVE Reference:

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

  CVE Listing

Common Vulnerability Scoring System (CVSS):

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

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

  CVSS Calculator Metrics

Technical Overview:

  Confluence uses the Webwork web application framework to map URLs to Java classes, creating what is known as an “action”. Action URLs end with the “.action” suffix and are defined in the xwork.xml file in confluence-.jar and in the atlassian-plugin.xml file in JAR files of included plugins.

  Each action entry contains at least a name attribute, defining the action name, a class attribute, defining the Java class implementing the action, and at least one result element which decides the Velocity template to render after the action is invoked based on the result of the action. Common return values from actions are “error”, “input”, and “success”, but any value may be used as long as there is a matching result element in the associated XWork XML.

  Action entries can contain a method attribute, which allows invocation of a specific method of the specified Java class. When no command is specified, the doDefault() method of the action class is called.

  The following is a sample action entry for the doenterpagevariables action:

  In the above example, the doEnter() method of the com.atlassian.confluence.pages.actions.PageVariablesAction class handles requests to “doenterpagevariables.action” and will return values such as “success”, “input”, or “error”, resulting in the appropriate velocity template being rendered. Request-URI paths that end in a slash are set to use “index.action”.

  The vulnerability is due to insufficient validation of user input that is evaluated during Result calculation. As part of action processing, the action namespace is parsed from the Request-URI path from the start until the last slash. When processing the result of a request in the result class ActionChainResult, the namespace is checked for OGNL expressions and evaluated if found. A remote, unauthenticated attacker could exploit this vulnerability by sending a crafted request with an OGNL expression in the Request-URI to the target server.

Triggering the Problem:

  • The target must have the vulnerable software installed and running.
  • The attacker must have network connectivity to the target service.

Triggering Conditions:

  The attacker sends a malicious HTTP request to the target server with a malicious Request-URI path. The vulnerability is triggered while processing the request.

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: 2801 Confluence Server and Data Center OGNL Injection RCE 1
  • IPS: 2804 Confluence Server and Data Center OGNL Injection RCE 2
  • IPS: 2806 Confluence Server and Data Center OGNL Injection RCE 3
  • IPS: 2809 Confluence Server and Data Center OGNL Injection RCE 4
  • IPS: 2813 Confluence Server and Data Center OGNL Injection RCE 5

Remediation Details:

  The risks posed by this vulnerability can be mitigated or eliminated by:
    • Upgrading the product to a non-vulnerable version.
    • Detect and filter malicious traffic using the signatures above.
  The vendor has released the following advisory regarding this vulnerability:
  Vendor Advisory

A look at TeamTNT's latest variant being actively used in the wild

The SonicWall Capture Labs threat research team analyzed the latest cryptomining and infostealing Trojan from a well-known malware group called TeamTNT. They are known to target vulnerable *nix systems and would deploy cryptominer and a myriad of other tools for reconnaissance and infostealing.

Infection Cycle:

The sample comes as a bash script. To establish a clean slate, upon execution it calls a function that will find, kill and remove all running cryptomining services.

Also while getting rid of cryptominers, it adds another bash script as a lock file which when executed will echo and read “Forbidden Action!!! TeamTNT is watching you.”

It then sets up its own cryptominer by downloading and installing XMrig, an open source Monero miner.

Upon setup and execution of the cryptominer, a TeamTNT-branded greeting is shown.

It then runs another function called makesshaxx to set up SSH key which then allows TeamTNT to securely access the victim machine over an unsecured network.

It then deploys an open source rootkit called Diamorphine which it uses to hide itself.

It begins as a base64 encoded tar file.

Which is then decoded, decompressed, built and installed.

And then finally executed by running the command “insmod diamorphine.ko

It also locks up the system and ensures full control by deleting cronjobs and locking cron.

It also redirects standard output and errors to null when the victim tries to shutdown or reboot the system.

And finally it has a function that uses another open source tool called, punk.py which is an SSH post-exploitation tool that is used to collect usernames, ssh keys and known hosts from a unix system, then tries to connect via ssh to all the combinations found.

The python script is hidden as a base64 encoded value.

But once decoded reveals the punk.py tool.

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

  • GAV: Coinminer.AIY (Trojan)
  • GAV: XMRig.XMR_13 (Trojan)

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

Follina MS-MSDT RCE Vulnerability

Overview:

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

  CVE-2022-30190 a.k.a Follina, The Microsoft Office zero-day vulnerability allows applications like Microsoft Word to execute code (without macros) by calling MSDT (Microsoft Support Diagnostic Tool) routines using the “ms-msdt:/” protocol. It was noticed as a zero-day being exploited in the wild, but was first mentioned in 2020 in a rather interesting Bachelor’s Thesis by Benjamin Altpeter August 01st, 2020.

  The text (Bachelor’s Thesis) contains other ways to execute code via MS Protocol in Word, using templates, which still work today. An attacker who successfully exploits this vulnerability can run arbitrary code with the privileges of the calling application.

  Bachelor’s Thesis & MSDT

CVE Reference:

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

  CVE Listing

Common Vulnerability Scoring System (CVSS):

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

  Base score is 7.8 (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/), based on the following metrics:
    • Attack vector is local.
    • Attack complexity is low.
    • Privileges required is none.
    • User interaction is required.
    • 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 7.3 (E:F/RL:T/RC:C), based on the following metrics:
    • The exploit code maturity level of this vulnerability is functional.
    • The remediation level of this vulnerability is temporary fix.
    • The report confidence level of this vulnerability is confirmed.

  CVSS Calculator Metrics

Technical Overview:

  The exploit works as follows: The user opens a non-malicious Microsoft Office file (Word, Excel, RTF, …) referencing a malicious remote HTML template file. The remote file is downloaded and the embedded payload is executed, containing code to abuse the ms-msdt protocol, and invoke actions on the compromised host. Look at “Target=” search “RDF842” below:

  
  The host, www[.]xmlformats[.]com, will be visited when you open the document (and activate the content). The following payload will be fetched:

  
  Analyzing the right side of the variable “windows.location.href”. The protocol “ms-msdt:/“ is being used. MSDT (Microsoft Support Diagnostic Tool) or msdt.exe is a tool provided by Microsoft that will collect information to send to Microsoft Support. Microsoft Office will automatically process the MSDT query and execute the payload. The Base64 encoding from above contains the following:

  

  IOC: 4a24048f81afbe9fb62e7a6a49adbd1faf41f266b5f9feecdceb567aec096784.

Triggering the Problem:

  • The target system must have the vulnerable Microsoft Office application installed and running.
  • The attacker must have network connectivity to the affected ports.
  • The vulnerability does not work with older Microsoft Office versions.

Triggering Conditions:

  The attacker sends a generated clickme.docx (or clickme.rtf) payload to the victim by www/exploit.html. The vulnerability is triggered when the user clicks on the file.

Attack Delivery:

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

SonicWall, provides the following protection against this threat:

  This threat is proactively detected by Capture ATP w/RTDMI.

  • IPS: 2771 Microsoft Support Diagnostic Tool RCE (Follina)
  • IPS: 2772 Microsoft Support Diagnostic Tool RCE (Follina)
  • IPS: 2773 Microsoft Support Diagnostic Tool RCE (Follina)
  • IPS: 2774 Microsoft Support Diagnostic Tool RCE (Follina)
  • GAV: CVE-2022-30190.X
  • GAV: CVE-2022-30190.X_1
  • GAV: CVE-2022-30190.X_2

Remediation Details:

  The risks posed by this vulnerability can be mitigated or eliminated by:
    • Updating to a non-vulnerable version of the product or apply the vendor supplied patch.
    • Filtering attack traffic using the signatures above.
    • Follow the Microsoft Guidance for CVE-2022-30190 below.
  The vendor has released the following patch regarding this vulnerability:
  Vendor Advisory #1 & Vendor Advisory #2

WordPress Photo Gallery Plugin SQL Injection Vulnerability

Overview:

  WordPress is an open source, PHP-based Content Management System (CMS) that offers several features such as multiple users, editing, custom formatting of text and an architecture which supports plugins to further extend its functionality. Looking into the Photo Gallery plugin by 10Web. The plugin has 300,000 plus active installations. The plugin offers features to add responsive mobile-friendly photo galleries and albums to your xmlpost content.

  A SQL injection vulnerability has been reported for the Photo Gallery plugin for WordPress. This vulnerability is due to improper input validation for the filter_tag parameter.

  A remote, unauthenticated attacker could exploit this vulnerability by sending a crafted request to the target server. A successful attack may result in remote SQL command execution against the database on the target server.

  Vendor Homepage

CVE Reference:

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

  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.
    • The remediation level of this vulnerability is official fix.
    • The report confidence level of this vulnerability is confirmed.

  CVSS Calculator Metrics

Technical Overview:

  The vulnerability is due to the insufficient sanitization of the filter_tag parameter in the request to /wp-admin/admin-ajax.php when the action parameter is set to GalleryBox. When a request with action=GalleryBox is received by the server; the function get_image_rows_data() from photo-gallery/frontend/models/BWGModelGalleryBox.php is called. The function get_image_rows_data() checks for the presence of the filter_tag parameter. If the filter_tag parameter is present; then it parses each tag and stores the result into an array. This array of tags is used in the construction of the “where clause” SQL query. This SQL query is then executed using the wpdb->get_results() function to get an array of images. As a result, a maliciously crafted request with filter_tag parameter can be used to perform an SQL injection attack and extract sensitive information from the underlying database.

Triggering the Problem:

  • The target system must have the vulnerable WordPress plugin installed and running.
  • The attacker must have network connectivity to the affected ports.

Triggering Conditions:

  The attacker sends a crafted HTTP request to the vulnerable server. The vulnerability is triggered when the server processes the request.

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: 2762 WordPress Photo Gallery plugin SQL Injection 3

Remediation Details:

  The risks posed by this vulnerability can be mitigated or eliminated by:
    • Updating to a non-vulnerable version of the product or apply the vendor supplied patch.
    • Filtering attack traffic using the signature above.
  The vendor has released the following patch regarding this vulnerability:
  Vendor Advisory

Malicious Linux scripts disable security and install Crypto mining software

The SonicWall Capture Labs threat research team have read reports of a set of malicious scripts, still live online at the time of writing, that install crypto mining software on Linux servers. There are 3 scripts: fczyo, alduro and sesa.txt. Each script is responsible for different aspects of getting the mining software up and running. They make every effort to disable various security features that may be present on the system. They also configure a backdoor for access by its operators at a later time.

 

The following web addresses host the scripts and are still live at the time of writing this alert:

  • hxxp://alpenforelle.eu/fczyo
  • hxxp://alpenforelle.eu/alduro
  • hxxp://alpenforelle.eu/sesa.txt

 

fczyo [Detected as: GAV: Linux.Downloader.A (Trojan)] has the following header:

 

fczyo is the main downloader script. It installs itself and the 2 other scripts to cron under the current user and root:

 

The contents of /opt/.k/key.txt are sent to a remote server on port 1337 if the file exists. It also logs the public ip of the infected server to iplogger.org and downloads a file named “ok“, an ethereum crypto miner [Detected as: Linux.EthMiner.N (Trojan)]:

 

The mining software is made executable and the binary is run. Its output and status are logged to remote servers:

 

The alduro script [Detected as: GAV: Linux.Downloader.A (Trojan)] adds a user named “system” with password “3PvxD3qO8Hx1c” and gives it superuser priviledges. It also allows root access via ssh. This is usually disabled by default on most Linux distributions for security purposes:

 

It installs a public key and sets the appropriate permissions. This enables passwordless authentication when login in over ssh.

 

The script downloads adnckil [Detected as: GAV: Linux.BitcoinMiner.A (Trojan)]. This is Bitcoin mining software. Upon successful download, execution permissions are set and the mining software is run.

 

The job of sesa.txt is to disable various security features that may be present on the system. It disables outgoing network connections to services related to Alibaba cloud security via the hosts file:

 

If the Alibaba Cloud Aliyun service is running, it is terminated and uninstalled:

 

Any network connections related to these services are severed:

 

apparmor and aliyun services are permanently disabled:

 

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

  • GAV: Linux.BitcoinMiner.A (Trojan)
  • GAV: Linux.Downloader.A (Trojan)
  • GAV: Linux.EthMiner.N (Trojan)
  • GAV: Linux.Mirai.N_1 (Trojan)

LokiBot is using Living Off The Land Technique

The malware authors always look how they can keep the malware stay hidden from various security vendors, either by innovating new techniques or techniques which are already being used by some other malware authors. SonicWall threat research team has observed LokiBot is being delivered to the victim’s machine using a Windows Script File for last few weeks. The script file contains a large junk data with malicious code which executes PowerShell script to download malicious VBS script into temp folder. The VBS script is then executed and temp directory is cleaned up to remove malicious traces:

 

The VBS script is highly obfuscated which executes a PowerShell script with obfuscated arguments:

 

The PowerShell script argument contains a loader binary and a URL. The loaded binary is executed by passing the URL as an argument :

 

The loader Dynamic Link Library(DLL) is a .NET compiled binary and code is pretty simple and tiny. The loader is responsible for loading the Loki-Bot binary and if some how initial VBS script execution has failed it will execute it again. It checks for the files with “.vbs” extension in Windows temp folder, if the files are present then the loader copy the VBS script into done.vbs and executes it:

 

The loader code contains many reverse operations to provide an extra layer of protection against security vendors. The loader downloads data from a reversed URL, which is reversed and few non ascii characters are replaced with “A” to get a Dot Net dynamic link library file.

The loader now reverses the argument URL to download  and execute the LokiBot binary:

 

LokiBot is known for stealing credentials from various applications installed on victim’s machine. it communicates with its Command and Control (C&C) server to perform various task on the victim’s machine.

The file is detected by only a few security vendors on popular threat intelligence sharing portal VirusTotal at the time of writing this blog, this indicates its spreading potential:

 

Evidence of the detection by RTDMI(tm) engine can be seen below in the Capture ATP report for this file:

 

 

 

F5 BIG-IP iControl REST Authentication Bypass

BIG-IP
F5’s BIG-IP is a product family consisting of software, hardware, and virtual appliances designed around application availability, access control, and security solutions. BIG-IP software products run on top of F5’s Traffic Management Operation System® (TMOS), designed specifically to inspect network and application traffic and make real-time decisions based on the configurations given. BIG-IP Configuration Utility is a Web GUI that allows F5 users to set up the BIG-IP product and to make additional changes.

Vulnerability| CVE-2022-1388
BIG-IP iControl is a REST API for BIG-IP, which is accessible over HTTPS on port 443/TCP via the following

URL:https://<host>/mgmt/tm/

An authentication bypass vulnerability exists in BIG-IP. The vulnerability is due to insufficient validation of the Connection header field. By including “X-F5-Auth-Token” in the Connection header, the forwarded request will omit the authentication token header leading to authentication bypass. Requests can be made to the endpoint “/mgmt/tm/util/bash” to execute  shell commands.
In the following example, an attacker sends the following unauthenticated POST request

and receives following response :

As seen in the example the attacker is able to successfully run the ‘id’ command on the vulnerable machine. A remote attacker can exploit the vulnerability by sending a malicious request to the target server. This vulnerability may allow an unauthenticated attacker with network access to the BIG-IP system through the management port and/or self IP addresses to execute arbitrary system commands, create or delete files, or disable services. Successful exploitation could result in the execution of arbitrary commands under the security context of root.

Following versions are vulnerable:

  • 16.1.0 – 16.1.2
  • 15.1.0 – 15.1.5
  • 14.1.0 – 14.1.4
  • 13.1.0 – 13.1.4
  • 12.1.0 – 12.1.6
  • 11.6.1 – 11.6.5

This vulnerability is patched . The vendor advisory is here

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

  • IPS 15029:F5 BIG-IP iControl REST Authentication Bypass To RCE

Threat Graph

Microsoft Security Bulletin Coverage for May 2022

SonicWall Capture Labs threat research team has analyzed and addressed Microsoft’s security advisories for the month of May 2022. A list of issues reported, along with SonicWall coverage information, is as follows:

CVE-2022-22017 Remote Desktop Client Remote Code Execution Vulnerability
ASPY 323:Malformed-File exe.MP_253

CVE-2022-23270 Point-to-Point Tunneling Protocol Remote Code Execution Vulnerability
IPS 2715:Malformed PPTP Request 3

CVE-2022-23279 Windows ALPC Elevation of Privilege Vulnerability
ASPY 324:Malformed-File exe.MP_254

CVE-2022-26925 Windows LSA Spoofing Vulnerability
IPS 15756:Windows LSA Spoofing (CVE-2022-26925)

CVE-2022-26937 Windows Network File System Remote Code Execution Vulnerability
IPS 15585:Windows NFS Remote Code Execution (CVE-2022-26937)

CVE-2022-29104 Windows Print Spooler Elevation of Privilege Vulnerability
ASPY 326:Malformed-File exe.MP_256

CVE-2022-29142 Windows Kernel Elevation of Privilege Vulnerability
ASPY 325:Malformed-File exe.MP_255

The following vulnerabilities do not have exploits in the wild :
CVE-2022-21972 Point-to-Point Tunneling Protocol Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-21978 Microsoft Exchange Server Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-22011 Windows Graphics Component Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-22012 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-22013 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-22014 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-22015 Windows Remote Desktop Protocol (RDP) Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-22016 Windows PlayToManager Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-22019 Remote Procedure Call Runtime Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-22713 Windows Hyper-V Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-23267 .NET and Visual Studio Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-24466 Windows Hyper-V Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-26913 Windows Authentication Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-26923 Active Directory Domain Services Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-26926 Windows Address Book Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-26927 Windows Graphics Component Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-26930 Windows Remote Access Connection Manager Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-26931 Windows Kerberos Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-26932 Storage Spaces Direct Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-26933 Windows NTFS Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-26934 Windows Graphics Component Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-26935 Windows WLAN AutoConfig Service Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-26936 Windows Server Service Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-26938 Storage Spaces Direct Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-26939 Storage Spaces Direct Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-26940 Remote Desktop Protocol Client Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29102 Windows Failover Cluster Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29103 Windows Remote Access Connection Manager Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29105 Microsoft Windows Media Foundation Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29106 Windows Hyper-V Shared Virtual Disk Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29107 Microsoft Office Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-29108 Microsoft SharePoint Server Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29109 Microsoft Excel Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29110 Microsoft Excel Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29112 Windows Graphics Component Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29113 Windows Digital Media Receiver Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29114 Windows Print Spooler Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29115 Windows Fax Service Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29116 Windows Kernel Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29117 .NET and Visual Studio Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-29120 Windows Clustered Shared Volume Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29121 Windows WLAN AutoConfig Service Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-29122 Windows Clustered Shared Volume Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29123 Windows Clustered Shared Volume Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29125 Windows Push Notifications Apps Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29126 Tablet Windows User Interface Application Core Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29127 BitLocker Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-29128 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29129 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29130 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29131 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29132 Windows Print Spooler Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29133 Windows Kernel Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29134 Windows Clustered Shared Volume Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29135 Windows Cluster Shared Volume (CSV) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29137 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29138 Windows Clustered Shared Volume Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29139 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29140 Windows Print Spooler Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-29141 Windows LDAP Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29145 .NET and Visual Studio Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-29148 Visual Studio Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-29150 Windows Cluster Shared Volume (CSV) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29151 Windows Cluster Shared Volume (CSV) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-29972 Insight Software: CVE-2022-29972 Magnitude Simba Amazon Redshift ODBC Driver
There are no known exploits in the wild.
CVE-2022-30129 Visual Studio Code Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-30130 .NET Framework Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-30138 Windows Print Spooler Elevation of Privilege Vulnerability
There are no known exploits in the wild.