Skip to content

Repository files navigation

WAV format check

challengectl

Queues challenges and gr-osmosdr radios to transmit for the RFCTF

$ python challengectl.py -h
usage: challengectl.py [-h] [-v] flagfile devicefile

A script to run SDR challenges on multiple SDR devices.

positional arguments:
  flagfile       Flags file
  devicefile     Devices file

options:
  -h, --help     show this help message and exit
  -v, --verbose

Flags File

The flags file is a csv file, with the first line containing the conference name, and start and end times. After the first line, add one line per challenge, using the format shown below.

conference,starttime,endtime
chal_id,chal_name,flag,module,modopt1,modopt2,minwait,maxwait,freq1,freq2,freq3

The flags-archive directory contains example flags files from previous RFCTF events.

Devices File

The devices file is a csv file, with one line per SDR device. Each line begins with a 0 based index, and the device string for each device to be used by challengectl.

dev_id,osmosdr_device_string
0,"bladerf=longhexserialnumberhere,biastee=1"

create-devices-txt.py will attempt to detect supported devices on your system, and automatically output a devices.txt file with a line for each of those devices.

TX Antenna Ports: challengectl will transmit by default from the default transmit port on your SDR device, the only port if your SDR only has one transmit port, TX1 on bladeRF 2.0 Micro, TX/RX on a USRP B200 - whichever port is selected by an empty string passed to the antenna parameter for the Osmocom GNU Radio Sink. If you would like to transmit from a different port than the default, you will need to update the get_antenna_port function in challengectl.py to select a different port for the device. There is an example in that function, selecting TX2 for one of the RFHS bladeRF devices with a physically broken TX1 port. Setting transmit ports via configuration files will likely be in a future iteration of challengectl, but for now changing the transmit port requires updating the code.

Avoid Frequencies File

The avoid frequencies file is a new line delimited JSON file, with each line containing one JSON object with a frequency range or channel to avoid. The purpose of defining frequency ranges or channels in this file, and passing the file into challengectl.py with the -a flag is to prevent challengectl from transmitting in frequency ranges that you would like to avoid transmitting on. These frequencies could be avoided by selecting a different frequency in the flags file, but using the avoid frequencies file will also prevent transmitting on these channels when you are using a frequency range, such as ham_440 for a challenge in the flags file.

Avoid frequencies are defined as either channels or frequency ranges. Channels have a center frequency and a bandwidth, both specified in Hz. Frequency ranges have a lower frequency, and an upper frequency, also specified in Hz.

The avoidfreqs.txt.example file has examples of both channels and ranges. To avoid a channel, such as the Amateur Radio 2M FM Simplex channel, add a line to your avoid frequencies file like this:

{"name": "2M FM Simplex", "type": "channel", "center": 146520000, "bandwidth": 10000}

In the examples file, there are also examples of ranges, such as the Amateur Radio 2M SSB Calling frequency. The SSB frequencies to avoid are defined as ranges because it may be easier to think of the SSB frequencies using the dial frequency as the lower frequency (for USB) and adding the bandwith to the dial frequency to get the upper frequency of the range to avoid. An example of a frequency range to avoid in the avoid frequencies file is below:

{"name": "2M SSB Calling", "type": "range", "lower_freq": 144200000, "upper_freq": 144203000}

Supported Devices

Any transmit capable device that can be used to transmit using a GNURadio gr-osmosdr sink should work, however only the following devices have been tested so far.

Challenges

spectrum_paint.py Paints an image using gr-paint
ask.py Transmits Amplitude Shift Keying challenges
cw.py Transmits CW / Morse Code challenges
nbfm.py Transmits Narrowband Frequency Modulation
usb_tx.py Transmits Upper Sideband
lrs_pager.py Generates a pager.bin file to be transmitted by lrs_tx.py. This code is based on github.com/tony-tiger/lrs
lrs_tx.py Transmits an LRS signal, based on a pager.bin file generated by lrs_pager.py
pocsagtx_osmocom.py Transmits POCSAG messages using gr-mixalot
gotenna_pro_bladerf.py Transmits goTenna Pro broadcast messages using bladeRF and packet encoding from gr-tenna

About

RF CTF SDR Challenge Controller

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages