Potential EtherHiding C2 via Curl JSON-RPC Request
Description
Detects when curl or nscurl is spawned by a shell or osascript to make a JSON-RPC request to a blockchain endpoint for command and control purposes. Adversaries may leverage blockchain smart contracts as a covert C2 channel to retrieve commands or payload staging information, as observed in ClickFix campaigns.
Query · eql
process where host.os.type == "macos" and event.type == "start" and event.action == "exec" and
process.name in ("curl", "nscurl") and
process.parent.name in ("osascript", "bash", "sh", "zsh") and
process.command_line like~ ("*eth_call*", "*\"jsonrpc\"*")
Analyst notes
Investigating Potential EtherHiding C2 via Curl JSON-RPC Request
EtherHiding is a command and control technique in which threat actors store malicious configuration, commands, or payload URLs inside smart contract data on public blockchains. Because the blockchain is immutable and the RPC endpoints are legitimate public infrastructure, this provides a takedown-resistant C2 channel. On macOS, ClickFix-delivered loaders have been observed reading contract data by spawning curl from a shell or osascript with a raw JSON-RPC eth_call request body.
Possible investigation steps
- Review process.command_line to identify the destination RPC endpoint, the contract address in the eth_call parameters, and the method selector.
- Examine the parent process chain (process.parent.command_line, effective parent) to determine how the shell or osascript was launched — interactive terminal, LaunchAgent, or another persistence mechanism.
- Search the same host for follow-on network connections shortly after this event; EtherHiding reads are typically followed by a connection to the decoded C2 host.
- Check for recent LaunchAgent or LaunchDaemon plist creation on the host, which commonly accompanies this activity as persistence.
- Search the contract address against threat intelligence sources to identify the associated campaign.
- Pivot fleet-wide on the destination RPC domain and any decoded C2 domains to identify additional hosts.
False positive analysis
- Web3 developers may test contract calls with curl against RPC endpoints. Verify whether the user has a legitimate blockchain development role and whether the parent context (terminal session vs. persistence item) matches interactive development work.
- CI or build scripts that query chain state via curl could match. Confirm with the owning team and consider excluding specific parent scripts or hosts.
Response and remediation
- Isolate the affected host to interrupt the C2 channel.
- Terminate the parent shell or osascript process tree.
- Identify and remove any associated persistence (LaunchAgents/LaunchDaemons) and decoded payloads.
- Block decoded C2 domains identified from the contract data; note that blocking public RPC aggregators may impact legitimate use and should be a risk-based decision.
- Rotate credentials accessible from the host and review for evidence of data theft.
- Escalate for full incident response if the activity chains from a ClickFix or social engineering delivery.