3 ms·
The problem is that the moment you think that code review will stop an adversary (and you should treat all the coin developers as adversaries as a matter of cou
by vidarh 11y ago
The problem is that the moment you think that code review will stop an adversary (and you should treat all the coin developers as adversaries as a matter of course here), odds are good you've lost, no matter what the language is.
You should still review, but couple that with sandboxing the code in VMs (and as much as I love Docker etc.: that's insufficient), and make sure that you fully firewall that VM and the entire machine the VM is on off from everything else in your system. And crucially, that means ensuring that outbound access is also firewalled and filtered.
In this case, the coins use of IRC (for discovery or something?) ought to have been a red flag and made them ask for a precise spec of what IRC traffic should be expected and ensure they were proxying and filtering and logging all the IRC traffic. This wouldn't stop the creator from embedding more convoluted command channels in something that looks like the normal message exchange with peers, but this was just way too easy.
There'd still be plenty of scope for malicious code. E.g. the daemon could still have stolen all LuckyCoins deposited, for example, without requiring any suspicious communication, but at least with proper sandboxing and firewalling it'd be (if done right) isolated to that specific coin.