patronus_fati 0.9.15 → 0.9.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2aed771fd8ea32a335bb2617db0563b193d0323a
4
- data.tar.gz: 00d0a88b17c2213665f75cc3a8f43656e14810a8
3
+ metadata.gz: 540a4de3ee3c1a9ff1c056d7677ed1ca6bf780e0
4
+ data.tar.gz: 924fafdee1e19b35334d354877169471159d300e
5
5
  SHA512:
6
- metadata.gz: 28e8425775f048d551d5cc38260d7504c9411fe8e16ae60e48251848b596413bebd2e4a7630f3f012633433d82fe127e7c2d98cd334dfdf8e3f6da46ca0fb011
7
- data.tar.gz: 178f7ad0ddeb1a15d58f94dce3b22f44a17980f474fec2f2a6023126681aadd088e99714d933e58316e5527cfea6dde6aba1084b5eaa71b16ec2e7cca387f1a9
6
+ metadata.gz: fc85c22017ccd669d0a3c3c509e1cf075491627fe2fb6d87a16570481330f9ec2922b8e6e0e18ed90f662a6bf14926d8294e44bc98f0a4324091b61870b3edcd
7
+ data.tar.gz: c1da545bc293ba08ea3406a15db3df7202a720eb1ccaf8c09844e1dc8f027ca88c518c7325e0f819ee3b0b76cc47b97409a600b1a00533799697e83f33b9128d
@@ -5,9 +5,11 @@ module PatronusFati::MessageProcessor::Client
5
5
  # We don't care about objects that would have expired already...
6
6
  return if obj[:lasttime] < PatronusFati::DataModels::Client.current_expiration_threshold
7
7
 
8
+ # obj[:mac] is the client's MAC address
9
+ # obj[:bssid] is the AP's MAC address
8
10
  unless obj[:bssid].nil? || obj[:bssid].empty? || obj[:bssid] == obj[:mac]
9
- return unless (ap = PatronusFati::DataModels::AccessPoint.first(bssid: obj[:bssid]))
10
- ap.seen!
11
+ ap = PatronusFati::DataModels::AccessPoint.first(bssid: obj[:bssid])
12
+ ap.seen! if ap
11
13
  end
12
14
 
13
15
  # Some messages from kismet come in corrupted with partial MACs. We care
@@ -19,6 +21,14 @@ module PatronusFati::MessageProcessor::Client
19
21
  # These potentially represent wired assets leaking through the WiFi and
20
22
  # devices not following the 802.11 spec.
21
23
  if %w( unknown from_ds ).include?(obj[:type]) || obj[:mac].nil?
24
+ # We only care about these assets if the packet is actually coming from
25
+ # an access point. If it's not coming from an access point than it is
26
+ # most likely it is a wired client leaking through.
27
+ #
28
+ # It is possible but unlikely and unusual that we just haven't seen this
29
+ # AP yet. Not recording it now will just delay the 'seeing' of the client
30
+ # a little bit.
31
+ return unless ap
22
32
  client = PatronusFati::DataModels::Client.first({bssid: obj[:mac]})
23
33
  else
24
34
  client = PatronusFati::DataModels::Client.first_or_create({bssid: obj[:mac]}, client_info)
@@ -34,13 +44,6 @@ module PatronusFati::MessageProcessor::Client
34
44
  if (conn = PatronusFati::DataModels::Connection.connected.first(client: client, access_point: ap))
35
45
  conn.seen!
36
46
  else
37
- average = (obj[:datapackets] == 0 ? 0 : obj[:datasize] / obj[:datapackets])
38
-
39
- # Create a connection only if it meets our thresholding logic below
40
- return unless !(obj[:gatewayip].nil? || obj[:ip].nil?) ||
41
- (average >= 156 && obj[:datapackets] > 10) ||
42
- (average >= 110 && obj[:datapackets] > 50)
43
-
44
47
  PatronusFati::DataModels::Connection.create(client: client, access_point: ap)
45
48
  end
46
49
  end
@@ -1,3 +1,3 @@
1
1
  module PatronusFati
2
- VERSION = '0.9.15'
2
+ VERSION = '0.9.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patronus_fati
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.15
4
+ version: 0.9.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Stelfox
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-29 00:00:00.000000000 Z
11
+ date: 2016-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dm-constraints
@@ -371,7 +371,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
371
  version: '0'
372
372
  requirements: []
373
373
  rubyforge_project:
374
- rubygems_version: 2.4.8
374
+ rubygems_version: 2.5.1
375
375
  signing_key:
376
376
  specification_version: 4
377
377
  summary: A ruby implementation of the Kismet client protocol.