Defending the Digital Gates: Behavioral Anomaly Detection Against Massive Credential Leaks
Behavioral Anomaly Model for Detecting Compromised Accounts on a Social Network
This paper introduces a behavioral anomaly detection model designed for Pokec.sk, a major Slovak social network, to combat account takeovers following massive data breaches like COMB. The system extracts login features (IP, device, location) to build individual user profiles, achieving a 99.86% detection rate of compromised accounts during bulk attacks.
TL;DR
The "Compilation of Many Breaches" (COMB) leaked 3.2 billion credentials, turning user "password reuse" into a systemic threat. This paper presents a production-ready anomaly detection model deployed on Slovakia's largest social network, Pokec.sk. By analyzing simple login metadata (IP segments, device types, and location), the system identifies compromised accounts with 99.86% accuracy, providing a "passive 2FA" experience that only challenges users when their behavior deviates from the norm.
Problem & Motivation: The "Mother of All Breaches"
Security is often a race between technical sophistication and human psychology. In 2021, the COMB database appeared on the darknet, containing billions of cleartext email/password pairs. For a platform like Pokec.sk, this resulted in a sudden spike from 20,000 to 350,000 failed login attempts per day.
The core challenge is that attackers aren't "guessing" passwords; they are using correct ones. Traditional rate-limiting fails because attackers distribute their logins across thousands of exotic IP addresses. The authors realized that while the password might be correct, the context of the login (the "how" and "where") is almost always anomalous compared to the legitimate owner's history.
Methodology: Building a Behavioral Blueprint
The Business Intelligence team at Ringier Axel Springer developed a system that tracks five specific features for every user's last 50 logins.
The Feature Set
- Device-related: Device name, OS version, and Browser.
- Location-related: Country and the first two segments of the IP (e.g.,
195.91.x.x).
The choice of the first two IP segments is a brilliant takeaway. While a full IP changes frequently due to mobile carrier load balancing, the first two segments usually identify the ISP or region, providing a stable "behavioral anchor" with a 1:65,025 chance of an attacker accidentally matching it.
The Anomaly Scoring Logic
The model calculates a score for each feature:
- Score 0: The feature matches a previously "verified" value or is frequent in the user's history.
- Score 1: The feature has never been seen before in the user's profile.
- Score (1 - frequency): For features seen occasionally but not frequently.

Experiments & Results: Precision Under Fire
The researchers tested the model against the actual COMB attack data. By setting an overall anomaly threshold of 1.7, they achieved a near-perfect sensitivity.
Performance Metrics
- Sensitivity: 99.86% (Almost every attacker was caught).
- Specificity: 90.96% (Most legitimate users were undisturbed).
- Operational Synergy: The system integrates with SMS verification. Once a user proves their identity via SMS from a "new" device, that device is added to their profile, significantly reducing subsequent False Positives (FPs).
Fig 1: The dramatic spike in failed logins from foreign IPs during the COMB attack, highlighting the scale of the threat.
Fig 2: The trade-off curve between catching attackers and annoying users. The 1.7 threshold represents the "sweet spot" for this production environment.
Critical Analysis & Conclusion
Takeaway
This work demonstrates that you don't need complex Deep Learning to solve massive security problems. High-quality feature engineering (like the IP segment insight) combined with a simple statistical model can be more robust and easier to deploy in high-traffic production environments (15,000 events/sec).
Limitations
The model's current strength relies on the "foreign" nature of bulk attacks. The authors admit that domestic phishing—where an attacker uses a local ISP in the same country—would be much harder to detect with this specific feature set, as the location-based anomaly scores would be significantly lower.
Future Outlook
The next frontier for this model is the integration of more subtle behavioral signals, such as typing cadence or navigation patterns, to catch local attackers who successfully "blend in" with the user's geographical profile. For now, Pokec.sk has provided a blueprint for "Passive 2FA" that balances security with user experience.
