Showing posts with label SDR. Show all posts
Showing posts with label SDR. Show all posts

Shit I forgot my RTL-SDR !!


Till now we have seen how to use the rtl-sdr dongle but what if you can't afford one or forgot your at home. sdr.hu is great website which allows you to access open sourced sdr receivers around the world. This helps you to study software defined radio even without owning it. 

To get access to a sdr dongle which is openly hosted you can select any one of the receivers from the huge list. The receivers are voted by the users as per their performance. You might not be able to get the entire radio spectrum as the receivers vary from provider to provider. The deceives may work or not as these devices are not installed by the website or maintained by it. This might not be helpful for IOT(internet of things) testing. This can be a great starter kit as it can help a noob to learn the basics about SDR. While using it we found that some of the devices were a bit slow or it might just be my internet connection. The "how to?" is quite easy hence help your self around. It's as easy as opening a website and going around it.  

Note:-  
If you are using a proxy then you might have to stop it or use a VPN to bypass it.

Add SDRTouch to life!!

We have discussed in our article listing to WFM radio about how you can tune into WFM radio and listen to it. So now I was wandering about how to do it on Android. So I started search for apps to do it.

How to
  1. Download rtl2832u driver and SDRtouch from the play Store and install it.
  2.  Now connect your phone and your rtl SDR dongle with an OTG adapter.
  3. Now run SDRTouch App and select the power icon on the top left corner.                                                  
  4. Now select the rtl2832u driver for your backhand decoder.
  5. Now set the desired frequency to listen to the transmissions.
 Note:-
The landscape mode is far more convenient to use when compared to the portrait mode.



Adsb on Android

I was wondering if I could track planes from an android phone. So I started looking for apps which could perform the interception and decoding. I also found out that my phone should support USB OTG to connect the SDR.

How to?
  1. Download the Adsb app from the play store.
  2. Now connect the SDR dongle to your phone with the OTG cable or adapter.
  3. Launch the app and hit the start driver ADSB button, select the app's default driver.                                        
  4. Now wait and watch you will get the data on the main screen.

Note:-
The map view is very lousy so I would advice you to stay away from it.

Airplane tracking for Linux Penguins

We had shared articles on tracking airplanes with SDR on windows. Here is how you do it on Linux. We will be using Kali Linux in our example but you can do it on any other distribution as well. The number of dependencies required may vary from distribution to distribution.
.

How to?
1) Before we start with the actual script you might need a couple of dependencies which means you might have to do a couple of apt-gets:-  
apt-get install libusb-1.0-0-dev

apt-get install libusb-dev

apt-get install librtlsdr-dev

2) After you are done you might need to get dump1090 from GitHub:-
git clone https://github.com/antirez/dump1090.git

3) Now you will have to cd into the folder and recompile the script:-
cd dump1090

make

4)Now to run it use the command:-
./dump1090 --interactive


Note:-
To explore more options you can the command ./dump1090 --help. The best thing is that the script is open source so you can modify it as per your desires.
 







 

Sniffing for GSM packets

GSM network works on a frequency 850-900 MHz. In other words we can sniff the packet transfer between the phone and a GSM tower with an rtl-sdr dongle.

How to?
At first you might have to get the dependences:
  • apt-get –y install git-core autoconf automake libtool g++ python-dev swig libpcap0.8-dev
  • apt-get install gnuradio gnuradio-dev cmake git libboost-all-dev libusb-1.0-0 libusb-1.0-0-dev libfftw3-dev swig python-numpy libpcsclite-dev 
Now you will need to get libosmocore:
  • git clone git://git.osmocom.org/libosmocore.git
  • cd libosmocore
  • autoreconf –i
  • ./configure
  • make
  • make install
  • ldconfig
  • cd ..
Now you will need airprobe:

  • git clone https://github.com/ksnieck/airprobe.git
At the end you might have to install the gsmdecoder:

  • cd airprobe/gsmdecode
  • ./bootstrap 
  • ./configure
  • make
  • cd ..

At last you might have to install the receiver:

  • cd airprobe/gsm-receiver
  • ./bootstrap
  • ./configure
  • make


Now to start the sniffing:
  • python gsm_receive_rtl.py -s 1e6
Now open wireshark and set the interface to lo(loopback). And set the filter to gsmtap so that you only get the gsm packets.




Note:- 
If you don't get packets change the frequency with the gnu radio GUI. If you want to know more you can refer to this article. You might have to add a few more dependencies if you are using other distributions of Linux.




Tracking satellites with SDR

 To track satellites you will need the following software and the rtl-sdr dongle or similar dongles:-
After the installation is done you might need to edit a few things. The editing procedure is available at the HamRadioSet's YouTube channel. 
  
How to?

  1. open orbitron and SDR# with administrator privileges.
  2. Now from the list of satellites select the satellite you want to track. For our example we are selecting ISS.
  3. Now in orbitron go to rotor/radio menu and set the Dnlink to FM and driver to MYDDE and hit the connect icon. 
  4. A MYDDE client instance will start. Now go to sdr# and scroll to satellite tracking plugin and select the satellite tracking software to orbitron. 
  5. Now click connect to pipe the inputs to sdr#.




