Git Product home page Git Product logo

usblok's Introduction

USBlok

badUSB & RubberDucky & PoisonTap ultimate mitigation for Linux

This is a simple, minimalistic and ultimate way to deal with USB threats in Linux environment.

You might have heard about some pretty complex solutions like Beamgun or even grsecurity, but you can hardly do as simple and efficient as following.

How To

First of all, let's follow the fundamentals of security - "Everything, which is not explicitly allowed is forbidden":

as root - # crontab -e

then add @reboot echo 0 > /sys/bus/usb/drivers_autoprobe

This will block every USB device from interacting with your system by blocking drivers.

Now, copy usbAccess.sh to a directory by adding execution rights with $ chmod u+x usbAccess.sh

Lastly, add an alias to your "/.bashrc" or "/.bash_aliases":

alias usbaccess='sudo $PATH_TO/usbAccess.sh'

And make sure that you can execute commands through "sudo" with (as root)# sudoers

So every time you will enter $ usbaccess command, you will have 10 seconds to connect a trusted device.

Of-course, a more intelligent solution will be to do a compartmental analysis, but I'm out of budget for now.

Keep It Simple and Straightforward

usblok's People

Watchers

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