← Course Index

2.2 High-Speed Full Packet Capture:
Arkime (Moloch) Indexing, Session Reconstruction & JA4+ Fingerprinting

Writing Rolling PCAP Segments to Disk, Indexing Session Metadata in OpenSearch/Elasticsearch, Extracting Files & Hunting TLS/HTTP/SSH Fingerprints

Module 2: NDR & Segmentation Arkime Full PCAP JA4+ Fingerprinting

1. How Arkime Combines Full PCAP Storage with Searchable Session Metadata

Metadata logs alone tell you what happened, while raw packet captures (PCAP) prove exactly what traveled across the wire—including unencrypted payloads, custom protocol headers, TLS handshakes, and transferred files. Storing every raw packet in an index would explode storage costs, so Arkime (formerly Moloch) separates the problem into two tiers:

Why Full PCAP Matters in Investigations: When an alert surfaces hours or days after an intrusion, analysts can jump directly to the exact TCP/UDP stream in Arkime, inspect reassembled payload bytes, extract transferred binaries/documents, or export a scoped `.pcap` slice for Wireshark deep analysis.
NETWORK TAP / SPAN High-Throughput Link 1G / 10G / 40G Mirror BPF Filtering Drop noisy bulk traffic only if policy permits ARKIME CAPTURE NODE Packet Ingestion & Sessionizer libpcap / AF_PACKET • 5-Tuple Flow Tracking Protocol Parsers & Fingerprinting HTTP • DNS • TLS/JA4+ • SSH • SMB • Files PCAP Writer & Indexer Bulk Sender Rolling .pcap segments + file/offset pointers Bulk JSON session docs → OpenSearch/ES RAW PCAP STORAGE Rolling PCAP Files on Disk Retention Aged by Disk Watermark Random-Access Byte Offset Reads OPENSEARCH / ES + VIEWER UI Session Search, SPI Graph & PCAP Export Reassembled Streams & File Carves REST API for SOC & SOAR Pivots
Figure 2.2: Arkime Full Packet Capture Architecture Writing Rolling PCAP Segments to Disk While Indexing Session Metadata in OpenSearch/Elasticsearch.

2. TLS / HTTP / SSH Fingerprinting & Storage Retention Tuning

Encrypted traffic hides payload text, but client and server handshake parameters still reveal valuable behavioral patterns. Modern network telemetry uses client/server fingerprints—such as JA4 / JA4+ (which extends TLS client fingerprinting with structured application/transport/QUIC/HTTP/SSH fingerprint variants), along with HTTP header/user-agent and SSH banner/algorithm metadata—to group sessions sharing similar client stacks even when domains or IPs rotate.

Telemetry / Tuning Area Operational Mechanism Analyst / Architect Value
JA4+ & TLS Metadata Captures TLS version, cipher suites, extensions, ALPN, SNI, certificate fields, and JA4+ fingerprint strings. Spots unusual client stacks, custom tooling, or recurring TLS handshakes across shifting C2 endpoints.
Session Reconstruction Reassembles TCP streams and HTTP/DNS/SMTP/SMB exchanges; links sessions to PCAP file offsets. Lets analysts view ASCII/hex/HTTP/image/file views of exact sessions without digging through raw dumps manually.
Rolling PCAP Retention Writes bounded PCAP files and deletes/ages oldest files based on disk free-space / retention limits. Prevents packet capture disks from filling up and stalling `capture` ingestion.
Index Lifecycle (ILM/ISM) Rolls daily/periodic session indices and ages cold/old session documents on a predictable schedule. Keeps search queries fast and aligns index retention with PCAP storage windows.
Capacity Planning Rule: Full packet capture consumes storage rapidly—a sustained 1 Gbps link at full utilization generates roughly ~10.8 TB of raw PCAP per day (~450 GB/hour) before compression/filtering. Size PCAP storage and BPF filters realistically for your link speed and retention target.

3. Practical Arkime Configuration, Search & PCAP Examples (10 Scenarios)

Example 1: Core Arkime capture ini Configuration (config.ini)

INI (/opt/arkime/etc/config.ini) — Basic Capture, PCAP Dir & OpenSearch Settings
[default]
elasticsearch = http://127.0.0.1:9200
pcapDir = /data/arkime/pcap
maxFileSizeG = 12
maxFileTimeM = 1440
freeSpaceG = 10%
bpf = not port 22
yaraFile = /opt/arkime/etc/yara.rules
SAMPLE OUTPUT
# Output from `/opt/arkime/bin/capture -c /opt/arkime/etc/config.ini --debug` startup check:
[INFO] Connected to OpenSearch/Elasticsearch cluster at http://127.0.0.1:9200 (status: green)
[INFO] PCAP directory /data/arkime/pcap verified (maxFileSizeG=12, freeSpaceG=10%)
[INFO] Compiled BPF filter: "not port 22" | Loaded YARA ruleset: /opt/arkime/etc/yara.rules

Example 2: Arkime Viewer Search — Finding Large Outbound Transfers

Arkime Search Expression — Filtering Sessions by Source Subnet & Sent Bytes
ip.src == 10.10.20.0/24 && !ip.dst == 10.0.0.0/8 && bytes.src > 10000000
SAMPLE OUTPUT
Matched Sessions: 2
1) 2026-11-26 09:14:22 | 10.10.20.41:52110 -> 198.51.100.120:443 | proto: tcp/tls | bytes.src: 24,812,900 | bytes.dst: 19,402
2) 2026-11-26 08:47:05 | 10.10.20.18:49802 -> 203.0.113.99:80   | proto: tcp/http | bytes.src: 14,820,400 | bytes.dst: 245

