{
  "hunt": {
    "meta": {
      "tlp": "clear",
      "hunt": {
        "handoff": "promote-to-detection",
        "trigger": "intel-report",
        "methodology": "model-assisted",
        "applicability": "campaign-specific",
        "justification": "Protecting BeyondTrust Remote Support appliances from unauthenticated RCE is a critical priority, as these systems often hold privileged access to the internal network. A negative result confirms that the appliances are not currently being exploited by known tradecraft."
      },
      "name": "BeyondTrust Remote Support Unauthenticated Exploitation and RCE",
      "type": "investigation",
      "labels": [
        "hunt",
        "attack.t1190",
        "attack.t1083",
        "attack.t1105",
        "attack.t1059.006",
        "discovery",
        "execution",
        "initial access"
      ],
      "related": [
        {
          "hunt": "beyondtrust-unauth-session-hijack",
          "reason": "The same unauthenticated session start can be used to attempt session hijacking or other protocol-level attacks.",
          "relation": "sibling"
        }
      ],
      "targets": {
        "web": {
          "name": "Web server / proxy logs",
          "category": "siem",
          "telemetry": [
            "network"
          ]
        },
        "hunter": {
          "name": "Hunt agent",
          "agent": true
        },
        "analyst": {
          "name": "Tier-2 analyst",
          "role": "analyst"
        },
        "endpoint": {
          "name": "Endpoint telemetry (hb_ surfaces)",
          "category": "endpoint",
          "telemetry": [
            "endpoint"
          ]
        }
      },
      "analysis": "A standard detection rule might fire on the origin forgery error, but this hunt pivots between web logs (session start), system logs (origin errors), and process activity (shell execution) to confirm the full exploitation chain and differentiate between scanning and a successful intrusion.",
      "coverage": [
        {
          "stage": "vulnerability-identification",
          "steps": [
            "scope-beyondtrust-appliances"
          ],
          "status": "covered"
        },
        {
          "stage": "unauthenticated-session-initialization",
          "steps": [
            "lead-session-starts"
          ],
          "status": "covered"
        },
        {
          "stage": "origin-forgery-and-path-discovery",
          "steps": [
            "lead-origin-errors"
          ],
          "status": "covered"
        },
        {
          "stage": "payload-deployment-and-rce",
          "steps": [
            "follow-on-file-writes",
            "follow-on-rce-processes"
          ],
          "status": "covered"
        }
      ],
      "scenario": {
        "stages": [
          {
            "name": "Vulnerability Identification",
            "slug": "vulnerability-identification",
            "tactic": "initial-access",
            "techniques": [
              "T1190"
            ],
            "observables": [
              "BeyondTrust Remote Support version 24.1.2",
              "Build 1524046",
              "Revision 4208-ddcf90715106aa0c0e19c103f8d2c412af4beff3",
              "CVE-2026-102764"
            ]
          },
          {
            "name": "Unauthenticated Session Initialization",
            "slug": "unauthenticated-session-initialization",
            "tactic": "initial-access",
            "techniques": [
              "T1190"
            ],
            "observables": [
              "POST /api/start_session",
              "WebSocket connection to /nw",
              "brain.log entries for 'ingredi support desk customer' connections",
              "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 14.7; rv:133.0) Gecko/20100101 Firefox/133.0"
            ]
          },
          {
            "name": "Origin Forgery and Path Discovery",
            "slug": "origin-forgery-and-path-discovery",
            "tactic": "discovery",
            "techniques": [
              "T1083"
            ],
            "observables": [
              "Forged router ID in MRS message source addresses",
              "Access to /proc/self/environ via internal file-transfer service",
              "thin-scc-errors.log containing 'DISCARDING NONLOCAL MESSAGE'",
              "thin-scc.log entry for DownloadAnonymousFiles native provider access"
            ]
          },
          {
            "name": "Payload Deployment and RCE",
            "slug": "payload-deployment-and-rce",
            "tactic": "execution",
            "techniques": [
              "T1105",
              "T1059.006"
            ],
            "observables": [
              "Upload of PHP files ending in .php.n$t",
              "File paths under $BG_app_root/data/tmp/sdcust_thin_client/",
              "PHP execution as user msfuser (UID 1000)",
              "HTTP GET/POST requests to extensionless endpoints (e.g., /qdgusthrmlirprls) in the public web directory",
              "User-Agent: Python-urllib/3.9"
            ]
          }
        ],
        "summary": "Attackers exploit an origin-validation flaw in BeyondTrust Remote Support (CVE-2026-102764) by forging internal message routing IDs to bypass authentication. This allows unauthenticated remote file operations, which the attacker uses to retrieve environment paths, upload a malicious PHP payload, and achieve remote code execution as the site's operating-system user."
      },
      "severity": "high",
      "rationale": "Start by identifying all BeyondTrust Remote Support appliances via software inventory. Focus the HTTP and syslog queries on these specific hosts to reduce noise from general web traffic.",
      "guardrails": {
        "claims": "no_unsupported",
        "evidence": "citation_required",
        "telemetry": "untrusted",
        "missing_data": "not_benign"
      },
      "hypothesis": "An intruder has exploited CVE-2026-102764 on a BeyondTrust Remote Support appliance by forging internal message origins to upload and execute a PHP payload.",
      "parameters": {
        "scope_hosts": {
          "from": {
            "ref": "hunt-standard",
            "kind": "manual",
            "observed": "2026-10-30"
          },
          "type": "list[host]",
          "default": [],
          "description": "Specific BeyondTrust appliances to hunt on; leave empty for all."
        },
        "lookback_days": {
          "from": {
            "ref": "hunt-standard",
            "kind": "manual",
            "observed": "2026-10-30"
          },
          "type": "number",
          "default": "14",
          "description": "Days of history to examine."
        }
      },
      "provenance": {
        "authors": [
          {
            "org": "huntbase.io",
            "name": "Huntbase hunt generation"
          }
        ],
        "generated": {
          "by": "huntbase-hunt-generation",
          "from": "https://www.rapid7.com/blog/post/ra-rapid7-analysis-unauthenticated-file-upload-to-rce-in-beyondtrust-remote-support-cve-2026-102764",
          "gates": [
            "dry-run",
            "lint"
          ],
          "model": "hb_google/gemini-3-flash-preview"
        }
      },
      "references": [
        {
          "url": "https://www.rapid7.com/blog/post/ra-rapid7-analysis-unauthenticated-file-upload-to-rce-in-beyondtrust-remote-support-cve-2026-102764",
          "name": "Rapid7 Analysis: Unauthenticated File Upload to RCE in BeyondTrust Remote Support (CVE-2026-102764)"
        }
      ],
      "blind_spots": [
        {
          "id": "mrs-message-payloads",
          "risk": "Standard logs capture the error message but not the specific MRS message content, making it difficult to determine the exact intent of an interrupted attack.",
          "owner": "Network Engineering",
          "stage": "origin-forgery-and-path-discovery",
          "question": "What were the specific forged router IDs and file-transfer paths requested within the MRS stream?",
          "requires": "MRS protocol deep packet inspection",
          "remediation": "Deploy TLS decryption and protocol-aware inspection for appliance traffic."
        },
        {
          "id": "log-deletion-on-host",
          "risk": "If logs are only stored on the appliance, a successful RCE allows the attacker to wipe the evidence of their session start and origin forgery.",
          "owner": "Security Operations",
          "stage": "payload-deployment-and-rce",
          "question": "Did the attacker delete access or system logs after achieving RCE?",
          "requires": "immutable off-appliance logging",
          "remediation": "Ensure syslog and web access logs are streamed in real-time to a centralized, immutable SIEM."
        }
      ]
    },
    "name": "BeyondTrust Remote Support Unauthenticated Exploitation and RCE",
    "description": "This hunt targets a critical origin-validation flaw in the BeyondTrust Remote Support appliance. Attackers can start anonymous customer sessions and forge message source addresses to reach internal file-transfer services. The hunt identifies early indicators of this forgery in appliance logs, correlates them with rare session initialization patterns, and then searches for follow-on payload deployment and process execution. Because the appliance is a closed system, these behavioral signals in the web and system logs are the primary means of detecting unauthenticated remote code execution."
  },
  "nodes": [
    {
      "id": "hypothesis",
      "type": "hypothesis",
      "label": "Hypothesis",
      "config": {
        "tags": [],
        "coverage": [
          {
            "stage": "vulnerability-identification",
            "steps": [
              "scope-beyondtrust-appliances"
            ],
            "status": "covered"
          },
          {
            "stage": "unauthenticated-session-initialization",
            "steps": [
              "lead-session-starts"
            ],
            "status": "covered"
          },
          {
            "stage": "origin-forgery-and-path-discovery",
            "steps": [
              "lead-origin-errors"
            ],
            "status": "covered"
          },
          {
            "stage": "payload-deployment-and-rce",
            "steps": [
              "follow-on-file-writes",
              "follow-on-rce-processes"
            ],
            "status": "covered"
          }
        ],
        "rationale": "An intruder has exploited CVE-2026-102764 on a BeyondTrust Remote Support appliance by forging internal message origins to upload and execute a PHP payload.",
        "blind_spots": [
          {
            "id": "mrs-message-payloads",
            "risk": "Standard logs capture the error message but not the specific MRS message content, making it difficult to determine the exact intent of an interrupted attack.",
            "owner": "Network Engineering",
            "stage": "origin-forgery-and-path-discovery",
            "question": "What were the specific forged router IDs and file-transfer paths requested within the MRS stream?",
            "requires": "MRS protocol deep packet inspection",
            "remediation": "Deploy TLS decryption and protocol-aware inspection for appliance traffic."
          },
          {
            "id": "log-deletion-on-host",
            "risk": "If logs are only stored on the appliance, a successful RCE allows the attacker to wipe the evidence of their session start and origin forgery.",
            "owner": "Security Operations",
            "stage": "payload-deployment-and-rce",
            "question": "Did the attacker delete access or system logs after achieving RCE?",
            "requires": "immutable off-appliance logging",
            "remediation": "Ensure syslog and web access logs are streamed in real-time to a centralized, immutable SIEM."
          }
        ],
        "scoping_notes": "Start by identifying all BeyondTrust Remote Support appliances via software inventory. Focus the HTTP and syslog queries on these specific hosts to reduce noise from general web traffic.",
        "beyond_detection": "A standard detection rule might fire on the origin forgery error, but this hunt pivots between web logs (session start), system logs (origin errors), and process activity (shell execution) to confirm the full exploitation chain and differentiate between scanning and a successful intrusion."
      }
    },
    {
      "id": "scope-beyondtrust-appliances",
      "type": "query",
      "label": "Identify BeyondTrust Remote Support appliances",
      "config": {
        "dsl": "sqlite",
        "role": "scoping",
        "source": "endpoint",
        "content": "SELECT device_hostname, package_name, package_version FROM hb_software_inventory WHERE (LOWER(package_name) LIKE '%beyondtrust%' OR LOWER(package_name) LIKE '%remote support%')",
        "surface": "hb_software_inventory",
        "description": "Scope the hunt to systems running the affected software package.",
        "expected_signal": "A list of hostnames belonging to Remote Support appliances. Silence means no appliances are under management or the package name differs."
      },
      "parents": [
        {
          "id": "hypothesis"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "scoping",
        "label": "Identify BeyondTrust Remote Support appliances",
        "reads": [
          "device_hostname",
          "package_name",
          "package_version"
        ],
        "source": "hb_software_inventory",
        "target": "endpoint",
        "content": "SELECT device_hostname, package_name, package_version FROM hb_software_inventory WHERE (LOWER(package_name) LIKE '%beyondtrust%' OR LOWER(package_name) LIKE '%remote support%')",
        "silence": "not_evidence_of_absence",
        "expected": "A list of hostnames belonging to Remote Support appliances. Silence means no appliances are under management or the package name differs.",
        "verified": "dry-run",
        "verified_at": "2026-11-18"
      }
    },
    {
      "id": "lead-origin-errors",
      "type": "query",
      "label": "Origin forgery log traces",
      "config": {
        "dsl": "sqlite",
        "role": "detection-candidate",
        "source": "endpoint",
        "content": "SELECT device_hostname, message, time FROM hb_syslog WHERE LOWER(message) LIKE '%discarding nonlocal message%' AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')",
        "surface": "hb_syslog",
        "description": "Detect the specific DISCARDING NONLOCAL MESSAGE error produced when the thin-scc worker rejects forged internal messages.",
        "expected_signal": "Direct evidence of the origin forgery bypass attempt. Hits here are high-confidence indicators of exploitation."
      },
      "parents": [
        {
          "id": "scope-beyondtrust-appliances"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "detection-candidate",
        "label": "Origin forgery log traces",
        "reads": [
          "device_hostname",
          "message",
          "time"
        ],
        "source": "hb_syslog",
        "target": "endpoint",
        "content": "SELECT device_hostname, message, time FROM hb_syslog WHERE LOWER(message) LIKE '%discarding nonlocal message%' AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')",
        "silence": "not_evidence_of_absence",
        "expected": "Direct evidence of the origin forgery bypass attempt. Hits here are high-confidence indicators of exploitation.",
        "verified": "dry-run",
        "verified_at": "2026-11-18"
      }
    },
    {
      "id": "lead-session-starts",
      "type": "query",
      "label": "Rare session and menu endpoints",
      "config": {
        "dsl": "sqlite",
        "role": "baseline",
        "source": "web",
        "content": "SELECT url_path, COUNT(DISTINCT device_hostname) AS hosts, GROUP_CONCAT(DISTINCT src_endpoint_ip) AS clients, MIN(time) AS first_seen FROM hb_http_activity WHERE (url_path = '/api/start_session' OR LOWER(url_path) LIKE '%issue-menu%' OR (instr(url_path, '.') = 0 AND length(url_path) > 5)) AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY url_path HAVING hosts <= 3",
        "surface": "hb_http_activity",
        "description": "Find session start activity and menu interactions combined with rare, extensionless URL paths that may identify the uploaded trigger.",
        "expected_signal": "A rare path like /qdgusthrmlirprls that appears on few appliances across the estate shortly after a session start."
      },
      "parents": [
        {
          "id": "scope-beyondtrust-appliances"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "baseline",
        "label": "Rare session and menu endpoints",
        "reads": [
          "url_path",
          "device_hostname",
          "src_endpoint_ip",
          "time"
        ],
        "source": "hb_http_activity",
        "target": "web",
        "content": "SELECT url_path, COUNT(DISTINCT device_hostname) AS hosts, GROUP_CONCAT(DISTINCT src_endpoint_ip) AS clients, MIN(time) AS first_seen FROM hb_http_activity WHERE (url_path = '/api/start_session' OR LOWER(url_path) LIKE '%issue-menu%' OR (instr(url_path, '.') = 0 AND length(url_path) > 5)) AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days') GROUP BY url_path HAVING hosts <= 3",
        "silence": "not_evidence_of_absence",
        "baseline": {
          "window": "{{lookback_days}}d",
          "compare": "first_seen"
        },
        "expected": "A rare path like /qdgusthrmlirprls that appears on few appliances across the estate shortly after a session start.",
        "verified": "dry-run",
        "prevalence": {
          "by": "device_hostname",
          "key": [
            "url_path"
          ],
          "rare_below": 3
        },
        "verified_at": "2026-11-18"
      }
    },
    {
      "id": "early-triage",
      "type": "analytic",
      "label": "Early stage triage",
      "config": {
        "cite": "required",
        "tools": [
          "endpoint",
          "web"
        ],
        "context": [
          "lead-origin-errors",
          "lead-session-starts"
        ],
        "objective": "Identify hosts where unauthenticated session initialization or issue-menu access is followed by origin forgery errors or rare extensionless URL requests.",
        "description": "Assess whether session start activity and origin errors together indicate a likely exploitation attempt.",
        "max_iterations": 4,
        "expected_signal": "A verdict per host confirming if the lead evidence warrants deeper inspection of file and process activity.",
        "success_criteria": "A per-host verdict of suspicious if session start patterns and error logs align temporally."
      },
      "parents": [
        {
          "id": "lead-origin-errors",
          "kind": "merge"
        },
        {
          "id": "lead-session-starts",
          "kind": "merge"
        }
      ]
    },
    {
      "id": "follow-on-file-writes",
      "type": "query",
      "label": "Payload file deployment",
      "config": {
        "dsl": "sqlite",
        "role": "enrichment",
        "source": "endpoint",
        "content": "SELECT device_hostname, file_path, process_name, time FROM hb_file_activity WHERE (LOWER(file_path) LIKE '%.php.n$t' OR LOWER(file_path) LIKE '%/sdcust_thin_client/%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')",
        "surface": "hb_file_activity",
        "description": "Detect the creation of temporary .n$t files or PHP files in worker directories associated with the exploitation chain.",
        "expected_signal": "Files created in temporary customer directories or ending in the .n$t transfer suffix. Silence may occur if the attacker deletes the payload immediately."
      },
      "parents": [
        {
          "id": "early-triage"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "enrichment",
        "label": "Payload file deployment",
        "reads": [
          "device_hostname",
          "file_path",
          "process_name",
          "time"
        ],
        "source": "hb_file_activity",
        "target": "endpoint",
        "content": "SELECT device_hostname, file_path, process_name, time FROM hb_file_activity WHERE (LOWER(file_path) LIKE '%.php.n$t' OR LOWER(file_path) LIKE '%/sdcust_thin_client/%') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')",
        "silence": "not_evidence_of_absence",
        "expected": "Files created in temporary customer directories or ending in the .n$t transfer suffix. Silence may occur if the attacker deletes the payload immediately.",
        "verified": "dry-run",
        "verified_at": "2026-11-18"
      }
    },
    {
      "id": "follow-on-rce-processes",
      "type": "query",
      "label": "Broad shell and site-user activity",
      "config": {
        "dsl": "sqlite",
        "role": "triage",
        "source": "endpoint",
        "content": "SELECT device_hostname, process_cmd_line, user_name, parent_process_name, time FROM hb_process_activity WHERE (LOWER(process_cmd_line) LIKE '%/sh %' OR LOWER(process_cmd_line) LIKE '%/bash %' OR LOWER(process_cmd_line) LIKE '%/python%') AND (LOWER(parent_process_name) LIKE '%thin-scc%' OR LOWER(user_name) = 'msfuser') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')",
        "surface": "hb_process_activity",
        "description": "Identify any shell execution or python scripts originating from the site worker context or running as the site user (UID 1000).",
        "expected_signal": "Shell commands run by the site's primary OS user or spawned by the thin-scc worker process."
      },
      "parents": [
        {
          "id": "early-triage"
        }
      ],
      "primitive_config": {
        "dsl": "sqlite",
        "role": "triage",
        "label": "Broad shell and site-user activity",
        "reads": [
          "device_hostname",
          "process_cmd_line",
          "user_name",
          "parent_process_name",
          "time"
        ],
        "source": "hb_process_activity",
        "target": "endpoint",
        "content": "SELECT device_hostname, process_cmd_line, user_name, parent_process_name, time FROM hb_process_activity WHERE (LOWER(process_cmd_line) LIKE '%/sh %' OR LOWER(process_cmd_line) LIKE '%/bash %' OR LOWER(process_cmd_line) LIKE '%/python%') AND (LOWER(parent_process_name) LIKE '%thin-scc%' OR LOWER(user_name) = 'msfuser') AND ('{{scope_hosts}}' = '' OR instr(',' || '{{scope_hosts}}' || ',', ',' || device_hostname || ',') > 0) AND time >= datetime('now', '-{{lookback_days}} days')",
        "silence": "not_evidence_of_absence",
        "expected": "Shell commands run by the site's primary OS user or spawned by the thin-scc worker process.",
        "verified": "dry-run",
        "verified_at": "2026-11-18"
      }
    },
    {
      "id": "final-triage",
      "type": "analytic",
      "label": "Follow-on triage and confirmation",
      "config": {
        "cite": "required",
        "tools": [
          "endpoint",
          "web"
        ],
        "context": [
          "early-triage",
          "follow-on-file-writes",
          "follow-on-rce-processes"
        ],
        "objective": "Determine if the combination of origin errors, rare URL requests, file deployment, and subsequent process activity establishes a successful unauthenticated RCE intrusion.",
        "description": "Synthesize early indicators with file and process evidence to reach a final verdict on the intrusion.",
        "max_iterations": 5,
        "expected_signal": "A high-confidence verdict citing the full chain from unauth session start to RCE.",
        "success_criteria": "A malicious verdict for any host where the timeline shows unauth session -> origin error -> file write -> shell execution."
      },
      "parents": [
        {
          "id": "follow-on-file-writes",
          "kind": "merge"
        },
        {
          "id": "follow-on-rce-processes",
          "kind": "merge"
        }
      ]
    },
    {
      "id": "route-on-verdict",
      "type": "checkpoint",
      "label": "Route on verdict",
      "config": {
        "fuzzy": true,
        "judge": "hunter",
        "question": "The final triage verdict is malicious for at least one host based on origin errors and confirmed code execution.",
        "condition": "The final triage verdict is malicious for at least one host based on origin errors and confirmed code execution.",
        "blind_spot": "log-deletion-on-host",
        "confidence": "high",
        "description": "Contain the threat if malicious activity is confirmed.",
        "checkpoint_type": "mandatory"
      },
      "parents": [
        {
          "id": "final-triage"
        }
      ]
    },
    {
      "id": "isolate-appliance",
      "type": "action",
      "label": "Isolate appliance",
      "config": {
        "target": "endpoint",
        "description": "Prevent further exploitation or lateral movement from the compromised appliance.",
        "instructions": "Isolate the Remote Support appliance and revoke all active customer and representative sessions.",
        "action_approval": "required"
      },
      "parents": [
        {
          "id": "route-on-verdict",
          "branch": "on_supports"
        }
      ]
    },
    {
      "id": "analyst-review",
      "type": "task",
      "label": "Analyst review",
      "config": {
        "assignee": "analyst",
        "description": "Perform manual validation of suspicious leads that the agent could not definitively classify.",
        "instructions": "Review the syslog origin errors and HTTP extensionless URL requests; confirm if they align with the reported CVE-2026-102764 behavior."
      },
      "parents": [
        {
          "id": "route-on-verdict",
          "branch": "default"
        },
        {
          "id": "route-on-verdict",
          "branch": "on_unavailable"
        },
        {
          "id": "isolate-appliance"
        }
      ]
    },
    {
      "id": "close-out",
      "type": "task",
      "label": "Close out",
      "config": {
        "assignee": "analyst",
        "description": "Document findings and schedule periodic re-runs.",
        "instructions": "Record the hosts examined and the presence or absence of exploitation indicators. Recommend immediate patching if vulnerable versions were found."
      },
      "parents": [
        {
          "id": "route-on-verdict",
          "branch": "on_refutes"
        },
        {
          "id": "analyst-review"
        }
      ]
    }
  ]
}