Widespread Augmented Reality

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

Tuesday, August 25, 2020

Set Up WiFi Adapter in Kali Linux Virtual Box

 Here are all steps that I took to get the external WiFi USB adapter to be recognized inside Kali Linux Virtual Box.


1. First plug in USB adapter into Windows and install the approriate Windows driver

2. After confirming that Windows is using the adapter, unplug it from the USB port

3. Start Virtual box with ext already installed and import Kali linux OVA file

4. Select the USB 3.0 controller for the USB device

5. Start the imported appliance for Kali

6. After fully started:

$ sudo bash

$ mkdir /etc/gcrypt

$ echo all >> /etc/gcrypt/hwf.deny

$ sudo apt-get update

(See previous post on what the above commands accomplish)

7. Then get Linux driver for my AWUS1900 WiFi Adapter

https://store.rokland.com/pages/rokland-technologies-support

https://github.com/aircrack-ng/rtl8812au

download zip file.

extract zip file and rename if want to.

open terminal inside extracted folder

sudo apt-get install dkms

sudo ./dkms-install.sh

8. Plug adapter back in.

9. Now a right click on the upper right network icon and it should reveal wireless networks

for the USB WiFi adapter.


Friday, August 14, 2020

ADS-B and Virtual Radar Set Up

This is ADS-B, automatic dependent surveillance broadcast https://en.wikipedia.org/wiki/Automatic_dependent_surveillance_%E2%80%93_broadcast.

This is a cheap hardware option  for capturing signals https://www.amazon.com/NooElec-NESDR-Mini-Receiver-RTL2832U/dp/B00VZ1AWQA/ref=sr_1_10?dchild=1&keywords=adsb+receiver&qid=1597414256&sr=8-10

Here is the necessary antenna that may or may not come with the receiver. https://www.amazon.com/onelinkmore-1090Mhz-Antenna-Connector-Adapter/dp/B013S8B234

This is the Windows server to install on your local machine ( the PC that is sitting in front of you) https://drive.google.com/file/d/1Y5HkmfNWBgp4-xtnr16JoDjje-qdeL-X/view?usp=sharing.

This is the Windows client that reads from the server installed http://www.virtualradarserver.co.uk/

ADSB# has been discontinued in favor of ADSBSpy and an AirSpy dongle.  If you use something else, you will need ADSB# at https://drive.google.com/file/d/1Y5HkmfNWBgp4-xtnr16JoDjje-qdeL-X/view?usp=sharing


Below are screen shots of key configuration options that need to be set.



After starting ADSB and specifying the above options, you will need to download install and run Virtual Radar from https://www.virtualradarserver.co.uk/Download.aspx

          Under the Tool | Options, select these settings:



You will then see a hyper-link back on the main screen for 127.0.0.1/VirtualRadar.
Click that and navigate to your geographical location.


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.

Saturday, August 1, 2020

Kali Linux Building GNURadio from Source to Possibly Enhance Performance

This is where I keep notes to remind me of what I am doing, because I tend to rush through solutions and forget what I did just 2 minutes ago,

Turns out that pybind may be important later on when studying GSM signals.
Found out that I cannot simply do a "pip install pybind11", because only C header files are downloaded with no cmake configuration.
So build from source:
git clone https://github.com/pybind/pybind11
cd pybind11
mkdir build
cd build
cmake ..
sudo make install
Somewhere in the above process I got an error on pytest.
So, pip3 install pytest
Then, export PATH=$PATH:/home/mya55/.local/bin , which happens to be where pytest landed.
Then, continue with cmake .. , sudo make install. (SUDO because may not have write access on target directories.)
Now follow instructions starting at the section Installing Volk. https://wiki.gnuradio.org/index.php/InstallingGR#Step_2:_Installing_Volk

During make, got "cannot find -lgsl::gsl", so
sudo apt-get install libgsl-dev.
Then start over with
sudo cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=/usr/bin/python3 ../

Now what's messed up is that I also ran
sudo apt-get install gnuradio
to see what would happen.
Now there is a /bin/gnuradio-companion and
/usr/bin/gnuradio-companion and
/usr/local/bin/gnuradio-companion
The shell execution path is /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
For now, I will leave things alone, because simply typing "gnuradio-companion" on the first shell prompt works.
Now I will test the HackRF One's ability to detect GSM signals coming from my own phone. See https://osmocom.org/projects/gr-gsm/wiki/Installation