A Denial of Service (DoS) attack is a malicious attempt to affect the availability of a targeted system, such as a…