Example 3: Arkime Search — Hunting Suspicious HTTP User-Agents & Status Codes

Arkime Search Expression — Querying HTTP Host, URI, Status & User-Agent
protocols == http && http.method == POST && (http.useragent == *curl* || http.useragent == *python* || http.uri == */upload*)
SAMPLE OUTPUT
Matched Sessions: 3
1) 10.10.30.12 -> 203.0.113.99:80 | POST upload-sync.example/api/v1/upload | Status: 200 | UA: python-requests/2.31.0
2) 10.10.19.08 -> 198.51.100.44:8080 | POST drop.example/upload | Status: 201 | UA: curl/8.5.0

Example 4: Arkime Search — Pivoting on TLS SNI & Certificate Fields

Arkime Search Expression — Inspecting TLS SNI, Issuer & JA4 Fingerprints
protocols == tls && (cert.subject.cn == *temp* || tls.ja4 == *t13d1516h2_*)
SAMPLE OUTPUT
Matched Sessions: 4
1) 10.10.24.55 -> 198.51.100.72:443 | SNI: cdn-sync-check.example | Cert CN: CN=temp-node-01 | JA4: t13d1516h2_8daaf6152771_e5627efa2ab1

Example 5: Arkime Search — Hunting DNS Queries with Long Labels or Unusual Types

Arkime Search Expression — Filtering DNS Queries by Name Pattern
protocols == dns && dns.query == /^[a-z0-9]{30,}\./
SAMPLE OUTPUT
Matched Sessions: 18
1) 10.10.15.88:54912 -> 10.10.0.53:53 | QName: 7f8a9c2e4b6d1035a8c7e9b1d3f5a7c9.sub.tunnel-test.example | Type: TXT | Status: NOERROR

Example 6: Importing an External PCAP File into Arkime via capture CLI

Shell (Arkime capture) — Indexing an Existing PCAP & Tagging Sessions
/opt/arkime/bin/capture -c /opt/arkime/etc/config.ini \
  -r /tmp/incident_capture.pcap \
  --tag "IR-Case-2026-114"
SAMPLE OUTPUT
Processing /tmp/incident_capture.pcap
Final cleanup
Total Packets: 48,920 | Sessions Indexed: 612 | Tag Applied: IR-Case-2026-114

Example 7: Extracting a Filtered PCAP Slice Using tcpdump

Shell (tcpdump) — Carving a Focused PCAP for a Specific Host & Port
tcpdump -r /data/arkime/pcap/sensor01-261125-000001.pcap \
  -w /tmp/suspect_10_10_24_55.pcap \
  'host 10.10.24.55 and port 443'
SAMPLE OUTPUT
reading from file /data/arkime/pcap/sensor01-261125-000001.pcap, link-type EN10MB (Ethernet), snapshot length 262144
# Wrote 318 matching packets to /tmp/suspect_10_10_24_55.pcap (244 KB)

Example 8: Inspecting Reassembled TCP Stream Content with tshark

Shell (tshark) — Extracting ASCII Payload from a Specific TCP Stream
tshark -r /tmp/suspect_10_10_24_55.pcap \
  -q -z follow,tcp,ascii,0
SAMPLE OUTPUT
===================================================================
Follow: tcp,ascii
Filter: tcp.stream eq 0
Node 0: 10.10.24.55:51422
Node 1: 203.0.113.99:80
184
POST /api/v1/upload HTTP/1.1
Host: upload-sync.example
User-Agent: python-requests/2.31.0
Content-Length: 42

{"host":"app-node-04","status":"ready"}
===================================================================

Example 9: YARA Rule for Packet/Session Payload Scanning in Arkime

YARA Rule — Flagging Cleartext Credential Keywords or Suspicious Strings
rule Suspicious_Cleartext_Auth_Header {
  strings:
    $a = "Authorization: Basic " ascii nocase
    $b = "password=" ascii nocase
  condition:
    any of them
}
SAMPLE OUTPUT
[ARKIME SESSION TAGGER]
  Matched YARA Rule : Suspicious_Cleartext_Auth_Header
  Applied Tag       : yara:Suspicious_Cleartext_Auth_Header
  Session           : 10.10.14.22:50318 -> 10.10.50.12:8080 (HTTP cleartextBasic Auth observed)

Example 10: Querying the Arkime Viewer REST API in Python

Python (requests) — Searching Sessions via Arkime Viewer API
import requests

ARKIME_URL = "http://127.0.0.1:8005"
params = {
    "expression": "ip.src == 10.10.24.55 && bytes.src > 100000",
    "length": 25
}

resp = requests.get(f"{ARKIME_URL}/api/sessions", params=params, verify=False)
data = resp.json()
print("Matched sessions:", data.get("recordsFiltered"))
for s in data.get("data", []):
    print(s.get("id"), s.get("srcIp"), "->", s.get("dstIp"), "bytes.src:", s.get("srcBytes"))
SAMPLE OUTPUT
Matched sessions: 2
261126-V8k2mN9pQrStUvWxYz1234 10.10.24.55 -> 198.51.100.72 bytes.src: 482190
261126-K3m9pL2wQxRtYuIoPa5678 10.10.24.55 -> 203.0.113.99 bytes.src: 14820400

4. Interactive Arkime Session & PCAP Triage Simulator

Select a network investigation scenario below to see the Arkime search filter, session metadata summary, and packet-level follow-up:

← Previous: 2.1 Network Security Monitoring (Zeek) Next: 2.3 Software-Defined Micro-Segmentation →