|
@@ -143,6 +143,7 @@ class EternalBlueExploit(BaseAttack.BaseAttack):
|
|
|
orig_ip_dst = None
|
|
|
exploit_raw_packets = RawPcapReader(self.template_scan_pcap_path)
|
|
|
inter_arrival_times = self.get_inter_arrival_time(exploit_raw_packets)
|
|
|
+ exploit_raw_packets.close()
|
|
|
exploit_raw_packets = RawPcapReader(self.template_scan_pcap_path)
|
|
|
|
|
|
source_origin_wins, destination_origin_wins = {}, {}
|
|
@@ -220,11 +221,13 @@ class EternalBlueExploit(BaseAttack.BaseAttack):
|
|
|
|
|
|
# Inject EternalBlue exploit packets
|
|
|
# Read Win7_eternalblue_exploit pcap file
|
|
|
+ exploit_raw_packets.close()
|
|
|
exploit_raw_packets = RawPcapReader(self.template_attack_pcap_path)
|
|
|
|
|
|
port_source = randint(self.minDefaultPort,self.maxDefaultPort) # experiments show this range of ports
|
|
|
# conversations = {(ip.src, ip.dst, port.src, port.dst): packets}
|
|
|
conversations, orderList_conversations = self.packetsToConvs(exploit_raw_packets)
|
|
|
+ exploit_raw_packets.close()
|
|
|
|
|
|
conv_start_timesamp = timestamp_next_pkt
|
|
|
for conv_index, conv in enumerate(orderList_conversations):
|