GithubHelp home page GithubHelp logo

happy-ferret / usblockout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from subgraph/usblockout

0.0 2.0 0.0 85 KB

USBLockout monitors your user session and triggers Grsecurity Deny New USB feature.

License: Other

Go 100.00%

usblockout's Introduction

Session USB Lockout

You're in a place that is relatively safe, say your local hackerspace. You need to leave your computer out of sight for a small amount of time, the space is safe enough that you are not worried about it being stolen, but not enough that someone couldn't attempt a quick drive-by USB attack.

This program provides a way to toggle Grsecurity Deny New USB feature with the state of a user session. That is, it will automatically enable the feature when the screen is locked or the session exits, and vice versa.

It consists of a privileged daemon that exposes itself on the dbus system bus; and a client daemon which runs in the user session via xdg-autostart, and relays the session screen-lock events on the system bus.

The client utility also allows the user to enable or disable the feature manually by calling:

usblockout --[enable|disable]

Caveats

Beware! If you use some sort of USB device (ex: a YubiKey) for PAM logins, login will be entirely broken! One workaround for this is to plug in the USB device at boot (before the daemon launches), or before switching to a different tty. Devices like smartcards, which have readers that are always plugged in, should work as expected.

This, of course only works if Grsecurity sysctl is enabled and not locked.

Building & Packaging

Provided in this repository is a debian branch which is used to build a deb package from git tags:

git checkout -b debian https://github.com/subgraph/usblockout.git
cd usblockout
gbp buildpackage -us -uc
dpkg -i /tmp/subgraph-usblockout_#VERSION#.deb

You will need to either log out and log back in, or launch usblockout (for example via alt-F2) after the install.

To run without without the xdg autostart and systemd service (when you are debugging or for development) you will want to run the daemon in one terminal with sudo ./usblockoutd --debug and the client in another with ./usblockout --debug.

usblockout's People

Contributors

johnlunney avatar xsmurf avatar

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.