In the Internet of Things (IoT) smart objects are able to provide or require specific services. The goal of this work is to identify malicious behavior of nodes performing selective attacks. In this type of attacks the nodes selectively decide what kind of service they will provide to the network, in order to save resources. We use a trust management model to detect such behavior. We perform network simulations using Contiki-OS to analyze the performance of the trust model. The simulation results show a good performance against nodes executing selective attacks. Keywords— Internet of Things; trust management; selective attacks, security.