Skip to main content

pcaptriage

Triage automatique de captures reseau, construit au-dessus de Zeek.

Wireshark est manuel : tu ouvres un pcap et tu cherches toi-meme. pcaptriage fait l'inverse. Il laisse Zeek parser les protocoles, puis il applique une couche de triage : il detecte des comportements suspects, les mappe sur MITRE ATT&CK, et sort un rapport HTML priorise plus un JSON automatisable. Pensé pour traiter un pcap (ou un dossier entier) en une commande et rendre un verdict lisible, pas pour remplacer le decodeur de Wireshark.

Ce qu'il detecte

Detection Signal MITRE
Credentials en clair FTP/HTTP basic auth, services non chiffres T1552, T1040
Scan de ports / hotes une source touche beaucoup de ports/hotes, connexions non abouties T1046
DNS tunneling / exfiltration fort volume + noms longs/haute entropie vers un domaine T1071.004, T1048
Beaconing / C2 rappels a intervalle quasi constant vers une meme destination T1071, T1095
Certificats TLS suspects certificats auto-signes, expires ou non valides T1573

Prerequis

  • Python 3.9+ (teste sur 3.14). Aucune dependance pip, stdlib uniquement.
  • Zeek, au choix :
    • local : zeek dans le PATH ;
    • Docker (recommande sur Kali, ou le paquet .deb casse la libc) :
      docker pull zeek/zeek:lts
      

Installation

# en tant que commande systeme (recommande, via pipx)
pipx install git+https://github.com/zakeelm6/pcaptriage.git

# ou avec pip, dans un venv
pip install git+https://github.com/zakeelm6/pcaptriage.git

# en developpement, depuis une copie locale
pip install -e .

Une fois installe, la commande pcaptriage est disponible. Sans installation, tout marche aussi via python3 -m pcaptriage.

Usage

# un seul pcap, Zeek via Docker
pcaptriage capture.pcap --docker

# un dossier entier de captures
python3 -m pcaptriage ./captures/ --docker -o resultats/

# Zeek installe en local
python3 -m pcaptriage capture.pcap

Sortie, par capture, dans le dossier -o (defaut pcaptriage-report/) :

pcaptriage-report/
  <nom-capture>/
    report.html      <- rapport lisible (clair/sombre), findings prioritises
    findings.json    <- meme contenu, automatisable (injectable dans un SIEM)
    zeek-logs/       <- logs Zeek bruts (conn/dns/http/ssl/...)

Architecture

pcap --> Zeek (parsing) --> *.log JSON --> loader --> detections --> findings
                                                          |             |
                                                      MITRE map     report HTML + JSON
  • zeek_runner.py lance Zeek (local ou Docker) et produit les logs JSON.
  • loader.py charge les logs en memoire.
  • detections/ : une detection = une fonction decoree @register qui prend les logs et renvoie des Finding. Ajouter une detection = ajouter un fichier.
  • mitre.py : table technique -> (nom, lien).
  • report.py : resume de la capture + rendu HTML autonome.
  • cli.py : orchestration, mode fichier ou dossier.

Feuille de route

  • ARP spoofing / MITM, LLMNR/NBT-NS poisoning
  • Extraction de fichiers (files.log) et de credentials additionnels
  • Moteur de regles externes (YAML/Sigma-like) pour etendre sans coder
  • Graphe de communication dans le rapport
  • Sortie directe vers Elasticsearch (lien avec Mini-SOC)

Note

Outil d'analyse defensive / forensic sur des captures que tu es autorise a analyser. Les logs peuvent contenir des donnees sensibles (identifiants, hotes) : traite les sorties en consequence.

Metadata

Release files for pcaptriage 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 pcaptriage 0.1.0
File Size Uploaded
pcaptriage-0.1.0.tar.gz 16.9 kB Details

Built distribution (wheel)

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

Total release size: 36.2 kB

Release files / pcaptriage-0.1.0.tar.gz

Download URL pcaptriage-0.1.0.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a468143351e9678ec1fc3a8ad33202512efd089ce9f1167fbc9ba736200d6120
BLAKE2b-256 checksum
How to use checksums
839a48db37fd3e0c8bd7726022251a12b3425e031ecb8806dae34c34e11922cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

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

Download URL pcaptriage-0.1.0-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90b6b3508ff580e0942f170682d6a173027a85d7885b9f5ba8381aa4be4b6c5e
BLAKE2b-256 checksum
How to use checksums
3f69bd59a3ff05a681c578a748e72dc33b3d619a0bf6691827f110381bb8cb86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.0 This release

2 release files

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