Intrusion Detection Systems (IDS) are necessary to provide security to ad hoc networks. It helps to detect and prevent Denial of Service (DoS) attacks and hence will reduce power consumption occurring during the transmission of message. Data preprocessing plays a major role in Intrusion Detection System (IDS), since it provides the optimal and valuable dataset to the Intrusion Detection System. In this paper, we propose a new intrusion detection system having an attribute selection algorithm, classifier and architecture for the proposed system. The attribute selection method is used for removing the redundant attributes which are used in decision making on intrusions. In addition, we used an enhanced C4.5 classification algorithm that was developed by extending the existing C4.5 algorithm. The experimental results show that the proposed approach provides higher detection rates and reduces false alarm rate. This system has been tested using KDD'99 Cup data set.