Detecting Known and New Salting Tricks in Unwanted Emails

André Bergholz, Gerhard Paass, Frank Reichartz, Siehyun Strobel, Marie-Francine Moens, Brian WittenCEAS 2008 · OpenReview

Abstract

Spammers frequently employ "salting" techniques—adding invisible or distorted content—to bypass traditional text-based filters. This paper introduces a novel detection framework that compares an email's structural "simulated perceived text" with its actual visual rendering via Optical Character Recognition (OCR). By treating discrepancies between these two views as outliers using a One-Class Support Vector Machine (SVM), the system can identify both established and previously unseen obfuscation tricks. Evaluation on public datasets shows high effectiveness, particularly in detecting font-based manipulations.

The Challenge of Email Salting

The battle against spam and phishing is a persistent cat-and-mouse game. A common tactic is salting, where attackers intentionally add content to fool automated filters. This includes "good word attacks" (diluting spam signatures with legitimate text) and "hidden salting" (using white text on white backgrounds or microscopic fonts).

Traditional filters often fail because they analyze raw HTML or text streams, which differ significantly from what a human recipient sees. As shown in Figure 1, a spammer can embed "invisible" keywords like "drywall" into the HTML source to confuse filters, while the human reader only sees the intended message.

Example of a salted email where hidden text in the HTML source differs from the visual rendering.

Methodology: Closing the Perception Loop

The proposed framework "closes the loop" between machine analysis and human perception through a three-stage process:

  1. Hidden Salting Simulation: The system analyzes the email's HTML structure to simulate what a human would perceive, filtering out elements with no contrast or those clipped outside the viewing area.
  2. OCR Rendering: The email is rendered as an image and processed by an OCR engine (e.g., gocr or ocrad) to establish the visual "ground truth."
  3. Change Detection: The simulated text and OCRed text are compared using three metrics: Length (normalized difference), Tolerant Overlap Coefficient (TOC) (fuzzy matching robust to OCR errors), and Complexity (Lempel-Ziv compression-based measure).

Finally, a One-Class SVM is trained on "normal" emails. Any significant divergence between the simulated and OCRed text is flagged as an outlier, allowing the system to detect even novel tricks not present in the training data.

Experimental Results

The system was evaluated using the SpamAssassin and Nazario Phishing corpora. The researchers focused on identifying "font color" and "font size" tricks, which are prevalent in modern spam.

ROC curves showing the detection performance for font color and font size tricks across different OCR engines.

Key findings include:

  • High Detection Accuracy: Using the gocr engine, the system achieved an F2-score of 84.15% for font color tricks and 87.08% for font size tricks.
  • OCR Engine Sensitivity: The choice of OCR engine is critical. As seen in Figure 3, gocr consistently outperformed ocrad, which struggled with specific layouts and character spacings common in salted emails.
  • TOC Effectiveness: The Tolerant Overlap Coefficient (TOC) proved to be the most robust metric, successfully handling the inherent noise of OCR digitization.

Limitations and Future Work

While effective, the system faces computational challenges. Rendering and OCR processing are currently too slow for real-time filtering. Instead, this approach is best suited for offline analysis to identify new trends and update faster, signature-based filters. Future improvements may involve using commercial-grade OCR engines and more sophisticated HTML binarization to reduce false negatives caused by layout misinterpretations.

Summary updated

BibTeX
@inproceedings{bergholz2008detecting,
  author = {André Bergholz and Gerhard Paass and Frank Reichartz and Siehyun Strobel and Marie-Francine Moens and Brian Witten},
  title = {{Detecting Known and New Salting Tricks in Unwanted Emails}},
  booktitle = {CEAS},
  year = {2008},
  url = {https://openreview.net/forum?id=rxPc2-M3ZgV},
}
Figure