What happens if computer virus less than a mb is sent as transaction that attacks miners?

  • Thanks Mr Andrew Chow – Annamalai Mar 8 at 9:58

The transaction would likely not be relayed. Even though a block could theoretically contain such a transaction, nodes would not relay such a large transaction. There is a transaction relay policy where nodes will refuse to accept and relay a transaction that is larger than 100 kb. Furthermore, depending on how this virus is encoded in the transaction, it may be marked as being non standard and thus not be relayed either. It could also be considered invalid if not constructed correctly.

But of course, given that we are talking about malware, it could, in theory, exploit some code path before these checks occur. Even if your transaction meets all validity and standardness rules, it would still have to do something that exploits some vulnerability that allows malicious code to be injected and executed. Such vulnerabilities are known as Remote Code Execution vulnerabilities and are rare and difficult to find. It is extremely unlikely that existing node software have RCEs that can be exploited via an incoming transaction, but not impossible.

If a RCE could be found and a transaction crafted that is able to exploit it, then what happens next depends entirely on the malware being executed. It would then be able to do other things similar to what other malware can do. From there, it all depends on what the attacker wants to do and has written the malware to do.

Of course such a virus would also infect other nodes on the network. It is further possible that nodes relay this malicious transaction. Or at least, they would likely also receive it in a block and potentially get the virus from block relay. So in the end, it could result in the entire network having this malware.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.