Exploit database

GH-945bd5267b0d1b94c3f74faf5cda7e5a

blkph0x/cve-2026-83844_poc

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-83844

5 sources

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

Repository files579
blkph0x/cve-2026-83844_pocRevision 193ed44859da
Next files →

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

lab/trace/stage_bfdb_flag1_trial.ps1

PowerShell · 9,312 bytes
param(
    [Parameter(Mandatory = $true)][ValidateSet('old','new')][string]$Build,
    [Parameter(Mandatory = $true)][ValidateSet('control','trigger')][string]$CaseId,
    [Parameter(Mandatory = $true)]
    [ValidatePattern('^[a-z0-9][a-z0-9-]{0,39}$')][string]$TrialLabel,
    [ValidatePattern('^[a-z0-9][a-z0-9-]{0,39}$')][string]$ControlTrialLabel = '',
    [switch]$ValidateOnly
)

# Host-only staging. One pinned JPEG and signed build per disposable guest.
$ErrorActionPreference = 'Stop'
$labRoot = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot '..')).Path
$corpus = Join-Path $labRoot 'corpus\provenance_bfdb_flag1'
$fixtureRoot = Join-Path $labRoot 'output\provenance-bfdb-flag1'
$builder = Join-Path $corpus 'build_fixtures.py'
$verifier = Join-Path $corpus 'verify_fixtures.py'
$manifestFile = Join-Path $corpus 'manifest.json'
$profileBuilder = Join-Path $PSScriptRoot 'build_bfdb_flag1_trace.py'
$guestScript = Join-Path $PSScriptRoot 'guest_bfdb_flag1_entry.ps1'
$profile = Join-Path $labRoot "output\bfdb-flag1\$Build.auto.cdb.txt"
$gflags = 'C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\gflags.exe'
$gflagsHash = '3b4501db349dcd49214c5e4fc57a886458dc013dcee498b2722146fc8d451f45'
$plmdebug = Join-Path $labRoot 'isolation\dependencies\debugger\plmdebug.exe'
$plmdebugHash = 'df595e3ab812fabe89dca86fa8526a4ef91c670a71a42c0f2a380c4cd8a65dac'
foreach ($path in @($builder,$verifier,$manifestFile,$profileBuilder,$guestScript,$gflags,$plmdebug)) {
    if (-not (Test-Path -LiteralPath $path -PathType Leaf)) { throw "Required pinned file missing: $path" }
}
& python $builder | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Licensed flag-one JPEG generation failed.' }
& python $builder --check | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Licensed flag-one JPEG regeneration check failed.' }
& python $verifier | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Independent flag-one JPEG verification failed.' }
$manifest = Get-Content -LiteralPath $manifestFile -Raw | ConvertFrom-Json
$selectedId = "flag1_$CaseId"
$rows = @($manifest.outputs | Where-Object { $_.id -ceq $selectedId })
if ($manifest.schema -cne 'paint-provenance-bfdb-flag1-v1' -or $rows.Count -ne 1) {
    throw 'Pinned flag-one corpus manifest differs.'
}
$row = $rows[0]
$fixture = Join-Path $fixtureRoot $row.file
if ((Get-FileHash -LiteralPath $fixture -Algorithm SHA256).Hash.ToLowerInvariant() -cne $row.sha256) {
    throw 'Selected flag-one JPEG hash differs.'
}
if ((Get-FileHash -LiteralPath $gflags -Algorithm SHA256).Hash.ToLowerInvariant() -cne $gflagsHash -or
    (Get-FileHash -LiteralPath $plmdebug -Algorithm SHA256).Hash.ToLowerInvariant() -cne $plmdebugHash) {
    throw 'Pinned guest debugger prerequisite differs.'
}
& python $profileBuilder --profile $Build --output $profile | Out-Null
if ($LASTEXITCODE -ne 0) { throw 'Signed flag-one CDB profile failed.' }
$profileSidecar = "$profile.json"
$profileData = Get-Content -LiteralPath $profileSidecar -Raw | ConvertFrom-Json
$expectedVersion = if ($Build -eq 'old') { '11.2605.81.0' } else { '11.2609.401.0' }
if ($profileData.schema -cne 'paint-bfdb-flag1-trace-v1' -or
    $profileData.profile -cne $Build -or $profileData.version -cne $expectedVersion -or
    $profileData.trace_mode -cne 'Flag1' -or $profileData.heap_mode -cne 'PageHeap' -or
    -not [bool]$profileData.auto_continue) {
    throw 'Generated signed flag-one profile identity differs.'
}
$profileHash = (Get-FileHash -LiteralPath $profile -Algorithm SHA256).Hash.ToLowerInvariant()
$sidecarHash = (Get-FileHash -LiteralPath $profileSidecar -Algorithm SHA256).Hash.ToLowerInvariant()
$guestHash = (Get-FileHash -LiteralPath $guestScript -Algorithm SHA256).Hash.ToLowerInvariant()
$controlHash = $null
if ($CaseId -eq 'trigger' -and -not $ValidateOnly) {
    if (-not $ControlTrialLabel) { throw 'Trigger requires a completed matching control trial.' }
    $controlRoot = Join-Path $labRoot "results\$ControlTrialLabel"
    $controlFiles = @(Get-ChildItem -LiteralPath (Join-Path $controlRoot "bfdb-flag1\$Build\control") `
        -Recurse -Filter result.json -File -ErrorAction SilentlyContinue)
    if ($controlFiles.Count -ne 1) { throw 'Expected exactly one matching private control result.' }
    $control = Get-Content -LiteralPath $controlFiles[0].FullName -Raw | ConvertFrom-Json
    $teardownFile = Join-Path $controlRoot 'teardown-result.json'
    if (-not (Test-Path -LiteralPath $teardownFile -PathType Leaf)) { throw 'Control guest teardown receipt missing.' }
    $teardown = Get-Content -LiteralPath $teardownFile -Raw | ConvertFrom-Json
    if ($control.schema -cne 'paint-bfdb-flag1-guest-v1' -or
        $control.build -cne $Build -or $control.case_id -cne 'control' -or
        $control.fixture_sha256 -cne '3c890c3b64287ad3856c231d74cc006462e41338415215eba43418d4939e0ca9' -or
        $control.profile_sha256 -cne $profileHash -or $control.profile_manifest_sha256 -cne $sidecarHash -or
        $control.guest_entry_sha256 -cne $guestHash -or
        $control.route_status_before_cleanup -cne 'observed' -or
        -not [bool]$control.debugger_ready -or -not [bool]$control.pageheap_listing_verified -or
        -not [bool]$control.required_backend_markers_seen -or
        -not [bool]$control.all_marker_pids_match -or
        [bool]$control.cdb_access_violation_text_seen -or
        @($control.application_error_events).Count -ne 0 -or
        @($control.dump_files).Count -ne 0 -or
        @($control.extra_paint_pids).Count -ne 0 -or
        @($control.cleanup.paint_remaining_pids).Count -ne 0 -or
        @($control.cleanup.debugger_remaining_pids).Count -ne 0 -or
        $control.pageheap_disable_exit_code -ne 0 -or
        $control.auto_debugger_disable.exit_code -ne 0 -or
        $teardown.schema -cne 'paint-ab-guest-shutdown-cleanup-v1' -or
        $teardown.trial_label -cne $ControlTrialLabel -or
        $teardown.state -cne 'closed' -or
        $teardown.sandbox_process_count_after -ne 0) {
        throw 'Control did not attest the signed route, clean PageHeap trial and closed guest.'
    }
    $controlHash = (Get-FileHash -LiteralPath $controlFiles[0].FullName -Algorithm SHA256).Hash.ToLowerInvariant()
}
if ($ValidateOnly) {
    Write-Output "Verified $Build/$CaseId signed PageHeap flag-one profile and JPEG; no guest staged."
    return
}
if (@(Get-Process WindowsSandbox,WindowsSandboxClient -ErrorAction SilentlyContinue).Count -ne 0) {
    throw 'Another Sandbox is active; shared mapped input cannot be replaced.'
}
$wsb = (& (Join-Path $labRoot 'isolation\prepare-sandbox.ps1') `
    -Build $Build -CorpusMode None -FocusedTrace -DebuggerHeapExtensions `
    -Networking Enable -VGpu Disable -TrialLabel $TrialLabel | Select-Object -Last 1)
if (-not (Test-Path -LiteralPath $wsb -PathType Leaf)) { throw 'Shared preparer did not produce a guest configuration.' }
$input = Join-Path $labRoot "isolation\input\$Build"
$traceDest = Join-Path $input 'trace'
$fixtureDest = Join-Path $input 'bfdb_flag1'
$debuggerDest = Join-Path $input 'debugger'
New-Item -ItemType Directory -Force -Path $traceDest,$fixtureDest | Out-Null
$copies = @(
    @{ source=$guestScript; destination=(Join-Path $traceDest 'guest_bfdb_flag1_entry.ps1') },
    @{ source=$profile; destination=(Join-Path $traceDest 'bfdb.auto.cdb.txt') },
    @{ source=$profileSidecar; destination=(Join-Path $traceDest 'bfdb.auto.cdb.txt.json') },
    @{ source=$fixture; destination=(Join-Path $fixtureDest $row.file) },
    @{ source=$gflags; destination=(Join-Path $debuggerDest 'gflags.exe') }
)
foreach ($copy in $copies) {
    Copy-Item -LiteralPath $copy.source -Destination $copy.destination -Force
    if ((Get-FileHash -LiteralPath $copy.source -Algorithm SHA256).Hash.ToLowerInvariant() -cne
        (Get-FileHash -LiteralPath $copy.destination -Algorithm SHA256).Hash.ToLowerInvariant()) {
        throw 'Staged flag-one input differs from verified source.'
    }
}
[xml]$config = Get-Content -LiteralPath $wsb -Raw
$command = $config.SelectSingleNode('/Configuration/LogonCommand/Command')
if (-not $command -or $command.InnerText -notlike '*guest_focus_entry.ps1*') {
    throw 'Focused guest entry replacement is not unique.'
}
$command.InnerText = "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\PaintLab\Input\trace\guest_bfdb_flag1_entry.ps1 -Build $Build -CaseId $CaseId"
$config.Save($wsb)
[xml]$check = Get-Content -LiteralPath $wsb -Raw
if ($check.Configuration.LogonCommand.Command -cne $command.InnerText) {
    throw 'Guest command did not retain the pinned flag-one entry.'
}
[ordered]@{
    schema='paint-bfdb-flag1-stage-v1'; status='staged_not_run'
    build=$Build; case_id=$CaseId; trial_label=$TrialLabel
    control_trial_label=$ControlTrialLabel; control_result_sha256=$controlHash
    heap_mode='PageHeap'; handoff_mode='PlmDebug'; trace_mode='Flag1'
    networking='Enable'; fixture_sha256=$row.sha256
    gflags_sha256=$gflagsHash; plmdebug_sha256=$plmdebugHash
    profile_sha256=$profileHash; profile_manifest_sha256=$sidecarHash
    guest_entry_sha256=$guestHash
    wsb_sha256=(Get-FileHash -LiteralPath $wsb -Algorithm SHA256).Hash.ToLowerInvariant()
} | ConvertTo-Json -Depth 4 | Set-Content -LiteralPath (
    Join-Path $labRoot "isolation\generated\$TrialLabel.bfdb-flag1-stage.json") -Encoding UTF8
Write-Output $wsb