Skip to content

Add Qubes support and include information on installing dependencies in README #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 49 commits into from

Conversation

skyzzuu
Copy link
Contributor

@skyzzuu skyzzuu commented Jul 29, 2023

Several changes to allow kloak to work in Qubes in sys-usb if a usb keyboard/mouse is in use or dom0 if a PS/2 keyboard/mouse is in use:

  • Detect if Kloak is running in Qubes, if not, kloak will follow the normal execution flow
  • Stop the qubes-input-sender services associated with devices so kloak can grab them
  • In the event the rescue key sequence is sent, kloak will restart the associated qubes-input-sender services

This will affect typing in all qubes, it's not currently possible to limit it to individual qubes.

Related issue: #47

Unrelated to Qubes support:

  • Added information into README.md on how to install the dependencies necessary to build the version in the dev branch

@adrelanos adrelanos mentioned this pull request Jul 30, 2023
@adrelanos
Copy link
Contributor

#49 (comment)

…lize those would automatically be pulled into the pull request
@skyzzuu
Copy link
Contributor Author

skyzzuu commented Jul 30, 2023

I didn't realize the other changes I was working on would also be pulled into this pull request. The additions in the main_loop regarding EV_REL events is for providing mouse cursor movement obfuscation, close to what's described in (https://arxiv.org/pdf/2101.09087.pdf), but not exactly the same. I changed the default to 0 noise so it's off by default, it works as expected but takes some adjustment, so I'm figuring out what the best noise value would be.

It can be adjusted with the -n option, which controls the max number of pixels the cursor will move perpendicular to the original move.

skyzzuu added 13 commits July 30, 2023 16:53
… to cursor moves reduced so cursor movement when obfuscation is on is not quite as frustrating
…etached, cleans up the associated files. when a device is attached, if it's a mouse or keyboard, it initializes the device
… watch is added on /dev/input for file creation and file deletion events. On file deletion events, kloak cleans up devices that were removed. On file creation (new device attached) kloak initializes the device. Fixes vmonaco#17. Syscalls needed for initializing new devices added to SystemCallFilter. Header file with some of the functions was added as well as without it I had to keep reordering functions. Also prints the device name when it's available so it's clearer what device is being operated on.
@skyzzuu
Copy link
Contributor Author

skyzzuu commented Aug 8, 2023

Added support for new devices attached after kloak starts. An inotify watch is added on /dev/input for file creation and file deletion events. On file deletion events, kloak cleans up devices that were removed. On file creation (new device attached) kloak initializes the device. Fixes #17. Syscalls needed for initializing new devices added to SystemCallFilter. Header file with some of the functions was added as well as without it I had to keep reordering functions. Also prints the device name when it's available so it's clearer what device is being operated on.

skyzzuu added 13 commits August 8, 2023 09:01
…d output for warnings and errors, add optional reading of config options from /etc/kloak/kloak.conf and permissions necessary to read from the file
…potential problems pointed out by -Wstringop-truncation since it could potentially be truncated due to the possibility of copying in 256 characters into a 256 character array
… key events. delay values that are tolerable with key events can be frustrating when also applied to mouse movement events. this allows using a high delay with key events and a lower delay with mouse movements
@skyzzuu
Copy link
Contributor Author

skyzzuu commented Aug 13, 2023

Several more features added:

Added reading config options from /etc/kloak/kloak.conf
Added the ability to specify different maximum delays for mouse movements and key events
Added several security-related compile options to the makefile
Added color to output to make it more readable

Added the ability to temporarily disable and re-enable kloak, similar to the rescue sequence, but instead of exiting kloak stops adding delay to events until the disable/re-enable key sequence is seen again. It will then go back to adding delay and/or noise to events

@skyzzuu
Copy link
Contributor Author

skyzzuu commented Sep 8, 2023

I have a pull request open with qubes to address the input device creation on their side for qubes support (QubesOS/qubes-gui-agent-linux#194). That's going to be the better route as that will allow kloak to be used in individual qubes instead of having to use it in all of them or none of them.

I'm going to close this PR, remove the sections that add qubes support, then submit the other features I added as several smaller PRs so they're easier to review.

@skyzzuu
Copy link
Contributor Author

skyzzuu commented Sep 8, 2023

I have a pull request open with qubes to address the input device creation on their side for qubes support (QubesOS/qubes-gui-agent-linux#194). That's going to be the better route as that will allow kloak to be used in individual qubes instead of having to use it in all of them or none of them.

I'm going to close this PR, remove the sections that add qubes support, then submit the other features I added as several smaller PRs so they're easier to review.

@skyzzuu skyzzuu closed this Sep 8, 2023
@vmonaco
Copy link
Owner

vmonaco commented Sep 18, 2023

didn't get a chance yet to dig into this yet, but very interested in the motion obfuscation. and would love smaller PRs, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants