Mobile Ad hoc NETworks (MANETs) is a dynamic network which the mobile node does not have any infrastructure. Link breakages exist due to its high mobility of nodes which leads to frequent path failures and route discoveries. In broadcasting mechanism, the mobile node blindly rebroadcasts the first received route request, even if there is no route to destination leads to broadcast storm problem. Attacks are the main issues in mobile ad hoc networks such as DoS, wormhole attacks, etc. In this paper, an Attack Detection and Prevention Algorithm (ADPA) is implemented with Neighbor Coverage based Probabilistic Rebroadcast protocol (NCPR) for ensuring security along with improved performance in the network.