|
@@ -200,6 +200,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
overThousand = False
|
|
overThousand = False
|
|
|
|
|
|
msg_packet_mapping = MessageMapping(messages, self.statistics.get_pcap_timestamp_start())
|
|
msg_packet_mapping = MessageMapping(messages, self.statistics.get_pcap_timestamp_start())
|
|
|
|
+ mark_packets = self.get_param_value(Param.HIDDEN_MARK)
|
|
|
|
|
|
# create packets to write to PCAP file
|
|
# create packets to write to PCAP file
|
|
for msg in messages:
|
|
for msg in messages:
|
|
@@ -232,6 +233,15 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
Generator.add_padding(packet, padding,True, True)
|
|
Generator.add_padding(packet, padding,True, True)
|
|
|
|
|
|
packet.time = msg.time
|
|
packet.time = msg.time
|
|
|
|
+
|
|
|
|
+ if mark_packets and isinstance(packet.payload, IP): # do this only for ip-packets
|
|
|
|
+ ip_data = packet.payload
|
|
|
|
+ hidden_opt = IPOption_Security()
|
|
|
|
+ hidden_opt.option = 2 # "normal" security opt
|
|
|
|
+ hidden_opt.security = 16 # magic value indicating NSA
|
|
|
|
+
|
|
|
|
+ ip_data.options = hidden_opt
|
|
|
|
+
|
|
packets.append(packet)
|
|
packets.append(packet)
|
|
msg_packet_mapping.map_message(msg, packet)
|
|
msg_packet_mapping.map_message(msg, packet)
|
|
total_pkts += 1
|
|
total_pkts += 1
|
|
@@ -274,18 +284,6 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
|
|
# Store timestamp of last packet
|
|
# Store timestamp of last packet
|
|
self.attack_end_utime = last_packet.time
|
|
self.attack_end_utime = last_packet.time
|
|
|
|
|
|
- if self.get_param_value(Param.HIDDEN_MARK):
|
|
|
|
- # insert an unused ip-option
|
|
|
|
- for p in total_pkts:
|
|
|
|
- if isinstance(p.payload, IP): # do this only for ip-packets
|
|
|
|
- ip_data = p.payload
|
|
|
|
- hidden_opt = IPOption_Security()
|
|
|
|
- hidden_opt.option = 2 # "normal" security opt
|
|
|
|
- hidden_opt.compartment = 16 # magic value indicating NSA
|
|
|
|
-
|
|
|
|
- ip_data.options = hidden_opt
|
|
|
|
-
|
|
|
|
-
|
|
|
|
# Return packets sorted by packet by timestamp and total number of packets (sent)
|
|
# Return packets sorted by packet by timestamp and total number of packets (sent)
|
|
return total_pkts , path_attack_pcap
|
|
return total_pkts , path_attack_pcap
|
|
|
|
|