Exploit databaseDownload repository ZIP
GH-945bd5267b0d1b94c3f74faf5cda7e5a
blkph0x/cve-2026-83844_poc
Sources for CVE-2026-83844
5 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files579
blkph0x/cve-2026-83844_pocRevision 193ed44859da
- ↑..Parent directory
- afl_emf_gdiplus/
- capture/
- generated/
- BFDB_ALLOCATOR_REUSE_PROTOCOL.md
- BFDB_AUTHORING_MEDIA_STATIC.md
- BFDB_AUTHORING_PROTOCOL.md
- BFDB_BOUNDED_MARKER_PLACEMENT_PROTOCOL.md
- BFDB_BYTE_PROVENANCE_PROTOCOL.md
- BFDB_CACHE_PROTOCOL.md
- BFDB_CLOCK_ONLY_CONTROL_PROTOCOL.md
- BFDB_CROSSSLOT_PROTOCOL.md
- BFDB_FAST_FIRST_OPEN_PROTOCOL.md
- BFDB_FOUR_WPR_PROTOCOL.md
- BFDB_GEOMETRY_GUEST_PROTOCOL.md
- BFDB_LFH_CHECKPOINT_PROTOCOL.md
- BFDB_MARKER_ACCEPTANCE.md
- BFDB_MARKER_FIRSTOPEN_SEMANTIC_GATE.md
- BFDB_MARKER_FOUR_FIRSTOPEN_PROTOCOL.md
- BFDB_MARKER_FOUR_PROTOCOL.md
- BFDB_MARKER_ROUTE_CONTROL.md
- BFDB_MARKER_SEMANTIC_GATE.md
- BFDB_NORMAL_EXTENT_PROTOCOL.md
- BFDB_NORMAL_HEAP_PROTOCOL.md
- BFDB_NORMAL_RECORD_PROTOCOL.md
- BFDB_OUTPUT_GATES_PROTOCOL.md
- BFDB_POSTOPEN_PROTOCOL.md
- BFDB_SDK_RESOLUTION_SCAN.md
- BFDB_SINK_GATE_PROTOCOL.md
- BFDB_VALIDATION_LIFETIME_PROTOCOL.md
- BFDB_WPR_HEAP_PROTOCOL.md
- BRUSH_DISPATCH_PROTOCOL.md
- COLD_ATTACH_REPAIR_PLAN.md
- EMF_BFDB_FUZZ_ANALYSIS.md
- EMF_BFDB_FUZZ_BATCH_PROTOCOL.md
- EMF_BFDB_FUZZ_CAMPAIGN.md
- EMF_BFDB_SEQUENCE_PROTOCOL.md
- EMF_BFDB_WARM_PAGEHEAP_PROTOCOL.md
- EMF_CLIPBOARD_VALID_PROTOCOL.md
- EMF_VALID_ACCEPTANCE_PROTOCOL.md
- FILL_LOOP_CENSUS_PROTOCOL.md
- FILL_MOUSE_EVENT_PROTOCOL.md
- FILL_TOUCH_INPUT_PROTOCOL.md
- FILL_WIN32_DISPATCH_PROTOCOL.md
- PROVENANCE_APP11_POSTSEEK_PROTOCOL.md
- PROVENANCE_APP11_READER_SCAN_PROTOCOL.md
- PROVENANCE_APP11_SPLIT_NEW_LABEL_GUARD_PROTOCOL.md
- PROVENANCE_BATCH_E_SUBSET_PROTOCOL.md
- PROVENANCE_COPY_REOPEN_PROTOCOL.md
- PROVENANCE_E_CHILD_DECISION_PROTOCOL.md
- PROVENANCE_FIELD_ID_CONSUMER_PROTOCOL.md
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
lab/trace/verify_provenance_child_writers_static.py
Python · 7,979 bytes#!/usr/bin/env python3
"""Verify selected JUMBF writer relationships in the signed old Paint SDK.
This is a bounded byte/RTTI audit, not a whole-program data-flow proof. The
licensed DLL is supplied locally and is not copied into this repository.
"""
from __future__ import annotations
import argparse
import hashlib
import struct
from pathlib import Path
from typing import Callable
import pefile
SHA256 = "339d8f47ea7bcc08b0c1f122a1e94d5d31860f1ad1ccf7faea1625ffd6de3904"
# Vtable RVA: (exact MSVC RTTI name, slot +0x10 payload-provider thunk).
VTABLES: dict[int, tuple[str, int]] = {
0x1C64B0: (".?AVJUMBFDescriptionBox@@", 0x6210),
0x1C64F0: (".?AVJUMBFSuperBox@@", 0xAC10),
0x1CCD50: (".?AVJUMBFContentBox@@", 0x67D0),
0x1CCD90: (".?AVJUMBFJSONBox@@", 0x67D0),
0x1CCDD0: (".?AVJUMBFUUIDBox@@", 0x67D0),
0x1CCE10: (".?AVJUMBFCBORBox@@", 0x67D0),
0x1CCE50: (".?AVJUMBFEmbeddedFileDescBox@@", 0x67D0),
0x1CCE90: (".?AVJUMBFBinaryDataBox@@", 0x67D0),
0x1CCED0: (".?AVJUMBFPrivateBox@@", 0x38C0),
0x1CD190: (".?AV?$JUMBFContentSuperBox@VJUMBFCBORBox@@@@", 0xAC10),
0x1CD1D0: (".?AV?$JUMBFContentSuperBox@VJUMBFEmbeddedFileDescBox@@@@", 0xAC10),
0x1CD210: (".?AV?$JUMBFContentSuperBox@VJUMBFJSONBox@@@@", 0xAC10),
0x1CD250: (".?AV?$JUMBFContentSuperBox@VJUMBFUUIDBox@@@@", 0xAC10),
0x1E0338: (".?AVJUMBFBoxBase@@", 0x1A5AE0),
0x1E0378: (".?AVJUMBFCodestreamBox@@", 0x67D0),
0x1E03B8: (".?AVJUMBFXMLBox@@", 0x67D0),
}
WRITER_THUNK = 0x30C0
PROVIDER_TARGETS = {
0x6210: 0x175450, # description: materialize/cache object+0xA8
0xAC10: 0x175980, # superbox: materialize/cache object+0x100
0x67D0: 0x94990, # content: return object+0x28 vector
0x38C0: 0x949A0, # private: return object+0x30 vector
}
THUNKS = {WRITER_THUNK: 0x174240, 0x82F0: 0x175DF0, **PROVIDER_TARGETS}
# Complete instruction bytes at selected producer, sizing, and copy gates.
ANCHORS: dict[int, str] = {
0x16FC6B: "c6411801", # base ctor: dirty = 1
0x1706A7: "e89460e9ff", # bounded leaf payload assignment
0x171684: "e8a734e9ff", # private payload vector allocation
0x17169A: "e831440300", # private payload copy
0x94990: "488d4128c3", # content payload vector address
0x949A0: "488d4130c3", # private payload vector address
0x1749AF: "498b06", # writer object's vtable
0x1749B5: "488b4010", # slot +0x10 payload provider
0x1749C6: "4c2bc2", # payload end - begin
0x1749C9: "493bf8", # destination remaining >= payload length
0x1749CC: "0f8375010000", # fit branch to copy
0x174B4D: "e87e0f0300", # imported memcpy thunk
0x1754D8: "807f1800", # description dirty test
0x1757CD: "c6471800", # description clears dirty
0x1757D3: "488db7a8000000", # description cache vector
0x1759FF: "807f1800", # superbox dirty test
0x175A0D: "e8de28e9ff", # description GetSize
0x175A30: "4803f0", # unchecked sum of child sizes
0x175A4B: "488bd6", # summed size to vector allocator
0x175A51: "e8daf0e8ff", # vector allocation
0x175A75: "ff15a5950e00", # description Serialize; return untested
0x175A7F: "e86c28e9ff", # recompute description size
0x175AC0: "ff155a950e00", # child Serialize; return untested
0x175AC9: "e82228e9ff", # recompute child size
0x175ACE: "4803e8", # advance output pointer by child size
0x175AD9: "482bf0", # subtract child size from remaining
0x175AE5: "c6471800", # clear superbox dirty
0x175E66: "488b03", # GetSize: object's vtable
0x175E6C: "488b4010", # GetSize: slot +0x10 payload provider
0x175E7A: "482b08", # GetSize: payload end - begin
0x175E7D: "488d4108", # GetSize: add short header
0x175E8E: "483bc1", # GetSize: 32-bit LBox vs XLBox branch
}
REL32_TARGETS: dict[int, int] = {
0x1706A7: 0x6740,
0x171684: 0x4B30,
0x17169A: 0x1A5AD0,
0x174B4D: 0x1A5AD0,
0x175A0D: 0x82F0,
0x175A51: 0x4B30,
0x175A7F: 0x82F0,
0x175AC9: 0x82F0,
}
def verify_anchors(read_rva: Callable[[int, int], bytes]) -> tuple[int, int]:
for rva, hex_bytes in ANCHORS.items():
expected = bytes.fromhex(hex_bytes)
if read_rva(rva, len(expected)) != expected:
raise ValueError(f"instruction mismatch at RVA 0x{rva:x}")
for rva, target in {**THUNKS, **REL32_TARGETS}.items():
code = read_rva(rva, 5)
opcode = 0xE9 if rva in THUNKS else 0xE8
if len(code) != 5 or code[0] != opcode:
raise ValueError(f"relative opcode mismatch at RVA 0x{rva:x}")
actual = rva + 5 + struct.unpack_from("<i", code, 1)[0]
if actual != target:
raise ValueError(f"relative target mismatch at RVA 0x{rva:x}")
return len(ANCHORS), len(THUNKS) + len(REL32_TARGETS)
def verify_vtables(found: dict[int, tuple[str, int, int]]) -> None:
if set(found) != set(VTABLES):
raise ValueError("JUMBF vtable census differs from pinned build")
for rva, (name, provider) in VTABLES.items():
if found[rva] != (name, WRITER_THUNK, provider):
raise ValueError(f"JUMBF vtable mismatch at RVA 0x{rva:x}")
def collect_vtables(pe: pefile.PE) -> dict[int, tuple[str, int, int]]:
"""Find x64 MSVC CompleteObjectLocator references in signed .rdata."""
section = next((s for s in pe.sections if s.Name.rstrip(b"\0") == b".rdata"), None)
if section is None:
raise ValueError("no .rdata section")
base = pe.OPTIONAL_HEADER.ImageBase
start = section.VirtualAddress
data = pe.get_data(start, section.Misc_VirtualSize)
end = start + len(data)
found: dict[int, tuple[str, int, int]] = {}
for offset in range(0, len(data) - 8, 8):
col_va = struct.unpack_from("<Q", data, offset)[0]
if not (base + start <= col_va < base + end):
continue
col_rva = col_va - base
signature, _offset, _cd, type_rva, _hierarchy, self_rva = struct.unpack(
"<6I", pe.get_data(col_rva, 24)
)
if signature != 1 or self_rva != col_rva or type_rva >= pe.OPTIONAL_HEADER.SizeOfImage:
continue
name = pe.get_data(type_rva + 16, 160).split(b"\0", 1)[0].decode("ascii", "replace")
if not (name.startswith(".?AVJUMBF") or name.startswith(".?AV?$JUMBF")):
continue
vtable_rva = start + offset + 8
writer_va, provider_va = struct.unpack("<QQ", pe.get_data(vtable_rva + 8, 16))
found[vtable_rva] = (name, writer_va - base, provider_va - base)
return found
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--dll", type=Path, required=True, help="local old x64 provenancesdk.dll")
args = parser.parse_args()
data = args.dll.read_bytes()
if hashlib.sha256(data).hexdigest() != SHA256:
parser.error("DLL SHA-256 differs from pinned signed build")
pe = pefile.PE(data=data, fast_load=True)
if pe.OPTIONAL_HEADER.Magic != 0x20B or pe.FILE_HEADER.Machine != 0x8664:
parser.error("expected x64 PE32+")
text_section = next((s for s in pe.sections if s.Name.rstrip(b"\0") == b".text"), None)
if text_section is None:
parser.error("no .text section")
lo = text_section.VirtualAddress
hi = lo + text_section.Misc_VirtualSize
def read_text(rva: int, size: int) -> bytes:
if not (lo <= rva and rva + size <= hi):
raise ValueError(f"RVA 0x{rva:x} is outside .text")
return pe.get_data(rva, size)
instructions, branches = verify_anchors(read_text)
vtables = collect_vtables(pe)
verify_vtables(vtables)
print(
f"Pinned JUMBF writer census verified: {len(vtables)} vtables, "
f"{instructions} instructions, {branches} direct branches."
)
return 0
if __name__ == "__main__":
raise SystemExit(main())