2.1.9: --pmkid option, cleaned up --cracked, other bug fixes.
PMKID: * `--pmkid` option only attacks WPA networks with PMKID capture + crack * Decreased PMKID capture time from 60 seconds to 15 seconds. * Ignores PMKID attack if `--wps-only` is set. WPS: * Ctrl+C while waiting for `bully` to fetch PSK = remembers PIN, PSK is unknown. Misc: * `--cracked` prints results on single lines (much easier to read) * Fixed typo when required dependencies are not found (closes #127)
This commit is contained in:
@@ -67,7 +67,8 @@ class AttackAll(object):
|
||||
Color.pl('{!} {R}Error: {O}unable to attack: encryption not WEP or WPA')
|
||||
return
|
||||
|
||||
for attack in attacks:
|
||||
while len(attacks) > 0:
|
||||
attack = attacks.pop(0)
|
||||
try:
|
||||
result = attack.run()
|
||||
if result:
|
||||
@@ -77,7 +78,7 @@ class AttackAll(object):
|
||||
continue
|
||||
except KeyboardInterrupt:
|
||||
Color.pl('\n{!} {O}interrupted{W}\n')
|
||||
if not cls.user_wants_to_continue(targets_remaining, 1):
|
||||
if not cls.user_wants_to_continue(targets_remaining, len(attacks)):
|
||||
return False # Stop attacking other targets
|
||||
|
||||
if attack.success:
|
||||
|
||||
@@ -62,6 +62,12 @@ class AttackPMKID(Attack):
|
||||
Returns:
|
||||
True if handshake is captured. False otherwise.
|
||||
'''
|
||||
# Skip if user only wants to run PixieDust attack
|
||||
if Configuration.wps_only and self.target.wps:
|
||||
Color.pl('\r{!} {O}Skipping PMKID attack on {R}%s{O} because {R}--wps-only{O} is set{W}' % self.target.essid)
|
||||
self.success = False
|
||||
return False
|
||||
|
||||
from ..util.process import Process
|
||||
# Check that we have all hashcat programs
|
||||
dependencies = [
|
||||
@@ -103,7 +109,7 @@ class AttackPMKID(Attack):
|
||||
The PMKID hash (str) if found, otherwise None.
|
||||
'''
|
||||
self.keep_capturing = True
|
||||
self.timer = Timer(60)
|
||||
self.timer = Timer(15)
|
||||
|
||||
# Start hcxdumptool
|
||||
t = Thread(target=self.dumptool_thread)
|
||||
@@ -159,10 +165,11 @@ class AttackPMKID(Attack):
|
||||
|
||||
if key is None:
|
||||
# Failed to crack.
|
||||
Color.clear_entire_line()
|
||||
Color.pattack('PMKID', self.target, '{R}CRACK',
|
||||
'{R}Failed{O}: passphrase not found in dictionary.\n')
|
||||
Color.pl('')
|
||||
if Configuration.wordlist is not None:
|
||||
Color.clear_entire_line()
|
||||
Color.pattack('PMKID', self.target, '{R}CRACK',
|
||||
'{R}Failed {O}Passphrase not found in dictionary.\n')
|
||||
Color.pl('')
|
||||
return False
|
||||
else:
|
||||
# Successfully cracked.
|
||||
|
||||
@@ -26,9 +26,12 @@ class AttackWPA(Attack):
|
||||
def run(self):
|
||||
'''Initiates full WPA handshake capture attack.'''
|
||||
|
||||
if Configuration.use_pmkid_only:
|
||||
self.success = False
|
||||
return False
|
||||
# Skip if user only wants to run PixieDust attack
|
||||
if Configuration.wps_only and self.target.wps:
|
||||
Color.pl('\r{!} {O}--wps-only{R} set, ignoring WPA-handshake attack on {O}%s{W}' % self.target.essid)
|
||||
Color.pl('\r{!} {O}Skipping WPA-Handshake attack on {R}%s{O} because {R}--wps-only{O} is set{W}' % self.target.essid)
|
||||
self.success = False
|
||||
return self.success
|
||||
|
||||
@@ -110,7 +113,12 @@ class AttackWPA(Attack):
|
||||
handshake = Handshake(temp_file, bssid=bssid, essid=essid)
|
||||
if handshake.has_handshake():
|
||||
# We got a handshake
|
||||
Color.pl('\n\n{+} {G}successfully captured handshake{W}')
|
||||
Color.clear_entire_line()
|
||||
Color.pattack('WPA',
|
||||
airodump_target,
|
||||
'Handshake capture',
|
||||
'{G}Captured handshake{W}')
|
||||
Color.pl('')
|
||||
break
|
||||
|
||||
# There is no handshake
|
||||
|
||||
@@ -15,10 +15,14 @@ class AttackWPS(Attack):
|
||||
''' Run all WPS-related attacks '''
|
||||
|
||||
# Drop out if user specified to not use Reaver/Bully
|
||||
if Configuration.use_pmkid_only:
|
||||
self.success = False
|
||||
return False
|
||||
|
||||
if Configuration.no_wps:
|
||||
Color.pl('\r{!} {O}--no-wps{R} set, ignoring WPS attack on {O}%s{W}' % self.target.essid)
|
||||
self.success = False
|
||||
return self.success
|
||||
return False
|
||||
|
||||
if Configuration.use_bully:
|
||||
return self.run_bully()
|
||||
|
||||
Reference in New Issue
Block a user