Location Research Breakthrough Possible @S-Logix pro@slogix.in

Explainable CatBoost-Based Detection of Insider Threats Through Unauthorized Sensitive-File Access in Linux Systems Using SHAP

Description

Organizations use Linux-based systems to store sensitive files, application configurations, business records, research documents, and other important information. Access to these files is generally controlled through user accounts, file permissions, authentication mechanisms, and application-level authorization.

Insider threats can arise when an authorized user accesses sensitive information beyond their legitimate responsibilities or attempts to access files belonging to another user. Such activity may involve unusual file-access patterns, repeated access attempts, access to sensitive directories, or attempts to read files that the user is not authorized to access.

Traditional security mechanisms enforce access permissions and generate audit records, but they do not automatically determine whether every permitted file-access event is suspicious from a behavioral perspective. An access attempt may also be technically permitted while still deviating from a user's normal activity. Therefore, monitoring and behavioral analysis can provide additional security information alongside existing access controls.

In this use case, a controlled Linux file-access monitoring environment is implemented using Ubuntu Linux and Kali Linux virtual machines. Ubuntu acts as the target file server and monitoring environment, while Kali Linux acts as the separate security-testing machine used to perform controlled unauthorized file-access attempts.

A network-accessible file service is configured on Ubuntu so that Kali can communicate with the target through an actual application protocol rather than attempting to access another virtual machine's local filesystem directly. A laboratory-only Samba file share can provide this functionality. Test accounts and sample files are used to represent authorized and unauthorized file-access scenarios.

A public insider-threat or user-activity dataset is used as the existing data source for the machine-learning research. The dataset is reviewed to determine whether its available labels and features are suitable for the intended classification task. The training data is not manually invented for the project.

CatBoost is used as the machine-learning algorithm for classification when the selected dataset provides appropriate labelled features. SHAP is used to explain the contribution of individual input features to the model's predictions.

On Ubuntu, auditd is configured to record relevant file-access and security events. The exact events and fields collected depend on the configured audit rules and the activity being monitored. Controlled activity generated from Kali is correlated with the corresponding Ubuntu-side audit evidence.

The public dataset and locally collected audit events are evaluated for feature compatibility before attempting to apply the trained model to the laboratory events. If their schemas or meanings are incompatible, the public dataset model evaluation and local audit-event analysis are reported separately rather than incorrectly treating the two data sources as interchangeable.

The complete workflow is:
Public Insider-Threat Dataset
→
Dataset Review
→
Normal and Suspicious Activity Label Review
→
Data Preprocessing
→
Feature Engineering
→
CatBoost Model Training
→
Model Validation
→
Kali Linux Testing Machine
→
Controlled Unauthorized File-Access Attempt
→
Ubuntu Linux File Server
→
Audit Event Collection
→
Audit-Event Processing
→
Feature Compatibility Assessment
→
CatBoost Classification Where Compatible
→
SHAP Explanation
→
Security Evidence Correlation
→
Final Detection Evaluation

Existing Security Problem

Application: Ubuntu Linux File Server with Samba

Ubuntu Linux is the target operating system and file-server environment in this use case. A Samba file share is configured to provide network-based access to selected laboratory files.

Kali Linux is used as a separate testing machine. It communicates with the Ubuntu file server through the configured laboratory network and attempts to access files using the available test credentials and permissions.

The target environment uses sample files and controlled test accounts. No real confidential files or production user accounts are involved.

Ubuntu also provides the monitoring environment in which auditd records the configured security-relevant operating-system events. These events provide evidence of the file-access activity generated during the experiment.

Existing Problem :

Linux systems use file permissions and access-control mechanisms to restrict which users can read, modify, or execute files. A network file service such as Samba applies its own share configuration and account-related access controls in addition to the underlying filesystem permissions.

However, enforcing permissions and detecting suspicious behavior are different security functions.

An unauthorized file-access attempt may be rejected by the server, but the attempt can still be useful security evidence. Conversely, a request that succeeds because the requesting account has permission may still be unusual and require further investigation.

Traditional access-control mechanisms do not necessarily classify activity according to behavioral patterns learned from historical user activity. Security teams therefore need ways to correlate access-control decisions, audit events, and behavioral-analysis results.

