three phases of an attack