Next Article in Journal
An Unsupervised Image Enhancement Framework for Multiple Fault Detection of Insulators
Previous Article in Journal
Explainable Deep Learning Framework for Binary Corrosion Image Classification Using Grad-CAM
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

AI-Driven Cybersecurity in IoT: Adaptive Malware Detection and Lightweight Encryption via TRIM-SEC Framework

by
Ibrahim Mutambik
Department of Computer Science and Engineering, College of Applied Studies, King Saud University, Riyadh P.O. Box 11451, Saudi Arabia
Sensors 2025, 25(22), 7072; https://doi.org/10.3390/s25227072
Submission received: 15 June 2025 / Revised: 19 August 2025 / Accepted: 26 August 2025 / Published: 19 November 2025

Abstract

The explosive growth in Internet of Things (IoT) technologies has given rise to significant security concerns, especially with the emergence of sophisticated and zero-day malware attacks. Conventional malware detection methods based on static or dynamic analysis often fail to meet the real-time operational needs and limited-resource constraints typical of IoT systems. This paper proposes TRIM-SEC (Transformer-Integrated Malware Security and Encryption for IoT), a lightweight and scalable framework that unifies intelligent threat detection with secure data transmission. The framework begins with Autoencoder-Based Feature Denoising (AEFD) to eliminate noise and enhance input quality, followed by Principal Component Analysis (PCA) for efficient dimensionality reduction. Malware classification is performed using a Transformer-Augmented Neural Network (TANN), which leverages multi-head self-attention to capture both contextual and temporal dependencies, enabling accurate detection of diverse threats such as Zero-Day, botnets, and zero-day exploits. For secure communication, TRIM-SEC incorporates Lightweight Elliptic Curve Cryptography (LECC), enhanced with Particle Swarm Optimization (PSO) to generate cryptographic keys with minimal computational burden. The framework is rigorously evaluated against advanced baselines, including LSTM-based IDS, CNN-GRU hybrids, and blockchain-enhanced security models. Experimental results show that TRIM-SEC delivers higher detection accuracy, fewer false alarms, and reduced encryption latency, which makes it well-suited for real-time operation in smart IoT ecosystems. Its balanced integration of detection performance, cryptographic strength, and computational efficiency positions TRIM-SEC as a promising solution for securing next-generation IoT environments.

1. Introduction

The explosive advancement and widespread deployment of intelligent technologies have markedly accelerated the proliferation of the Internet of Things (IoT), embedding smart devices throughout domains such as industrial automation, healthcare, smart homes, and transportation [1,2,3]. While this transformation has led to notable gains in operational efficiency and technological innovation [4,5], it has concurrently exposed IoT networks to serious and fast-emerging cybersecurity threats. The diverse, dynamic, and resource-limited characteristics of IoT environments render conventional security mechanisms difficult to apply effectively [6,7]. Many IoT endpoints are designed with limited computing power and optimized to be low cost, frequently omitting robust security measures. Consequently, they remain highly susceptible to numerous forms of cyberattacks, including unauthorized intrusions, distributed zero-day exploits, and increasingly advanced malware campaigns [7,8,9].
Cyber incidents such as the Mirai botnet attack, which compromised thousands of unsecured IoT nodes to orchestrate widespread service disruptions, underscore the critical need for smarter and adaptive malware detection and protection mechanisms [10,11]. Although existing countermeasures include encryption, authentication, and firmware updates [10], these methods alone are insufficient and reactive, especially when not embedded into the system design lifecycle. Artificial intelligence (AI), particularly machine learning techniques, has shown promise in improving malware detection through behavioral and anomaly-based analysis [12,13]. However, many of these approaches are limited by their reliance on historical data and signature patterns, making them ineffective against zero-day attacks and adversarial evasion strategies. Additionally, the resource-intensive nature of deep learning algorithms often surpasses the processing capabilities of standard IoT hardware, resulting in latency concerns, limited scalability, and obstacles to real-time functionality [12,14,15].
The proliferation of wireless communications among IoT devices further compounds these challenges, as open and broadcast-based architectures create numerous opportunities for eavesdropping and unauthorized data access [16,17,18]. These vulnerabilities are evident across a broad range of applications, from industrial machinery and transportation systems to everyday appliances like washing machines, HVAC systems, and smart TVs [19,20,21]. This creates a clear need for a security framework that is not only intelligent and adaptive, but also lightweight, scalable, and optimized for real-time deployment [22].
In response, this study proposes TRIM-SEC (Transformer-Integrated Malware Security and Encryption for IoT), an end-to-end framework designed to provide comprehensive, real-time malware detection and secure communication within constrained IoT environments [23,24]. TRIM-SEC is intended for deployment by cybersecurity practitioners, IoT vendors, and system integrators in domains such as smart cities, healthcare infrastructures, and industrial control systems. The framework is designed to protect not only IoT endpoints themselves but also the broader infrastructure that could be compromised as a consequence of vulnerable device behavior.
Unlike traditional detection models that depend heavily on predefined signatures, TRIM-SEC adopts a data-driven approach combining signal denoising, feature compression, and transformer-based sequence learning to boost detection accuracy while maintaining low overhead. The system starts with Autoencoder-Based Feature Denoising (AEFD) to clean irregular data inputs, followed by a dimensionality reduction stage using Principal Component Analysis (PCA), which identifies key features while ensuring low computational complexity. To detect diverse cyber threats, including botnets and zero-day attacks, the framework uses a Transformer-Augmented Neural Network (TANN) capable of capturing sequence-level context and time-based correlations within IoT network flows.
On the security front, TRIM-SEC integrates LECC to ensure fast and reliable encryption tailored for low-power environments. To further enhance efficiency, Particle Swarm Optimization (PSO) is employed to dynamically generate and adapt cryptographic key parameters based on IoT system limitations and operational performance factors. The framework is deployable on common edge and embedded systems such as Raspberry Pi, NVIDIA Jetson Nano, or equivalent low-power ARM-based devices with 2–4 GB RAM, ensuring feasibility even in resource-constrained deployments.
This integrated architecture enables TRIM-SEC to maintain high classification precision, minimized false alarms, and reduced latency, effectively balancing security with operational efficiency in practical applications. The main contributions offered by this study include:
(1)
proposing a novel lightweight AI-driven security framework for IoT;
(2)
integrating denoising and dimensionality reduction for enhanced data quality and feature extraction;
(3)
deploying a transformer-based model for accurate, real-time malware detection;
(4)
implementing low-overhead encryption tailored to IoT constraints;
(5)
optimizing cryptographic key generation through swarm intelligence.
The organization of this study is structured as follows: Section 2 reviews the relevant literature, Section 3 presents a detailed explanation of the proposed methodology, Section 4 analyzes the experimental findings and evaluates system performance, and Section 5 summarizes the main conclusions and outlines potential directions for future investigations.

2. Related Work

Recent progress in IoT security has centered around combining artificial intelligence (AI), machine learning (ML), blockchain technologies, and lightweight encryption schemes to manage the escalating sophistication of cybersecurity threats [3]. Given the heterogeneous and resource-constrained nature of IoT systems, a broad range of studies have aimed to enhance malware detection, classify threats more effectively, and ensure secure data transmission, all while maintaining a balance between computational overhead and detection accuracy.
Abbas et al. [25] developed a model that integrates optimized Elliptic Curve Cryptography (ECC) with deep Long Short-Term Memory (LSTM)-based neural networks to identify malware in IoT environments [26]. Their method relies on trust evaluation and behavioral context to detect compromised devices, followed by a preprocessing phase and classification process. Although the framework achieved strong detection rates and was resilient against known malicious patterns, its performance declined in identifying subtle anomalies, a limitation in scenarios requiring high precision and minimal false alarms, such as safety-critical applications.
Building on this fusion of encryption and deep learning, Alzakari [27] proposed a multi-layered security framework combining deep learning with blockchain for smart city data protection. The system applies missing value imputation, min-max normalization, and Savitzky–Golay filtering for data smoothing. After preprocessing, features are selected using Residual Sum of Squares (RSS), which are then analyzed within a blockchain-anchored system. Although the architecture supports high integrity and tamper resistance, its relatively low F1-score indicates inconsistency in balancing precision and recall, affecting its reliability for real-time response scenarios.
To further refine intrusion detection in IoT, Jagdish et al. [28] developed the GTBSS-HDNN framework, which integrates Group Theory-based Binary Spring Search (GTBSS) with a composite Deep Neural Network (HDNN). This approach is designed specifically for IoT intrusion detection by striking a balance between feature selection importance and model architectural efficiency. Security and data integrity are reinforced using blockchain technologies to maintain trustworthy data traceability. Although the system demonstrates strong recall and generalization against unknown threats, its higher error rates and intensive computation requirements reduce its practicality in resource-constrained IoT environments [29].
Focusing on domain-specific challenges in healthcare, Hizal et al. [30] proposed an attention-driven, multi-dimensional deep neural architecture for identifying malicious activity within Internet of Medical Things (IoMT) environments. This approach leverages byte-level characteristics extracted from ELF binaries, incorporating attention mechanisms to improve the learning of contextual representations. While the model successfully achieved lower error rates across a benchmark with varied architectures, its overall accuracy remained only moderate, raising questions about its robustness and ability to generalize across heterogeneous and rapidly evolving medical threat scenarios.
Addressing privacy concerns in sensitive systems, Kumar et al. [31] presented ANAF-IoMT, which integrates Rooted Elliptic Curve Cryptography and the Vigenère Cipher for secure medical data processing. The use of exponential k-anonymity and a Gaussian Mutated Chimp Optimization (GMCO)-tuned Elman Neural Network supports sensitive data categorization and privacy preservation. Although ANAF-IoMT achieved excellent accuracy, it exhibited limited precision, which could result in increased false alarms when deployed at scale.
Reinforcing the theme of privacy-preserving mechanisms, Gholami [32] offered a two-stage privacy-preserving architecture for general IoT networks, combining blockchain with Modified AdaBoost and LSTM-based identity verification. Data is encoded and encrypted using an autoencoder prior to blockchain storage, providing both confidentiality and immutability. This dual-layer approach proved effective in preserving user privacy with a high Negative Predictive Value (NPV), though its low recall implies a risk of undetected attacks under real-time conditions.
Extending privacy solutions to industrial systems, Kumar et al. [33] designed the Privacy-Preserving Threat Intelligence Framework (P2TIF) for Industrial IoT (IIoT) applications, featuring a deep learning classifier and a blockchain-based communication module. P2TIF demonstrates excellent protection against data poisoning and provides a scalable model for secure data sharing. However, like many blockchain-integrated systems, it faces latency issues and its limited recall suggests a need for better detection coverage.
Shifting focus to mobile platforms, Roy et al. [34] compiled a detailed survey of Android malware detection using CNNs, summarizing the methodologies across all stages of the ML pipeline [35]. Their findings emphasized the consistent challenge of low recall among CNN-based solutions, urging future research to address evasion techniques and adversarial learning strategies. The study supports the relevance of advanced neural architectures in mobile security but highlights their vulnerability to stealth attacks.
Enhancing CNN-based methods, Hasan et al. [36] proposed a D-CNN model combining API call graphs and permission features for Android malware detection. The hybrid architecture offers multiscale feature analysis and applies Ant Colony Optimization for dimensionality reduction. Despite improving generalization to novel malware variants, the approach recorded relatively low overall accuracy and a high false alarm rate, indicating inefficiencies in class discrimination.
Innovating through visual analytics, Maniriho et al. [37] introduced a hybrid detection model using texture-based image features, specifically leveraging Local Binary Patterns (LBP) in conjunction with the Gray-Level Co-occurrence Matrix (GLCM) for malware recognition via image-based analysis. A Multi-Layer Perceptron (MLP) was used to fuse outputs from several CNNs to strengthen classification accuracy. Although the model demonstrated high overall accuracy, its relatively low F1-score indicated limitations in managing class imbalances, particularly in underrepresented attack classes.
In a continuation of their work, Hossain et al. [38] developed a deep stacked ensemble for malware detection using volatile memory analysis. This cross-platform solution employs explainable AI, making it suitable for forensic applications. Benchmarked on diverse datasets, the model showed promising accuracy and interpretability, yet it struggled with maintaining consistent performance across different malware families and environments.

3. Proposed Methodology

This study introduces TRIM-SEC, a unified, lightweight framework specifically designed to strengthen threat identification and safeguard data exchange within evolving IoT ecosystems. The proposed methodology is structured around a sequential pipeline that integrates intelligent feature processing, advanced classification, and cryptographic protection, all optimized for resource-constrained deployments.
The process begins with the acquisition of network traffic data from a publicly available benchmark dataset, Malware Detection in Network Traffic, which serves as the foundational input for model training and evaluation. Suspicious nodes are identified based on dynamic trust scores, computed from contextual behavioral attributes, which reflect anomalous patterns in network activity.
To enhance data reliability, AEFD is applied to cleanse the dataset, effectively mitigating noise, redundancy, and inconsistencies that can degrade classifier performance. This denoising process improves the quality of extracted features, thereby reinforcing downstream analysis.
Following denoising, the system applies PCA for dimensionality reduction. This transformation retains the most informative components of the feature space while significantly lowering computational complexity, a critical requirement in time-sensitive IoT detection scenarios.
The reduced feature set is then passed to the TANN, which performs malware classification by capturing both temporal dynamics and contextual dependencies. Leveraging multi-head self-attention, TANN is capable of identifying a broad spectrum of cyber threats, including anomalies, Zero-Day, probing attacks, and Code Injection.
To secure data transmission, TRIM-SEC integrates LECC—a highly efficient encryption scheme tailored to the processing and energy limitations of IoT devices. Furthermore, to optimize encryption effectiveness and responsiveness, PSO is employed to dynamically tune cryptographic key parameters based on evolving system constraints and security requirements.

3.1. Data Acquisition

The initial stage of the TRIM-SEC framework emphasizes the ongoing and flexible collection of communication flow data originating from a broad spectrum of IoT endpoints. This strategy ensures the model is trained on a wide variety of behavior patterns and emergent cyber threats. The adaptive nature of this acquisition process helps maintain the model’s effectiveness amid fast-evolving security landscapes.
To ensure alignment with ethical and legal standards, the data collection mechanism complies with recognized governance policies, including international data privacy regulations like the General Data Protection Regulation (GDPR). It incorporates strong anonymization methods and secure data handling measures to protect individual privacy and prevent any form of unauthorized access.
This foundational step is critical to the overall architecture, as the quality and representativeness of the input data directly influence the effectiveness of both the malware detection and encryption modules. By ensuring a high-quality, privacy-compliant dataset, TRIM-SEC builds a solid basis for real-time threat mitigation in intelligent IoT infrastructures.

3.2. Preprocessing Using Autoencoder-Based Feature Denoising (AEFD)

To ensure high-quality data input for downstream analysis, the TRIM-SEC framework incorporates AEFD as an essential preprocessing step [39,40,41]. AEFD is particularly effective in addressing common issues in IoT data streams, such as noise interference, outliers, and missing values, which can significantly degrade classification accuracy in real-time scenarios.
In contrast to conventional denoising techniques that depend on fixed thresholds or manually defined statistical heuristics, AEFD utilizes the adaptive strength of unsupervised deep neural networks to autonomously extract compact and noise-resilient feature embeddings. This machine-driven methodology enables the system to adapt across diverse operating environments without requiring manual parameter adjustments.
The AEFD module includes two core elements: an encoder that transforms high-dimensional noisy data into a lower-dimensional latent representation, and a decoder that regenerates a purified version of the input from this latent space. The encoding process is mathematically represented as:
z = f θ x
where f θ denotes the encoder’s transformation function with learnable parameters θ , and z is the latent feature representation.
The decoder, tasked with restoring the original signal, maps z back to the input space to produce the denoised output:
x ^ = g ϕ ( z )
where g ϕ is the decoder function parameterized by ϕ , and x ^ approximates the clean version of the input x .
The learning process for the AEFD model is driven by the reduction in reconstruction error, commonly quantified using the Mean Squared Error (MSE), and is expressed as follows:
L A E F D = 1 n i = 1 x i x ^ i 2
in which n denotes the total count of input instances. This objective function guides the model to retain essential structural patterns while discarding unnecessary noise and insignificant variations.
To improve generalization and prevent overfitting, a regularization term can be incorporated into the latent space:
L t o t a l = L A E F D + λ z 2
where λ is a tunable regularization coefficient that controls the trade-off between reconstruction fidelity and latent representation sparsity.
By placing AEFD at the forefront of the TRIM-SEC processing pipeline, the framework ensures that only clean, semantically meaningful, and stable data are forwarded to the subsequent stages of dimensionality reduction and malware classification. This preprocessing step substantially enhances the reliability and robustness of the detection system, particularly under real-world IoT conditions characterized by inconsistent and noisy traffic behavior.

3.3. Feature Abstraction Through Principal Component Analysis (PCA)

To ensure scalable and discriminative feature representation, the TRIM-SEC framework incorporates PCA as a core mechanism for dimensionality reduction [42,43,44]. This technique plays a pivotal role in transforming high-dimensional IoT network traffic data into a more compact form while preserving the most informative statistical features. By doing so, PCA not only enhances the computational efficiency of downstream malware classification but also mitigates the impact of irrelevant or redundant variables that could otherwise impair detection accuracy.
The process begins with the formulation of the input data as a matrix X   R n x d , where n refers to the total number of IoT traffic records and d corresponds to the number of observed features. PCA then identifies a suitable linear mapping that projects the original data onto a set of orthogonal axes, known as principal components, which encapsulate the directions of greatest variance in the data distribution.
This transformation involves computing the covariance matrix Σ of the centered dataset, as follows:
Σ = 1 n i = 1 n 1 ( x i x ¯ ) ( x i x ¯ ) T
where
  • Σ is the sample covariance matrix,
  • x ¯ denotes the mean vector of the dataset,
  • x i observation in the feature space.
After deriving the eigenvalues and their associated eigenvectors from Σ , the top k eigenvectors linked to the highest eigenvalues are chosen to construct the projection matrix W k . This matrix identifies the axes that capture the most significant variance in the dataset. The original data is subsequently mapped into the k-dimensional space using the transformation:
Z = X W k
where
  • Z R n × W k is the reduced feature matrix used for subsequent classification.
The application of PCA within TRIM-SEC provides several critical advantages in the context of IoT-based malware detection:
  • Improved computational efficiency: By reducing the input dimensionality, PCA significantly decreases the processing time and memory requirements of the classification model.
  • Noise suppression: PCA naturally filters out less informative or noisy features, which often stem from sensor anomalies or missing values in IoT data streams.
  • Enhanced model generalization: Dimensionality reduction minimizes the risk of overfitting, thereby improving the classifier’s performance on previously unseen attack patterns.
By leveraging PCA, TRIM-SEC efficiently extracts compact and meaningful features that retain the structural variance inherent in IoT traffic. These refined features serve as the input to the TANN, which subsequently performs accurate and context-aware classification of diverse malware types, including zero-day, and botnet intrusions.

3.4. Classification Using Transformer-Augmented Neural Network (TANN)

To accurately classify malicious activities in IoT environments, the TRIM-SEC framework integrates a TANN [45,46,47]. TANN utilizes self-attention mechanisms that enable the capture of extended dependencies and intricate contextual associations within time-ordered IoT traffic sequences, an enhancement over traditional CNN or RNN-based approaches.
The classification process begins with embedding the denoised and dimensionally reduced feature vectors into a high-dimensional space. These embedded vectors are augmented with positional encodings to preserve the order of input data and are subsequently passed through Transformer encoder blocks. Each block employs multi-head attention mechanisms and feedforward layers to extract distinctive patterns linked to malware categories such as zero-day, botnet, and Code Injection attacks:
A t t e n t i o n ( Q , K , V ) = s o f t m a x ( Q K T d k V )
where
  • Q , K , and V represent the matrices corresponding to the query, key, and value derived from the input features.
This enables the model to selectively emphasize important features across temporal sequences.
The attention layer’s output is subsequently processed by dense layers and then subjected to a softmax function to derive class probabilities:
P t = [ P 1 , P 2 , , P e ]
where P t represents the predicted probability distribution over eee attack classes.
TANN is particularly suitable for real-time IoT deployments due to its parallel processing capability and modular structure. For resource-constrained devices, heavy computations can be offloaded to edge servers while retaining a lightweight inference footprint on the devices themselves.

3.5. Lightweight Elliptic Curve Cryptography (LECC) for Secure Data Transmission

This section presents the use of LECC for secure data transmission within the TRIM-SEC framework [48,49,50]. LECC is deliberately selected due to its computational efficiency and compatibility with resource-constrained IoT systems, delivering strong cryptographic protection while minimizing processing demands in comparison to conventional encryption approaches such as RSA or standard ECC schemes.
Unlike RSA, which requires large key sizes for strong security, Elliptic Curve Cryptography (ECC) achieves equivalent protection using significantly smaller keys—for example, a 160-bit ECC key matches the security level of a 1024-bit RSA key. This characteristic renders LECC particularly well-suited for real-time IoT contexts where computing resources are highly constrained. Within TRIM-SEC, an enhanced LECC protocol is employed to guarantee data confidentiality, integrity, and authentication during exchanges between IoT devices and centralized or edge-based servers.
To further enhance the efficiency of LECC, the key generation process is optimized using PSO. PSO dynamically searches the key space for optimal parameters that maximize security metrics while minimizing computational time and energy consumption. This ensures that the encryption mechanism is not only secure but also scalable and adaptive to the fluctuating demands of smart IoT networks.
LECC supports fast scalar multiplication, compact digital signatures, and low-power operation, making it well-suited for real-time encryption tasks in heterogeneous IoT systems. Its lightweight nature ensures that encryption and decryption processes introduce minimal latency, preserving the responsiveness required by critical time-sensitive IoT operations, including anomaly recognition, environmental sensing, and intelligent transportation systems.
LECC provides a secure, adaptable, and resource-efficient cryptographic mechanism for protecting data in the TRIM-SEC framework. When combined with advanced detection models like TANN, it ensures end-to-end protection of IoT communications without compromising system responsiveness or resource efficiency.

3.5.1. Polar Codes Overview

Polar codes are developed by repeatedly merging and dividing N separate instances of a binary discrete memoryless channel (B-DMC), resulting in N derived bit-channels. As the codeword length grows, these derived channels tend to become either highly dependable (with capacity nearing 1) or nearly useless (with capacity close to 0), a behavior referred to as channel polarization. This effect supports effective coding schemes by enabling the use of only the most dependable bit-channels for transmitting actual data.

3.5.2. Channel Polarization

In the context of polar coding, the polarization effect is produced through recursive operations that combine and split N identical copies of a base channel W. As N grows, the resulting channels polarize into two categories: those with almost perfect reliability and those with very poor reliability. The channels with high capacity are used for information transmission, whereas the unreliable ones are set to predetermined (frozen) values to facilitate decoding accuracy.

3.5.3. Key Generation Model

To further enhance security, PCBC integrates a physical-layer key generation mechanism, which exploits shared randomness in wireless channels for dynamic key derivation—eliminating reliance on pre-shared keys. This model significantly improves the confidentiality and integrity of transmitted data, especially in environments where frequent key updates and low-latency communication are essential.
The key generation scheme involves legitimate users A and B communicating over a shared wireless channel, while an eavesdropper E attempts interception. Both users measure reciprocal channel characteristics (e.g., RSSI, channel state information) to derive correlated observations. Due to spatial decorrelation, especially when E is beyond a half-wavelength from either user, their observations are uncorrelated, thus securing the communication.
The four key stages of the model are:
  • Channel Measurement: Users exchange pilot signals to measure channel features such as envelope, phase, and amplitude.
  • Quantization: Observed channel characteristics are transformed into binary sequences using lossless or lossy quantization techniques.
  • Information Reconciliation: Public protocols like the Cascade method or error-correcting codes are used to resolve discrepancies between A and B’s bit sequences.
  • Privacy Amplification: Entropy is increased by removing bits that may be partially known to the eavesdropper, using cryptographic hash functions or extractors.
Despite its promise, implementing PCBC in real-world IoT systems presents several challenges:
  • Computational Overhead: Encoding and decoding operations, though efficient in theory, may burden low-power IoT devices.
  • Heterogeneity of IoT Devices: The diversity in communication protocols and device capabilities complicates standardization and interoperability.
  • Latency Constraints: Ensuring real-time encryption and decryption while preserving high security is essential for time-sensitive IoT applications.
  • Key Management: Efficiently distributing and updating keys without compromising security is critical, particularly in dynamic and large-scale deployments.
In summary, PCBC provides a robust, scalable, and efficient approach to secure data transmission in IoT networks. When combined with transformer-based detection models such as TANN, it offers a comprehensive framework for ensuring end-to-end data confidentiality and integrity.

3.6. Key Generation via Particle Swarm Optimization (PSO)

Within the TRIM-SEC framework, PSO is employed to enhance the process of cryptographic key generation for LECC. PSO belongs to the class of bio-inspired optimization techniques and simulates the dynamic coordination seen in natural swarms like flocks of birds or schools of fish [51,52]. Owing to its low computational complexity and rapid convergence properties, PSO is ideally suited for deployment in resource-limited platforms such as IoT systems, where processing power and energy availability are restricted.
In this context, every entity in the swarm serves as a candidate cryptographic key. These entities explore the solution domain by continuously updating their velocities and positions based on their own optimal performance (personal best) as well as the optimal solution found by the entire swarm (global best), guided by the following update equations:
Velocity update:
v i t + = w v i t + c 1 r 1 ( p best x i t ) + c 2 r 2 ( g best x i t )
Position update:
x i t + = x i t + v i t +
Each candidate key is assessed through a fitness function that measures its cryptographic strength. In TRIM-SEC, it considers factors such as:
  • Key entropy
  • Resistance to differential attacks
  • Low computational overhead
An example of a simplified objective function is:
F i t n e s s = α H ( K ) β T ( K )
where
  • H ( K ) is the entropy of the key;
  • T ( K ) is the time to generate and validate the key;
  • α and β are weights to balance security and efficiency.
Through iterative exploration and exploitation of the key space, PSO quickly converges on optimal key parameters that are both secure and computationally lightweight—ideal for real-time encryption in smart IoT ecosystems.
By integrating PSO with LECC in the TRIM-SEC architecture, the framework ensures robust key management, enhances adaptability to evolving threats, and maintains operational efficiency in constrained devices and networks.

4. Results and Discussion

This segment presents a comprehensive experimental evaluation of the TRIM-SEC framework, implemented using Python 3.8 and tested within an emulated intelligent IoT setting. The evaluation leverages the publicly available TON_IoT dataset [53], which has been developed by the Cyber Range Lab of the Australian Centre for Cyber Security (ACCS). This dataset integrates telemetry from IoT sensors, operating system logs, and network flows, making it particularly suitable for real-time intrusion detection and secure communication studies.
The TON_IoT dataset contains over 22 million records, covering a diverse and up-to-date set of IoT-based cyber events. It includes modern and realistic attack scenarios such as distributed denial-of-service (DDoS), password brute force, injection attacks, man-in-the-middle, insider threats, and data exfiltration. Importantly, the dataset simulates zero-day attacks using obfuscated traffic patterns and payload anomalies that deviate from known signatures, enabling the evaluation of TRIM-SEC’s ability to generalize beyond signature-based detection. This ensures that the system’s performance is not biased towards historical attack signatures but is validated against novel and evolving threats.
The dataset is freely accessible for research purposes, which ensures reproducibility, transparency, and comparability of results with other state-of-the-art IoT security studies. Its recent release and wide adoption in the academic community further strengthen the reliability of TRIM-SEC’s reported outcomes.
TRIM-SEC combines AEFD, PCA, and TANN for malware detection, while LECC, optimized via PSO, delivers lightweight but resilient encryption. To benchmark its performance, TRIM-SEC was compared against leading-edge techniques, including LSTM-driven detection mechanisms, CNN-GRU hybrid networks, and blockchain-supported cybersecurity models. Across all tests, TRIM-SEC demonstrated superior results in terms of detection precision, encryption speed, and classification consistency, confirming its practicality for deployment in resource-constrained but security-critical IoT infrastructures.

4.1. Performance Metrics

For a thorough assessment of the TRIM-SEC framework’s performance, a collection of widely recognized evaluation metrics was utilized. These indicators enable a comprehensive, multi-angle analysis of classification effectiveness, resilience, and dependability when exposed to varied IoT-based attack scenarios. Each metric reflects a unique dimension of the system’s detection strength and error mitigation, contributing to a well-rounded performance review. In the following equations:
  • TP (True Positives) refer to malicious instances correctly classified as malicious;
  • FP (False Positives) are benign instances incorrectly classified as malicious;
  • TN (True Negatives) are benign instances correctly identified as benign;
  • FN (False Negatives) are malicious instances incorrectly classified as benign.
Accuracy evaluates the system’s overall predictive success by computing the ratio of correctly identified positives and negatives to the total instances examined:
A c c u r a c y = T P + T N T P + F P + T N + F N
Precision measures how effectively the model distinguishes true malicious cases among all positively flagged instances. It is especially crucial in sensitive scenarios where incorrect alerts could cause unnecessary operational strain:
P r e c i s i o n = T P T P + F P
Recall, also known as detection sensitivity, evaluates the system’s capacity to uncover all true positive events, including those stemming from covert or less obvious malware activities:
R e c a l l = T P T P + F N
Specificity quantifies the correct classification of benign instances, highlighting the system’s effectiveness in minimizing false positives and ensuring stability during normal operations:
S p e c i f i c i t y = T N T N + F P
Negative Predictive Value (NPV) indicates the probability that an instance labeled as negative is genuinely benign, making it a vital indicator for confidence in handling low-risk or routine traffic:
N P V = T N T N + F N
False Negative Rate (FNR) represents the share of real threats incorrectly classified as benign. A reduced FNR denotes enhanced proficiency in uncovering advanced or hidden attack vectors:
F N R = F N F N + T P
Collectively, these metrics provide a rigorous and interpretable foundation for evaluating the TRIM-SEC framework’s performance across classification and encryption tasks. They also facilitate meaningful comparisons with benchmark models, thereby highlighting the practical advantages of TRIM-SEC in real-world IoT security deployments.

4.2. Performance Analysis

Figure 1, Figure 2, Figure 3, Figure 4, Figure 5, Figure 6, Figure 7, Figure 8 and Figure 9 present the experimental evaluation results of the proposed TRIM-SEC framework, offering a comparative perspective against four advanced baseline models. These models were selected for their relevance to recent IoT security advancements and their diverse architectural characteristics. For clarity, the following acronyms are used throughout the figures:
  • EIDS-IECC-MDUL: An Ensemble-based Intrusion Detection System that integrates Energy-aware Intelligent Edge Clustering with Multi-Dimensional Unsupervised Learning, designed for energy-efficient and scalable anomaly detection in IoT.
  • AE-ADF-SSCD-BUDL: A hybrid model utilizing AutoEncoder-based Adaptive Feature denoising, Self-Supervised Component Decoding, and Bottom-Up Deep Learning, optimized for behavioral malware detection.
  • AOH-DNNA-IDRIN: A lightweight framework that combines Attention-Optimized Hybrid Deep Neural Networks with Intelligent Distributed Routing for Intrusion Notification, tailored for decentralized IoT ecosystems.
  • TRIM-SEC (Proposed): The Transformer-Integrated Malware Security and Encryption for IoT framework introduced in this paper, which combines Autoencoder-based feature denoising, PCA-based dimensionality reduction, Transformer-Augmented Neural Network (TANN) for classification, and lightweight cryptography optimized with Particle Swarm Optimization (PSO).
