DPRK Hackers Abuse Terraform Registry to Deliver Go Malware

SOC Briefing Summary :: Executive Key Takeaways
- [01]North Korean state-sponsored threat actors targeted Web3 developers using poisoned Terraform providers and Go modules hosted on the HashiCorp Registry.
- [02]The implant features a mathematical matrix decryption gate, a dual C2 architecture abusing Arbitrum Sepolia smart contracts, and a Slack API polling channel.
- [03]Pin all Terraform provider hashes using dependency lock files (.terraform.lock.hcl), enforce strict registry whitelisting, and block unauthorized Sepolia RPC nodes.
Executive Summary
In a landmark evolution of software supply chain tradecraft, North Korean (DPRK) state-sponsored threat actors have targeted decentralized finance and Web3 organizations by distributing malware through the HashiCorp Terraform Registry. Disclosed in recent threat intelligence findings, this campaign marks the first publicly recorded instance of adversaries weaponizing HashiCorp's centralized Infrastructure-as-Code (IaC) repository alongside public Go modules to deploy modular espionage backdoors.
The intrusion apparatus exhibits direct operational and infrastructural overlaps with Graphalgo, a sophisticated nation-state campaign historically attributed to North Korean units targeting cryptocurrency engineers through fraudulent technical employment interviews. Prospective developer candidates were approached across professional networks such as LinkedIn and Facebook, then invited to clone technical assessment repositories that surreptitiously ingested poisoned Terraform dependencies.
The implant integrates unprecedented evasion capabilities, including a cryptographic execution guardrail that only unpacks the payload if the host machine solves a specific mathematical linear system. For command and control, the malware establishes dual communication streams: polling an Arbitrum Sepolia Ethereum smart contract dead drop every three seconds, complemented by a redundant channel polling the Slack API (conversations.history).
Technical Vulnerability Analysis & Attack Chain

The threat actor orchestrated an intricate kill chain merging social engineering, developer toolchain poisoning, and blockchain infrastructure:
- Targeted Social Engineering (Contagious Interview): Operators pose as technical recruiters for non-existent cryptocurrency ventures. Developers are invited to complete an architectural coding task hosted in a seemingly benign GitHub repository that references external Terraform modules and Go packages.
- HashiCorp Registry & Go Module Poisoning: When the developer executes
terraform initorgo build, the developer workstation pulls poisoned packages published directly to the public HashiCorp Registry and Go module ecosystem. The adversaries inflated package credibility by deploying automated GitHub Actions worker farms to manufacture artificial download metrics and repository stars. - Cryptographic Matrix Guardrail: To neutralize automated malware dynamic analysis and cloud sandboxes, the primary payload is encrypted with asymmetric cryptography. Decryption is gated behind a complex mathematical linear system: the execution routine only derives the decryption key when the client software computes the correct solution for a specific hardcoded matrix.
- Host Reconnaissance & Ephemeral Key Derivation: Once decrypted, the Go binary gathers system identifiers (OS version, hostname, processor details, local node availability). The implant generates an ephemeral Elliptic Curve Diffie-Hellman (ECDH) key pair and combines it with two hardcoded threat actor public keys, creating a shared cryptographic channel that prevents cross-victim message leakage.
- Dual Blockchain & Slack Command Infrastructure: The malware polls an Ethereum smart contract deployed on the Arbitrum Sepolia testnet at 3-second intervals for encrypted operational instructions. Concurrently, it maintains a fallback channel polling an attacker-controlled Slack workspace via
conversations.historyusing embedded bot tokens. In subsequent stages, the implant deployssubwatcher, a persistent Node.js background daemon tasked with exfiltrating cryptocurrency wallet private keys and cloud authentication credentials.
MITRE ATT&CK Tactics, Techniques & Procedures (TTPs)
| Tactic | Technique ID | Technique Name | Operational Context |
|---|---|---|---|
| Resource Development | T1583.006 | Acquire Infrastructure: Web Services | Creation of bot-governed Slack workspaces and Arbitrum Sepolia smart contracts |
| Initial Access | T1195.001 | Supply Chain Compromise: Compromise Software Dependencies | Poisoned Terraform providers and Go modules distributed via HashiCorp Registry |
| Execution | T1204.002 | User Execution: Malicious File | Developer execution of terraform init or go build within cloned recruitment repos |
| Defense Evasion | T1480.001 | Execution Guardrails: Environmental Keying | Mathematical linear system matrix solution required to decrypt primary payload |
| Discovery | T1082 | System Information Discovery | Automated gathering of operating system, hardware attributes, and hostnames |
| Command and Control | T1102.002 | Web Service: Bidirectional Communication | Dual C2 via Arbitrum Sepolia Ethereum smart contracts and Slack API endpoints |
| Persistence | T1543.003 | Create or Modify System Process: Windows Service | Installation of persistent Node.js subwatcher background monitoring daemons |
| Credential Access | T1552.001 | Unsecured Credentials: Credentials in Files | Searching developer environments for private keys, AWS tokens, and seed phrases |
Threat Actor Profile & Campaign Attribution
The campaign is attributed to state-sponsored actors aligned with the Democratic People's Republic of Korea (DPRK), operating under the broader Lazarus Group / Graphalgo cluster. DPRK cyber operations routinely target global cryptocurrency, Web3, and fintech organizations to generate illicit foreign currency reserves and bypass international financial sanctions.
Their tactical shift into Infrastructure-as-Code (IaC) distribution ecosystems marks a dangerous broadening of the software supply chain attack surface. By embedding malicious execution into foundational DevOps tooling (Terraform), adversaries gain native execution rights within developer workstations and automated CI/CD deployment runners, placing cloud production environments at severe risk.
Detection & SOC Mitigation Playbook
1. Patch & Workaround Guidance
- Terraform Lock File Enforcement: Mandate the strict commitment and CI/CD verification of
.terraform.lock.hclfiles. Require explicit hash verification (-trust-lockfile) to prevent automated upgrades or ingestion of unvetted provider binaries. - Private Registry Whitelisting: Configure enterprise Terraform configurations (
.terraformrc/terraform.rc) to disallow public HashiCorp Registry provider resolution directly; route all provider downloads through internal, security-audited private registries. - Corporate Developer Isolation: Prohibit developers from cloning unvetted external repositories or running coding challenges on corporate laptops. Enforce sandboxed virtual machines for technical interviews.
2. Network & Perimeter Defenses
- Restrict outbound developer workstation connectivity to unauthorized blockchain testnet RPC endpoints (e.g., Arbitrum Sepolia gateways, Infura, Alchemy).
- Inspect and monitor outbound HTTP traffic to Slack API endpoints (
slack.com/api/conversations.history), particularly when initiated by non-standard process trees or command-line binaries. - Block newly published, unverified Terraform provider domains and inspect outbound developer traffic for unexpected Git checkouts.
3. Endpoint Detection & Hunting Query
title: Suspicious Process Spawning from Terraform or Go Developer Tooling
id: 5b8e2a14-7f39-4d10-8912-3456789abcde
status: experimental
description: Detects suspicious child processes (node.js, powershell, curl, subwatcher) spawned directly by terraform.exe or go build binaries.
author: CyberNewsAI Threat Intelligence
references:
- https://thehackernews.com/2026/09/attackers-use-malicious-terraform.html
tags:
- attack.t1195.001
- attack.t1059.001
- attack.t1102
logsource:
category: process_creation
product: windows
detection:
selection_parent:
ParentImage|endswith:
- '\terraform.exe'
- '\go.exe'
selection_child:
Image|endswith:
- '\node.exe'
- '\powershell.exe'
- '\cmd.exe'
- '\curl.exe'
CommandLine|contains:
- 'subwatcher'
- 'sepolia'
- 'slack.com/api'
- 'conversations.history'
condition: selection_parent and selection_child
falsepositives:
- Legitimate custom Terraform local-exec provisioners verified by DevOps administrators
level: high// Microsoft Sentinel / Defender Hunting Query: Detect Anomalous Slack API Polling and Node Subwatcher Execution
DeviceProcessEvents
| where Timestamp > ago(7d)
| where (FileName in~ ("node.exe", "go.exe", "terraform.exe") and ProcessCommandLine has_any ("subwatcher", "conversations.history", "sepolia", "arbitrum"))
or (InitiatingProcessFileName in~ ("terraform.exe", "go.exe") and FileName in~ ("node.exe", "powershell.exe", "cmd.exe"))
| project Timestamp, DeviceName, InitiatingProcessFileName, FileName, ProcessCommandLine, AccountName, DeviceId
| sort by Timestamp descInfrastructure & Blockchain Telemetry
| Indicator Type | Value / Context | Operational Role |
|---|---|---|
| Network Protocol | Arbitrum Sepolia RPC | Primary smart contract dead drop polling channel (3s interval) |
| C2 API Endpoint | slack.com/api/conversations.history | Secondary fallback C2 channel polling (10s interval) |
| Distribution Hub | HashiCorp Terraform Registry | Public provider hosting malicious Go execution wrappers |
| Persistence Daemon | subwatcher (Node.js) | Local background agent monitoring host input and wallets |
| Targeted Files | .terraform.lock.hcl / main.tf | Infrastructure files tampered to reference rogue providers |
| Campaign Cluster | Graphalgo / Lazarus Group | DPRK state-sponsored cyber espionage syndicate |
Graphalgo (DPRK)Arbitrum Sepolia Smart ContractSlack conversations.history APIsubwatcher Node.js daemon// VERIFIED_SOURCES_&_REFERENCES
Watch Full Video Briefings on YouTube
Subscribe to CyberNewsAI on YouTube for animated threat vectors, CISO breakdowns, and security briefings.
Related Threat Intelligence
View Archive
TeamFiltration Attacks Breach Microsoft 365 Cloud Accounts
The UNK_CondorFiltration campaign weaponized TeamFiltration against 28 Microsoft 365 tenants, compromising dormant service accounts with default passwords.

Ransomware Gangs Exploit Critical TeamCity Auth Bypass Flaw
CISA warns ransomware gangs are actively weaponizing a critical JetBrains TeamCity auth bypass flaw (CVE-2026-63077) to execute OS commands and hijack CI/CD.

Roundcube Webmail Pre-Auth SQLi CVE-2026-48842 Under Attack
A critical pre-auth SQL injection in Roundcube's virtuser_query plugin (CVE-2026-48842) is under active attack across 523,000 Internet-exposed webmail hosts.