<p>I don't see the attack here. You cannot claim you are a different node, because you cannot sign for that. All you can do is give a false IP address FOR YOUR OWN NODE. Which probably just leads to people not being able to reach you. </p>

<p>I guess the only interesting case is where the IP you give is already known as another node. Maybe the spec should spell out what an implementation should do then. But I guess not doing anything is probably fine, since you could still reach the known node under its IP adress (node lookup being per ID, I guess), and whenever you try to reach the spoofing node under the fake address, it just won't respond.</p>

CC BY-SA 4.0
2019-03-18T07:19:48.097Z
2019-03-18T07:19:48.097Z
stefanwouldgo
<p>According to <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#the-node_announcement-message" rel="nofollow noreferrer">BOLT 07 the node accountment message</a> looks like this: </p>

<blockquote>
  <ol>
  <li>type: 257 (<code>node_announcement</code>)</li>
  <li>data:
  
  <ul>
  <li>[<code>64</code>:<code>signature</code>]</li>
  <li>[<code>2</code>:<code>flen</code>]</li>
  <li>[<code>flen</code>:<code>features</code>]</li>
  <li>[<code>4</code>:<code>timestamp</code>]</li>
  <li>[<code>33</code>:<code>node_id</code>]</li>
  <li>[<code>3</code>:<code>rgb_color</code>]</li>
  <li>[<code>32</code>:<code>alias</code>]</li>
  <li>[<code>2</code>:<code>addrlen</code>]</li>
  <li>[<code>addrlen</code>:<code>addresses</code>]</li>
  </ul></li>
  </ol>
</blockquote>

<p>where the addresses are of the following form: </p>

<blockquote>
  <ul>
  <li>The following <code>address descriptor</code> types are defined:
  
  <ul>
  <li><code>1</code>: ipv4; data = <code>[4:ipv4_addr][2:port]</code> (length 6)</li>
  <li><code>2</code>: ipv6; data = <code>[16:ipv6_addr][2:port]</code> (length 18)</li>
  <li><code>3</code>: Tor v2 onion service; data = <code>[10:onion_addr][2:port]</code> (length 12)
  
  <ul>
  <li>version 2 onion service addresses; Encodes an 80-bit, truncated <code>SHA-1</code>
  hash of a 1024-bit <code>RSA</code> public key for the onion service (a.k.a. Tor
  hidden service).</li>
  </ul></li>
  <li><code>4</code>: Tor v3 onion service; data = <code>[35:onion_addr][2:port]</code> (length 37)
  
  <ul>
  <li>version 3 (<a href="https://gitweb.torproject.org/torspec.git/tree/proposals/224-rend-spec-ng.txt" rel="nofollow noreferrer">prop224</a>)
  onion service addresses; Encodes:
  <code>[32:32_byte_ed25519_pubkey] || [2:checksum] || [1:version]</code>, where
  <code>checksum = sha3(".onion checksum" | pubkey || version)[:2]</code>.</li>
  </ul></li>
  </ul></li>
  </ul>
</blockquote>

<p>taking this into consideration I could announce my node to have the IP address of another existing lightning node or even some arbitrary IP address. While it is clear that no one could connect to me as I don't control the IP address I wonder how the implementations would cope with such a behavior. </p>

<p>Even if implementations do not struggle with such spoofing an attacker could probably use this for fishing to trick a user into paying an invoice as it comes from a node_id that is connected to an IP-address from a well known service where the attacked person might even be a customer. </p>

<p>Is there anything else that could go wrong with such a spoofing behavior? Maybe there would even be benefits from it? </p>

<lightning-network><attack><lightning-network-daemon><core-lightning><eclair>
What are the consequences if I spoof an IP address in the node_announcment message?
Rene Pickhardt
# What are the consequences if I spoof an IP address in the node_announcment message?

(Asked by: username_0 on 2019-03-17)

According to [BOLT 07 the node accountment message](https://github.com/lightningnetwork/lightning-rfc/blob/master/07-routing-gossip.md#the-node_announcement-message) looks like this:

> 1. type: 257 (`node_announcement`)
> 2. data:
>    * [`64`:`signature`]
>    * [`2`:`flen`]
>    * [`flen`:`features`]
>    * [`4`:`timestamp`]
>    * [`33`:`node_id`]
>    * [`3`:`rgb_color`]
>    * [`32`:`alias`]
>    * [`2`:`addrlen`]
>    * [`addrlen`:`addresses`]

where the addresses are of the following form:

> * The following `address descriptor` types are defined:
>   + `1`: ipv4; data = `[4:ipv4_addr][2:port]` (length 6)
>   + `2`: ipv6; data = `[16:ipv6_addr][2:port]` (length 18)
>   + `3`: Tor v2 onion service; data = `[10:onion_addr][2:port]` (length 12)
>     - version 2 onion service addresses; Encodes an 80-bit, truncated `SHA-1`
>       hash of a 1024-bit `RSA` public key for the onion service (a.k.a. Tor
>       hidden service).
>   + `4`: Tor v3 onion service; data = `[35:onion_addr][2:port]` (length 37)
>     - version 3 ([prop224](https://gitweb.torproject.org/torspec.git/tree/proposals/224-rend-spec-ng.txt))
>       onion service addresses; Encodes:
>       `[32:32_byte_ed25519_pubkey] || [2:checksum] || [1:version]`, where
>       `checksum = sha3(".onion checksum" | pubkey || version)[:2]`.

taking this into consideration I could announce my node to have the IP address of another existing lightning node or even some arbitrary IP address. While it is clear that no one could connect to me as I don't control the IP address I wonder how the implementations would cope with such a behavior.

Even if implementations do not struggle with such spoofing an attacker could probably use this for fishing to trick a user into paying an invoice as it comes from a node\_id that is connected to an IP-address from a well known service where the attacked person might even be a customer.

Is there anything else that could go wrong with such a spoofing behavior? Maybe there would even be benefits from it?

**Tags:** lightning-network, attack, lightning-network-daemon, core-lightning, eclair


---

## 1 answers

### Answer by username_1 on 2019-03-18. Score: 1

I don't see the attack here. You cannot claim you are a different node, because you cannot sign for that. All you can do is give a false IP address FOR YOUR OWN NODE. Which probably just leads to people not being able to reach you.

I guess the only interesting case is where the IP you give is already known as another node. Maybe the spec should spell out what an implementation should do then. But I guess not doing anything is probably fine, since you could still reach the known node under its IP adress (node lookup being per ID, I guess), and whenever you try to reach the spoofing node under the fake address, it just won't respond.


---

