This hypothesis detects adversaries leveraging CowTunnel’s NSS wrapper and FRP client to establish covert reverse-proxy tunnels that facilitate stealthy outbound data exfiltration and lateral movement within Linux environments. SOC teams should proactively hunt for this specific React2Shell activity in Azure Sentinel because these sophisticated tunneling mechanisms often bypass standard network controls, enabling attackers to maintain persistent command-and-control channels while pivoting through compromised hosts.
rule HKTL_CowTunnel_Dec25 {
meta:
description = "Detects CowTunnel Linux reverse-proxy tunnel (NSS wrapper + FRP client) used for outbound access/pivoting in React2Shell activity"
author = "RussianPanda"
date = "2025-12-08"
score = 85
reference = "https://www.huntress.com/blog/peerblight-linux-backdoor-exploits-react2shell"
hash = "776850a1e6d6915e9bf35aa83554616129acd94e3a3f6673bd6ddaec530f4273"
id = "83155e55-0074-52d9-95ef-8486139814d1"
strings:
$s1 = "cannot create proxy service, it should not happenned!"
$s2 = "[nss] encrypt_data"
$s3 = "[nss] decrypt_data"
condition:
uint32(0) == 0x464c457f and all of them
}
This YARA rule can be deployed in the following contexts:
This rule contains 3 string patterns in its detection logic.
Here are 5 specific false positive scenarios for the CowTunnel Linux reverse-proxy tunnel detection rule, including suggested filters and exclusions:
Scheduled Backup Agent Communication
svc_backup) and restrict the detection to exclude traffic originating from known backup server IP ranges (10.20.45.x) during the defined maintenance window (01:30–03:30).CI/CD Pipeline Artifact Upload
jenkins-agent, gitlab-runner) and the destination port aligns with the artifact registry (e.g., Port 443 or specific FRP ports like 7000-7100).Remote Database Migration Tool Execution