body: There is a new twist on the [DDOS](https://en.wikipedia.org/wiki/Denial-of-service_attack#Distributed_DoS) (distributed denial-of-service) attack vector which has been used for taking down servers on the internet.
  
  
  This newest version sends data packets targeting [memcached software](https://en.wikipedia.org/wiki/Memcached) that is utilized on many servers.
  
  
  Now an article in thehackernews.com describes a possible solution to this form of attack. Paragrah 5 in the article `'Kill Switch' to Mitigate Memcached DDoS Attacks — Flush 'Em All` (available [here](https://thehackernews.com/2018/03/prevent-memcached-ddos.html)) says that 
  
  
  
  > 
  > However, the good news is that researchers from Corero Network
  >  Security found a technique using which DDoS victims can send back a
  >  simple command, i.e., "shutdown\r\n", or "flush\_all\r\n", in a loop to
  >  the attacking Memcached servers in order to prevent amplification.
  > 
  > 
  > 
  
  
  This solution would essentially amount to sending commands back to the server that is attacking your server. 
  
  
  I have a couple of questions I would like to ask about this:
  
  
  1. Are there laws in USA against attacking a server that is attacking
  your servers?
  2. If such laws exist, do they include attacks executed by humans or
  would it be legal for a "self-defense" bot to autonomously undertake
  such attack?
  
  
  
title: Legality of manual counterattacks vs counterattacks executed autonomously by a self-defense bot