Widespread Augmented Reality

Widespread Augmented Reality
Click on the image to get the Android Augmented Reality Heads up Display

Wednesday, August 12, 2020

Kali Linux Virtual Box Pyrit Installation

Update 04/04/2022: use python2 also followed by sudo if needed

sudo apt-get install libpcap-dev

sudo apt-get install python-dev 

sudo apt-get install libssl-dev 

sudo apt-get install zlib1g-dev

Download zip from https://github.com/JPaulMora/Pyrit

or from https://drive.google.com/file/d/1xTYyMmc-dazKf95rF4unsYPELJ3doCvw/view?usp=sharing

Use Linux GUI file manager to extract the .ZIP file into Pyrit-master.

cd Pyrit-master

python setup.py clean

python setup.py build
If get error, then sudo ntpdate -v pool.ntp.org and then sudo apt-get update. Then run: sudo apt-get install libssl-dev

sudo python setup.py install

Mind you that these notes are more for me than you.  Good thing, because I did a Google search on how to install hcxpcaptool and hcxdumptool and out popped my notes from 2018.

https://s33me.blogspot.com/2018/12/kali-linux-wifite-missing-hcxpcaptool.html?spref=tw

Kali Virtual Box - Hash Sum Mismatch

This error occurs when running sudo apt-get update in the Kali Linux virtual box.

Holy Toledo!  This resolved it:

sudo bash

mkdir /etc/gcrypt
echo all >> /etc/gcrypt/hwf.deny
sudo apt-get update

Solution found at https://forums.kali.org/showthread.php?48822-Kali-2020-2-OVA-VIRTUALBOX-HASH-SUM-MISMATCH


Tuesday, August 11, 2020

Kali Linux Virtual Box and the AWUS1900 USB WiFi Adapter

This is a continuation of the previous post.  Now that WiFi is enabled in the Kali Linux virtual machine.  I have to log out, shutdown the machine and then plug in the AWUS1900 into the Windows host with the appropriate driver already installed from https://store.rokland.com/pages/rokland-technologies-support..

After Windows recognizes the AWUS1900 adapter,  I return to the Virtual Box setting for USB and add a USB 3.0 controller for "Realtek 80211ac NIC".

Then I unplug the WiFi Adapter and start the Kali Linux Virtual machine.

Inside the Kali Linux Virtual machine I open a browser and follow  https://www.youtube.com/watch?v=81bWw7VOlVA&feature=youtu.be to install the AWUS1900 Linux Drivers.

Then I plug back in the AWUS1900 WiFi adapter and after left clicking the network connection icon at the top of the Kali desktop screen, I see available networks.

Hallelujah, sweet Mary, mother of Jesus.

Kali Linux Virtual Box Enable Wireless Interface

After installing the virtual machine: "VirtualBox-6.1.10-138449-Win.exe" and the extension for it: "Oracle_VM_VirtualBox_Extension_Pack-6.1.12.vbox-extpack", I imported the appliance: "kali-linux-2020.2a-vbox-amd64.ova" and discovered that when right clicking on the network icon in the top right corner of the the Kali desktop there was no option for "Enable WiFi".

I followed the instructions at https://thetechrim.com/fix-wireless-drivers-problem-in-kali-linux2020/.

The only difference is that I used "sudo make unload" and "sudo make load".

Now I will see if I can get the Kali Linux virtual machine to recognize the USB Wifi adapter.

PS: I also saved a copy of the necessary files at https://drive.google.com/file/d/1TyZSLGacFpv2GxpUwQ1GAShIUqi6IDPg/view?usp=sharing


Sunday, August 9, 2020

Kali Linux, HackRF One and GNURadio Not Generating Osmocom Sink

sudo apt-get install hackrf libhackrf_dev libhackrf0
sudo ldconfig
sudo hackrf_info
sudo apt-get install gnuradio gr-osmosdr gr-gsm
sudo ldconfig
sudo gnuradio-companion

The following construct kept generating errors in the Python code that alternated among gain_mode0, irq_balance0 or dc_offset NOT FOUND.  I installed GNURadio with sudo apt-get install gnuradio gr-osmsdr gr-gsm.

Mind you that Osmocom source generated okay but not Osmocom Sink.  After repeatedly failing to build gr-osmosdr from source, I went directly to the file "/usr/share/gnuradio/grc/blocks/osmosdr_sink.block.yml" and removed all the code between:

"make: |
    osmosdr.sink(
        args="numchan=" + str(${nchan}) + " " + ${args}
    )"

AND

"documentation: |-
  The osmocom sink block:"

Then I put back only the following lines:

self.${id}.set_sample_rate(${sample_rate})
    % if context.get('nchan')() > 0:
    self.${id}.set_center_freq(${freq0}, 0)
    self.${id}.set_freq_corr(${corr0}, 0)
    self.${id}.set_gain(${gain0}, 0)
    self.${id}.set_if_gain(${if_gain0}, 0)
    self.${id}.set_bb_gain(${bb_gain0}, 0)
    self.${id}.set_antenna(${ant0}, 0)
    self.${id}.set_bandwidth(${bw0}, 0)
    % endif
  callbacks:
    - set_sample_rate(${sample_rate})
    - set_center_freq(${freq0}, 0)
    - set_freq_corr(${corr0}, 0)
    - set_gain(${gain0}, 0)
    - set_if_gain(${if_gain0}, 0)
    - set_bb_gain(${bb_gain0}, 0)
    - set_antenna(${ant0}, 0)
    - set_bandwidth(${bw0}, 0) 

And I set defaults in "/usr/share/gnuradio/grc/blocks/osmosdr_sink.block.yaml" to what I would normally use.

Now this construct interacts with a Harbor Breeze ceiling fan using a file that contains the captured signal between the remote and the fan.  

Oh joy.

 

Saturday, August 8, 2020

HackRF One and Harbor Breeze Ceiling Fan

Using a software defined radio (SDR) program call GNURadio, I was able to control a Harbor Breeze ceiling fan from my computer. Imagine replacing "Harbor Breeze" with "Mercedes Key Fob". How secure is your car? 

 PS: I followed the instructions here to install GNURadio on Windows 10. https://www.youtube.com/watch?v=gzrjkZJCBvI 


Files were obtained from here  https://drive.google.com/file/d/1E-fl3C55wpAZyqESjt1S5UyDY5Q_1sy2/view

Most of the wheel files were installed with pip install [package name], e.g.:

pip install lxml

pip install numpy

pip install PyQt5

pip install PythonQwt

pip install Cheetah3

pip install PyOpenGL

pip install setuptools==3.8.1

pip install PyGTK

Finally GNURadio was installed from http://www.gcndevelopment.com/gnuradio/downloads.htm 


Used v3.7.11 because 3.8 threw an error while trying to find the QT plugin.