Talos Takes
Every two weeks, host Amy Ciminnisi brings on a new guest from Talos or the broader Cisco Security world to break down a complicated security topic. We cover everything from breaking news to attacker trends and emerging threats.
Talos Takes
Using public blockchains for malware command and control
Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.
Grab a cup of coffee and get comfortable — this conversation gets into the technical mechanics of modern command-and-control (C2) infrastructure.
Attackers are constantly shifting their strategies to bypass traditional defensive playbooks, moving away from centralized infrastructure that is easy to seize or block. By leveraging public blockchains, threat actors are building highly resilient C2 channels that operate on top of legitimate, decentralized networks.
In this episode, Amy sits down with Cisco Talos researcher Chetan Raghuprasad to explore the evolution of C2 infrastructure. We track the development from early, centralized servers to the latest resilient implementations using Bitcoin, Ethereum ("EtherHiding"), and Solana.
Blogs:
Welcome to Talos Takes, where we discuss Cisco Talos latest research and security news. We break down complex topics for everyone, from beginner to expert, C suite to frontline. Hello and welcome to Talos Takes. If my voice is a little raspy, a little tired, that is because it is 7 a.m. here on the east coast of the US. Our guest is based in Singapore. It's a special treat where it is 8 p.m. So we're making do. But I'm very excited because today we're talking about the evolution of command and control infrastructure. A few episodes ago, we talked a little bit about ether hiding. Today we're going to do a deeper dive into how threat actors are hosting their C2 infrastructure on blockchains. And then also new findings from our researcher Chetan Ragu Prasad on UAT 126.43 that reveal the use of the overlord remote access Trojan or RAT. And this RAT embeds encrypted server URLs on the Solana blockchain. So Chetan, how are you doing?
Chetan RaghuprasadHi, Amy. Uh I'm doing good, thank you. And it's it really feels good to be here again.
Amy CiminnisiYeah, yeah. Last time you were on was with Hazel a few months ago, right?
Chetan RaghuprasadYeah, that's right. That's right. Exactly.
Amy CiminnisiYeah. Well, I'm glad to have you on. Let's let's jump right into it. So we have been tracking C2 infrastructure for a long time. Um we've had the DNS flux, we've had peer-to-peer networks. Um, can you walk us through how we got from these early methods to where we are today and what that looks like?
Chetan RaghuprasadYeah, sure, Amy. So it all started uh from uh very earlier days, I mean uh uh a couple of uh decades ago. And uh even uh we could see that sometimes uh even till date. But earlier, the command and control uh uh infrastructure which the attacker used to maintain was highly centralized and fragile. The malwares uh simply used to reach out to a hard-coded IP address or uh a single domain name. And uh once the defenders figured this out and uh they could just uh blacklist these IPs or seize the domains, which led to instantaneously diffusing uh the actors uh or the attacker's operations. So to survive these, the attackers needed to become a moving target that actually led to the era of uh fast flux uh DNS and domain generation algorithm, DGA techniques. So here, instead of uh having one domain, the malware would mathematically generate uh hundreds of uh potential uh domains a day, and attacker from those set of domains only needed uh a couple of those to register them and uh instrument that into their uh operations to successfully issue commands or to operate it as a uh C2 node or the C2 infrastructure. So it was uh like a relentless game of vacuum all for defenders, but eventually the security industry also got adapted and we got better at analyzing DNS traffic at scale and also spotting those uh DGA patterns and uh syncalling the domains before the attackers could even use them. So then uh after this, we started seeing the attackers um moving towards peer-to-peer, which is P2P uh network uh architecture, where uh an example which I would like to quote is uh uh game overs use botnet. Uh, in that uh intrusion, uh we have seen that there was no single server for the defenders or the law enforcement to take down. Uh instead, uh there were uh a couple of uh and the network of uh affected uh machine which actually uh was acting as a uh C2 nodes uh which can issue commands to the neighboring uh affected machines. Uh still uh the researchers and the security uh and the defenders eventually figured out how to map these uh P2P topologies, uh, and that also uh led these attackers to start thinking uh a different approach. And then we saw the domain fronting techniques uh which the attackers picked up, uh, wherein which their malware used to communicate to a legitimate domain or establish a handshake with a legitimate uh reputed domain uh which is uh available on a major CDN uh uh node, and uh then specifying a covert uh malicious uh host inside the encrypted HTTP host header. So with this, they were uh fronting um the legitimate domain uh in front of their actual uh infrastructure uh IP address or the domain names in their attacks. But that also led to the detections where the defenders uh could identify these techniques where the CDN nodes are under the control of the organizations, uh which led them to look towards the uh CDN logs and all, uh which made them uh kind of not that uh uh helpful to the attackers to continuously leverage on that technique, and then uh that forced them to uh go for a major uh evolution, which is hiding in the plain site. So, where attackers started using legitimate uh trusted platforms like uh Twitter, Telegram, and uh GitHub as a C2 channels, and again, here also all these platforms uh are under the control of uh uh corporate, and then the uh with the abuse um notification uh process or procedures, the researchers uh and defenders like once they identify these uh malicious domain, they could reach out to these uh uh organizations uh which host these platforms and uh issue a takedown request uh or to remove the malicious content from their uh platforms.
Amy CiminnisiSo, what is it about public blockchains that makes them so attractive to threat actors?
Chetan RaghuprasadSo at this point, um uh I would say, in my opinion, the attackers uh actually needed uh a type of bulletin board that was highly available and uh it could blend with normal web traffic and most importantly, entirely uncensorable. Where in which the blockchain uh become a perfect option for them to start leveraging or abusing the blockchain uh technologies, uh, and uh that led them to this blockchain uh-based dead drops or creating the dead drops on the blockchain ledger. So here uh the attackers they can uh embed the encrypted commands of their uh C2 or domain or the IP address in the ledger uh within the transactions, or uh they can also write the location of their secondary payloads directly into the uh transaction uh into a ledger. So uh that's how uh uh this uh has led them to like today, what we are seeing the blockchain uh uh dead drop uh technique and or an option for their C2 infrastructure resilience.
Amy CiminnisiYeah. And so you analyzed several different um networks in your research. So, like Bitcoin, Ethereum, Solana. Can you talk about some of the technical differences between these chains? You know, how how do they impact how an attacker sets up their dead drop and how the malware interacts with it?
Chetan RaghuprasadYeah. To talk about the uh differences actually it lies uh uh in their fundamental architecture, specifically uh whether uh uh it had they have to function as a simple ledger uh or a programmable computer or a high-throughput uh transaction logs. That's where the difference lies between this uh Bitcoin, Ethereum, and uh Solana uh blockchain or their transactions. So if we uh look into Bitcoin blockchain, so this Bitcoin blockchain, which is a kind of raw ledger and it is intentionally uh rigid. And uh the attackers or the users, like once they uh create the transactions and the transaction got validated and return into the ledger, and that transactions or any of the fields in that transaction cannot be modified. So earlier uh the attackers when they initially uh started leveraging uh this blockchain uh dead drop techniques, and in the Bitcoin transactions, they used a specific uh function called uh op underscore written, which appears as a field uh in the Bitcoin transactions, and uh it allowed the attackers or it will allow the users to write specific bytes of data into that uh op underscore return field. So, how the attackers instrumented it in their attack is uh they used to broadcast a small, often uh a very minimum or zero value kind of transaction uh to a specific wallet address which they control by embedding encrypted IP address or domains of their C2 servers into this OP underscore uh written feed. And then their malware was hard-coded with this specific wallet address, and uh, once that was implanted and run in the victim environment, it used to query the Bitcoin blockchain and looks at the transaction history of the uh transaction in that particular block. And after it retrieves those transaction history, uh it used to extract the op underscore uh written field data and decodes the routing instructions. So that's how uh they used to uh instrument the uh Bitcoin blockchain uh for their uh C2 resilience, but the limitations uh which they started facing was uh uh this blockchain is rigid, like I said uh earlier, and uh they didn't had any options to update their uh C2 domain names or the IP address uh or uh any commands related to their C2 infrastructure uh in a particular transaction that has already been uh registered to a ledger. So they had to again uh uh trigger a new transaction if their uh domain which was uh uh registered there is been detected and it's been blocked. So then uh they started uh looking towards another option uh uh into Ethereum blockchain or Ethereum network. So here in this Ethereum network uh with the help of uh Ethereum smart contracts, they were uh uh writing their uh encrypted or encoded messages related to the IP address or C2 or some specific uh configuration details or the commands into the Ethereum transactions which used to validate and written into the Ethereum blockchain. But before we look into how they actually instrumented into their intrusions or the attacks, I would like to talk a bit about uh the smart contracts. So this uh Ethereum smart contract is actually an autonomous software or I would say applications that are deployed directly uh to an address on the Ethereum network. The tiny applications are compiled into bytecodes and that will run on uh Ethereum virtual machines. So it is uh distributed across several independent nodes rather than uh hosted on a central server. So how the attacker started using this is uh they used to write a simple uh smart contract uh application or program whose sole purpose uh is to store the C2 domain as a variable into the transactions. And they deployed this to the blockchain, and uh in it has the capability to update that specific piece of information that they have written it as a variable to the transaction. So that is the main uh key point uh or uh a win situation for the uh threat actors uh to leverage this uh Ethereum smart chain. The attackers uh can use these smart contracts to uh update the message that has already been written into that particular transaction, and also the Ethereum transactions uh have a kind of small gas fee, uh, wherein uh blockchain or in the crypto transactions uh we see a particular amount called gas fee, which will uh which is similar to kind of transaction fees.
Amy CiminnisiRight.
Chetan RaghuprasadSo that is very minimum, and it also didn't cost them uh uh much. And uh once they do this uh uh setup uh in the blockchain and then the malwares they have engineered it to uh read a particular contract or the smart contract and then get the data uh within that particular contract using uh uh the legitimate RPC call which is called uh ETH underscore call via the public RPC endpoints like Infura, Ethereum, uh gateways, or like CloudFares. So why by doing this, uh they were able to get these encoded or encrypted data that is uh written into the transactions and then uh decode it and then use the C2 addresses. And we have seen a couple of examples in the external uh uh research reports where uh not only the C2 IP address or the domains have been uh uh hosted there, uh, but we also saw recently with the ClickFix uh URLs. I mean the clickfix URLs uh have been uh also uh staged on these uh smart contracts uh transactions and uh wherein which the malware uh or the uh code uh I saw in one of the reports they mentioned they use the Node.js type of malware and it retrieved this particular click fix URL, and uh from there the attack chain started to happen. So still we saw that uh in the malwares, uh, either the attacker has to provide the contract creator address or the specific Ethereum transaction address, and there is another uh entity called function address. So they have to or hard code this information in their malware for it to reach out to the Ethereum blockchain and look for the specific function address. So that is when they will uh get that piece of uh encrypted information which is embedded in that particular transaction. Uh so for the defenders or the reverse engineers who reverse those malwares and get those uh specific fields like function address or the contract creator address, so they can go to the Ethereum blockchain and uh search for that specific transaction and look those uh embedded uh data or information which the attacker has written there. The researchers have uh named this technique as ether hiding. So, ether hiding technique is uh quite popular today, and you've continued seeing many attacks uh or the intrusions leveraging these techniques.
Amy CiminnisiSo, one of your blogs focuses on what we think is a North Korea-aligned actor using the Overlord rat um with Solana. So, can you walk me through this example so we can kind of see how this actually plays out for the attacker and what they're trying to achieve?
Chetan RaghuprasadRecently one to two months ago, I mean, while uh doing the research, I found uh a specific uh binaries uh that was uh uh hosted on one of the uh staging servers controlled by the threat actor. And then uh we started analyzing that and uh we found that's an uh overload rat binary uh which is uh uh written in uh Golang. And that has the I would say the capability of implementing the C2 resilience using the Solana blockchain. This uh Solana blockchain uh uh or I would say Solana transaction memos. So uh in the Solana uh network uh uh this Solana program library, SPL Memo, which is what they call it as uh wherein in the Etherim network they call uh Ethereum smart contract. Here uh they call it as uh SPL memo program. So this actually SPL memo program uh is native to Solana network and it is pre-deployed directly within the Solana runtime. So it doesn't need any EVMs or like uh virtual machines uh to uh compile these into bytecodes and run the program. So this is direct. I mean uh direct and also another um advantage of this is uh uh it has the capability to like simply validate an arbitrary string of data which is passed to it uh in the form of like UTF-8 text or base 64 encoded binary data, and then it directly records it to the transaction's uh verified execution log. So that's the difference, and it is uh quite straightforward uh to the attackers, and also uh the solana transactions uh fees are like practically microscopic, so it is very minimum, and the attackers can rotate their deadrops or the configuration data that they have written into like almost virtually at zero cost, and also they can rely on the high throughput nature of the uh chain to quickly broadcast uh these new instructions. So they can do the setup at the blockchain uh uh end using these uh Solana SPL memo programs and the malwares which they use uh, like in this case or the recent research uh we found uh overload RAT implementing this technique where they were acquiring the SPL memo program address. So they reach out, uh the malware will uh reach out to the Solana blockchain and look for that SPL memo program address, and similar to the Bitcoin, uh like it retrieves the transaction uh history of that particular account and then look for an arbitrary string that is uh being embedded in that particular transaction. And this string uh usually is uh about 43 to 44 characters length, and they implement that logic in their malware to look for that particular embedded or encoded or encrypted string that they will get it and decrypt it and get the uh C2 instructions or the C2 domain or the IP address uh updated into their C2 specific modules modules of the RAT. So that will pick up the latest C2 address and it will reach out to the C2.
Amy CiminnisiSo is the was this research your first encounter with it on the Solana blockchain?
Chetan RaghuprasadYeah, so the usage of this Solona blockchain technique is not the first time uh that is being um identified or uh detected. Okay. So uh we have if I remember the dates, yeah. I I would say earlier uh it has started uh being uh implemented by Lazarus group and they started using this uh uh Solno blockchain dead drop techniques uh uh in their attacks. And after that, we have also recently uh seen another report uh wherein which another Portuguese uh speaking uh actor have also used this overload rat, which leverage on this uh Solna block. On our blockchain. So we have started seeing these being employed by the uh attackers, and uh it is kind of evolving.
Amy CiminnisiYeah. I mean, and I'm kind of curious, you know, security teams are used to the traditional playbook of like blocking domains, seizing IP addresses, working with registrars, things like that. Um and so we kind of get why that playbook falls apart here. Um, but if we can't just block that domain or host, what are effective ways for practitioners to like spot this traffic in the environment? And then, you know, what does normal versus malicious look like? And what should they do about it?
Chetan RaghuprasadYeah, yeah. So earlier, I mean, I would say the traditional playbook uh approach that we have. So, in that, like if we see a malicious domain, uh, the security team have a couple of options. Like the team can reach out to the registrar, like GoDaddy or Namecheap, uh, and uh they can uh put a request to uh suspend those domains. And if the server is hosting a payload, uh they can reach out to like law enforcement and uh uh get the subpoena and uh uh reach out to uh the hosting providers and physically seize the infrastructure or take down those malicious content uh or uh uh the particular host itself, or they can null root the IP addresses. So these were uh the options uh that uh we earlier uh or we have it in the traditional playbook. Uh, when uh we see this blockchain uh dead drop techniques, which what I feel is this traditional playbook will not entirely uh be more effective in uh uh containing the this uh dead drop or uh defending this uh dead drop technique, and also uh this is the reason that uh it ultimately uh pushes the defenders to completely change their strategy. Yeah, so instead of going with the traditional approach, the security teams have to move closer to the endpoint. I mean, they have to catch the malware in the memory, I mean they have to uh see or uh uh detect the behavioral uh anomalies of the malware that when it tries to execute a command, it reads from the chain or intercept the API calls at the host level, because the network infrastructure itself has entirely become bulletproof, so they have to go closer towards endpoint and uh start looking it into how it uh behavior behaves and operates within the memory. Because although the blockchain beforehand, uh, if we could say that blockchain is uh undetectable, but the malware is accessible to the researchers and the defenders. So, in that way, we can see that, and also for the network defenders, uh they need to deploy deep packet and full content inspection to analyze the actual uh behavioral context of the traffic to see some JSON RPC JSON specific format of data or the encoding uh data uh which is coming through uh the network or uh in that context, or look into the specific uh length of uh strings or the encrypted string which is which can be identified or detected uh in that uh particular traffic, which is what uh uh kind of suitable for defending uh this uh uh dead drop uh approach or the dead drop techniques.
Amy CiminnisiRight. And so I'm kind of curious, without being too alarmist or anything, like looking ahead. I mean, over the past several decades, we've seen this evolve so much. Where where do you see this evolving? Um, and like what should security teams be prioritizing right now to kind of stay ahead of you know these developments that might come?
Chetan RaghuprasadYeah, true, actually. So as we say, like defenders uh mature with these uh detection capabilities and uh uh like just we discussed that uh uh look closer into the behavioral uh aspects of that particular malware and all, the adversary tradecraft will also inevitably shift. So uh we are uh like anticipating that uh this on-chain C2 uh pipelines will move towards uh multi-chain fallback architectures where uh chaining uh loops across multiple cryptocurrency networks to evade single ecosystem blocks. So rather than uh just uh Ethereum smart contract or like just blocking the uh Solana uh network or the Solana blockchain, the chaining of uh chaining loop across like multiple cryptocurrency networks could happen or could evolve, and also uh these commercial RPC gateways uh implement uh stricter abuse detections. The attackers will likely route the RPC lookups through decentralized RPC aggregators, where this decentralized RPC aggregators like uh uh pocket network. So this actually eliminates uh the choking point for them. So uh how it works is um instead of routing uh traffic through one corporate provider, an aggregator acts as a uh massive uh routing layer. I mean, that distributes these RPC requests across uh various independent uh nodes, which are uh anonymous nodes, uh, which runs globally. So they can start leveraging this, which is uh kind of also we can call it as like logless networks. So we defenders or the researchers, we cannot go back to these corporate providers uh either to get the logs to uh analyze uh the intrusions or the transactions or uh the IP addresses which is related to the victims or something like that. And uh the next is uh they can leverage uh the dark mem mempool. I mean, uh they call it as uh private transaction uh relayers. So what is uh this mempool is uh whenever you do a cryptocurrency transactions, that transaction first sits in public uh mempool for a few seconds or minutes before it is being processed. I mean, before it is pushed to the validating network to validate the transaction, and then it will write it into the ledger. So before that, it will sit into this mempool, and then um if the researcher starts monitoring this uh public mempool uh to catch these actors rotating their infrastructure or uh giving defenders an earlier uh warning before the new C2 goes live. So they can uh start leveraging on these private transaction relayers. Uh, how it is designed is it is like uh a front run uh bot kind of thing where the users or the attackers can submit transactions directly to the validators instead of uh uh waiting it in the mempool, so they can bypass and they can directly submit it to the validators and so that it will be validated and return it to the uh ledger, so which kind of creates a uh blinder to the researchers if we think about uh monitoring the public mempool, and then the third option which I uh thought about is uh leveraging uh zero knowledge uh proof verification system, which they call ZKP verification system, uh, wherein which it allows uh the users or someone to prove uh a specific piece of information without actually revealing uh uh that information. So they can start leveraging this. I mean, in the uh malware context or the attacker context, this is fundamentally uh it changes how the payloads are protected from the defenders or uh researchers. Uh, wherein uh right now we have that if an attacker puts a C2 domain in a smart contract, like I mentioned earlier, anyone can uh uh go and uh query that contract. Uh if you reverse the binary and get the contract address or the function address, uh you can go and look it in the uh blockchain of that particular uh cryptocurrency network. Uh but with this uh ZKP uh ZKP, I mean uh zero knowledge proof, which will allow the attackers to implement this bulletproofing uh uh environment at uh completely. So it will uh completely blind that information or the uh transaction details at all.
Amy CiminnisiSo what should I guess defenders do with all of this and how how should security teams try and stay ahead? Because that's that's you know scary uh scary possibilities.
Chetan RaghuprasadYeah, that's true. So uh one thing or the uh I would say the main thing is uh uh for for this uh public ledger, uh uh treating it as just a financial uh tracks. So we should start looking at it uh as an adversarial uh communication layer, like one of the adversarial communication layer. And uh then again uh that we discussed earlier, uh uh implementing uh the behavioral analysis of those uh uh malwares uh will really uh help the defenders and the security uh professionals to um effectively defend this uh approach which the attackers are uh implementing.
Amy CiminnisiYeah. Wow. Chetan, thank you so much for coming on. This was incredibly useful. Um it was it was great, and I feel like I've learned a lot more about this. Thank you.
Chetan RaghuprasadThank you, Amy.
Amy CiminnisiListeners, thanks for tuning in. I will put both of Chetan's blogs in the show notes below. We will have a brand new episode for you in another two weeks. In the meantime, you can check out Beers with Talos or subscribe to our Threat Source newsletter, which comes out every Thursday. And until then, stay safe out there.