Performing Firmware Malware Analysis
Overview
Cybersecurity skill for performing firmware malware analysis. Follows industry best practices and security standards.
When to Use
Trigger phrases:
"performing firmware malware analysis"
"Analyzes firmware images for embedded malware, backdoors, and unauthorized modif"
A compromised IoT device or router needs firmware analysis to identify implanted backdoors
Investigating UEFI/BIOS rootkits that persist across OS reinstallations
Analyzing firmware updates for supply chain compromise or malicious modifications
Extracting and examining embedded Linux filesystems from IoT device firmware images
Verifying firmware integrity after a suspected hardware or firmware-level compromise
Do not use for standard operating system malware; use PE/ELF analysis tools for OS-level malware on conventional systems.
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- binwalk installed for firmware image analysis and extraction (
pip install binwalk)
- Ghidra with ARM/MIPS architecture support for embedded binary reverse engineering
- UEFI Tool (UEFITool) for UEFI firmware parsing and analysis
- Firmware Analysis Toolkit (FAT) or EMBA for automated firmware analysis
- QEMU for emulating extracted firmware filesystems
- Cross-compilation toolchains for ARM, MIPS, and other embedded architectures
Workflow
# Example: IOC detection
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs(text: str) -> dict:
return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}
- Plan Operations — Define objectives, scope, and success criteria for firmware malware analysis operations.
- Prepare Environment — Set up tools, access, and data sources required for firmware malware analysis.
- Execute Core Workflow — Perform the firmware malware analysis operations following established procedures.
- Validate Results — Verify that results meet quality standards and objectives.
- Report Findings — Document results, observations, and recommendations.
- Follow Up — Track remediation actions and verify fixes where applicable.
Tools
- Analysis Platform — Data processing and visualization
- Collaboration Tools — Team coordination and knowledge sharing
Process
- Reconnaissance — Gather target information, identify attack surface, enumerate services
- Analysis/Exploitation — Execute the technique, analyze results, document findings
- Reporting — Document IOCs, write findings, provide remediation recommendations
Verification
Anti-Rationalization Table
| Rationalization |
Reality |
| "We are too small to be targeted" |
Automated attacks target everyone. Size does not matter. |
| "Security slows us down" |
A breach slows you down 100x more. Build security in from the start. |
| "We will fix it after launch" |
Vulnerabilities in production are exploited within hours. Fix before deploy. |
1---2name: performing-firmware-malware-analysis3description: Use when analyzing firmware images for embedded malware, backdoors, and4 unauthorized modifications targeting routers, IoT devices, UEFI/BIOS, and embedded5 systems. Covers firmware extraction, filesystem analysis, binary reverse engineering,6 and bootkit detection. Activates for requests involving firmware security analysis,7 IoT malware investigation, UEFI rootkit detection, or embedded device compromise8 assessment.9domain: cybersecurity10tags:11- malware12- firmware13- IoT14- UEFI15- embedded-security16subdomain: malware-analysis17version: 1.0.018author: oyi7719license: Apache-2.020nist_csf:21- DE.AE-0222- RS.AN-0323- ID.RA-0124- DE.CM-0125category: cybersecurity26metadata:27 source: https://skillmd.com/skills/oyi77/performing-firmware-malware-analysis28---2930# Performing Firmware Malware Analysis3132## Overview3334Cybersecurity skill for performing firmware malware analysis. Follows industry best practices and security standards.3536## When to Use37**Trigger phrases:**38- "performing firmware malware analysis"39- "Analyzes firmware images for embedded malware, backdoors, and unauthorized modif"404142- A compromised IoT device or router needs firmware analysis to identify implanted backdoors43- Investigating UEFI/BIOS rootkits that persist across OS reinstallations44- Analyzing firmware updates for supply chain compromise or malicious modifications45- Extracting and examining embedded Linux filesystems from IoT device firmware images46- Verifying firmware integrity after a suspected hardware or firmware-level compromise4748**Do not use** for standard operating system malware; use PE/ELF analysis tools for OS-level malware on conventional systems.495051## When NOT to Use5253- When you lack proper authorization for testing54- For production systems without change management55- When the task requires legal or compliance expertise beyond technical scope565758## Prerequisites5960- binwalk installed for firmware image analysis and extraction (`pip install binwalk`)61- Ghidra with ARM/MIPS architecture support for embedded binary reverse engineering62- UEFI Tool (UEFITool) for UEFI firmware parsing and analysis63- Firmware Analysis Toolkit (FAT) or EMBA for automated firmware analysis64- QEMU for emulating extracted firmware filesystems65- Cross-compilation toolchains for ARM, MIPS, and other embedded architectures6667## Workflow6869```python70# Example: IOC detection71import re7273IOC_PATTERNS = {74 "ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",75 "domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",76 "hash_md5": r"\b[a-f0-9]{32}\b",77 "hash_sha256": r"\b[a-f0-9]{64}\b",78}7980def extract_iocs(text: str) -> dict:81 return {k: re.findall(v, text) for k, v in IOC_PATTERNS.items()}82```83841. **Plan Operations** — Define objectives, scope, and success criteria for firmware malware analysis operations.852. **Prepare Environment** — Set up tools, access, and data sources required for firmware malware analysis.863. **Execute Core Workflow** — Perform the firmware malware analysis operations following established procedures.874. **Validate Results** — Verify that results meet quality standards and objectives.885. **Report Findings** — Document results, observations, and recommendations.896. **Follow Up** — Track remediation actions and verify fixes where applicable.9091## Tools9293- **Analysis Platform** — Data processing and visualization94- **Collaboration Tools** — Team coordination and knowledge sharing959697## Process98991. **Reconnaissance** — Gather target information, identify attack surface, enumerate services1001. **Analysis/Exploitation** — Execute the technique, analyze results, document findings1011. **Reporting** — Document IOCs, write findings, provide remediation recommendations102103## Verification104105- [ ] All firmware malware analysis procedures executed completely and documented106- [ ] Findings validated against multiple data sources107- [ ] False positives identified and filtered108- [ ] Results documented with evidence and timestamps109- [ ] Recommendations provided with risk-based prioritization110111## Anti-Rationalization Table112113| Rationalization | Reality |114|---|---|115| "We are too small to be targeted" | Automated attacks target everyone. Size does not matter. |116| "Security slows us down" | A breach slows you down 100x more. Build security in from the start. |117| "We will fix it after launch" | Vulnerabilities in production are exploited within hours. Fix before deploy. |