Pages:
Author

Topic: Double-spending with 6 confirmations (Read 2854 times)

staff
Activity: 4284
Merit: 8808
October 10, 2012, 09:15:59 AM
#30
This is very simular to a speculation of how MyBitcoin, which required only 1 confirmation, was hacked with only 1 pre-mined block instead of 2 as required for a normal withholding attack: White Paper, section 11
As an aside, many people searched and none could find an orphaned block in their storage (bitcoin stores all blocks lost in reorgs) which contained a double spend against the main chain, making their claimed attack vector very unlikely. Moreover they refused to provide a copy of their blockchain file, which would have conclusively proved the attack. In light of this I believe it's far more likely that they gambled away or just outright stole the funds.

In any case, Bitcoin "takes advantage of the nature of information being easy to spread but hard to stifle"— you only need one honest connection to resist this kind of attack, and the attack can't be performed against reasonable client software that enforces a reasonable number of confirmations without a considerable cost in producing doomed blocks.
kjj
legendary
Activity: 1302
Merit: 1026
October 10, 2012, 07:34:13 AM
#29
3. The attacker solves 6 blocks so the transaction gets 6 confirmations.
...
Is it possible theoretically and practically? What could be used to prevent such an attack?

Let's say the attacker has a decent 10 GH/s farm. It would only take him 3 months on average to solve 6 blocks. Doesn't sound practical to me.

The 6 blocks need to be consecutive and current, not random.
legendary
Activity: 3878
Merit: 1193
October 10, 2012, 04:05:37 AM
#28
3. The attacker solves 6 blocks so the transaction gets 6 confirmations.
...
Is it possible theoretically and practically? What could be used to prevent such an attack?

Let's say the attacker has a decent 10 GH/s farm. It would only take him 3 months on average to solve 6 blocks. Doesn't sound practical to me.
hero member
Activity: 815
Merit: 1000
October 09, 2012, 03:26:18 PM
#27
If the victim broadcasts tx then only the attacker receives it.
That's an isolation attack, its pretty well known, but rather hard to execute.

Additionally you would likely only be able to scam small merchants for small amounts for all your effort.

I'm not worried about this at all.
sr. member
Activity: 269
Merit: 250
October 09, 2012, 03:08:14 PM
#26
This idea came after reading https://bitcointalk.org/index.php?topic=114102.00:

Imagine that someone opened a lot of connections with multiple IPs to other nodes. Number of such connections so big that there are a lot of nodes connected only to the attacker. Let's assume the attacker attempts double-spending attack with the following scenario:

1. He chooses a victim and says that he will pay some bitcoins for something.
2. The attacker sends a transaction only to the victim, all other nodes know nothing about the transaction.
3. The attacker solves 6 blocks so the transaction gets 6 confirmations.
4. The victim sees the confirmations and complete its part of the deal.
5. While the attaker was solving his blocks the main blockchain got higher cumulative difficulty coz more than 6 blocks were solved. Even if the victim reconnects to other nodes it will see that non-legit transaction disappeared from the blockchain and the attacker still owns "spent" coins.

Is it possible theoretically and practically? What could be used to prevent such an attack?

This is very simular to a speculation of how MyBitcoin, which required only 1 confirmation, was hacked with only 1 pre-mined block instead of 2 as required for a normal withholding attack: White Paper, section 11


You don't need to mine 2 blocks in a row.  Mining a single block is sufficient if the network resolves the fork the way you want, and it might be possible to set things up so that this is likely.

Let's say I observe the timing of when nodes are broadcasting transactions and how they are propagating through the network.  By watching for which nodes are earliest to broadcast transactions from my target, I manage to establish a direct connection to my target.

I use a similar method of watching block broadcasts to establish connections to most of the mining pools.

Now I create a transaction making a valid, large deposit into my target.  I do not broadcast this transaction but I add it to a block that I am attempting to mine.  I mine solo, just like normal, except that I have an extra non-broadcasted tx that I am including.

Eventually, I succeed in creating a valid block.  I do not broadcast it immediately, but instead I wait until someone else mines a block, and when that happens, I immediately broadcast my block to my target.  If my target sees my block before the other block, they will accept it, and my transaction will have one confirmation.  The block chain has forked, and my target (and possibly other nodes, if my target relays quickly enough) will believe that my block is the correct one, while other nodes will believe that the other fork is the correct one.

