Delay tolerant networks (DTNs) have recently emerged as the preferred method of transmitting data to the destination node(DN). Furthermore, communications are sent through intermediary nodes, which impacts network security. The difficulty arises also due to selfish nodes and malicious nodes. To improve the efficiency of the network's transmission and reduce the number of dropped packets, Spider-Monkey-based Node Identity Confirmation (SMbNIC) architecture has been proposed in this paper. More than a hundred nodes are first set up in the DTN ecosystem. Each node's energy value is determined, and fitness is used in the DTN ecosystem to detect and eliminate selfish nodes and malicious nodes. When the proposed method's performance is compared to that of existing methods, it is clear that the proposed method is vastly superior in terms of reduced energy consumption, increased throughput, decreased delay in routing packets from source to destination, reduced packet loss, and increased packet transmission rate. Using these values, one may better construct a resilient and long-lasting network.