A Reinforcement Learning model for DoS attacks on TCP, UDP and SCTP protocols
355
This type of attack employs a Reinforcement Learning algorithm, which is an unsupervised machine learning method. This approach does not require training and validation data but can adapt its policy based on the execution environment. The chosen Reinforcement Learning model is Deep Q learning, which can scan the target's open ports and devise denial of service strategies based on the available services. In each iteration, it assesses the quality of the target's services, aiming to degrade them or prevent new users from accessing them.
The model can target three protocols: TCP, UDP, and SCTP. It can attack each protocol individually or orchestrate a combined attack on two or all three simultaneously. The Deep Q learning agent autonomously determines its policy, including the number of threads per iteration, requests per thread, session maintenance, and inter-request time intervals.
Additionally, the algorithm can self-generate network packets, deciding the type, structure, and quantity to effectively degrade the target's service quality. This feature enhances the attack's adaptability and ability to exploit vulnerabilities in the target system.
The tool was developed using Python version 3.11 and the PyTorch framework version 2.0.1. Before initiating the DoS attack, the script checks if the machine meets the necessary prerequisites, specifically the capability to open at least 210 parallel threads. 10 threads are used to evaluate service quality before and during the attack, while the remaining 200 are allocated for the AI to execute the attack. The AI dynamically adjusts the number of threads it uses based on its strategy, optimising the use of available computing resources.
The attack script is containerised for quick and easy execution in any Linux environment. The container includes the pre-trained weights of the AI model, facilitating efficient deployment and execution. It is run via the command line, with the target's IP address passed as a parameter using the -ip flag. The user can also specify whether to set the model in learning mode or testing mode using the -mode flag followed by either the “training” or “testing” parameter. In both modes, the model loads pre-trained weights. The key difference is that in training mode, the model performs exploration first and exploitation after. Alternatively, If the user set the “testing” parameter, in the initial stage, the AI makes deliberate choices, and as it progresses.
Commands:
docker pull certharrow/ai_dos
docker run --rm --network="host" -it certharrow/ai_dos ./ai_dos.bin -ip <target_ip> -mode <testing/training>
ip <target_ip>: This is where you specify the target's IP address. Replace <target_ip> with the actual IP address of the target machine.
mode <training/testing>: This is where you specify the operation mode for the AI.
Example:
docker run --rm --network="host" -it certharrow/ai_dos ./ai_dos.bin -ip 10.0.0.1 -mode testing
Content type
Image
Digest
sha256:0ddc416b6…
Size
524.2 MB
Last updated
over 2 years ago
docker pull certharrow/ai_dos