I immediately request a withdrawal, and my target generates a transaction sending the large amount of coins to an address I control.  I also double-spend some of the inputs, sending the coins to myself.  The part of the network that did not receive my block first (which hopefully is most of the miners) will accept this as valid and work to include it in the next block.

If my block eventually "wins" because enough miners saw my block first and added onto it first, then I have just made a deposit and withdrawal, and I lose nothing.

If my block eventually "loses", then the deposit is invalidated.  If the deposit tx was not one of the inputs to the withdrawal transaction, then the withdrawal is still valid.


+1 for vector76's hypothesis.

If mybitcoin was running bitcoin behind Tor, and had just one connection (through a Tor exit node) to the rest of the bitcoin network, then they'd be particularly susceptible to this 1-confirmation attack.


legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
October 08, 2012, 05:33:36 PM
#25
If your so worried about this issue, I would recommend running 8 Bitocin nodes in different servers around the world and have only your clients connect to those 8 Bitcoin nodes ONLY and not the hardcoded IP addresses in Bitcoin, It would be impossible for anyone to find out all those 8 server(Unless you told them which your an idiot if that became the ase). This way you surround your self with "Clean" nodes and only if all 8 Bitcoin nodes were cancerous would your Clients turn cancerous which is infeasible.

I need a solution for everyone, not only for myself. But thx anyway.

Well then host 1000 Clean bitcoin nodes or at least host more Bitcoin nodes around the world more than cancer nodes.  Did anyone mention to you that its near impossible to know if you've taken over a Bitcoin client(Unless you have some kind of control over the computer it self to query the Bitcoin client for the connected nodes)? I was gritty about this issue my self a year back, The only answer is that its very infeasible for this to happen unless the incentive is great (You know your friend has a million bitcoins and leaves his computer open) but I'd imagine when Bitcoin goes mainstream more then half the population will not know how, or even want to run their own Bitcoin nodes to leave their own computer security to their self and bitting their teeth all day wondering if their Bitcoins are stolen yet or if they "Did it right", they will rely on companies called Bitcoin banks or a hardware device that thwarts these kind of attacks).
legendary
Activity: 2142
Merit: 1010
Newbie
October 08, 2012, 05:30:04 PM
#24
Seems to be a good idea. I'll think about it.
donator
Activity: 1218
Merit: 1079
Gerald Davis
October 08, 2012, 05:17:46 PM
#23
I need a solution for everyone, not only for myself. But thx anyway.

One option would be have the client allow users to set a trusted node.   For example if a user trusted his friend, blockchain.info, his mining pool, or MtGox he could set that as a trusted node and it would always attempt that connection first.  Currently that can be done from the config but an easy to use GUI would be a method to improve security.

A more robust solution would be an (optional) system where nodes were strongly authenticated using a public/private key type system.  This would also prevent MITM type attacks where attacker intercepts communication from "good nodes" and relays false data to victim.   Say you trust me and you have my public key.  When you bootstrap you could request the nodes that you connect to to search for my node and relay that.  An attacker couldn't impersonate my node without my private key.  An attacker could still prevent communication however you client could alert you (or even be programmed to not accept any data which doesn't come from at least one trusted node).

Taking it a step further a WOT type system could be put in place.  I trust come-from-behind so I mark his node as trusted (digitally signed w/ my private key).   A new node comes online and it doesn't trust cfb but it does trust me.  Even if my node if offline the indirect trust could be used for the node to connect to cfb in a semi-trusted manner.

legendary
Activity: 2142
Merit: 1010
Newbie
October 08, 2012, 05:07:26 PM
#22
If your so worried about this issue, I would recommend running 8 Bitocin nodes in different servers around the world and have only your clients connect to those 8 Bitcoin nodes ONLY and not the hardcoded IP addresses in Bitcoin, It would be impossible for anyone to find out all those 8 server(Unless you told them which your an idiot if that became the ase). This way you surround your self with "Clean" nodes and only if all 8 Bitcoin nodes were cancerous would your Clients turn cancerous which is infeasible.

I need a solution for everyone, not only for myself. But thx anyway.
legendary
Activity: 980
Merit: 1003
I'm not just any shaman, I'm a Sha256man
October 08, 2012, 04:59:07 PM
#21
If your so worried about this issue, I would recommend running 8 Bitocin nodes in different servers around the world and have only your clients connect to those 8 Bitcoin nodes ONLY and not the hardcoded IP addresses in Bitcoin, It would be impossible for anyone to find out all those 8 server(Unless you told them which your an idiot if that became the ase). This way you surround your self with "Clean" nodes and only if all 8 Bitcoin nodes were cancerous would your Clients turn cancerous which is infeasible.
legendary
Activity: 2506
Merit: 1010
October 08, 2012, 12:20:42 AM
#20
Well... Seems to me there is no a 100% solution to the problem.

