Skip to main content

qarbaal

Extract, normalize, validate, and export indicators of compromise from text and files.

Python 3.10–3.13 License: MIT CI Documentation

Documentation: https://ahur4.github.io/Qarbaal/

qarbaal reads reports, logs, and message files on your machine and returns classified indicators. It refangs defanged text, records where each value came from, and writes CSV, JSON, STIX 2.1, MISP, OpenIOC, and network rules. The base install uses only the Python standard library. It does not call an enrichment API.

Installation

Python 3.10 or newer.

pip install qarbaal

That install has no runtime dependencies. Optional readers are separate extras:

pip install "qarbaal[html]"    # HTML
pip install "qarbaal[pdf]"     # PDF
pip install "qarbaal[docx]"    # Word
pip install "qarbaal[yaml]"    # YAML
pip install "qarbaal[pcap]"    # packet captures
pip install "qarbaal[pydantic]"
pip install "qarbaal[all]"

Quickstart

from qarbaal import IOCExtractor, extract

report = """
From: support[at]corp-it-desk[.]com
Lure: hxxps://login[.]corp-it-desk[.]com/session
Beacon: 185.220.101.42
MD5: d41d8cd98f00b204e9800998ecf8427e
"""

result = extract(report)
for indicator in result:
    print(indicator.type, indicator.value, indicator.tags, indicator.line)

extractor = IOCExtractor(
    extract_types=["ipv4", "domain", "url", "hash", "email"],
    normalize=True,
    validate=True,
    deduplicate=True,
)
same = extractor.extract(report, source="ticket-14")

extract() uses the default type set. File paths, mutex names, and User-Agent strings stay out of that set until you ask for them with extract_types or "all".

A synthetic incident is included:

from qarbaal import SAMPLE, extract

print(extract(SAMPLE).stats.counts)

What you get back

Each indicator keeps three strings:

Field Meaning
value First-seen sieve form. Hashes are lower case, CVE IDs are upper case.
raw Exact slice of the source, which may still be defanged.
normalized Canonical form used for the fingerprint.

It also carries noise tags, a validation result, a confidence heuristic, local enrichment, pivot links, and one sighting per occurrence (source, line, offset, and page when the file has pages).

Command line

qarbaal report.txt
qarbaal mail.eml notes.json -f stix -o bundle.json
qarbaal --hide-private --defang -f table alerts.log
qarbaal --types all -f suricata capture.txt

With no file, qarbaal reads stdin. Formats: table, csv, json, jsonl, stix, list, misp, openioc, suricata, snort.

Further reading

Metadata

Release files for qarbaal 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qarbaal 0.1.0
File Size Uploaded Provenance Actions
qarbaal-0.1.0.tar.gz 58.6 kB Without provenance Details for qarbaal-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for qarbaal 0.1.0
File Interpreter ABI Platform Actions
qarbaal-0.1.0-py3-none-any.whl Python 3 none any Details for qarbaal-0.1.0-py3-none-any.whl

Total release size: 111.8 kB

Release files / qarbaal-0.1.0.tar.gz

Download URL qarbaal-0.1.0.tar.gz
Size 58.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a9e901f2e458a9d088f3d9cb5586388d25128c204804615e6b8c10ff08cd0f8b
BLAKE2b-256 checksum
How to use checksums
501a7ff2e8e96dbee3435d3bb0e4d4638c7076510cb025c0d4d805d043e7b027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / qarbaal-0.1.0-py3-none-any.whl

Download URL qarbaal-0.1.0-py3-none-any.whl
Size 53.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8dd4096a6e95c0af1dd0543b1efcdd9f9f94695749579117197229a35680c0e0
BLAKE2b-256 checksum
How to use checksums
dd7cb1e8f4564b1045c66204b83c0ef919af6d4851f210d93a07db4d5d69f631
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for qarbaal 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page