Giter Site home page Giter Site logo

blue_hydra's People

Contributors

bclune avatar dallaswinger avatar granolocks avatar jnikiciuk avatar joswr1ght avatar sstelfox avatar timdunn22 avatar zerochaos- 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  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

blue_hydra's Issues

Raspberry Pi 3 support

I want to get this running on the RPI 3's internal adaptor but it doesn't seem to be working.
HCI0 shows up when I run 'hciconfig'. I am using a stock install. When I launch bluehydra, it is not seeing any devices.

hci0:   Type: BR/EDR  Bus: UART
    BD Address: B8:27:EB:47:F4:7F  ACL MTU: 1021:8  SCO MTU: 64:1
    UP RUNNING 
    RX bytes:654 acl:0 sco:0 events:33 errors:0
    TX bytes:419 acl:0 sco:0 commands:33 errors:0

It does look like bluetoothd may have died, is that critical?

pi@raspberrypi:~ $ sudo /etc/init.d/bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; disabled)
   Active: inactive (dead)
     Docs: man:bluetoothd(8)
pi@raspberrypi:~ $ 

Blue Hydra not detecting anything

I have blue_hydra running on Arch Linux, and it never detects any devices.

I can list these discoverable devices with hcitool scan.

test-discovery script error

I'm running BH on Raspian Jessie on a rPi3 using the Sena bluetooth dongle. Blue Hydra tends to run fine but I keep getting an error starting the test-discovery script. It says the network device is down but when I run hciconfig or ifconfig both the dongle and network devices are shown as up and running.

Also, the error below frequently shows up in the logs with different addresses:

