Pinecone 是一款WLAN网络审计工具,适用于红队使用。它可以通过模块进行扩展,并设计在基于Debian的操作系统上运行。Pinecone 特别适用于配合树莓派作为便携式无线审计盒子。
此工具仅用于教育和研究目的。仅在获得明确许可的情况下使用。
要运行Pinecone,您需要一个基于Debian的操作系统(已在Raspbian、Raspberry Pi Desktop和Kali Linux上进行过测试)。Pinecone 有以下依赖项:
apt-get install python3 进行安装。apt-get install dnsmasq 进行安装。apt-get install hostapd-wpe 进行安装。如果您的发行版仓库中没有hostapd-wpe软件包,可以尝试使用 Kali Linux仓库预编译包 进行安装,或者 从其源代码编译。安装必要的软件包后,您可以使用 pip3 install -r requirements.txt 在项目根目录中安装Pinecone所需的Python包。
启动Pinecone时,在项目根目录内执行 python3 pinecone.py:
root@kali:~/pinecone# python pinecone.py
[i] Database file: ~/pinecone/db/database.sqlite
pinecone >
Pinecone 通过类似Metasploit的命令行界面进行控制。您可以输入 help 查看可用命令列表,或输入 help 'command' 获取特定命令的详细信息:
pinecone > help
Documented commands (type help <topic>):
========================================
alias help load pyscript set shortcuts use
edit history py quit shell unalias
Undocumented commands:
======================
back run stop
pinecone > help use
Usage: use module [-h]
Interact with the specified module.
positional arguments:
module module ID
optional arguments:
-h, --help show this help message and exit
使用命令 use 'moduleID' 激活一个Pinecone模块。您可以使用Tab自动补全查看当前已加载的模块列表:
pinecone > use
attack/deauth daemon/hostapd-wpe report/db2json scripts/infrastructure/ap
daemon/dnsmasq discovery/recon scripts/attack/wpa_handshake
pinecone > use discovery/recon
pcn module(discovery/recon) >
每个模块都有选项,在激活模块后输入 help run 或 run --help 可以查看。大多数模块的选项都有默认值(运行前请检查):
pcn module(discovery/recon) > help run
usage: run [-h] [-i INTERFACE]
optional arguments:
-h, --help show this help message and exit
-i INTERFACE, --iface INTERFACE
monitor mode capable WLAN interface (default: wlan0)
当模块激活后,您可以使用 run [options...] 命令启动其功能。模块会提供其执行状态的反馈信息:
pcn script(attack/wpa_handshake) > run -s TEST_SSID
[i] Sending 64 deauth frames to all clients from AP 00:11:22:33:44:55 on channel 1...
................................................................
Sent 64 packets.
[i] Monitoring for 10 secs on channel 1 WPA handshakes between all clients and AP 00:11:22:33:44:55...
如果模块在后台运行(例如 scripts/infrastructure/ap),您可以在模块运行时使用 stop 命令停止它:
pcn script(infrastructure/ap) > run
net.ipv4.ip_forward = 1
[i] Creating NAT rules in iptables for forwarding wlan0 -> eth0...
[i] Starting hostapd-wpe and dnsmasq...
Configuration file: ~/pinecone/tmp/hostapd-wpe.conf
Using interface wlan0 with hwaddr 00:11:22:33:44:55 and ssid "PINECONEWIFI"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
pcn script(infrastructure/ap) > stop
[i] Stopping hostapd-wpe and dnsmasq...
net.ipv4.ip_forward = 0
[i] Flushing NAT table in iptables...
完成模块使用后,您可以使用 back 命令停用它。也可以再次使用 use 命令激活另一个模块。
Shell命令可以通过 shell 命令或 ! 快捷方式执行:
pinecone > !ls
LICENSE modules module_template.py pinecone pinecone.py README.md requirements.txt TODO.md
目前,Pinecone 的侦察SQLite数据库存储在项目根目录下的 db/ 目录中。Pinecone 所需的所有临时文件也存储在项目根目录下的 tmp/ 目录中。