Giter VIP home page Giter VIP logo

dspectrumgui's Introduction

DSpectrumGUI

The goal of this app is to make it trivial to demodulate common RF signals, and provide a digital worksheet for your reverse engineering efforts.

DSpectrumGUI Screenshot

Installation

Step by step instructions for Kali Linux (Debian based OS), and MAC OSX, are both available in the wiki: https://github.com/tresacton/dspectrumgui/wiki

Features

  • Community can trivially donate reverse engineering worksheet templates
  • Users can trivially import donated reverse engineering worksheet templates
  • Ability to store device metadata and transmission binary
  • Wraps Inspectrum and uses its "Extract Symbols" feature to help convert pulses into raw binary
  • Automatic analysis of the binary to determine the modulation and encoding types (see Supported modulation types)
  • Some error detection and verbose comments where the app believes it knows which modulation type would have been valid if the user better aligned the symbols in Inspectrum (particularly where significant whitespace was missed in PWM or where symbols are misaligned for Manchester)
  • Reverse Engineering Worksheet to help you visualise the packet structure and comment on sections of the signal
  • Binary Generation for RFCat transmission

Do I need any hardware?

You do if you need to capture transmissiosn from your device. An RTL-SDR, a HackRF, or anything else that will work with tools like osmocom_fft (which is the recommended way to capture your transmission for use with this tool). If you're just here to try it out and have no hardware, find a CFILE/IQ file on the internet for a simple device and give it a shot. As long as its a format supported by Inspectrum, you're good to go.

How does it work?

Assuming you have already captured some signals (Osmocom_fft is great for this!), and have created a new "Device" and "Unit" in DSpectrumGUI, you can click the link "Add New Capture". The application will then spawn an instance of Inspectrum. Once you've appropriately adjusted your symbol/grid overlay in Inspectrum, and asked it to "extract symbols", DSpectrumGUI will then convert that data into a binary string and attempt to automatically demodulate/decode it for you. It also provides a database for you to store pertinent information such as the frequency, baudrate, and FCC ID of the device for your future reference.

When you have some demodulated signals and navigate to the "Reverse Engineering Worksheet" for the device, DSpectrumGUI will present you with a form that allows you to define your own definitions for each section of the data (e.g. marking the first 'n' bits as the Device Identifier string - if that's what you discover they represent), and record your notes/observations about that section as you are working. This is very useful as you are reverse engineering your device. It allows you to keep all of your notes and observations in once place, in a structured and organised manner. Once you're satisfied with your demodulation and reverse engineering, you can choose to share your section definitions as a template for other DSpectrumGUI users to benefit from.

The reverse engineering worksheet view also helps you to view some common binary to integer translations for your defined sections, and gives you some code you can use to attempt to generate your own signals using RFCat.

Supported Modulation/Encoding

  • Pulse-width Modulation (PWM) - 77/25 duty cycle version, and 66/33 duty cycle version
  • Frequency Shift Keying (2FSK) - though the app will treat it as OOK
  • On-off Keying (OOK) / Amplitude Shift Keying (ASK)
  • Manchester encoding - both "G. E. Thomas" format, and "IEE 802" format

Usage

The wiki will be updated as I have time. In the interim, there's a high-level PDF guide I developed for a workshop which demonstrates the basic use of this application. It's available here: DSpectrumGUI Reverse Engineering Guide

License

Licensing is AGPL by default for personal use. An MIT license is available for purchase for commercial use.

dspectrumgui's People

Contributors

dependabot[bot] avatar tresacton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dspectrumgui's Issues

Suggested first-time credentials don't work

Issue Type

Bug

Expected Behaviour

After getting dspectrumgui to start for the first time, the docs suggest using
Email [email protected]
Password: password

Actual Behaviour

Log in fails with "Invalid Email or Password" error

What commit were you running?

(Go to your DSpectrumGUI app, and click "About", and paste the relevant information from the "Application Status Section" here)

Latest AFAIK. Cannot take the steps above b/c I cannot log in

[SectionTemplate] Generic Wireless Alarm System

SectionTemplate.find_or_create_by(:name => "Generic Wireless Alarm System") do |st|
st.sections = "name,start_pos,end_pos,colour,notes
Device ID,0,15,indigo,Changes between devices; static across functions. Must be device id. Recommend expressing this as an integer.
Function Code,16,23,darkgreen,Static between devices as long as same button is pressed. Must be the button. Lets call it the function code. Recommend expressing this as an integer.
Packet Terminator,24,24,gray,This bit is always 0 so far. We're just going to assume it's a packet terminator.
" 
st.added_by = 'nullwolf' 
end

Provide RFCat code template

On Generate Binary page, add full RFCat code to xmit based on known baudrate, binary, and modulation type.

Note: this will partially work for 2FSK. It will be treated as OOK and user would need to change this manually. Maybe there's a better way to handle that though...

Unable to capture data (from file)

Issue Type

bug - IO error

Expected Behaviour

Expected to be able to add data to Dspectrumgui without crash :o)

