Nowadays, network security has become a very important aspect due to the increasing number of connected things and the multiple threats that become more and more intelligent. Mobile Ad hoc networks (MANET), known to be non-infrastructure and self-configured peer networks, are subject to multiple types of attacks. For this reason, it is essential to implement an Intrusion Detection System that realizes fast attack detection to alert users by any malicious activity taking place on the network. Black hole is one of the most serious threats in MANETs, witch is the origin of Denial of service attack. This type of threats has been widely studied and many solutions were proposed. Unfortunately these solutions has become inefficient against the new generation of black holes, known also as smart black holes, witch can deceive most of these solutions. To overcome smart black holes, we proposed an Intrusion Detection System based on the early detecting and isolating malicious nodes by exploiting local information shared by neighbors and using universal sink detection method in graph theory. We proved that smart black holes can defeat the sequence number threshold-based detection strategy by using leastsquare method. Simulations in NS2, showed the efficiency of the proposed approach, which can quickly detect and isolate smart black holes, improve the Packet delivery ratio (PDR) and throughput by an average of 97% and 90%, respectively, thus preserving the network performances.