> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fraudeg.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account takeover

> Detect when someone else is using a legitimate account

In an account takeover, the account is real and has history; the person controlling it now isn't.
The attacker signs in with stolen credentials, changes the password or the device, and buys or
withdraws with the payment methods that were already saved. To your usual rules it looks like a
good customer. Fraudeg **compares** the session and the device with the account's history and
returns a **decision**, which can be to request extra verification instead of
blocking.

**Who it's for:** merchants with user accounts and saved payment methods, wallets and
fintechs that hold balances, and any product where signing in gives access to money.

## Signals that matter

Codes from the [public catalog](https://docs.fraudeg.com/en/referencia/flags.md) and the fields that enable their category
(see [Fields](https://docs.fraudeg.com/en/integrar/campos.md)).

| Code | Category | What it tells you | What to send to enable it |
| - | - | - | - |
| `ACCOUNT_TAKEOVER_PATTERN` | `user` | Session or credential activity consistent with account takeover | `session_id`, `session_start_time`, `login_attempt_count`, `login_success`, `password_reset_flag`, `user_email`, `user_age_days`, `time_to_checkout_sec` |
| `DEVICE_NEW_OR_CHANGED` | `device` | Transaction from a device the account hadn't used | `device_id`, `device_fingerprint`, `device_age_days`, `is_new_device_login` |
| `DEVICE_SHARED_BY_MANY_USERS` | `device` | A device used by several unrelated accounts | `device_id`, `device_fingerprint` |
| `NETWORK_ANONYMIZED_ORIGIN` | `network` | Connection through an anonymizing network | `ip_address` |
| `SHIPPING_ADDRESS_MISMATCH` | `shipping` | The shipping and billing addresses don't match | `shipping_address_hash`, `billing_address_hash` |
| `GEO_IMPOSSIBLE_TRAVEL` | `geo` | The card was used in distant places within an impossible time | `country_id`, `merchant_country_code`, `bin_country_code` |

`user_id` is required and is the key to this whole case: it has to be the same account
identifier on every transaction, or Fraudeg can't compare against the history.

## How Fraudeg solves it

`STEP_UP_AUTH` leaves the transaction in `HELD` until you resolve what comes in
`conditions` (today, `OTP_VERIFICATION`). See [Decisions](https://docs.fraudeg.com/en/conceptos/decisiones.md) and
[Lifecycle](https://docs.fraudeg.com/en/conceptos/ciclo-de-vida.md).

## Implementation

**1. Send the session with every transaction**

In addition to the required fields, send the session and device fields from the table. If your
login lives in another system, pass `is_new_device_login` and `password_reset_flag` from there
at payment time. Start with [Your first transaction](https://docs.fraudeg.com/en/integrar/primera-transaccion.md).

**2. Treat STEP\_UP\_AUTH as a challenge, not a decline**

With `STEP_UP_AUTH`, ask the account holder for the code through a channel you had already verified. With
`HOLD`, don't deliver or release funds until your team reviews. With `BLOCK`, don't process.

**3. Tune rules, thresholds, and lists**

Create a [custom rule](https://docs.fraudeg.com/en/manual/reglas-personalizadas.md), for example: if
`password_reset_flag` is true **AND** `is_new_device_login` is true, **Step-up**.
Test it in **shadow mode** and with **Backtest**. In
[Thresholds](https://docs.fraudeg.com/en/manual/umbrales.md), review the bands for the payment method that gets attacked most.

**4. Investigate with cases**

In [Alerts](https://docs.fraudeg.com/en/manual/alertas.md), **Escalate to case** groups the alerts for the same account. In
the [case](https://docs.fraudeg.com/en/manual/casos.md) you see the **Case entities** and **Related cases**; when you
**Resolve case** you can block or mute the entity. The entity profile shows which
other accounts share that device.

**5. Measure**

In [Alerts](https://docs.fraudeg.com/en/manual/alertas.md), check how many you closed as **Confirmed fraud** and how many
as **False positive**, and in [Monitors](https://docs.fraudeg.com/en/manual/monitores.md) the **Approval rate** and
**% held**.

## What to measure

| Metric | Where you see it |
| - | - |
| **% held** and **Approval rate** | [Monitors](https://docs.fraudeg.com/en/manual/monitores.md) |
| **Unresolved** and **Critical** alerts | [Alerts](https://docs.fraudeg.com/en/manual/alertas.md) |
| Case verdicts: **Confirmed fraud**, **Legitimate**, **False positive**, **Inconclusive** | [Cases](https://docs.fraudeg.com/en/manual/casos.md) |
| **Fraud contained** | **Dashboards › Business analysis** ([Dashboards](https://docs.fraudeg.com/en/manual/dashboards.md)) |

## Go-live checklist

* [ ] `user_id` is stable: the same value for the same account across all your transactions.
* [ ] You send `device_id` or `device_fingerprint`, and `ip_address`.
* [ ] Your checkout knows how to resolve `STEP_UP_AUTH` with `OTP_VERIFICATION` and retry.
* [ ] `HOLD` doesn't release funds or ship until someone reviews.
* [ ] Your case queues have a team assigned in **Config › Operation**.
* [ ] Your custom rules went through **shadow mode** before being activated.

## Next steps

> [card] [Onboarding with identity](https://docs.fraudeg.com/en/casos-de-uso/onboarding-con-identidad.md)
>
> Verify the person before they have an account to steal.

> [card] [Cases](https://docs.fraudeg.com/en/manual/casos.md)
>
> Investigate and resolve with a verdict.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.