2.2.3: Version bump for WPS PIN changes
Brought back the WPS PIN attack as asked in #90. Also in this commit: Fixed PIN counter in reaver's PIN attack.
This commit is contained in:
@@ -8,7 +8,7 @@ from .tools.macchanger import Macchanger
|
|||||||
|
|
||||||
class Configuration(object):
|
class Configuration(object):
|
||||||
''' Stores configuration variables and functions for Wifite. '''
|
''' Stores configuration variables and functions for Wifite. '''
|
||||||
version = '2.2.2'
|
version = '2.2.3'
|
||||||
|
|
||||||
initialized = False # Flag indicating config has been initialized
|
initialized = False # Flag indicating config has been initialized
|
||||||
temp_dir = None # Temporary directory
|
temp_dir = None # Temporary directory
|
||||||
|
|||||||
@@ -66,7 +66,6 @@ class Reaver(Attack, Dependency):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Failed with error
|
# Failed with error
|
||||||
self.pattack('{R}Failed:{O} %s' % str(e), newline=True)
|
self.pattack('{R}Failed:{O} %s' % str(e), newline=True)
|
||||||
Color.pexception(e)
|
|
||||||
return self.crack_result is not None
|
return self.crack_result is not None
|
||||||
|
|
||||||
# Stop reaver if it's still running
|
# Stop reaver if it's still running
|
||||||
@@ -220,25 +219,31 @@ class Reaver(Attack, Dependency):
|
|||||||
# Check last line for current status
|
# Check last line for current status
|
||||||
stdout_last_line = stdout.split('\n')[-1]
|
stdout_last_line = stdout.split('\n')[-1]
|
||||||
|
|
||||||
|
# [+] Waiting for beacon from AA:BB:CC:DD:EE:FF
|
||||||
if 'Waiting for beacon from' in stdout_last_line:
|
if 'Waiting for beacon from' in stdout_last_line:
|
||||||
state = 'Waiting for beacon'
|
state = 'Waiting for beacon'
|
||||||
|
|
||||||
|
# [+] Associated with AA:BB:CC:DD:EE:FF (ESSID: NETGEAR07)
|
||||||
elif 'Associated with' in stdout_last_line:
|
elif 'Associated with' in stdout_last_line:
|
||||||
state = 'Associated'
|
state = 'Associated'
|
||||||
|
|
||||||
elif 'Starting Cracking Session.' in stdout_last_line:
|
elif 'Starting Cracking Session.' in stdout_last_line:
|
||||||
state = 'Started Cracking'
|
state = 'Started Cracking'
|
||||||
|
|
||||||
|
# [+] Trying pin "01235678"
|
||||||
elif 'Trying pin' in stdout_last_line:
|
elif 'Trying pin' in stdout_last_line:
|
||||||
state = 'Trying PIN'
|
state = 'Trying PIN'
|
||||||
|
|
||||||
|
# [+] Sending EAPOL START request
|
||||||
elif 'Sending EAPOL START request' in stdout_last_line:
|
elif 'Sending EAPOL START request' in stdout_last_line:
|
||||||
state = 'Sending EAPOL'
|
state = 'Sending EAPOL'
|
||||||
|
|
||||||
|
# [+] Sending identity response
|
||||||
elif 'Sending identity response' in stdout_last_line:
|
elif 'Sending identity response' in stdout_last_line:
|
||||||
state = 'Sending ID'
|
state = 'Sending ID'
|
||||||
self.locked = False
|
self.locked = False
|
||||||
|
|
||||||
|
# [+] Sending M2 message
|
||||||
elif 'Sending M' in stdout_last_line:
|
elif 'Sending M' in stdout_last_line:
|
||||||
for num in ['2', '4', '6']:
|
for num in ['2', '4', '6']:
|
||||||
if 'Sending M%s message' % num in stdout_last_line:
|
if 'Sending M%s message' % num in stdout_last_line:
|
||||||
@@ -247,12 +252,14 @@ class Reaver(Attack, Dependency):
|
|||||||
state += ' / Running pixiewps'
|
state += ' / Running pixiewps'
|
||||||
self.locked = False
|
self.locked = False
|
||||||
|
|
||||||
|
# [+] Received M1 message
|
||||||
elif 'Received M' in stdout_last_line:
|
elif 'Received M' in stdout_last_line:
|
||||||
for num in ['1', '3', '5', '7']:
|
for num in ['1', '3', '5', '7']:
|
||||||
if 'Received M%s message' % num in stdout_last_line:
|
if 'Received M%s message' % num in stdout_last_line:
|
||||||
state = 'Received M%s' % num
|
state = 'Received M%s' % num
|
||||||
self.locked = False
|
self.locked = False
|
||||||
|
|
||||||
|
# [!] WARNING: Detected AP rate limiting, waiting 60 seconds before re-checking
|
||||||
elif 'Detected AP rate limiting,' in stdout_last_line:
|
elif 'Detected AP rate limiting,' in stdout_last_line:
|
||||||
state = 'Rate-Limited by AP'
|
state = 'Rate-Limited by AP'
|
||||||
self.locked = True
|
self.locked = True
|
||||||
@@ -262,15 +269,18 @@ class Reaver(Attack, Dependency):
|
|||||||
self.last_line_number = len(stdout)
|
self.last_line_number = len(stdout)
|
||||||
|
|
||||||
# Detect percentage complete
|
# Detect percentage complete
|
||||||
|
# [+] 0.05% complete @ 2018-08-23 15:17:23 (42 seconds/pin)
|
||||||
percentages = re.findall(
|
percentages = re.findall(
|
||||||
r"([0-9.]+%) complete .* \(([0-9.]+) seconds/pin\)", stdout_diff)
|
r"([0-9.]+%) complete .* \(([0-9.]+) seconds/pin\)", stdout_diff)
|
||||||
if len(percentages) > 0:
|
if len(percentages) > 0:
|
||||||
self.progress = percentages[-1][0]
|
self.progress = percentages[-1][0]
|
||||||
|
|
||||||
# Calculate number of PINs tried
|
# Calculate number of PINs tried
|
||||||
|
# [+] Trying pin "01235678"
|
||||||
new_pins = set(re.findall(r'Trying pin "([0-9]+)"', stdout_diff))
|
new_pins = set(re.findall(r'Trying pin "([0-9]+)"', stdout_diff))
|
||||||
self.total_attempts += len(new_pins.difference(self.last_pins))
|
if len(new_pins) > 0:
|
||||||
self.last_pins = new_pins
|
self.total_attempts += len(new_pins.difference(self.last_pins))
|
||||||
|
self.last_pins = new_pins
|
||||||
|
|
||||||
# TODO: Look for "Sending M6 message" which indicates first 4 digits are correct.
|
# TODO: Look for "Sending M6 message" which indicates first 4 digits are correct.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user