Git Product home page Git Product logo

rpl-attacks's Introduction

Build Status Read The Docs Known Vulnerabilities Requirements Status DOI Black Hat Arsenal Europe 2018 Vagrant License Beerpay Donate

Table of Contents

Note: In case of problem, please refer to Issues management first !

RPL Attacks Framework

This project is aimed to provide a simple and convenient way to generate simulations and deploy malicious motes for a Wireless Sensor Network (WSN) that uses Routing Protocol for Low-power and lossy devices (RPL) as its network layer.

With this framework, it is possible to easily define campaign of simulations either redefining RPL configuration constants, modifying single lines from the ContikiRPL library or using an own external RPL library. Moreover, experiments in a campaign can be generated either based on a same or a randomized topology for each simulation.

Additional Documentation

A few test cases made with the framework:

Test case 1: flooding attack

The malicious mote has 3, 7, 10 in its range Power tracking without the malicious mote Power tracking with the malicious mote
The malicious mote has 3, 7, 10 in its range Power tracking without the malicious mote Power tracking with the malicious mote

Test case 2: versioning attack

Legitimate DODAG Versioning attack in action (global repair)
Legitimate DODAG Versioning attack
Power tracking without the malicious mote Power tracking with the malicious mote
Power tracking without the malicious mote Power tracking with the malicious mote

Test case 3a: blackhole attack

Legitimate DODAG Blackhole attack in action
Legitimate DODAG Blackhole attack

Test case 3b: blackhole attack

Legitimate DODAG Blackhole attack in action
Legitimate DODAG Blackhole attack

Quick Installation

  1. Clone this repository
$ git clone https://github.com/dhondta/rpl-attacks.git

Behind a proxy ?

Setting: git config --global http.proxy http://[user]:[pwd]@[host]:[port]

Unsetting: git config --global --unset http.proxy

Getting: git config --global --get http.proxy

  1. Create the VM
$ vagrant login
[...]
$ vagrant up

Important notes

The downloads of the Vagrant box may take a while, please be patient...

Also, after the creation of the VM, Vagrant may complain that the SSH connection was unexpectedly closed by the remote end. In practice, this does not affect the creation and operation of the box.

Behind a proxy ?

Install the plugin: vagrant plugin install vagrant-proxyconf

Configure Vagrant: Uncomment the lines starting with config.proxy in the Vagrantfile

Troubleshooting:

  • Ensure the latest version of Vagrant is installed
  • If using virtualbox provider, ensure Oracle Extension Pack is installed (see Oracle website)

Demonstration

This will make 3 complete examples of attacks : hello flood, version number and blackhole.

Open the console like before and type:

user@instant-contiki:rpl-attacks>> demo

Or simply launch the demo command with Fabric:

./rpl-attacks$ fab demo

Quick Start (using the integrated console)

  1. Open the console (you should see something like in the following screenshot)
./rpl-attacks$ fab console

or

./rpl-attacks$ python main.py

or

./rpl-attacks$ python3 main.py

RPL Attacks Framework console

  1. Create a campaign of simulations
user@instant-contiki:rpl-attacks>> prepare sample-attacks
  1. Go to your experiments folder (default: ~/Experiments) and edit your new sample-attacks.json to suit your needs

See How to create a campaign of simulations ? for more information.

  1. Make the simulations
user@instant-contiki:rpl-attacks>> make_all sample-attacks
  1. Run the simulations (multi-processed)
user@instant-contiki:rpl-attacks>> run_all sample-attacks

Hint : You can type status during make_all and run_all processing for getting the status of pending tasks.

  1. Once tasks are in status SUCCESS in the status tables (visible by typing status), just go to the experiment's results folders to get pictures and logs of the simulations. The related paths are the followings :

[EXPERIMENTS_FOLDER]/[experiment_name]/without-malicious/results/ [EXPERIMENTS_FOLDER]/[experiment_name]/with-malicious/results/

Quick Start (using fabric only)

  1. Create a simulation campaign file from the template
./rpl-attacks$ fab prepare:test-campaign
  1. Edit the simulation campaign file to suit your needs

  2. Create the simulations

./rpl-attacks$ fab make_all:test-campaign
  1. Run the simulations (not multi-processed)
./rpl-attacks$ fab run_all:test-campaign
  1. Once done, just go to the experiment's results folders to get pictures and logs of the simulations. The related paths are the followings :

[EXPERIMENTS_FOLDER]/[experiment_name]/without-malicious/results/ [EXPERIMENTS_FOLDER]/[experiment_name]/with-malicious/results/

Issues management

In case of bug, there should be a crash report generated in the folder of the experiment that the framework was processing. By convention, this is named crash-report-[...].txt. Please copy its content (without the title) in a new Issue.

For contributions or suggestions, please open an Issue and clearly explain, using an example or a use case if appropriate.

If you want to build new RPL attacks, please refer to the How to make new building blocks ? section. In this case, please submit your new attack through a Pull Request.

rpl-attacks's People

Contributors

bahmadh avatar dhondta avatar matm-g avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.