Actual Behaviour

Input/output error @ io_fillbuf - fd:24 /dev/pts/10

unable to add recorded file. Inspectrum opens up just fine, but when selecting data and closing the Inspectrum window, DspectrumGUI ends up on a crash page, not adding the data file.

What commit were you running?

You are currently running: || c0719ed

rake db:migrate failing - Causes broken install

Issue Type

[bug]

Expected Behaviour

Actual Behaviour

Proceeding with the installation results in an install which fails upon the first GET

rake db:migrate fails with "last_comment is deprecated. Please use last_description instead"

This seems to be due to an out of date version of respec.

I ran bundle update rspec rspec-rails and reinstalled through the current instructions.

Worked fine.

What commit were you running?

(Go to your DSpectrumGUI app, and click "About", and paste the relevant information from the You are currently running: v0.1.1-beta-32-gf4d736e || f4d736e

Installation error

Cannot get my installation to complete successfully if anyone can help?

Had to change my ruby gemfile to 2.70 from 2.55 to get bundler to install.

`rake db:setup && rake db:migrate && rake db:seed' outputs

rake aborted!
NoMethodError: undefined method new' for BigDecimal:Class /home/apollo/.rvm/gems/ruby-3.0.0/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:111:in class:BigDecimal'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object/duplicable.rb:106:in <top (required)>' /home/apollo/.rvm/gems/ruby-3.0.0/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object.rb:3:in require'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/activesupport-4.2.11.1/lib/active_support/core_ext/object.rb:3:in <top (required)>' /home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/configuration.rb:2:in require'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/configuration.rb:2:in <top (required)>' /home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:2:in require'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/railtie.rb:2:in <top (required)>' /home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/engine.rb:1:in require'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/engine.rb:1:in <top (required)>' /home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/application.rb:7:in require'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/application.rb:7:in <top (required)>' /home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails.rb:11:in require'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails.rb:11:in <top (required)>' /home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/all.rb:1:in require'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/railties-4.2.11.1/lib/rails/all.rb:1:in <top (required)>' /home/apollo/dspectrumgui/config/application.rb:3:in require'
/home/apollo/dspectrumgui/config/application.rb:3:in <top (required)>' /home/apollo/dspectrumgui/Rakefile:4:in <top (required)>'
/home/apollo/.rvm/gems/ruby-3.0.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
(See full trace by running task with --trace)

rvm list output

=> ruby-2.5.5 [ x86_64 ]

bundle install output

Using rake 12.3.3
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.11.1
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.4
Using rails-deprecated_sanitizer 1.0.3
Using rails-dom-testing 1.0.9
Using crass 1.0.4
Using loofah 2.2.3
Using rails-html-sanitizer 1.2.0
Using actionview 4.2.11.1
Using rack 1.6.11
Using rack-test 0.6.3
Using actionpack 4.2.11.1
Using globalid 0.4.2
Using activejob 4.2.11.1
Using mini_mime 1.0.1
Using mail 2.7.1
Using actionmailer 4.2.11.1
Using activemodel 4.2.11.1
Using arel 6.0.4
Using activerecord 4.2.11.1
Using public_suffix 3.1.1
Using addressable 2.6.0
Using execjs 2.7.0
Using autoprefixer-rails 9.6.0
Using thor 0.20.3
Using railties 4.2.11.1
Using momentjs-rails 2.20.1
Using datetime_picker_rails 0.0.7
Using jquery-rails 4.3.5
Using kaminari-core 1.1.1
Using kaminari-actionview 1.1.1
Using kaminari-activerecord 1.1.1
Using kaminari 1.1.1
Using rb-fsevent 0.10.3
Using ffi 1.11.1
Using rb-inotify 0.10.0
Using sass-listen 4.0.0
Using sass 3.7.4
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using tilt 2.0.9
Using sass-rails 5.0.7
Using selectize-rails 0.12.6
Using administrate 0.11.0
Using bcrypt 3.1.13
Using coderay 1.1.2
Using erubi 1.8.0
Using better_errors 2.5.1
Using debug_inspector 0.0.3
Using binding_of_caller 0.8.0
Using sassc 2.0.1
Using bootstrap-sass 3.4.1
Using bundler 1.17.3
Using byebug 11.0.1
Using regexp_parser 1.5.1
Using xpath 3.2.0
Using capybara 3.25.0
Using chartkick 3.2.0
Using childprocess 1.0.1
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using coffee-rails 4.1.1
Using database_cleaner 1.7.0
Using orm_adapter 0.5.0
Using responders 2.4.1
Using warden 1.2.7
Using devise 4.7.1
Using devise_invitable 1.7.5
Using diff-lcs 1.3
Using factory_girl 4.9.0
Using factory_girl_rails 4.9.0
Using faker 1.9.5
Using formatador 0.2.5
Using rspec-support 3.8.2
Using rspec-core 3.8.2
Using ruby-progressbar 1.10.1
Using fuubar 2.4.1
Using ruby_dep 1.5.0
Using listen 3.1.5
Using lumberjack 1.0.13
Using nenv 0.3.0
Using shellany 0.0.1
Using notiffany 0.1.1
Using method_source 0.9.2
Using pry 0.12.2
Using guard 2.15.0
Using guard-compat 1.2.1
Using guard-bundler 2.2.1
Using guard-rails 0.8.1
Using rspec-expectations 3.8.4
Using rspec-mocks 3.8.1
Using rspec 3.8.0
Using guard-rspec 4.7.3
Using temple 0.8.1
Using haml 5.1.1
Using sexp_processor 4.12.1
Using ruby_parser 3.13.1
Using html2haml 2.2.0
Using haml-rails 1.0.0
Using high_voltage 3.1.2
Using jbuilder 2.9.1
Using turbolinks-source 5.2.0
Using turbolinks 5.2.0
Using jquery-turbolinks 2.1.0
Using json 2.2.0
Using launchy 2.4.3
Using quiet_assets 1.1.0
Using rails 4.2.11.1
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using rails_12factor 0.0.3
Using rails_apps_pages 0.6.7
Using rails_apps_testing 0.3.13
Using rails_layout 1.0.42
Using rubyzip 1.2.3
Using rails_real_favicon 0.0.12
Using rake-progressbar 0.0.5
Using ransack 1.8.10
Using rb-fchange 0.0.6
Using rspec-rails 3.8.2
Using seed_dump 3.3.1
Using selenium-webdriver 3.142.3
Using shareable 1.1.4
Using shoulda-context 1.2.2
Using shoulda-matchers 3.1.3
Using shoulda 3.6.0
Using simple_form 4.0.0
Using spring 2.1.0
Using spring-commands-rspec 1.0.4
Using sqlite3 1.3.13
Using uglifier 4.1.20
Using upmin-admin 0.1.3
Using web-console 2.3.0
Using will_paginate 3.1.7
Using will_paginate-bootstrap 1.0.2
Bundle complete! 51 Gemfile dependencies, 143 gems now installed.
Use bundle info [gemname] to see where a bundled gem is installed.

localhost:3001 refuses to connect. possible bug in Ruby interpreter or extension libraries.

Issue Type

[bug]

Actual Behaviour

What happened instead?
When running
rails s -p 3001,
it initially says

rails s -p 3001
=> Booting Puma
=> Rails 4.2.5 application starting in development on http://localhost:3001
=> Run 'rails server -h' for more startup options
=> Ctrl-C to shutdown server
Puma 2.16.0 starting...
* Min threads: 0, max threads: 16
* Environment: development
* Listening on tcp://localhost:3001

However, when I open the browser (Google Chrome), it says "localhost refused to connect", and the terminal says

Started GET "/" for ::1 at 2018-01-09 08:38:22 -0700
  ActiveRecord::SchemaMigration Load (0.2ms)  SELECT "schema_migrations".* FROM "schema_migrations"
Processing by DevicesController#index as HTML
Completed 401 Unauthorized in 19ms (ActiveRecord: 0.0ms)

Started GET "/users/sign_in" for ::1 at 2018-01-09 08:38:23 -0700
Processing by Devise::SessionsController#new as HTML
  Rendered devise/shared/_links.html.erb (10.2ms)
  Rendered devise/sessions/new.html.haml within layouts/application (68.0ms)
/home/kaden/radio/tools/dspectrumgui/app/views/layouts/application.html.haml:36: warning: duplicated key at line 36 ignored: :style
/home/kaden/radio/tools/dspectrumgui/app/views/layouts/application.html.haml:37: warning: duplicated key at line 37 ignored: :style
/home/kaden/.rvm/gems/ruby-2.2.2/gems/activesupport-4.2.5/lib/active_support/core_ext/marshal.rb:6: [BUG] Segmentation fault at 0x00000000000000
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]

(Note the [BUG] Segmentation fault at 0x00000000000000 above)
Then the ruby debug/crash report is printed, after which the terminal displays

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

[1]    23103 abort (core dumped)  rails s -p 3001

What commit were you running?

(Go to your DSpectrumGUI app, and click "About", and paste the relevant information from the "Application Status Section" here)
App does not open. Cloned repository is latest from github as of 9 January 2018.

Different ruby versions

When I run
bundle
i get the following output in orange (warning?):
Your Gemfile lists the gem guard-rspec (>= 0) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of one of them later.
And the last line in red:
Your Ruby version is 2.4.1, but your Gemfile specified 2.2.2
And nothing further happens.

I manually changed the version specified in the Gemfile to 2.4.1, but that led down a rabbit hole of manually changing several version numbers, and that ultimately didn't work out.

Any insight into this? Do I have to downgrade my version of ruby installed to 2.2.2?

Adding new capture to unit

Issue Type

Fails to allow upload of capture when clicking "Add New Capture" when looking at a unit.

Expected Behaviour

Based on documentation, should allow upload.

Actual Behaviour

Errno::ENOENT at /devices/1/units/1/captures/new

No such file or directory - fork failed

app/controllers/captures_controller.rb

# `inspectrum`
cmd = 'inspectrum'
begin
  PTY.spawn(cmd) do |r, stdin, pid|
    begin
      got_it = false
      loop do
        if !got_it

What commit were you running?

v0.1.1-beta-32-gf4d736e || f4d736e

screenshot from 2017-07-08 04-55-07

PWM encoding assumption overrides

Some devices interpret 110 (long pulse) as PWM 0.
The app currently always interprets 110 (long pulse) as a 1.

Implement a method to override this assumption on a per-device level. Probably best to add a flag column to device model to determine whether this needs to be 'flipped' so that it consistently occurs throughout the PWM decode method calls once set.

Wrong Manchester Encoded Capture

BUG

Expected Behaviour

The capture is being shown all ones and zeroes inverted for a 128 bit manchester encoded capture. The capture is:
11101001010111001110000101100011111110100110110000010111000111101111111111111111010011011000101011111111111111110110111000111001

(HEX: \xe9\x5c\xe1\x63\xfa\x6c\x17\x1e\xff\xff\x4d\x8a\xff\xff\x6e\x39)

Which had it been inverted, it will be correct. Then DSPectrumGUI is telling that the capture is not a valid manchester encoding value on neither of the two G. E. Thomas or IEEE 802 Format formats.

Actual Behaviour

The value should be:

00010110101000110001111010011100000001011001001111101000111000010000000000000000101100100111010100000000000000001001000111000110

(HEX: \x16\xA3\x1E\x9C\x05\x93\xE8\xE1\xB2\x75\x00\x00\x91\xC6)

I include an image of inspectrum for the capture with an overlay of the correct decodification made by hand.

image

What commit were you running?

You are currently running: v0.1.1-beta-34-gbd0d2c2 || bd0d2c2
This app is up-to-date with master

Automatically update device data

If device's modulation and encoding sections are blank, and the modulation type can be inferred, update these fields automatically.

Error while installing ruby 2.2.8

Issue Type

[bug]

When installing ruby with RVM I get this error :

Warning, new version of rvm available '1.29.7', you are using older version '1.29.7-next'.
You can disable this warning with: echo rvm_autoupdate_flag=0 >> ~/.rvmrc
You can enable auto-update with: echo rvm_autoupdate_flag=2 >> ~/.rvmrc
Searching for binary rubies, this might take some time.
No binary rubies available for: kali/kali-rolling/x86_64/ruby-2.2.8.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for kali.
Removing undesired packages: libssl-dev, libssl1.1...
Error running 'requirements_debian_libs_remove libssl-dev libssl1.1',
please read /usr/local/rvm/log/1554107365_ruby-2.2.8/package_remove_libssl-dev_libssl1.1.log
Requirements installation failed with status: 100.

I am running the latest VMware kali.

errors

I've been using dspectrumgui for several months on a laptop. Just updated to a new laptop and have tried to install dspectrumgui

  1. After running the very first steps here:
Installing RVM & Ruby 2.2.8
.
.
.
source /etc/profile.d/rvm.sh
echo "source /etc/profile.d/rvm.sh" >> ~/.bashrc

I now get an error at boot indicating that bash cannot find rvm.sh

  1. When I run rails s -p 3001 I get
Ignoring executable-hooks-1.5.0 because its extensions are not built. Try: gem pristine executable-hooks --version 1.5.0
Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0
Traceback (most recent call last):
	2: from /usr/bin/rails:23:in `<main>'
	1: from /usr/share/rubygems/rubygems.rb:308:in `activate_bin_path'
/usr/share/rubygems/rubygems.rb:289:in `find_spec_for_exe': can't find gem railties (>= 0.a) with executable rails (Gem::GemNotFoundException)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.