Mandatory arguments: :param iface: interface to use (must be in monitor mode) :param ap_mac: AP's MAC :param ssid: AP's SSID :param passphrase: AP's Passphrase (min 8 char.) Optional arguments: :param channel: used by the interface. Default
(self, ap_mac, ssid, passphrase,
channel=None,
# KRACK attack options
double_3handshake=True,
encrypt_3handshake=True,
wait_3handshake=0,
double_gtk_refresh=True,
arp_target_ip=None,
arp_source_ip=None,
wait_gtk=10,
**kwargs)
| 88 | super(KrackAP, self).__init__(*args, **kargs) |
| 89 | |
| 90 | def parse_args(self, ap_mac, ssid, passphrase, |
| 91 | channel=None, |
| 92 | # KRACK attack options |
| 93 | double_3handshake=True, |
| 94 | encrypt_3handshake=True, |
| 95 | wait_3handshake=0, |
| 96 | double_gtk_refresh=True, |
| 97 | arp_target_ip=None, |
| 98 | arp_source_ip=None, |
| 99 | wait_gtk=10, |
| 100 | **kwargs): |
| 101 | """ |
| 102 | Mandatory arguments: |
| 103 | |
| 104 | :param iface: interface to use (must be in monitor mode) |
| 105 | :param ap_mac: AP's MAC |
| 106 | :param ssid: AP's SSID |
| 107 | :param passphrase: AP's Passphrase (min 8 char.) |
| 108 | |
| 109 | Optional arguments: |
| 110 | |
| 111 | :param channel: used by the interface. Default 6 |
| 112 | |
| 113 | Krack attacks options: |
| 114 | |
| 115 | - Msg 3/4 handshake replay: |
| 116 | |
| 117 | :param double_3handshake: double the 3/4 handshake message |
| 118 | :param encrypt_3handshake: encrypt the second 3/4 handshake message |
| 119 | :param wait_3handshake: time to wait (in sec.) before sending the |
| 120 | second 3/4 |
| 121 | |
| 122 | - double GTK rekeying: |
| 123 | |
| 124 | :param double_gtk_refresh: double the 1/2 GTK rekeying message |
| 125 | :param wait_gtk: time to wait (in sec.) before sending the GTK rekeying |
| 126 | :param arp_target_ip: Client IP to use in ARP req. (to detect attack |
| 127 | success). If None, use a DHCP server |
| 128 | :param arp_source_ip: Server IP to use in ARP req. (to detect attack |
| 129 | success). If None, use the DHCP server gateway address |
| 130 | """ |
| 131 | super(KrackAP, self).parse_args(**kwargs) |
| 132 | |
| 133 | # Main AP options |
| 134 | self.mac = ap_mac |
| 135 | self.ssid = ssid |
| 136 | self.passphrase = passphrase |
| 137 | if channel is None: |
| 138 | channel = 6 |
| 139 | self.channel = channel |
| 140 | |
| 141 | # Internal structures |
| 142 | self.last_iv = None |
| 143 | self.client = None |
| 144 | self.seq_num = count() |
| 145 | self.replay_counter = count() |
| 146 | self.time_handshake_end = None |
| 147 | self.dhcp_server = DHCPOverWPA(send_func=self.send_ether_over_wpa, |
nothing calls this directly
no test coverage detected