The security problem is:
Linux File Server
→
Normal User File-Access Activity
→
Sensitive File or Directory
→
Unusual File-Access Request
→
Access-Control Evaluation
→
Potential Unauthorized or Suspicious Activity
→
Operating-System Audit Event
→
Behavioral Analysis Requirement
→
Security Detection and Investigation

The proposed solution combines Linux file-access monitoring, a public user-activity dataset, CatBoost classification, and SHAP explainability. Kali Linux generates controlled test activity against the Ubuntu file service, while Ubuntu records the resulting events. The experiment evaluates whether the collected evidence and machine-learning workflow can support the identification and explanation of suspicious file-access behavior.

Attack

Specific Attack: Controlled Unauthorized Sensitive-File Access Attempt

The controlled attack scenario evaluates whether a test account operating from Kali Linux can attempt to access a sample file that the account is not authorized to read through the Ubuntu file server.

The Ubuntu environment contains a network-accessible file share, sample sensitive files, and test accounts with defined access permissions. Kali Linux acts as the separate testing machine and sends file-access requests to the Ubuntu service.

The attack scenario is designed to generate observable security events without modifying or damaging the target system. The expected result depends on the actual Samba configuration, account permissions, and filesystem access controls.

If the access controls are configured correctly, the unauthorized request should be rejected. The failed request and its associated audit or service evidence can then be examined as part of the security assessment.

This controlled scenario demonstrates an unauthorized access attempt. It does not, by itself, establish that the activity is an insider attack. Insider-threat classification requires suitable labelled training data and supporting context about user activity.

Attack Behavior
Kali Linux Testing Machine
→
Connection to the Ubuntu File Service
→
Authentication Using a Laboratory Test Account
→
Request for a Restricted Sample File
→
Ubuntu Samba Access-Control Evaluation
→
Access Denied or Other Observed Result
→
Relevant Audit and Service Event Collection
→
Audit-Event Processing
→
Behavioral Feature Analysis
→
CatBoost Classification Where Supported by Compatible Features
→
SHAP-Based Prediction Explanation
→
Controlled Attack Evidence Validation

Security Concept

Explainable Machine-Learning-Based Insider-Threat Detection

The primary security concept is behavioral analysis of sensitive-file access combined with explainable machine-learning classification.

The first objective is to examine a public insider-threat or user-activity dataset and identify whether it contains suitable labelled observations and features for classifying normal and suspicious activity. The available dataset must support the intended classification task; its labels must not be assumed to represent Linux file-access attacks unless the dataset documentation establishes that relationship.

The second objective is to collect real operating-system audit evidence from the controlled Ubuntu file server while Kali Linux performs legitimate and unauthorized test requests. These events are used to examine the behavior of the target system and establish evidence of the controlled access attempts.

The third objective is to use CatBoost to classify appropriately prepared data and SHAP to explain the model's predictions. Model training and evaluation must be based on the available labels, while local attack validation must be grounded in the actual observed events.

The workflow distinguishes between model evaluation on the public dataset and analysis of local Ubuntu audit events. A model trained on one feature schema cannot automatically classify another schema reliably. Before using the trained model on local events, the required features, data types, meanings, and preprocessing operations must be compatible.

The assessment follows:
Public User-Activity Dataset Review
→
Label and Feature Validation
→
Data Preprocessing
→
CatBoost Model Training
→
Model Performance Evaluation
→
Ubuntu File-Access Monitoring
→
Kali-Based Controlled Access Attempt
→
Audit Event Collection
→
Audit-Event Feature Extraction
→
Feature Compatibility Assessment
→
Classification Where Technically Supported
→
SHAP Explanation
→
Attack-Evidence Correlation
→
Security Detection Evaluation

Defensive Mechanism

The security concept defines the overall security strategy. The following are the specific defensive mechanisms implemented in this use case.

File Access Control :

Ubuntu uses filesystem permissions, account permissions, and Samba share configuration to control access to laboratory files.

Purpose: Prevent test accounts from accessing files beyond their configured permissions.

Linux Audit Monitoring

auditd is configured with suitable audit rules to record relevant file-access and security events.

Purpose
  • Collect operating-system audit evidence associated with the controlled file-access activity.

Behavioral Feature Processing

Public dataset records and locally collected audit events are reviewed and processed according to their respective schemas.

Purpose
  • Prepare suitable data for behavioral analysis without assuming that incompatible data sources are interchangeable.

CatBoost-Based Classification

CatBoost is trained and evaluated using appropriately labelled data and a defined set of input features.

Purpose
  • Classify observations according to the behavioral patterns represented in the training data.

SHAP-Based Explainability

SHAP is used to analyze the contribution of input features to individual CatBoost predictions.

Purpose
  • Explain which input features contributed to a model prediction.

Security Evidence Correlation

The controlled access attempt is compared with the corresponding Ubuntu audit and Samba evidence.

Purpose
  • Determine whether the observed events correspond to the known laboratory test activity.

Controlled Laboratory Isolation

Kali Linux and Ubuntu Linux operate in an isolated VirtualBox laboratory using sample files and test accounts.

Purpose
  • Reproduce and investigate unauthorized file-access behavior without targeting production systems or real confidential data.

Security Tools

Primary Target Operating System: Ubuntu Linux

Ubuntu Linux hosts the target file-service environment and the monitoring components used in the experiment.

Purpose
  • Host the controlled file server.
  • Enforce the configured filesystem permissions.
  • Collect relevant operating-system audit events.
  • Support local security-event processing and analysis.

Network File-Service Tool: Samba

Samba provides a network-accessible file share that allows Kali Linux to send file-access requests to Ubuntu through an actual service.

Purpose
  • Expose selected laboratory files through a controlled network share.
  • Apply the configured share and account permissions.
  • Provide an observable access-control layer for the test scenarios.

Attacking and Testing Platform: Kali Linux

Kali Linux acts as the separate security-testing machine used to generate controlled file-access requests.

Purpose
  • Connect to the Ubuntu file service through the laboratory network.
  • Perform authorized and unauthorized test-account access attempts.
  • Validate the observed file-service and audit behavior.

Operating-System Audit Tool: auditd

auditd provides the Linux auditing framework used to record events selected by the configured audit rules.

Purpose
  • Record relevant file-access and security events.
  • Provide evidence for reviewing the controlled test activity.
  • Support the analysis of audit records generated by the Ubuntu target.

Machine-Learning Algorithm: CatBoost

CatBoost is the classification algorithm used to train and evaluate the insider-threat or user-activity model.

Purpose
  • Train a classifier using suitable labelled dataset records.
  • Generate predictions for compatible input features.
  • Support the evaluation of classification performance.

Explainable AI Tool: SHAP

SHAP is used to explain the contribution of individual features to CatBoost model predictions.

Purpose
  • Identify features contributing to individual predictions.
  • Support interpretation of model behavior.
  • Provide additional information for reviewing classification results.

Programming Environment: Python

Python provides the main implementation environment for dataset processing, audit-event analysis, model training, prediction, and explainability.

Purpose
  • Integrate the machine-learning workflow.
  • Process compatible input features.
  • Automate prediction and explanation tasks.
  • Record the results of the experiment.

Data Processing Tool: Pandas

Pandas is used to load, filter, transform, and organize dataset records and audit-event data.

Purpose
  • Process the existing public dataset.
  • Review dataset labels and feature fields.
  • Organize locally collected audit records.
  • Prepare structured data for analysis.

Numerical Processing Tool: NumPy

NumPy supports numerical transformations required during feature preparation and model processing.

Purpose
  • Perform numerical feature operations.
  • Support the preparation of model inputs.
  • Assist in numerical analysis of processed data.

Model Evaluation Tool: Scikit-learn

Scikit-learn supports dataset splitting and classification evaluation.

Purpose
  • Separate training and evaluation data appropriately.
  • Calculate classification metrics such as precision, recall, and F1-score.
  • Produce confusion-matrix results for labelled evaluation samples.

Virtualization Platform: VirtualBox

VirtualBox provides the isolated virtual-machine environment used for the Ubuntu target and Kali testing system.

Purpose
  • Host the two laboratory virtual machines.
  • Separate the target environment from the testing machine.
  • Support repeatable controlled security experiments.

Security Testing Platform: Ubuntu and Kali Linux

Ubuntu and Kali Linux are used together to conduct the controlled network-based file-access experiment.

Purpose
  • Generate file-access activity from a separate testing system.
  • Observe access-control decisions on the target system.
  • Correlate testing activity with available security evidence.

Process

STEP 01

Prepare the Isolated Virtualized Security Environment

  • Create an isolated cybersecurity laboratory using VirtualBox.
  • Configure an Ubuntu Linux virtual machine to act as the target file server and monitoring environment.
  • Configure a separate Kali Linux virtual machine to act as the security-testing machine.
  • Configure the network adapters so that the two virtual machines can communicate through the intended laboratory network.
  • Ensure that the target and testing systems have appropriate network connectivity without exposing the test service unnecessarily to external networks.
  • Record the IP addresses of both virtual machines and verify that the laboratory network is functioning as intended.
  • Confirm that all testing will be performed against the authorized local environment.
Tools: VirtualBox + Ubuntu Linux + Kali Linux
STEP 02

Configure the Ubuntu File Server

  • Prepare Ubuntu Linux as the target system for the file-access experiment.
  • Install and configure Samba within the Ubuntu virtual machine using the required administrative permissions.
  • Create a dedicated laboratory share containing sample files.
  • Configure the share to use designated laboratory accounts and appropriate access permissions.
  • Verify that the service starts successfully and that the share is accessible through the intended network interface.
  • Keep the file share limited to the laboratory network and avoid placing real confidential information in the test directory.
Tools: Ubuntu Linux + Samba
STEP 03

Establish the File-Access Permission Baseline

  • Create suitable laboratory test accounts for authorized and restricted access scenarios.
  • Prepare sample files representing ordinary and restricted file-access conditions.
  • Configure the filesystem permissions and Samba share permissions for the test accounts.
  • Verify that an authorized account can access the files permitted by the configuration.
  • Verify that a restricted account cannot access files outside its assigned permissions.
  • Record the expected access-control result for each test scenario so that later observations can be compared with the intended configuration.
Tools: Ubuntu Linux + Samba
STEP 04

Validate Network Connectivity and Service Exposure

  • Use Kali Linux to identify and verify the intended connectivity to the Ubuntu target.
  • Confirm that the Ubuntu virtual machine is reachable through the configured laboratory network.
  • Check that the Samba service is listening on the expected interface and port.
  • Use controlled service discovery to verify the intended service exposure
  • Confirm that the file service is accessible from Kali Linux only through the configured laboratory path.
  • Record the network and service configuration required to reproduce the experiment.
Tools: Kali Linux + Nmap + Ubuntu Linux
STEP 05

Prepare the Public User-Activity Dataset

  • Obtain an existing public insider-threat or user-activity dataset appropriate for the intended classification task.
  • Review the dataset documentation to identify its origin, available labels, feature meanings, and limitations.
  • Load the dataset into the Python processing environment without manually inventing training records.
  • Determine whether the dataset contains meaningful normal and suspicious activity labels.
  • Review whether the available features relate to user behavior, file access,authentication, or other activity relevant to the research objective.
  • Preserve the original dataset and its documentation so that the training and evaluation process can be reproduced.
Tools: Python + Pandas
STEP 06

Review Labels and Select Suitable Training Data

  • Examine the labels available in the public dataset.
  • Determine how normal and suspicious activity are defined by the dataset provider.
  • Select the records appropriate for the intended CatBoost classification task.
  • Check for missing values, duplicate records, inconsistent labels, and features that may reveal the target label without providing meaningful generalizable information.
  • Avoid assuming that dataset labels directly represent Linux file-access attacks unless the dataset documentation supports that interpretation.
  • Record the selection criteria and retain the original labels for model evaluation.
Tools: Python + Pandas + NumPy
STEP 07

Configure the Controlled Kali-to-Ubuntu Access Test

  • Prepare Kali Linux as the separate testing machine and Ubuntu as the target file server.
  • Connect to the Ubuntu Samba share using the designated laboratory test account.
  • Perform an ordinary authorized file-access request to establish the expected baseline behavior.
  • Perform a controlled request for a sample file that the selected account is not authorized to read.
  • Observe whether the server rejects the request or produces another result based on the actual configuration.
  • Record the test account, requested resource, time of the attempt, and observed result so that the activity can later be correlated with the target-side evidence.
