hwipl/listnd
GitHub: hwipl/listnd
listnd 是一个通过被动捕获网络流量来发现和列出局域网设备的命令行工具,解决了无侵入式网络设备识别与盘点问题。
Stars: 12 | Forks: 2
# listnd
listnd 是一个命令行工具,用于发现网络上的设备并将其列出。
其发现过程是被动的,这意味着 listnd 不会发送任何数据包来发现网络上的设备。相反,它只会捕获网络接口上的数据包并进行分析。
## 安装说明
listnd 需要 libpcap 来从网络接口捕获数据包。因此,请
确保您已安装 libpcap。例如,在基于 debian 的发行版上:
```
$ sudo apt install libpcap-dev
```
安装完依赖项后,您可以使用 go 工具下载、构建 listnd 及
其其他依赖项,并将其安装到您的 GOPATH 或 GOBIN(通常是 `~/go/bin/`)中:
```
$ go install github.com/hwipl/listnd/cmd/listnd
```
## 使用说明
您可以通过以下方式运行 listnd
```
$ listnd
```
请确保您的用户具有在网络接口上捕获流量的权限。
您可以使用 `-i` 选项来指定网络接口。例如,您
可以通过以下方式指定接口 `eth3`:
```
$ listnd -i eth3
```
`listnd` 命令的命令行选项:
```
-debug
set debugging mode
-f file
set the pcap file to read packets from
-http address
use http server and set the listen address (e.g.: :8000)
-i interface
set the interface to listen on
-interval seconds
set output interval to seconds (default 5)
-pcap-filter filter
set pcap packet filtering to filter
-pcap-promisc
set pcap promiscuous parameter (default true)
-pcap-snaplen bytes
set pcap snapshot length parameter to bytes (default 1024)
-pcap-timeout seconds
set pcap timeout parameter to seconds (default 1)
-peers
show peers
```
当 listnd 运行时,它会定期将发现的设备以及
它收集到的相关信息打印到控制台。
## 示例
在小型家庭网络中运行 listnd 一小段时间:
```
$ sudo ./listnd -i eth3
[...]
======================================================================
Devices: 2 (pkts: 5246)
======================================================================
MAC: 5c:49:79:fe:dc:ba (age: 1, pkts: 3317)
Properties:
Router: true (age: 122)
Powerline: true (age: 2)
Unicast Addresses:
IP: 2001:c0ff:eec0:ffee:5e49:79ff:fefe:dcba (age: 93, pkts: 1)
IP: fe80::5e49:79ff:fefe:dcba (age: 52, pkts: 1)
IP: 192.168.1.1 (age: 87, pkts: 12)
Multicast Addresses:
IP: 224.0.0.251 (age: -1, pkts: 0)
IP: 224.0.0.22 (age: -1, pkts: 0)
IP: 224.0.0.2 (age: -1, pkts: 0)
IP: 239.255.255.250 (age: -1, pkts: 0)
IP: 224.0.0.252 (age: -1, pkts: 0)
MAC: 70:85:c2:ab:cd:ef (age: 1, pkts: 1929)
Unicast Addresses:
IP: 192.168.1.23 (age: 1, pkts: 1842)
IP: fe80::7285:c2ff:feab:cdef (age: 52, pkts: 5)
```
标签:EVTX分析, Go, Ruby工具, 日志审计, 网络设备发现, 被动嗅探, 防御绕过