Composite Rule Catalog & Use Cases — Ayzal AI FRM
A practical guide to building advanced detection rules using composite steps. Learn how to combine value checks, entity relationships, and aggregations to catch card testing rings, mules, and account takeovers.
Composite Rule Catalog & Use Cases
The most effective fraud detection does not rely on a single condition. It relies on composition. By combining value checks, entity relationships, and aggregations, you can detect complex fraud rings and mule activity that simple rules would miss.
1. Card Testing (CC / POS)
Rule: Modern Rotational Card Testing Ring Goal: Catch attackers who rotate emails, IPs, and cards, but reuse the same device or BIN.
- Step 1 (Value Check):
field_compareAmount <= 5.00 - Step 2 (Value Check):
field_compareStatus = Failed - Step 3 (Relationship):
shared_entitycard_fingerprint >= 3 (in 24h) - Step 4 (Relationship):
count_distinctSource: device_id, Target: card_fingerprint >= 5 (in 1h)
Why this works: You are combining a value check (micro amounts failing) with a relationship check (shared fingerprint) and a fanout check (one device hitting many cards). This catches both the automated testing phase and the compromised device.
2. POS Fraud Patterns
Rule: Cross Border Stolen Card Cash Out Goal: Detect a stolen card being used at a POS terminal far from the customer home, right after a test transaction.
- Step 1 (Value Check):
is_high_risk_countrycard_issue_country - Step 2 (Comparison):
field_mismatchcard_issue_country != ip_country - Step 3 (Aggregation):
sum_amountentity=customer_id >= 5000 (in 1h) - Step 4 (Watchlist):
field_in_listcard_fingerprint in internal_blocklist
Why this works: It combines geographic risk with a sudden spike in spend and a known bad actor check.
3. Fraud Rings (Wallet / CC)
Rule: The Mule Network (Fan In / Fan Out) Goal: Detect a ring where money is moving from many accounts into one, or one account into many.
- Step 1 (Value Check):
field_comparenature = debit - Step 2 (Aggregation):
count_totalentity=source_account >= 5 (in 24h) - Step 3 (Relationship):
count_distinctSource: source_account, Target: dest_account >= 4 (in 30d) - Step 4 (Relationship):
shared_entitydest_account >= 5 (in 7d)
Why this works: You are combining volume, fanout, and fanin. If an account is sending money to 4 different beneficiaries, and those 4 beneficiaries are also receiving money from 5 other accounts, you have a structured fraud ring.
4. Account Takeover (Wallet / CC)
Rule: Impossible Travel + High Value Transfer Goal: Catch a compromised account before the attacker can drain the funds.
- Step 1 (Relationship):
count_distinctSource: client_id, Target: ip_country >= 2 (in 1h) - Step 2 (Value Check):
time_of_dayhour between 0 and 5 - Step 3 (Aggregation):
amount_spikeentity=client_id multiplier=5 - Step 4 (Comparison):
name_email_matchcustomer_name vs customer_email < 0.4
Why this works: It combines travel velocity, unusual timing, spend velocity, and identity mismatch. The attacker might have the password, but they are logging in from a new country at 3 AM, spending 5x the normal amount, on an account where the name does not match the email.
How to Combine Steps in the UI
- Select Composition as the Rule Type.
- Add Step 1 and configure it (e.g.,
field_compare). - Add Step 2.
- Set the Logic. Choose AND if both steps must be true, or OR if either can be true.
- Use
where_prior_steps=ONfor steps likecount_distinctorsum_amount. This tells the engine to only count transactions that passed the prior conditions.
Best Practice: Do not combine 5 steps on day one. Start with 2 steps (field_compare + count_events) and watch the alert volume. Once your analysts are comfortable with the noise level, add the third step (shared_entity or ratio).
The Mule Use Case
Here are five specific rules to catch money mules, built from the steps above.
Rule 1: The Mule Itself
Purpose: Flag the sender account as a high volume funnel.
- Step 1:
field_comparenature eq debit - Step 2:
sum_amountentity=source_account amount_field=amount threshold=100000 time_window=604800 where_prior_steps=ON - Step 3:
count_totalentity=source_account threshold=50 time_window=2592000 where_prior_steps=ON
Fires when an account sends over 100,000 in 7 days AND has 50 or more debit transactions in 30 days.
Rule 2: Beneficiary Concentration
Purpose: Flag the top destinations that received the outflow.
- Step 1:
field_comparenature eq debit - Step 2:
count_distinctsource_entity=source_account target_entity=dest_account threshold=5 time_window=2592000 where_prior_steps=ON
Fires on Source Account.
Rule 3: Rapid Pass Through (Drain Ratio)
Purpose: Account receives and immediately sends, the classic mule signature.
- Step 1:
count_eventsentity=source_account status_field=nature status_values=[debit] threshold=10 time_window=3600 - Step 2:
count_eventsentity=dest_account status_field=nature status_values=[credit] threshold=10 time_window=3600
Rule 4: Round Amount Structuring
Purpose: Many transactions on round numbers within minutes.
- Step 1:
field_comparenature eq debit - Step 2:
field_in_rangefield=amount min=500 max=10000 - Step 3:
count_eventsentity=source_account threshold=5 time_window=3600 where_prior_steps=ON
Rule 5: Off Hours Activity
Purpose: Spikes between 00:00 and 05:00.
- Step 1:
time_of_dayhour_min=0 hour_max=5 timezone=Asia/Tokyo - Step 2:
count_eventsentity=source_account threshold=3 time_window=86400 where_prior_steps=ON
See It in Your Own Data
Ayzal AI FRM is built around these principles: entity graph ring detection, hybrid rules and AI, Maker and Checker governance, and API first ingest with automatic field mapping.
