Keystroke-level online anonymization kernel: obfuscates typing behavior at the device level.

Related tags

Cryptography kloak
Overview

anti keystroke deanonymization tool

kloak: Keystroke-level online anonymization kernel

A privacy tool that makes keystroke biometrics less effective. This is accomplished by obfuscating the time intervals between key press and release events, which are typically used for identification.

Usage

There are two ways to run kloak:

  1. As an application
  2. As a Linux service

As an application

First, compile kloak and the event capture tool eventcap:

$ make all

Next, start kloak as root. This typically must run as root because kloak reads from and writes to device files:

$ sudo ./kloak

If you start kloak and lose control of your keyboard, pressing RShift + LShift + Esc will exit. You can specify the rescue key combination with the -k option.

Verify that kloak is running by starting in verbose mode:

$ sudo ./kloak -v
...
Bufferred event at time: 1553710016364.  Type:   1,  Code:  37,  Value:   1,  Scheduled delay   84 ms
Released event at time : 1553710016364.  Type:   1,  Code:  37,  Value:   1,  Missed target     -7 ms
Bufferred event at time: 1553710016597.  Type:   1,  Code:  37,  Value:   0,  Scheduled delay   39 ms
Released event at time : 1553710016597.  Type:   1,  Code:  37,  Value:   0,  Missed target     -6 ms
Bufferred event at time: 1553710017039.  Type:   1,  Code:  32,  Value:   1,  Scheduled delay   79 ms
Released event at time : 1553710017039.  Type:   1,  Code:  32,  Value:   1,  Missed target     -3 ms
Bufferred event at time: 1553710017291.  Type:   1,  Code:  32,  Value:   0,  Scheduled delay   80 ms
Bufferred event at time: 1553710017354.  Type:   1,  Code:  39,  Value:   1,  Scheduled delay   94 ms
Lower bound raised to:   31 ms
Released event at time : 1553710017291.  Type:   1,  Code:  32,  Value:   0,  Missed target    -33 ms
Released event at time : 1553710017354.  Type:   1,  Code:  39,  Value:   1,  Missed target      0 ms
...

Notice that the lower bound on the random delay has to be raised when keys are pressed in quick succession. This ensures that the key events are written to uinput in the same order as they were generated.

As a service

How to install kloak using apt-get

1. Download Whonix's Signing Key.

wget https://www.whonix.org/patrick.asc

Users can check Whonix Signing Key for better security.

2. Add Whonix's signing key.

sudo apt-key --keyring /etc/apt/trusted.gpg.d/whonix.gpg add ~/patrick.asc

3. Add Whonix's APT repository.

echo "deb https://deb.whonix.org bullseye main contrib non-free" | sudo tee /etc/apt/sources.list.d/whonix.list

4. Update your package lists.

sudo apt-get update

5. Install kloak.

sudo apt-get install kloak

How to build deb package

Replace apparmor-profile-torbrowser with the actual name of this package with kloak and see instructions.

Whonix contact and support

Donate

kloak requires donations to stay alive!

Troubleshooting

Can't open input/output device

kloak will attempt to find your keyboard device to read events from and the location of uinput to write events to. If kloak cannot find either the input device or output device, these must be specified with the -r and -w options, respectively.

To find the keyboard device for reading events: determine which device file corresponds to the physical keyboard. Use eventcap (or some other event capture tool) and look for the device that generates events when keys are pressed. This will typically be one of /dev/input/event[0-7]. In this example, it's /dev/input/event4:

$ sudo ./eventcap /dev/input/event4
Reading From : /dev/input/event4 (AT Translated Set 2 keyboard)
Type:   4    Code:   4    Value:  15
Type:   1    Code:  15    Value:   0
Type:   0    Code:   0    Value:   0
Type:   4    Code:   4    Value:  56
Type:   1    Code:  56    Value:   0
Type:   0    Code:   0    Value:   0

uinput is the kernel module that allows user-land applications to create input devices. This is typically located at either /dev/uinput or /dev/input/uinput.

Start kloak by specifying the input and output device files:

