Firmware .bin signature scan and decompress
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
from kittysploit import *
from lib.analysis.binary.firmware_extractor import PyFirmwareExtractor
class Module(Analysis):
__info__ = {
"name": "Firmware .bin signature scan and decompress",
"description": (
"Detects common firmware signatures (gzip, lzma, xz, squashfs, ELF, etc.) "
"on a local file and recursively decompresses supported compressed formats."
),
"author": "KittySploit Team",
"references": [],
"cve": "",
"tags": ["firmware", "binary", "analysis", "gzip", "squashfs"],
}
firmware = OptString(
"",
"Local filesystem path to the firmware .bin file",
required=True,
)
output_dir = OptString(
"",
"Output directory for extracted data (default: <firmware_dir>/extracted)",
required=False,
advanced=True,
)
max_depth = OptInteger(
32,
"Max recursive decompression depth",
required=False,
advanced=True,
)
def check(self):
path = self.firmware or ""
path = str(path).strip()
if not path:
print_error("firmware option is required")
return False
if not os.path.isfile(path):
print_error(f"File not found: {path}")
return False
if not os.access(path, os.R_OK):
print_error(f"Not readable: {path}")
return False
return True
def run(self):
path = os.path.abspath(str(self.firmware or "").strip())
out = str(self.output_dir).strip() if self.output_dir else ""
extractor = PyFirmwareExtractor(path, output_dir=out or None)
try:
extractor.max_depth = int(self.max_depth)
except (TypeError, ValueError):
extractor.max_depth = 32
extractor.extract()
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation
29 Jun 2026 20:47Current
5.8Medium risk
Vulners AI Score5.8