chanleakcheck这是一个工具,用于检查您的 lnd 节点是否遭到 CVE-2019-12999 的攻击,该漏洞最近已被完整披露。该工具将检查您的节点是否接受了无效通道,并尝试量化丢失的币总量(如果有的话)。
请注意,该工具仅适用于 lnd,不过 eclair 和 c-lightning 也都有各自的检测工具:
您可以使用以下命令构建该工具:
go build -mod=vendor -v
工具安装完成后,您可以使用以下命令检查目标节点:
./chanleakcheck
如果您的节点未受影响,您应该会看到类似下面的输出:
2019/09/27 10:35:10 Your node was not affected by CVE-2019-12999!
否则,将显示每个无效通道以及无效转发的明细。
该命令的默认执行方式假定二进制文件与目标节点在同一台机器上运行,并且节点使用的配置/证书位于默认位置。该工具提供了参数,可用于检查远程节点:
./chanleakcheck -h
Usage of ./chanleakcheck:
-host string
host of the target lnd node (default "localhost:10009")
-macdir string
path to the readonly macaroon for the target lnd node (default "")
-network string
the network the lnd node is running on (default:mainnet) (default "mainnet")
-tlspath string
path to the TLS cert of the target lnd node (default "")