Follow the White Rabbit: Finding The Women With The Red Dress In A Torrent of Event Logs

simon15 Mar 2023

Problem

Bots and malicious users in a web application often use only legitimate actions. Each action looks normal alone, so per-action rules and thresholds miss them. These actors have a narrow goal, so they skip actions a normal user performs or use actions in unusual proportions. A score built only on rare actions cannot see this. The author builds a score that also catches what users never do, without labeled attacks.

Example from the article: a login system where a person succeeds about 66% of the time. An IP address that logs in with many usernames and never fails once is statistically odd, even though every login is valid.

Solution in brief

Assume users of one population use each action in about the same proportion. For every user and action, compute how likely the observed count is under the binomial distribution, using the population's share of that action. Convert probabilities to bits, sum them per user, and flag users whose total is 3 standard deviations or more above the population mean.

Questions this case answers
  • How to detect agents whose mix of discrete actions deviates from the population norm when no labeled abnormal examples exist and no single action is suspicious by itself
  • How to turn the absence of expected actions into a measurable anomaly signal for each actor in an event stream
  • How to find bots and malicious users in a product where every action is legitimate, but their mix of actions is not?
  • How to score accounts for what they never do, not only for what they do?

Tools and methods

  • Binomial distribution — likelihood of a user's count of one action, zero included
  • Information in bits (−log2p) — a score that sums across actions
  • Z score — distance of a user's summed bits from the population mean
  • looking-binormal — the author's open-source stream monitor
Continue reading — it's free

Google or a one-time email code. No password.