This study aimed to predict and detect cyberattacks using hybrid machine-learning models. The CICIoT2023 dataset was utilized for attack prediction and detection, and model performance was evaluated separately by performing thirty-four class (33+1), eight class (7+1), and binary (1+1) classifications according to the types of attacks in the dataset. Voting and stacking hybrid machine learning models were employed in this study, with Logistic Regression (LR), Gaussian Naive Bayes (GNB), and Random Forest (RF) algorithms selected as sub-models. Data preprocessing steps were applied to enhance model performance, and hyperparameter optimization was performed. As a result, this study achieved an accuracy of 98% in thirty-four class classifications, 88% in eight class classifications, and 99% in binary classifications with the Voting hybrid machine learning model. In contrast, the Stacking hybrid machine learning model reached an accuracy of 98% in both thirty-four class and eight class classifications and 99% in binary classifications. This study presents a significant innovation in the cybersecurity field by introducing an innovative approach to eliminating the disadvantages of single-model methods.