The evaluation focuses on critical performance metrics, including accuracy, precision, recall, specificity, error rate, Negative Predictive Value (NPV), and False Negative Rate (FNR). These metrics comprehensively capture detection reliability, false alarm mitigation, and classification robustness across multiple malware types and IoT attack vectors.
Figure 1 depicts the detection accuracy achieved by TRIM-SEC in comparison with four advanced baseline models—LSTM-IDS, CNN-GRU, Blockchain-SEC, and Hybrid-AE—across four prominent IoT threat categories: Anomaly, Zero-Day, Spoofing, and Code Injection. By leveraging the temporal and contextual learning capabilities of TANN, TRIM-SEC consistently surpasses all competing methods in every attack category. Its most significant improvement is observed in Code Injection detection, where it delivers up to a 32% accuracy boost, demonstrating its robustness in identifying sophisticated and elusive malware threats typically overlooked by conventional techniques.
Figure 1. Comparative Accuracy Analysis of TRIM-SEC and Baseline Models Across IoT Malware Categories.
Figure 1. Comparative Accuracy Analysis of TRIM-SEC and Baseline Models Across IoT Malware Categories.
Sensors 25 07072 g001
Figure 2 presents the precision analysis across the updated IoT attack types. The integration of AEFD and PCA in the TRIM-SEC framework enables effective isolation of relevant patterns while suppressing noisy or misleading features. This results in consistently higher precision, particularly in Zero-Day and Code Injection scenarios, where differentiating subtle malicious behaviors from legitimate traffic poses significant challenges. TRIM-SEC’s TANN further strengthens precision by capturing complex temporal dependencies, thus significantly reducing false positive rates when compared to baseline models.
Figure 2. Comparative Precision Analysis for IoT Malware Detection Across Attack Types.
Figure 2. Comparative Precision Analysis for IoT Malware Detection Across Attack Types.
Sensors 25 07072 g002
Figure 3 illustrates the error rate comparison across the four evaluated attack types: Anomaly, Zero-Day, Spoofing, and Code Injection. The TRIM-SEC framework consistently achieves lower error rates than all baseline models, reflecting the effectiveness of its dual-stage preprocessing using AEFD and PCA, as well as its TANN for precise classification. The most notable reduction is observed in the Code Injection and Zero-Day categories, where conventional models tend to struggle due to the subtle and evolving nature of such attacks. These results highlight TRIM-SEC’s robustness in minimizing misclassifications, making it a dependable solution for deployment in security-critical IoT infrastructures where high reliability is essential.
Figure 3. Comparative Error Rate Analysis Across IoT Attack Categories.
Figure 3. Comparative Error Rate Analysis Across IoT Attack Categories.
Sensors 25 07072 g003
Figure 4 evaluates the recall performance of the TRIM-SEC framework compared to baseline models across four attack categories: Anomaly, Zero-Day, Spoofing, and Code Injection. The TANN, central to TRIM-SEC, leverages multi-head self-attention to dynamically prioritize relevant temporal features, enabling superior detection of true positive instances. This results in significantly improved sensitivity, particularly in identifying stealthy and complex attack vectors such as zero-day and spoofing. The consistently high recall values confirm TRIM-SEC’s robustness in detecting diverse malware threats, making it well-suited for adaptive deployment in dynamic and security-critical IoT environments.
Figure 4. Recall Performance Comparison Across IoT Attack Types.
Figure 4. Recall Performance Comparison Across IoT Attack Types.
Sensors 25 07072 g004
Figure 5 illustrates the specificity performance of all evaluated models. The proposed TRIM-SEC framework demonstrates a consistently strong capability in accurately identifying normal traffic versus attack traffic, particularly in the Anomaly and Spoofing classes. This high specificity contributes to reducing false alarms, thereby enhancing operational confidence and reducing the burden of unnecessary mitigation actions in real-time IoT systems.
Figure 5. Specificity Comparison of TRIM-SEC and Baseline Models Across IoT Attack Types.
Figure 5. Specificity Comparison of TRIM-SEC and Baseline Models Across IoT Attack Types.
Sensors 25 07072 g005
Figure 6 presents the analysis of Negative Predictive Value (NPV). TRIM-SEC achieves higher NPV scores than all competing baselines across all threat categories, highlighting its robustness in correctly identifying non-malicious instances. This capability is particularly beneficial for preserving system resources by avoiding excessive responses in low-risk or false-negative-prone scenarios.
Figure 6. Negative Predictive Value (NPV) Performance of TRIM-SEC Compared to Baseline Approaches.
Figure 6. Negative Predictive Value (NPV) Performance of TRIM-SEC Compared to Baseline Approaches.
Sensors 25 07072 g006
Figure 7 evaluates the False Negative Rate (FNR), a critical indicator of a model’s ability to avoid undetected threats. TRIM-SEC demonstrates significantly lower FNRs, especially in the Zero-Day and Code Injection attack classes. This performance underscores the effectiveness of its transformer-based detection and contextual learning design in capturing complex and novel threat behaviors.
Figure 7. False Negative Rate (FNR) Evaluation for TRIM-SEC and Competing Detection Frameworks.
Figure 7. False Negative Rate (FNR) Evaluation for TRIM-SEC and Competing Detection Frameworks.
Sensors 25 07072 g007
Figure 8 displays the confusion matrix for TRIM-SEC, revealing high classification fidelity across all malware types. The strong diagonal dominance indicates a high rate of correct predictions, while the minimal presence of off-diagonal values confirms the model’s low misclassification tendency. This accurate differentiation is particularly evident in complex categories such as Spoofing and Code Injection, validating the effectiveness of TRIM-SEC’s integrated detection pipeline.
Figure 8. Confusion Matrix Illustrating TRIM-SEC’s Classification Accuracy Across Updated Malware Categories.
Figure 8. Confusion Matrix Illustrating TRIM-SEC’s Classification Accuracy Across Updated Malware Categories.
Sensors 25 07072 g008
In summary, the findings validate that TRIM-SEC reliably surpasses conventional approaches in critical detection metrics, including specificity, NPV and FNR. Coupled with its transformer-based contextual learning and lightweight encryption via LECC and PSO-optimized key generation, TRIM-SEC stands out as a practical, secure, and scalable solution for timely threat identification and mitigation within intelligent IoT ecosystems.

4.3. Computational Complexity Analysis

Ensuring computational efficiency within the TRIM-SEC framework is essential for achieving real-time performance in IoT systems that operate under strict resource limitations. This section provides a complexity assessment of its core components: the TANN for malware classification and the LECC module, enhanced with PSO for secure key management.
TANN’s multi-head self-attention mechanism exhibits a theoretical complexity of O(n2d), where n denotes the sequence length and d the dimensionality of each feature vector. To address scalability concerns, TRIM-SEC incorporates architectural optimizations such as sparse attention, shared parameters, and token truncation, which collectively reduce the computational burden, thus enabling practical implementation on low-power edge devices.
In parallel, the PSO-based key generation module evaluates k cryptographic fitness objectives across m candidate solutions, yielding an optimization complexity of O (mk). This approach enables efficient search space exploration without relying on exhaustive brute-force algorithms, maintaining low-latency performance even during frequent rekeying events—a necessity for secure IoT data streams.
As depicted in Figure 9, TRIM-SEC demonstrates a favorable computational footprint, requiring approximately 580 processing cycles to handle an input volume of 1000 records. This is significantly lower than traditional models such as LSTM-based IDS (exceeding 950 operations) and CNN-GRU hybrids (around 820 operations). While slightly above the ultra-lightweight blockchain-enhanced security model (registering close to 430 operations), TRIM-SEC achieves a superior balance between classification performance and computational efficiency. These results validate its practical suitability in constrained IoT scenarios requiring immediate threat response.
Figure 9. Computational Complexity of TRIM-SEC and Baseline Models.
Figure 9. Computational Complexity of TRIM-SEC and Baseline Models.
Sensors 25 07072 g009
Moreover, the framework is architected for edge–cloud collaboration, wherein computationally intensive TANN components are offloaded to edge servers, while encryption and decryption operations via LECC remain localized to IoT nodes. This hybrid model reduces network transmission overhead and ensures real-time responsiveness—key attributes for delay-sensitive applications.

4.4. Discussion

TRIM-SEC represents a strategically integrated architecture that simultaneously satisfies the dual requirements of precise malware detection and lightweight cryptographic protection. Its design reflects a careful synthesis of feature engineering, advanced deep learning, and scalable encryption.
The use of AEFD and PCA serves to enhance data quality by eliminating noise and reducing input dimensionality [42,43,44], thereby optimizing the classification pipeline for both accuracy and speed. These preprocessing techniques ensure that only the most discriminative patterns are retained for downstream analysis.
The TANN forms the core of the detection mechanism, offering powerful modeling of contextual and sequential dependencies. Its attention-driven architecture allows TRIM-SEC to detect a wide spectrum of threats—including zero-day exploits and botnets—with improved generalizability and adaptability across dynamic network conditions [45,46,47]. In contrast to legacy deep models, TANN’s modular design makes it scalable to diverse IoT infrastructures without excessive tuning [15,54].
On the cryptographic side, LECC—augmented with PSO—delivers strong encryption with minimal computational footprint [55,56]. By tailoring key generation to real-time constraints and network dynamics, the framework ensures confidentiality and integrity without undermining performance.
Collectively, these innovations validate TRIM-SEC as a well-balanced solution for IoT security. Experimental comparisons confirm that it consistently outperforms baseline methods across all key evaluation indicators such as detection accuracy, classification precision, sensitivity (recall), specificity, error reduction rate, negative prediction accuracy (NPV), and false negative suppression (FNR) [57]. These results substantiate its practical utility in real-world deployments, particularly in smart environments where robust, real-time protection is essential.

5. Conclusions

This paper presented TRIM-SEC, a comprehensive and lightweight security framework designed to advance real-time malware detection and ensure secure data transmission within smart IoT environments. By addressing key shortcomings of conventional approaches, TRIM-SEC integrates feature denoising, contextual classification, and lightweight encryption into a unified, resource-aware architecture—making it well-suited for constrained edge devices.
The framework’s primary contributions include the use of AEFD to eliminate data irregularities and enhance input fidelity, along with PCA for dimensionality reduction while preserving essential patterns. For malware classification, a Transformer-Augmented Neural Network (TANN) is employed, offering deep contextual and temporal modeling to detect complex attack types such as zero-day exploits and botnet intrusions. On the encryption front, Lightweight Elliptic Curve Cryptography (LECC) is implemented, with cryptographic key generation optimized using Particle Swarm Optimization (PSO) to minimize overhead while maintaining robust security.
Extensive experimental evaluations against established baselines—including LSTM-based intrusion detection systems, CNN-GRU hybrid models, and blockchain-integrated security solutions—demonstrate that TRIM-SEC achieves superior performance in terms of detection accuracy, false positive rate, and encryption efficiency. Its balanced design ensures adaptability to evolving cyber threats while maintaining low computational complexity.
However, several practical challenges must be acknowledged. First, the multi-layer architecture, while effective, may be challenging to integrate into ultra-low-power or legacy IoT devices with minimal processing capabilities. Second, although TRIM-SEC performs well on low-power platforms such as Raspberry Pi 4, larger-scale deployments may require additional optimization for hardware variability and energy efficiency. Third, the performance of the TANN model may degrade in highly domain-specific scenarios without adequate retraining or fine-tuning. Finally, maintaining cryptographic key synchronization across distributed IoT nodes remains a non-trivial task in dynamic network conditions.
Future work will focus on several strategic directions. First, integrating federated learning will enable distributed threat intelligence while preserving data privacy. Second, applying automated neural architecture search (NAS) may further enhance the efficiency and accuracy of the TANN classifier. Third, exploring hardware-level acceleration for LECC on edge devices can improve encryption speed and energy efficiency. Finally, the development of adaptive encryption policies and expansion to cross-platform deployments will broaden TRIM-SEC’s applicability to smart city, healthcare, and industrial IoT scenarios.

Funding

This research was funded by Ongoing Research Funding program (ORF-2025-233), King Saud University, Riyadh, Saudi Arabia.

Data Availability Statement

Data can be made available upon request, to ensure that privacy restrictions are upheld.

Acknowledgments

The authors would like to extend their sincere appreciation to Ongoing Research Funding program (ORF-2025-233), King Saud University, Riyadh, Saudi Arabia.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Xia, Y.; Zhang, T.; Jin, J.; He, Y.; Yu, F.R. Towards Secure and Efficient Data Scheduling for Vehicular Social Networks. IEEE Trans. Veh. Technol. 2025, 74, 1551–1569. [Google Scholar] [CrossRef]
  2. Zhang, H.; Wang, J.; Zhao, Z.; Zhao, Z. A Survey of Edge Caching Security: Framework, Methods, and Challenges. J. Syst. Archit. 2025, 158, 103306. [Google Scholar] [CrossRef]
  3. Mutambik, I. Enhancing IoT Security Using GA-HDLAD: A Hybrid Deep Learning Approach for Anomaly Detection. Appl. Sci. 2024, 14, 9848. [Google Scholar] [CrossRef]
  4. Al-Quayed, F.; Tariq, N.; Humayun, M.; Aslam Khan, F.; Attique Khan, M.; Alnusairi, T.S. Securing the Road Ahead: A Survey on Internet of Vehicles Security Powered by a Conceptual Blockchain-Based Intrusion Detection System for Smart Cities. Trans. Emerg. Telecommun. Technol. 2025, 36, e70133. [Google Scholar] [CrossRef]
  5. Neelamegam, G.; Revathy, J.; Kannukkiniyal, M.; Devendran, M.; Akshya, J.; Choudhry, M.D. Graph Neural Networks for Optimizing Reliability in Vehicle-to-Infrastructure Communication in Autonomous Systems. In Proceedings of the 9th International Conference on Communication and Electronics Systems (ICCES), Coimbatore, India, 16–18 December 2024; pp. 692–699. [Google Scholar] [CrossRef]
  6. Jalili, F.; Ghavami, S.M.; Afsharnia, H. An Artificial Neural Network Approach to Assess Road Roughness Using Smartphone-Based Crowdsourcing Data. Eng. Appl. Artif. Intell. 2024, 138, 109308. [Google Scholar] [CrossRef]
  7. Mei, P.; Karimi, H.R.; Ou, L.; Xie, H.; Zhan, C.; Li, G.; Yang, S. Driving Style Classification and Recognition Methods for Connected Vehicle Control in Intelligent Transportation Systems: A Review. ISA Trans. 2025, 158, 167–183. [Google Scholar] [CrossRef]
  8. Kumar, S.; Shaw, D.K. An API Security Framework for IoT-Enabled Healthcare System with the Application Blockchain-Based Smart Contract. SN Comput. Sci. 2024, 5, 1044. [Google Scholar] [CrossRef]
  9. Kumar, A.; Batta, P.; Rathore, P.S.; Ahuja, S. Secure Healthcare Data Sharing and Attack Detection Framework Using Radial Basis Neural Network. Sci. Rep. 2025, 15, 15432. [Google Scholar] [CrossRef]
  10. Padma, A.; Ramaiah, M. Lightweight Privacy Preservation Blockchain Framework for Healthcare Applications Using GM-SSO. Results Eng. 2025, 25, 103882. [Google Scholar] [CrossRef]
  11. Wang, F.; Gai, Y.; Zhang, H. Blockchain User Digital Identity Big Data and Information Security Process Protection Based on Network Trust. J. King Saud Univ. Comput. Inf. Sci. 2024, 36, 102031. [Google Scholar] [CrossRef]
  12. Muniswamy, A.; Rathi, R. A Detailed Review on Enhancing the Security in Internet of Things-Based Smart City Environment Using Machine Learning Algorithms. IEEE Access 2024, 12, 120389–120413. [Google Scholar] [CrossRef]
  13. Gao, X.; Si, J.; Huang, H. Reinforcement Learning Control with Knowledge Shaping. IEEE Trans. Neural. Netw. Learn. Syst. 2024, 35, 3156–3167. [Google Scholar] [CrossRef] [PubMed]
  14. Zhang, N.; Yan, J.; Hu, C.; Sun, Q.; Yang, L.; Gao, D.W.; Guerrero, J.M.; Li, Y. Price-Matching-Based Regional Energy Market with Hierarchical Reinforcement Learning Algorithm. IEEE Trans. Ind. Inform. 2024, 20, 11103–11114. [Google Scholar] [CrossRef]
  15. Mutambik, I. An Entropy-Based Clustering Algorithm for Real-Time High-Dimensional IoT Data Streams. Sensors 2024, 24, 7412. [Google Scholar] [CrossRef] [PubMed]
  16. Kuchoor, S.K.; Kukreti, S.; Battula, R.S.S.R.; Singh, S.; Panchbhai, A.L.N. Blockchain-Enhanced Access Control for IoT Systems in Smart Cities. In Proceedings of the 2024 International Conference on Distributed Systems, Computer Networks and Cybersecurity (ICDSCNC), Bengaluru, India, 20–21 September 2024; pp. 1–9. [Google Scholar] [CrossRef]
  17. Min, H.; Rahmani, A.M.; Ghaderkourehpaz, P.; Moghaddasi, K.; Hosseinzadeh, M. A Joint Optimization of Resource Allocation Management and Multi-Task Offloading in High-Mobility Vehicular Multi-Access Edge Computing Networks. Ad Hoc Netw. 2025, 166, 103656. [Google Scholar] [CrossRef]
  18. Rahmani, A.M.; Haider, A.; Moghaddasi, K.; Gharehchopogh, F.S.; Aurangzeb, K.; Liu, Z.; Hosseinzadeh, M. Self-Learning Adaptive Power Management Scheme for Energy-Efficient IoT-MEC Systems Using Soft Actor-Critic Algorithm. Internet Things 2025, 31, 101587. [Google Scholar] [CrossRef]
  19. Liu, J.; Liu, X.; Qu, M.; Lyu, T. EITNet: An IoT-Enhanced Framework for Real-Time Basketball Action Recognition. Alex. Eng. J. 2025, 110, 567–578. [Google Scholar] [CrossRef]
  20. Rahmani, A.M.; Tanveer, J.; Gharehchopogh, F.S.; Rajabi, S.; Hosseinzadeh, M. A Novel Offloading Strategy for Multi-User Optimization in Blockchain-Enabled Mobile Edge Computing Networks for Improved Internet of Things Performance. Comput. Electr. Eng. 2024, 119, 109514. [Google Scholar] [CrossRef]
  21. Shahin, M.; Maghanaki, M.; Hosseinzadeh, A.; Chen, F.F. Advancing Network Security in Industrial IoT: A Deep Dive into AI-Enabled Intrusion Detection Systems. Adv. Eng. Inform. 2024, 62, 102685. [Google Scholar] [CrossRef]
  22. Bao, J.; Luo, K.; Kou, Q.; He, L.; Zhao, G. Multi-Head Structural Attention-Based Vision Transformer with Sequential Views for 3D Object Recognition. Appl. Sci. 2025, 15, 3230. [Google Scholar] [CrossRef]
  23. Cha, H.-J.; Yang, H.-K.; Song, Y.-J.; Kang, A.R. Intelligent Anomaly Detection System through Malware Image Augmentation in IIoT Environment Based on Digital Twin. Appl. Sci. 2023, 13, 10196. [Google Scholar] [CrossRef]
  24. Taşcı, B. Deep-Learning-Based Approach for IoT Attack and Malware Detection. Appl. Sci. 2024, 14, 8505. [Google Scholar] [CrossRef]
  25. Abbas, S.; Hejaili, A.A.; Sampedro, G.A.; Abisado, M.; Almadhor, A.S.; Shahzad, T.; Ouahada, K. A Novel Federated Edge Learning Approach for Detecting Cyberattacks in IoT Infrastructures. IEEE Access 2023, 11, 112189–112198. [Google Scholar] [CrossRef]
  26. Sarı, N.V.; Acı, M.; Acı, Ç.İ. Windows Malware Detection via Enhanced Graph Representations with Node2Vec and Graph Attention Network. Appl. Sci. 2025, 15, 4775. [Google Scholar] [CrossRef]
  27. Alzakari, S.A.; Aljebreen, M.; Asiri, M.M.; Mansouri, W.; Alahmari, S.; Alqahtani, M.; Sorour, S.; Bedewi, W. Hybridization of Deep Learning Models with Crested Porcupine Optimizer Algorithm-Based Cybersecurity Detection on Industrial IoT for Smart City Environments. Alex. Eng. J. 2025, 127, 239–250. [Google Scholar] [CrossRef]
  28. Jagdish Kumar, P.; Neduncheliyan, S.; Mundher Adnan, M.K.S.; Sudhakar, A.V.V. Anomaly-Based Intrusion Detection System Using Bidirectional Long Short-Term Memory for Internet of Things. In Proceedings of the Third International Conference on Distributed Computing and Electrical Circuits and Electronics (ICDCECE), Ballari, India, 26–27 April 2024; pp. 1–4. [Google Scholar] [CrossRef]
  29. Mutambik, I. An Efficient Flow-Based Anomaly Detection System for Enhanced Security in IoT Networks. Sensors 2024, 24, 7408. [Google Scholar] [CrossRef]
  30. Hizal, S.; Çavuşoğlu, Ü.; Akgün, D. IoT-Based Smart Home Security System with Machine Learning Models. Acad. Platf. J. Eng. Smart Syst. 2024, 12, 28–36. [Google Scholar] [CrossRef]
  31. Kumar, M.; Kumar, A.; Verma, S.; Bhattacharya, P.; Ghimire, D.; Kim, S.; Hosen, A.S.M.S. Healthcare Internet of Things (H-IoT): Current Trends, Future Prospects, Applications, Challenges, and Security Issues. Electronics 2023, 12, 2050. [Google Scholar] [CrossRef]
  32. Gholami, M.; Ghaffari, A.; Derakhshanfard, N.; Ibrahimoğlu, N.; Kazem, A.A.P. Blockchain Integration in IoT: Applications, Opportunities, and Challenges. Comput. Mater. Contin. 2025, 83, 1561–1605. [Google Scholar] [CrossRef]
  33. Kumar, R.; Kumar, P.; Tripathi, R.; Gupta, G.P.; Garg, S.; Hassan, M.M. A Distributed Intrusion Detection System to Detect DDoS Attacks in Blockchain-Enabled IoT Network. J. Parallel Distrib. Comput. 2022, 164, 55–68. [Google Scholar] [CrossRef]
  34. Roy, K.S.; Ahmed, T.; Udas, P.B.; Karim, E.; Majumdar, S. MalHyStack: A Hybrid Stacked Ensemble Learning Framework with Feature Engineering Schemes for Obfuscated Malware Analysis. Intell. Syst. Appl. 2023, 20, 200283. [Google Scholar] [CrossRef]
  35. Shin, J.; Kim, D.; Lee, K. Advanced Financial Fraud Malware Detection Method in the Android Environment. Appl. Sci. 2025, 15, 3905. [Google Scholar] [CrossRef]
  36. Hasan, R.; Biswas, B.; Samiun, M.; Saleh, M.A.; Prabha, M.; Akter, J.; Joya, F.H.; Abdullah, M. Enhancing Malware Detection with Feature Selection and Scaling Techniques Using Machine Learning Models. Sci. Rep. 2025, 15, 9122. [Google Scholar] [CrossRef] [PubMed]
  37. Maniriho, P.; Mahmood, A.N.; Chowdhury, M.J.M. MeMalDet: A Memory Analysis-Based Malware Detection Framework Using Deep Autoencoders and Stacked Ensemble under Temporal Evaluations. Comput. Secur. 2024, 142, 103864. [Google Scholar] [CrossRef]
  38. Hossain, M.A.; Haque, M.A.; Ahmad, S.; Abdeljaber, H.A.M.; Eljialy, A.E.M.; Alanazi, A.; Sonal, D.; Chaudhary, K.; Nazeer, J. AI-Enabled Approach for Enhancing Obfuscated Malware Detection: A Hybrid Ensemble Learning with Combined Feature Selection Techniques. Int. J. Syst. Assur. Eng. Manag. 2024, 1–19. [Google Scholar] [CrossRef]
  39. Filippopoulos, I.; Lajic, Z.; Mitsopoulos, G.; Senteris, A.; Pearson, M. Multi-Sensor Data Fusion for the Vessel Trim Analyzer and Optimization Platform. In Proceedings of the 2019 4th International Conference on System Reliability and Safety (ICSRS), Rome, Italy, 20–22 November 2019; pp. 35–40. [Google Scholar] [CrossRef]
  40. Mukisa, K.J.; Ahakonye, L.A.C.; Kim, D.-S.; Lee, J.M. Trimmed Averaging for Efficient Federated Learning in the Internet of Things. In Proceedings of the 2024 15th International Conference on Information and Communication Technology Convergence (ICTC), Jeju Island, Korea, 16–18 October 2024; pp. 322–326. [Google Scholar] [CrossRef]
  41. Panagiotakopoulos, T.; Filippopoulos, I.; Filippopoulos, C.; Filippopoulos, E.; Lajic, Z.; Violaris, A.; Chytas, S.P.; Kiouvrekis, Y. Vessel’s Trim Optimization Using IoT Data and Machine Learning Models. In Proceedings of the 2022 13th International Conference on Information, Intelligence, Systems & Applications (IISA), Corfu, Greece, 18–20 July 2022; pp. 1–5. [Google Scholar] [CrossRef]
  42. Abdulkareem, S.A.; Foh, C.H.; Carrez, F.; Moessner, K. FI-PCA for IoT Network Intrusion Detection. In Proceedings of the 2022 International Symposium on Networks, Computers and Communications (ISNCC), Shenzhen, China, 19–22 July 2022; pp. 1–6. [Google Scholar] [CrossRef]
  43. Kiran, M.P.R.S.; Rajalakshmi, P. Performance Analysis of CSMA/CA and PCA for Time Critical Industrial IoT Applications. IEEE Trans. Industr. Inform. 2018, 14, 2281–2293. [Google Scholar] [CrossRef]
  44. Yu, T.; Wang, X.; Shami, A. Recursive Principal Component Analysis-Based Data Outlier Detection and Sensor Data Aggregation in IoT Systems. IEEE Internet Things J. 2017, 4, 2207–2216. [Google Scholar] [CrossRef]
  45. Tsai, P. IOT: Intelligent Bio-Tank System for Smart Home. In Proceedings of the 2016 International Conference on Applied System Innovation (ICASI), Okinawa, Japan, 26–30 May 2016; pp. 1–4. [Google Scholar] [CrossRef]
  46. Zaki, F.M.; Tajjudin, M.; Ishak, N. IoT-Based System for Monitoring Smart Agriculture’s Automated Irrigation. In Proceedings of the 2023 IEEE International Conference on Agrosystem Engineering, Technology & Applications (AGRETA), Shah Alam, Malaysia, 9 September 2023; pp. 135–141. [Google Scholar] [CrossRef]
  47. Liu, F.; Wang, L.; Zhang, J.; Fu, Z.; Li, X.; Lv, Z.; Wu, Z.; Wu, F.; Zhu, L. A Real-Time Closed Tank Capacity Measurement Method for Liquid Volume Supporting the Internet of Things, Big Data and Intelligent Ship Supply Chain. In Proceedings of the 2022 International Conference on Industrial IoT, Big Data and Supply Chain (IIoTBDSC), Beijing, China, 23–25 September 2022; pp. 311–316. [Google Scholar] [CrossRef]
  48. Ali, S.; Anwer, F. An IoT-Enabled Cloud Computing Model for Authentication and Data Confidentiality Using Lightweight Cryptography. Arab. J. Sci. Eng. 2025, 1–23. [Google Scholar] [CrossRef]
  49. Tewari, A.; Gupta, B.B. A Lightweight Mutual Authentication Protocol Based on Elliptic Curve Cryptography for IoT Devices. Int. J. Adv. Intell. Paradig. 2017, 9, 111. [Google Scholar] [CrossRef]
  50. Lara-Nino, C.A.; Diaz-Perez, A.; Morales-Sandoval, M. Lightweight Elliptic Curve Cryptography Accelerator for Internet of Things Applications. Ad Hoc Netw. 2020, 103, 102159. [Google Scholar] [CrossRef]
  51. Peres, W.; Poubel, R.P.B. Power System Stabilizers Tuning for Probabilistic Small-Signal Stability Enhancement Using Particle Swarm Optimization and Unscented Transformation. Electr. Eng. 2025, 107, 947–964. [Google Scholar] [CrossRef]
  52. Singh, J.; Kumar, V.; Sinduja, K.; Ekvitayavetchanukul, P.; Agnihotri, A.K.; Imran, H. Enhancing Heart Disease Diagnosis Through Particle Swarm Optimization and Ensemble Deep Learning Models. In Nature-Inspired Optimization Algorithms for Cyber-Physical Systems; Sajid, M., Shahid, M., Lapina, M., Babenko, M., Singh, J., Eds.; IGI Global Scientific Publishing: Hershey, PA, USA, 2024; pp. 313–330. [Google Scholar] [CrossRef]
  53. The TON IoT Datasets; Intelligent Security Group UNSW: Canberra, Australia, 2021; Available online: https://research.unsw.edu.au/projects/toniot-datasets (accessed on 1 March 2025).
  54. Mutambik, I.; Almuqrin, A. Balancing Efficiency and Efficacy: A Contextual Bandit-Driven Framework for Multi-Tier Cyber Threat Detection. Appl. Sci. 2025, 15, 6362. [Google Scholar] [CrossRef]
  55. Raghunath, M.P.; Deshmukh, S.; Chaudhari, P.; Bangare, S.L.; Kasat, K.; Awasthy, M.; Omarov, B.; Waghulde, R.R. PCA and PSO Based Optimized Support Vector Machine for Efficient Intrusion Detection in Internet of Things. Meas. Sens. 2025, 37, 101806. [Google Scholar] [CrossRef]
  56. Mahmoudi, A.; Farzinvash, L.; Taheri, J. GPTOR: Gridded GA and PSO-Based Task Offloading and Ordering in IoT-Edge-Cloud Computing. Results Eng. 2025, 25, 104196. [Google Scholar] [CrossRef]
  57. Tan, H.-L.; Ge, H.; Qin, Z.-E.; Jiang, Y.-L.; Chang, S.; Tang, N. Evaluating the Diagnostic Efficiency of Ultrasound and Serum Autoantibodies in Hashimoto’s Thyroiditis: A Cross-Sectional Study. Sci. Rep. 2025, 15, 12674. [Google Scholar] [CrossRef] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Mutambik, I. AI-Driven Cybersecurity in IoT: Adaptive Malware Detection and Lightweight Encryption via TRIM-SEC Framework. Sensors 2025, 25, 7072. https://doi.org/10.3390/s25227072

AMA Style

Mutambik I. AI-Driven Cybersecurity in IoT: Adaptive Malware Detection and Lightweight Encryption via TRIM-SEC Framework. Sensors. 2025; 25(22):7072. https://doi.org/10.3390/s25227072

Chicago/Turabian Style

Mutambik, Ibrahim. 2025. "AI-Driven Cybersecurity in IoT: Adaptive Malware Detection and Lightweight Encryption via TRIM-SEC Framework" Sensors 25, no. 22: 7072. https://doi.org/10.3390/s25227072

APA Style

Mutambik, I. (2025). AI-Driven Cybersecurity in IoT: Adaptive Malware Detection and Lightweight Encryption via TRIM-SEC Framework. Sensors, 25(22), 7072. https://doi.org/10.3390/s25227072

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop