Network security is of utmost importance due to the ever-increasing number of connected devices and the growing sophistication of threats. Mobile Ad hoc networks (MANETs), characterized by their non-infrastructure and self-configured peer networks, are particularly vulnerable to various types of attacks. Therefore, it is imperative to implement an efficient Intrusion Detection System (IDS) capable of rapidly detecting attacks and alerting users to any malicious activities occurring on the network. Among the numerous threats faced by MANETs, the black hole attack stands out as one of the most serious. Originating from Denial of Service attacks, this type of threat has been extensively studied, and several solutions have been proposed. However, these solutions have become ineffective against the emergence of a new generation of black holes, known as smart black holes, which can circumvent most existing countermeasures. To address the challenge posed by smart black holes, we propose an IDS that focuses on early detection and isolation of malicious nodes. Our approach leverages locally shared information from neighboring nodes and utilizes the universal sink detection method derived from graph theory. Through simulations conducted in NS2, we have evaluated the effectiveness of our proposed approach. The results validate the efficiency of our system, as it enables prompt detection and isolation of smart black holes, leading to significant improvements in Packet Delivery Ratio (PDR) and throughput, with average enhancements of 97% and 90%, respectively. Consequently, our approach not only preserves network performance but also mitigates the impact of smart black hole attacks.