In this paper we address the problem of robustly estimating the position of randomly deployed nodes of a Wireless Sensor Network (WSN), in the presence of security threats. We propose a range-independent localization algorithm called HiRLoc, that allows sensors to passively determine their location with high resolution, without increasing the number of reference points, or the complexity of the hardware of each reference point. In HiRLoc, sensors determine their location based on the intersection of the areas covered by the beacons transmitted by multiple reference points. By combining the communication range constraints imposed by the physical medium with computationally efficient cryptographic primitives that secure the beacon transmissions, we show that HiRLoc is robust against known attacks on WSN, such as the wormhole attack, the Sybil attack and compromise of network entities. Finally, our performance evaluation shows that HiRLoc leads to a significant improvement in localization...