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

Python · 2,034 bytes
import paramiko, time

logf = r'D:\Desktop\网安程设\Amaranth_Project\Stage06\vm_after_task.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)
    
    # Wait for 9:53 task to fire
    print('Waiting 90s for scheduled task trigger...')
    time.sleep(90)
    
    with open(logf, 'w', encoding='utf-8') as f:
        cmds = [
            # Check C2 connections (new ones?)
            'netstat -an | findstr 4782',
            # Check if powershell.exe is running as stager
            'tasklist /v | findstr /i "powershell"',
            # Check debug log for new entries
            'if exist C:\\Windows\\Temp\\dinvoke_debug.txt (findstr /i "START persist Persisted" C:\\Windows\\Temp\\dinvoke_debug.txt) else (echo NO LOG)',
            # Check if mscorsvc.ps1 is still there (if task ran, PS runs in memory, file should persist)
            'if exist C:\\Windows\\Temp\\mscorsvc.ps1 (echo PS1 STILL EXISTS) else (echo PS1 IS GONE)',
            # WMI - try as admin (if lewis is admin)
            'whoami',
            'net localgroup Administrators',
            'powershell -NoP "Get-WmiObject -Namespace root\\\\subscription -Class __EventFilter 2>$null | Select Name,Query"',
            # Time
            'echo %date% %time%',
        ]
        
        for cmd in cmds:
            f.write(f'>>> {cmd}\n')
            stdin, stdout, stderr = ssh.exec_command(cmd, timeout=15)
            out = stdout.read().decode('utf-8', errors='replace').strip()
            err = stderr.read().decode('utf-8', errors='replace').strip()
            if out: f.write(f'{out[:800]}\n')
            if err: f.write(f'ERR: {err[:200]}\n')
            f.write('---\n')
            time.sleep(0.5)
    
    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}')