As reported by The Hacker News, Check Point Research has documented a sustained campaign by a Chinese-speaking cybercrime cluster dubbed Gambling Goblin that installs malicious Apache modules on compromised Brazilian government and educational web servers. The modules silently reverse-proxy visitor traffic to attacker-controlled gambling and betting pages, all while the browser address bar retains the legitimate .gov.br domain. This is not a conventional defacement or data breach — it is a trust infrastructure attack.

Threat Alert: As reported by The Hacker News, Check Point Research has documented a sustained campaign by a Chinese-speaking cybercrime cluster dubbed Gambling Goblin that installs malicious Apache modules on compromised Brazilian government and educational web servers.

Why This Campaign Is More Dangerous Than It Looks

The core innovation here is not the malware itself but the abuse of server-side middleware as a man-in-the-middle proxy. By injecting a malicious Apache module rather than altering page content or redirecting users client-side, the attackers achieve several things simultaneously:

Why This Campaign Is More Dangerous Than It Looks
Domain trust preservation: Visitors see a legitimate government URL. Browsers, security gateways, and search engine crawlers all treat the content as originating from a high-reputation domain.
Security header stripping: The module removes headers like CSP, HSTS, and X-Frame-Options from the proxied content, allowing the injected gambling pages to execute freely without browser protections.
SEO manipulation at scale: By chaining multiple compromised high-authority domains together, the attackers can artificially inflate search rankings for their betting properties — a technique that is extraordinarily difficult to detect from the outside.
The compromised servers are not the target — they are the delivery mechanism. Blocking them broadly would disrupt essential government services, which is exactly the dilemma the attackers are exploiting.

The Credential Theft Pipeline Deserves Close Attention

While the SEO gambling fraud grabs headlines, the toolchain deployed post-compromise is where the real long-term risk lies. Check Point identified a 3snake-based credential stealer that uses ptrace to attach to newly spawned sshd and sudo processes and extract password-based authentication strings in memory. This means every administrator who authenticates to a compromised server after the implant is installed is potentially handing over their credentials to the operators.

This creates a compounding problem: even if the malicious Apache module is discovered and removed, credentials harvested during the compromise period may already be in attacker hands. Those credentials can provide lateral movement into adjacent systems, databases, backup infrastructure, or other servers sharing the same administrative accounts — a particularly serious concern for government environments where shared service accounts are common.

Who Is at Risk Beyond Brazil

Although the observed targets are Brazilian, the TTPs are entirely portable. Any organization running Apache on Linux with insufficient module integrity monitoring is vulnerable to the same approach. Educational institutions, municipal governments, and mid-sized enterprises with under-resourced security teams are especially exposed — they often run legacy Apache installations with minimal file integrity monitoring and shared credentials across administrators.

The PhantomEnigma campaign reported by ANY.RUN, which compromised at least 20 .gov.br portals, may or may not be directly linked to Gambling Goblin, but it demonstrates that Brazilian government infrastructure has been broadly compromised and is being used as delivery chains for multiple threat actors.

Shield53 Recommendations

Immediate Actions

  • Audit all loaded Apache modules on every public-facing web server. Run httpd -M (or apachectl -M) and compare against your documented, approved module list. Investigate any unknown modules immediately.
  • Check module load paths — review LoadModule directives in httpd.conf and any included configuration files. Malicious modules may be loaded from non-standard paths.
  • Implement file integrity monitoring (FIM) on Apache configuration directories (/etc/apache2/, /etc/httpd/) and module directories (/usr/lib/apache2/modules/, /usr/lib64/httpd/modules/). Tools like AIDE, Tripwire, or Wazuh can detect unauthorized changes.
  • Rotate all administrative credentials for any server suspected of compromise. Assume credentials were captured by a ptrace-based stealer. Do not simply remove the module and consider the incident closed.

Hardening and Detection

  • Restrict ptrace capabilities using Yama LSM. Set kernel.yama.ptrace_scope = 2 (or at minimum 1) to prevent non-root processes from attaching to others. This directly disrupts 3snake-style credential theft.
  • Deploy eBPF-based runtime detection (Falco, Tetragon) to alert on unexpected ptrace syscalls targeting sshd or sudo processes.
  • Monitor outbound connections from web servers. A legitimate government or educational Apache server should not be establishing reverse-proxy connections to unknown external IPs. Network egress filtering and flow monitoring can catch this.
  • Enforce SSH key-based authentication only and disable password authentication entirely (PasswordAuthentication no). This eliminates the credential strings that 3snake is designed to capture.
  • Use a Web Application Firewall (WAF) or reverse proxy in front of Apache to detect anomalous response patterns, unexpected content types, or header stripping that differs from baseline behavior.

Broader Strategic Steps

  • Treat public-facing web servers as high-value trust assets, not commodity infrastructure. A compromised government domain is a weaponized trust anchor that can deceive citizens, partners, and automated security systems alike.
  • Engage with national CERT teams if you operate government infrastructure. Coordinated response prevents the whack-a-mole scenario where one institution remediates while neighboring ones remain compromised.
  • Review your SEO and brand monitoring programs — if your legitimate domain is suddenly ranking for gambling-related keywords or appearing in unexpected search results, that is an indicator of compromise, not a marketing anomaly.