[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A9XGP93M2Y6BBW5QNP7904":3,"skill-same:01M7A9XGP93M2Y6BBW5QNP7904":84},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":14,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M7A9XGP93M2Y6BBW5QNP7904","performing-firmware-malware-analysis",null,"Analyzes firmware images for embedded malware, backdoors, and unauthorized modifications in routers, IoT devices, UEFI\u002FBIOS, and embedded systems, covering firmware extraction, filesystem analysis, binary reverse engineering, and bootkit detection. Use for firmware security analysis, IoT malware investigation, UEFI rootkit detection, or embedded device compromise assessment.","NeelakshSaxena\u002FVayu","NeelakshSaxena","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F87892838?v=4","01M7A3B9YFS6F6N9DD1787DT86","Neelaksh Saxena","01M7A3B9ZKBT09MNMPX2XN69BY",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-firmware-malware-analysis\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-firmware-malware-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: performing-firmware-malware-analysis\ndescription: 'Analyzes firmware images for embedded malware, backdoors, and unauthorized\n  modifications in routers, IoT devices, UEFI\u002FBIOS, and embedded systems, covering\n  firmware extraction, filesystem analysis, binary reverse engineering, and bootkit\n  detection. Use for firmware security analysis, IoT malware investigation, UEFI\n  rootkit detection, or embedded device compromise assessment.\n\n  '\ndomain: cybersecurity\nsubdomain: malware-analysis\ntags:\n- malware\n- firmware\n- IoT\n- UEFI\n- embedded-security\nversion: 1.0.0\nauthor: mahipal\nlicense: Apache-2.0\nnist_csf:\n- DE.AE-02\n- RS.AN-03\n- ID.RA-01\n- DE.CM-01\nmitre_attack:\n- T1027\n- T1055\n- T1140\n- T1497\n- T1505.003\n---\n\n# Performing Firmware Malware Analysis\n\n## When to Use\n\n- A compromised IoT device or router needs firmware analysis to identify implanted backdoors\n- Investigating UEFI\u002FBIOS rootkits that persist across OS reinstallations\n- Analyzing firmware updates for supply chain compromise or malicious modifications\n- Extracting and examining embedded Linux filesystems from IoT device firmware images\n- Verifying firmware integrity after a suspected hardware or firmware-level compromise\n\n**Do not use** for standard operating system malware; use PE\u002FELF analysis tools for OS-level malware on conventional systems.\n\n## Prerequisites\n\n- binwalk installed for firmware image analysis and extraction (`pip install binwalk`)\n- Ghidra with ARM\u002FMIPS architecture support for embedded binary reverse engineering\n- UEFI Tool (UEFITool) for UEFI firmware parsing and analysis\n- Firmware Analysis Toolkit (FAT) or EMBA for automated firmware analysis\n- QEMU for emulating extracted firmware filesystems\n- Cross-compilation toolchains for ARM, MIPS, and other embedded architectures\n\n## Workflow\n\n### Step 1: Extract and Identify Firmware Components\n\nAnalyze the firmware image structure and extract filesystems:\n\n```bash\n# Identify embedded filesystems and compressed data\nbinwalk firmware.bin\n\n# Extract all identified components\nbinwalk -e firmware.bin\n\n# Recursive extraction with signature scanning\nbinwalk -eM firmware.bin\n\n# Output typically includes:\n# - Bootloader (U-Boot, GRUB, custom)\n# - Kernel image (Linux, RTOS)\n# - Root filesystem (SquashFS, JFFS2, CramFS, ext4)\n# - Configuration data\n# - Digital signatures or checksums\n\n# Entropy analysis to find encrypted or compressed regions\nbinwalk -E firmware.bin\n\n# Identify specific filesystem types\nfile _firmware.bin.extracted\u002F*\n\n# For SquashFS filesystems\nunsquashfs _firmware.bin.extracted\u002Fsquashfs-root.img\nls squashfs-root\u002F\n```\n\n### Step 2: Analyze the Extracted Filesystem\n\nSearch for malicious modifications in the firmware filesystem:\n\n```bash\n# Directory structure analysis\nfind squashfs-root\u002F -type f | head -50\n\n# Search for suspicious files\nfind squashfs-root\u002F -name \"*.sh\" -exec ls -la {} \\;\nfind squashfs-root\u002F -perm -4000 -type f  # SUID binaries\nfind squashfs-root\u002F -name \"*.so\" -newer squashfs-root\u002Fbin\u002Fbusybox  # Modified libraries\n\n# Check startup scripts for backdoors\ncat squashfs-root\u002Fetc\u002Finit.d\u002FrcS\ncat squashfs-root\u002Fetc\u002Finittab\nls -la squashfs-root\u002Fetc\u002Frc.d\u002F\n\n# Search for hardcoded credentials\ngrep -rn \"password\\|passwd\\|secret\\|key\\|token\" squashfs-root\u002Fetc\u002F 2>\u002Fdev\u002Fnull\ngrep -rn \"root:\" squashfs-root\u002Fetc\u002Fshadow 2>\u002Fdev\u002Fnull\n\n# Check for unauthorized SSH keys\nfind squashfs-root\u002F -name \"authorized_keys\" -exec cat {} \\;\n\n# Network configuration backdoors\ncat squashfs-root\u002Fetc\u002Fhosts\ngrep -rn \"iptables\\|nc\\|netcat\\|ncat\" squashfs-root\u002Fetc\u002F squashfs-root\u002Fusr\u002Fbin\u002F\n\n# Check for reverse shells in cron\nfind squashfs-root\u002F -name \"crontab\" -o -name \"cron*\" | xargs cat 2>\u002Fdev\u002Fnull\n\n# Identify all ELF binaries for analysis\nfind squashfs-root\u002F -type f -exec file {} \\; | grep ELF\n```\n\n### Step 3: Reverse Engineer Suspicious Binaries\n\nAnalyze extracted binaries that may be backdoors:\n\n```bash\n# Identify architecture and format\nfile squashfs-root\u002Fusr\u002Fbin\u002Fsuspicious_binary\n\n# Extract strings for IOC discovery\nstrings squashfs-root\u002Fusr\u002Fbin\u002Fsuspicious_binary | grep -iE \"http|ip|port|shell|connect|exec\"\n\n# Cross-reference against known firmware binaries\n# Compare SHA-256 hashes with known-good firmware\nsha256sum squashfs-root\u002Fusr\u002Fbin\u002F* > current_hashes.txt\n# diff against baseline: diff baseline_hashes.txt current_hashes.txt\n\n# Import into Ghidra for disassembly (select correct architecture)\n# ARM:   ARM\u002FAARCH64 (Little Endian for most IoT devices)\n# MIPS:  MIPS\u002FMIPS64 (Big or Little Endian depending on device)\n# x86:   For UEFI modules\n\n# Analyze with radare2 for quick triage\nr2 -A squashfs-root\u002Fusr\u002Fbin\u002Fsuspicious_binary\n# Commands: afl (function list), pdf @main (disassemble main), iz (strings)\n```\n\n### Step 4: UEFI\u002FBIOS Firmware Analysis\n\nAnalyze system firmware for bootkits and implants:\n\n```bash\n# Extract UEFI firmware volumes with UEFITool\n# GUI: UEFITool -> File -> Open -> Select firmware.rom\n# CLI: UEFIExtract firmware.rom\n\n# Analyze UEFI firmware with chipsec (requires hardware access)\npython chipsec_main.py -m common.bios_wp     # BIOS write protection\npython chipsec_main.py -m common.spi_lock     # SPI flash lock\npython chipsec_main.py -m common.secureboot   # Secure Boot status\npython chipsec_main.py -m common.uefi.s3bootscript  # S3 resume script\n\n# Dump UEFI firmware from live system\npython chipsec_util.py spi dump firmware_dump.rom\n\n# Compare with known-good firmware\nsha256sum firmware_dump.rom\n# Compare against vendor-provided firmware hash\n\n# Scan for known UEFI malware signatures\nyara -r uefi_malware_rules.yar firmware_dump.rom\n```\n\n```\nKnown UEFI Malware Families:\n━━━━━━━━━━━━━━━━━━━━━━━━━━\nLoJax:         First in-the-wild UEFI rootkit (APT28\u002FFancy Bear)\n               Modifies SPI flash to drop persistence agent\nMosaicRegressor: Modular UEFI framework dropping multiple payloads\nCosmicStrand:  UEFI firmware rootkit modifying kernel during boot\nBlackLotus:    UEFI bootkit bypassing Secure Boot on Windows 11\nESPecter:      ESP (EFI System Partition) bootkit modifying boot manager\nMoonBounce:    SPI flash implant modifying CORE_DXE module\nFinSpy UEFI:  Surveillance software with UEFI persistence\n```\n\n### Step 5: Emulate Firmware for Dynamic Analysis\n\nRun extracted firmware in an emulated environment:\n\n```bash\n# Emulate ARM-based IoT firmware with QEMU\n# Mount the extracted filesystem\nsudo mount -o loop squashfs-root.img \u002Fmnt\u002Ffirmware\n\n# Chroot into the firmware with QEMU user-mode emulation\nsudo cp \u002Fusr\u002Fbin\u002Fqemu-arm-static \u002Fmnt\u002Ffirmware\u002Fusr\u002Fbin\u002F\nsudo chroot \u002Fmnt\u002Ffirmware \u002Fbin\u002Fsh\n\n# Or use firmadyne for automated firmware emulation\n# https:\u002F\u002Fgithub.com\u002Ffirmadyne\u002Ffirmadyne\npython3 fat.py firmware.bin\n\n# Network service analysis within emulated firmware\n# Scan for open ports and services\nnmap -sV localhost -p 1-65535\n\n# Monitor network traffic from emulated firmware\ntcpdump -i tap0 -w firmware_traffic.pcap\n```\n\n### Step 6: Document Firmware Analysis\n\nCompile comprehensive firmware analysis findings:\n\n```\nAnalysis documentation should cover:\n- Firmware image metadata (vendor, model, version, build date)\n- Extraction results (filesystem type, kernel version, architecture)\n- Modified files compared to known-good baseline\n- Backdoor binaries discovered with reverse engineering findings\n- Hardcoded credentials and unauthorized access mechanisms\n- Network services and their security posture\n- UEFI\u002FBIOS integrity verification results\n- Extracted IOCs (IPs, domains, file hashes, SSH keys)\n- Remediation recommendations (reflash, replace, update)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Firmware** | Software permanently stored in device hardware (flash memory, EEPROM) controlling low-level device operations and boot process |\n| **UEFI (Unified Extensible Firmware Interface)** | Modern system firmware replacing legacy BIOS; provides boot services, runtime services, and a modular driver architecture |\n| **SPI Flash** | Serial Peripheral Interface flash memory chip storing UEFI\u002FBIOS firmware; can be read and modified for persistence |\n| **Secure Boot** | UEFI feature verifying digital signatures of boot components to prevent unauthorized code execution during startup |\n| **SquashFS** | Read-only compressed filesystem commonly used in embedded Linux firmware for space-efficient storage |\n| **Bootkit** | Malware infecting the boot process (MBR, VBR, UEFI) to load before the operating system and evade OS-level security |\n| **Firmware Emulation** | Running extracted firmware in a virtual environment (QEMU, firmadyne) to analyze behavior without physical hardware |\n\n## Tools & Systems\n\n- **binwalk**: Firmware analysis tool for scanning, extracting, and analyzing embedded file systems and compressed data in firmware images\n- **UEFITool**: Open-source UEFI firmware image parser and extractor for analyzing UEFI volumes, modules, and drivers\n- **chipsec**: Intel's open-source framework for platform security assessment including SPI flash, Secure Boot, and UEFI analysis\n- **firmadyne**: Automated firmware analysis and emulation platform for Linux-based embedded devices\n- **Ghidra**: NSA's reverse engineering tool with ARM, MIPS, and other embedded architecture support for firmware binary analysis\n\n## Common Scenarios\n\n### Scenario: Investigating a Compromised Router with Persistent Backdoor\n\n**Context**: A network router continues to exhibit suspicious behavior (unexpected DNS resolutions, traffic to unknown IPs) even after factory resets. Firmware-level compromise is suspected.\n\n**Approach**:\n1. Dump the firmware from the router using JTAG\u002FUART debug interface or vendor management tools\n2. Extract the filesystem with binwalk and identify the Linux distribution and kernel version\n3. Compare file hashes against known-good firmware image from the vendor\n4. Search startup scripts (rcS, inittab, crontab) for backdoor entries\n5. Analyze any modified or new binaries with Ghidra (ARM\u002FMIPS architecture)\n6. Check for hardcoded credentials, unauthorized SSH keys, and reverse shell scripts\n7. Emulate the firmware to observe network behavior and identify C2 communication\n\n**Pitfalls**:\n- Not dumping firmware from the actual device (downloading from vendor site gives clean version, not the compromised one)\n- Ignoring modified shared libraries (.so files) that may hook system functions\n- Missing firmware modifications stored outside the main filesystem (bootloader, configuration partitions)\n- Not checking both the primary and backup firmware partitions (some devices have dual-bank flash)\n\n## Output Format\n\n```\nFIRMWARE MALWARE ANALYSIS REPORT\n===================================\nDevice:           NetGear R7000 Router\nFirmware Version: V1.0.11.116 (modified)\nArchitecture:     ARM (Little Endian)\nFilesystem:       SquashFS (Linux 3.4.103)\nDump Method:      UART debug console\n\nINTEGRITY CHECK\nVendor Firmware Hash:  aaa111bbb222... (clean V1.0.11.116)\nAnalyzed Firmware Hash: ccc333ddd444... (MISMATCH)\nModified Files:        14 files differ from vendor baseline\n\nBACKDOOR FINDINGS\n[!] \u002Fusr\u002Fbin\u002Fhttpd_backdoor (new binary, not in vendor firmware)\n    Architecture: ARM 32-bit\n    Function: Reverse shell to 185.220.101[.]42:4444\n    Persistence: Added to \u002Fetc\u002Finit.d\u002FrcS\n\n[!] \u002Fetc\u002Fshadow modified\n    Root password changed to known hash\n    New user 'admin2' added with UID 0\n\n[!] \u002Fetc\u002Fcrontab modified\n    Added: *\u002F5 * * * * \u002Fusr\u002Fbin\u002Fhttpd_backdoor\n\n[!] \u002Froot\u002F.ssh\u002Fauthorized_keys (new file)\n    Contains attacker's SSH public key\n\nEXTRACTED IOCs\nC2 IP:            185.220.101[.]42\nC2 Port:          4444\nSSH Key:          ssh-rsa AAAA... attacker@control\nBackdoor Hash:    eee555fff666...\n\nREMEDIATION\n1. Flash clean vendor firmware via TFTP recovery mode\n2. Change all device credentials\n3. Update to latest firmware version\n4. Enable firmware integrity checking if available\n5. Monitor for re-compromise indicators\n```\n","# Performing Firmware Malware Analysis\n\n## When to Use\n\n- A compromised IoT device or router needs firmware analysis to identify implanted backdoors\n- Investigating UEFI\u002FBIOS rootkits that persist across OS reinstallations\n- Analyzing firmware updates for supply chain compromise or malicious modifications\n- Extracting and examining embedded Linux filesystems from IoT device firmware images\n- Verifying firmware integrity after a suspected hardware or firmware-level compromise\n\n**Do not use** for standard operating system malware; use PE\u002FELF analysis tools for OS-level malware on conventional systems.\n\n## Prerequisites\n\n- binwalk installed for firmware image analysis and extraction (`pip install binwalk`)\n- Ghidra with ARM\u002FMIPS architecture support for embedded binary reverse engineering\n- UEFI Tool (UEFITool) for UEFI firmware parsing and analysis\n- Firmware Analysis Toolkit (FAT) or EMBA for automated firmware analysis\n- QEMU for emulating extracted firmware filesystems\n- Cross-compilation toolchains for ARM, MIPS, and other embedded architectures\n\n## Workflow\n\n### Step 1: Extract and Identify Firmware Components\n\nAnalyze the firmware image structure and extract filesystems:\n\n```bash\n# Identify embedded filesystems and compressed data\nbinwalk firmware.bin\n\n# Extract all identified components\nbinwalk -e firmware.bin\n\n# Recursive extraction with signature scanning\nbinwalk -eM firmware.bin\n\n# Output typically includes:\n# - Bootloader (U-Boot, GRUB, custom)\n# - Kernel image (Linux, RTOS)\n# - Root filesystem (SquashFS, JFFS2, CramFS, ext4)\n# - Configuration data\n# - Digital signatures or checksums\n\n# Entropy analysis to find encrypted or compressed regions\nbinwalk -E firmware.bin\n\n# Identify specific filesystem types\nfile _firmware.bin.extracted\u002F*\n\n# For SquashFS filesystems\nunsquashfs _firmware.bin.extracted\u002Fsquashfs-root.img\nls squashfs-root\u002F\n```\n\n### Step 2: Analyze the Extracted Filesystem\n\nSearch for malicious modifications in the firmware filesystem:\n\n```bash\n# Directory structure analysis\nfind squashfs-root\u002F -type f | head -50\n\n# Search for suspicious files\nfind squashfs-root\u002F -name \"*.sh\" -exec ls -la {} \\;\nfind squashfs-root\u002F -perm -4000 -type f  # SUID binaries\nfind squashfs-root\u002F -name \"*.so\" -newer squashfs-root\u002Fbin\u002Fbusybox  # Modified libraries\n\n# Check startup scripts for backdoors\ncat squashfs-root\u002Fetc\u002Finit.d\u002FrcS\ncat squashfs-root\u002Fetc\u002Finittab\nls -la squashfs-root\u002Fetc\u002Frc.d\u002F\n\n# Search for hardcoded credentials\ngrep -rn \"password\\|passwd\\|secret\\|key\\|token\" squashfs-root\u002Fetc\u002F 2>\u002Fdev\u002Fnull\ngrep -rn \"root:\" squashfs-root\u002Fetc\u002Fshadow 2>\u002Fdev\u002Fnull\n\n# Check for unauthorized SSH keys\nfind squashfs-root\u002F -name \"authorized_keys\" -exec cat {} \\;\n\n# Network configuration backdoors\ncat squashfs-root\u002Fetc\u002Fhosts\ngrep -rn \"iptables\\|nc\\|netcat\\|ncat\" squashfs-root\u002Fetc\u002F squashfs-root\u002Fusr\u002Fbin\u002F\n\n# Check for reverse shells in cron\nfind squashfs-root\u002F -name \"crontab\" -o -name \"cron*\" | xargs cat 2>\u002Fdev\u002Fnull\n\n# Identify all ELF binaries for analysis\nfind squashfs-root\u002F -type f -exec file {} \\; | grep ELF\n```\n\n### Step 3: Reverse Engineer Suspicious Binaries\n\nAnalyze extracted binaries that may be backdoors:\n\n```bash\n# Identify architecture and format\nfile squashfs-root\u002Fusr\u002Fbin\u002Fsuspicious_binary\n\n# Extract strings for IOC discovery\nstrings squashfs-root\u002Fusr\u002Fbin\u002Fsuspicious_binary | grep -iE \"http|ip|port|shell|connect|exec\"\n\n# Cross-reference against known firmware binaries\n# Compare SHA-256 hashes with known-good firmware\nsha256sum squashfs-root\u002Fusr\u002Fbin\u002F* > current_hashes.txt\n# diff against baseline: diff baseline_hashes.txt current_hashes.txt\n\n# Import into Ghidra for disassembly (select correct architecture)\n# ARM:   ARM\u002FAARCH64 (Little Endian for most IoT devices)\n# MIPS:  MIPS\u002FMIPS64 (Big or Little Endian depending on device)\n# x86:   For UEFI modules\n\n# Analyze with radare2 for quick triage\nr2 -A squashfs-root\u002Fusr\u002Fbin\u002Fsuspicious_binary\n# Commands: afl (function list), pdf @main (disassemble main), iz (strings)\n```\n\n### Step 4: UEFI\u002FBIOS Firmware Analysis\n\nAnalyze system firmware for bootkits and implants:\n\n```bash\n# Extract UEFI firmware volumes with UEFITool\n# GUI: UEFITool -> File -> Open -> Select firmware.rom\n# CLI: UEFIExtract firmware.rom\n\n# Analyze UEFI firmware with chipsec (requires hardware access)\npython chipsec_main.py -m common.bios_wp     # BIOS write protection\npython chipsec_main.py -m common.spi_lock     # SPI flash lock\npython chipsec_main.py -m common.secureboot   # Secure Boot status\npython chipsec_main.py -m common.uefi.s3bootscript  # S3 resume script\n\n# Dump UEFI firmware from live system\npython chipsec_util.py spi dump firmware_dump.rom\n\n# Compare with known-good firmware\nsha256sum firmware_dump.rom\n# Compare against vendor-provided firmware hash\n\n# Scan for known UEFI malware signatures\nyara -r uefi_malware_rules.yar firmware_dump.rom\n```\n\n```\nKnown UEFI Malware Families:\n━━━━━━━━━━━━━━━━━━━━━━━━━━\nLoJax:         First in-the-wild UEFI rootkit (APT28\u002FFancy Bear)\n               Modifies SPI flash to drop persistence agent\nMosaicRegressor: Modular UEFI framework dropping multiple payloads\nCosmicStrand:  UEFI firmware rootkit modifying kernel during boot\nBlackLotus:    UEFI bootkit bypassing Secure Boot on Windows 11\nESPecter:      ESP (EFI System Partition) bootkit modifying boot manager\nMoonBounce:    SPI flash implant modifying CORE_DXE module\nFinSpy UEFI:  Surveillance software with UEFI persistence\n```\n\n### Step 5: Emulate Firmware for Dynamic Analysis\n\nRun extracted firmware in an emulated environment:\n\n```bash\n# Emulate ARM-based IoT firmware with QEMU\n# Mount the extracted filesystem\nsudo mount -o loop squashfs-root.img \u002Fmnt\u002Ffirmware\n\n# Chroot into the firmware with QEMU user-mode emulation\nsudo cp \u002Fusr\u002Fbin\u002Fqemu-arm-static \u002Fmnt\u002Ffirmware\u002Fusr\u002Fbin\u002F\nsudo chroot \u002Fmnt\u002Ffirmware \u002Fbin\u002Fsh\n\n# Or use firmadyne for automated firmware emulation\n# https:\u002F\u002Fgithub.com\u002Ffirmadyne\u002Ffirmadyne\npython3 fat.py firmware.bin\n\n# Network service analysis within emulated firmware\n# Scan for open ports and services\nnmap -sV localhost -p 1-65535\n\n# Monitor network traffic from emulated firmware\ntcpdump -i tap0 -w firmware_traffic.pcap\n```\n\n### Step 6: Document Firmware Analysis\n\nCompile comprehensive firmware analysis findings:\n\n```\nAnalysis documentation should cover:\n- Firmware image metadata (vendor, model, version, build date)\n- Extraction results (filesystem type, kernel version, architecture)\n- Modified files compared to known-good baseline\n- Backdoor binaries discovered with reverse engineering findings\n- Hardcoded credentials and unauthorized access mechanisms\n- Network services and their security posture\n- UEFI\u002FBIOS integrity verification results\n- Extracted IOCs (IPs, domains, file hashes, SSH keys)\n- Remediation recommendations (reflash, replace, update)\n```\n\n## Key Concepts\n\n| Term | Definition |\n|------|------------|\n| **Firmware** | Software permanently stored in device hardware (flash memory, EEPROM) controlling low-level device operations and boot process |\n| **UEFI (Unified Extensible Firmware Interface)** | Modern system firmware replacing legacy BIOS; provides boot services, runtime services, and a modular driver architecture |\n| **SPI Flash** | Serial Peripheral Interface flash memory chip storing UEFI\u002FBIOS firmware; can be read and modified for persistence |\n| **Secure Boot** | UEFI feature verifying digital signatures of boot components to prevent unauthorized code execution during startup |\n| **SquashFS** | Read-only compressed filesystem commonly used in embedded Linux firmware for space-efficient storage |\n| **Bootkit** | Malware infecting the boot process (MBR, VBR, UEFI) to load before the operating system and evade OS-level security |\n| **Firmware Emulation** | Running extracted firmware in a virtual environment (QEMU, firmadyne) to analyze behavior without physical hardware |\n\n## Tools & Systems\n\n- **binwalk**: Firmware analysis tool for scanning, extracting, and analyzing embedded file systems and compressed data in firmware images\n- **UEFITool**: Open-source UEFI firmware image parser and extractor for analyzing UEFI volumes, modules, and drivers\n- **chipsec**: Intel's open-source framework for platform security assessment including SPI flash, Secure Boot, and UEFI analysis\n- **firmadyne**: Automated firmware analysis and emulation platform for Linux-based embedded devices\n- **Ghidra**: NSA's reverse engineering tool with ARM, MIPS, and other embedded architecture support for firmware binary analysis\n\n## Common Scenarios\n\n### Scenario: Investigating a Compromised Router with Persistent Backdoor\n\n**Context**: A network router continues to exhibit suspicious behavior (unexpected DNS resolutions, traffic to unknown IPs) even after factory resets. Firmware-level compromise is suspected.\n\n**Approach**:\n1. Dump the firmware from the router using JTAG\u002FUART debug interface or vendor management tools\n2. Extract the filesystem with binwalk and identify the Linux distribution and kernel version\n3. Compare file hashes against known-good firmware image from the vendor\n4. Search startup scripts (rcS, inittab, crontab) for backdoor entries\n5. Analyze any modified or new binaries with Ghidra (ARM\u002FMIPS architecture)\n6. Check for hardcoded credentials, unauthorized SSH keys, and reverse shell scripts\n7. Emulate the firmware to observe network behavior and identify C2 communication\n\n**Pitfalls**:\n- Not dumping firmware from the actual device (downloading from vendor site gives clean version, not the compromised one)\n- Ignoring modified shared libraries (.so files) that may hook system functions\n- Missing firmware modifications stored outside the main filesystem (bootloader, configuration partitions)\n- Not checking both the primary and backup firmware partitions (some devices have dual-bank flash)\n\n## Output Format\n\n```\nFIRMWARE MALWARE ANALYSIS REPORT\n===================================\nDevice:           NetGear R7000 Router\nFirmware Version: V1.0.11.116 (modified)\nArchitecture:     ARM (Little Endian)\nFilesystem:       SquashFS (Linux 3.4.103)\nDump Method:      UART debug console\n\nINTEGRITY CHECK\nVendor Firmware Hash:  aaa111bbb222... (clean V1.0.11.116)\nAnalyzed Firmware Hash: ccc333ddd444... (MISMATCH)\nModified Files:        14 files differ from vendor baseline\n\nBACKDOOR FINDINGS\n[!] \u002Fusr\u002Fbin\u002Fhttpd_backdoor (new binary, not in vendor firmware)\n    Architecture: ARM 32-bit\n    Function: Reverse shell to 185.220.101[.]42:4444\n    Persistence: Added to \u002Fetc\u002Finit.d\u002FrcS\n\n[!] \u002Fetc\u002Fshadow modified\n    Root password changed to known hash\n    New user 'admin2' added with UID 0\n\n[!] \u002Fetc\u002Fcrontab modified\n    Added: *\u002F5 * * * * \u002Fusr\u002Fbin\u002Fhttpd_backdoor\n\n[!] \u002Froot\u002F.ssh\u002Fauthorized_keys (new file)\n    Contains attacker's SSH public key\n\nEXTRACTED IOCs\nC2 IP:            185.220.101[.]42\nC2 Port:          4444\nSSH Key:          ssh-rsa AAAA... attacker@control\nBackdoor Hash:    eee555fff666...\n\nREMEDIATION\n1. Flash clean vendor firmware via TFTP recovery mode\n2. Change all device credentials\n3. Update to latest firmware version\n4. Enable firmware integrity checking if available\n5. Monitor for re-compromise indicators\n```\n",{"name":5,"tags":25,"author":31,"domain":32,"license":15,"version":33,"nist_csf":34,"subdomain":39,"description":40,"mitre_attack":41},[26,27,28,29,30],"malware","firmware","IoT","UEFI","embedded-security","mahipal","cybersecurity","1.0.0",[35,36,37,38],"DE.AE-02","RS.AN-03","ID.RA-01","DE.CM-01","malware-analysis","Analyzes firmware images for embedded malware, backdoors, and unauthorized modifications in routers, IoT devices, UEFI\u002FBIOS, and embedded systems, covering firmware extraction, filesystem analysis, binary reverse engineering, and bootkit detection. Use for firmware security analysis, IoT malware investigation, UEFI rootkit detection, or embedded device compromise assessment.\n",[42,43,44,45,46],"T1027","T1055","T1140","T1497","T1505.003","main","7540bbccf0c1ded6156a467b02c95b61ad62413f",".agents\u002Fskills\u002Fperforming-firmware-malware-analysis","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena","Currently exploring the intersection of tech","2026-09-11 03:02:31",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add NeelakshSaxena\u002FVayu --skill performing-firmware-malware-analysis",{"tool":60,"command":61},"bunx","bunx skills add NeelakshSaxena\u002FVayu --skill performing-firmware-malware-analysis",{"tool":63,"command":64},"pnpm","pnpm dlx skills add NeelakshSaxena\u002FVayu --skill performing-firmware-malware-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-firmware-malware-analysis\u002FSKILL.md",true,[68,72,78],{"path":69,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":16},"LICENSE","许可证",11255,{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fapi-reference.md","REFERENCE","参考文档",1642,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-firmware-malware-analysis\u002Freferences\u002Fapi-reference.md",{"path":79,"resourceType":80,"resourceTypeDesc":81,"sizeBytes":82,"sourceHtmlUrl":83},"scripts\u002Fagent.py","SCRIPT","脚本",8487,"https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fperforming-firmware-malware-analysis\u002Fscripts\u002Fagent.py",[85,92,99,106,113,120],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":20},"01M7ACCCVNCFKMA9X6D15X6G98","runpodctl","Runpod CLI for managing GPU\u002FCPU workloads from the terminal — pods, serverless endpoints, templates, network volumes, Hub deploys, models, SSH, and file transfer (send\u002Freceive). Use for terminal\u002FCI\u002Fscripting, Hub browse\u002Fdeploy, SSH setup, `doctor`, or when the Runpod MCP tools are not connected. For structured tool calls in an MCP-enabled session, prefer runpod-mcp.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpodctl\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":20},"01M7ACC63SRHEA5KMCHSMZK2TC","runpod","Start here for any Runpod task — running GPU\u002FCPU pods, deploying serverless endpoints, templates, network volumes, building images, or understanding how Runpod works. Routes to the right skill (runpod-mcp, runpodctl, flash, companion-clis, runpod-usage, runpod-templates, runpod-migrate) and indexes two dozen live-verified end-to-end examples (golden paths) — use it when the lane is unclear, and for any multi-step or provisioning task even when it is not.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":20},"01M7ACC0Q1C89N9BZBV91CTQTF","runpod-usage","How Runpod works and how to work it — pods vs serverless, GPU\u002FVRAM selection, storage, building a container, networking, plus the agentic pod development loop (provision → ssh-exec → set up → poll readiness) and on-pod install hygiene (uv\u002Fapt). Use to answer \"how does X work\", \"which GPU\", \"how do I build a container\", or \"how do I stand up a workload on a pod\". Guidance, not a tool — execute with runpodctl, runpod-mcp, or flash.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-usage\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":20},"01M7ACBRPE345GF5GM5B8P8RRC","runpod-templates","Runpod's official prebuilt pod templates (ComfyUI, PyTorch, and others): what each image ships, which ports and paths it uses, how to pick one, how to pin a version, and what is missing on first boot. Use when a task says \"run \u003CX> on a pod\" and an official template already covers it, instead of building an image — and when a user needs help with or wants to fix something about a Runpod template they are already running (won't boot, can't reach the UI, missing models, wrong CUDA line, broken ComfyUI workflow metadata on imported workflows): start here and route onward. Deploy with runpodctl or runpod-mcp; end-to-end walkthroughs live in the runpod router's golden paths.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-templates\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":20},"01M7ACBJATHKVX1TWES2F44GY8","runpod-migrate","Migrate a codebase from the Runpod GraphQL API or REST v1 to REST v2 — inventory which parts use which API version, rewrite the call sites, flag breaking changes, and verify. Use when someone asks to move to v2, asks what v2 would change, or asks which Runpod API their code is on. For managing infrastructure rather than migrating code, use runpod-mcp or runpodctl.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-migrate\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":20},"01M7ACBC7GHVH6T9YEAPCG2AP8","runpod-mcp","Manage Runpod infrastructure — pods, serverless endpoints, jobs, templates, network volumes, container-registry auth, GPU\u002FCPU catalog, and billing — via the Runpod MCP server's structured tool calls. Use when the Runpod MCP tools (create-pod, list-endpoints, …) are connected in this session, or to connect them (hosted OAuth or local npx). Prefer this over runpodctl for plain infra CRUD when MCP is available; use runpodctl for the terminal, file transfer, or SSH setup.","https:\u002F\u002Fgithub.com\u002FNeelakshSaxena\u002FVayu\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frunpod-mcp\u002FSKILL.md",[],[]]