# Deep-Learning-Based Approach for IoT Attack and Malware Detection
## 4 Experimental Results  
The experiments were conducted on a personal computer equipped with an NVidia RTX 4080 GPU, 128 GB of memory and a 13 th-generation Intel Core i9-13900K processor running Windows 11. The proposed CNN model was developed using a MATLAB Deep Network Designer. The dataset was split into 70% training, 15% testing, and 15% validation. Stochastic Gradient Descent with Momentum (SGDM) was used as the solver, with an initial learning rate of 0.01, a mini-batch size of 32, and training over 30 epochs. The learning rate remained constant and was updated every 50 iterations, and all training was performed on the GPU. The performance of the proposed 1D CNN model was evaluated on several datasets. The model achieved a validation accuracy of 98.36% on the CIC IoT 2023 dataset, 99.90% on the CIC-MalMem-2022 dataset, and 96.64% on the CIC-IDS2017 dataset, indicating its effectiveness across different security domains such as IoT security, malware detection, and network attack detection. Figure 3 illustrates the accuracy and loss curves during training and validation on the CIC IoT 2023 dataset, showing strong performance and high accuracy throughout the process. Figure 4 presents the accuracy and loss curves obtained on the CIC-MalMem-2022 dataset. Here, the validation accuracy is also notably high, and it can be observed that the loss values decrease rapidly during the training process. Figure 5 presents the accuracy and loss curves for the CIC-IDS2017 dataset. These graphs also demonstrate the model's effectiveness in detecting network attacks, showcasing its robust performance throughout the training and validation phases. In this study, the datasets were divided into 70% training, 15% testing, and 15% validation. During the training phase, the model's parameters were optimized, the overall performance was monitored using the validation set, and the final performance was evaluated using the test set. The evaluation of the proposed model is based on the following metrics: accuracy, precision, recall, F1-score, and confusion matrix analysis. These metrics were chosen to provide a comprehensive evaluation of the model's performance, particularly in identifying both false positives and false negatives. The results obtained using the test datasets are presented in the following figures:  
Figure 6 shows the confusion matrix for the CIC IoT 2023 dataset. This matrix provides a detailed view of how accurately the model classified different classes and reveals the error rates. Figure 4: Accuracy and loss curves for the proposed CNN model on the CIC-MalMem-2022. Figure 5: Accuracy and loss curves for the proposed CNN model on the CIC-IDS2017. Figure 3: Accuracy and loss curves for the proposed CNN model on the CIC IoT 2023 dataset. Figure 6: Confusion matrix for the CIC IOT 2023 dataset. Figure 7 presents the confusion matrix for the CIC-MalMem-2022 dataset. This matrix visualizes the model's success in malware detection and highlights any potential classification errors. Figure 8 provides the confusion matrix for the CIC-IDS2017 dataset. This matrix illustrates the model's performance in detecting network attacks and shows the correct classification rates. Table 3 presents a percentage summary of the results obtained for different classes in the CIC IoT 2023 dataset. The model demonstrates high performance in attack types  
Figure 8: Confusion matrix for the CIC-IDS2017 dataset. Figure 7: Confusion matrix for the CIC-MalMem-2022 dataset. such as DDoS-ICMP_Flood (99.95% accuracy, 99.91% precision, and 99.93% recall), DDoS-PSHACK_Flood (99.96% accuracy, 99.92% precision, and 99.94% recall), and DDoS-SYN_Flood (99.60% accuracy, 99.78% precision, and 99.69% recall). However, it shows low performance in classes such as Backdoor_Malware (98.36% accuracy, 100% precision, and 4.56% recall) and DNS_Spoofing (48.41% accuracy, 26.71% precision, and 34.43% recall).