For IoT enabled networks, the security and privacy is one of the important research challenge due to open nature of wireless communications, especially for the networks like Vehicular Ad hoc Networks (VANETs). The characteristics like heterogeneity, constrained resources, scalability requirements, uncontrolled environment etc. makes the problems of security and privacy even more challenging. Additionally, the high degree of availability needs of IoT networks may compromise the integrity and confidentially of communication data. The security threats mainly performed during the operations of data routing, hence designing the secure routing protocol main research challenge for IoT networks. In this paper, to design the lightweight security algorithm the use of Named Data Networking (NDN) which provides the benefits applicable for IoT applications like built-in data provenance assurance, stateful forwarding etc. Therefore the novel security framework NDN based Cross-layer Attack Resistant Protocol (NCARP) proposed in this paper. In NCARP, we designed the cross-layer security technique to identify the malicious attackers in network to overcome the problems like routing overhead of cryptography and trust based techniques. The parameters from the physical layer, Median Access Control (MAC) layer, and routing/network layer used to compute and averages the trust score of each highly mobility nodes while detecting the attackers and establishing the communication links. The simulation results of NCARP is measured and compared in terms of precision, recall, throughput, packets dropped, and overhead rate with state-of-art solutions.