All projectsAI & Cybersecurity

NeuroShield — Autonomous Cyber Defense & AI-Based Self-Healing Framework

Independently developed NeuroShield, a machine learning-based intrusion detection and self-healing cybersecurity framework integrating network traffic analysis, Random Forest classification, automated threat-response policies and Telegram alerts. Originally developed during university summer research in 2025, the project achieved 94.1% reported validation accuracy and subsequently led to a research publication presented at CCICT 2026.

Artificial IntelligenceCybersecurityMachine LearningIntrusion Detection SystemIntrusion Prevention SystemNeuroShieldSelf-Healing CybersecurityAutonomous Cyber DefenseRandom ForestUNSW-NB15Network SecurityNetwork Traffic AnalysisPythonKali LinuxLinuxVMwarePySharkScapyWiresharkFeature EngineeringMulticlass ClassificationAutomated Threat ResponseTelegram BotNetwork MonitoringSecurity ResearchConference PublicationIEEE XploreCCICT 2026
01

Project Background and Motivation

NeuroShield originated as a self-directed cybersecurity and machine learning research project undertaken during the May–July 2025 university summer break. The project formed part of the mandatory Non-Teaching Credit Course (NTCC) research programme at Amity University, under the academic supervision of Dr. Renuka Arora. The motivation for selecting cybersecurity emerged from an interest in learning Linux and exploring unfamiliar areas of computer science through practical implementation. Following the installation of VMware and a Kali Linux virtual machine, the project was conceived as an opportunity to understand the Linux operating environment, network communication, security utilities and the fundamentals of cyberattack detection. Rather than developing a conventional academic machine learning classifier, the objective was to create a complete software framework capable of monitoring network activity, identifying suspicious behaviour and initiating appropriate defensive responses. This required combining concepts from machine learning, network protocols, operating systems and software automation. The research focused on an important limitation of traditional intrusion detection approaches: detecting suspicious activity is only one part of the security process. A practical defensive system must also communicate the detection and support timely mitigation. This led to the development of NeuroShield, a modular intrusion detection and response framework intended to demonstrate how machine learning and predefined security policies could be combined to reduce the time between identifying suspicious traffic and selecting a defensive action.

02

Research Problem, Objectives and Scope

The research investigated how a machine learning-based intrusion detection system could be extended into an automated detection-and-response framework suitable for experimentation in a Linux environment. Traditional signature-based security tools rely heavily on known attack patterns and predefined rules. Although effective for many established threats, these approaches can face difficulties when network behaviour changes or when suspicious activity does not precisely match existing signatures. Machine learning provides an alternative method of analysing traffic characteristics by identifying patterns in labelled examples. However, many experimental intrusion detection systems focus primarily on offline classification and do not integrate the classification model with a complete monitoring and response pipeline. NeuroShield was developed to investigate this gap through four principal objectives: developing an accurate network traffic classifier, incorporating live packet capture and feature extraction, designing a threat-specific mitigation engine, and evaluating the integrated framework through controlled attack simulations. The project was intentionally limited to a research prototype tested in a virtualised environment. It was not designed or evaluated as a production-ready enterprise security appliance. The research also examined whether feature selection could reduce model complexity while preserving sufficient classification performance for responsive network monitoring.

03

Literature Review and Research Methodology

The research began with a structured literature review covering conventional intrusion detection systems, machine learning approaches to network security, network traffic datasets and automated cyber-defense mechanisms. The review examined supervised and unsupervised learning approaches, including Random Forest, Decision Trees, Support Vector Machines, neural networks and anomaly-detection methods. Particular attention was given to the relationship between model complexity, classification accuracy, inference speed and practical deployment requirements. Existing intrusion detection research was compared against several criteria: supported threat categories, real-time monitoring capabilities, feature-selection strategies and the availability of automated response mechanisms. The research identified an opportunity to develop a lightweight architecture integrating multiple security functions into a single workflow rather than treating intrusion detection and response as separate processes. The resulting methodology used supervised machine learning for traffic classification and deterministic response rules for selecting defensive actions. This combination allowed the project to focus on reliable integration, traceable behaviour and controlled experimental evaluation. The research design also incorporated two complementary testing methods: synthetic network packet generation and dataset-driven attack replay. These methods were selected to investigate both the operational software pipeline and the classifier's responses to labelled examples of malicious network behavior.

04

Dataset Selection and Preprocessing

NeuroShield was developed using the UNSW-NB15 dataset, a publicly available cybersecurity dataset created for evaluating intrusion detection systems. The dataset contains labelled network traffic representing normal activity and multiple categories of malicious behaviour, including Analysis, Backdoor, Denial of Service, Exploits, Fuzzers, Generic attacks, Reconnaissance, Shellcode and Worms. The dataset was selected because it contains a broad range of network-flow characteristics and attack categories suitable for supervised multiclass classification. The preprocessing stage involved preparing the dataset for machine learning through handling missing values, encoding categorical fields, examining class distributions and preparing numerical features for model training. Categorical attributes, including network protocol and service information, required transformation into numerical representations compatible with the selected machine learning algorithms. One of the major challenges was the imbalance between attack categories. Some classes contained substantially more examples than others, creating a risk that the model would learn the dominant classes more effectively while performing less reliably on rare attack categories. Exploratory analysis was therefore used to understand the feature distributions and relationships between the network-flow attributes and the target classes. The prepared dataset formed the foundation for feature selection, model comparison, classifier training and the subsequent detection pipeline.

05

Feature Engineering and Machine Learning Model Development

An important research objective was reducing the computational overhead of traffic classification without unnecessarily sacrificing detection accuracy. The original research implementation investigated the relative importance of different network-flow attributes using correlation analysis, feature-importance rankings and visual comparisons. The full feature space was examined to identify attributes that provided useful information for distinguishing normal network behaviour from different attack categories. The published framework selected ten informative features for the Random Forest classifier. These included characteristics associated with packet counts, transferred bytes, transmission rates, time-to-live values, services and connection-state statistics. Using a reduced feature representation allowed the inference pipeline to operate on a smaller numerical input vector while preserving the ordering required by the trained model. Several machine learning algorithms were investigated during model development. The NTCC report documents comparisons involving Random Forest, XGBoost and LightGBM, supported by training results and confusion-matrix visualisations. Random Forest was selected for the published implementation because it provided a favourable balance of classification accuracy, computational efficiency and suitability for the proposed modular detection system. The final classifier was trained and evaluated using labelled UNSW-NB15 traffic data, and its trained model, feature ordering and associated preprocessing artefacts were prepared for reuse in the detection pipeline. The resulting architecture allowed the model to be loaded for repeated inference without retraining whenever the application started.

06

System Architecture and Software Integration

NeuroShield was designed as a modular Python framework consisting of interconnected components responsible for monitoring, preprocessing, prediction, response selection and notification. The primary execution pipeline begins with the network monitoring module. Captured traffic is passed to a feature-extraction component, which generates numerical feature vectors compatible with the trained classifier. The classifier predicts the traffic category and passes the result to the detection interface. This interface acts as the coordination layer, managing model predictions, confidence information, event logging and communication with the healing engine. The healing engine maps the detected category to an appropriate predefined response strategy. Relevant events and response decisions are recorded, and notifications can be sent through the Telegram integration. Separating the system into individual modules made it easier to troubleshoot problems involving network capture, feature mismatches, model loading and response behaviour. The framework was implemented in Python and operated through a command-line interface within a virtualised Linux environment. This modular architecture also provided a foundation for future experimentation, allowing individual components to be modified or replaced without rewriting the complete security workflow.

07

Network Traffic Monitoring and Feature Extraction

The network monitoring subsystem was developed to capture network traffic from a specified interface and provide the raw information required for machine learning-based classification. PyShark was used as the primary packet capture interface in the original research implementation, taking advantage of Wireshark-related packet analysis capabilities. Captured packets contain information such as source and destination addresses, transport protocols, packet sizes, ports and timestamps. However, individual packet records cannot be passed directly to a model trained using aggregated network-flow features. To address this mismatch, the system incorporated a flow-based feature-extraction stage. Packets belonging to the same communication flow were grouped according to identifying attributes such as source IP address, destination IP address, source port, destination port and protocol. The flow-processing logic accumulated measurements and generated numerical features suitable for classification. The extraction process also included flow-completion conditions such as timeouts and packet-count thresholds. An important development challenge was ensuring that the extracted features matched the exact format and order used during model training. Even a successfully trained classifier can produce unreliable predictions when runtime inputs differ from the training representation. The feature-ordering mechanism was therefore an essential component of the detection pipeline, and resolving mapping inconsistencies became a major part of the development and debugging process.

08

Intrusion Detection and Attack Classification

The detection interface serves as the central analytical component of NeuroShield, connecting the monitoring pipeline with the machine learning classifier and the automated response system. When a new feature vector becomes available, the detection interface checks its structure and prepares the values for classification using the previously trained model. The Random Forest classifier evaluates the numerical inputs and predicts the corresponding traffic category. The published research implementation covers normal traffic and nine attack categories, allowing the system to distinguish between benign activity and different classes of potentially malicious network behaviour represented in the dataset. The detection module also supports prediction confidence information and generates records of classification outcomes for subsequent analysis. When a flow is classified as malicious, the predicted category is passed to the healing engine, where the corresponding response policy is selected. During development, several challenges arose from feature-order mismatches, class encoding, model compatibility and differences between dataset-derived features and live network observations. Resolving these issues required repeated adjustments to data preprocessing, model interfaces and the flow-extraction logic. The completed research prototype demonstrated the integration of classifier inference into a network monitoring and response workflow, rather than limiting the work to offline machine learning evaluation.

09

Self-Healing Engine and Automated Threat Response

The self-healing engine was developed to extend NeuroShield beyond passive intrusion detection by introducing automated response selection based on the identified attack category. The module uses a predefined mapping between attack classes and defensive actions. Once the detection interface identifies suspicious traffic, the corresponding response logic is triggered. The research implementation includes response strategies such as IP blocking, suspicious connection termination, port restrictions, increased logging, traffic throttling and host isolation. Different response strategies were associated with different attack categories. For example, Denial-of-Service detections could trigger IP-blocking policies, while reconnaissance-related events could lead to increased monitoring or rate-limiting procedures. The implementation separates response selection from action execution, allowing the system to generate and test mitigation decisions without requiring direct changes to the operating environment during every experiment. A safe-testing mode was incorporated into the healing engine. When enabled, the system generates and records the intended response without executing potentially disruptive system commands. This functionality was particularly important because the project was developed and tested primarily in a virtual-machine environment. Most defensive testing was conducted through this safe mode, meaning the experimental results primarily validate attack classification, response mapping, command generation and logging rather than independently proving successful production-level mitigation. The healing engine therefore demonstrates the architectural feasibility of automated threat response while retaining the need for additional live enforcement testing and security validation before practical deployment.

10

Attack Simulation and Experimental Validation

The evaluation methodology used two complementary simulation approaches to test the detection and response pipeline without exposing a production environment to uncontrolled attacks. The first approach involved generating synthetic network traffic using Scapy. This supported controlled packet-level experiments and helped examine the interaction between network monitoring, feature extraction and the detection interface. The second approach used labelled feature vectors derived from the UNSW-NB15 dataset. These samples could be replayed through the classification pipeline with known expected categories, allowing the model's behaviour to be compared against the reference labels. Dataset-based replay was particularly useful for isolating model inference and response mapping from the complexities of raw packet capture. The simulations included examples associated with Denial of Service, Exploits, Reconnaissance, Shellcode, Worms, Fuzzers, Generic attacks, Backdoors, Analysis and normal network traffic. The research report documented individual simulation results for these categories. Detection performance varied, with several tested groups correctly classified in all recorded runs, while more difficult categories produced occasional misclassifications. The reported average detection accuracy across the simulation experiments was approximately 94.5%. The experiments also evaluated whether the appropriate healing policy was selected after each detection and whether the system produced the corresponding logs and notifications. These tests established the operation of the research pipeline under controlled conditions while highlighting the distinction between replay-based validation and unrestricted deployment on live production networks.

11

Performance Evaluation and Research Results

The published NeuroShield research reported a Random Forest training accuracy of 97.3% and validation accuracy of 94.1%. Additional reported evaluation metrics included macro precision of 0.941, macro recall of 0.938 and macro F1-score of 0.939. Confusion-matrix analysis was used to examine classification behaviour, including misclassifications involving attack categories with related network characteristics. The research also included ROC and AUC analysis and comparisons between the selected Random Forest model and alternative approaches discussed in the study. One of the primary objectives was minimising the processing overhead associated with intrusion detection. By selecting a reduced ten-feature representation, the published implementation aimed to support efficient inference within the continuous monitoring workflow. The reported Random Forest inference benchmark was approximately 5 milliseconds. The experimental healing-response evaluation reported approximate response timings of 150 milliseconds for IP blocking, 200 milliseconds for connection termination, 100 milliseconds for port closure and 30 milliseconds for logging. The published report described average healing-response times below 300 milliseconds and an end-to-end response pipeline below 1.5 seconds in the evaluated conditions. These measurements relate to the documented experimental implementation, which was tested primarily in a virtualised environment with safe-mode functionality. They should not be interpreted as independently verified production-network mitigation latency. Overall, the results indicated that the reduced-feature Random Forest approach provided a practical balance of classification performance and processing efficiency for the research prototype.

12

Telegram Alerting and Operator Interaction

NeuroShield includes a Telegram bot designed to improve the accessibility of security notifications and provide an external communication channel for system operators. The Telegram integration was implemented as part of the functional project rather than remaining a theoretical feature. When the detection system identifies suspicious activity, the notification component can generate messages containing relevant attack information and send them to the configured Telegram interface. The research documentation includes screenshots demonstrating the bot's welcome interface, security alerts and different notification types. This feature allowed network security events to be communicated through a familiar messaging application without requiring the operator to continuously monitor terminal output. The primary NeuroShield application itself was command-line based. Detection results, runtime messages and healing actions were displayed through console output and recorded through logs. A dedicated graphical dashboard was not implemented as part of the completed 2025 research prototype. The Telegram integration therefore served as the principal user-facing notification feature, complementing the command-line environment used for development and administration.

13

Engineering Challenges and Subsequent Development

Developing NeuroShield required learning and integrating several unfamiliar technologies, including Kali Linux, virtualisation, network packet capture, machine learning pipelines and operating-system-level security utilities. One of the first significant difficulties was understanding the structure and preprocessing requirements of the UNSW-NB15 dataset. Its numerous features, categorical attributes and uneven class distribution introduced challenges for reliable model training and evaluation. Model selection required balancing detection accuracy against inference cost. Comparing alternative approaches also required constructing consistent preprocessing and evaluation workflows. Another substantial difficulty involved translating live packet observations into the same feature representation used for training. Incorrect feature mapping could produce inconsistent classifications even when the model achieved strong offline validation results. Integrating packet capture, continuous flow processing, model inference and defensive response logic introduced further challenges involving module compatibility, synchronisation and error handling. These problems were addressed through iterative development, module testing, log inspection and controlled attack simulations. Following the initial NTCC project, additional development explored an expanded feature representation and further modularisation of the monitoring and detection system. Later experimental work included broader UNSW-NB15 feature alignment, network and host monitoring components, and class-specific response functions. The later implementation explored a 48-feature input arrangement, distinct from the ten-feature classifier evaluated in the original research publication. The expanded work also required maintaining model-specific feature ordering and attack-label mappings. These later revisions should be viewed as continued technical development rather than as configurations covered by the original published accuracy measurements. The software has not been actively maintained recently and requires environment setup, dependency checks and additional tuning before further demonstrations or evaluation.

14

Research Publication and Academic Recognition

The original NeuroShield research was carried out independently as part of the NTCC summer research programme at Amity University from May to July 2025. The project was completed under the supervision of Dr. Renuka Arora, who provided academic guidance throughout the research and implementation process. Following the completion of the NTCC work, the project developed into a formal conference research paper titled "Autonomous Cyber Defense: An AI-Based Self-Healing Framework." The paper was prepared under the academic guidance of Dr. Dolly Sharma, with Faizan Ahmed Syed as a contributing author responsible for the original project implementation and technical research. Vivek Choudhary contributed to manuscript editing, while Dr. Mamta Mittal contributed through review and recommendations to improve the academic quality of the paper. The manuscript was presented at the Eighth International Conference on Computational Intelligence and Communication Technologies (CCICT 2026), held on 24–25 April 2026 and organised by B.M. Institute of Engineering and Technology. The resulting conference publication is available on IEEE Xplore under document number 11575920. The publication represents an important academic milestone because the original self-directed summer project progressed into a peer-reviewed research contribution covering machine learning-based intrusion detection, modular system architecture, automated response policies and experimental evaluation. The project also established a foundation for subsequent research interests in artificial intelligence, cybersecurity, network monitoring and resilient computing systems.

15

Final Outcome, Limitations and Future Scope

NeuroShield successfully achieved its main research objective of integrating network traffic analysis, supervised machine learning classification and automated defensive response selection into a modular cybersecurity framework. The project resulted in a working command-line research prototype with packet monitoring, feature extraction, trained classification models, attack simulation, response mapping, logging and Telegram-based alerting. The initial implementation was completed during the 2025 NTCC research period and subsequently developed into a conference publication presented in April 2026. The project demonstrated strong reported validation performance using the selected Random Forest classifier and showed that an integrated detection-and-response workflow could operate with low processing latency in the evaluated experimental environment. However, the system's validation was primarily based on benchmark data, controlled attack simulations and safe-mode defensive testing. It was not independently validated as a production-ready intrusion prevention platform capable of reliably stopping all attack categories or previously unseen threats. Further development is required to improve the reliability of live feature extraction, test actual system-level enforcement, evaluate false-positive behaviour under diverse network conditions and establish reproducible results for the later expanded feature configuration. Additional future improvements include exploring deep learning and anomaly-detection models, implementing adaptive learning from newly labelled network traffic, introducing more context-aware mitigation strategies and developing an interactive graphical monitoring dashboard. The present software implementation requires restoration and tuning before it can be used for further research demonstrations. Overall, NeuroShield represents a successful progression from independent learning in Linux and cybersecurity to implementing a multidisciplinary research framework and contributing to a published conference paper. It established practical experience in machine learning, network security, Python software engineering, experimental validation and academic research.