BastilleResearch / mousejack

MouseJack device discovery and research tools
GNU General Public License v3.0
1.3k stars 254 forks source link

Error when running make install command #48

Open LiamBermo opened 3 years ago

LiamBermo commented 3 years ago

i have followed this guide https://null-byte.wonderhowto.com/how-to/inject-keystrokes-into-logitech-keyboards-with-nrf24lu1-transceiver-0197099/ every time i run the make install command i get this error message.

/opt/mousejack/nrf-research-firmware$ make install
./prog/usb-flasher/usb-flash.py bin/dongle.bin
Traceback (most recent call last):
  File "./prog/usb-flasher/usb-flash.py", line 20, in <module>
    import usb, time, sys, array, logging
ImportError: No module named usb
make: *** [Makefile:27: install] Error 1

what have i done wrong? i will continue searching for a solution to this but any help would be appreciated. thank you

LiamBermo commented 3 years ago

i have now gotten past the problem by doing the same steps on another computer

yalok1n commented 3 years ago

Dear all,

Today I installed "kali-linux-2021-W06-installer-amd64" and followed the same steps from the null-byte page shared by redrush11, and I encounter the same error.

=====================================

┌──(root💀kali)-[/opt/mousejack/nrf-research-firmware] └─# make install
./prog/usb-flasher/usb-flash.py bin/dongle.bin Traceback (most recent call last): File "./prog/usb-flasher/usb-flash.py", line 20, in import usb, time, sys, array, logging ImportError: No module named usb make: *** [Makefile:27: install] Error 1

=====================================

I also tried with kali 2020.1 and 2020.4 systems, still the same.

Any help or advice would be appreciated.

Regards, dos

Starzs906 commented 3 years ago

Im having the same issue. I think its because kali has since been updated since the release of mouse jack. The best bet is going into usb-flash.py file in mouse jack and looking for line 20 and changing it to the new kali name

JakeHukari commented 3 years ago

I fixed this by running 'sudo apt install python-usb' and then 'sudo make install'

CharlesTheGreat77 commented 3 years ago

I fixed this by running 'sudo apt install python-usb' and then 'sudo make install'

When doing this, I get a python-usb not found. 🤔

yalok1n commented 3 years ago

Hello again everyone,

I hope you are doing well.

I am writing a bit late but I have found from where the issue was coming, at least for me.

I was trying to install it on a virtual machine, and even doe I was getting some errors during the installation, I was still able to run keystroke injection attacks on wireless mouses. However, the speed with which was typing the commands on the victim machine was Super slow to what I've seen, and sometimes it was even 'freezing' on one word.

For example:

 This is a testttttttttttttttttttt....

And it was constantly gutting stuck on random letters.

I got super sad because I was very hyped about this and I tested it on at least 5-6 different versions of Kali without success.

One day I was surfing around github and I saw some issue for some kind of radio antenna USB stuff, and there was a comment saying that Virtual machines don't handle USB processing for the signal, or something like that.

I then made a bootable USB with kali 2020 on it, and everything was running smooth as f@#$. Tested it by installing 3 other versions on a bootable USB stick, and everything was perfect. The injection type speed was faster than I've thought and there was no freezing while typing.

I gues VM's are not handling USB processing that well so try with either a bootable USB or a PC/Laptop with kali as an OS on it.

I hope this helps you all!

Regards, DOS

CharlesTheGreat77 commented 3 years ago

Glad you got it working, I just loaded a fresh Ubuntu ISO file onto a RPI, downloaded the req. and was good to go, thanks for the suggestion!

Rodeo-Clown commented 2 years ago

After trying to install on a Kali VM I saw what yalok1n added. Now trying to install Mousejack on Raspberry Pi running kali-linux-2021.4-rpi-armhf. I am running into the Python-USB issue here as well. I can find Python3-usb but after trying to run make install I get the typical "can't find usb" tried editing the python import to "python3-usb" now getting syntax error with it pointing at the '-' between python3 and usb

Suggestions ?

ltsalvatore commented 2 years ago

any news on this?

talilama commented 2 years ago

Hey, this can be solved by forcing the proper version of pyusb into the same directory as the install script so it can find it. I did this by using a virtual environment and copying the actual pyusb "usb" directory into 'prog/usb-flasher' directory:

virtualenv -p /usr/bin/python2 venv
source venv/bin/activate
pip install pyusb
cp -r ~/opt/offensive-wireless/mousejack/venv/lib/python2.7/site-packages/usb ./prog/usb-flasher/
sudo make install
cyb3rsad1k0 commented 8 months ago

I found the fix for this, see this: https://github.com/BastilleResearch/nrf-research-firmware/pull/21/files/bb640164659ec1e9919b8ee22c2b79ad61e0fd94