Skip to content

cn-uofbasel/CCN-PacketFuzzing

Repository files navigation

CCN-PacketFuzzing

Fuzzing is a software testing technique where unexpected input is passed to a software. This project aims to test packet encoding of NDN/CCN implemenations. Supported packet formats are NDN Packet Format and CCNx. This software runs on Python 3.6+ and is able to test packet decoding of CCN-lite, PiCN and PyCN-lite.

Setup

  1. Clone the Repository
git clone https://github.com/cn-uofbasel/CCN-PacketFuzzing.git
  1. Run setup.py
cd CCN-PacketFuzzing
python3.6 setup.py install

Usage

Parsers

To test one of the supported parsers, you have to have it on your machine. Infos for Installation can be found here:

Run

python3.6 Packet_Fuzzing.py 'parser' 'path'

Parser: This indicates the program that should be tested.
Path: The relative or absolute path to the main folder of the parser.

Examples

python3.6 Packet_Fuzzing.py picn ../PiCN

python3.6 Packet_Fuzzing ccn ~/MyTestfile/ccn-lite

Options

The CCN-PacketFuzzer brings some command line options. For a quick help run the program with argument -h or --help

Simple Optionals

Fuzziness Level

-f or --fuzziness

  • 0: All length values are correct
  • 1: The length values at deepest recursion level in the TLV's are wrong
  • 2: All Length values are wrong

The default is 0

Sleep

-s or --sleep This sets the timer between to packages in Milliseconds. It accepts values between 100 and 2000 both included. Default value is 100

Counter

Per default the Fuzzer is running until the parser crashes or it is interrupted. This can be changed with -c or --counter. It declares how many packets should be send and accepts any positive number in integer range. If the parser crashes, the program is still stopped.

Protocol

After all optional arguments there can be a protocol field. NDN or CCNx. For command line help type:

python3 Packet_Fuzzing.py 'parser' 'path' 'protocoll' -h

This specifies the packet type the fuzzer is using. Default is NDN.

Protocol options

The protocols themselves have the option to specify which packet types should be send with -p or --protocoll. These are for NDN:

  • l: LinkObject
  • i: Interest
  • d: Data

CCNx:

  • i: Interest
  • c: ContentObject

All packet types can be combined. Examples: NDN packages without LinkObject.

python3.6 Packet_Fuzzing.py ccn ../ccn-lite NDN -p i d

offline

There is the possibility to give offline as parser. This means no connection will be established and the fuzzer runs on its own. This is for debugging purpose

About

Packet Fuzzer for CCN Packet Formats.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages