Eavesdropping is the act of secretly listening to the private conversation of others without their consent .In this paper explains how we can identify an active eavesdropper in the communication channel and how to drop it. We derive a new security attack from the pilot contamination phenomenon using PSO. Among the variety of threats and risks that wireless LANs are facing, session hijacking attacks are common and serious ones. Current techniques for detecting session hijacking attacks are mainly based on spoofable and predictable parameters such as sequence numbers, which can be guessed by the attackers.