GithubHelp home page GithubHelp logo

pekedevil / gotham-iot-testbed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xsaga/gotham-iot-testbed

0.0 0.0 0.0 43.47 MB

Shell 1.84% Python 29.84% C 64.12% Makefile 1.77% Dockerfile 2.42% Roff 0.01%

gotham-iot-testbed's Introduction

Gotham Testbed: A Reproducible IoT Testbed for Security Experiments and Dataset Generation

This repository contains the source code and implementation of the emulated testbed described in the following paper (open access):

X. Sáez-de-Cámara, J. L. Flores, C. Arellano, A. Urbieta and U. Zurutuza, "Gotham Testbed: A Reproducible IoT Testbed for Security Experiments and Dataset Generation," in IEEE Transactions on Dependable and Secure Computing, doi: 10.1109/TDSC.2023.3247166.

If you use or build upon this testbed, please consider citing the article.

Tested on Ubuntu 20.04.4 LTS and 22.04 LTS


Dependencies

Prerequisites

  • Your user should belong to the following groups: ubridge, libvirt, kvm, wireshark, docker. sudo usermod -aG ubridge,libvirt,kvm,wireshark,docker $USER. Restart the machine.

  • For large topologies with many nodes (containers, VMs) you might need to increase the maximum number of open file descriptors (in the machine running GNS3) to start all the nodes simultaneously. Check the current limit with ulimit -n

  • KVM virtualization support. When running GNS3 in a virtual machine, enable nested virtualization.


Python virtual environment

Create a Python virtual environment to install the Python dependencies of the project (You might need to install the python3-venv package). To interact with the project, activate the virtual environment.

Inside the project's repository directory, run:

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt

Template creation

Build Docker images

All the Dockerfiles and the dependencies that describe the emulated nodes (IoT devices, servers, attackers) are inside the ./Dockerfiles directory. The build process of some Docker images depend on other images; instead of building them manually, the project includes a Makefile to automate the process.

Run make to automatically build all the Docker images in the correct order:

$ make

This can take a long time (approx 30 min depending on the host and network speed); you can parallelize the build process running make with the -j flag.

If you modify any Dockerfile, configuration file, program or any other file inside the ./Dockerfiles directory, run make again. It will rebuild the updated images and other images that depend on them.

Docker template creation

Open GNS3, the GNS3 server must be running. Inside the ./src directory run:

(venv) $ python3 create_templates.py

You can verify the created templates in GNS3 select: Edit > Preferences > Docker containers

gns3 templates

Create router template

Inside the project's repository directory, run:

make vyosiso

The artifacts (a .iso file and a .qcow2 file) will be downloaded into the ~/Downloads directory. Follow the instructions to import appliances in GNS3 https://docs.gns3.com/docs/using-gns3/beginners/import-gns3-appliance/. The router appliance file is located at ./router/iotsim-vyos.gns3a.

gns3 install vyos appliance

Topology builder

GNS3 must be running. Inside the ./src directory run:

(venv) $ python3 create_topology_gotham.py

gns3 topology

Scenario generator

GNS3 must be running. Inside the src/ directory run:

(venv) $ python3 run_scenario_gotham.py

gotham-iot-testbed's People

Contributors

xsaga avatar pekedevil 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.