AI-Assisted Log Analysis for Incident Response: Detecting Living-off-the-Land Attacks in Windows Sysmon Logs Using Random Forest and LIME Explainability
AI-Assisted Log Analysis for Incident Response: Detecting Living-off-the-Land Attacks in Windows Sysmon Logs Using Random Forest and LIME Explainability
AI-Assisted Log Analysis for Incident Response: Detecting Living-off-the-Land Attacks in Windows Sysmon Logs Using Random Forest and LIME Explainability
This project proposes and evaluates an AI-assisted detection system for identifying LotL ransomware attacks in Windows Sysmon log data. The system uses a Random Forest machine learning classifier trained on the CSU Ransomware Dataset, a publicly available dataset containing 352,876 labelled Sysmon log entries with 19 pre-engineered behavioural features. To justify the selection of Random Forest as the primary model, it is compared empirically against two baseline classifiers: Decision Tree and Logistic Regression, under identical experimental conditions. The system is also evaluated against a feature-based Sigma rule approximation serving as the rule-based detection baseline, and enhanced with LIME (Local Interpretable Model-Agnostic Explanations) to generate locally interpretable, feature-level explanations for individual model predictions.
This project proposes and evaluates an AI-assisted detection system for identifying LotL ransomware attacks in Windows Sysmon log data. The system uses a Random Forest machine learning classifier trained on the CSU Ransomware Dataset, a publicly available dataset containing 352,876 labelled Sysmon log entries with 19 pre-engineered behavioural features. To justify the selection of Random Forest as the primary model, it is compared empirically against two baseline classifiers: Decision Tree and Logistic Regression, under identical experimental conditions. The system is also evaluated against a feature-based Sigma rule approximation serving as the rule-based detection baseline, and enhanced with LIME (Local Interpretable Model-Agnostic Explanations) to generate locally interpretable, feature-level explanations for individual model predictions.

RESULTS
RESULTS
The chart clearly shows Random Forest and Decision Tree performing at a similar level, both bars reaching above 98% for accuracy and above 99% for recall, while Logistic Regression falls noticeably short, particularly on recall where its bar reaches only 91%.
The chart clearly shows Random Forest and Decision Tree performing at a similar level, both bars reaching above 98% for accuracy and above 99% for recall, while Logistic Regression falls noticeably short, particularly on recall where its bar reaches only 91%.

Random Forest outperforms both alternatives across every metric. The margin over Decision Tree is small: 0.03% in accuracy and 0.14% in recall, but consistent across all five cross-validation folds. Crucially, Random Forest's recall standard deviation of ±0.07% is lower than Decision Tree's ±0.10%, confirming it is not only marginally more accurate but also more stable across different data partitions. In a SOC environment where consistent detection performance matters operationally, this stability is a meaningful advantage
Random Forest outperforms both alternatives across every metric. The margin over Decision Tree is small: 0.03% in accuracy and 0.14% in recall, but consistent across all five cross-validation folds. Crucially, Random Forest's recall standard deviation of ±0.07% is lower than Decision Tree's ±0.10%, confirming it is not only marginally more accurate but also more stable across different data partitions. In a SOC environment where consistent detection performance matters operationally, this stability is a meaningful advantage

The result above directly compares the performance of the Random Forest model against the Sigma rule baseline across all four metrics. The contrast is striking: the green Random Forest bars dominate across every metric, while the red Sigma rule bars fall dramatically short on recall and F1 score, with bars barely visible above zero at 0.20% and 0.40%, respectively. The Sigma rules flagged only 191 entries as ransomware across 352,876 entries, catching 163 genuine cases while missing 80,720.
The result above directly compares the performance of the Random Forest model against the Sigma rule baseline across all four metrics. The contrast is striking: the green Random Forest bars dominate across every metric, while the red Sigma rule bars fall dramatically short on recall and F1 score, with bars barely visible above zero at 0.20% and 0.40%, respectively. The Sigma rules flagged only 191 entries as ransomware across 352,876 entries, catching 163 genuine cases while missing 80,720.
LIMITATIONS
LIMITATIONS
The primary limitation of the research is that the Sigma rule baseline is a feature-based approximation rather than a direct deployment of real SigmaHQ YAML rules, due to the pre-processed nature of the dataset. Future work should address this by sourcing raw
The primary limitation of the research is that the Sigma rule baseline is a feature-based approximation rather than a direct deployment of real SigmaHQ YAML rules, due to the pre-processed nature of the dataset. Future work should address this by sourcing raw
All Python scripts developed and explained during the implementation phase are stored in a public GitHub repository and can be accessed via the link below.
All Python scripts developed and explained during the implementation phase are stored in a public GitHub repository and can be accessed via the link below.
Repository Link:
Repository Link:
CONTACT
Reach out to discuss entry-level SOC roles, Internships, or cybersecurity collaborations
OKONOBOH
OKONOBOH
OKONOBOH
CONTACT
Reach out to discuss entry-level SOC roles, Internships, or cybersecurity collaborations
CONTACT
Reach out to discuss entry-level SOC roles, Internships, or cybersecurity collaborations
