Intrusion Detection Systems (IDS) have become increasingly important as computer networks have grown in size and complexity over the last several years, and they have become an essential component of the system's infrastructure. Increases in the number of breaches into computer networks have been attributed to a thriving underground cybercrime market and advanced technologies that make it simpler to hack into computer networks over the past decade. Researchers in both industry and academia have been working on strategies to detect and prevent these types of security breaches for more than 40 years, and the results have been promising. They have also put in place systems to assist them in this endeavour. It is critical for an intrusion detection system (IDS) to be able to deal with situations such as a low detection rate and a large amount of work. One of the most pressing concerns facing the globe today is that of data security. The hacking of data can occur in a variety of ways, which can render any network or system less effective. Interceptor denial of service (IDS) systems that are still in use are incapable of keeping up with the continually changing and complex nature of incursion activities on computer networks. Discovering and preventing these types of attacks is one of the most difficult tasks we face today. Machine Learning has risen to become one of the most successful methods of learning about things in recent years, thanks to advances in artificial intelligence. Machine Learning approaches have the ability to generalise from known attacks to variations, or even discover new sorts of breaches, which is a beneficial thing for security professionals. In recent years, there has been a lot of research on how to combine multiple strategies in order to increase the detection rates of Machine Learning classifiers. Since the development process for intrusion detection systems has included the use of Artificial Neural Networks and Decision Trees, the technology has risen in popularity. In order to determine how well different machine learning classifiers performed with the KDD99 incursion dataset, a number of tests and evaluations were conducted. The study's main focus was on Grey Wolf optimization (GWO) models based on Gradient Boosted Decision Trees (GBDT). They were used to identify and categorise intrusions, among other things. Furthermore, this research looked into how to create attack rules by using a KDD99 dataset to look for anomalies in network audit data, which was then used to create attack rules. Performance indicators such as the false negative and false positive detection rates are important in order to increase the rate at which an intrusion detection system detects objects that have been broken into by an intruder. In the experiments, different algorithms are compared. There is evidence to suggest that the GBDT is the best since it is the most accurate and does not produce many false positives.