In this paper, we address wireless sensor network localization problems that have high reliability in an environment where physical node destruction is possible. We propose a range-independent location algorithm called security location based on genetic algorithm (GASL) that allows sensors to passively determine their location with high reliability, without increasing the number of reference points, or the complexity of the hardware of each reference point or node. In GASL, sensors determine their location based on the optimization of select function by the reliability by aim at some reference point process location compute confirm and remainder energy and distance of node to reference point. By combining the communication range constraints imposed by the physical medium with computationally efficient cryptographic primitives that secure the beacon transmissions. We show that GASL is robust against diversified known attacks and mostly unknown attacks on WSN, such as the wormhole attack, the sybil attack, and inject misdate attack, etc. Finally, our performance evaluation shows that GASL leads to significant improvement in location accuracy and security compared with state of the art range independent location schemes.