Predicting Cyber Events by Leveraging Hacker Sentiment

Ashok Deb, Kristina Lerman, Emilio FerraraarXiv 2018 · DOI

TL;DR

By applying sentiment analysis to over 400,000 posts across 113 Surface and Dark Web hacking forums, this paper demonstrates that hacker community chatter can predict real-world cyber attacks weeks before they happen. Using these sentiment signals within time-series forecasting models, the authors successfully predicted malware installations and malicious emails for major defense organizations, frequently outperforming state-of-the-art baselines.

What Problem Does This Paper Address?

Traditional cybersecurity is largely reactive, focusing on detecting attacks as they happen or mitigating them after the fact. Predicting cyber threats in advance is notoriously difficult because attackers actively obfuscate their tracks.

However, hackers are also social beings. Before launching an attack, they frequently discuss vulnerabilities, share exploit techniques, and trade tools on public and hidden web forums. The challenge lies in converting this massive, unstructured, and noisy text data into actionable, predictive intelligence. This paper addresses this gap by exploring whether the collective sentiment of hacker communities can serve as a leading indicator of real-world cyber events.

Methods

The authors developed a predictive pipeline that combines natural language processing (NLP) with time-series forecasting:

  1. Sentiment Extraction: They utilized three distinct sentiment analysis tools to evaluate forum posts: VADER (rule-based and tuned for microblogs), LIWC (Linguistic Inquiry and Word Count, focusing on the 'Tone' dimension), and SentiStrength (optimized for social media text).
  2. Signal Smoothing: Because daily forum activity fluctuates wildly, post-level sentiment scores were aggregated into daily averages and smoothed using a 7-day running average. This window was mathematically optimized by evaluating F1-scores across various timeframes.
Fig. 1: Average F1 Scores by Signal using Different Running Averages
  1. Lagged Correlation: To find truly predictive signals, the authors cross-correlated the smoothed sentiment timelines against real-world cyber attack data using a negative lag of 0 to 30 days (i.e., looking at sentiment up to a month before an attack).
  2. Forecasting: Signals showing strong, statistically significant correlations were fed into an ARIMAX (Autoregressive Integrated Moving Average with Explanatory Variable) model to forecast future attack rates.

Datasets

The study leveraged two primary data sources spanning from January 2016 to January 2018:

  • Hacker Forum Dataset: A collection of 432,060 English-language posts scraped from 113 hacking forums across both the Surface Web and the Dark Web (accessible via the TOR network).
  • Ground Truth Cyber Events: Real-world, anonymized attack data provided by two major business organizations within the Defense Industrial Base (DIB) sector (referred to as Organization A and Organization B). The dataset tracked three specific event types that bypassed initial defenses: endpoint-malware (malicious software installations), malicious-destination (user visits to malicious URLs/IPs), and malicious-email (phishing attempts or malicious attachments).

Key Insights and Ideas

  • Not All Forums Are Created Equal: Rather than aggregating all hacker chatter into a single metric, the authors discovered that specific, isolated forums hold disproportionately high predictive power.
  • Sentiment as a Leading Indicator: Strong correlations appeared at consecutive negative lags (often 10 to 15 days prior to an event). This proves that shifts in how hackers talk about tools and vulnerabilities directly precede malicious actions in the physical world.
  • The Low-Frequency Limitation: Sentiment signals perform exceptionally well during periods of high malicious activity. However, their predictive power degrades under low-frequency conditions (e.g., during holiday periods like December and January when overall event counts drop significantly), where simple day-of-the-week baselines sometimes perform better.

Key Results

  • Outperforming the State-of-the-Art: The sentiment-driven ARIMAX models outperformed standard historical baselines and advanced external threat intelligence models (like exploit predictors based on deep learning) in 36% of the months under study (15 out of 42 evaluation windows).
  • High Correlation Strengths: As shown in the paper's correlation analysis, specific forum-sentiment combinations yielded remarkably strong predictive signals. For instance, SentiStrength analysis on Forum 159 achieved a massive correlation score of 0.8498 for predicting malicious emails at a 14-day lag.
TABLE I: Best Signals for Organization B’s Events
  • Strong F1 Performance: For Organization A's endpoint malware predictions, sentiment signals dominated the top slots for multiple months, achieving an F1-score as high as 0.74 in November 2017 using forum6senti.

Limitations and Future Work

The authors highlighted two main limitations to their current approach:

  1. Forum Volatility: Hacking forums are inherently unstable. They are frequently shut down by law enforcement or abandoned by users. The authors noted a drop-off in prediction quality toward the end of their study because several key predictive forums went offline.
  2. Language Constraints: The pipeline currently only processes English-language posts, completely missing out on massive, highly active hacker communities operating in Russian, Chinese, and Arabic.

Future Work will focus on automating the pipeline to dynamically discover new forums and adaptively shift model weights as older forums disappear, as well as expanding the NLP components to support multi-lingual sentiment analysis.

Summary updated

Abstract

Recent high-profile cyber attacks exemplify why organizations need better cyber defenses. Cyber threats are hard to accurately predict because attackers usually try to mask their traces. However, they often discuss exploits and techniques on hacking forums. The community behavior of the hackers may provide insights into groups' collective malicious activity. We propose a novel approach to predict cyber events using sentiment analysis. We test our approach using cyber attack data from 2 major business organizations. We consider 3 types of events: malicious software installation, malicious destination visits, and malicious emails that surpassed the target organizations' defenses. We construct predictive signals by applying sentiment analysis on hacker forum posts to better understand hacker behavior. We analyze over 400K posts generated between January 2016 and January 2018 on over 100 hacking forums both on surface and Dark Web. We find that some forums have significantly more predictive power than others. Sentiment-based models that leverage specific forums can outperform state-of-the-art deep learning and time-series models on forecasting cyber attacks weeks ahead of the events.
BibTeX
@misc{deb2018predicting,
  author = {Ashok Deb and Kristina Lerman and Emilio Ferrara},
  title = {{Predicting Cyber Events by Leveraging Hacker Sentiment}},
  year = {2018},
  eprint = {1804.05276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1804.05276},
}

Loading related content...

Figure