Cognitive radio networks (CRNs) are an emerging wireless communications technique for resolving the significant spectrum scarcity problem. Despite their promising characteristics, CRNs also introduce new security threats, especially the internal attacks during the spectrum sensing and allocation process, which can degrade the efficiency of spectrum sensing and allocation. To address this issue, this paper proposes a distributed secure cooperative spectrum sensing strategy (DSCS) based on a dynamic reputation model to defend against attacks and provide reliable spectrum sensing. Moreover, the reputation values are used as weights in a novel distributed cheat-proof spectrum allocation strategy (DCSA) based on the Vickrey-Clarke-Groves (VCG) mechanism. Both theoretical analysis and simulation results indicate that the proposed DSCS and DCSA strategies can provide an effective countermeasure against the internal spectrum sensing data falsification (SSDF) attacks through enabling secondary users to obtain more accurate cooperative sensing results in adversarial environments.