{"id":43514240,"url":"https://github.com/subgraph/usblockout","last_synced_at":"2026-02-03T13:30:40.721Z","repository":{"id":57527032,"uuid":"68055230","full_name":"subgraph/usblockout","owner":"subgraph","description":"USBLockout monitors your user session and triggers Grsecurity Deny New USB feature.","archived":false,"fork":false,"pushed_at":"2017-09-20T19:32:10.000Z","size":85,"stargazers_count":53,"open_issues_count":4,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-06-20T12:05:45.009Z","etag":null,"topics":["dbus","grsecurity","screensaver","usb"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subgraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-12T23:05:52.000Z","updated_at":"2024-01-04T16:07:32.000Z","dependencies_parsed_at":"2022-09-07T02:10:12.702Z","dependency_job_id":null,"html_url":"https://github.com/subgraph/usblockout","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/subgraph/usblockout","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subgraph%2Fusblockout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subgraph%2Fusblockout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subgraph%2Fusblockout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subgraph%2Fusblockout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subgraph","download_url":"https://codeload.github.com/subgraph/usblockout/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subgraph%2Fusblockout/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29046554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T10:09:22.136Z","status":"ssl_error","status_checked_at":"2026-02-03T10:09:16.814Z","response_time":96,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbus","grsecurity","screensaver","usb"],"created_at":"2026-02-03T13:30:39.604Z","updated_at":"2026-02-03T13:30:40.705Z","avatar_url":"https://github.com/subgraph.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Session USB Lockout\n\nYou're in a place that is relatively safe, say your local hackerspace.\nYou need to leave your computer out of sight for a small amount of time,\nthe space is safe enough that you are not worried about it being stolen,\nbut not enough that someone couldn't attempt a quick drive-by USB attack.\n\nThis program provides a way to toggle [Grsecurity](https://grsecurity.net/) [Deny New USB feature](https://en.wikibooks.org/wiki/Grsecurity/Appendix/Grsecurity_and_PaX_Configuration_Options#Deny_new_USB_connections_after_toggle) with the state of a user session.\nThat is, it will automatically enable the feature when the screen is locked or the session exits, and vice versa.\n\nIt consists of a privileged daemon that exposes itself on the dbus system bus;\nand a client daemon which runs in the user session via xdg-autostart, and relays the session screen-lock events on the system bus.\n\nThe client utility also allows the user to enable or disable the feature manually by calling:\n\n\tusblockout --[enable|disable]\n\n## Caveats\n\n**Beware! If you use some sort of USB device (ex: a YubiKey) for PAM logins, login will be entirely broken!**\nOne workaround for this is to plug in the USB device at boot (before the daemon launches), or before switching to a different tty.\nDevices like smartcards, which have readers that are always plugged in, should work as expected.\n\nThis, of course only works if Grsecurity sysctl is enabled and not locked.\n\n## Building \u0026 Packaging\n\nProvided in this repository is a debian branch which is used to build a deb package from git tags:\n\n\tgit checkout -b debian https://github.com/subgraph/usblockout.git\n\tcd usblockout\n\tgbp buildpackage -us -uc\n\tdpkg -i /tmp/subgraph-usblockout_#VERSION#.deb\n\nYou will need to either log out and log back in, or launch `usblockout` (for example via alt-F2) after the install.\n\nTo 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`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubgraph%2Fusblockout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubgraph%2Fusblockout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubgraph%2Fusblockout/lists"}