pattern_match
Mode: unknown_key · File: algorithms/unknown_key/pattern_match.py
Match a structural pattern around a candidate window. MemDiver loads JSON
definitions from algorithms/patterns/. It applies a definition when its
library and protocol selectors match the context. The entropy scanner
provides the candidate windows.
JSON pattern schema
{
"name": "boringssl_tls13_exporter",
"applicable_to": {
"libraries": ["boringssl"],
"protocol_versions": ["TLS13"]
},
"key_spec": { "length": 32, "entropy_min": 4.5 },
"pattern": {
"before": [ { "offset": -8, "bytes": "00010203...", "mask": "ffff..." } ],
"after": [ { "offset": 32, "bytes": "...", "mask": "..." } ]
}
}
MemDiver includes boringssl_tls13.json, openssl_tls12.json, and openssh_ssh2.json.