Code Monkey home page Code Monkey logo

chipwhisperer_vagrant's Introduction

chipwhisperer_vagrant

Example vagrant file(s) for setting up a chipwhisperer inside a vm.

Requirements

  1. Internet connectivity
  2. Ubuntu OS 24.04 for host system
  3. Host OS with KVM enabled
  4. Host OS with Vagrant installed

Setup

git clone https://github.com/muttiopenbts/chipwhisperer_vagrant.git

Bring up Ubuntu guest os

cd chipwhisperer_vagrant/ubuntu-2204
vagrant up

Enable usb hotplug for chipwhisperer inside vm guest

git clone https://github.com/muttiopenbts/usb-libvirt-hotplug

Copy udev script

sudo mkdir /opt/usb-libvirt-hotplug
sudo cp usb-libvirt-hotplug/usb-libvirt-hotplug.sh /opt/usb-libvirt-hotplug

Add udev rule for chipwhisperer

sudo cp chipwhisperer_vagrant/50-newae.rules /etc/udev/rules.d/

From Host OS edit udev rule to reflect vm that chipwhisperer should be connected to. You will first need to determine the vm name that should be set in the udev rule. Obtaining the vm name

virsh list --all
 Id   Name                  State
-------------------------------------
 1    ubuntu-2204_default   running

Now replace ENV{CW_VM_NAME}="MY_VM" with ENV{CW_VM_NAME}="ubuntu-2204_default"

vi /etc/udev/rules.d/50-newae.rules

Then reload Host OS udev system.

sudo sh -c 'udevadm control --reload-rules && udevadm trigger'

Start Jupyter notebooks from VM guest

Login to vm from host os

cd chipwhisperer_vagrant/ubuntu-2204
vagrant ssh

Start jupyter service

cd /vagrant_data/chipwhisperer
jupyter-lab &

An alternative to have jupyter start on all network interfaces

jupyter-lab --ip 0.0.0.0

Browse to Jupyter notebook

Open a browser on the host os and you should be able to connect to the notebook on http://127.0.0.1:8888. You will need the jupyter token that will have been flashed on the terminal screen when you ran jupyter-lab command.

Trouble

Notebook doesn't open in browser. The vagrant file has an entry to port redirect from host os 127.0.0.1:8888 to the vm 127.0.0.1:8888.
When the jupyter-lab service starts up, make sure it is listening on port 8888 and nothing else.
You can fix this by killing any jupter-lab process running on the vm and then restarting jupyter-lab as described above.

TODO

Complete this readme with better detailed steps.

chipwhisperer_vagrant's People

Contributors

muttiopenbts 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.