Pulsar 是一个具备自动协议学习与模拟能力的网络模糊测试工具。该工具通过机器学习技术(如聚类和马尔可夫模型)对协议进行建模。这些模型可用于模拟 Pulsar 与真实客户端或服务器之间的通信,借助语义正确的消息,并结合一系列模糊测试原语,能够在协议状态机的更深层次测试未知协议实现的错误。
有关 Pulsar 实现方法的详细信息,可阅读以下论文:
Pulsar: Stateful Black-Box Fuzzing of Proprietary Network Protocols
Hugo Gascon, Christian Wressnegger, Fabian Yamaguchi, Daniel Arp and Konrad Rieck
Proc. of 11th EAI International Conference on Security and Privacy in Communication Networks (SECURECOMM) October 2015
Learning Stateful Models for Network Honeypots
Tammo Krueger, Hugo Gascon, Nicole Krämer and Konrad Rieck
ACM Workshop on Security and Artificial Intelligence (AISEC) October 2012
_
_ __ _ _| |___ __ _ _ __
| '_ \| | | | / __|/ _` | '__|
| |_) | |_| | \__ \ (_| | |
| .__/ \__,_|_|___/\__,_|_| v0.1-dev
|_|
usage: pulsar.py [-h] [-c CONF] [-l] [-p PCAP] [-b BINARIES] [-a] [-x]
[-o OUT] [-d DIMENSION] [-s] [-z] [-m MODEL]
Protocol Learning and Stateful Fuzzing
optional arguments:
-h, --help show this help message and exit
-c CONF, --conf CONF Change default directory for configuration files. If
no directory is given, the files from 'pulsar/conf'
will be read.
MODEL LEARNING:
-l, --learner Learn a model from a set of network traces.
-p PCAP, --pcap PCAP tcpdump output file (pcap) or list of files separated
by commas to use as input data for a new model.
-b BINARIES, --binaries BINARIES
Name of binaries to process from the cuckoo storage
dir separated with commas.
-a, --all-binaries Generate models for all binaries from the cuckoo
storage dir (cuckoo/storage/binaries).
-x, --process Process derrick files through the functions defined in
utils/preprocessing/derrick.py.
-o OUT, --out OUT Change output directory for generated models. If no
directory is given, the model will be written to the
'models' directory.
-d DIMENSION, --dimension DIMENSION
Number of components to be used for NMF clustering.
SIMULATION & FUZZING:
-s, --simulate Simulate communication based on a given model.
-z, --fuzzer Start a fuzzing session based on a given model.
-m MODEL, --model MODEL
Path of the dir containing the model files to be
loaded for simulation or fuzzing.
目录 pulsar/conf 包含一系列配置文件,这些文件定义了 Pulsar 在自动学习、模拟和模糊测试中各个方法所需的参数。
从单个 PCAP 文件或由 cuckoo 沙箱运行的一个或多个二进制文件的记录流量中生成通信信道模型:
$> pulsar.py -l -p file.pcap (单个 pcap 文件)
$> pulsar.py -b 016169EBEBF1CEC2AAD6C7F0D0EE9026 (一个或多个 cuckoo 存储中的二进制文件)
$> pulsar.py -a (cuckoo 存储中的所有二进制文件)
基于学习到的模型模拟通信信道:
$> pulsar.py -s -m model_file
根据通信信道的模型对目标发起模糊测试会话:
$> pulsar.py -z -m model_file