رأس القلم
كالي
ل AMD64
ماك
ل ARM64
ماك
قريباً
النوافذ
قريباً

شرح الرمز البريدي للموت (2025): كيف لا تزال قنابل تخفيف الضغط تعطل الأنظمة وما يمكنك فعله

What a Zip of Death (Decompression Bomb) Really Is

A Zip of Death—also known as a zip bomb أو decompression bomb—is a malicious archive file crafted to exploit the fundamental behavior of compression formats. When such a file is decompressed, it may expand to an enormous size, overwhelming system resources and bringing processes or even entire servers to a halt. What makes this attack subtle and still relevant today is that it abuses legitimate functionality: decompression. Modern systems expect compressed files to be harmless, but a zip bomb quietly consumes CPU, memory, storage, or I/O capacity when unpacked.

Unlike malware that executes code or steals data, a Zip of Death is a denial-of-service weapon embedded in an archive. Its goal is not direct theft but resource exhaustion and service disruption, often creating openings for further exploitation or simply crippling automated workflows.

شرح الرمز البريدي للموت (2025): كيف لا تزال قنابل تخفيف الضغط تعطل الأنظمة وما يمكنك فعله
What a Zip of Death (Decompression Bomb) Really Is

How Zip of Death Works: The Technical Mechanics

The classic Zip of Death leverages recursive compression: nested archives compress increasingly large data sets into deceptively small files. A famous historical example is the “42.zip” file: around 42 KB in compressed size, yet decompressing into over 4.5 petabytes of data.

This happens because the ZIP format’s design allows references to large content that is only materialized during unpacking. The decompression process allocates memory and disk for all data before passing control back to the calling application, so systems that don’t enforce limits quickly run out of resources.

In modern environments—cloud pipelines, microservices, CI/CD systems—this resource explosion can take down not just a single program but entire clusters as services repeatedly fail and restart.

Real 2025 Security Incidents Involving Zip or Archive Handling

Although classic decomposition bomb attacks are hard to trace in the wild (since attackers often combine them with other tactics), 2025 brought several high-impact vulnerabilities and exploitation patterns in ZIP and decompression contexts:

CVE-2025-46730: Improper Handling of Highly Compressed Data

This vulnerability, identified in the MobSF (Mobile Security Framework), allows a zip-of-death style file to exhaust server disk space because the application doesn’t check the total uncompressed size before extraction. A crafted ZIP of 12–15 MB can expand to several gigabytes upon decompression, resulting in server denial of service. Feedly

Attackers could target file upload endpoints without triggering traditional malware signatures, simply using decompression to crash services and disrupt mobile security testing workflows.

7-Zip Vulnerabilities Actively Exploited (CVE-2025-11001 & CVE-2025-0411)

Zip bombs became more dangerous in 2025 as attackers leveraged flaws in widely used decompression tools like 7-Zip. The vulnerabilities tracked as CVE-2025-11001 and CVE-2025-11002 involved improper handling of symbolic links within ZIP files, allowing crafted archives to write files outside of intended directories and potentially execute code on Windows systems. Help Net Security

Another related flaw, CVE-2025-0411, involved a Mark-of-the-Web (MoTW) bypass allowing nested archives to evade Windows security checks when extracted. NHS England Digital

Both of these show a real 2025 trend: combining decompression abuse with path traversal and privilege escalation mechanics, effectively turning a Zip of Death into a more serious threat than traditional resource exhaustion.

Why Zip of Death Still Matters in 2025

Many security practitioners assume zip bombs are an old trick, detected by antivirus tools or irrelevant in modern cloud environments. But as recent incidents demonstrate, the real danger lies in where and how decompression is invoked. Systems that automatically process archives—mail gateways, CI/CD runners, cloud object processors, and dependency managers—often lack adequate checks. This can result in:

  • Denial of Service as CPUs and memory max out.
  • Downstream outages cascading across distributed infrastructure.
  • Security scanning tools failing under resource load, creating blind spots. Abnormal AI
  • Exploitation of parsing bugs, including symbolic link traversal and path misuse.

Thus, Zip of Death is still a relevant threat in mission-critical and automation-centric systems.

Demonstration: What a Zip of Death Looks Like

Attack Example 1: Simple Zip of Death Creation

Below is a simple example that creates nested archives where each layer exponentially increases decompress size.

باش

`#Generate base data dd if=/dev/zero of=payload.bin bs=1M count=100

Compress recursivelyzip layer1.zip payload.bin

zip layer2.zip layer1.zip zip layer3.zip layer2.zip`

This final layer3.zip might be only a few kilobytes, but decompressing it naively could result in large disk and memory consumption.

Attack Example 2: Deep Nesting to Bypass Shallow Checks

Attackers often embed nested zips inside directories to evade simple size checks:

باش

mkdir nestedcp layer3.zip nested/ zip final.zip nested

Some naive checks only look at final.zip compressed size, not nested inflate potential.

Attack Example 3: CI/CD Decompression Bomb Trigger

In CI environments:

yaml

`#Example snippet in .gitlab-ci.yml before_script:

  • unzip artifact.zip -d /tmp/build`

إذا كان artifact.zip is a Zip of Death, the build agent may crash or the pipeline may hang indefinitely due to resource exhaustion.

