Due to the expansion of cybercrime and cyberwarfare, the necessity for cyber security has recently expanded substantially. There are several trends in cyber security, but the most important is e-governance. E-government is regarded as one of the most essential platforms for transmitting data and services over the internet that frequently contain valuable and confidential data, making them subject to threats. The majority of egovernance systems rely on public-use services. The paper proposed a framework to detect threats in internet traffic flows. This paper uses a famous dataset that was collected from internet traffic called the UNSW-NB15 dataset, which consists of 307,099 instances. The framework consists of several steps, including pre-processing, identifying a correlation between features, and selecting the best ones. Finally, different machine learning algorithms are used to distinguish the normal traffic from the malware traffic. The findings uncover that SVM achieved very high accuracy (99.16%). Additionally, in the second part, which is called multi-class and consists of two stages, in the first one the study classified the abnormal flows into nine attacks with a lower accuracy of 77.80%. In the second stage with binary classification, the dataset contained both normal and abnormal, and the accuracy improved significantly to 97.48% for SVM.