Analyzing social and stylometric features to identify spear phishing emails

Prateek Dewan, Anand Kashyap, Ponnurangam Kumaraguru

Introduction

Spear phishing represents a sophisticated evolution of traditional phishing, acting as a "surgical strike" rather than a broad-net approach. While traditional phishing relies on generic lures to deceive a wide audience, spear phishing involves meticulous research into specific victims to craft context-aware messages. These attacks are frequently the primary vector for Advanced Persistent Threats (APTs). This study investigates whether the same social media data used by attackers—specifically professional information from LinkedIn—can be leveraged by defenders to improve automated detection.

Methodology and Data Acquisition

The researchers developed a classification framework that integrates traditional email analysis with external social context. The core methodology involved extracting features from three distinct email categories and mapping them to the recipients' professional profiles.

Methodology for extracting social and stylometric features from email datasets and LinkedIn profiles

Feature Engineering

The study utilized 27 features categorized into two primary groups:

  1. Stylometric Features (18): These analyze the structural and linguistic style of the email, including subject line richness, function words (e.g., account, bank, password), and attachment metadata (size and filename length).
  2. Social Features (9): These were extracted from LinkedIn profiles, encompassing variables such as geographic location, connection count, job seniority (e.g., Manager vs. Director), and the complexity of the profile summary.

Datasets

The model was trained and tested on a robust, real-world corpus:

  • SPEAR: 4,742 targeted emails sent to 2,434 unique victims across 14 international organizations.
  • SPAM: 9,353 non-targeted malicious emails (malware and general phishing).
  • BENIGN: 6,601 legitimate corporate emails from the Enron dataset.
  • LinkedIn Profiles: Publicly available data corresponding to the email recipients.

Analysis of Linguistic and Structural Patterns

A key component of the research involved analyzing the vocabulary and thematic focus of different email types. Spear phishing messages often mimic routine corporate communication to avoid suspicion.

Word clouds comparing vocabulary across SPEAR, SPAM, and BENIGN email subjects and bodies

Professionalism as a Lure

As shown in the word clouds, spear phishing subject lines are remarkably professional, focusing on "Job Opportunities," "Internal Reports," or "Strategy." In contrast, general spam tends to be alarmist, focusing on "Delivery Failures" or "Mystery Shopper" scams. The bodies of spear phishing emails utilize routine corporate language such as attached, please, email, and materials, allowing them to blend seamlessly into a victim's daily workflow.

The "Smoking Gun": Attachments

Statistical analysis revealed that attachment-related features were the most significant discriminators. Spear phishing attachments are typically named carefully to appear legitimate (e.g., Strategy_Meeting.zip), whereas spam attachments often feature nonsensical or repetitive naming conventions. Attachment size was identified as the single most informative feature for the classifier.

Results and the Social Media Paradox

The study yielded a surprising result regarding the utility of social media data. While the researchers achieved a maximum accuracy of 98.28% using a Random Forest classifier, this peak was reached using stylometric email features alone.

When LinkedIn social features were added to the model, accuracy actually decreased slightly to 97.76%. This "Social Media Paradox" suggests that either attackers are not primarily using public LinkedIn data to craft these specific lures, or that public profile data is too "noisy" to provide a meaningful signal for current machine learning classifiers. However, the model remained highly effective at distinguishing spear phishing from legitimate corporate mail, achieving 97.39% accuracy in spear-vs-benign comparisons.

Limitations and Future Directions

The research highlights several challenges in modern threat detection:

  • Data Access: LinkedIn's restrictive API and rate limits pose significant hurdles for real-time defensive data collection.
  • Public vs. Private Information: The study was limited to publicly available social data. Attackers may be utilizing private information or data from other platforms (e.g., Facebook or Twitter) that were not captured here.
  • Evolution of Communication: The use of the Enron dataset as a benign baseline is a limitation, as corporate communication styles have shifted significantly since the early 2000s.

Future research will explore more complex models, such as Gradient Boosting, and investigate whether data from a broader array of social networks can eventually provide the predictive lift that public LinkedIn data currently lacks.

Summary updated

BibTeX
@inproceedings{dewan2014analyzing,
  author = {Prateek Dewan and Anand Kashyap and Ponnurangam Kumaraguru},
  title = {{Analyzing social and stylometric features to identify spear phishing emails}},
  booktitle = {eCrime},
  year = {2014},
  doi = {10.1109/ecrime.2014.6963160},
}
Figure