$ sudo ./kloak -r /dev/input/event4 -w /dev/uinput

My keyboard seems very slow

kloak works by introducing a random delay to each key press and release event. This requires temporarily buffering the event before it reaches the application (e.g., a text editor).

The maximum delay is specified with the -d option. This is the maximum delay (in milliseconds) that can occur between the physical key events and writing key events to the user-level input device. The default is 100 ms, which was shown to achieve about a 20-30% reduction in identification accuracy and doesn't create too much lag between the user and the application (see the paper below). As the maximum delay increases, the ability to obfuscate typing behavior also increases and the responsive of the application decreases. This reflects a tradeoff between usability and privacy.

If you're a fast typist and it seems like there is a long lag between pressing a key and seeing the character on screen, try lowering the maximum delay. Alternately, if you're a slower typist, you might be able to increase the maximum delay without noticing much difference. Automatically determining the best lag for each typing speed is an item for future work.

Options

The full usage and options are:

$ ./kloak -h

Usage: kloak [options]
Options:
  -r filename: device file to read events from
  -w filename: device file to write events to (should be uinput)
  -d delay: maximum delay (milliseconds) of released events. Default 100.
  -s startup_timeout: time to wait (milliseconds) before startup. Default 100.
  -k csv_string: csv list of rescue key names to exit kloak in case the
     keyboard becomes unresponsive. Default is 'KEY_LEFTSHIFT,KEY_RIGHTSHIFT,KEY_ESC'.
  -v: verbose mode

Try it out

You can test that kloak actually works by trying an online keystroke biometrics demo. For example, try these three different scenarios:

  • Train normal, test normal
  • Train normal, test kloak
  • Train kloak, test kloak

Train normal means to train with normal typing behavior, i.e., without kloak running. At the enrollment page on the KeyTrac demo, enter a username and password without kloak running, and then on the authenticate page, try authenticating. For example, the train normal/test normal result is:



Start kloak and then try authenticating again. These results were obtained using a maximum delay of 200 ms (-d 200). The train normal/test kloak result is:



Now go back to the enrollment page. Enroll With kloak running and then try authenticating with kloak still running. Again, this is with a 200 ms maximum delay. The train kloak/test kloak result is:



Your results may differ, especially in the train kloak/test kloak scenario. The train kloak/test kloak scenario is more difficult to anonymize than the train normal/test kloak scenario. This is because kloak obfuscates your typing behavior, but does not make your typing behavior similar to other users. This dilemma relates to the problem of user cooperation. It's easy to make your typing behavior look like something that it's not, but what should that be? If it's too unique, then the change does more harm then good, allowing you to be easily identified. Without the cooperation of other users, it's difficult to choose a behavior that's hard to distinguish.

Background

kloak has two goals in mind:

  • Make it difficult for an adversary to identify a user
  • Make it difficult for an adversary to replicate a user's typing behavior

The first goal can theoretically be achieved only if all users cooperate with each other to have the same typing behavior, for example by pressing keys with exactly the same frequency. Since different users type at different speeds, this is not practical. Instead, pseudo-anonymity is achieved by obfuscating a user's typing rhythm, making it difficult for an adversary to re-identify a single user.

The second goal is to make it difficult for an adversary to forge typing behavior and impersonate a user, perhaps bypassing a two-factor authentication that uses keystroke biometrics. This is achieved by making the time between keystrokes unpredictable.

For more info, see the paper Obfuscating Keystroke Time Intervals to Avoid Identification and Impersonation.

How it works

The time between key press and release events are typically used to identify users by their typing behavior. kloak obfuscates these time intervals by introducing a random delay between the physical key events and the arrival of key events at the application, for example a web browser.

kloak grabs the input device and writes delayed key events to the output device. Grabbing the device disables any other application from reading the events. Events are scheduled to be released in a separate thread, where a random delay is introduced before they are written to a user-level input device via uinput. This was inspired from kbd-mangler.

When does it fail

