Inspiration
Account takeover (ATO) is when a criminal gets into a real customer's account and empties it. Each step looks like the customer: a login, an MFA push tapped by mistake, a new payee, a transfer. Banks usually find out after the money is gone. At the same time, fraud teams are flooded with alerts, most of them false alarms, and as they add AI reviewers, the AI itself becomes a new attack surface. We wanted a tool that catches takeovers before the money leaves, uses AI safely, and can prove it.
What it does
TakeoverGuard is a B2B tool for the risk teams of banks and payment companies.
- Account Takeover Test Lab: simulates 26 takeover attacks mapped to MITRE ATT&CK, OWASP and ISO/IEC 27001 (credential stuffing, MFA fatigue, SIM swap, stolen session cookies, new payee then full drain, BOLA, prompt injection against the AI, alert flooding and more). It detects them with rules plus an Isolation Forest, scores each one (risk = likelihood x impact, criticality, annual loss), recommends the fix, and re-tests to prove the fix works.
- Fraud investigation agent: Claude investigates each flagged payment with read-only tools (sender history, recipient profile, balance pattern, velocity) and recommends approve, hold or escalate with evidence.
- Safety policy in code: code, not the prompt, has the final word. It escalates approvals that skipped key checks, follow a failed tool, contradict a high risk score or hit a high-severity AML rule, and sends large amounts to a human. Nothing in the system can move money.
- AML rules and an independent anomaly score: sanctions watchlist, structuring, rapid pass-through (mule) and unusual amounts, plus an explainable 0-100 score the AI never sees.
- Strategy model (the decision model): compares manual review, a score threshold and AI-assisted handling on monthly cost, analysts needed and fraud caught, across editable scenarios. Every input is marked measured or assumed, and the model says which assumption would flip the answer.
- Live monitor: a real-time view with an attack launcher in the Streamlit dashboard.
Results (synthetic data)
- All 26 attacks detected; with every fix switched on, 26/26 prevented.
- Critical risks 6 -> 0; annual exposure 6,172,000 -> 21,625. Detection alone cuts exposure by about 70%.
- Rules raised no false alarms on normal activity; the ML model flagged about 1% of normal sessions.
- Strategy model, realistic alert queue (5% fraud, imperfect anomaly score): AI-assisted review costs 287,018 a month vs 463,040 for manual review, with 8 analysts instead of 24 and 90% of fraud caught. In a fraud wave (10% fraud), manual review wins again, and the model says so.
How we built it
Python, pandas and scikit-learn (Isolation Forest) for simulation and detection; Claude (claude-opus-5-5) through the Nicrron gateway (or Anthropic directly) for the investigation agent and the risk-committee explainer; PRISM by Block Convey for tracing: each investigation is one PRISM session, with every model call, tool call, risk check and decision recorded. Streamlit for the dashboard, pytest (51 offline tests) and GitHub Actions for CI. Synthetic data follows public formats (RBA login dataset, PaySim payments), so real logs can replace it.
Using PRISM: trace, test, fix, re-test
PRISM caught real problems, and we fixed them:
- The ATO explainer invented details not in the data (a location, SIM-swap mechanics). We restricted it to facts from the run. The next run gave risk scores without explaining the calculation; we fixed that, and the latest run has no issues.
- The fraud agent skipped the required decision tool in one run (flagged). After the fix, it calls every check and submits its decision cleanly.
Security and trust
Controls mapped to ISO/IEC 27001:2022 Annex A and CIS Controls v8 and checked by a script (8/8 pass): least-privilege read-only tools, segregation of duties (human approval for large or flagged cases), a tamper-evident hash-chained audit log, pseudonymised account ids in everything sent to PRISM, secrets only in the environment, input validation, security events in the trace, and a pinned model over HTTPS.
Challenges we ran into
No public dataset covers all 26 attacks, so we built a simulator with exact labels, used only to grade the detectors, never by them. Keeping the AI useful without letting it act was the core design problem; we solved it by giving it read-only tools and putting the final decision in code. Making the cost model honest (marking every input as measured or assumed, and showing when the answer flips) took more work than the math.
Accomplishments that we're proud of
A working end-to-end system in one day: 26 attacks tested before and after fixes, an AI agent that cannot move money, a visible PRISM before/after on our own mistakes, and a decision model that tells a fraud team how to run its queue.
What we learned
Tracing changes how you build: PRISM showed us failures we would not have noticed by reading outputs. A cheaper strategy on paper can be the wrong one when fraud spikes, so a decision model has to show its sensitivity, not just its best case.
What's next
Plug in real login and payment logs, measure the AI's accuracy on more labelled cases, and run a pilot with one bank or payments risk team.
Built With
- claude
- github-actions
- nicrron
- pandas
- prism
- pytest
- python
- scikit-learn
- streamlit