The increase in connected IoT devices causes increased vulnerability to cyber attacks. This research develops a hybrid machine learning model to detect real-time anomalies in IoT networks. This model combines the K-Nearest Neighbors (KNN) and Random Forest (RF) algorithms to increase accuracy and efficiency. Evaluation was carried out using the UNSW-NB15 dataset to test model performance. The results show that this hybrid approach is able to detect anomalies with high accuracy and a low false positive rate.