OSNGuard: Detecting Worms with User Interaction Traces in Online Social Networks

Liang He, Dengguo Feng, Purui Su, Lingyun Ying, Yi Yang, Huafeng Huang, Huipeng FangLecture Notes in Computer Science 2013 · DOI · OpenAlex

Abstract

Online Social Network (OSN) worms pose a significant threat by exploiting user trust to spread malicious payloads. Traditional defense mechanisms often fail because worm-generated traffic mimics legitimate user activity. This paper introduces OSNGuard, a client-side defense system that correlates network activity with human behavior. By tracking User Interaction Traces (UITs)—sequences of mouse clicks and keystrokes—OSNGuard can distinguish between legitimate posts and automated worm propagation. Evaluation against real-world worm samples like Samy and Koobface demonstrates that OSNGuard effectively blocks infections with minimal latency and system overhead.

Introduction

Online Social Networks (OSNs) have become primary targets for malware. Unlike traditional worms that exploit software vulnerabilities like buffer overflows, OSN worms leverage the social graph and user trust. They spread by posting malicious links or messages, often appearing as if they came from a friend. These worms are generally categorized into J-worms (JavaScript-based) and E-worms (executable-based), targeting various platforms and browsers.

Taxonomy of OSN worms categorizing J-worms and E-worms across different social platforms.

The Challenge of OSN Worm Defense

Existing defenses struggle with OSN worms for several reasons. Traffic anomaly detection fails because worm requests are indistinguishable from standard HTTP POST requests. Server-side solutions often suffer from "infection lag," reacting only after a significant portion of the network is compromised. Furthermore, many client-side tools are specialized for specific vulnerabilities (like XSS) and cannot handle executable malware that mimics user behavior.

The OSNGuard System

The authors propose the EP-Model (Enticement and Payload-Submission), which breaks worm behavior into two steps: tricking the user into running code, and then submitting a payload to the OSN to replicate. OSNGuard focuses on the second step. The system operates on the principle that while worms can mimic the content of a post, they rarely replicate the complex sequence of human interactions (browsing, editing, and confirming) required to create it.

OSNGuard consists of four primary modules:

  1. Social Traffic Monitor (STM): Intercepts outbound HTTP POST requests to OSN domains. It uses the Detours library to hook into system encryption functions, allowing it to inspect payloads before they are encrypted via HTTPS.
  2. Social Interaction Tracer (SIT): Captures low-level input events (clicks, keystrokes) using SetWindowsHookex and hooks HTML button elements to verify "Confirm" actions.
  3. OSN Worm Detector (OWD): The core logic engine that correlates intercepted traffic with recorded User Interaction Traces (UITs). If a POST request lacks a corresponding valid UIT pattern (e.g., (mouse|key)+ -> confirm+), it is flagged as a worm.
  4. Supervisor: Manages configuration and inter-module communication.

Detecting Automated Propagation

The fundamental insight of OSNGuard is identifying "silent" or "forged" submissions. For example, the Samy worm propagates by automatically sending a POST request when a user views an infected profile, without any user interaction.

Propagation mechanism and pseudo-code for the Samy J-worm, illustrating how it spreads without user confirmation.

As shown in the figure, the worm's code executes an XHR.send(payload) without any preceding user confirmation. OSNGuard detects this discrepancy by checking the UIT table for the specific Process ID (PID). By tracking interactions per PID, the system can distinguish between a user typing in a legitimate browser and a malicious background process trying to use a hidden browser component (like IWebBrowser2) to spread.

Evaluation and Results

The authors evaluated OSNGuard using a custom social network environment (MyOSN) built on the Elgg framework. They collected real-world interaction traces from over 50 users to establish a baseline for normal behavior.

  • Effectiveness: OSNGuard successfully identified and blocked both Samy and Koobface variants. Legitimate posts were correctly allowed, while automated worm requests were flagged.
  • Performance: The delay introduced by checking a UIT was less than 20ms, making it imperceptible to the user.
  • Minimal Overhead: The system introduced less than 2.5% memory overhead when monitoring 10 active processes simultaneously.

Conclusion and Future Work

OSNGuard provides a robust, real-time defense against OSN worms by anchoring network activity to physical user behavior. While effective against current threats, future work may address advanced UI attacks like clickjacking. The authors suggest integrating behavioral biometrics—analyzing the unique rhythm of a user's typing or mouse movement—to ensure the interaction is not just human-like, but belongs to the specific authorized user.

Summary updated

BibTeX
@inproceedings{he2013osnguard,
  author = {Liang He and Dengguo Feng and Purui Su and Lingyun Ying and Yi Yang and Huafeng Huang and Huipeng Fang},
  title = {{OSNGuard: Detecting Worms with User Interaction Traces in Online Social Networks}},
  booktitle = {Lecture Notes in Computer Science},
  year = {2013},
  doi = {10.1007/978-3-319-02726-5\_5},
}
Figure