Browse Source

edit attack parameters

Jens Keim 6 years ago
parent
commit
528d9ba663

+ 32 - 31
code/Attack/AttackParameters.py

@@ -6,67 +6,68 @@ class Parameter(enum.Enum):
     Defines the shortname for attack parameters. The shortname may be used for attack parameter specification
     when calling Core via the command line.
     """
-    # recommended type: IP address -------------------------------
+    # recommended type: (list/range of) IP address(es)------------------------------------------------------------------
     IP_SOURCE = 'ip.src'  # source IP address(es)
     IP_DESTINATION = 'ip.dst'  # destination IP address(es)
-    TARGET_COUNT = "target.count"  # count of target IP addresses
     IP_DNS = 'ip.dns'  # IP address of DNS server
+    IP_VICTIM = 'ip.victim'  # victim IP address (only needed for indirect attacks)
     HOSTING_IP = 'hosting.ip'  # IP address(es) hosting the vulnerable service
-    HOSTING_PERCENTAGE = 'hosting.percentage'  # percentage of target IPs hosting the vulnerable service
-    IP_VICTIM = 'ip.victim'
-    # recommended type: MAC address ------------------------------
+    # recommended type: MAC address ------------------------------------------------------------------------------------
     MAC_SOURCE = 'mac.src'  # MAC address of source
     MAC_DESTINATION = 'mac.dst'  # MAC address of destination
-    # recommended type: Port -------------------------------------
-    PORT_OPEN = 'port.open'  # open ports
+    # recommended type: Port -------------------------------------------------------------------------------------------
     PORT_DESTINATION = 'port.dst'  # destination ports
     PORT_SOURCE = 'port.src'  # source ports
-    # recommended type: Integer positive -------------------------
+    PORT_OPEN = 'port.open'  # open ports
+    # recommended type: Integer positive -------------------------------------------------------------------------------
     PACKETS_LIMIT = 'packets.limit'
     NUMBER_ATTACKERS = 'attackers.count'
-    ATTACK_DURATION = 'attack.duration' # in seconds
-    VICTIM_BUFFER = 'victim.buffer' # in packets
+    ATTACK_DURATION = 'attack.duration'  # in seconds
+    VICTIM_BUFFER = 'victim.buffer'  # in packets
     TARGET_URI = 'target.uri'
     NUMBER_INITIATOR_BOTS = 'bots.count'
     INTERVAL_SELECT_START = 'interval.selection.start'
     INTERVAL_SELECT_END = 'interval.selection.end'
-    # recommended type: domain -----------------------------------
+    TARGET_COUNT = "target.count"  # count of target IP addresses
+    # recommended type: domain -----------------------------------------------------------------------------------------
     TARGET_HOST = 'target.host'
-    # recommended type: Float ------------------------------------
-    PACKETS_PER_SECOND = 'packets.per-second'  # packets per second
+    # recommended type: Float ------------------------------------------------------------------------------------------
+    PACKET_LIMIT_PER_SECOND = 'packet.limit-per-second'  # packets per second
     INJECT_PPS = 'inject.pps'  # packets per seconds injected by the attack
     INJECT_AT_TIMESTAMP = 'inject.at-timestamp'  # unix epoch time (seconds.millis) where attack should be injected
-    # recommended type: Packet Position ----------------------------------
+    # recommended type: Packet Position --------------------------------------------------------------------------------
     INJECT_AFTER_PACKET = 'inject.after-pkt'  # packet after which attack should be injected
-    # recommended type: boolean  --------------------------------
+    # recommended type: boolean  ---------------------------------------------------------------------------------------
     PORT_DEST_SHUFFLE = 'port.dst.shuffle'  # shuffles the destination ports if a list of ports is given
     PORT_DEST_ORDER_DESC = 'port.dst.order-desc'  # uses a descending port order instead of a ascending order
     IP_SOURCE_RANDOMIZE = 'ip.src.shuffle'  # randomizes the sources IP address if a list of IP addresses is given
     PORT_SOURCE_RANDOMIZE = 'port.src.shuffle'  # randomizes the source port if a list of sources ports is given
     NAT_PRESENT = 'nat.present'  # if NAT is active, external computers cannot initiate a communication in MembersMgmtCommAttack
-    TTL_FROM_CAIDA = 'ttl.from.caida'  # if True, TTLs are assigned based on the TTL distributions from the CAIDA dataset
-    MULTIPORT = "multiport"  # select destination port as an ephemeral port if True, calculate the destination port based on the hostname, otherwise
-    HIDDEN_MARK = "hidden_mark"  # indicating if the attack will mark generated packets
-    # recommended type: Filepath ------------------------------------
-    FILE_CSV = 'file.csv'  # filepath to CSV containing a communication pattern
-    FILE_XML = 'file.xml'  # filepath to XML containing a communication pattern
-    # recommended type: CommType ------------------------------------
+    TTL_FROM_CAIDA = 'ttl.from-caida'  # if True, TTLs are assigned based on the TTL distributions from the CAIDA dataset
+    PORT_MULTI = "port.multi"  # select destination port as an ephemeral port if True, calculate the destination port based on the hostname, otherwise
+    PACKETS_MARK = "packets.mark"  # indicating if the attack will mark generated packets
+    # recommended type: file path --------------------------------------------------------------------------------------
+    FILE_CSV = 'file.csv'  # file path to CSV containing a communication pattern
+    FILE_XML = 'file.xml'  # file path to XML containing a communication pattern
+    CUSTOM_PAYLOAD_FILE = 'custom.payload.file'  # file that contains custom payload for ftp exploits
+    # recommended type: CommType ---------------------------------------------------------------------------------------
     COMM_TYPE = "comm.type"  # the locality of bots in botnet communication (e.g. local, external, mixed)
-    # recommended type: Percentage (0.0-1.0) ------------------------------------
+    # recommended type: Percentage (0.0-1.0) ---------------------------------------------------------------------------
     IP_REUSE_TOTAL = 'ip.reuse.total'  # percentage of IPs in original PCAP to be reused
     IP_REUSE_LOCAL = 'ip.reuse.local'  # percentage of private IPs in original PCAP to be reused
     IP_REUSE_EXTERNAL = 'ip.reuse.external'  # percentage of public IPs in original PCAP to be reused
-    # recommended type: Positive Integer between 0 and 100 ------------------------------------
+    HOSTING_PERCENTAGE = 'hosting.percentage'  # percentage of target IPs hosting the vulnerable service
+    # recommended type: Positive Integer between 0 and 100 -------------------------------------------------------------
     PACKET_PADDING = 'packet.padding'
-    #recommended type: interval selection strategy, i.e. 'random', 'optimal' or 'custom' ------------------------------------
+    # recommended type: interval selection strategy, i.e. 'random', 'optimal' or 'custom' ------------------------------
     INTERVAL_SELECT_STRATEGY = 'interval.selection.strategy'
-
-
-    PROTOCOL_VERSION = 'protocol.version'
-    HOSTING_VERSION = 'hosting.version'
-    SOURCE_PLATFORM = 'src.platform'
+    # recommended type: version number (string)
+    PROTOCOL_VERSION = 'protocol.version'  # version of the protocol to be used
+    HOSTING_VERSION = 'hosting.version'  # version of the protocol being hosted on targets
+    # recommended type: platform abridgement, i.e. 'Win7', 'WinXP' or 'linux'
+    SOURCE_PLATFORM = 'src.platform'  # the operating system used by attacker aka source
+    # recommended type: string
     CUSTOM_PAYLOAD = 'custom.payload'  # custom payload for ftp exploits
-    CUSTOM_PAYLOAD_FILE = 'custom.payload.file'  # file that contains custom payload for ftp exploits
 
 
 class ParameterTypes(enum.Enum):

+ 3 - 3
code/Attack/DDoSAttack.py

@@ -37,7 +37,7 @@ class DDoSAttack(BaseAttack.BaseAttack):
             atkParam.Parameter.PORT_DESTINATION: atkParam.ParameterTypes.TYPE_PORT,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.NUMBER_ATTACKERS: atkParam.ParameterTypes.TYPE_INTEGER_POSITIVE,
             atkParam.Parameter.ATTACK_DURATION: atkParam.ParameterTypes.TYPE_INTEGER_POSITIVE,
             atkParam.Parameter.VICTIM_BUFFER: atkParam.ParameterTypes.TYPE_INTEGER_POSITIVE
@@ -62,7 +62,7 @@ class DDoSAttack(BaseAttack.BaseAttack):
         self.add_param_value(atkParam.Parameter.MAC_SOURCE, self.generate_random_mac_address(num_attackers))
         self.default_port = int(inet.RandShort())
         self.add_param_value(atkParam.Parameter.PORT_SOURCE, self.default_port)
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND, 0)
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND, 0)
         self.add_param_value(atkParam.Parameter.ATTACK_DURATION, rnd.randint(5, 30))
 
         # victim configuration
@@ -118,7 +118,7 @@ class DDoSAttack(BaseAttack.BaseAttack):
         ip_destination = self.get_param_value(atkParam.Parameter.IP_DESTINATION)
 
         most_used_ip_address = self.statistics.get_most_used_ip_address()
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
         if pps == 0:
             result = self.statistics.process_db_query(
                 "SELECT MAX(maxPktRate) FROM ip_statistics WHERE ipAddress='" + ip_destination + "';")

+ 3 - 3
code/Attack/EternalBlueExploit.py

@@ -44,7 +44,7 @@ class EternalBlueExploit(BaseAttack.BaseAttack):
             atkParam.Parameter.PORT_DESTINATION: atkParam.ParameterTypes.TYPE_PORT,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
         })
 
     def init_params(self):
@@ -73,7 +73,7 @@ class EternalBlueExploit(BaseAttack.BaseAttack):
         self.add_param_value(atkParam.Parameter.PORT_DESTINATION, SMBLib.smb_port)
 
         # Attack configuration
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
@@ -84,7 +84,7 @@ class EternalBlueExploit(BaseAttack.BaseAttack):
         """
         # Timestamp
         timestamp_next_pkt = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # calculate complement packet rates of BG traffic per interval
         complement_interval_pps = self.statistics.calculate_complement_packet_rates(pps)

