packet_entropy
Calculates Shannon entropy of PCAP packet payloads to detect randomness, distinguishing plaintext or structured data from encrypted, compressed malware or C2 traffic.
Instructions
Calculates Shannon entropy (0.0 to 8.0 bits/byte) to evaluate payload randomness and distinguish between plaintext, structured data (JSON/HTML/code), and encrypted / compressed malware or C2 traffic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | No | Base64-encoded PCAP file bytes (max 10MB). | |
| filePath | No | Absolute path to a PCAP file on disk (local stdio only). | |
| packetIndex | No | Optional zero-based packet index to calculate entropy for a single packet payload. |