Skip to content

Commit

Permalink
Fixed a bug in parsing a malicious packet (thank you DEF CON)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebmadrigal committed Aug 10, 2018
1 parent 2c8999b commit 76a0bd7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions plugin_examples/count_manufacturers.py
Expand Up @@ -42,9 +42,13 @@ def save_progress(self):

def output_report(self):
descending_order = sorted([(count, vendor) for vendor, count in self.manufacturer_to_count.items()], reverse=True)
total_device_count = 0
with open(REPORT_FILE, 'w') as f:
for (count, vendor) in descending_order:
f.write('{0:8}: {1}\n'.format(count, vendor))
total_device_count += count

f.write('\n{}\nTotal unique devices: {}\n\n'.format('='*100, total_device_count))

print('[!] Report saved to {}'.format(REPORT_FILE))
self.save_progress()
Expand Down
11 changes: 10 additions & 1 deletion trackerjacker/__main__.py
Expand Up @@ -150,7 +150,16 @@ def __init__(self,
def process_packet(self, pkt):
if pkt.haslayer(scapy.Dot11):
looking_for_specifics_and_none_found = self.aps_to_watch_set or self.devices_to_watch_set
frame = dot11_frame.Dot11Frame(pkt, int(self.iface_manager.current_channel), iface=self.iface_manager.iface)

try:
frame = dot11_frame.Dot11Frame(pkt,
int(self.iface_manager.current_channel),
iface=self.iface_manager.iface)
except Exception as e:
# Thank you DEF CON (https://github.com/secdev/scapy/issues/1552)
self.logger.warning('Error decoding Dot11Frame: %s', e)
return

if self.do_map:
self.log_newly_found(frame)

Expand Down
2 changes: 1 addition & 1 deletion trackerjacker/version.py
@@ -1 +1 @@
__version__ = "1.8.5"
__version__ = "1.8.6"

0 comments on commit 76a0bd7

Please sign in to comment.