performing-firmware-malware-analysis
यह क्या करती है
यह tool router और camera जैसे डिवाइस के सिस्टम में छिपे खतरनाक सॉफ्टवेयर (malware) की जांच में मदद करता है। यह डिवाइस के 'firmware' (उनका अंदरूनी सॉफ्टवेयर) को देखकर खतरनाक कोड या अनधिकृत बदलाव ढूंढता है।
कब इस्तेमाल करें
- ✓जब कोई इंटरनेट से जुड़ा डिवाइस (IoT) हैक हुआ लगे।
- ✓यह देखने के लिए कि firmware update में कुछ खतरनाक तो नहीं है।
- ✓जब malware की जांच करनी हो जो system startup पर इंस्टॉल होता है (UEFI/BIOS)।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-firmware-malware-analysis/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“इस router के firmware का विश्लेषण करो और देखो कि उसमें कोई छिपा malware तो नहीं है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह tool पहले firmware की सारी फाइलें निकालता है। फिर संदिग्ध फाइलें, खतरनाक कोड और उन चीज़ों को ढूंढता है जिनमें गलत तरीके से बदलाव किया गया हो।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Performing Firmware Malware Analysis
When to Use
- 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.
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
Step 1: Extract and Identify Firmware Components
Analyze the firmware image structure and extract filesystems:
# Identify embedded filesystems and compressed data
binwalk firmware.bin
# Extract all identified components
binwalk -e firmware.bin
# Recursive extraction with signature scanning
binwalk -eM firmware.bin
# Output typically includes:
# - Bootloader (U-Boot, GRUB, custom)
# - Kernel image (Linux, RTOS)
# - Root filesystem (SquashFS, JFFS2, CramFS, ext4)
# - Configuration data
# - Digital signatures or checksums
# Entropy analysis to find encrypted or compressed regions
binwalk -E firmware.bin
# Identify specific filesystem types
file _firmware.bin.extracted/*
# For SquashFS filesystems
unsquashfs _firmware.bin.extracted/squashfs-root.img
ls squashfs-root/
Step 2: Analyze the Extracted Filesystem
Search for malicious modifications in the firmware filesystem:
# Directory structure analysis
find squashfs-root/ -type f | head -50
# Search for suspicious files
find squashfs-root/ -name "*.sh" -exec ls -la {} \;
find squashfs-root/ -perm -4000 -type f # SUID binaries
find squashfs-root/ -name "*.so" -newer squashfs-root/bin/busybox # Modified libraries
# Check startup scripts for backdoors
cat squashfs-root/etc/init.d/rcS
cat squashfs-root/etc/inittab
ls -la squashfs-root/etc/rc.d/
# Search for hardcoded credentials
grep -rn "password\|passwd\|secret\|key\|token" squashfs-root/etc/ 2>/dev/null
grep -rn "root:" squashfs-root/etc/shadow 2>/dev/null
# Check for unauthorized SSH keys
find squashfs-root/ -name "authorized_keys" -exec cat {} \;
# Network configuration backdoors
cat squashfs-root/etc/hosts
grep -rn "iptables\|nc\|netcat\|ncat" squashfs-root/etc/ squashfs-root/usr/bin/
# Check for reverse shells in cron
find squashfs-root/ -name "crontab" -o -name "cron*" | xargs cat 2>/dev/null
# Identify all ELF binaries for analysis
find squashfs-root/ -type f -exec file {} \; | grep ELF
Step 3: Reverse Engineer Suspicious Binaries
Analyze extracted binaries that may be backdoors:
# Identify architecture and format
file squashfs-root/usr/bin/suspicious_binary
# Extract strings for IOC discovery
strings squashfs-root/usr/bin/suspicious_binary | grep -iE "http|ip|port|shell|connect|exec"
# Cross-reference against known firmware binaries
# Compare SHA-256 hashes with known-good firmware
sha256sum squashfs-root/usr/bin/* > current_hashes.txt
# diff against baseline: diff baseline_hashes.txt current_hashes.txt
# Import into Ghidra for disassembly (select correct architecture)
# ARM: ARM/AARCH64 (Little Endian for most IoT devices)
# MIPS: MIPS/MIPS64 (Big or Little Endian depending on device)
# x86: For UEFI modules
# Analyze with radare2 for quick triage
r2 -A squashfs-root/usr/bin/suspicious_binary
# Commands: afl (function list), pdf @main (disassemble main), iz (strings)
Step 4: UEFI/BIOS Firmware Analysis
Analyze system firmware for bootkits and implants:
# Extract UEFI firmware volumes with UEFITool
# GUI: UEFITool -> File -> Open -> Select firmware.rom
# CLI: UEFIExtract firmware.rom
# Analyze UEFI firmware with chipsec (requires hardware access)
python chipsec_main.py -m common.bios_wp # BIOS write protection
python chipsec_main.py -m common.spi_lock # SPI flash lock
python chipsec_main.py -m common.secureboot # Secure Boot status
…
अक्सर पूछे जाने वाले सवाल
'firmware' क्या है?
Firmware वह ज़रूरी सॉफ्टवेयर है जिससे डिवाइस चलता है, जैसे फोन का operating system या router का अंदरूनी प्रोग्राम।
'backdoors' क्या होते हैं?
Backdoors सिस्टम में छोड़े गए गुप्त access points होते हैं, ताकि कोई बिना पकड़े अंदर आ सके। आम तौर पर इनका इस्तेमाल गलत कामों के लिए होता है।
'UEFI/BIOS' क्या है?
यह वह पहला प्रोग्राम है जो कंप्यूटर चालू करने पर operating system लोड होने से भी पहले चलता है। Malware यहाँ छिपकर हटाना मुश्किल बना सकता है।
जानकारी
लेखक का मूल विवरण
Analyzes firmware images for embedded malware, backdoors, and unauthorized modifications in routers, IoT devices, UEFI/BIOS, 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. '
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #8232
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
test-driven-development
311kयह आपके एजेंट को किसी भी फ़ीचर या सुधार से पहले पहले असफल होने वाला टेस्ट लिखना, उसे असफल होते देखना, फिर पास करने वाला सबसे छोटा कोड लिखना सिखाती है।
verification-before-completion
311kयह आपके एजेंट को किसी काम, सुधार या build के पूरा या पास होने का दावा करने से पहले असली जांच चलाकर उसका आउटपुट पढ़ना सिखाती है।
migrate-to-shoehorn
310kआपकी टेस्ट फ़ाइलों में जोखिम भरे type casts की जगह shoehorn लाइब्रेरी लगाती है, ताकि टेस्ट अधूरे डेटा से भी type checks पास कर सकें।