/*
   Odin by Brandefense - Monograph 29 / 30 YARA Artifact Suite
   Scope: Sanitized configuration and panel manifests for HookBot/Daam,
          L3MON (:22533), P2PInfect (:601xx), and EvilGoPhish (:3333).
   Classification: TLP:CLEAR
*/

rule ODIN_HookBot_Daam_Overlay_Panel_Config
{
    meta:
        author = "Odin by Brandefense"
        monograph = "29 / 30"
        classification = "TLP:CLEAR"
        description = "Matches HookBot or Daam Android Accessibility overlay and VNC panel configuration artifacts"
    strings:
        $hb1 = "HOOKBOT_PANEL" ascii
        $hb2 = "/api/hookbot/" ascii
        $dm1 = "daam_overlay" ascii nocase
        $ov1 = "accessibility_inject" ascii nocase
        $ov2 = "vnc_state" ascii nocase
    condition:
        filesize < 512KB and ($hb1 or $hb2 or $dm1) and ($ov1 or $ov2)
}

rule ODIN_L3MON_NodeJS_Android_Panel_Manifest
{
    meta:
        author = "Odin by Brandefense"
        monograph = "29 / 30"
        classification = "TLP:CLEAR"
        description = "Matches L3MON NodeJS Android remote management server configuration on ports 22533 or 22222"
    strings:
        $l1 = "L3MON" ascii
        $l2 = "l3mon_manager" ascii nocase
        $p1 = "22533" ascii
        $p2 = "22222" ascii
        $u1 = "/client_login" ascii
    condition:
        filesize < 512KB and ($l1 or $l2) and ($p1 or $p2) and $u1
}

rule ODIN_P2PInfect_Cloud_Worm_Peer_Config
{
    meta:
        author = "Odin by Brandefense"
        monograph = "29 / 30"
        classification = "TLP:CLEAR"
        description = "Matches P2PInfect peer-to-peer cloud worm bootstrap and gossip configuration manifests"
    strings:
        $p1 = "X-Peer-Node" ascii
        $p2 = "/p2p/peers" ascii
        $g1 = "60103" ascii
        $g2 = "60140" ascii
        $r1 = "redis_peer_sync" ascii nocase
    condition:
        filesize < 512KB and ($p1 and $p2) and ($g1 or $g2 or $r1)
}

rule ODIN_EvilGoPhish_Hybrid_AiTM_Config
{
    meta:
        author = "Odin by Brandefense"
        monograph = "29 / 30"
        classification = "TLP:CLEAR"
        description = "Matches EvilGoPhish hybrid GoPhish and reverse-proxy campaign configuration files"
    strings:
        $e1 = "evilgophish" ascii nocase
        $e2 = "X-EvilGoPhish-Key" ascii
        $a1 = "admin_server" ascii nocase
        $a2 = ":3333" ascii
        $px = "evilginx_sub" ascii nocase
    condition:
        filesize < 512KB and ($e1 or $e2) and ($a1 or $a2) and $px
}
