Fixing WEP chopchop attack. Works, but needs more work...
This commit is contained in:
@@ -68,12 +68,15 @@ class Aireplay(object):
|
|||||||
|
|
||||||
# TODO: set 'stdout' when creating process to store output to file.
|
# TODO: set 'stdout' when creating process to store output to file.
|
||||||
# AttackWEP will read file to get status of attack.
|
# AttackWEP will read file to get status of attack.
|
||||||
# E.g., chopchop will regex "(\d+)% done" to get percent complete.
|
# E.g., chopchop will regex "\(\s?(\d+)% done" to get percent complete.
|
||||||
'''
|
'''
|
||||||
from subprocess import PIPE
|
if not devnull and attack_type == WEPAttackType.chopchop:
|
||||||
sout = PIPE
|
sout = open(Configuration.temp('chopchop.out'), 'w')
|
||||||
if '--chopchop' in cmd:
|
# Output sample:
|
||||||
sout = open(Configuration.temp('chopchop'), 'w')
|
# Offset 70 (11% done) | xor = 7A | pt = 00 | 24 frames written in 409ms
|
||||||
|
else:
|
||||||
|
sout = Process.devnull()
|
||||||
|
serr = Process.devnull()
|
||||||
'''
|
'''
|
||||||
|
|
||||||
self.pid = Process(cmd,
|
self.pid = Process(cmd,
|
||||||
@@ -183,6 +186,7 @@ class Aireplay(object):
|
|||||||
"Client_mac and Replay_File are required for arp replay")
|
"Client_mac and Replay_File are required for arp replay")
|
||||||
cmd.append('--arpreplay')
|
cmd.append('--arpreplay')
|
||||||
cmd.extend(['-b', target.bssid])
|
cmd.extend(['-b', target.bssid])
|
||||||
|
cmd.extend(['-h', client_mac])
|
||||||
cmd.extend(['-r', replay_file])
|
cmd.extend(['-r', replay_file])
|
||||||
cmd.extend(['-F']) # Automatically choose first packet
|
cmd.extend(['-F']) # Automatically choose first packet
|
||||||
cmd.extend(['-x', str(Configuration.wep_pps)])
|
cmd.extend(['-x', str(Configuration.wep_pps)])
|
||||||
|
|||||||
@@ -156,17 +156,18 @@ class AttackWEP(Attack):
|
|||||||
# If .xor exists, run packetforge-ng to create .cap
|
# If .xor exists, run packetforge-ng to create .cap
|
||||||
Color.pl('\n{+} {C}%s attack{W}' % attack_name +
|
Color.pl('\n{+} {C}%s attack{W}' % attack_name +
|
||||||
' generated a {C}.xor file{W}, {G}forging...{W}')
|
' generated a {C}.xor file{W}, {G}forging...{W}')
|
||||||
forge_file = Aireplay.forge_packet(xor_file,
|
replay_file = Aireplay.forge_packet(xor_file,
|
||||||
airodump_target.bssid,
|
airodump_target.bssid,
|
||||||
client_mac)
|
client_mac)
|
||||||
if forge_file:
|
if replay_file:
|
||||||
replay_file = forge_file
|
|
||||||
Color.pl('{+} {C}forged packet{W},' +
|
Color.pl('{+} {C}forged packet{W},' +
|
||||||
' {G}replaying...{W}')
|
' {G}replaying...{W}')
|
||||||
attack_name = 'forged arp replay'
|
wep_attack_type = WEPAttackType("forgedreplay")
|
||||||
aireplay = Aireplay(self.target, \
|
attack_name = "forgedreplay"
|
||||||
'forgedreplay', \
|
aireplay = Aireplay(self.target,
|
||||||
client_mac=client_mac, \
|
'forgedreplay',
|
||||||
|
client_mac=client_mac,
|
||||||
|
devnull=True,
|
||||||
replay_file=replay_file)
|
replay_file=replay_file)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user