ja3

Crates.ioja3
lib.rsja3
version0.5.1
sourcesrc
created_at2020-04-08 02:39:42.064425
updated_at2020-06-20 19:11:21.17315
descriptionJA3 hash library in Rust
homepagehttps://github.com/jabedude/ja3-rs/
repositoryhttps://github.com/jabedude/ja3-rs/
max_upload_size
id227526
size66,980
Josh Abraham (jabedude)

documentation

https://docs.rs/ja3

README

ja3-rs

crates.io Build Status Documentation license

A small JA3 TLS fingerprinting library written in Rust.

This crate enables a consumer to fingerprint the ClientHello portion of a TLS handshake. It can hash TLS handshakes over IPv4 and IPv6. It heavily depends on the tls-parser project from Rusticata.

It supports generating fingerprints from packet capture files as well as live-captures on a network interface, both using libpcap.

See the original JA3 project for more information.

Example of fingerprinting a packet capture file:

use ja3::Ja3;

let mut ja3 = Ja3::new("test.pcap")
                    .process_pcap()
                    .unwrap();

// Now we have a Vec of Ja3Hash objects
for hash in ja3 {
    println!("{}", hash);
}

Example of fingerprinting a live capture:

use ja3::Ja3;

let mut ja3 = Ja3::new("eth0")
                    .process_live()
                    .unwrap();
while let Some(hash) = ja3.next() {
    println!("Hash: {}", hash);
}

Benchmarks

Command Mean [ms] Min [ms] Max [ms] Relative
ja3 huge-cap.pcap 153.2 ± 2.3 149.8 157.2 34.85 ± 2.82
./target/release/examples/ja3 huge-cap.pcap 4.4 ± 0.3 3.6 5.5 1.00
Commit count: 62

cargo fmt