Kismet Wireless

Kismet Forums

 

Posted by:csheckman
Subject:btscan plugin file descriptor not found in FD_SET
Date:15:47:32 18/01/2013

I am attempting to get the btscan server plugin to function using version 2012-GIT-R0 .

I have gotten it to set up, to register as a source, and to be started.

I have also been able to confirm that data is being placed on the PacketSource_LinuxBT queue and written to the pipe.

The problem appears to be that PacketSource_LinuxBT::Poll() never gets called by Packetsourcetracker::Poll().

I traced the failure to to the following conditional in Packetsourcetracker (Packetsourcetracker::Poll:line 646):

if (capd >= 0 && FD_ISSET(capd, &in_rset)) {......

In my case, capd is >=0 but FD_ISSET returns false (0) every time. This is not the case with other sources.

Below is a capture of the server log from a run with only hci0 as a source. I have added numerous debug statements to track the source registration and polling process. I am also monitoring Packetsourcetracker::MergeSet() and checking the results of FD_ISSET() after the FD_SET() macro is executed. As you can see, the plugin's FD appears to be added to the set but then fails the FD_ISSET() test in Packetsourcetracker::Poll:line 646.


ERROR: Kismet was started as root, NOT launching external control binary.
This is NOT the preferred method of starting Kismet as Kismet will
continue to run as root the entire time. Please read the README
file section about Installation & Security and be sure this is what
you want to do.
INFO: Reading from config file /usr/local/etc/kismet.conf
INFO: No 'dronelisten' config line and no command line drone-listen
argument given, Kismet drone server will not be enabled.
INFO: Created alert tracker...
INFO: Creating device tracker...
INFO: Opened Devicetracker text log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.kist
xt'
INFO: Opened Devicetracker xml log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.kisx
ml'
INFO: Registering support for DLT_PPI packet header decoding
INFO: Registering support for DLT_RADIOTAP packet header decoding
INFO: Registering support for DLT_Prism2 packet header decoding
INFO: Allowing Kismet clients to view WEP keys
INFO: Registered PHY handler 'IEEE802.11' as ID 0
ERROR: Failed to open user plugin directory (/root/.kismet//plugins/): No
such file or directory
INFO: Loaded info for plugin 'autowep-kismet.so': Plugin name: 'AUTOWEP'
Plugin version: '2012-GIT-R0' Plugin description: 'AutoWEP Plugin'
INFO: Activated plugin '/usr/local/lib/kismet/autowep-kismet.so':
'AUTOWEP' '2012-GIT-R0'
INFO: Loaded info for plugin 'alertsyslog.so': Plugin name: 'ALERTSYSLOG'
Plugin version: '2012-GIT-R0' Plugin description: 'ALERTSYSLOG
Plugin'
INFO: Activated plugin '/usr/local/lib/kismet/alertsyslog.so':
'ALERTSYSLOG' '2012-GIT-R0'
INFO: Loaded info for plugin 'spectool_net.so': Plugin name: 'SPECTOOL'
Plugin version: '2012-GIT-R0' Plugin description: 'Spectool-Net'
INFO: Loaded info for plugin 'kismet-syslog.so': Plugin name: 'SYSLOG'
Plugin version: '2012-GIT-R0' Plugin description: 'SYSLOG Plugin'
INFO: Kismet-Syslog redirecting all messages to syslog
INFO: Activated plugin '/usr/local/lib/kismet/kismet-syslog.so': 'SYSLOG'
'2012-GIT-R0'
INFO: Loaded info for plugin 'aircrack-kismet.so': Plugin name:
'AIRCRACK-PTW' Plugin version: '2012-GIT-R0' Plugin description:
'Aircrack PTW Plugin'
INFO: Activated plugin '/usr/local/lib/kismet/aircrack-kismet.so':
'AIRCRACK-PTW' '2012-GIT-R0'
INFO: Loaded info for plugin 'gpstxt.so': Plugin name: 'GPSTXT' Plugin
version: '2012-GIT-R0' Plugin description: 'GPSTXT Plugin'
INFO: Opened gpstxt log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.gpst
xt'
INFO: Activated plugin '/usr/local/lib/kismet/gpstxt.so': 'GPSTXT'
'2012-GIT-R0'
INFO: Loaded info for plugin 'btscan.so': Plugin name: 'BTSCAN' Plugin
version: '2012-GIT-R0' Plugin description: 'Active Bluetooth
scanning plugin'
INFO: Registered PHY handler 'BTscan' as ID 1
INFO: Activated plugin '/usr/local/lib/kismet/btscan.so': 'BTSCAN'
'2012-GIT-R0'
INFO: Kismet will spend extra time on channels 1,6,11
INFO: Kismet will attempt to hop channels at 3 channels per second unless
overridden by source-specific options
INFO: No specific sources named on the command line, sources will be read
from kismet.conf
INFO: Matched source type 'BTSCAN' for auto-type source 'hci0'
INFO: Using default channel list 'LINUXBTSCAN' on source 'hci0'
INFO: Created source hci0 with UUID eb51016a-6180-11e2-bddd-1f03cc106401
INFO: Disabling channel hopping on source 'hci0' because it is not capable
of setting the channel.
INFO: Will attempt to reopen on source 'hci0' if there are errors
INFO: Created TCP listener on port 2501
INFO: Kismet drone framework disabled, drone will not be activated.
INFO: Starting GPS components...
INFO: GPS support disabled in kismet.conf
ERROR: Could not open OUI file '/etc/manuf': No such file or directory
ERROR: Could not open OUI file '/usr/share/wireshark/wireshark/manuf': No
such file or directory
INFO: Opened OUI file '/usr/share/wireshark/manuf
INFO: Indexing manufacturer db
INFO: Completed indexing manufacturer db, 18600 lines 372 indexes
INFO: Creating network tracker...
INFO: Creating channel tracker...
INFO: Registering dumpfiles...
INFO: Pcap log in PPI format
INFO: Opened pcapdump log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.pcap
dump'
INFO: Opened netxml log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.netx
ml'
INFO: Opened nettxt log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.nett
xt'
INFO: Opened gpsxml log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.gpsx
ml'
INFO: Opened alert log file
'/home/carey/Documents/kismet/kislogs/Kismet-20130118-10-08-30-1.aler
t'
INFO: No spectools= line in config file, will not try to use spectools for
spectrum data
INFO: Activated plugin '/usr/local/lib/kismet/spectool_net.so': 'SPECTOOL'
'2012-GIT-R0'
INFO: Kismet starting to gather packets
INFO: Packetsourcetracker::StartSource called with ID= '0' vecLength=1
INFO: Packetsourcetracker::StartSource called with ID= '1' vecLength=1
INFO: Packetsourcetracker::StartSource[1] starting to open source
INFO: Packetsourcetracker::StartSource[1] calling OpenSource
INFO: PS_LinuxBT:OpenSource:called
INFO: PS_LinuxBT:OpenSource:started capture thread
INFO: Packetsourcetracker::StartSource[1] return from (
INFO: Packetsourcetracker::StartSource[1] Started source
INFO: Started source 'hci0'
INFO: Packetsourcetracker::MergeSet:called
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::MergeSet: x='158411192' capd= '16'
INFO: Packetsourcetracker::MergeSet:FD_SET called
INFO: Packetsourcetracker::MergeSet:AFTER SET x='158411192' capd= '16'
ISSET='1'
INFO: Packetsourcetracker::Poll:called
INFO: Packetsourcetracker::Poll:about to call FetchDescriptor
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::Poll capd= '16' ISSET= '0'
INFO: Packetsourcetracker::MergeSet:called
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::MergeSet: x='158411192' capd= '16'
INFO: Packetsourcetracker::MergeSet:FD_SET called
INFO: Packetsourcetracker::MergeSet:AFTER SET x='158411192' capd= '16'
ISSET='1'
INFO: Packetsourcetracker::Poll:called
INFO: Packetsourcetracker::Poll:about to call FetchDescriptor
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::Poll capd= '16' ISSET= '0'
INFO: Packetsourcetracker::MergeSet:called
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::MergeSet: x='158411192' capd= '16'
INFO: Packetsourcetracker::MergeSet:FD_SET called
INFO: Packetsourcetracker::MergeSet:AFTER SET x='158411192' capd= '16'
ISSET='1'
INFO: Packetsourcetracker::Poll:called
INFO: Packetsourcetracker::Poll:about to call FetchDescriptor
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::Poll capd= '16' ISSET= '0'
INFO: Packetsourcetracker::MergeSet:called
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::MergeSet: x='158411192' capd= '16'
INFO: Packetsourcetracker::MergeSet:FD_SET called
INFO: Packetsourcetracker::MergeSet:AFTER SET x='158411192' capd= '16'
ISSET='1'
INFO: Packetsourcetracker::Poll:called
INFO: Packetsourcetracker::Poll:about to call FetchDescriptor
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::Poll capd= '16' ISSET= '0'
INFO: Packetsourcetracker::MergeSet:called
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::MergeSet: x='158411192' capd= '16'
INFO: Packetsourcetracker::MergeSet:FD_SET called
INFO: Packetsourcetracker::MergeSet:AFTER SET x='158411192' capd= '16'
ISSET='1'
INFO: Packetsourcetracker::Poll:called
INFO: Packetsourcetracker::Poll:about to call FetchDescriptor
INFO: PS_LinuxBT:FetchDescriptor:called
INFO: Packetsourcetracker::Poll capd= '16' ISSET= '0'

Any ideas about what is causing the behavior?


Reply to this message