vmonaco / kloak

Keystroke-level online anonymization kernel: obfuscates typing behavior at the device level.
BSD 3-Clause "New" or "Revised" License
485 stars 35 forks source link

mouse click obfuscation #51

Open adrelanos opened 11 months ago

adrelanos commented 11 months ago

When enabling debug mode -v I can see that mouse movements result in journal output. Not so for mouse clicks.

Are mouse clicks already obfuscated? Is this implemented or requires further work?

skyzzuu commented 11 months ago

Yeah they have delay added to them. In the output, they'll be event type 1 (EV_KEY) and have a code of 272 (BTN_LEFT) for the left mouse button or 273 (BTN_RIGHT) for the right mouse buttn. I can see them in my output, they usually just get flooded by EV_REL events around them since the mouse will typically move at least a little bit when clicking one of the buttons. Then either 1 or 0 for value are button down and button released, but I can't remember which is which.

Towards the top of the large for loop in main_loop(), there are the following lines which will add delay to any events that aren't EV_SYN:

// syn events are not delayed if (ev.type == EV_SYN) { random_delay = lower_bound; } else {