Bitstamp problem and warm wallets
homakov.blogspot.com
homakov.blogspot.com
If hot wallet refills are rare, the hot wallet must be sizable, but then the refills will be sizable too, so an attacker could steal hot wallet (sizable) and a refill (sizable) at least before discovery.
Each step adds an effective rate limiting step and a chance to catch the hole, but requiring manual intervention too often and the required auditing and manual checking will not be done. But any automation just pushes something from warm to hot.
An example: if you have one hot wallet with the keys loaded in to the system, and a secondary warm wallet (basically, a wallet that will be swapped in as the hot wallet when the other runs out), you can secure the details of the warm wallet better, meaning that certain read access vulnerabilities will only be able to target the hot wallet. Of course, an attacker can empty the hot wallet, and then the details of the warm wallet will be exposed when it is loaded because of the same vulnerability, but this forces the system to have a chance to validate the current state of the world before the second wallet becomes vulnerable, which is not the case if both were being used as loaded hot wallets.
There are meaningful automated sanity checks and rate limiting tactics that can be used with automated warm/hot wallets.
Of course, if you have a $5mil hot wallet, you should probably hire a "bitcoin banker" or "bitcoin teller" to sit at a workstation and manually deal with some of these kinds of swaps and oversee the audits. Even if you don't immediately patch all security holes, you'll have a much better idea of where you're leaking.
Yes it's inconvenient. But between inconvenience and losing $5,000,000
If attacker steals X from hot wallet the admins may detect suspicious activity (when hot wallet is drained entirely they must reaudit everything). Even if they don't notice anything the attacker gets 2X. While warm wallet is something like 100X
A secure off-line "cold wallet" system is hard. Physically, it looks like a collection of storage media. Those devices need to be backed up. But backing them up means making a copy of the private keys, which means the backup medium and the backup machine have a path into the funds. How do you audit a cold-wallet device, short of sending the funds in it back to yourself? Looking at it visually is useless, and reading it out exposes the keys to risk.
Some of these problems have known solutions from bank currency management operations. But some don't. In currency management, you can count and recount bills. You don't have to worry whether some of them have been used and invalidated. Bitcoins in some stored form are not like that. Just because you have a sealed plastic bag with a USB stick and a label that says "1000 BTC, validated on 2013-04-21" doesn't mean it's still good. If there was a copy made at some point, someone else may have the keys to those BTC. Even if they haven't transferred them yet.
So manual handling isn't a magic bullet. Off-line vault operations for a sizable Bitcoin operation are going to be complicated and expensive to do securely, more complicated than bank cash vault operations. We've already seen what happens when they're not done securely.
There are some little startups selling hardware wallets, or trying to get funding for doing so, but nobody with a solid track record of protecting large sums of money has a product. SafeNet and Thales are absent from the Bitcoin field.
Exactly.
Having code like this to begin with changes how all your future code works. It also is easier to debug, simpler to explain, etc. You think twice about adding new API calls, which makes you think twice before you add new bugs. Having the ability to muck around with API calls you shouldn't be making will catch you eventually.
I've posted this before, but web-app security in most startups I look at is so bad. If it's written in PHP, I can normally find every bug in the book in under 5 minutes. What is worse on top of that is many companies don't respond (and don't fix) when you report bugs. I'm talking well known startups too.
I really think the OWASP Top 10 needs to be required reading for startup founders (or technical leads).
The bank system (and transaction clearance delays) evolved for good reason. I suspect that bitcoin will not achieve the validity of fiat until a similar set of checks and balances are put in place (at least for sizable transactions.)
// plug: check out Celery https://www.gocelery.com
I understand his point. And I conceed that there is a lower barrier to entry for writing a PHP signup form than a Go systems-level program.
But please don't assume that all web apps are written by 2nd-year junior programmers. Some of us web developers have the experience required to write secure web apps.
Also I wanted to recommend manual approach to large withdrawals rather than automatic.
It takes more than not being a "2nd-year junior programmer" to write secure, reliable code; it takes specialist knowledge to make a solidly audit-able financial control system.
Proof of liabilities.
Leaks be instadetected.