<p>I don't know how frequently this occurs but the Bitcoin.org client (using default settings) will, after some amount of time (in the several minutes range, if I remember correctly), intentionally drop the existing connection and connect to a new peer chosen from the list of peers it knows about.</p>

<p>So the duration available to the attacker to feed the node corrupt (invalid) data is not very long.</p>

<p>If the node will be used to honor payments on 0/unconfirmed, then a <a href="http://en.bitcoin.it/wiki/Double-spending#Race_attack" rel="nofollow">race attack</a> is a possibility so the recommendation is to not allow any incoming transactions and to have only outgoing connections and even then only to well-connected nodes.</p>

<p>There is further discussion of the risks here:</p>

<ul>
<li><a href="http://bitcointalk.org/index.php?topic=4335.msg63432#msg63432" rel="nofollow">http://bitcointalk.org/index.php?topic=4335.msg63432#msg63432</a></li>
<li><a href="http://codinginmysleep.com/bitcoin-attacks-in-plain-english" rel="nofollow">http://codinginmysleep.com/bitcoin-attacks-in-plain-english</a></li>
</ul>

CC BY-SA 3.0
2013-04-04T10:09:37.743Z
Wouldn't an attacker with man-in-the-middle capabilities be able to hijack all connections to the bitcoin network (incoming and outgoing), masquerading as many different nodes?
nivs
CC BY-SA 3.0
2013-01-19T03:53:50.667Z
2013-01-19T03:53:50.667Z
Stephen Gornick
<p>If a node (V) accepts incoming connections, is he vulnerable to becoming completely surrounded by corrupted nodes? Would an attacker be able to control which transactions are relayed to V and which transactions V is able to broadcast to the network?</p>

<p>I assume for this to happen V would have to, over time, lose connections to honest nodes to have them replaced by the attackers'.</p>

<p>If so, in what circumstances would the Bitcoin client lose connection with an honest node, other than it going offline?</p>

<doublespend>
What can happen if/when a node is surrounded by rogue nodes?
Ploo
# What can happen if/when a node is surrounded by rogue nodes?

(Asked by: username_0 on 2013-01-18)

If a node (V) accepts incoming connections, is he vulnerable to becoming completely surrounded by corrupted nodes? Would an attacker be able to control which transactions are relayed to V and which transactions V is able to broadcast to the network?

I assume for this to happen V would have to, over time, lose connections to honest nodes to have them replaced by the attackers'.

If so, in what circumstances would the Bitcoin client lose connection with an honest node, other than it going offline?

**Tags:** doublespend


---

## 1 answers

### Answer by username_1 on 2013-01-19. Score: 2

I don't know how frequently this occurs but the Bitcoin.org client (using default settings) will, after some amount of time (in the several minutes range, if I remember correctly), intentionally drop the existing connection and connect to a new peer chosen from the list of peers it knows about.

So the duration available to the attacker to feed the node corrupt (invalid) data is not very long.

If the node will be used to honor payments on 0/unconfirmed, then a [race attack](http://en.bitcoin.it/wiki/Double-spending#Race_attack) is a possibility so the recommendation is to not allow any incoming transactions and to have only outgoing connections and even then only to well-connected nodes.

There is further discussion of the risks here:

* <http://bitcointalk.org/index.php?topic=4335.msg63432#msg63432>
* <http://codinginmysleep.com/bitcoin-attacks-in-plain-english>

> **Comments:**
> **username_2**: Wouldn't an attacker with man-in-the-middle capabilities be able to hijack all connections to the bitcoin network (incoming and outgoing), masquerading as many different nodes?  

---

