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_removebg_trial.ps1

PowerShell · 7,662 bytes
param(
    [Parameter(Mandatory = $true)]
    [ValidateSet('old', 'new')]
    [string]$Build,
    [Parameter(Mandatory = $true)]
    [ValidatePattern('^[a-z0-9][a-z0-9-]{0,39}$')]
    [string]$TrialLabel,
    [ValidateSet('Disable','Enable')]
    [string]$Networking = 'Enable',
    [switch]$EnvironmentNegativeControl,
    [ValidateSet('selection_baseline','handoff_opaque_rgba','handoff_one_transparent_rgba',
        'removebg_bmp_bottomup_33x17','removebg_bmp_topdown_33x17',
        'removebg_png_rgb_33x17','removebg_png_alpha0_33x17')]
    [string]$FixtureId = 'selection_baseline',
    [switch]$HeapAlpha,
    [switch]$StrideFollowup,
    [switch]$FullLoop,
    [switch]$ValidateOnly
)

# Stage only. This does not start a guest or modify the shared preparer.
$ErrorActionPreference = 'Stop'
if ($Networking -eq 'Disable' -and -not $EnvironmentNegativeControl) {
    throw 'The matched Paint guest requires Networking Enable; use -EnvironmentNegativeControl to test activation failure separately.'
}
if ($StrideFollowup -and -not ($HeapAlpha -or $FullLoop)) {
    throw 'Stride follow-up requires -HeapAlpha.'
}
$effectiveHeapAlpha = [bool]($HeapAlpha -or $FullLoop)
$effectiveStrideFollowup = [bool]($StrideFollowup -or $FullLoop)
$labRoot = (Resolve-Path -LiteralPath (Join-Path $PSScriptRoot '..')).Path
if ($FullLoop) {
    & python (Join-Path $PSScriptRoot 'build_removebg_full_loop.py') --fixture-id $FixtureId | Out-Null
    if ($LASTEXITCODE -ne 0) { throw 'Full-loop profile generation failed.' }
} elseif ($StrideFollowup) {
    & python (Join-Path $PSScriptRoot 'build_removebg_traces.py') --heap-alpha --stride-followup | Out-Null
    if ($LASTEXITCODE -ne 0) { throw 'Stride follow-up profile generation failed.' }
} elseif ($HeapAlpha) {
    & python (Join-Path $PSScriptRoot 'build_removebg_traces.py') --heap-alpha | Out-Null
    if ($LASTEXITCODE -ne 0) { throw 'Heap-alpha profile generation failed.' }
}
$profileRoot = if ($FullLoop) {
    Join-Path $labRoot "output\removebg-full-loop\$FixtureId"
} elseif ($StrideFollowup) {
    Join-Path $labRoot 'output\removebg-stride'
} elseif ($HeapAlpha) {
    Join-Path $labRoot 'output\removebg-heap'
} else {
    Join-Path $PSScriptRoot 'generated'
}
$profile = Join-Path $profileRoot "$Build.removebg.cdb.txt"
$manifestPath = "$profile.json"
$sourceManifest = Join-Path $labRoot 'corpus\followup\generated\manifest.json'
foreach ($path in @($profile,$manifestPath,$sourceManifest)) {
    if (-not (Test-Path -LiteralPath $path -PathType Leaf)) { throw "Missing pinned input: $path" }
}
$manifest = Get-Content -LiteralPath $manifestPath -Raw | ConvertFrom-Json
$fixture = $manifest.fixtures.$FixtureId
if ($manifest.schema -ne 'paint-ab-removebg-trace-v1' -or
    $manifest.profile -ne $Build -or $null -eq $fixture) {
    throw 'Remove Background profile or selected fixture is not pinned.'
}
if ([bool]$manifest.heap_alpha.enabled -ne $effectiveHeapAlpha) {
    throw 'Heap-alpha profile selection differs from the staged manifest.'
}
if ([bool]$manifest.stride_followup.enabled -ne $effectiveStrideFollowup) {
    throw 'Stride follow-up profile selection differs from the staged manifest.'
}
if ([bool]$manifest.full_loop.enabled -ne [bool]$FullLoop -or
    ($FullLoop -and [string]$manifest.full_loop.fixture_id -ne $FixtureId)) {
    throw 'Full-loop profile selection differs from the staged manifest.'
}
$sourceFixture = Join-Path $labRoot "corpus\followup\generated\$($fixture.file)"
if (-not (Test-Path -LiteralPath $sourceFixture -PathType Leaf) -or
    (Get-FileHash -LiteralPath $sourceFixture -Algorithm SHA256).Hash.ToLowerInvariant() -ne
        [string]$fixture.sha256) {
    throw 'Selected fixture bytes differ from the trace profile.'
}
$corpus = Get-Content -LiteralPath $sourceManifest -Raw | ConvertFrom-Json
$corpusCase = @($corpus.cases | Where-Object { $_.id -eq $FixtureId })
if ($corpusCase.Count -ne 1 -or
    [string]$corpusCase[0].file -ne [string]$fixture.file -or
    [string]$corpusCase[0].sha256 -ne [string]$fixture.sha256) {
    throw 'Selected fixture differs from the frozen followup corpus manifest.'
}
foreach ($name in @('guest_removebg_probe.ps1','guest_removebg_entry.ps1')) {
    if (-not (Test-Path -LiteralPath (Join-Path $PSScriptRoot $name) -PathType Leaf)) {
        throw "Missing guest script: $name"
    }
}
if ($ValidateOnly) {
    Write-Output "Verified pinned $Build Remove Background profile and $FixtureId fixture (heap-alpha=$effectiveHeapAlpha; stride=$effectiveStrideFollowup; full-loop=$([bool]$FullLoop)); staging skipped."
    return
}
$active = @(Get-Process -Name WindowsSandbox,WindowsSandboxClient -ErrorAction SilentlyContinue)
if ($active.Count -gt 0) { throw 'A guest is active; do not replace its shared mapped input.' }
$prep = Join-Path $labRoot 'isolation\prepare-sandbox.ps1'
$wsbPath = (& $prep -Build $Build -CorpusMode None -FocusedTrace `
    -Networking $Networking -VGpu Disable -TrialLabel $TrialLabel | Select-Object -Last 1)
if (-not (Test-Path -LiteralPath $wsbPath -PathType Leaf)) {
    throw 'Shared preparer did not produce a .wsb file.'
}
$inputDir = Join-Path $labRoot "isolation\input\$Build"
$traceDest = Join-Path $inputDir 'trace'
$followupDest = Join-Path $inputDir 'followup'
foreach ($name in @('guest_removebg_probe.ps1','guest_removebg_entry.ps1')) {
    Copy-Item -LiteralPath (Join-Path $PSScriptRoot $name) `
        -Destination (Join-Path $traceDest $name) -Force
}
foreach ($path in @($sourceFixture,$sourceManifest)) {
    Copy-Item -LiteralPath $path -Destination (Join-Path $followupDest (Split-Path $path -Leaf)) -Force
}
foreach ($path in @($profile,$manifestPath)) {
    Copy-Item -LiteralPath $path -Destination (Join-Path $traceDest (Split-Path $path -Leaf)) -Force
}
[xml]$config = Get-Content -LiteralPath $wsbPath -Raw
$oldCommand = [string]$config.Configuration.LogonCommand.Command
if ($oldCommand -notlike '*guest_focus_entry.ps1*') {
    throw 'Unexpected generated guest command; refusing to override.'
}
$config.Configuration.LogonCommand.Command =
    "powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\PaintLab\Input\trace\guest_removebg_entry.ps1 -Build $Build -FixtureId $FixtureId"
$config.Save($wsbPath)
[xml]$verify = Get-Content -LiteralPath $wsbPath -Raw
if ([string]$verify.Configuration.LogonCommand.Command -notlike '*guest_removebg_entry.ps1*' -or
    [string]$verify.Configuration.LogonCommand.Command -notlike "*-FixtureId $FixtureId*") {
    throw 'Generated guest command was not persisted.'
}
$sidecar = [ordered]@{
    schema = 'paint-ab-removebg-stage-v1'
    build = $Build
    fixture_id = $FixtureId
    fixture_file = [string]$fixture.file
    trial_label = $TrialLabel
    networking = $Networking
    guest_entry = 'guest_removebg_entry.ps1'
    wsb_sha256 = (Get-FileHash -LiteralPath $wsbPath -Algorithm SHA256).Hash.ToLowerInvariant()
    staged = @(
        'guest_removebg_probe.ps1','guest_removebg_entry.ps1',
        "$Build.removebg.cdb.txt","$Build.removebg.cdb.txt.json"
    ) | ForEach-Object {
        $file = Join-Path $traceDest $_
        [ordered]@{ file = $_; sha256 = (Get-FileHash -LiteralPath $file -Algorithm SHA256).Hash.ToLowerInvariant() }
    }
    fixture_sha256 = (Get-FileHash -LiteralPath (Join-Path $followupDest ([string]$fixture.file)) -Algorithm SHA256).Hash.ToLowerInvariant()
    heap_alpha = $effectiveHeapAlpha
    stride_followup = $effectiveStrideFollowup
    full_loop = [bool]$FullLoop
}
$sidecarPath = Join-Path $labRoot "isolation\generated\$TrialLabel.removebg-stage.json"
$sidecar | ConvertTo-Json -Depth 5 | Set-Content -LiteralPath $sidecarPath -Encoding UTF8
Write-Output $wsbPath