With the demand for rapid exchanges of information, device to device (D2D) communications become one of the essential components of next-generation network architecture. To realize efficient D2D communication, peer discovery plays an important role since the discovery result strongly affects further performance. Most of the researches on peer discovery in D2D communication are based on discovering proximity devices to recognize nearby destination devices. In particular, some researches focus on time slot distribution to broadcast address information for discovering proximity devices. Moreover, other researches pay attention to user grouping with different beacon probing signals. However, these peer discovery mechanisms do not consider the risks that source devices may encounter malicious devices in real situations. As a solution to this, this paper proposes a peer discovery mechanism which applies the social network relationship information to exclude malicious devices. The proposed mechanism contributes to decrease the probability of encountering malicious devices and enhances the efficiency of peer discovery by excluding malicious devices. Simulations clarify that the base station (BS) extracts trusted candidates among devices to quantify the trust degree of devices based on the potential social information.