Data aggregation is an efficient technique widely used in Internet of Things (IOT) to collect statistics about data of interest. However, the resource-limited and the inherent unreliability of wireless transmission makes the sensors in the IOT are vulnerable to many attacks. Hence, how to design an efficient and secure data aggregation mechanism becomes critical. In this paper, we present TBSDA-a trust-based secure data aggregation scheme. In TBSDA, secure data aggregation is achieved by behavior-detected trust evaluation and data assembling technique. The trust evaluation and data aggregation work synergistically. We analyze the performance of TBSDA in term of communication overhead and the sensitivity of malicious nodes that behavior abnormally, and compare with other clustering scheme.