kloak does not protect against all forms of keystroke biometrics that can be used for identification. Specifically,

  • If the delay is too small, it is not effective. Adjust the delay to as high a value that's comfortable.
  • Repeated key presses are not obfuscated. If your system is set to repeat held-down keys at a unique rate, this could leak your identity.
  • Writing style is still apparent, in which stylometry techniques could be used to determine authorship.
  • Higher level cognitive behavior, such as editing and application usage, are still apparent. These lower-frequency actions are less understood at this point, but could potentially be used to reveal identity.
Comments
  • kloak freezes any keyboard input

    kloak freezes any keyboard input

    Happened to me in a Whonix 14 KDE workstation. (No longer available for download unfortunately.) Couldn't reproduce anywhere else. Apparently happens after boot when sdwdate reloads Whonix iptables firewalls rules. I don't know how to add any debug options to kloak.

    Please kindly let me know how we can record kloak debug output so we can see where it chokes.

    bug 
    opened by adrelanos 6
  • autodetect keyboard device

    autodetect keyboard device

    Is there some way to autodetect the user's keyboard /dev/input/... device?

    That would be required so this can become as simple for users as possible. I.e. a package kloak (#3) and autostart kloak. Once I know a way to autodetect the keyboard, I will configure kloak's systemd unit file to do that.

    opened by adrelanos 5
  • Repeating keys, leads to memory error

    Repeating keys, leads to memory error

    As reported by @adrelanos: https://github.com/vmonaco/keystroke-obfuscation/issues/1#issuecomment-270020900

    Automatic key repetitions lead to a memory error:

    pthread_create() failed: cannot allocate memory

    Typically happens with longer maximum delays.

    bug 
    opened by vmonaco 5
  • keycodes.c compilation error - src/keycodes.c:169:32: error: ‘KEY_ROTATE_DISPLAY’ undeclared here (not in a function)

    keycodes.c compilation error - src/keycodes.c:169:32: error: ‘KEY_ROTATE_DISPLAY’ undeclared here (not in a function)

    gcc src/main.c src/keycodes.c -o kloak -lm -lpthread
    src/keycodes.c:169:32: error: ‘KEY_ROTATE_DISPLAY’ undeclared here (not in a function)
             {"KEY_ROTATE_DISPLAY", KEY_ROTATE_DISPLAY},
                                    ^
    src/keycodes.c: In function ‘lookup_keycode’:
    src/keycodes.c:278:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
         for (item_t *p = table; p->name != NULL; ++p) {
         ^
    src/keycodes.c:278:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
    src/keycodes.c: In function ‘lookup_keyname’:
    src/keycodes.c:287:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
         for (item_t *p = table; p->name != NULL; ++p) {
         ^
    Makefile:4: recipe for target 'kloak' failed
    make: *** [kloak] Error 1
    
    opened by adrelanos 4
  • Debian packaging

    Debian packaging

    In future, would like to see kloak ending up in:

      1. Whonix's deb repository, (so it can be installed in Whonix, likely installed by default, [...])
      1. in debian.org's repository, (so as much people as possible start using this)
      1. Qubes's rpm repository. (so it can be installed in Qubes dom0)
      1. elsewhere as other distributions and their packagers are welcome to step up

    To aid this, I created the Debian packaging. One additional dependency, genmkfile.

    Implements #3.


    Just run

    make deb-pkg
    

    and a ../kloak_0.1-2_amd64.deb will be created .

    Then you can install it using:

    sudo dpkg -i ../kloak_0.1-2_amd64.deb
    

    Will then be installed to /usr/sbin/kloak.

    And remove:

    sudo apt-get purge kloak
    

    Then everything will be removed.

    Lintian warning free, so Debian policy conform.


    Other makefile features:

    make help
    
    make help
       Show this help.
    make dist
       Create package-version.tar.gz from source files in $DISTDIR (default "..").
    make undist
       Delete package-version.tar.gz from source files in $DISTDIR (default "..").
    make debdist
       Create debian.tar.gz from source files in $DISTDIR (default "..").
    make undebdist
       Delete debian.tar.gz from source files in $DISTDIR (default "..").
    make manpages
       Create man page from man source folder, which will be stored in debian/tmp-man folder.
    make uch
       Store upstream changelog from git log in debian/changelog.upstream.
    make install
       Copying the files from the source tree to system-wide directories.
    make installsim
       Simulate copying the files from the source tree to system-wide directories.
    make deb-pkg
       Create a deb, which will be stored in parent folder.
    make deb-pkg-install
       Create a deb, which will be stored in parent folder, and install it.
    make deb-install
       Install deb from parent folder.
    make deb-icup
       Combination of make deb-pkg, make deb-pkg-install and make deb-pkg-cleanup.
    make deb-remove
       apt-get remove make_source_package_name
    make deb-purge
       apt-get purge make_source_package_name
    make deb-clean
       Delete temporary debhelper files.
    make deb-cleanup
       Same as make deb-clean and deletes debuild artifacts from parent folder.
    make dput-ubuntu-ppa
       Upload to Ubuntu ppa. Requires functional .dput.cf.
    make clean
       Currently same as make deb-clean.
    make distclean
       Currently same as make clean.
    make checkout
       Fetch from git.
    make installcheck
       Check if source files match installed files.
    make uninstallcheck
       Check if make uninstall removed all files.
    make uninstall
       Delete all installed files.
    make uninstallsim
       Simulate what make uninstall would do.
    make deb-chl-bumpup
       Bump upstream version number in debian/changelog.
    make git-tag-sign
       git tag (-s) sign latest pkg_version_with_revision from debian/changelog. Only a repository sanity check. Not for security purposes!
    make git-tag-verify
       git tag (-v) verify latest pkg_version_with_revision from debian/changelog. Only a repository sanity check. Not for security purposes!
    make git-tag-check
       Check if current git head is a signed git tag. Only a repository sanity check. Not for security purposes!
    make git-commit-verify
       Check if current git head is a signed git commit. Only a repository sanity check. Not for security purposes!
    make git-verify
       Combination of tag-check and commit-verify. Only a repository sanity check. Not for security purposes!
    

    Related:

    • ~~Currently does not build due to https://github.com/vmonaco/kloak/issues/2. But once https://github.com/vmonaco/kloak/issues/2 is solved, it will build.~~ (Fixed.)
    • Also https://github.com/vmonaco/kloak/issues/1 is a blocker.
    • Once #4 is sorted out, also autostart using the systemd service will work.
    opened by adrelanos 3
  • Debian buster

    Debian buster

    Might not be the best idea to merge this already? Debian buster is not Debian stable yet but probably in not too far future.

    Changelog does not need to be merged.

    Relevant changed for Debian buster packaging in:

    • debian/control
    • debian/compat
    • debian/copyright
    • debian/rules
    • debian/source/lintian-overrides

    Just minimal changes to silence lintian warnings.

    opened by adrelanos 2
  • SystemCallFilter causing service to fail after OS upgrade

    SystemCallFilter causing service to fail after OS upgrade

    I upgraded Linux Mint from v19 (based on Ubuntu 18.04) to v20 (Ubuntu 20.04) and Kloak stopped working as a service, although it worked when run manually. Removing and reinstalling made no difference.

    ● kloak.service - kloak anti keystroke deanonymization tool
         Loaded: loaded (/lib/systemd/system/kloak.service; enabled; vendor preset: enabled)
         Active: failed (Result: core-dump) since Fri 2020-07-10 02:05:08 BST; 516ms ago
           Docs: https://github.com/vmonaco/kloak
        Process: 13922 ExecStart=/usr/sbin/kloak (code=dumped, signal=SYS)
       Main PID: 13922 (code=dumped, signal=SYS)
    
    Jul 10 02:05:08 DESKTOP systemd[1]: kloak.service: Scheduled restart job, restart counter is at 5.
    Jul 10 02:05:08 DESKTOP systemd[1]: Stopped kloak anti keystroke deanonymization tool.
    Jul 10 02:05:08 DESKTOP systemd[1]: kloak.service: Start request repeated too quickly.
    Jul 10 02:05:08 DESKTOP systemd[1]: kloak.service: Failed with result 'core-dump'.
    Jul 10 02:05:08 DESKTOP systemd[1]: Failed to start kloak anti keystroke deanonymization tool.
    

    After narrowing it down to SystemCallFilter in kloak.service and running strace, it seems that adding pread64 to the list fixes the problem:

    SystemCallFilter=ioctl nanosleep select write read openat close brk fstat lseek mmap mprotect munmap rt_sigaction rt_sigprocmask access execve getuid arch_prctl set_tid_address set_robust_list prlimit64 pread64
    
    opened by haroonrafi 1
  • Apparmor profile signals to kill kloak by systemd

    Apparmor profile signals to kill kloak by systemd

    Qutoe @madaidan https://forums.whonix.org/t/current-state-of-kloak/5605/10

    In the logs, I'm now getting errors about kloak's AppArmor. The profile needs these lines

    signal receive set=cont peer=unconfined,
    signal receive set=exists peer=unconfined,
    signal receive set=kill peer=unconfined,
    signal receive set=term peer=unconfined,
    

    Although, it's weird. I think this is because systemd sends those signals to kloak to kill it but then why wouldn't we need these for other AppArmor profiles?

    opened by adrelanos 1
  • Apparmor Debian packaging integration

    Apparmor Debian packaging integration

    Deleted etc/apparmor.d/local/usr.sbin.kloak since debhelper will create that file. See the autogenerated (by Debian packaging tools) postinst in created package.

    Not sure you want README_generic.md too. (Autogenerated for all packages by Whonix.) Could be removed / re-creation suppressed.)

    opened by adrelanos 1
  • 404 not found

    404 not found

    Writing style is still apparent, in which stylometry techniques could be used to determine authorship. ⬆️ this link was in this text you put in readme but it is 404

    opened by Rock1roll 0
  • Issues getting this to work

    Issues getting this to work

    Hi,

    I have parrot OS as a host, and a kick secure VM in virtualbox. I've installed kloak as a service and tried running the test to learn my typing style, then starting the kloak service which is running fine but the rest afterwards still comes out at 99% yet I still don't have any errors. Are you able to assist me with this and anything I can supply to help diagnose ? Thank you

    opened by joe2707 0
  • kloak.service: Main process exited, code=killed, status=31/SYS

    kloak.service: Main process exited, code=killed, status=31/SYS

    Hi, I installed kloak via whonix repository (bullseye) and when I run systemctl start kloak the service crashes approximately after 1 sec:

    × kloak.service - kloak anti keystroke deanonymization tool
         Loaded: loaded (/lib/systemd/system/kloak.service; enabled; vendor preset: enabled)
         Active: failed (Result: signal) since Wed 2021-12-22 22:01:34 CET; 1s ago
           Docs: https://github.com/vmonaco/kloak
        Process: 6644 ExecStart=/usr/sbin/kloak (code=killed, signal=SYS)
       Main PID: 6644 (code=killed, signal=SYS)
            CPU: 76ms
    
    Dec 22 22:01:34 debian systemd[1]: kloak.service: Scheduled restart job, restart counter is at 5.
    Dec 22 22:01:34 debian systemd[1]: Stopped kloak anti keystroke deanonymization tool.
    Dec 22 22:01:34 debian systemd[1]: kloak.service: Start request repeated too quickly.
    Dec 22 22:01:34 debian systemd[1]: kloak.service: Failed with result 'signal'.
    Dec 22 22:01:34 debian systemd[1]: Failed to start kloak anti keystroke deanonymization tool.
    

    Output of journalctl -u kloak.service:

    Dec 22 21:31:53 debian systemd[1]: Started kloak anti keystroke deanonymization tool.
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Main process exited, code=killed, status=31/SYS
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Failed with result 'signal'.
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Scheduled restart job, restart counter is at 1.
    Dec 22 21:31:53 debian systemd[1]: Stopped kloak anti keystroke deanonymization tool.
    Dec 22 21:31:53 debian systemd[1]: Started kloak anti keystroke deanonymization tool.
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Main process exited, code=killed, status=31/SYS
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Failed with result 'signal'.
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Scheduled restart job, restart counter is at 2.
    Dec 22 21:31:53 debian systemd[1]: Stopped kloak anti keystroke deanonymization tool.
    Dec 22 21:31:53 debian systemd[1]: Started kloak anti keystroke deanonymization tool.
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Main process exited, code=killed, status=31/SYS
    Dec 22 21:31:53 debian systemd[1]: kloak.service: Failed with result 'signal'.
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Scheduled restart job, restart counter is at 3.
    Dec 22 21:31:54 debian systemd[1]: Stopped kloak anti keystroke deanonymization tool.
    Dec 22 21:31:54 debian systemd[1]: Started kloak anti keystroke deanonymization tool.
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Main process exited, code=killed, status=31/SYS
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Failed with result 'signal'.
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Scheduled restart job, restart counter is at 4.
    Dec 22 21:31:54 debian systemd[1]: Stopped kloak anti keystroke deanonymization tool.
    Dec 22 21:31:54 debian systemd[1]: Started kloak anti keystroke deanonymization tool.
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Main process exited, code=killed, status=31/SYS
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Failed with result 'signal'.
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Scheduled restart job, restart counter is at 5.
    Dec 22 21:31:54 debian systemd[1]: Stopped kloak anti keystroke deanonymization tool.
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Start request repeated too quickly.
    Dec 22 21:31:54 debian systemd[1]: kloak.service: Failed with result 'signal'.
    Dec 22 21:31:54 debian systemd[1]: Failed to start kloak anti keystroke deanonymization tool.
    

    During boot the service also restarts 3 or 4 times. However when running manually from the command line the executable works fine.

    OS:

    Linux debian 5.15.0-2-amd64 #1 SMP Debian 5.15.5-1 (2021-11-26) x86_64 GNU/Linux (debian testing)
    
    opened by hardcore-sushi 2
  • Multi-device support

    Multi-device support

    This PR adds support for obfuscating multiple devices simultaneously. This addresses #7 and #37.

    Changes include:

    • Support multiple devices each specified by the '-r' flag. No need to specify '-w' anymore since the output devices are created
    • Add support to autodetect all keyboard and pointing devices
    • Use libevdev for uinput device creation
    • Use libsodium for PRNG
    • Lower the default max delay to 20ms, enough to obfuscate device fingerprints

    I lowered the max delay to 20ms because obfuscating a pointer device by even a small amount introduces a noticeable lag. Users are much more perceptive of pointing lag compared keyboard lag. This includes devices that emit REL_X and REL_Y events (most computer mice) or ABS_X and ABS_Y events (typically includes virtual machines).

    Events should be emitted in the order they were received (FIFO), otherwise there could be unwanted effects if events become permuted, e.g., performing a drag-and-drop requires a particular sequence of motion and click events. It might be possible to maintain a separate max delay for each physical device so long as events are not permuted.

    Another option is to adjust the max delay depending on whether a pointing device is currently being used. A heuristic could look something like "if number of motion events exceeds 5 in the past 1 second, then set the max delay to 20ms, otherwise set the max delay to 100ms".

    opened by vmonaco 10
  • Clarification on intended behavior of random()

    Clarification on intended behavior of random()

    Hello, I noticed that you use the random() function but it does not appear to be explicitly seeded and will use a seed of 1.

    I am asking for clarification on whether this is intended behavior. Additionally, I hope you are aware that random() is not suitable for generating secure random numbers.

    opened by qua3k 2
  • compilation warning string_fortified.h:106:10: warning: '__builtin_strncpy' specified bound

    compilation warning string_fortified.h:106:10: warning: '__builtin_strncpy' specified bound

    gcc src/main.c src/keycodes.c -o kloak -lm -lpthread -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/kloak-0.2.29=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now
    gcc src/eventcap.c -o eventcap -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -ffile-prefix-map=/build/kloak-0.2.29=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-z,relro -Wl,-z,now
    In file included from /usr/include/string.h:495,
                     from src/main.c:2:
    In function 'strncpy',
        inlined from 'main' at src/main.c:554:5:
    /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: warning: '__builtin_strncpy' specified bound depends on the length of the source argument [-Wstringop-overflow=]
      106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    src/main.c: In function 'main':
    src/main.c:554:5: note: length computed here
      554 |     strncpy(_rescue_keys_str, rescue_keys_str, strlen(rescue_keys_str));
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    opened by adrelanos 1
  • Instructions for installation for users who do not have debian-based distros

    Instructions for installation for users who do not have debian-based distros

    This isn't really made clear. It does mention that you can build it yourself using make, here are the commands:

    git clone https://github.com/vmonaco/kloak.git
    
    cd kloak
    
    make all
    

    However, now it can only be run manually like this:

    sudo ./kloak
    

    To run it automatically you will have to add the kloak command as a startup application, and make it run in terminal so that you can enter a command (instead of using run in terminal with sudo you can use pkexec instead however this makes it more difficult to end kloak from running).

    If you are using gnome desktop, here are some detailed instructions. It will be diffirent for different desktop environments.

    1. Open the application called "Main Menu" (by pressing super key and searching for it).
    2. On the left hand side click on "Other".
    3. Then click on "New Item" on the right hand side.
    4. Call the application "Kloak". Give it whatever icon you want.
    5. Open a file manager, and find the "kloak" folder that you cloned from github. If you followed my instructions, it should be in your home directory.
    6. In the kloak folder there will be a file called "kloak" with no file extensions
    7. Right click and copy.
    8. Go back to the "Main Menu" application.
    9. In the "Command" box, type sudo, press space, and then paste what you have copied.
    10. This should now have a functional command that opens kloak. For example, here is how it could look:
    sudo /home/user/kloak/kloak
    

    The user part of the filepath is different based on your username.

    1. Check the Launch in Terminal option. Otherwise you won't be able to enter your password and make this program work. Also, if it isn't launched in terminal, it is more difficult to stop kloak once it has started running.
    2. Press "OK" once you have correctly entered the command, name and checked the "launch in terminal" box.
    3. Make sure you have "Gnome Tweaks" installed. In some distributions it is pre-installed, in others it isn't. You should be able to find it in your software center.
    4. Open Gnome Tweaks
    5. Go to the Section called "Startup Applications"
    6. Click the plus icon
    7. Find the "kloak" application that you have just created, and add it to the list of startup applications.
    8. Kloak will now run when you startup your device. Make sure to enter your password into the terminal window that pops up, otherwise it won't run.
    9. You can also run kloak from the applications menu in gnome.
    opened by ADepic 0
Releases(v0.2)
  • v0.2(Mar 27, 2019)

    New features:

    • Autodetect keyboard and uinput device files.

    Bug fixes

    • Removed pthreads dependency. Everything is now single threaded.
    • Added some quantization to emitted event times through a call to sleep in the main loop (a call to sleep() is necessary to avoid hogging the CPU, and this has the side effect of quantizing the time between output events).
    Source code(tar.gz)
    Source code(zip)
    kloak_0.2-1_amd64.deb(13.93 KB)
Owner
Vinnie Monaco
Assistant Prof. of Computer Science
Vinnie Monaco
SHA256 Compute Shader (Kernel) Written in Rust

SHA256 Compute Shader (Kernel) Written in Rust ... with application to Validating the Bitcoin Blockchain Abstract The project consists of two primary

Daniel 38 Nov 10, 2022
wtf is a distributed, code-coverage guided, customizable, cross-platform snapshot-based fuzzer designed for attacking user and / or kernel-mode targets running on Microsoft Windows.

wtf is a distributed, code-coverage guided, customizable, cross-platform snapshot-based fuzzer designed for attacking user and / or kernel-mode targets running on Microsoft Windows.

Axel Souchet 1.1k Nov 28, 2022
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.5k Dec 4, 2022
A C++ library with all the online array problems and etc which I get online

cpp-Library A C++ library with all the online array problems and etc which I get online. Setup To setup it simply just download the repo and then move

Padmashree Jha 6 Dec 6, 2021
This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge, and Hackerrank.

CPP_Soln This repo contains solutions to coding questions available online on coding platforms like - Codeforces, Codechef, URI Online Judge , LeetCod

Rijul Jain 4 Nov 3, 2022
A simple Keystroke logger written in C++

BufferX A simple keylogger written in C++ Disclaimer: This project is made for knowledge and learning purpose. I am not responsible for any damage , i

Ibne Nahian 2 Aug 18, 2022
A simple typing tutor program

Open-Typer A simple typing tutor program, which aims for customizability (see Configuring), open source code and ease of use. Features Lessons consist

null 5 Oct 31, 2022
BLE keyboard for Japanese Kana typing

FlickInput BLE keyboard for Japanese Kana typing. BLEフリック入力キーボード M5Paperを用いた軽量なフリック入力キーボードファームウェアです。 片手でPCに文字入力を素早く行うことができます。 使い方 サイドボタンを長押しすると電源が入り、起

Yuki MIZUNO 19 Sep 28, 2022
Wireless keystroke injection attack platform

Wireless keystroke injection attack platform

Spacehuhn Technologies 1.5k Dec 2, 2022
Information on my chord-based typing system

taipo A chord-based typing system: only needs 10 keys per hand (2 keys per finger) optimized to reduce finger usage, travel distance, and awkward patt

Michael 21 Nov 13, 2022
BMI_automatics-faceshielding-device - this is a project utilizing STM32, MATLAB,Softmax classifier to achieve a portable face shielding(mask) device

BMI_automatics-faceshielding-device this is a project utilizing STM32, MATLAB,Softmax classifier to achieve a portable face shielding(mask) device in

Lyu Tian 2 Dec 23, 2021
collection of C/C++ programs that try to get compilers to exploit undefined behavior

------------------------------------------------------------------------------- UB Canaries: A collection of C/C++ programs that detect undefined beh

John Regehr 161 Nov 22, 2022
MiniDumpWriteDump behavior modification hook

MiniDumpWriteDumpPoC MiniDumpWriteDump behavior modification hook Read the full article in our blog: Adepts Of 0xCC: Hooks On Hoot Off This is a funct

Adepts of 0xCC 48 Nov 9, 2022
x64dbg plugin for simple spoofing of CPUID instruction behavior

CPUID Spoofer CpuidSpoofer is a x64dbg plugin which helps you to modify the behaviour of the CPUID instruction. For example, you can easily change the

null 54 Sep 28, 2022
Behavior Trees Library in C++. Batteries included.

This C++ 14 library provides a framework to create BehaviorTrees. It was designed to be flexible, easy to use, reactive and fast.

null 1.8k Dec 5, 2022
A collection of eBPF programs demonstrating bad behavior

Bad BPF A collection of malicious eBPF programs that make use of eBPF's ability to read and write user data in between the usermode program and the ke

pat_h/to/file 285 Nov 25, 2022
A lightweight library of Behavior Trees Library in C++.

A lightweight behavior tree library in C++. NEWS! ?? Thanks to Davide Faconti there is now a more sophisticated version of the library. The new versio

Michele Colledanchise 166 Oct 30, 2022
C++ functions matching the interface and behavior of python string methods with std::string

Pystring is a collection of C++ functions which match the interface and behavior of python's string class methods using std::string. Implemented in C+

Sony Pictures Imageworks 762 Dec 4, 2022
Perf-ninja - This is an online course where you can learn and master the skill of low-level performance analysis and tuning.

Performance Ninja Class This is an online course where you can learn to find and fix low-level performance issues, for example CPU cache misses and br

Denis Bakhvalov 1.2k Nov 30, 2022
This device repo aims to support booting AOSP on SDM845 devices supported by the mainline Linux kernel

device/generic/sdm845 (AOSP device config for SDM845 devices) This device repo aims to support booting AOSP on SDM845 devices supported by the mainlin

Caleb Connolly 21 Oct 24, 2022