Attack Example 4: Email Gateway Decompression Abuse

Mail security products often unpack attachments for content inspection:

text

Attachment: promo.zip (75 KB)

If the decompressed size is massive, the scanning engine may capsize, leading to delayed or blocked mail delivery.

Attack Example 5: Exploiting ZIP Parsing Vulnerability (PickleScan Crash)

A 2025 advisory revealed how malformed ZIP headers can cause scanning tools to crash—not via resource exhaustion but through parsing inconsistencies (triggering errors like BadZipFile). جيثب

بايثون

with zipfile.ZipFile('malformed.zip') as z: z.open('weird_header')

This can bypass quality checks and disrupt automated scanning systems.

Defense Strategies Against Zip of Death

Mitigating Zip of Death attacks requires multiple overlapping controls because the root issue is a functional one (decompression itself), not a bug in a single program.

Defense Strategy 1: Pre-Decompression Size Estimation

Check the total expected uncompressed size before extraction.

بايثون

import zipfile with zipfile.ZipFile("upload.zip") as z: total = sum(info.file_size for info in z.infolist())if total > 1_000_000_000: # ~1GB raise Exception("Archive too large")

This helps prevent catastrophic expansion.

Defense Strategy 2: Limit Recursive Depth

Track and limit how deep nested archives can go.

بايثون

def safe_extract(zf, depth=0):

if depth > 3:

raise Exception("Too many nested archives")

for info in zf.infolist():

if info.filename.endswith('.zip'):

with zf.open(info.filename) as nested:

safe_extract(zipfile.ZipFile(nested), depth+1)

Defense Strategy 3: Resource Sandboxing

Run decompression in isolated kernels or containers with hard quotas to avoid affecting system services:

باش

docker run --memory=512m --cpus=1 unzip image.zip

Even if the archive tries to consume resources, the process is bounded.

Defense Strategy 4: Streaming Extraction with Abort Conditions

Instead of full extraction, handle chunked reads and abort early:

بايثون

if extracted_bytes > THRESHOLD: abort_extraction()

This stops runaway expansions early.

Defense Strategy 5: Update Vulnerable Libraries and Tools

Actively patch known decompression library vulnerabilities like those in 7-Zip (e.g., CVE-2025-11001 and CVE-2025-0411) to avoid parsing exploits that combine zip bombs with traversal or code execution. SecurityWeek

A 2025 ZIP Vulnerability Comparison Table

To give structure to the current threat landscape, here’s a snapshot of ZIP-related risks seen in 2025:

Threat Categoryمثال على ذلكالتأثير
Decompression BombClassic recursive archiveResource exhaustion, DoS
Parsing ExploitCVE-2025-46730Crash tools / fill disk
ZIP Parser FlawsCVE-2025-11001Arbitrary file writes
MotW BypassCVE-2025-0411Security check evasion

Penligent.ai: Automated Detection of Archive Risks

Zip of Death and similar archive attacks are not easy to find by static scanning alone, because they exploit protocol semantics و run-time behavior, not just known byte signatures. This is where modern automated penetration platforms like Penligent.ai shine.

Penligent.ai uses AI-driven intelligent fuzzing and scenario generation to test:

  • Upload endpoints under varying archive sizes and nested structures
  • Backend decompression logic for resource enforcement
  • Archive parsing paths with symbolic links and special headers
  • Error handling code that might silently accept dangerous inputs

By simulating real attack patterns like recursive nesting or malformed header attacks, Penligent.ai helps engineers detect and prioritize risks that traditional scanners miss.

In microservice or cloud-native environments where file handling is done by many independent components, this kind of continuous, automated testing is essential for finding gaps before attackers do.

Advanced Zip Attack Trends in 2025

Aside from classic decompression bombs, 2025 saw more nuanced ZIP-based exploitation:

  • ZIP parsing flaws used in combined attacks (resource exhaustion + code execution)
  • Homoglyph-spoofed archive extensions bypassing security filters
  • Nested archive exploitation to evade “maximum archive size” rules
  • Abuse of symbolic link handling to achieve directory traversal

These patterns show that the simplistic view of zip bombs as DOS triggers is outdated; modern threats blend logic flaws with resource attacks.

Legal and Ethical Considerations

Zip bombs themselves are not always illegal to create—security researchers often use them as test cases. However, distributing them with malicious intent (for disruption or unauthorized access) can fall under computer misuse and DoS legislation, such as the U.S. CFAA or similar statutes in other jurisdictions. LegalClarity

This underscores the importance of handling defensive research responsibly and ensuring proofs-of-concept stay in secure lab environments.

Conclusion: Zip of Death Is Not a Relic—It’s a Persistent Risk

Even in 2025, amid advanced malware and AI-enabled threats, the Zip of Death remains relevant because it exploits a fundamental assumption in software design: that decompression is safe.

Modern automation—from email gateways to cloud pipelines—trusts compressed files without adequate sanity checks. When those assumptions fail, entire services can go offline.

By combining proactive defenses, keeping libraries patched against parsing vulnerabilities, and leveraging tools like Penligent.ai for continuous simulated attacks, security teams can stop Zip of Death attacks before they stop their systems.

شارك المنشور:
منشورات ذات صلة