c99 is the original — attributed to locus7s / Locus7 group (this variant modified by #!physx^), it established the template that every subsequent PHP webshell copied.

Capabilities

File browser, command execution, database client, server info dump, self-delete. Its influence on the underground PHP tool ecosystem is difficult to overstate — nearly every shell in the corpus traces design decisions back to c99.

Zero Authentication

The most immediate finding is the complete absence of access control. The password variable ships as an empty string, which means the authentication check never fires. Any visitor who discovers the shell’s URL has immediate, unrestricted access to every function — file management, command execution, database queries, network tools. This is not a misconfiguration; it is the default state of every copy that ships unmodified.

PHP Object Injection

The shell deserializes cookie input using unserialize() with no validation or type checking. An attacker can craft a cookie value containing a serialized PHP object that triggers arbitrary code execution through the application’s class autoloading — a classic POP (Property-Oriented Programming) chain. This vulnerability is exploitable by any unauthenticated visitor, independent of whether the operator has set a password. The attack surface is the HTTP Cookie header itself.

Vulnerabilities

#ClassImpactStatus
1No authentication — empty password string disables auth checkUnrestricted accessLive-proven
2PHP object injection — unserialize() on cookie inputPre-auth RCE via POP chainConfirmed

Detection Surface

File-system indicators

IndicatorTypeDetail
SHA256Hash960feb502f913adff6b322bc9815543e5888bbf9058ba0eb46ceb1773ea67668
Expected size~229 KBSource variant
$pass=''VariableEmpty password = zero auth by default
$disablefuncVariablec99-family variable for disabled function tracking
$cfeVariableCommand variable (c99 uses $cfe where others use $code or $cmd)
$datapipeVariablePort forwarding configuration (unique to c99)
$anypass, $anyphpcodeVariablesc99shell auth variables
b76d95e82e853f3b0a81dd61c4ee286cMD5 hashc99shell default password hash (triple-hash: md5(sha1(md5())))
"Port alredy in use"String (typo)Typo alredy — on ~4/11 local c99 variants (c99, c99shell, c99_empire, c99_saldiri); NOT universal (absent from c99_antivirus, c99_locus7s, c99_madnet, c99_PSych0, c99_w4cking, c99ud)
$data{0} == "\x99"Code patternMagic byte check (unique to c99)
Cookie: unserialize($_COOKIE["$sess_cookie"])Code patternPHP object injection via cookie
Locus7Shell, c99shellStringsSelf-identification in title/comments
RuntimePHP 5.6 only500 on PHP 7.4 (ereg, mysql_connect removed)

HTTP access-log indicators

Log patternWhat it means
$pass='' — no auth on default installAny visitor who discovers the URL has full access
Cookie with serialized PHP objectunserialize() on cookie input — PHP object injection
POST act=Action dispatcher for all c99 functions
POST cmd=Command execution
POST charset=Character set selector
Bind port / datapipe endpointsCreates local TCP listeners (bind shell, port forwarding)
Response: c99shell in titleShell self-identifies in HTML title
POST test1_file=File read via curl LFI (shared with r57)

YARA rule

rule webshell_c99 {
    meta:
        description = "c99 webshell (Locus7 / physx variant)"
        author      = "OHIIHO Threat Research"
        reference   = "https://research.ohiiho.com/arsenal/c99/"
        status      = "validated"

    strings:
        $title1       = "c99shell" ascii nocase
        $title2       = "Locus7Shell" ascii
        $bind_port    = "Port alredy in use" ascii
        $datapipe     = "$datapipe[\"port\"]" ascii
        $fsock        = "fsockopen(\"localhost\",$bind" ascii
        $anypass      = "$anypass" ascii
        $anyphp       = "$anyphpcode" ascii
        $md5chain     = "md5(sha1(md5($anypass)))" ascii
        $disablefunc  = "$disablefunc" ascii
        $cfe_var      = "@shell_exec($cfe)" ascii
        $magic_byte   = "$data{0} == \"\\x99\"" ascii
        $default_hash = "b76d95e82e853f3b0a81dd61c4ee286c" ascii

    condition:
        filesize < 300KB
        and (
            ($title1 or $title2)
            or ($anypass and $anyphp and $md5chain)
            or ($disablefunc and $cfe_var)
            or ($magic_byte and $default_hash)
            or ($bind_port and ($datapipe or $fsock))
        )
}

MITRE ATT&CK

TechniqueContext
T1505.003Web Shell
T1059.004Command and Scripting Interpreter: Unix Shell
T1212Exploitation for Credential Access (object injection via cookie deserialization)

OHIIHO Threat Research.