As always, the level of security needed should be proportionate to the risk.

If a merchant is going to run their own node, there are two recommendations:  Disable incoming transactions, and have an explicit connection to a well known, trusted node. 

That's the recommendation for the merchant selling donuts.

For a merchant that has a higher volume (.e.g, ecommerce site or exchange, etc with larger volumes), it would be prudent to have listening nodes to confirm that your longest chain is the same as the rest of the world's longest chain.

There are situations where bitcoin is not an appropriate payment method.  Accepting Bitcoin payments requires relatively continuous network communications:
 - https://bitcointalksearch.org/topic/desert-island-economy-on-bitcoin-without-being-connected-to-the-internet-106302

Certainly though, with there existing these attack vectors, there will be poorly configured merchants out there and there will be thefts on merchants accepting payment with 0/unconfirmed.

But to see losses on confirmed transactions would only occur if you didn't follow the basic recommendations.
legendary
Activity: 1190
Merit: 1004
October 06, 2012, 08:42:02 AM
#19
I'm looking to create a secure connection with the client I'm making. So the chance of an attack using this method would be impossible. The most an attacker could therefore do is prevent someone using bitcoin if the attacker has control over the internet connection.
sr. member
Activity: 462
Merit: 250
October 06, 2012, 08:17:32 AM
#18
Solution: Make sure your nodes are always connected to at least one honest node. Make an agreement with miners, they are always connected to the main network, otherwise they lose money. Make encrypted channels between your own nodes and some miners. Monitor these connections. This way, even if an attacker will be controlling your internet connection, it will not go unnoticed.

As technology improves, total hashing power increases. 10% will likely always be a lot.
legendary
Activity: 2142
Merit: 1010
Newbie
October 06, 2012, 08:08:58 AM
#17
As for generating blocks, today, even 10% of the total hashing power is a lot.

Today. But what about when BFL ships ASICs?

Well... Seems to me there is no a 100% solution to the problem. Thx for the replies, guys.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
October 06, 2012, 08:05:48 AM
#16
OK. But what to do if someone makes successful Cancer Nodes attack?

I think if someone has complete control over a potential victim's computer then just stealing their wallet (or installing a trojan that changes the payment address when you send BTC) would probably be much easier than this idea so I wouldn't really be too worried about this "cancer node" scenario (although keeping the client up-to-date is important).
sr. member
Activity: 462
Merit: 250
October 06, 2012, 08:03:23 AM
#15
Theoretically, it is possible. The difficulties are:
  • making sure that the victim is not connected to any honest nodes,
  • generating blocks.

Even though IRC is no longer used by default, the node has to obtain peers' addresses somehow. And it is possible to interfere with this process. If the target node accepts tcp connections, an attacker can open many connections with the node as soon as it starts, and feed it with addresses of nodes controlled by the attacker. This way chances of the target node to connect to any honest node are significantly lower.

As for generating blocks, today, even 10% of the total hashing power is a lot.
legendary
Activity: 2142
Merit: 1010
Newbie
October 06, 2012, 08:02:48 AM
#14
OK. But what to do if someone makes successful Cancer Nodes attack?
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
October 06, 2012, 07:58:33 AM
#13
It's already happened:

I don't think that is quite correct.

Seems you are mistaken.
Well I was wondering how long it would take for people to notice. It's me

And no I am not putting lots of hashing power to the network, notice that it just says "relayed by" and not "mined by". I'm performing some measurements, paper is due in a few weeks.
legendary
Activity: 2142
Merit: 1010
Newbie
October 06, 2012, 07:56:06 AM
#12
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes.

AFAIA the IRC bootstrap is no longer used so I still don't see how this could happen (unless the victim was running an old version of the client).


It's already happened:

a lot of nodes connected almost exclusively to them, so they got all the notifications and forwarded them.

so it looked like all blocks came from them.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
October 06, 2012, 07:49:53 AM
#11
For example, an attacker might connect 100,000 IP addresses to the IRC bootstrap channel. You would then be very likely to connect only to attacker nodes.

AFAIA the IRC bootstrap is no longer used so I still don't see how this could happen (unless the victim was running an old version of the client).
Pages:
Jump to: