Skip to content
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

Migration to Python3 + Enhancements in cherry_attack #5

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

Einstein2150
Copy link

@Einstein2150 Einstein2150 commented Oct 24, 2024

This pull request includes a complete migration of the existing codebase from Python 2 to Python 3. In addition to the migration, several enhancements and improvements have been implemented.

As discussed yesterday at the IT-SA conference in Nuremberg with Gerhard Klostermeier @ikarus23 , I am pleased to present my extensions and modifications to the project.

cherry_attack.py v.1.1 by Einstein2150

New commandline Features

The -key parameter specifies the cryptographic key used for the Cherry keyboard. It must be provided in a hex format (16 bytes) without spaces or special characters

The -adr parameter specifies the device address of the Cherry keyboard. This address must also be in hex format (5 bytes) and formatted similarly to the key, with pairs of hexadecimal digits separated by colons (e.g., 00:11:22:33:44).

The -p or --payload parameter allows users to pass a custom payload that will be used during the attack. This gives users more flexibility when conducting their tests and attacks.

The new -x or --execute option allows users to execute an attack immediately without using the application's user interface. When both the -p (payload) and -x options are provided at startup, the attack is executed with the supplied payload right away.

Example:

bash
python cherry_attack.py -key 1234567890123456789012 -adr 00:11:22:33:44 -p "Your custom payload" -x

New insights in cherrys encryption

During testing with the extensions, I @Einstein2150 also noticed that multiple valid keys for keystroke injection can be concurrently valid at the same time. With the enhanced debugging output, the keys along with their corresponding device MAC addresses are documented as entries in the log. Feel free to collect as many working keys for your device as you can.

@ikarus23
Copy link
Member

@Einstein2150 Thanks! Nice talking to you at it-sa 2024.
Maybe consider renaming -hex to -address? Because it is just that, an nRF24 address.
Also, you might like https://github.com/SySS-Research/keyjector. More nRF24 hacking stuff that should be on python3 already.

@mdeeg That last part sounds interesting. Not sure were it comes from. Had been a long time since I looked at the protocol.

@Einstein2150
Copy link
Author

@ikarus23 @mdeeg I changed -hex to -adr in the code and the readme

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.

2 participants