Note:-
Receiving is  good and is under legal limits. Transmitting and piggybacking is illegal.

Comparative study of rtl1090 and adsb#

The two most used ADSB decoders are adsb# and rtl1090. These decoders can be widely used with interface software like adsbscope and virtual radar. And both these decoders work with the nooelec dongle. 

How they look?
The user interface of rtl1090 looks more like some tech from the spy movies, where as adsb# looks more like any other software that runs on windows.

What's under the skin?
rtl1090 decodes the data in binary, where as the adsb# decodes the data in normal form which is decimal.

What ports are used?
adsb# uses port 47806, while rtl1090 uses port 31001 for the data transfer.


How did they perform in tests conducted at HCAK_Labs?
We tried out both these decoders with a bunch of different interface software on a intel i3-3120M with 8 GB RAM. In majority of the tests rtl1090 was analyzed with packet drop issues while adsb# worked flawlessly in most test conditions but it didn't really work well with virtual radar.

   

Virtual Radar: Sharing the an SDR data online

As we discussed in the article  tracking airplanes with SDR we found another cool software which allows you to share the captured data online. Virtual Radar is a hosting interface software i.e it allows us to host the data online. For example we will be using rtl1090 instead of adsb#. The only difference between them is that rtl1090 decodes the data in the form of binary. 

How to?
  1. After installing the software, run rtl1090 first with administrator privilege.
  2. Now leave rtl1090 running then run virtual radar.
  3. Now click on tools and then options. After that click on receivers set the format to AVR or Beast RAW feed and the port number to 31001 and click OK.( click on test connection if you want to make sure that everything is working properly)
  4. Now click on the url which appears above feed status.
  5. Now to find out more details about the plane select it by clicking on it. 

  6. you can used http://127.0.0.1/VirtualRadar/mobile.html,
http://127.0.0.1/VirtualRadar/desktop.html and http://127.0.0.1/VirtualRadar/settings.html as per your requirement.
Note:-
If the software doesn't work you will need to download a few files from the following link.



Scanning frequency band..

To scan a frequency band with an SDR we will need a python tool known as rtlsdr-scanner which is present in the kali-linux-sdr package. This is a simple tool which creates a frequency to levels graph which can be used for statistical analysis. If you are using a version of Kali Linux other than 5.0 you might have to run the command apt-get install kali-linux-sdr to get all the tools of the package.

How to?

  1. Open the terminal window and type rtlsdr-scanner and hit enter.
  2. Now set the start and stop range of the frequency.
  3. Then click on start to generate the graph.
  4. At the end you will get a graph which you can use for analysis.
Note:-
To find out if you have the sdr pacakge installed you can check for Kali Linux /wireless attacks/Software Defined Radio.

Listening to WFM radio......

Mostly SDR is similar to a radio receiver which can be used to listen to the transmissions on any frequency. In simple words it is like a radio receiver present on police cars, boats and small airplanes. 

Requirements:-
  1. Sdr dongle(antenna + front end)
  2. SDR#(decoder and interface)
If you are using sdr for the first time then we will advice you to follow the easy installation on rtl-sdr.org which helps you to install all the required drivers correctly.

How to?
  1. After extracting the files, run the intall.bat file.
  2. After the files are downloaded, open the sdrsharp folder and run the sdrsharp application program. 
  3. Now hit the configure button and then hit close.


  4. Then select WFM and hit an the play button. If it doesn't work adjust the rf gain.
  5. Now change the frequency to your desired frequency by clicking on the frequency(in example the frequency is 98.3 Mhz).


Note:-
I will not advice you to listen on frequency used by the police department and other services.

Tracking Airplanes with sdr....

ADSB is the shot form of Automatic Dependent Surveillance–Broadcast is a kind of packet sent out by every plane in the sky this packet helps the ground station to locate an aircraft in the air.All aircraft transponders transmit data at the frequency 1090 MHz. To receive this transmissions one needs a receiver for this frequency - an ADS-B-receiver. The main flaw in this system is that there is no encryption of packets which mean anyone with the right setup can track planes.


Requirements:-
  1. Sdr dongle(antenna + front end)
  2. adsbsharp(decoder)
  3. adsbscope(interface software)



setup

If you are using sdr for the first time then we will advice you to follow the easy installation on rtl-sdr.org which helps you to install all the required drivers correctly.

How to?

  1. First from the sdrsharp package run the adsb# application( Just hit on start don't change anything).
  2. Now keep the adsb# running and open the adscscope application. Now click on other and then click on Network setup.
  3. Now configure your decoder by selecting adsb# and your machine by clicking on local host.
  4. Hit close and exit and go to network and select raw data client.
  5. Now after a few minutes you will see a few planes on the map and their details will be displayed on  the right panel.



Note:-
The dongle used in the demonstration is only a receiver and hence it cannot send anything thus you don't need any special permission for using it.