मुख्य सामग्री पर जाएँ
Skillpedia
टेस्टिंग35k · #8231

performing-firmware-extraction-with-binwalk

यह क्या करती है

यह tool इलेक्ट्रॉनिक डिवाइस के अंदर के सॉफ्टवेयर (firmware) का विश्लेषण करता है। यह इस सॉफ्टवेयर के अंदर छिपी फाइलों को निकालता है और उनकी जांच करता है, ताकि पासवर्ड, configuration या system के हिस्से जैसी ज़रूरी जानकारी मिल सके।

कब इस्तेमाल करें

  • ✓जब इंटरनेट से डाउनलोड किए गए router या camera के firmware की जांच करनी हो।
  • ✓डिवाइस के सॉफ्टवेयर में छिपे पासवर्ड या security keys ढूंढने के लिए।
  • ✓जब यह समझना हो कि डिवाइस सॉफ्टवेयर कैसे काम करता है या उसमें कमजोरियां कहाँ हैं।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-firmware-extraction-with-binwalk/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-firmware-extraction-with-binwalk/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस डिवाइस का firmware analyze करो और उसमें पासवर्ड या access keys ढूंढो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह tool स्कैन करने के लिए 'binwalk' नाम के प्रोग्राम का इस्तेमाल करता है। यह firmware के अंदर छिपे अलग-अलग प्रकार के डेटा, जैसे file systems और compressed data, को पहचानता है और उन्हें निकालता है ताकि आप उनकी जांच कर सकें।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Performing Firmware Extraction with Binwalk

When to Use

  • Analyzing IoT device firmware downloaded from vendor sites or extracted from flash chips
  • Reverse engineering router, camera, or embedded device firmware for vulnerability research
  • Identifying embedded filesystems (SquashFS, CramFS, JFFS2, UBIFS) within firmware blobs
  • Detecting encrypted or compressed regions using entropy analysis
  • Extracting hardcoded credentials, API keys, certificates, or configuration files from firmware
  • Performing security assessments of embedded devices in authorized penetration tests

Do not use for analyzing standard desktop application binaries or malware samples that are not firmware images; use dedicated malware analysis tools instead.

Prerequisites

  • binwalk v3.x installed (pip install binwalk3 or from system package manager)
  • Python 3.8+ with standard libraries (struct, math, hashlib, subprocess)
  • SquashFS tools (unsquashfs) for mounting extracted SquashFS filesystems
  • Jefferson for JFFS2 filesystem extraction (pip install jefferson)
  • Sasquatch for non-standard SquashFS variants used by vendors like TP-Link and D-Link
  • strings utility (GNU binutils) for string extraction
  • Optional: firmware-mod-kit for repacking modified firmware images

Workflow

Step 1: Initial Firmware Reconnaissance

Perform a signature scan to identify embedded file types and their offsets:

# Basic signature scan - identify all recognized file types
binwalk firmware.bin

# Scan with verbose output showing confidence levels
binwalk -v firmware.bin

# Scan for specific file types only
binwalk -y "squashfs" firmware.bin
binwalk -y "gzip\|lzma\|xz" firmware.bin

# Opcode scan to identify CPU architecture
binwalk -A firmware.bin

# Scan for raw strings to find version info, URLs, credentials
binwalk -R "password" firmware.bin
binwalk -R "http://" firmware.bin

Step 2: Entropy Analysis

Analyze entropy to identify encrypted, compressed, and plaintext regions:

# Generate entropy plot
binwalk -E firmware.bin

# Entropy with specific block size for higher resolution
binwalk -E -K 256 firmware.bin

# Combined entropy and signature scan
binwalk -BE firmware.bin

Interpreting entropy values:

  • 0.0 - 1.0: Empty or padding regions (null bytes, 0xFF fill)
  • 1.0 - 5.0: Plaintext data, code, ASCII strings, configuration
  • 5.0 - 7.0: Compressed data (gzip, LZMA, zlib)
  • 7.0 - 7.99: Strongly compressed or encrypted data
  • ~8.0: Maximum entropy, likely encrypted or random data

Step 3: Extract Embedded Files

Extract all identified components from the firmware image:

# Automatic extraction of known file types
binwalk -e firmware.bin

# Recursive extraction (matryoshka mode) for nested archives
binwalk -Me firmware.bin

# Recursive extraction with depth limit
binwalk -Me -d 5 firmware.bin

# Extract specific file type with custom handler
binwalk -D "squashfs filesystem:squashfs:unsquashfs %e" firmware.bin

# Manual extraction of data at a known offset
dd if=firmware.bin of=extracted.squashfs bs=1 skip=327680 count=4194304

Step 4: Mount and Inspect Extracted Filesystems

Mount extracted filesystems for deep inspection:

# Mount SquashFS filesystem
mkdir /tmp/squashfs_root
unsquashfs -d /tmp/squashfs_root extracted.squashfs

# Mount CramFS filesystem
mkdir /tmp/cramfs_root
mount -t cramfs -o loop extracted.cramfs /tmp/cramfs_root

# Extract JFFS2 filesystem
jefferson extracted.jffs2 -d /tmp/jffs2_root

# Inspect the extracted filesystem
ls -la /tmp/squashfs_root/
find /tmp/squashfs_root -name "*.conf" -o -name "*.cfg" -o -name "*.key"
find /tmp/squashfs_root -name "passwd" -o -name "shadow"

Step 5: String Analysis and Credential Discovery

Search extracted filesystem and raw firmware for sensitive data:

# Extract all printable strings
strings -a firmware.bin > all_strings.txt
strings -n 12 firmware.bin | sort -u > long_strings.txt

# Search for credentials and secrets
grep -rni "password\|passwd\|secret\|api_key\|token" /tmp/squashfs_root/etc/
grep -rni "BEGIN.*PRIVATE KEY" /tmp/squashfs_root/

# Find hardcoded URLs and endpoints
grep -rnoE "https?://[a-zA-Z0-9./?=_-]+" /tmp/squashfs_root/

# Search for certificate files
find /tmp/squashfs_root -name "*.pem" -o -name "*.crt" -o -name "*.key" -o -name "*.p12"

# Identify busybox and service versions
strings /tmp/squashfs_root/bin/busybox | grep "BusyBox v"

…
अक्सर पूछे जाने वाले सवाल

firmware क्या होता है?

Firmware वह सॉफ्टवेयर है जो router, TV या camera जैसे इलेक्ट्रॉनिक डिवाइस में पहले से इंस्टॉल होता है। यह डिवाइस के बुनियादी काम नियंत्रित करता है।

entropy analysis क्या है?

यह मापने का तरीका है कि firmware के अंदर का डेटा कितना 'random' या अनुमान से बाहर दिखता है। बहुत ज़्यादा random डेटा का मतलब आम तौर पर यह होता है कि वह encrypted या compressed है।

SquashFS जैसे file systems क्या हैं?

ये firmware के अंदर फाइलों को व्यवस्थित और compress करने के तरीके हैं, जो छोटे डिवाइस में आम होते हैं। यह tool इनकी सामग्री खोलना और निकालना जानता है।

जानकारी

लेखक का मूल विवरण

Performs firmware image extraction and analysis using binwalk to identify embedded filesystems, compressed archives, bootloaders, kernel images, and cryptographic material. Covers entropy analysis for detecting encrypted or compressed regions, recursive extraction of nested archives, SquashFS/CramFS/JFFS2 filesystem mounting, and string analysis for credential and configuration discovery. Activate

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8231
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills