Crowdsourcing Cybersecurity: Cyber Attack Detection using Social Media

Rupinder Paul Khandpur, Taoran Ji, Steve T. K. Jan, Gang Wang, Chang-Tien Lu, Naren Ramakrishnan · DOI

TL;DR

This paper introduces an unsupervised framework that transforms Twitter into a real-time cybersecurity sensor for detecting major cyber-attacks like data breaches and DDoS attacks. By combining linguistic dependency trees with word embeddings, the system filters out social media noise and automatically expands a handful of basic "seed" keywords into highly specific event trackers, significantly outperforming traditional burst-detection methods.

What Problem Does This Paper Address?

When a cyber-attack occurs, there is often a significant "detection deficit"—a costly time lag between the initial breach and its discovery. Interestingly, news of an organization's compromise frequently breaks outside its internal network first, making open-source indicators like social media a valuable potential warning system.

However, using social media as a cybersecurity sensor is notoriously difficult due to the sheer volume of noise. Traditional "bag-of-words" keyword matching fails to distinguish between a tweet about a genuine data breach and a user complaining that their phone carrier is "leaking data" through a faulty app. The challenge lies in automatically identifying and characterizing diverse, evolving cyber-attacks in an unsupervised manner without relying on massive, manually annotated datasets.

Methods

The authors propose a Dynamic Event Trigger Expansion (DETE) framework, which operates in three main phases:

  1. Target Domain Generation: Instead of relying on simple keyword matching, the system converts tweets into linguistic dependency trees. It uses a convolution tree kernel combined with word2vec embeddings to evaluate both the syntactic structure and semantic meaning of a tweet against a small set of initial seed queries. This filters out structurally irrelevant noise.
  2. Dynamic Typed Query Expansion: Starting with basic seed queries (see Figure 3), the algorithm iteratively extracts subtrees from matched tweets. It ranks these new candidate terms using Kullback-Leibler (KL) divergence against the entire Twitter corpus. This ensures that highly discriminative words (like "hacked") are prioritized over frequent but uninformative words (like "Twitter" or "account").
  3. Event Extraction: The expanded queries are clustered using affinity propagation. The system identifies exemplar queries for each cluster, maps them back to specific cyber-attack categories via cosine similarity, and aggregates them by date to form distinct event tuples (Q_e, date, type).
Table 1. Seed queries for cyber-atack events.

Datasets

The framework was evaluated using a massive real-world dataset spanning 27 months (August 2014 to October 2016):

  • Twitter Dataset: Over 5.1 billion tweets from GNIP’s decahose (a 10% random sample), filtered down to a subset of 79.5 million cyber-related tweets for baseline comparison, and 3.2 billion unique texts to train the 200-dimensional word embeddings.
  • Gold Standard Reports (GSR): To evaluate accuracy, the authors curated ground-truth incident lists from two reputable public repositories:
  • Hackmageddon: Yielded 55 account hijacking events and 80 DDoS events after filtering for US-based, time-matched incidents.
  • PrivacyRights: Yielded 85 verified data breach events under the "HACK" category.

Key Insights and Ideas

  • Syntax is the Ultimate Noise Filter: The "aha moment" of the paper is that the structural relationship between words matters more than the words themselves. By matching the dependency paths of tweets to seed queries, the system successfully ignores coincidental keyword matches that cause false positives in simpler models.
  • The Power of KL Divergence in Text Mining: Using KL divergence allows the system to automatically recognize that while "Sony" and "breach" frequently appear together during an incident, "breach" is the uniquely informative anchor that defines the event space, whereas "Sony" is the variable target.
  • Signal Lifecycles Vary by Attack Type: The authors observed that different cyber-attacks leave distinct social media footprints. Data breaches have a long tail and generate sustained chatter, whereas DDoS attacks and account takeovers have incredibly short lifecycles, often resolving before a massive wave of users notices or tweets about them.

Key Results

The DETE framework significantly outperformed a standard baseline model based on Kleinberg’s burst-detection algorithm, which relies on static keywords and struggled heavily with noise (yielding precision and recall scores near 1-2%).

In contrast, the proposed model achieved high precision across all three target categories:

  • Data Breaches: 78% Precision, 74% Recall (F-measure: 0.76)
  • DDoS Attacks: 80% Precision, 45% Recall (F-measure: 0.58)
  • Account Hijacking: 66% Precision, 56% Recall (F-measure: 0.64)

The system successfully mapped out major historical cyber incidents in real time, including the massive Ashley Madison data breach, the high-profile CentCom Twitter account hijacking, and the crippling DDoS attacks on DNS provider Dyn (as illustrated in the timeline analysis in Figure 1).

Fig. 1. Streamgraph showing normalized volume of tweets (August, 2014 through August, 2015) tagged with data breach (red), DDoS activity (grey) and account hijacking (blue) type of cyber-security events.

Limitations and Future Work

The primary limitation identified is the relatively low recall for DDoS attacks (45%) and account hijacking (56%). Because these events are often short-lived—sometimes causing only a few minutes of slow internet or a brief account suspension—the social media signal can be too weak to capture reliably over background noise.

For future work, the authors plan to broaden the scope of detectable attack types and model sequential dependencies between attacks. This would allow the system to potentially forecast escalating threats targeting specific industries, institutions, or countries over time.

Summary updated

BibTeX
@inproceedings{khandpur2017crowdsourcing,
  author = {Rupinder Paul Khandpur and Taoran Ji and Steve T. K. Jan and Gang Wang and Chang-Tien Lu and Naren Ramakrishnan},
  title = {{Crowdsourcing Cybersecurity: Cyber Attack Detection using Social Media}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2017},
  doi = {10.1145/3132847.3132866},
}
Figure