name: Web Fraud - Account Harvesting
id: 31337aaa-941d-4ada-81ac-q2a17be5bf0d
version: 1
date: '2018-10-08'
author: Jim Apger, Splunk
type: batch
datamodel: []
description: This search is used to identify the creation of multiple user accounts
  using the same email domain name.
search: '`stream_http` http_content_type=text* uri="/magento2/customer/account/loginPost/"
  | rex field=cookie "form_key=(?<SessionID>\w+)" | rex field=form_data "login\[username\]=(?<Username>[^&|^$]+)"
  | search Username=* | rex field=Username "@(?<email_domain>.*)" | stats dc(Username)
  as UniqueUsernames list(Username) as src_user by email_domain | where UniqueUsernames>
  25 | `web_fraud___account_harvesting_filter`'
how_to_implement: We start with a dataset that provides visibility into the email
  address used for the account creation. In this example, we are narrowing our search
  down to the single web page that hosts the Magento2 e-commerce platform (via URI)
  used for account creation, the single http content-type to grab only the user's
  clicks, and the http field that provides the username (form_data), for performance
  reasons.  After we have the username and email domain, we look for numerous account
  creations per email domain.  Common data sources used for this detection are customized
  Apache logs or Splunk Stream.
known_false_positives: As is common with many fraud-related searches, we are usually
  looking to attribute risk or synthesize relevant context with loosely written detections
  that simply detect anamolous behavior. This search will need to be customized to
  fit your environment&#151;improving its fidelity by counting based on something
  much more specific, such as a device ID that may be present in your dataset. Consideration
  for whether the large number of registrations are occuring from a first-time seen
  domain may also be important.  Extending the search window to look further back
  in time, or even calculating the average per hour/day for each email domain to look
  for an anomalous spikes, will improve this search.  You can also use Shannon entropy
  or Levenshtein Distance (both courtesy of URL Toolbox) to consider the randomness
  or similarity of the email name or email domain, as the names are often machine-generated.
references:
- https://splunkbase.splunk.com/app/2734/
- https://splunkbase.splunk.com/app/1809/
tags:
  analytic_story:
  - Web Fraud Detection
  asset_type: Account
  cis20:
  - CIS 16
  kill_chain_phases:
  - Actions on Objectives
  mitre_attack_id:
  - T1136
  nist:
  - DE.CM
  - DE.DP
  product:
  - Splunk Enterprise
  - Splunk Enterprise Security
  - Splunk Cloud
  required_fields:
  - _time
  - http_content_type
  - uri
  - cookie
  security_domain: threat
