cart
CaRT Neutering format
What it is and what it does
CaRT is a specialized file format designed to safely store and transfer malware samples by compressing them with zlib, encrypting them with RC4, and embedding associated metadata—including optional STIX v2 threat intelligence reports—all within a single .cart file. The format includes a mandatory header and footer structure that allows metadata and hash information to be read without decompressing the entire payload, and it uses a default RC4 key (first 8 digits of pi, twice) unless overridden with a custom key.
The package provides both a Python library for programmatic access and a command-line interface that automatically detects whether to encode or decode a file. It reads optional metadata from .cartmeta files with matching prefixes and supports configuration via ~/.cart/cart.cfg. The primary use case is in malware analysis and threat intelligence workflows where samples must be safely archived and shared without triggering antivirus detection or accidental execution.
Use it for:
- Archive malware samples for security research with embedded STIX v2 threat reports without triggering antivirus alerts
- Transfer suspected malware between security teams with metadata and hash verification built into the file structure
- Store malware collections with streaming compression to reduce storage footprint while preserving metadata accessibility
- Integrate threat intelligence reports directly into malware samples for downstream analysis tools via STIX v2 JSON embedding
- Read file hashes and metadata from archived samples without decompressing the full payload for rapid triage
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
CaRT is a file format and Python library for compressing, encrypting, and storing malware samples alongside metadata using RC4 and zlib, with optional STIX v2 integration.
Yes, if you work in malware analysis, threat intelligence, or security research and need a standardized format for safe malware storage and transfer with embedded metadata. The low install friction, permissive license, and lack of known vulnerabilities make it a safe choice. However, note that maintenance is dormant and RC4 is cryptographically weak by modern standards—verify that RC4 meets your security requirements before adopting for new systems rather than legacy workflows.
Install
cart on PyPI
pip
pip install cartuv
uv add cartpoetry
poetry add cartInstalling cart
Before you install
Low install friction with a single runtime dependency (pycryptodome). Maintenance is dormant—last commit was 2025-02-10 but no releases for 550 days prior, suggesting the package is stable but not actively developed.
License in practice
MIT license (permissive) places no restrictions on use, modification, or redistribution in proprietary or open-source contexts.
Quickstart
pip install cart
from cart import CaRT
# Encode a file with optional metadata
cart = CaRT()
cart.encode('malware.exe', 'malware.exe.cartmeta')
# Decode a CaRT file
cart.decode('malware.exe.cart')
Requires pycryptodome for RC4 encryption; Python 3.6 or later.
Verify before relying
- Whether RC4 encryption meets current security standards for new deployments versus legacy/archival use only
- Performance characteristics and streaming efficiency claims relative to standard compression tools
- Compatibility with STIX v2 implementations beyond the JSON embedding example shown
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pycryptodome |
| Maintenance | dormant — 550 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 360,936/month — #7,241 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cart-1.2.3-py2.py3-none-any.whl
Keywords: neutering, format, malware, cart, stix, development, gc, canada, cse-cst, cse, cst, cccs, cyber
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
Flask-CompressFlask-Compress automatically compresses Flask…
permissive · top 5,000 on PyPI
stix2Serializes and deserializes STIX 2 JSON…
permissive · top 5,000 on PyPI
clamdclamd is a Python interface to the ClamAV…
copyleft · top 5,000 on PyPI
clamav-clientA Python client library for the ClamAV…
copyleft · top 15,000 on PyPI
mixboxMixbox provides shared utility code for…
permissive · top 15,000 on PyPI
pyminizipCreates password-encrypted ZIP files that can…
permissive · top 15,000 on PyPI
cmeel-zlibProvides zlib 1.3.2 as a pre-built wheel for…
permissive · top 15,000 on PyPI
malduckMalduck provides cryptographic, compression,…
copyleft · top 15,000 on PyPI
pylzsspylzss decodes and encodes data compressed with…
copyleft · top 15,000 on PyPI
pyClamdpyClamd provides a Python interface to the…
copyleft · top 15,000 on PyPI