Malware, exposed on the ground control station, can tamper with the unmanned aerial vehicles (UAVs) interaction information. It makes UAVs vulnerable to the desired trajectory attacks, which deteriorates the flight safety if no timely action is taken. Therefore, this article focus on fast reactive mechanism for desired trajectory attacks on UAVs. A fixed-time detection scheme is proposed based on fixed-time unknown inputs observer and trajectory tracking errors. Subsequently, a fixed-time sliding mode attack observer is developed to compensate the effect caused by attacks. Meanwhile, the estimation errors of attacks can be stabilized within fixed time. Finally, experiment tests are presented to demonstrate the effectiveness of the proposed methods.