Tools: Kali Linux + Samba + Ubuntu Linux
STEP 08

Configure Ubuntu Audit Monitoring

  • Configure auditd on Ubuntu to record the relevant file-access events and other security events required by the experiment.
  • Define audit rules appropriate to the selected laboratory directory, files, and test operations.
  • Verify that the audit service is running and that the configured rules are loaded.
  • Perform a controlled file-access operation and inspect the resulting audit records.
  • Confirm which fields are available in the generated events, such as timestamps, user identifiers, process information, file paths, or access-related details where supported by the rules and event type.
  • Record the audit configuration and confirm that the expected events are actually being collected.
Tools: Ubuntu Linux + auditd
STEP 09

Preprocess the Public Dataset

  • Load the selected dataset records into Python and inspect their data types and feature structure.
  • Handle missing or inconsistent values using a documented preprocessing strategy appropriate to the dataset.
  • Convert categorical values into representations supported by the selected CatBoost configuration.
  • Identify and remove features that are unavailable at prediction time or unsuitable for the intended classification task.
  • Preserve the meaning of the original labels and ensure that preprocessing does not introduce information from the evaluation labels into the model inputs.
  • Record the preprocessing configuration so that the same procedure can be applied consistently during model evaluation.
Tools: Python + Pandas + NumPy + CatBoost
STEP 10

Prepare the Training and Evaluation Data

  • Separate the labelled public dataset into training and evaluation portions using a suitable splitting strategy.
  • Maintain appropriate representation of the available classes where the dataset permits.
  • Avoid allowing duplicated or closely related records to leak across the training and evaluation partitions when this could produce misleading results.
  • Identify the input features and target label that will be used by CatBoost.
  • Verify that the selected target label represents the classification objective described in the dataset documentation.
  • Record the dataset size, feature list, label distribution, and splitting method used for the experiment.
Tools: Python + Pandas + Scikit-learn
STEP 11

Train the CatBoost Classification Model

  • Configure the CatBoost classifier for the selected labelled dataset.
  • Provide the prepared training features and their corresponding labels to the model.
  • Select suitable training parameters and record the configuration.
  • Train the classifier using the training partition only.
  • Review the training output for errors, missing-value issues, or class-handling problems.
  • Save the trained model and its associated feature definitions and preprocessing configuration for subsequent evaluation.
  • Do not claim that the model can classify local Ubuntu audit events until compatibility between the training features and the local audit features has been established.
Tools: Python + CatBoost + Pandas
STEP 12

Evaluate the Trained Model

  • Load the trained CatBoost model and evaluate it using the reserved labelled evaluation data.
  • Generate predictions for the evaluation records.
  • Compare the predictions against the known labels from the public dataset.
  • Calculate appropriate metrics such as precision, recall, F1-score, and a confusion matrix.
  • Review false-positive and false-negative predictions to understand the model's limitations.
  • Record the evaluation results without inventing performance values or treating model performance on the public dataset as proof of successful detection on the Ubuntu laboratory target.
Tools: Python + CatBoost + Scikit-learn + Pandas
STEP 13

Extract and Organize Ubuntu Audit Events

  • Collect the audit records generated during the authorized and unauthorized file-access tests.
  • Preserve the original audit evidence before performing transformations.
  • Identify the event types and fields available in the collected records.
  • Associate the audit events with the corresponding controlled test activity using the available timestamps, user information, file paths, and other relevant evidence.
  • Handle incomplete or unrelated events according to documented processing rules.
  • Prepare the records for analysis while preserving the distinction between observed audit evidence and inferred security conclusions.
Tools: Ubuntu Linux + auditd + Python + Pandas
STEP 14

Process the Local Audit Data and Assess Feature Compatibility

  • Parse the collected audit records and identify the fields relevant to the laboratory file-access scenarios.
  • Prepare a structured representation of the available event information.
  • Compare the local audit-event schema with the features expected by the trained CatBoost model.
  • Check whether feature meanings, data types, value representations, and preprocessing requirements are compatible.
  • Do not map unrelated audit fields to public-dataset features simply because their values can be converted into numbers.
  • If the schemas are incompatible, retain the local audit-event analysis as a separate validation activity and report the limitation explicitly. If a technically justified compatible representation is available, document the mapping and verify it before inference.
Tools: Python + Pandas + NumPy + CatBoost
STEP 15

Perform CatBoost Classification Where Supported

  • Use the trained CatBoost model to generate predictions only for input records that satisfy the model's required feature schema and preprocessing requirements.
  • If compatible local features are available, prepare the audit-derived input using the documented feature mapping.
  • Generate the classification prediction and retain the corresponding input features and model output.
  • If the local audit events do not provide compatible features, do not submit an artificially constructed feature vector and describe its output as a valid attack-detection result.
  • In that situation, report the public-dataset model evaluation separately and use the local audit evidence to establish what happened during the controlled access test.
  • Record the result and the conditions under which it was generated.
Tools: Python + CatBoost + Pandas
STEP 16

Generate SHAP-Based Explanations

  • Load the trained CatBoost model and the appropriate SHAP explainer for the model configuration.
  • Generate SHAP explanations for selected evaluation records or other valid model inputs.
  • Inspect the feature contributions associated with individual predictions.
  • Identify which input features contributed positively or negatively to the model output according to the explanation method and model output being examined.
  • Where compatible local audit-derived features are legitimately supported, analyze their predictions using the same documented model and feature definitions.
  • Do not interpret a feature contribution as proof of malicious intent. SHAP explains the model's prediction, not the true cause or intention behind a user's activity.
Tools: Python + CatBoost + SHAP + Pandas
STEP 17

Correlate the Detection Results with the Controlled Attack Evidence

  • Review the Kali-side record of the controlled file-access attempt.
  • Review the corresponding Ubuntu Samba response and available audit events.
  • Compare the observed access-control result with the expected result established during baseline testing.
  • Review the CatBoost prediction and SHAP explanation where compatible model inputs are available.
  • Determine whether the model's prediction is relevant to the tested activity and whether the supporting evidence is sufficient to justify the interpretation.
  • Document any mismatch between the model's classification, the observed access-control decision, and the collected audit evidence.
  • Preserve the distinction between an observed unauthorized access attempt, a model-generated classification, and a confirmed security conclusion.
Tools: Kali Linux + Ubuntu Linux + Samba + auditd + Python + CatBoost + SHAP
STEP 18

Perform Final Detection Validation and Security Review

  • Repeat the authorized file-access test and the controlled unauthorized file-access attempt under the same documented laboratory configuration.
  • Verify that the Ubuntu file service applies the intended permissions.
  • Confirm that the configured audit rules record the expected relevant events.
  • Review the public-dataset model evaluation and any supported local classification results separately.
  • Compare the available predictions with the known test conditions and examine false positives, false negatives, and feature-compatibility limitations.
  • Review the SHAP explanations to understand the model behavior without treating them as independent proof of an attack.
  • Document the complete setup, dataset source, preprocessing method, model configuration, audit rules, observed access-control outcomes, evaluation metrics, and limitations.
  • Finalize the security assessment based on the evidence actually obtained from the laboratory.
Tools: VirtualBox + Kali Linux + Ubuntu Linux + Samba + auditd + Python + CatBoost + SHAP + Scikit-learn

Outcome

The project establishes a controlled Linux environment to investigate unauthorized sensitive-file access using Kali Linux and Ubuntu Linux.

The Ubuntu file server provides a network-accessible Samba share for testing sensitive-file access permissions.

Kali Linux generates controlled file-access attempts against the Ubuntu target to evaluate the configured access controls.

The auditd tool records relevant operating-system audit events associated with the tested file-access activity.

A public insider-threat or user-activity dataset provides labelled data for training and evaluating the CatBoost classification model.

The CatBoost model classifies suitable input records according to the behavioral patterns learned from the selected dataset.

SHAP explains the contribution of individual features to the model's predictions, improving the interpretability of the classification results.

The collected Ubuntu audit records are correlated with the controlled access attempts to validate the observed security events.

Feature compatibility is assessed to determine whether the trained model can validly classify locally collected audit events.

The project demonstrates an explainable machine-learning-based approach to analyzing suspicious file-access behavior and evaluating insider-threat detection within an isolated Linux laboratory.