
Изучение протоколов и фаззинг с сохранением состояния
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 sandbox:
$> pulsar.py -l -p file.pcap (1 pcap file)
$> pulsar.py -b 016169EBEBF1CEC2AAD6C7F0D0EE9026 (1 or more binaries from cuckoo storage)
$> pulsar.py -a (all binaries from cuckoo storage)
Симулировать канал связи на основе изученной модели:
$> pulsar.py -s -m model_file
Запустить сессию фаззинга против цели, используя модель ее канала связи:
$> pulsar.py -z -m model_file