E, [2016-09-28T06:46:15.366533 #2267] ERROR -- : Error with info command... {:command=>:info, :address=>"XX:XX:XX:XX:XX:XX"}

Any help on diagnosing whats going would be greatly appreciated as this this error will cause the program to freeze up.

I'm trying hard to not earn myself a second snarky edit to the readme :)

The full output of the log is :

I, [2016-09-28T06:42:39.340318 #2267]  INFO -- : BlueHydra Starting...
I, [2016-09-28T06:42:39.340636 #2267]  INFO -- : Runner starting with 'btmon -T -i hci0' ...
I, [2016-09-28T06:42:39.364185 #2267]  INFO -- : Marking older devices as 'offline'...
I, [2016-09-28T06:42:39.422177 #2267]  INFO -- : Btmon thread starting
I, [2016-09-28T06:42:39.422686 #2267]  INFO -- : Discovery thread starting
I, [2016-09-28T06:42:39.429876 #2267]  INFO -- : Chunker thread starting
I, [2016-09-28T06:42:39.436589 #2267]  INFO -- : Parser thread starting
I, [2016-09-28T06:42:39.437284 #2267]  INFO -- : Result thread starting
I, [2016-09-28T06:42:39.439997 #2267]  INFO -- : Command Line UI thread starting
E, [2016-09-28T06:43:11.762659 #2267] ERROR -- : Error with test-discovery script..
E, [2016-09-28T06:43:11.762981 #2267] ERROR -- : Traceback (most recent call last):
E, [2016-09-28T06:43:11.763089 #2267] ERROR -- :   File "/home/pi/bigTooth/blue_hydra/bin/test-discovery", line 43, in <module>
E, [2016-09-28T06:43:11.763181 #2267] ERROR -- :     adapter.StopDiscovery()
E, [2016-09-28T06:43:11.763271 #2267] ERROR -- :   File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
E, [2016-09-28T06:43:11.763372 #2267] ERROR -- :     **keywords)
E, [2016-09-28T06:43:11.763467 #2267] ERROR -- :   File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
E, [2016-09-28T06:43:11.763566 #2267] ERROR -- :     message, timeout)
E, [2016-09-28T06:43:11.763655 #2267] ERROR -- : dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name :1.2 was not provided by any .service files
E, [2016-09-28T06:46:04.038186 #2267] ERROR -- : Error with test-discovery script..
E, [2016-09-28T06:46:04.038482 #2267] ERROR -- : Traceback (most recent call last):
E, [2016-09-28T06:46:04.038606 #2267] ERROR -- :   File "/home/pi/bigTooth/blue_hydra/bin/test-discovery", line 43, in <module>
E, [2016-09-28T06:46:04.038711 #2267] ERROR -- :     adapter.StopDiscovery()
E, [2016-09-28T06:46:04.038813 #2267] ERROR -- :   File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
E, [2016-09-28T06:46:04.038908 #2267] ERROR -- :     **keywords)
E, [2016-09-28T06:46:04.039008 #2267] ERROR -- :   File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
E, [2016-09-28T06:46:04.039102 #2267] ERROR -- :     message, timeout)
E, [2016-09-28T06:46:04.039228 #2267] ERROR -- : dbus.exceptions.DBusException: org.bluez.Error.Failed: No discovery started
E, [2016-09-28T06:46:14.351301 #2267] ERROR -- : Error with hciconfig hci0 reset..
E, [2016-09-28T06:46:14.353346 #2267] ERROR -- : Can't init device hci0: No such device (19)
E, [2016-09-28T06:46:15.366533 #2267] ERROR -- : Error with info command... {:command=>:info, :address=>"08:74:02:16:E8:FE"}
E, [2016-09-28T06:46:15.366831 #2267] ERROR -- : Invalid device: Network is down

Is the --pulse option not working anymore?

I haven't used the --pulse (-p) option for a while and noticed now it's not working at all. It just throws an error.

Something along the lines of LOAD ERROR for the "require 'sensor_event'" part.

LoadError dm-migrations (RPi)

Attempting to start blue_hydra on an RPi, I run into the error "cannot load such a file -- dm-migrations". I started with Ruby 2.7.0 (same error) but then installed Ruby 2.5.0 with bundler 2.1.2 according to the error output. Each run, same error. If I run gem list, I see that the dm-migrations (1.2.0) gem is installed, but it's still throwing the LoadError.

./bin/blue_hydra instant exit

Hi guys.
I have archlinux upToDate and Intel Corporation Wireless 3160 with bluetooth. I can scan and connect to BLE devices. So everything works.

But when i start the app with the command above i got instant exit after press [Enter] key to continue.... message.
Any ideas?

sqlite3 database cleared up

I have scanned several device.. last month I was wondering why it was gone after days of work? wondering why and how can I adjust this option certain days? thanks

Which Hermes

When staring with --pulse, it is to send to Hermes, and assume the hermes running on localhost port 8244, is it the hermes build on top of kafka like http://hermes.allegro.tech/, or it is another version of hermes, thanks

cant enable ubertooth

when i change the bt_device in blue_hydra.yml to ubertooth or ubertooth0 or ubertooth=0 the ubertooth status is alway not enabled...

so what can i do / have to do to enable ubertooth?

Unable to read the mac address from hci0

  • I run it and it says "Unable to read the mac address from hci0"
  • not sure what I should put in blue_hydra.yml for bt_device for ubertooth one
  • kismit works with ubertooth
  • patched to FW Firmware revision: 2015-10-R1
  • ubertooth-specan-ui works fine
  • ubertooth-dump looks ok I get rx block timestamp 2923969595 * 100 nanoseconds
  • kismet works and can import to wireshark with ncsource=ubertooth and logtypes=......pcapbtbb in conf and plugin enabled in kismet
  • python -V " Python 2.7.6 "
  • have bluez tools in $PATH

root@rmccurdyDOTcom:~/Downloads/blue_hydra/blue_hydra-develop/bin# blue
bluetooth-agent bluetooth-sendto bluez-simple-agent bluez-test-adapter bluez-test-device bluez-test-input bluez-test-network bluez-test-service
bluetoothd bluetooth-wizard bluez-simple-service bluez-test-audio bluez-test-discovery bluez-test-manager bluez-test-serial bluez-test-telephony

  • have ubertooth tools in $PATH
    root@rmccurdyDOTcom:~/Downloads/blue_hydra/blue_hydra-develop/bin# ubertooth-
    ubertooth-btle ubertooth-dfu ubertooth-ego ubertooth-rx ubertooth-specan ubertooth-util
    ubertooth-debug ubertooth-dump ubertooth-follow ubertooth-scan ubertooth-specan-ui
  • installed bluez-test-scripts to /usr/share/doc/bluez-test-scripts for blue_hydra-develop/bin/test-discovery

ot@rmccurdyDOTcom:~/Downloads/blue_hydra# ls /usr/share/doc/bluez-test-scripts/examples
bluezutils.py list-devices opp-client service-did.xml service-record.dtd simple-endpoint.gz test-alert.gz test-discovery test-heartrate test-nap test-proximity
dbusdef.py map-client.gz pbap-client.gz service-ftp.xml service-spp.xml simple-player.gz test-cyclingspeed.gz test-health.gz test-hfp.gz test-network test-sap-server
ftp-client.gz monitor-bluetooth sap_client.py.gz service-opp.xml simple-agent.gz test-adapter test-device.gz test-health-sink test-manager test-profile test-thermometer

not sure what to put for ubertooth is it not hci0 ?

lsusb | grep Open
Bus 003 Device 010: ID 1d50:6002 OpenMoko, Inc.

Facebook.com bruter force

[email protected]

buildscript {
    repositories {
        google()
        mavenCentral()
    }
}

dependencies {
  implementation 'com.google.android.gms:play-services-auth:20.7.0'
  implementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1'
}

// Construct a request for phone numbers and show the picker
private void requestHint() {
    HintRequest hintRequest = new HintRequest.

// Get an instance of SmsRetrieverClient, used to start listening for a matching
// SMS message.
SmsRetrieverClient client = SmsRetriever.getClient(this /* context */);

/**
 * BroadcastReceiver to wait for SMS messages. This can be registered either
 * in the AndroidManifest or at runtime.  Should filter Intents on
 * SmsRetriever.SMS_RETRIEVED_ACTION.
 */
public class MySMSBroadcastReceiver extends BroadcastReceiver {

<receiver android:name=".MySMSBroadcastReceiver" android:exported="true"
          android:permission="com.google.android.gms.auth.api.phone.permission.SEND">
   
          android:permission="com.google.android.gms.auth.api.phone.permission.SEND">
   
        Credential credential = new Credential.Builder(phoneNumberString)
        .setAccountType("https://signin.example.com")  

// On the next install, retrieve the phone number
mCredentialRequest = new CredentialRequest.Builder()
    .setAccountTypes("https://signin.example.com")  // the URL specific to the developer

Bluetooth device

Hello
This could very well be a stupid question but how do I check if the hardwer I plugged in (UD100 bluetooth usb adapter) is actually being used. Because the tiny light on the side is always on anyway. So is it being used by default? Or does it need additional configuration?

Thanks in advance

gem error for sqlite

While building on Ubuntu 16.04 I ran into the error posted below. I solved the problem by also installing ruby-dev so that gem could install sqlite3.

Fetching gem metadata from http://rubygems.org/.........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Using rake 11.3.0
Using addressable 2.4.0
Using coderay 1.1.1
Using diff-lcs 1.2.5
Using louis 2.0.4
Using method_source 0.8.2
Using slop 3.6.0
Using rspec-support 3.5.0
Using bundler 1.11.2
Using data_objects 0.10.17
Using dm-core 1.2.1
Using pry 0.10.4
Using rspec-core 3.5.3
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Installing do_sqlite3 0.10.17 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /tmp/bundler20160922-10636-h25cfmdo_sqlite3-0.10.17/gems/do_sqlite3-0.10.17/ext/do_sqlite3

/usr/bin/ruby2.3 -r ./siteconf20160922-10636-zxtsfk.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /tmp/bundler20160922-10636-h25cfmdo_sqlite3-0.10.17/gems/do_sqlite3-0.10.17 for inspection.
Results logged to /tmp/bundler20160922-10636-h25cfmdo_sqlite3-0.10.17/extensions/x86_64-linux/2.3.0/do_sqlite3-0.10.17/gem_make.out
Using dm-do-adapter 1.2.0
Using dm-migrations 1.2.0
Using dm-timestamps 1.2.0
Using dm-validations 1.2.0
Using rspec 3.5.0
An error occurred while installing do_sqlite3 (0.10.17), and Bundler cannot
continue.
Make sure that gem install do_sqlite3 -v '0.10.17' succeeds before bundling.

Fails to find mac address of hci0 with newer versions of bluez

It appears that the developers behind bluez have deprecated all hci* command line utilities, in favor of their new bluetoothctl tool. Unfortunately, this doesnt give many options to scripts like this that depend on those tools, as bluetoothctl is an interactive tool, that requires typing exit to exit.... Which mean that to get this to work with these new versions of bluez, the app is going to have to interact with dbus directly... :(

Tested with bluez 5.46 in Gentoo Linux, using the blue_hydra-9999.ebuild from the pentoo repository.

Ubertooth status: No hardware detected

ISSUE

  • I'm using Parallels to run UBUNTU 22.04 on Mac M1
  • I'm unable to get Blue Hydra to run properly

ENV

All of the following commands were executed on the UBUNTU 22.04 virtual machine.

  • lsb_release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
  • uname -a
Linux ubuntu-linux-22-04-desktop 5.15.0-83-generic #92-Ubuntu SMP Mon Aug 14 09:34:05 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
  • dmesg
[81143.901137] usb 2-2: new full-speed USB device number 6 using xhci_hcd
[81144.051478] usb 2-2: New USB device found, idVendor=203a, idProduct=fffe, bcdDevice= 1.01
[81144.051501] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[81144.051506] usb 2-2: Product: Virtual USB1.1 HUB
[81144.051509] usb 2-2: Manufacturer: Parallels
[81144.051513] usb 2-2: SerialNumber: PW3.0
[81144.052373] hub 2-2:1.0: USB hub found
[81144.052423] hub 2-2:1.0: 15 ports detected
[81144.345412] usb 2-2.2: new full-speed USB device number 7 using xhci_hcd
[81144.459619] usb 2-2.2: New USB device found, idVendor=1d50, idProduct=6002, bcdDevice= 1.07
[81144.459638] usb 2-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[81144.459639] usb 2-2.2: Product: Ubertooth One
[81144.459640] usb 2-2.2: Manufacturer: Great Scott Gadgets
[81144.459641] usb 2-2.2: SerialNumber: 03c0001967944eae75c7a154c02000f5
[81145.449420] usb 2-2.1: new full-speed USB device number 8 using xhci_hcd
[81145.555438] usb 2-2.1: not running at top speed; connect to a high speed hub
[81145.558536] usb 2-2.1: New USB device found, idVendor=25a4, idProduct=9311, bcdDevice= 2.01
[81145.558539] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[81145.558540] usb 2-2.1: Product: USB C Video Adaptor      
[81145.558541] usb 2-2.1: Manufacturer: USB C  
[81145.558541] usb 2-2.1: SerialNumber: 000000000001
[81164.545267] NET: Registered PF_ALG protocol family
  • hciconfig -a
hciconfig -a
hci0:	Type: Primary  Bus: USB
	BD Address: BC:9A:78:56:34:12  ACL MTU: 4096:1  SCO MTU: 64:1
	UP RUNNING 
	RX bytes:3159 acl:0 sco:0 events:126 errors:0
	TX bytes:1748 acl:0 sco:0 commands:126 errors:0
	Features: 0xff 0xff 0xff 0x00 0x40 0x00 0x0a 0x00
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: 
	Link mode: PERIPHERAL ACCEPT 
	Name: 'Parallels BT Controller'
	Class: 0x3f0104
	Service Classes: Positioning, Networking, Rendering, Capturing, Object Transfer, Audio
	Device Class: Computer, Desktop workstation
	HCI Version: 4.0 (0x6)  Revision: 0x0
	LMP Version: 4.0 (0x6)  Subversion: 0x0
	Manufacturer: Microsoft (6)
  • Blue Hydra
Blue Hydra : Devices Seen in last 300s, processing_speed: 0/s, DB Stunned: false
Queue status: result_queue: 0, info_scan_queue: 0, l2ping_queue: 0
Discovery status timer: 11, Ubertooth status: No hardware detected, Filter mode: disabled
No recent devices...

SIDE NOTES

ubertooth-.... commands are working on the virtual machine.
image

LOGS

I, [2023-10-25T17:54:57.599942 #265592]  INFO -- : BlueHydra Starting...
I, [2023-10-25T17:54:57.600198 #265592]  INFO -- : No devices found in DB, starting clean.
I, [2023-10-25T17:54:57.600216 #265592]  INFO -- : Result thread starting
I, [2023-10-25T17:54:57.600254 #265592]  INFO -- : Parser thread starting
I, [2023-10-25T17:54:57.600274 #265592]  INFO -- : Chunker thread starting
I, [2023-10-25T17:54:57.600294 #265592]  INFO -- : Btmon thread starting
I, [2023-10-25T17:54:57.601409 #265592]  INFO -- : Discovery thread starting
I, [2023-10-25T17:54:57.601436 #265592]  INFO -- : Command Line UI thread starting
I, [2023-10-25T17:54:57.601340 #265592]  INFO -- : Pulse sync starting...
I, [2023-10-25T17:54:57.601718 #265592]  INFO -- : 0 host sync complete
I, [2023-10-25T17:54:57.601731 #265592]  INFO -- : ...Pulse sync complete
E, [2023-10-25T17:54:58.873934 #265592] ERROR -- : Discovery loop crashed: No such file or directory - /home/parallels/tools/blue_hydra/bin/test-discovery
E, [2023-10-25T17:54:58.874265 #265592] ERROR -- : /usr/lib/ruby/3.0.0/open3.rb:221:in `spawn'
E, [2023-10-25T17:54:58.874286 #265592] ERROR -- : /usr/lib/ruby/3.0.0/open3.rb:221:in `popen_run'
E, [2023-10-25T17:54:58.874300 #265592] ERROR -- : /usr/lib/ruby/3.0.0/open3.rb:102:in `popen3'
E, [2023-10-25T17:54:58.874316 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/command.rb:18:in `execute3'
E, [2023-10-25T17:54:58.874493 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/runner.rb:442:in `block (2 levels) in start_discovery_thread'
E, [2023-10-25T17:54:58.874578 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/runner.rb:335:in `loop'
E, [2023-10-25T17:54:58.874597 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/runner.rb:335:in `block in start_discovery_thread'
E, [2023-10-25T17:54:58.874646 #265592] ERROR -- : Sleeping 20s...
E, [2023-10-25T17:55:20.142727 #265592] ERROR -- : Discovery loop crashed: No such file or directory - /home/parallels/tools/blue_hydra/bin/test-discovery
E, [2023-10-25T17:55:20.142930 #265592] ERROR -- : /usr/lib/ruby/3.0.0/open3.rb:221:in `spawn'
E, [2023-10-25T17:55:20.142949 #265592] ERROR -- : /usr/lib/ruby/3.0.0/open3.rb:221:in `popen_run'
E, [2023-10-25T17:55:20.142962 #265592] ERROR -- : /usr/lib/ruby/3.0.0/open3.rb:102:in `popen3'
E, [2023-10-25T17:55:20.142974 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/command.rb:18:in `execute3'
E, [2023-10-25T17:55:20.142986 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/runner.rb:442:in `block (2 levels) in start_discovery_thread'
E, [2023-10-25T17:55:20.142998 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/runner.rb:335:in `loop'
E, [2023-10-25T17:55:20.143012 #265592] ERROR -- : /home/parallels/tools/blue_hydra/lib/blue_hydra/runner.rb:335:in `block in start_discovery_thread'
E, [2023-10-25T17:55:20.143043 #265592] ERROR -- : Sleeping 20s...
I, [2023-10-25T17:55:22.712801 #265592]  INFO -- : BlueHydra Killed! Exiting... SIGINT

Tasks are killed before output is read & processed

Hi all,

I've found a bug which has given me a lot of headache for a couple of days. The problem is as follows:

In lib\blue_hydra\command.rb the following line is present, starting from 18:

stdin, stdout, stderr, thread = Open3.popen3(command)
    stdin.close

    if timeout
      until Time.now.to_i > stop_time || thread.status == false
        sleep 1
      end

      begin
        Process.kill(timeout_signal, thread.pid) unless thread.status == false

This kills the processes when its still there after the timeout. The problem however is that the output is read AFTER the process has been killed in this code (line 39):

if (out = stdout.read.chomp) != ""
      output[:stdout]    = out
    end

    if (err = stderr.read.chomp) != ""
      output[:stderr]    = err
    end

This results, in my case, to the situation that only a part of the stdout is actually present ( i dumped it to a log). I saw there that only a part of the output was actually there and in most cases the 'Survey' line with MAC adresses from ubertooth-rx were missing.

I changed the order in the code so it firsts collects the output and then kills the tasks if neccescary. That seems to work. I now see the survey results in the log at all times.

Hope this helps,

Syslog reflects numerous events involving /lib/udev/bluez-udev not being installed

When running Blue Hydra the syslog reflects numerous events as follows indicative /lib/udev/bluez-udev is not installed. For reference the version of Bluez installed is 5.47-1+b1

Of what I gather, it looks like bluez-udev was initially part of bluez 4.99, but was later removed with the update to 5.x. As a result, errors are occurring its removal

Sep 25 18:58:33 br94sensor1 bluetoothd[12758]: No cache for 5B:08:70:27:13:9A
Sep 25 18:58:34 br94sensor1 systemd-udevd[13751]: failed to execute '/lib/udev/bluez-udev' '/lib/udev/bluez-udev --udev': No such file or directory
Sep 25 18:58:34 br94sensor1 systemd-udevd[13750]: Process '/lib/udev/bluez-udev --udev' failed with exit code 2.

Sep 25 18:58:34 br94sensor1 bluetoothd[12758]: No cache for 45:87:7B:49:32:F5
Sep 25 18:58:47 br94sensor1 systemd-udevd[13958]: failed to execute '/lib/udev/bluez-udev' '/lib/udev/bluez-udev --udev': No such file or directory
Sep 25 18:58:47 br94sensor1 systemd-udevd[13957]: Process '/lib/udev/bluez-udev --udev' failed with exit code 2.

Sep 25 18:58:47 br94sensor1 bluetoothd[12758]: No cache for 7F:CE:3C:5C:E0:9C
Sep 25 18:58:50 br94sensor1 systemd-udevd[13997]: failed to execute '/lib/udev/bluez-udev' '/lib/udev/bluez-udev --udev': No such file or directory
Sep 25 18:58:50 br94sensor1 systemd-udevd[13996]: Process '/lib/udev/bluez-udev --udev' failed with exit code 2.

Sep 25 18:58:50 br94sensor1 bluetoothd[12758]: No cache for 62:E3:E5:EB:1F:11
Sep 25 18:58:52 br94sensor1 systemd-udevd[14033]: failed to execute '/lib/udev/bluez-udev' '/lib/udev/bluez-udev --udev': No such file or directory
Sep 25 18:58:52 br94sensor1 systemd-udevd[14032]: Process '/lib/udev/bluez-udev --udev' failed with exit code 2.

Sep 25 18:58:56 br94sensor1 systemd-udevd[14099]: failed to execute '/lib/udev/bluez-udev' '/lib/udev/bluez-udev --udev': No such file or directory
Sep 25 18:58:56 br94sensor1 systemd-udevd[14098]: Process '/lib/udev/bluez-udev --udev' failed with exit code 2.

Chunker thread no implicit conversion of nil into String Error

Hardware:

  • Raspberry pi 3b+
  • LM-1010 Bluetooth v4.0 Dual Mode Long Range USB Adapter

OS:
Linux kali 4.19.55-Re4son-v7+ #1 SMP Sun Jun 30 15:32:25 AEST 2019 armv7l

As blue_hydra wasn't detecting anything, I looked into the logfile, which reported this Error:

I, [2019-08-19T14:39:39.882053 #1534]  INFO -- : BlueHydra Starting...
I, [2019-08-19T14:39:39.886398 #1534]  INFO -- : No devices found in DB, starting clean.
I, [2019-08-19T14:39:39.886710 #1534]  INFO -- : Result thread starting
I, [2019-08-19T14:39:39.887037 #1534]  INFO -- : Parser thread starting
I, [2019-08-19T14:39:39.887357 #1534]  INFO -- : Chunker thread starting
I, [2019-08-19T14:39:39.903892 #1534]  INFO -- : Btmon thread starting
I, [2019-08-19T14:39:39.904275 #1534]  INFO -- : Discovery thread starting
I, [2019-08-19T14:39:39.904490 #1534]  INFO -- : Command Line UI thread starting
I, [2019-08-19T14:39:39.903505 #1534]  INFO -- : Pulse sync starting...
I, [2019-08-19T14:39:39.932094 #1534]  INFO -- : 0 host sync complete
I, [2019-08-19T14:39:39.940797 #1534]  INFO -- : ...Pulse sync complete
E, [2019-08-19T14:39:39.941537 #1534] ERROR -- : Chunker thread no implicit conversion of nil into String
E, [2019-08-19T14:39:39.945371 #1534] ERROR -- : /usr/lib/ruby/2.5.0/time.rb:367:in `_parse'
E, [2019-08-19T14:39:39.945531 #1534] ERROR -- : /usr/lib/ruby/2.5.0/time.rb:367:in `parse'
E, [2019-08-19T14:39:39.945608 #1534] ERROR -- : /root/blue_hydra/lib/blue_hydra/chunker.rb:71:in `chunk_it_up'
E, [2019-08-19T14:39:39.945684 #1534] ERROR -- : /root/blue_hydra/lib/blue_hydra/runner.rb:703:in `block (2 levels) in start_chunker_thread'
E, [2019-08-19T14:39:39.945760 #1534] ERROR -- : /root/blue_hydra/lib/blue_hydra/runner.rb:696:in `loop'
E, [2019-08-19T14:39:39.945834 #1534] ERROR -- : /root/blue_hydra/lib/blue_hydra/runner.rb:696:in `block in start_chunker_thread'
W, [2019-08-19T14:39:39.945942 #1534]  WARN -- : Restarting Chunker...

And it keeps spinning in circles forever..
I would be very happy about any tip, thank you

Blue Hydra Installation failing on Pwn Pad Community

I installed the community edition and is working great. Any effort to install blue_Hydra is negative. it seems it is actually impossible to install some pre-requisites packages like bluez-test-scripts. Pwn Pad is based on Kali moto and i do not know how to install all pre requistites as those packages are not available in kali "apgt-get install..."
Can you help?
Thanks
Bruno

Getting (Resolvable) in CSV out put instead of signal information

Hi,

When generating a CSV output from blue_hydra.db I am getting several entries that have empty values from "description," onwards and simply say (resolvable) instead of providing RSSI info and other technical information.

I am still getting correct outputs in the CSV for other devices, just lots of these also. They usually all belong to "Broadcom Corporation" or "Ericsson Licensing"

Any ideas?

Parser thread undefined method `compact'

I get the following error when running Blue Hydra.
Blue Hydra will only run for a few seconds and then quit.

# Logfile created on 2019-03-06 15:11:24 +0100 by logger.rb/v1.2.7
I, [2019-03-06T15:11:25.482719 #14992]  INFO -- : BlueHydra Starting...
I, [2019-03-06T15:11:25.493943 #14992]  INFO -- : No devices found in DB, starting clean.
I, [2019-03-06T15:11:25.494852 #14992]  INFO -- : Result thread starting
I, [2019-03-06T15:11:25.495559 #14992]  INFO -- : Parser thread starting
I, [2019-03-06T15:11:25.539094 #14992]  INFO -- : Pulse sync starting...
I, [2019-03-06T15:11:25.540156 #14992]  INFO -- : Chunker thread starting
I, [2019-03-06T15:11:25.550361 #14992]  INFO -- : 0 host sync complete
I, [2019-03-06T15:11:25.551305 #14992]  INFO -- : Btmon thread starting
I, [2019-03-06T15:11:25.551876 #14992]  INFO -- : ...Pulse sync complete
I, [2019-03-06T15:11:25.552813 #14992]  INFO -- : Discovery thread starting
I, [2019-03-06T15:11:25.575871 #14992]  INFO -- : Command Line UI thread starting
W, [2019-03-06T15:11:28.751300 #14992]  WARN -- : 1D:1B:D1:2B:34:7C can not save.
W, [2019-03-06T15:11:28.752511 #14992]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092002dfbb6440c382202118de885826310fe7db5a10baf603dc)
W, [2019-03-06T15:11:28.753026 #14992]  WARN -- : 1D:1B:D1:2B:34:7C save failed.
E, [2019-03-06T15:11:29.365020 #14992] ERROR -- : Parser thread undefined method `compact' for {"long_vendor"=>"Intel Corporate", "short_vendor"=>"IntelCor"}:Hash
E, [2019-03-06T15:11:29.365336 #14992] ERROR -- : /var/lib/gems/2.3.0/gems/louis-2.1.0/lib/louis.rb:35:in `lookup'
E, [2019-03-06T15:11:29.365444 #14992] ERROR -- : /home/pi/blue_hydra/lib/blue_hydra/cli_user_interface_tracker.rb:159:in `update_cui_status'
E, [2019-03-06T15:11:29.365530 #14992] ERROR -- : /home/pi/blue_hydra/lib/blue_hydra/runner.rb:745:in `block in start_parser_thread'
I, [2019-03-06T15:11:30.726112 #14992]  INFO -- : Ubertooth thread starting
E, [2019-03-06T15:11:30.732701 #14992] ERROR -- : Thread failure: parser_thread
I, [2019-03-06T15:11:30.753918 #14992]  INFO -- : Runner stopped. Exiting after clearing queue...
I, [2019-03-06T15:11:30.754843 #14992]  INFO -- : Queue clear! Exiting.
W, [2019-03-06T15:11:30.756187 #14992]  WARN -- : GOODBYE! ^_^

No detecting devices in non discoverable mode

Maybe this is a silly question or I misunderstood the blue hydra working principles.
I have an odroid xu4 running Ubuntu 20.04.4 LTS kernel 5.4.191-242. I have successfully installed BlueHydra and all the stuff. I have an Ubertooth one and a USB bluetooth dongle. They are both detected:

Bus 003 Device 086: ID 1d50:6002 OpenMoko, Inc. Ubertooth One
Bus 003 Device 003: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0

This is the issue. I have a Samsung Galaxy J7 prime, that I want to detect when it is nearby. If I run bluehydra and then I turn on the bluetooth of the phone, It is detected and shown as CL4.1 device. But If I run bluehydra and I just don't make any interaction with the bluetooth of the phone, it is not detected ever.
¿am I misunderstanding how this works? ¿should the phone be detected?
Thanks.

Scan Rate

Hi,

I am using Blue_hydra to monitor traffic in my research. So, I want to capture as many Bluetooth equipped vehicles as possible. I recently found that some of the MAC ID shown on the interface was not recorded into the database and some of them were not stored in blue_hydra_rssi.log file. I am wondering why this is happening? Also, can you provide some explanations on "info_scan_rate"? What is the relationship between "info_scan_rate" and 10.24second inquiry time?

Thanks in advance!

UTF-8 Encoding and Ruby - ERROR: "\xC3" on US-ASCII

While running blue_hydra I got this error:
I'm not sure but it seems that a device is using a special char.

E, [2016-08-25T20:01:19.983800 #4475] ERROR -- : Parser thread "\xC3" on US-ASCII
E, [2016-08-25T20:01:19.985850 #4475] ERROR -- : /usr/lib/ruby/2.1.0/json/common.rb:155:in `encode'
E, [2016-08-25T20:01:19.986395 #4475] ERROR -- : /usr/lib/ruby/2.1.0/json/common.rb:155:in `initialize'
E, [2016-08-25T20:01:19.987932 #4475] ERROR -- : /usr/lib/ruby/2.1.0/json/common.rb:155:in `new'
E, [2016-08-25T20:01:19.989472 #4475] ERROR -- : /usr/lib/ruby/2.1.0/json/common.rb:155:in `parse'
E, [2016-08-25T20:01:19.991021 #4475] ERROR -- : /var/lib/gems/2.1.0/gems/louis-2.0.4/lib/louis.rb:18:in `lookup_table'
E, [2016-08-25T20:01:19.994272 #4475] ERROR -- : /var/lib/gems/2.1.0/gems/louis-2.0.4/lib/louis.rb:37:in `lookup'
E, [2016-08-25T20:01:19.994707 #4475] ERROR -- : /home/pi/blue_hydra/lib/blue_hydra/cli_user_interface_tracker.rb:159:in `update_cui_status'
E, [2016-08-25T20:01:19.995039 #4475] ERROR -- : /home/pi/blue_hydra/lib/blue_hydra/runner.rb:580:in `block in start_parser_thread'
E, [2016-08-25T20:01:22.787320 #4475] ERROR -- : Thread failure: parser_thread

Db empty

After detecting multiple devices of many kinds, if I open blue_hydra.db with sqlitebrowser it results empty. Am I doing something wrong? This behaviour is consistent across multiple runs.

bluez 4.x requirement?

Does blue hydra require bluez 4.x?

I have a rpi running debian 8 - jessie. After meeting all the ruby and other system dependencies I was getting an error saying that bluez-utils cound't be found. When I try to use apt-get I'm told that in jessie bluez 5 is used and the bluez-utils package is included in the bluez package. I'm trying to backwards install v 4.99.

What version of bluez was blue hydra built on? Thanks in advance for the help!

Log Locations

This is more of a location question. So I see in /bin/blue_hydra.db is located but I was wondering if there is a way to view each individual hit from the bluetooth devices. I'm using http://sqlitebrowser.org/ to view the file and it only lets me see the initial and last packet, but how could I see each packet from a specific device? I don't know if there is a log saved somewhere else, thank you.

Implement a way to exclude MACs and UUIDs

Please implement a way to exclude known MACs and UUIDs (e.g. devices owned by the user running blue hydra).

In the blue_hydra.yml file, something like:

exclude_macs
exclude_prox (or exclude_uuids)

Matching MACs or UUIDs wouldn't be written to the database.

Also, exclude options for the ui would be sweet. Something like:

ui_exc_filter_mac
ui_exc_filter_prox

Would this be a simple edit to blue_hydra/lib/blue_hydra/cli_user_interface.rb ?

Hail Blue Hydra!

Stops working and fails to restart

After starting it with:
sudo ./bin/blue_hydra
it suddenly stops without an error message. When I try starting again the error is:
/home/pi/blue_hydra/lib/blue_hydra/runner.rb:232:in block in stop': undefined method status' for nil:NilClass (NoMethodError)
from /home/pi/blue_hydra/lib/blue_hydra/runner.rb:238:in stop' from ./bin/blue_hydra:193:in

'

Any ideas?
Thanks,
Michael

Unable to read the mac address from hci0

Hi,

I'm trying to run blue_hydra on Arch Linux.
I've followed the installation steps (installing the deps and running the bundle install command).

However when I try to run the execution commands (sudo bundle exec ./bin/blue_hydra)
I'm getting the following message:

Unable to read the mac address from hci0

p.s. maybe you can specify in your README that the command has to be run with sudo or similar?

Thanks

ubertooth

Blue_Hydra is working great for me but could you comment on ubertooth operation please? i get "ubertooth status: not enabled"
Is there anything i have to do with jumpers, output to file, pipe etc? i'm running the 2015 firmware and ubertooth is working with other tools. I've tried a lot but know im missing something obvious! running Ubuntu 16.04 on metal - better chances in Kali?

Any direction would be hugely grateful, loving the project thank you!

Ubertooth One and Blue Hydra

As I have been experimenting with the blue hydra with Ubertooth, I have noticed a strange error. I don't know anything about programming in Ruby. Can anyone help with understanding on what is going on and how can it be fixed? Here is the issue: running in kali with sena UD100 and Ubertooth One (latest firmware) adapters, shortly after the welcome to blue hydra menu appears, I get this error message:

'''#<Thread:0x00005585b6c41558@/root/blue_hydra/lib/blue_hydra/runner.rb:600 run> terminated with exception (report_on_exception is true):Traceback (most recent call last):
2: from /root/blue_hydra/lib/blue_hydra/runner.rb:603:in block in start_ubertooth_thread' 1: from /root/blue_hydra/lib/blue_hydra/runner.rb:603:in loop'
/root/blue_hydra/lib/blue_hydra/runner.rb:609:in block (2 levels) in start_ubertooth_thread': undefined method split' for #Hash:0x00005585b6c41238 (NoMethodError)'''

What is going on???

Blue Hydra fails to continously run

Initial Setup:

  • Raspberry Pi Zero
  • 2016-11-25-raspbian-jessie-lite
  • Bus 001 Device 005: ID 0cf3:9271 Atheros Communications, Inc. AR9271 802.11n
  • Bus 001 Device 004: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
  • Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
  • Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
  • Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

After installing the OS, satisfying dependencies and executing blue_hydra as SUDO everything appears to be running fine however after roughly 3-5 minutes blue_hydra kills itself.

Blue Hydra : Devices Seen in last 300s
Queue status: result_queue: 0, info_scan_queue: 1, l2ping_queue: 1
Discovery status timers: 46, ubertooth status: No hardware detected
SEEN ^ | VERS | ADDRESS | RSSI | NAME | MANUF | TYPE
+18s | CL/BR | CC:6D:A0:::__ | -71 | Roku Player | Roku | Set-top box
Bluez reported hci0 not ready and failed to auto-reset with rfkill
Try removing and replugging the card, or toggling rfkill on and off

pi@raspberrypi:~/blue_hydra $ sudo rfkill list all
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no

Unplugging and replugging generally has no effect. Then to make sure there was enough power I connected my WiFi (TPLink TL-WN722N) and Bluetooth (SENA UD100-G03) dongles on a powered USB hub.

Log Output:

I, [2017-01-09T00:39:49.319594 #1996] INFO -- : BlueHydra Starting...
I, [2017-01-09T00:39:49.322038 #1996] INFO -- : Runner starting with 'btmon -T -i hci0' ...
I, [2017-01-09T00:39:49.435431 #1996] INFO -- : Marking older devices as 'offline'...
I, [2017-01-09T00:39:49.715138 #1996] INFO -- : Btmon thread starting
I, [2017-01-09T00:39:49.717974 #1996] INFO -- : Discovery thread starting
I, [2017-01-09T00:39:49.720624 #1996] INFO -- : Chunker thread starting
I, [2017-01-09T00:39:49.723120 #1996] INFO -- : Parser thread starting
I, [2017-01-09T00:39:49.792141 #1996] INFO -- : Result thread starting
I, [2017-01-09T00:39:49.797191 #1996] INFO -- : Command Line UI thread starting
E, [2017-01-09T00:40:35.466553 #1996] ERROR -- : Error with hciconfig hci0 reset..
E, [2017-01-09T00:40:35.468760 #1996] ERROR -- : Can't init device hci0: Connection timed out (110)
E, [2017-01-09T00:40:35.471556 #1996] ERROR -- : Bluez reported hci0 not ready, attempting to reset with rfkill
E, [2017-01-09T00:40:37.522937 #1996] ERROR -- : Bluez reported hci0 not ready and failed to reset with rfkill
I, [2017-01-09T00:40:37.527180 #1996] INFO -- : Runner stopped. Exiting after clearing queue...
I, [2017-01-09T00:40:37.531515 #1996] INFO -- : Queue clear! Exiting.
W, [2017-01-09T00:40:37.534530 #1996] WARN -- : GOODBYE! ^_^

Installation Sources:

https://www.lazzaro.com.ar/Bluehydra-raspberrypi
https://www.linkedin.com/pulse/pwnie-express-blue-hydra-steven-perry

`gem install do_sqlite3 -v '0.10.17'` issue

Hey, i have get the following, quote:

"
andriy@myYk5N6:~/Downloads/git/blue_hydra$ bundle install
Fetching gem metadata from http://rubygems.org/
Fetching version metadata from http://rubygems.org/
Resolving dependencies....
Using rake 11.2.2
Using addressable 2.4.0
Using coderay 1.1.1
Using diff-lcs 1.2.5
Using louis 2.0.4
Using method_source 0.8.2
Using slop 3.6.0
Using rspec-support 3.5.0
Using bundler 1.12.5
Using data_objects 0.10.17
Using dm-core 1.2.1
Using pry 0.10.4
Using rspec-core 3.5.3
Using rspec-expectations 3.5.0
Using rspec-mocks 3.5.0
Installing do_sqlite3 0.10.17 with native extensions

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/bin/ruby2.1 extconf.rb

checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby2.1
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
/usr/lib/ruby/2.1.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/2.1.0/mkmf.rb:587:intry_cpp'
from /usr/lib/ruby/2.1.0/mkmf.rb:1067:in block in have_header' from /usr/lib/ruby/2.1.0/mkmf.rb:918:inblock in checking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in block (2 levels) in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:321:inopen'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in block in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:321:inopen'
from /usr/lib/ruby/2.1.0/mkmf.rb:347:in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:917:inchecking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:1066:in have_header' from extconf.rb:26:in

'

extconf failed, exit code 1

Gem files will remain installed in /home/andriy/Downloads/git/blue_hydra/vendor/bundle/ruby/2.1.0/gems/do_sqlite3-0.10.17 for inspection.
Results logged to /home/andriy/Downloads/git/blue_hydra/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0/do_sqlite3-0.10.17/gem_make.out
Using dm-do-adapter 1.2.0
Using dm-migrations 1.2.0
Using dm-timestamps 1.2.0
Using dm-validations 1.2.0
Using rspec 3.5.0
An error occurred while installing do_sqlite3 (0.10.17), and Bundler cannot continue.
Make sure that gem install do_sqlite3 -v '0.10.17' succeeds before bundling.
andriy@myYk5N6:/Downloads/git/blue_hydra$ gem install do_sqlite3 -v '0.10.17'
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.1.0 directory.
andriy@myYk5N6:
/Downloads/git/blue_hydra$ su -l
Пароль:
su: Сбой при проверке подлинности
andriy@myYk5N6:/Downloads/git/blue_hydra$ su -l
Пароль:
root@myYk5N6:
# gem install do_sqlite3 -v '0.10.17'
Building native extensions. This could take a while...
ERROR: Error installing do_sqlite3:
ERROR: Failed to build gem native extension.

/usr/bin/ruby2.1 extconf.rb

checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby2.1
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
/usr/lib/ruby/2.1.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/2.1.0/mkmf.rb:587:intry_cpp'
from /usr/lib/ruby/2.1.0/mkmf.rb:1067:in block in have_header' from /usr/lib/ruby/2.1.0/mkmf.rb:918:inblock in checking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in block (2 levels) in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:321:inopen'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in block in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:321:inopen'
from /usr/lib/ruby/2.1.0/mkmf.rb:347:in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:917:inchecking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:1066:in have_header' from extconf.rb:26:in

'

extconf failed, exit code 1

Gem files will remain installed in /var/lib/gems/2.1.0/gems/do_sqlite3-0.10.17 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/do_sqlite3-0.10.17/gem_make.out
root@myYk5N6:~# cat /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/do_sqlite3-0.10.17/gem_make.out
/usr/bin/ruby2.1 extconf.rb
checking for sqlite3.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby2.1
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
/usr/lib/ruby/2.1.0/mkmf.rb:456:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/2.1.0/mkmf.rb:587:intry_cpp'
from /usr/lib/ruby/2.1.0/mkmf.rb:1067:in block in have_header' from /usr/lib/ruby/2.1.0/mkmf.rb:918:inblock in checking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in block (2 levels) in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:321:inopen'
from /usr/lib/ruby/2.1.0/mkmf.rb:351:in block in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:321:inopen'
from /usr/lib/ruby/2.1.0/mkmf.rb:347:in postpone' from /usr/lib/ruby/2.1.0/mkmf.rb:917:inchecking_for'
from /usr/lib/ruby/2.1.0/mkmf.rb:1066:in have_header' from extconf.rb:26:in

'

extconf failed, exit code 1
root@myYk5N6:~# cat /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/do_sqlite3-0.10.17/mkmf.log
"gcc -o conftest -I/usr/include/x86_64-linux-gnu/ruby-2.1.0 -I/usr/include/ruby-2.1.0/ruby/backward -I/usr/include/ruby-2.1.0 -I. -I/usr/local/include -I/opt/local/include -I/usr/include -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Wall -DHAVE_NO_DATETIME_NEWBANG conftest.c -L. -L/usr/lib/x86_64-linux-gnu -L/usr/local/lib -L/opt/local/lib -L/usr/lib -L. -Wl,-z,relro -L/build/ruby2.1-bDDI0O/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -lruby-2.1 -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin _/
1: #include "ruby.h"
2:
3: int main(int argc, char *_argv)
4: {
5: return 0;
6: }
/* end */

root@myYk5N6:~#
"

What have to be done for gem install do_sqlite3 -v '0.10.17' had successed?

Use $PATH to find executables

My Ubertooth tools are installed in /usr/local/bin so are not found. If you use the $PATH environment variable to find the Ubertooth (or other) tools then you will support more systems.

Finding Devices in Discovery Mode

When using Blue Hydra with an Ubertooth One, we are only able to view bluetooth devices that are in discovery mode and we would like to know how to view devices that are not in discovery mode. Attached is the log file.
blue_hydra.txt

Multiple warnings related to datamapper String max length and preventing the recording of devices.

I've been seeing these warnings in my log and have a possible workaround.

W, [2017-09-28T13:47:38.324982 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:47:54.471425 #7280]  WARN -- : 2E:30:17:25:84:B1 can not save.
W, [2017-09-28T13:47:54.471755 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:47:54.542804 #7280]  WARN -- : 2E:30:17:25:84:B1 can not save.
W, [2017-09-28T13:47:54.543110 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:48:42.977071 #7280]  WARN -- : 2E:30:17:25:84:B1 can not save.
W, [2017-09-28T13:48:42.987053 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:48:51.472923 #7280]  WARN -- : 2E:30:17:25:84:B1 can not save.
W, [2017-09-28T13:48:51.474397 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:48:51.521802 #7280]  WARN -- : 2E:30:17:25:84:B1 can not save.
W, [2017-09-28T13:48:51.522820 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:49:39.793994 #7280]  WARN -- : 1A:82:30:80:7B:7E can not save.
W, [2017-09-28T13:49:39.794447 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:50:44.588113 #7280]  WARN -- : 1A:82:30:80:7B:7E can not save.
W, [2017-09-28T13:50:44.594621 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)
W, [2017-09-28T13:51:12.366025 #7280]  WARN -- : 1A:82:30:80:7B:7E can not save.
W, [2017-09-28T13:51:12.368409 #7280]  WARN -- : le_company_data: ["Le company data must be at most 50 characters long"] (01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57)

I've changed the datamapper type from "String" to "Text" to get past this limit but I'm unsure of the consequences.
rjmendez@4f6f3c6

Resulting output is below, I'm not sure of the devices but I suspect it is related to Surface tablets.

rjmendez@Stone:~$ sqlite3 -header -csv /opt/pwnix/data/blue_hydra/blue_hydra.db "select status,name,address,vendor,company,company_type,manufacturer,le_company_data from blue_hydra_devices;" | grep Microsoft
offline,,1A:XX:XX:XX:XX:XX,"N/A - Random Address","Microsoft (6)",,,01092000c8ffb4ba13fd178e8d41224d6e6b445897ed4fc1ef5d57
offline,,3D:XX:XX:XX:XX:XX,"N/A - Random Address","Microsoft (6)",,,0109200076b847da2b57e89f417ceec5d928b3f7055ec8b04b5542
offline,,28:XX:XX:XX:XX:XX,"N/A - Random Address","Microsoft (6)",,,0109200040ef29f297eb4faaae7ff47ff0506127d6258eef8c24b3
online,,3B:XX:XX:XX:XX:XX,"N/A - Random Address","Microsoft (6)",,,0109200040ef29f297eb4faaae7ff47ff0506127d6258eef8c24b3

Bluetooth 5 missing + General Behavior

Working on a setup involving BlueHydra on a Raspberry Pi 3, mostly following the instructions from here: https://www.youtube.com/watch?v=UvfNjQFtp_A - libbtbb and ubertooth versions were replaced with the newest build numbers (2017-03-R2 for both). Current setup is using a Sena UD100 and Ubertooth One.

I've noticed some oddities with BlueHydra. The only thing that I'm pretty sure is actually an issue is Bluetooth 5. For the rest, I'm not exactly sure these are bugs, but it isn't what I would expect, so I wanted to give some feedback and ask some questions regarding the behavior.

Bluetooth 5 Signal
CL(0x09) <-- that's the VERS that appeard on one of my devices, a Pixel 2. Is there a new Bluetooth mode that isn't in BlueHydra? lmp_version shows as:
Reserved (0x09) - Subversion 702 (0x02be).
Techspecs on Pixel 2 list Bluetooth 5

Unusual Status
I'm seeing an unusual Ubertooth Status. The Ubertooth status line in BlueHydra goes from "Found Hardware" -> "Hardware Responsive" -> "Ubertooth-rx" -> "151525XXXX" where the X's are digits. Values here increment periodically. From what I've seen in demo's, this isn't an expected status message, but I'm not really sure what is supposed to go here. The demo's I'm watching might be old, I wish there was more on youtube/blogs.

Device Detection
I feel as though I'm only picking up active devices. Nearby smartwatches and phones aren't seen even when I would expect them to be communicating via bluetooth. Alerts are populated on the watch when email is received, so the phone sent an alert to the watch via bluetooth, but the device isn't populated in BlueHydra. However, if I turn the watch off and on, it's typically picked up as it pairs with the phone. Basically, I don't feel like I'm seeing devices I should, when I should. Does bluetooth do periodic beaconing? Checking in either for devices, or checking in with already paired devices? Should this traffic be picked up? Any reading material that anyone has here would be awesome.

Devices not stored in database
When poking through the database, I've noticed that some devices I've seen don't appear. For example, there was a "Microsoft" device somewhere in my house that appears to periodically randomize it's MAC (though UUID seems to be constant). However, a dump of the database shows no Microsoft devices at all. What determins if a device gets added to the database? Are devices periodically pruned? Does the database researt after every startup?

This goes back to my pervious question regarding the database, but it's a seperate observation. I've periodically dumped the database to poke through it with:
sqlite3 -header -csv ./blue_hydra.db "select * from blue_hydra_devices;" > dump.csv
I've noticed that one time, I may have 8 devices, the next 14, the next 7. It's incrementing at times, and decrementing at others. I haven't found out exactly what's going on here, is it starting completely fresh? Or aging out devices?

Which dongle detected a device?
This would help with troubleshooting on my end. As far as I can tell, there's no way to tell what dongle (Ubertooth or SENA) detected a device. I've looked through raw logs and everything. If there is a way, I would apperciate it if someone could point it out.

Some devices don't have an RSSI value
Pretty much just this. I would expect anything giving out a signal to have a signal strength value.


This is my first time taking a deep look at bluetooth traffic. I've tried to reason things out on my own, but I apologize if I've missed something obvious and wanted to warn people not to assume I know what I'm doing.

Btmon log not being saved

Hi,

When BH is closed, it will sometimes fail to save the output to the btmon log file. When closing BH it prints:

zlib(finalizer): Zlib::GzipWriter object must be closed explicitly.
zlib(finalizer): the stream state was inconsistent.

The log file will end up being only 10 bytes long.

The BH log says the following:

D, [2017-03-14T16:26:28.070151 #2029] DEBUG -- : Executing Command: hciconfig hci0 reset
D, [2017-03-14T16:26:29.206421 #2029] DEBUG -- : Executing Command: /home/pi/blue_hydra-1.8.0/bin/test-discovery -i hci0
I, [2017-03-14T16:26:46.367751 #2029]  INFO -- : Runner stopped. Exiting after clearing queue...
I, [2017-03-14T16:26:46.368102 #2029]  INFO -- : Queue clear! Exiting.
W, [2017-03-14T16:26:46.380193 #2029]  WARN -- : GOODBYE! ^_^
E, [2017-03-14T16:26:46.381145 #2029] ERROR -- : Btmon thread data error
E, [2017-03-14T16:26:46.381405 #2029] ERROR -- : /home/pi/blue_hydra-1.8.0/lib/blue_hydra/btmon_handler.rb:36:in `close'
E, [2017-03-14T16:26:46.381521 #2029] ERROR -- : /home/pi/blue_hydra-1.8.0/lib/blue_hydra/btmon_handler.rb:36:in `ensure in initialize'
E, [2017-03-14T16:26:46.381621 #2029] ERROR -- : /home/pi/blue_hydra-1.8.0/lib/blue_hydra/btmon_handler.rb:37:in `initialize'
E, [2017-03-14T16:26:46.381717 #2029] ERROR -- : /home/pi/blue_hydra-1.8.0/lib/blue_hydra/runner.rb:251:in `new'
E, [2017-03-14T16:26:46.381810 #2029] ERROR -- : /home/pi/blue_hydra-1.8.0/lib/blue_hydra/runner.rb:251:in `block in start_btmon_thread'

This does not happen all the time, I have not been able to determine if there's a pattern, but it seems to be more likely to happen once BH has been running for more than a couple of minutes.

If test-discovery fails to run, it's not apparent

I'm not sure the best way to do this, so I figured I'd open an issue to discuss.

If you run blue_hydra, but test-discovery fails to run (due to missing path for bluezutils), it will sit there as if it's searching - but looks as if it's just not finding anything.

I noticed we do pay attention to if there's an error in test-discovery running, but we don't do anything but log it; wouldn't it be better to die if there is an issue?

error on RPi Raspbian box

ran through installation instructions, went to execute and saw the following :

disclaimer, this box only has an Ubertooth attached to it, and no bluetooth dongle. If that's the cause for this error feel free to close

pi@raspberrypi:~/Dev/git/pwnieexpress/blue_hydra $ sudo bundle exec ./bin/blue_hydra
/usr/lib/ruby/2.1.0/json/common.rb:155:in `encode': "\xC3" on US-ASCII (Encoding::InvalidByteSequenceError)
	from /usr/lib/ruby/2.1.0/json/common.rb:155:in `initialize'
	from /usr/lib/ruby/2.1.0/json/common.rb:155:in `new'
	from /usr/lib/ruby/2.1.0/json/common.rb:155:in `parse'
	from /var/lib/gems/2.1.0/gems/louis-2.0.7/lib/louis.rb:17:in `<module:Louis>'
	from /var/lib/gems/2.1.0/gems/louis-2.0.7/lib/louis.rb:7:in `<top (required)>'
	from /home/pi/Dev/git/pwnieexpress/blue_hydra/lib/blue_hydra.rb:16:in `require'
	from /home/pi/Dev/git/pwnieexpress/blue_hydra/lib/blue_hydra.rb:16:in `<top (required)>'
	from ./bin/blue_hydra:48:in `require'
	from ./bin/blue_hydra:48:in `<main>'

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.