就像 nmap 用于映射未连接的 WiFi 网络一样。通过原始 802.11 监控模式来映射和追踪 WiFi 网络及设备。
PyPI 页面:https://pypi.python.org/pypi/trackerjacker
pip3 install trackerjacker
支持的平台:Linux(已在 Ubuntu、Kali 和 RPi 上测试)和 macOS(pre-alpha)

trackerjacker 可以帮助你解决以下问题:
通过以下命令查看详细用法:
trackerjacker -h
trackerjacker 有两种主要使用模式:map 模式和 track 模式。
Map 命令:
trackerjacker -i wlan1337 --map
默认情况下,这会输出 wifi_map.yaml YAML 文件,该文件包含附近所有 WiFi 网络及其用户的映射。以下是 wifi_map.yaml 文件的一个示例:
TEST_SSID:
00:10:18:6b:7a:ea:
bssid: 00:10:18:6b:7a:ea
bytes: 5430
channels:
- 11
devices:
3c:07:71:15:f1:48:
bytes: 798
signal: 1
vendor: Sony Corporation
78:31:c1:7f:25:43:
bytes: 4632
signal: -52
vendor: Apple, Inc.
signal: -86
ssid: TEST_SSID
vendor: Broadcom
BRANSONS_WIFI:
90:48:9a:e3:58:25:
bssid: 90:48:9a:e3:58:25
bytes: 5073
channels:
- 1
devices:
01:00:5e:96:e1:89:
bytes: 476
signal: -62
vendor: ''
30:8c:fb:66:23:91:
bytes: 278
signal: -46
vendor: Dropcam
34:23:ba:1c:ba:e7:
bytes: 548
signal: 4
vendor: SAMSUNG ELECTRO-MECHANICS(THAILAND)
signal: -80
ssid: BRANSONS_WIFI
vendor: Hon Hai Precision Ind. Co.,Ltd.
hacker_network:
80:2a:a8:e5:de:92:
bssid: 80:2a:a8:e5:de:92
bytes: 5895
channels:
- 11
devices:
80:1f:02:e6:44:96:
bytes: 960
signal: -46
vendor: Edimax Technology Co. Ltd.
80:2a:a8:8a:ec:c8:
bytes: 472
signal: 4
vendor: Ubiquiti Networks Inc.
80:2a:a8:be:09:a9:
bytes: 5199
signal: 4
vendor: Ubiquiti Networks Inc.
d8:49:2f:7a:f0:8f:
bytes: 548
signal: 4
vendor: CANON INC.
signal: -46
ssid: hacker
vendor: Ubiquiti Networks Inc.
80:2a:a8:61:aa:2f:
bssid: 80:2a:a8:61:aa:2f
bytes: 5629
channels:
- 44
- 48
devices:
78:88:6d:4e:e2:c9:
bytes: 948
signal: -52
vendor: ''
e4:8b:7f:d4:cb:25:
bytes: 986
signal: -48
vendor: Apple, Inc.
signal: -48
ssid: null
vendor: Ubiquiti Networks Inc.
82:2a:a8:51:32:25:
bssid: 82:2a:a8:51:32:25
bytes: 3902
channels:
- 48
devices:
b8:e8:56:f5:a0:70:
bytes: 1188
signal: -34
vendor: Apple, Inc.
signal: -14
ssid: hacker
vendor: ''
82:2a:a8:fc:33:b6:
bssid: 82:2a:a8:fc:33:b6
bytes: 7805
channels:
- 10
- 11
- 12
devices:
78:31:c1:7f:25:43:
bytes: 4632
signal: -52
vendor: Apple, Inc.
7c:dd:90:fe:b4:87:
bytes: 423223
signal: 4
vendor: Shenzhen Ogemray Technology Co., Ltd.
80:2a:a8:be:09:a9:
bytes: 5199
signal: 4
vendor: Ubiquiti Networks Inc.
signal: -62
ssid: null
vendor: ''
请注意,由于这是 YAML 格式,你可以轻松地将其用作自己其他脚本的输入。这里有一个解析这个 "YAML 数据库" 的示例脚本:parse_trackerjacker_wifi_map.py。
Track 模式允许你指定要监视的一些 MAC 地址,如果任何特定设备超过阈值(以字节为单位,此处通过 --threshold 4000 指定警报阈值为 4000 字节),则会触发警报。
trackerjacker --track -m 3c:2e:ff:31:32:59 --threshold 4000 --trigger-command "./alert.sh" --channels-to-monitor 10,11,12,44
Using monitor mode interface: wlan1337
Monitoring channels: {10, 11, 12, 44}
[@] Device (3c:2e:ff:31:32:59) threshold hit: 4734
[@] Device (3c:2e:ff:31:32:59) threshold hit: 7717
[@] Device (3c:2e:ff:31:32:59) threshold hit: 7124
[@] Device (3c:2e:ff:31:32:59) threshold hit: 8258
[@] Device (3c:2e:ff:31:32:59) threshold hit: 8922
在这个例子中,我正在监视一个安全摄像头,以确定它何时在上传视频(表明检测到运动),这样我就可以打开安防系统的警报器(这最初是本项目的初衷)。
trackerjacker -i wlan1337 --track --trigger-plugin foxhunt
显示一个如下所示的 curses 屏幕:
POWER DEVICE ID VENDOR
======= ================= ================================
-82dBm 1c:1b:68:35:c6:5d ARRIS Group, Inc.
-84dBm fc:3f:db:ed:e9:8e Hewlett Packard
-84dBm dc:0b:34:7a:11:63 LG Electronics (Mobile Communications)
-84dBm 94:62:69:af:c3:64 ARRIS Group, Inc.
-84dBm 90:48:9a:34:15:65 Hon Hai Precision Ind. Co.,Ltd.
-84dBm 64:00:6a:07:48:13 Dell Inc.
-84dBm 00:30:44:38:76:c8 CradlePoint, Inc
-86dBm 44:1c:a8:fc:c0:53 Hon Hai Precision Ind. Co.,Ltd.
-86dBm 18:16:c9:c0:3b:75 Samsung Electronics Co.,Ltd
-86dBm 01:80:c2:62:9e:36
-86dBm 01:00:5e:11:90:47
-86dBm 00:24:a1:97:68:83 ARRIS Group, Inc.
-88dBm f8:2c:18:f8:f3:aa 2Wire Inc
-88dBm 84:a1:d1:a6:34:08
foxhunt 是一个内置插件,但你可以使用相同的插件 API 定义自己的插件。$ trackerjacker --track -m 3c:2e:ff:31:32:59 --threshold 10 --trigger-plugin examples/plugin_example1.py --channels-to-monitor 10,11,12,44 --trigger-cooldown 1
Using monitor mode interface: wlan1337
Monitoring channels: {10, 11, 12, 44}
[@] Device (device 3c:2e:ff:31:32:59) threshold hit: 34 bytes
3c:2e:ff:31:32:59 seen at: [1521926768.756529]
[@] Device (device 3c:2e:ff:31:32:59) threshold hit: 11880 bytes
3c:2e:ff:31:32:59 seen at: [1521926768.756529, 1521926769.758929]
[@] Device (device 3c:2e:ff:31:32:59) threshold hit: 18564 bytes
3c:2e:ff:31:32:59 seen at: [1521926768.756529, 1521926769.758929, 1521926770.7622838]
每当发现 3c:2e:ff:31:32:59 发送/接收 10 字节或更多时,运行 examples/plugin_example1.py。
trackerjacker 插件是简单的 Python 文件,其中包含:
Trigger 类,定义了 __call__(**kwargs) 方法(示例:examples/plugin_example1.py)trigger(**kwargs) 函数(示例:examples/plugin_example2.py)也可以选择性地包含一行 __apiversion__ = 1(用于未来的向后兼容性)。
trackerjacker.py -c my_config.json
以下是一个名为 my_config.json 的示例配置文件:
{
"iface": "wlan1337",
"devices_to_watch": {"5f:cb:53:1c:8a:2c": 1000, "32:44:1b:d7:a1:5b": 2000},
"aps_to_watch": {"c6:23:ef:33:cc:a2": 500},
"threshold_window": 10,
"channels_to_monitor": [1, 6, 11, 52],
"channel_switch_scheme": "round_robin"
}
关于此配置的一些说明:
threshold_bytes 是默认的字节阈值,当超过该阈值时会触发警报函数。threshold_window 是分析 threshold_bytes 的时间窗口。devices_to_watch 是一个列表,可以包含字符串(代表 MAC 地址)或字典(允许指定 name 和 threshold)。
name 是当该设备被看到时要打印的标签。threshold 在 "Security camera" 中表示必须看到的字节数。channels_to_monitor - 要监控的 802.11 WiFi 信道列表。你的无线网卡支持的信道列表会在 trackerjacker 启动时打印出来。默认情况下,会监控所有支持的信道。channel_switch_scheme - 可以是 default、round_robin 或 traffic_based。traffic_based 会确定流量最多的信道,并以概率方式更频繁地监控它们。Trackerjacker 附带了一些与 WiFi 黑客相关的其他实用功能。其中之一是能够在特定接口上开启监控模式。
启用监控模式:
trackerjacker --monitor-mode-on -i wlan0
禁用监控模式:
trackerjacker --monitor-mode-off -i wlan0mon
注意,trackerjacker 会在必要时自动启用/禁用监控模式。此功能仅在你想为其他应用程序启用接口监控模式(或者如果你计划频繁启动/退出进行测试,以便加快 trackerjacker 的启动速度)时有用。
trackerjacker --set-channel 11 -i wlan0
注意,在常规的 map/track 操作中,trackerjacker 会根据需要自动切换信道。此选项仅在你想为其他应用程序设置接口信道时有用。
sudo iw reg set US - 为了能够使用无线适配器上的所有可用信道,你可能需要运行此命令(或其变体)。ifconfig - 列出无线适配器名称。