8200 Cyber Bootcamp

© 2025 8200 Cyber Bootcamp

DS-IID Insider & AI Threat Detection Model

DS-IID Insider & AI Threat Detection Model

The DS-IID model uses deep feature synthesis and binary deep learning to detect malicious insiders and AI-generated profiles. On imbalanced data, it achieved 97% accuracy and 0.99 AUC on the CERT dataset.

A Novel Deep Synthesis-Based Insider Intrusion Detection (DS-IID) Model for Malicious Insiders and AI-Generated Threats

Published: January 2, 2025 | Scientific Reports
Authors: Hazem M. Kotb, Tarek Gaber, Salem AlJanah, Hossam M. Zawbaa, Mohammed Alkhathami, et al.


Table of Contents


Introduction

Cybersecurity remains one of the most critical challenges for modern enterprises. While organizations have traditionally invested in perimeter security measures like firewalls and intrusion detection systems (IDS), the growing prevalence of insider threats has shifted focus to detecting internal anomalies. Insider threats—whether from malicious insiders, negligent employees, or compromised users—account for a significant portion of cybersecurity incidents. Moreover, the rise of generative artificial intelligence (AI) has introduced new complexities in threat detection: automated systems can now generate highly convincing fake user profiles that mimic legitimate behavior.

In this blog post, we explore a novel Deep Synthesis-Based Insider Intrusion Detection (DS-IID) model that addresses these challenges head on. This model not only identifies malicious insiders using deep learning but also distinguishes between real and AI-generated (synthetic) user profiles. We will walk through the underlying principles, elaborate on technical aspects, present code samples for real-world detection scenarios, and discuss the performance of the model based on the CERT insider threat dataset.


Understanding Insider Threats and AI-Generated Dangers

Insider Threats: A Persistent Challenge

Insider threats originate from internal entities—employees, contractors, or trusted devices—that possess legitimate access to an organization’s resources. Because these users already have elevated privileges, their anomalous behavior can bypass traditional security measures, making them difficult to detect using standard anomaly detection systems. According to recent studies, insider threats account for up to 79% of cybersecurity issues in many organizations.

The Impact of Generative AI on Insider Threat Detection

The situation has become even more complex with the advent of generative AI technologies. These systems are capable of creating realistic, synthetic data that can impersonate legitimate user behavior. By automatically generating fake user profiles, attackers can conceal their malicious activities behind a façade of authenticity. Traditional IDS systems often struggle to differentiate between genuine and synthetic activities, leading to potential security lapses.


The DS-IID Model: Core Concepts and Contributions

The DS-IID model represents a novel approach that combines the power of deep feature synthesis, generative modeling, and binary deep learning to detect insider threats. This multifaceted methodology allows the DS-IID model to meet three primary objectives:

  1. Detect malicious insiders using supervised learning techniques.
  2. Evaluate the ability of generative algorithms to mimic real user profiles.
  3. Differentiate between real and synthetic abnormal user profiles, ensuring that AI-generated threats are flagged appropriately.

Deep Feature Synthesis (DFS) for User Profiling

Deep Feature Synthesis (DFS) is at the core of the DS-IID model. Unlike manual feature engineering, DFS enables the automated extraction of detailed user profiles from raw event data. By synthesizing complex features from logs, network activity, and user behavior, the model builds a comprehensive view of each user’s activity. This process is key for:

  • Reducing manual intervention and potential human error.
  • Allowing the system to adapt quickly to new data types and evolving threat landscapes.
  • Enhancing the robustness of subsequent classification tasks.

Integration of Generative AI and Deep Learning

The DS-IID model integrates generative models to simulate real user profiles. This simulation is crucial for evaluating the likelihood that a suspicious profile could have been generated by an AI, thereby mimicking legitimate user behavior. In parallel, a binary deep learning classifier—trained on both real and synthetic data—is used to determine if a user profile is legitimate or malicious. This dual approach allows for:

  • High-accuracy detection (up to 97% accuracy and an AUC of 0.99 on the CERT dataset).
  • Effective handling of imbalanced data, ensuring that the detection system is robust against both false positives and false negatives.

Addressing Data Imbalance in Cybersecurity

Data imbalance is a common problem in cybersecurity, where the number of benign instances far exceeds the number of malicious events. To address this, the DS-IID model employs on-the-fly weighted random sampling. This technique dynamically adjusts the sampling process during training, ensuring that rare malicious events have an appropriate impact on the learning process.

By leveraging weighted sampling, the DS-IID model is able to focus on the minority class (malicious behavior) without sacrificing overall model performance. This results in more reliable detection rates and a lower risk of misclassifying benign behavior as an anomaly.


Technical Architecture and Implementation

The DS-IID model is built on a multi-layered architecture that integrates diverse methods for data processing, feature extraction, and classification. Here we provide a technical overview of each module.

Data Acquisition and Preprocessing

The DS-IID model leverages publicly available datasets such as the CERT insider threat dataset. The data acquisition process involves collecting raw event logs, user authentication records, network traffic data, and other relevant logs. Preprocessing steps include:

  • Normalization: Standardizing the data to ensure consistency.
  • Data Cleaning: Removing irrelevant or noisy data points.
  • Timestamp Alignment: Ensuring that events are chronologically aligned for accurate sequence modeling.

Feature Extraction and Synthesis

After preprocessing, deep feature synthesis is applied to extract multi-dimensional features from raw event logs:

  • Tabular Transformation: Converting raw logs into structured tables.
  • Automated Feature Generation: Using DFS tools and frameworks to generate combinations of features (aggregations, time-series patterns, etc.).
  • Feature Selection: Employing statistical and machine learning criteria (e.g., mutual information, Pearson correlation) to select the most relevant features for detecting insider threats.

Binary Deep Learning Classification

The final stage is classification, where a binary deep learning model is trained to differentiate between legitimate and malicious user profiles. Key steps include:

  • Model Architecture: The architecture typically comprises multiple fully connected layers with non-linear activation functions (e.g., ReLU) and dropout layers to prevent overfitting.
  • Loss Function: A binary cross-entropy loss function is used to optimize the detection performance.
  • On-The-Fly Weighted Sampling: During training, weights are dynamically updated to address class imbalance, ensuring that minor classes (malicious insiders) receive sufficient attention.

Below is a simplified Python code snippet demonstrating a deep learning model setup using TensorFlow/Keras:

import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout

# Define the DS-IID Binary Classification Model
def build_ds_iid_model(input_dim):
    model = Sequential()
    model.add(Dense(128, activation='relu', input_dim=input_dim))
    model.add(Dropout(0.3))
    model.add(Dense(64, activation='relu'))
    model.add(Dropout(0.3))
    model.add(Dense(32, activation='relu'))
    model.add(Dropout(0.3))
    model.add(Dense(1, activation='sigmoid'))
    
    model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
    return model

# Sample usage:
if __name__ == "__main__":
    input_dimensions = 30  # Example feature count after DFS
    model = build_ds_iid_model(input_dimensions)
    model.summary()

This model outline demonstrates the process of initializing a deep learning model capable of binary classification, which is central to the DS-IID system.


Real-World Application Examples and Code Samples

To better illustrate the capabilities of the DS-IID model, the following sections describe real-world examples, including Bash and Python code samples. These examples cover scanning log files for suspicious activity and parsing output to feed into a deep learning pipeline.

Bash-Based Log Scanning Example

In a real-world cybersecurity environment, scanning logs for anomalies is a common task. The following Bash script demonstrates how to search system logs for suspicious login attempts or activities that may warrant further analysis.

#!/bin/bash
# Path to the log file (example: /var/log/auth.log)
LOG_FILE="/var/log/auth.log"

# Define a pattern for suspicious entries, e.g., multiple failed login attempts or unusual activity
PATTERN="Failed password|Invalid user"

# Scan the log file and output findings to a temporary file
echo "Scanning logs for suspicious activity..."
grep -E "$PATTERN" "$LOG_FILE" > suspicious_activity.log

# Provide a summary
echo "Summary of suspicious entries:"
wc -l suspicious_activity.log

# Print the first 10 lines of the log for quick inspection
echo "First 10 suspicious log entries:"
head -n 10 suspicious_activity.log

This Bash script automates the detection of potentially malicious events, such as unauthorized logins. The output from the script can then be processed further by downstream analysis tools, including the DS-IID model.

Python Script for Parsing and Deep Feature Synthesis

Once suspicious events have been extracted from logs, they can be further processed using Python. The following script demonstrates how to parse log files, perform basic preprocessing, and synthesize deeper features from the data.

import pandas as pd
import numpy as np
from datetime import datetime

# Example function to parse a log file and create a structured DataFrame
def parse_log_file(log_file_path):
    data = []
    with open(log_file_path, 'r') as f:
        for line in f:
            # Example log line format: "Jan 01 12:34:56 hostname sshd[1234]: Failed password for invalid user"
            parts = line.split()
            timestamp_str = " ".join(parts[0:3])
            try:
                timestamp = datetime.strptime(timestamp_str, '%b %d %H:%M:%S')
            except ValueError:
                continue
            log_entry = {
                'timestamp': timestamp,
                'hostname': parts[3],
                'service': parts[4].split('[')[0],
                'message': " ".join(parts[5:])
            }
            data.append(log_entry)
    return pd.DataFrame(data)

# Simulated deep feature synthesis (DFS) function, aggregating log data by user or IP
def generate_features(df):
    # Example: Count number of suspicious events per hostname
    feature_df = df.groupby('hostname').size().reset_index(name='suspicious_count')
    
    # Further feature synthesis: Time-based features (e.g., average events per hour)
    df['hour'] = df['timestamp'].dt.hour
    hourly_features = df.groupby(['hostname', 'hour']).size().unstack(fill_value=0)
    feature_df = feature_df.merge(hourly_features, on='hostname', how='left')
    
    return feature_df

if __name__ == "__main__":
    log_df = parse_log_file('suspicious_activity.log')
    features = generate_features(log_df)
    print("Generated Features:")
    print(features.head())

    # Save processed features to a CSV file for training the DS-IID model
    features.to_csv('user_features.csv', index=False)

This Python script demonstrates:

  • Log Parsing: Converting raw log entries into a structured format using Pandas.
  • Feature Generation: Aggregating events by hostname and synthesizing time-based features.
  • Export for Model Training: Saving the feature matrix as CSV for subsequent use in training the DS-IID deep learning classifier.

Experimental Results and Model Evaluation

The DS-IID model has been thoroughly evaluated using the CERT insider threat dataset. Below are some key performance highlights:

  • Accuracy: 97%
  • AUC (Area Under the Curve): 0.99
  • Real vs. AI-Generated Profiles: Over 99% accuracy in differentiating synthetic from genuine profiles.

Evaluation Metrics

The model’s performance was measured using a comprehensive set of nine metrics:

  • Cohen’s Kappa: Reflecting agreement between predicted and actual labels.
  • True Positive Rate (TPR): The probability that a malicious profile is correctly classified.
  • False Positive Rate (FPR): The probability that a benign profile is incorrectly flagged as malicious.
  • False Alarm Rate (FAR): Related to FPR and critical in cybersecurity applications.
  • Recall and Precision: To balance the true positives against false negatives and positives.
  • F1 Score: The harmonic mean of precision and recall.
  • Accuracy: The overall correctness of the model.
  • AUC: Demonstrates the trade-off between TPR and FPR across varying thresholds.

Using on-the-fly weighted random sampling during training, the DS-IID model maintained high performance even when facing imbalanced class distributions—an important feature given the typically low occurrence rate of malicious insider events compared to normal behavior.

Comparative Analysis with Traditional Methods

Unlike conventional intrusion detection models that often rely on handcrafted rules or unsupervised clustering, the DS-IID model leverages deep synthesis and binary deep learning to achieve a higher degree of accuracy. While related studies have reported detection accuracies ranging between 54% to 98%, the DS-IID model’s integration of automated feature synthesis and handling of AI-generated synthetic data provides a significant edge.


Best Practices for Deployment in Real-World Systems

Deploying a model like DS-IID in production requires careful planning and integration with existing IT infrastructures. Here are some best practices:

  1. Integration with SIEM Systems:
    DS-IID should be integrated with Security Information and Event Management (SIEM) systems to provide real-time alerts and automated responses.

  2. Periodic Model Re-Training:
    The threat landscape evolves constantly. Regularly updating the model with new data (including newly synthesized profiles) ensures its continued effectiveness.

  3. Hybrid Deployment:
    Combine the DS-IID with traditional IDS systems to provide layered security, ensuring that any potential gaps in one system are covered by another.

  4. Data Privacy Compliance:
    Ensure that all logs and data used for training the model adhere to privacy and data protection regulations. This is critical when processing sensitive user data.

  5. Performance Monitoring and Feedback Loops:
    Implement monitoring dashboards that track the DS-IID model’s performance in real time. Automated feedback mechanisms can provide valuable insights for continuous improvement.

  6. User Training and Awareness:
    Train security personnel on how to interpret model outputs and integrate DS-IID alerts into the broader incident response strategy.


Conclusion

The DS-IID model represents a significant advance in insider threat detection, particularly in an era where generative AI is capable of creating deceptive synthetic user profiles. By leveraging deep feature synthesis to automatically generate detailed user profiles and applying binary deep learning for classification, DS-IID achieves high accuracy and efficiency in detecting both traditional and AI-generated insider threats.

In summary:

  • The DS-IID model tackles the challenge of imbalanced data using on-the-fly weighted sampling.
  • Automated deep feature synthesis minimizes manual intervention and adapts easily to various datasets.
  • Through rigorous evaluation on the CERT dataset, DS-IID demonstrated its capability with an accuracy of 97% and an AUC of 0.99.
  • Real-world applications, as evidenced by the provided Bash and Python code samples, show the practical utility of the model in scanning logs and synthesizing features for further analysis.

As organizations continue to face increasingly sophisticated internal threats, integrating models like DS-IID into cybersecurity infrastructures offers a promising path forward. With its novel approach combining deep synthesis and AI-driven detection, the DS-IID model not only enhances traditional IDS capabilities but also pioneers new methods of mitigating risks associated with automated, AI-generated threats.


References

  1. CERT Insider Threat Center
  2. Deep Feature Synthesis Publication - Featuretools
  3. TensorFlow Official Website
  4. Keras Documentation
  5. Scientific Reports Journal
  6. Understanding Data Imbalance in Cybersecurity
  7. Generative AI in Cybersecurity

By blending cutting-edge techniques with practical coding implementations, this long-form technical guide highlights the multifaceted approach behind DS-IID. Whether you are a cybersecurity professional seeking to enhance your organization’s defenses or a data scientist interested in advanced deep learning applications, the DS-IID model presents a robust, scalable solution to the complex problems of insider threat detection in the modern era. Happy coding and stay secure!

🚀 READY TO LEVEL UP?

Take Your Cybersecurity Career to the Next Level

If you found this content valuable, imagine what you could achieve with our comprehensive 47-week elite training program. Join 1,200+ students who've transformed their careers with Unit 8200 techniques.

97% Job Placement Rate
Elite Unit 8200 Techniques
42 Hands-on Labs