+ 3 - 3
code/Attack/FTPWinaXeExploit.py

@@ -35,7 +35,7 @@ class FTPWinaXeExploit(BaseAttack.BaseAttack):
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
             atkParam.Parameter.IP_SOURCE_RANDOMIZE: atkParam.ParameterTypes.TYPE_BOOLEAN,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.CUSTOM_PAYLOAD: atkParam.ParameterTypes.TYPE_STRING,
             atkParam.Parameter.CUSTOM_PAYLOAD_FILE: atkParam.ParameterTypes.TYPE_STRING
         })
@@ -67,7 +67,7 @@ class FTPWinaXeExploit(BaseAttack.BaseAttack):
         if isinstance(victim_mac, list) and len(victim_mac) == 0:
             victim_mac = self.generate_random_mac_address()
         self.add_param_value(atkParam.Parameter.MAC_SOURCE, victim_mac)
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
@@ -79,7 +79,7 @@ class FTPWinaXeExploit(BaseAttack.BaseAttack):
         """
         Creates the attack packets.
         """
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # Timestamp
         timestamp_next_pkt = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)

+ 3 - 3
code/Attack/JoomlaRegPrivExploit.py

@@ -44,7 +44,7 @@ class JoomlaRegPrivExploit(BaseAttack.BaseAttack):
             # atkParam.Parameter.TARGET_URI: atkParam.ParameterTypes.TYPE_URI,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
         })
 
     def init_params(self):
@@ -73,7 +73,7 @@ class JoomlaRegPrivExploit(BaseAttack.BaseAttack):
 
         # Attack configuration
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
 
@@ -84,7 +84,7 @@ class JoomlaRegPrivExploit(BaseAttack.BaseAttack):
         # Timestamp
         timestamp_next_pkt = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)
 
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # Calculate complement packet rates of BG traffic per interval
         complement_interval_pps = self.statistics.calculate_complement_packet_rates(pps)

+ 3 - 3
code/Attack/MS17ScanAttack.py

@@ -43,7 +43,7 @@ class MS17ScanAttack(BaseAttack.BaseAttack):
             atkParam.Parameter.PORT_DESTINATION: atkParam.ParameterTypes.TYPE_PORT,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
         })
 
     def init_params(self):
@@ -72,7 +72,7 @@ class MS17ScanAttack(BaseAttack.BaseAttack):
         self.add_param_value(atkParam.Parameter.PORT_DESTINATION, SMBLib.smb_port)
 
         # Attack configuration
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
@@ -83,7 +83,7 @@ class MS17ScanAttack(BaseAttack.BaseAttack):
         """
         # Timestamp
         timestamp_next_pkt = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # calculate complement packet rates of BG traffic per interval
         complement_interval_pps = self.statistics.calculate_complement_packet_rates(pps)

+ 6 - 6
code/Attack/MembersMgmtCommAttack.py

@@ -63,7 +63,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
 
             # whether the destination port of a response should be the ephemeral port 
             # its request came from or a static (server)port based on a hostname
-            Param.MULTIPORT: ParameterTypes.TYPE_BOOLEAN,
+            Param.PORT_MULTI: ParameterTypes.TYPE_BOOLEAN,
 
             # information about the interval selection strategy
             Param.INTERVAL_SELECT_STRATEGY: ParameterTypes.TYPE_INTERVAL_SELECT_STRAT,
@@ -72,7 +72,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
 
             # determines whether injected packets are marked with an unused IP option
             # to easily filter them in e.g. wireshark
-            Param.HIDDEN_MARK: ParameterTypes.TYPE_BOOLEAN
+            Param.PACKETS_MARK: ParameterTypes.TYPE_BOOLEAN
         }
 
         # create dict with MessageType values for fast name lookup
@@ -116,12 +116,12 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
         self.add_param_value(Param.TTL_FROM_CAIDA, False)
 
         # do not use multiple ports for requests and responses
-        self.add_param_value(Param.MULTIPORT, False)
+        self.add_param_value(Param.PORT_MULTI, False)
 
         # interval selection strategy
         self.add_param_value(Param.INTERVAL_SELECT_STRATEGY, "optimal")
 
-        self.add_param_value(Param.HIDDEN_MARK, False)
+        self.add_param_value(Param.PACKETS_MARK, False)
 
     def generate_attack_pcap(self):
         """
@@ -148,7 +148,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
         over_thousand = False
 
         msg_packet_mapping = MessageMapping(messages, self.statistics.get_pcap_timestamp_start())
-        mark_packets = self.get_param_value(Param.HIDDEN_MARK)
+        mark_packets = self.get_param_value(Param.PACKETS_MARK)
 
         # create packets to write to PCAP file
         for msg in messages:
@@ -578,7 +578,7 @@ class MembersMgmtCommAttack(BaseAttack.BaseAttack):
             return port
 
         # create port configurations for the bots
-        use_multiple_ports = self.get_param_value(Param.MULTIPORT)
+        use_multiple_ports = self.get_param_value(Param.PORT_MULTI)
         for bot in sorted(bot_configs):
             bot_configs[bot]["SrcPort"] = filter_reserved(port_selector.select_port_udp)
             if not use_multiple_ports:

+ 4 - 4
code/Attack/MemcrashedSpooferAttack.py

@@ -31,7 +31,7 @@ class MemcrashedSpooferAttack(BaseAttack.BaseAttack):
             atkParam.Parameter.IP_VICTIM: atkParam.ParameterTypes.TYPE_IP_ADDRESS,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.ATTACK_DURATION: atkParam.ParameterTypes.TYPE_INTEGER_POSITIVE
         })
 
@@ -53,8 +53,8 @@ class MemcrashedSpooferAttack(BaseAttack.BaseAttack):
         # IP of the victim which is supposed to get hit by the amplified attack
         self.add_param_value(atkParam.Parameter.IP_VICTIM, self.generate_random_ipv4_address('A'))
 
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND, (self.statistics.get_pps_sent(most_used_ip) +
-                             self.statistics.get_pps_received(most_used_ip)) / 2)
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND, (self.statistics.get_pps_sent(most_used_ip) +
+                                                                          self.statistics.get_pps_received(most_used_ip)) / 2)
         self.add_param_value(atkParam.Parameter.ATTACK_DURATION, rnd.randint(5, 30))
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
 
@@ -65,7 +65,7 @@ class MemcrashedSpooferAttack(BaseAttack.BaseAttack):
         mac_amplifier = self.get_param_value(atkParam.Parameter.MAC_DESTINATION)
         ip_victim = self.get_param_value(atkParam.Parameter.IP_VICTIM)
 
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         timestamp_next_pkt = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)
         self.attack_start_utime = timestamp_next_pkt

+ 3 - 3
code/Attack/PortscanAttack.py

@@ -37,7 +37,7 @@ class PortscanAttack(BaseAttack.BaseAttack):
             atkParam.Parameter.PORT_DEST_SHUFFLE: atkParam.ParameterTypes.TYPE_BOOLEAN,
             atkParam.Parameter.PORT_DEST_ORDER_DESC: atkParam.ParameterTypes.TYPE_BOOLEAN,
             atkParam.Parameter.IP_SOURCE_RANDOMIZE: atkParam.ParameterTypes.TYPE_BOOLEAN,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.PORT_SOURCE_RANDOMIZE: atkParam.ParameterTypes.TYPE_BOOLEAN
         })
 
@@ -71,7 +71,7 @@ class PortscanAttack(BaseAttack.BaseAttack):
         self.add_param_value(atkParam.Parameter.PORT_DEST_ORDER_DESC, 'False')
         self.add_param_value(atkParam.Parameter.PORT_SOURCE, rnd.randint(1024, 65535))
         self.add_param_value(atkParam.Parameter.PORT_SOURCE_RANDOMIZE, 'False')
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
@@ -82,7 +82,7 @@ class PortscanAttack(BaseAttack.BaseAttack):
         """
         mac_source = self.get_param_value(atkParam.Parameter.MAC_SOURCE)
         mac_destination = self.get_param_value(atkParam.Parameter.MAC_DESTINATION)
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # Calculate complement packet rates of the background traffic for each interval
         complement_interval_pps = self.statistics.calculate_complement_packet_rates(pps)

+ 3 - 3
code/Attack/SMBLorisAttack.py

@@ -33,7 +33,7 @@ class SMBLorisAttack(BaseAttack.BaseAttack):
             atkParam.Parameter.MAC_DESTINATION: atkParam.ParameterTypes.TYPE_MAC_ADDRESS,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.ATTACK_DURATION: atkParam.ParameterTypes.TYPE_INTEGER_POSITIVE,
             atkParam.Parameter.NUMBER_ATTACKERS: atkParam.ParameterTypes.TYPE_INTEGER_POSITIVE
         })
@@ -67,7 +67,7 @@ class SMBLorisAttack(BaseAttack.BaseAttack):
         if isinstance(destination_mac, list) and len(destination_mac) == 0:
             destination_mac = self.generate_random_mac_address()
         self.add_param_value(atkParam.Parameter.MAC_DESTINATION, destination_mac)
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
@@ -77,7 +77,7 @@ class SMBLorisAttack(BaseAttack.BaseAttack):
         """
         Creates the attack packets.
         """
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # Timestamp
         first_timestamp = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)

+ 3 - 3
code/Attack/SMBScanAttack.py

@@ -40,7 +40,7 @@ class SMBScanAttack(BaseAttack.BaseAttack):
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
             atkParam.Parameter.IP_SOURCE_RANDOMIZE: atkParam.ParameterTypes.TYPE_BOOLEAN,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_PPS: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.PORT_SOURCE_RANDOMIZE: atkParam.ParameterTypes.TYPE_BOOLEAN,
             atkParam.Parameter.HOSTING_IP: atkParam.ParameterTypes.TYPE_IP_ADDRESS,
@@ -69,7 +69,7 @@ class SMBScanAttack(BaseAttack.BaseAttack):
 
         self.add_param_value(atkParam.Parameter.PORT_SOURCE, rnd.randint(1024, 65535))
         self.add_param_value(atkParam.Parameter.PORT_SOURCE_RANDOMIZE, 'True')
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
 
@@ -90,7 +90,7 @@ class SMBScanAttack(BaseAttack.BaseAttack):
         Creates the attack packets.
         """
 
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # Calculate complement packet rates of the background traffic for each interval
         complement_interval_pps = self.statistics.calculate_complement_packet_rates(pps)

+ 3 - 3
code/Attack/SQLiAttack.py

@@ -44,7 +44,7 @@ class SQLiAttack(BaseAttack.BaseAttack):
             # atkParam.Parameter.TARGET_URI: atkParam.ParameterTypes.TYPE_URI,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
         })
 
     def init_params(self):
@@ -75,7 +75,7 @@ class SQLiAttack(BaseAttack.BaseAttack):
 
         # Attack configuration
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
 
@@ -85,7 +85,7 @@ class SQLiAttack(BaseAttack.BaseAttack):
         """
         # Timestamp
         timestamp_next_pkt = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # Calculate complement packet rates of BG traffic per interval
         complement_interval_pps = self.statistics.calculate_complement_packet_rates(pps)

+ 3 - 3
code/Attack/SalityBotnet.py

@@ -33,7 +33,7 @@ class SalityBotnet(BaseAttack.BaseAttack):
             atkParam.Parameter.IP_SOURCE: atkParam.ParameterTypes.TYPE_IP_ADDRESS,
             atkParam.Parameter.INJECT_AT_TIMESTAMP: atkParam.ParameterTypes.TYPE_FLOAT,
             atkParam.Parameter.INJECT_AFTER_PACKET: atkParam.ParameterTypes.TYPE_PACKET_POSITION,
-            atkParam.Parameter.PACKETS_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
+            atkParam.Parameter.PACKET_LIMIT_PER_SECOND: atkParam.ParameterTypes.TYPE_FLOAT
         })
 
     def init_params(self):
@@ -51,7 +51,7 @@ class SalityBotnet(BaseAttack.BaseAttack):
 
         # Attack configuration
         self.add_param_value(atkParam.Parameter.INJECT_AFTER_PACKET, rnd.randint(0, self.statistics.get_packet_count()))
-        self.add_param_value(atkParam.Parameter.PACKETS_PER_SECOND,
+        self.add_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND,
                              (self.statistics.get_pps_sent(most_used_ip_address) +
                               self.statistics.get_pps_received(most_used_ip_address)) / 2)
 
@@ -63,7 +63,7 @@ class SalityBotnet(BaseAttack.BaseAttack):
         # Timestamp
         timestamp_next_pkt = self.get_param_value(atkParam.Parameter.INJECT_AT_TIMESTAMP)
 
-        pps = self.get_param_value(atkParam.Parameter.PACKETS_PER_SECOND)
+        pps = self.get_param_value(atkParam.Parameter.PACKET_LIMIT_PER_SECOND)
 
         # Calculate complement packet rates of BG traffic per interval
         complement_interval_pps = self.statistics.calculate_complement_packet_rates(pps)