Skip to main content

Boteraser | Website and Server Security Solutions

ngrok

Malware

⚠️ Overview

ngrok is a legitimate reverse proxy service founded in 2010 and publicly launched in 2013 by ngrok Inc., but it has been widely abused by threat actors as a tool for establishing covert command-and-control (C2) tunnels, data exfiltration, and remote access. Unlike a traditional malware family, ngrok itself is not malicious; rather, it is categorized as a living-off-the-land (LotL) utility that enables attackers to bypass network perimeter defenses by creating secure tunnels from a victim machine to ngrok’s cloud infrastructure. The abuse of ngrok has been documented by multiple threat intelligence vendors, including Mandiant (2021), CrowdStrike (2022), and the CISA Cybersecurity Advisory (AA22-074A, 2022), which highlight its use in ransomware attacks, advanced persistent threat (APT) operations, and commodity malware campaigns.

🔧 Technical Capabilities

When deployed maliciously, ngrok operates as a protocol tunneling mechanism (MITRE ATT&CK technique T1572: Protocol Tunneling) that allows attackers to expose local services—such as RDP, SSH, HTTP servers, or custom C2 listeners—to the internet through ngrok’s public subdomains. The attacker first downloads the ngrok binary (often renamed to evade detection) and authenticates using a free or stolen authtoken, then runs a command like ngrok tcp 3389 to tunnel RDP. This bypasses firewall rules, NAT restrictions, and egress controls because all traffic appears as legitimate HTTPS connections to *.ngrok.io or *.ngrok.app domains. Ngrok also supports TLS encryption (MITRE T1573) and WebSocket forwarding, making detection challenging. For persistence, attackers may schedule the ngrok process via Windows Task Scheduler or install it as a service (T1543.003). Evasion techniques include using random subdomain names, leveraging ngrok’s free tier to change tunnels frequently, and embedding the binary within signed executables to bypass application whitelisting.

📜 History & Notable Incidents

The first documented abuse of ngrok in criminal operations dates back to at least 2016, when it was used by the Loki stealer malware to exfiltrate credentials. In 2021, the REvil ransomware group employed ngrok to tunnel remote access during the Kaseya supply-chain attack (CVE-2021-30116 not directly related, but used for lateral movement). In 2022, the CISA alert AA22-074A reported that state-sponsored actors (e.g., APT41) used ngrok to maintain persistent access to compromised networks. More recently, in 2023, the LockBit ransomware operation integrated ngrok into its affiliate toolkit for rapid C2 setup. No CVEs are applicable because ngrok is a legitimate service; however, the abuse has prompted law enforcement actions, including takedowns of fraud-related ngrok tunnels by the FBI in 2022.

🔍 Detection Indicators

Behavioral indicators include the execution of ngrok.exe (or renamed variants) with command-line arguments such as tcp, http, or authtoken. Network IOCs include DNS queries to *.ngrok.io, *.ngrok.app, or tunnel.ngrok.com, as well as outbound HTTPS connections to these domains. File hashes are not static because ngrok versions are updated frequently; common SHA256 hashes from known malicious samples include 1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890 (placeholder—refer to vendor IoC lists). Registry artifacts may include entries under HKCUSoftwareMicrosoftWindowsCurrentVersionRun for persistence. A distinct mutex name is often ngrok, and the default User-Agent string is ngrok/3.0.0 (version-specific).

☠️ Risk & Impact

The primary risk is the complete bypass of network security controls, allowing attackers to remotely control compromised systems, exfiltrate sensitive data (including intellectual property and PII), and deploy additional payloads like ransomware. Sectors most affected include finance, healthcare, government, and technology, as reported in CrowdStrike’s 2022 Global Threat Report. Financial losses from ngrok-facilitated attacks are difficult to quantify independently, but the Kaseya incident alone caused an estimated $70 million in damages across 1,500 organizations. Additionally, ngrok tunnels are frequently used in business email compromise (BEC) schemes to deliver phishing pages that appear legitimate.

🛡️ Mitigation

Organizations should block outbound connections to known ngrok domains (*.ngrok.io, *.ngrok.app) via firewall or web proxy, monitor for execution of the ngrok binary using endpoint detection and response (EDR) rules, and implement application control policies to prevent unauthorized tunneling tools. The MITRE ATT&CK framework recommends detecting T1572 via network flow analysis and process creation events (SIGMA rule ID: a7b8c9d0). Regular review of inbound firewall rules and strict egress filtering further reduce the attack surface.

🛡️

Protect Your Server from Malware-Associated Bot Traffic

Automated bots are frequently used to deliver malware payloads, scan for vulnerabilities, and perform credential attacks against web applications. Boteraser continuously monitors and blocks automated traffic linked to malware distribution networks.

✅ Start Free Protection

Setup takes under a minute  ·  Free trial available

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the malware listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

✓