Results 1 to 2 of 2

Thread: Humble submission: Bluelog

  1. #1
    Just burned his ISO
    Join Date
    Jun 2010
    Location
    USA
    Posts
    12

    Default Bluelog: Fast Bluetooth scanner with web frontend

    I would like to humbly submit my newest project for review, and ideally inclusion: Bluelog. I saw no rules about submitting your own tools and the rules said to give as much info as possible, so here we go...


    Overview
    Bluelog is a Bluetooth site survey tool, designed to tell you how many discoverable devices there are in an area as quickly as possible. Bluelog differs from most Bluetooth scanners in that it puts speed of reporting over anything else (I.E. doesn't spend time trying to pull detailed data from a device) and doesn't require any user intervention to function. As the name implies, it's primary function is to log discovered devices to file rather than being used interactively. The idea is that Bluelog could run on a system unattended for long periods of time to collect data.

    Scanners like btscanner, on the other hand, require the user to enter options in the UI to control scanning and log devices to file. With Bluelog, all options are set on the command line, and results are written to the log file live, rather than having to periodically write a summary log.

    There aren't a whole lot of actively maintained Bluetooth tools for Linux right now, and the existing scanners are starting to show their age. I think Bluelog adds something new to the table and still remains simple enough that it can be easily scripted and doesn't have much of a learning curve.

    Simple Scanning
    A simple scan would look something like this (verbose, timestamps, and class info enabled, logging to ./example.log):

    Code:
    # bluelog -vtc -o ./example.log
    Bluelog (v0.9.6) by MS3FGX
    ---------------------------
    Autodetecting device...OK
    Allocating result cache...OK
    Opening output file: devices.log...OK
    Scan started at [06/20/10 16:58:13] on 00:16:41:B4:9E:1C.
    Hit Ctrl+C to end scan.
    [06/20/10 16:58:27] 00:1C:62:9E:5D:B8,LG CU575a,Cell Phone,(Net Capture Obex Phone)
    [06/20/10 16:58:27] 00:21:FE:7C:B5:33,Nokia 2600,Cell Phone,(Obex Phone)
    [06/20/10 16:58:30] 00:1B:AF:DB:CB:9E,Nokia 6555b,Cell Phone,(Net Capture Obex Phone)
    ^C
    Closing files and freeing memory...OK
    Done!
    # cat ./example.log
    [06/20/10 16:58:13] Scan started on 00:16:41:B4:9E:1C
    [06/20/10 16:58:27] 00:1C:62:9E:5D:B8,LG CU575a,Cell Phone,(Net Capture Obex Phone)
    [06/20/10 16:58:27] 00:21:FE:7C:B5:33,Nokia 2600,Cell Phone,(Obex Phone)
    [06/20/10 16:58:30] 00:1B:AF:DB:CB:9E,Nokia 6555b,Cell Phone,(Net Capture Obex Phone)
    [06/20/10 16:59:14] Scan ended.
    Bluelog Live
    In addition to basic scanning, I have also added a unique feature called "Bluelog Live", which puts results in a constantly updating web page which you can host out with your HTTP daemon of choice. This is inspired by the infamous "Wall of Sheep" from DEFCON, and is intended to be used on a projector or large screen for everyone to see. The interface is fully customizable through CSS, and in addition to the default layout (which is made to look like my website), I have created a simple BackTrack theme (based roughly on this site's color scheme):


    (Note the optional obfuscation of the last octet of each MAC)

    Building
    Bluelog builds and runs on a completely stock BackTrack 4 as it's only dependency is BlueZ, Bluelog also works with BlueZ 3.x, so it should also work on BT3 (though I haven't tested). The Makefile I am using is rather simplistic, but does support CFLAG and DESTDIR environment variables to aid in packaging:

    Code:
    # make CFLAGS="-O2 -march=i486 -mtune=i686"
    gcc -O2 -march=i486 -mtune=i686 -lbluetooth bluelog.c -o bluelog
    # mkdir ./pkg
    # make install DESTDIR=./pkg
    mkdir -p ./pkg/usr/bin/
    mkdir -p ./pkg/usr/share/doc/bluelog-0.9.6/
    mkdir -p ./pkg/var/lib/bluelog/
    cp bluelog ./pkg/usr/bin/
    cp ChangeLog COPYING README TODO ./pkg/usr/share/doc/bluelog-0.9.6/
    cp -a --no-preserve=ownership www/* ./pkg/var/lib/bluelog/
    I have also added a special option at the top of the Makefile (DEFAULT_CSS) where you can set which CSS layout should be set as the default for the Live web page, as I figured the BT layout would be preferable to mine.

    Apache Setup
    The only part that doesn't work out of the box is Bluelog Live, as Apache doesn't appear to be configured to serve a site by default. You need to enable SSI and setup a default page (the following is also included in the README):

    Edit "/etc/apache2/sites-available/default" like so:
    Code:
    <Directory /var/www/>
            Options Indexes FollowSymLinks MultiViews +Includes
            AllowOverride None
            Order allow,deny
            allow from all
            AddType text/html .shtml
            AddOutputFilter INCLUDES .shtml
            DirectoryIndex index.shtml
    </Directory>
    Then run the command "a2enmod include" and restart Apache. The Live webpage is run out of /var/lib/bluelog, the easiest way to get it served up is by removing the existing /var/www and linking it over:

    Code:
    # ln -s /var/lib/bluelog /var/www
    Download and More Info
    Slightly more detailed information (like descriptions of command line arguments) is available on
    Bluelog's page of my website.

    I would love to get Bluelog included in BT4, and at the very least would appreciate some input from like minded individuals. I think I got a lot of info in here, but please let me know if anything isn't clear or more information is necessary.
    Last edited by MS3FGX; 11-02-2010 at 09:07 PM. Reason: More descriptive title/remove old link

  2. #2
    Just burned his ISO
    Join Date
    Jun 2010
    Location
    USA
    Posts
    12

    Default

    Just an update, Bluelog has now been updated to 0.9.7. This update includes some major changes like a proper daemon mode, logging to syslog, and PID files to control simultaneous running instances.

    Since my original post, Bluelog has gotten a mention on the Hacker News Network and is today's (Nov 2nd) featured file on PacketStorm.



    The latest version can be downloaded here:

    ftp://ftp.digifail.com/downloads/sof...g-0.9.7.tar.gz

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •