Skip to content
Myparadox-creatorPublic

About

Resources

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ SIMShield

Platform Android SDK Node.js PostgreSQL Tests Zero-Trust

Enterprise-Grade Mobile Identity Fraud Defense, SIM-Swap Detection & Real-Time Mock UPI Transaction Interception Platform


๐Ÿ“Œ Executive Overview

SIMShield is a full-stack security solution designed to protect mobile banking, digital wallets, and UPI payment apps from SIM swap fraud, eSIM hijacking, unauthorized number porting, and correlated account takeover (ATO).

Built strictly on the Zero-Trust Server-Authoritative Architecture, SIMShield ensures:

A suspicious transaction is evaluated, intercepted, and blocked BEFORE simulated money transfer is executed.

๐ŸŒŸ Key Capabilities:

  • ๐Ÿ’ณ Integrated SIMShield Pay (Mock UPI): Real-time simulated UPI banking environment with live โ‚น10,000 INR balance, recipient selection, and transaction history.
  • โšก Pre-Transaction Fraud Check: Every payment request passes through the server risk engine before bank execution.
  • ๐Ÿ›ก๏ธ Correlated Temporal Risk Scoring: 24-hour sliding correlation window evaluating SIM swaps, new device logins, password resets, and new beneficiaries.
  • ๐Ÿ”’ Zero Balance Loss on Blocked Fraud: Blocked transactions strictly preserve user balance (โ‚น10,000 untouched).
  • ๐Ÿ‘† Hardware Biometric Step-Up: Android BiometricPrompt out-of-band identity verification for medium/high risk events.
  • ๐Ÿšจ Emergency Panic Lockdown: Instantly freezes outbound transfers, revokes sessions, and opens P1 fraud investigation cases.
  • ๐ŸŒ Dual Execution Modes: Connects seamlessly to backend server or runs 100% self-contained standalone offline simulation on physical Android devices.

๐Ÿ›๏ธ System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                       UNIFIED SIMSHIELD ANDROID CLIENT                         โ”‚
โ”‚                                                                                โ”‚
โ”‚   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   โ”‚        ๐Ÿ’ณ SIMShield Pay Tab         โ”‚   โ”‚   ๐Ÿ›ก๏ธ Security Center Tab     โ”‚   โ”‚
โ”‚   โ”‚                                     โ”‚   โ”‚                              โ”‚   โ”‚
โ”‚   โ”‚ - Live Bank Balance (โ‚น10,000 INR)   โ”‚   โ”‚ - 0-100 Hero Risk Score      โ”‚   โ”‚
โ”‚   โ”‚ - Quick Contacts (Rahul, Attacker)  โ”‚   โ”‚ - Telecom SIM/eSIM Threat Barโ”‚   โ”‚
โ”‚   โ”‚ - Send Money (Mock UPI Form)        โ”‚   โ”‚ - "This was me" Biometrics   โ”‚   โ”‚
โ”‚   โ”‚ - Real-Time Pre-Check Interception  โ”‚   โ”‚ - 24-Hour Event Timeline     โ”‚   โ”‚
โ”‚   โ”‚ - Blocked Alert (Zero Money Lost)   โ”‚   โ”‚ - "Secure My Account" Lock   โ”‚   โ”‚
โ”‚   โ”‚ - Live Ledger Audit History         โ”‚   โ”‚ - Attack Simulator Sandbox   โ”‚   โ”‚
โ”‚   โ”‚ - In-App โš™๏ธ Backend Server Config   โ”‚   โ”‚ - Monitoring Preferences     โ”‚   โ”‚
โ”‚   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ”‚                                     โ”‚
                       โ”‚ REST API / JSON (Cleartext Allowed) โ”‚
                       โ–ผ                                     โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                       AUTHORITATIVE SIMSHIELD BACKEND                          โ”‚
โ”‚                                                                                โ”‚
โ”‚  - POST /api/transactions/precheck      - POST /api/transactions/execute       โ”‚
โ”‚  - GET  /api/users/:userId/balance      - POST /api/security/emergency-lock   โ”‚
โ”‚  - GET  /api/users/:userId/risk         - POST /api/simulation/:scenario       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                       โ”‚
                                       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                       RULE-BASED RISK ENGINE (24-Hour Window)                  โ”‚
โ”‚                                                                                โ”‚
โ”‚   โ€ข SIM Swap (+30) โ€ข New Device (+20) โ€ข Password Reset (+15) โ€ข Beneficiary (+15) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                       โ”‚                      โ”‚                      โ”‚
                       โ–ผ                      โ–ผ                      โ–ผ
                   ๐ŸŸข ALLOW               ๐ŸŸก VERIFY              ๐Ÿ”ด BLOCK
                       โ”‚                      โ”‚                      โ”‚
                       โ–ผ                      โ–ผ                      โ–ผ
                [  Mock Bank Ledger  ] [  Android Biometrics ] [ P1 Case Opened   ]
                [  Debit Balance     ] [  Hardware Step-Up   ] [ Balance Protected]
                [  โ‚น10,000 โ†’ โ‚น8,000  ] [  Execute upon Auth  ] [ Balance: โ‚น10,000 ]

๐Ÿ“ฑ Mobile Application Installation & Setup

You can install the SIMShield Android Client (v1.1.0) on your Android device (Android 8.0 / API 26 through Android 15 / API 35):

๐Ÿ“ฅ Method 1: Download Pre-Built APK from GitHub Actions (Fastest)

  1. Navigate to the Actions tab in this repository.
  2. Select the latest successful workflow run for Build SIMShield APK.
  3. Scroll down to Artifacts and download simshield-debug-apk.
  4. Extract app-debug.apk and transfer it to your Android phone.
  5. Tap to install (enable "Install unknown apps" if prompted).
  6. Launch SIMShield!

๐Ÿ’ป Method 2: Build & Install via Gradle / ADB

# 1. Clone the repository
git clone https://github.com/Myparadox-creator/SIMshild.git
cd SIMshild

# 2. Build Debug APK
./gradlew assembleDebug

# 3. Install directly to connected device
adb install -r app/build/outputs/apk/debug/app-debug.apk

๐Ÿ› ๏ธ Method 3: Open in Android Studio

  1. Open Android Studio $\rightarrow$ Open $\rightarrow$ select the SIMshild root folder.
  2. Wait for Gradle sync to complete.
  3. Select your connected device or emulator from the device dropdown.
  4. Click Run app (Shift + F10).

โš™๏ธ Connecting the Mobile App to Backend

The mobile app includes a built-in โš™๏ธ Server configuration button in the header bar:

  • On Android Emulator: Enter http://10.0.2.2:3001
  • On Physical Phone (Same Wi-Fi): Enter http://<YOUR-LAPTOP-IP>:3001 (e.g. http://172.17.74.194:3001)
  • Offline / Standalone Mode: Leave empty or disconnect โ€” the app will automatically run its built-in zero-trust risk engine locally!

๐ŸŽฎ Hackathon Demonstration Flow (5 Steps)

Follow this 5-step sequence for a complete demonstration of real-time fraud pre-check interception:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  1. Normal App  โ”‚ โ”€โ”€> โ”‚ 2. Normal Transferโ”‚ โ”€โ”€> โ”‚ 3. Trigger ATO  โ”‚ โ”€โ”€> โ”‚ 4. Block Fraud   โ”‚ โ”€โ”€> โ”‚ 5. Panic Lockdownโ”‚
โ”‚ Balance: โ‚น10,000โ”‚     โ”‚ โ‚น2k to Rahul     โ”‚     โ”‚ Full Attack     โ”‚     โ”‚ โ‚น2k to Attacker  โ”‚     โ”‚ Transfers Frozen โ”‚
โ”‚ Risk: LOW (18)  โ”‚     โ”‚ Balance: โ‚น8,000  โ”‚     โ”‚ Risk: CRITICAL  โ”‚     โ”‚ Balance: โ‚น10,000 โ”‚     โ”‚ Sessions Revoked โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Step 1: Initial Health Posture

  • Open SIMShield $\rightarrow$ ๐Ÿ’ณ SIMShield Pay tab.
  • Initial state: Available Balance: โ‚น10,000 INR, Security Status: ๐ŸŸข LOW RISK (18/100).

Step 2: Demonstrate Normal Approved Payment

  1. Select Rahul (Personal) (rahul@mockbank) $\rightarrow$ Amount: โ‚น2,000.
  2. Tap [ CONTINUE TO PAY โ‚น2,000 ].
  3. Result:
    • Backend evaluates risk: ALLOW.
    • Dialog shows: ๐ŸŸข Payment Successful.
    • Simulated Bank Balance debits from โ‚น10,000 $\rightarrow$ โ‚น8,000.

Step 3: Trigger Multi-Stage Account Takeover (ATO) Attack

  1. Tap [ Reset Scenario & Balance (โ‚น10,000) ] to restore fresh state.
  2. In the Developer Attack Simulator, tap [ SIMULATE FULL ACCOUNT TAKEOVER (ATO) ].
  3. The sequential attack chain is simulated:
    SIM_SWAP (+30 pts) โž” NEW_DEVICE (+20 pts) โž” PASSWORD_RESET (+15 pts) โž” NEW_BENEFICIARY (+15 pts)
    
  4. Risk score elevates to ๐Ÿ”ด CRITICAL RISK (95/100).

Step 4: Attempt Fraudulent Money Transfer (The "Hero" Interception)

  1. Select Attacker Mule Account (attacker@fraudbank) $\rightarrow$ Amount: โ‚น2,000.
  2. Tap [ CONTINUE TO PAY โ‚น2,000 ].
  3. Result:
    • Server intercepts payment at pre-check stage: BLOCK.
    • High-Priority Fraud Dialog displays:
      ๐Ÿšจ TRANSACTION BLOCKED
      
      Amount: โ‚น2,000
      Risk Score: 95/100 (CRITICAL)
      
      Reasons:
      โ€ข Recent SIM/eSIM change
      โ€ข New device
      โ€ข Password reset
      โ€ข New beneficiary
      
      Your money was not transferred.
      Simulated Bank Balance: โ‚น10,000 (UNTOUCHED)
      
      The transaction was blocked before simulated execution.
      
    • The user's bank balance remains strictly โ‚น10,000 (Zero Loss!).

Step 5: Activate Emergency "Secure My Account"

  1. In the alert dialog, tap [ ๐Ÿ”’ SECURE MY ACCOUNT ].
  2. Result:
    • Account status becomes PROTECTED.
    • Outbound wire/UPI transfers: FROZEN.
    • Remote active sessions: REVOKED.
    • P1 Fraud Investigation Case: OPENED.

๐Ÿ–ฅ๏ธ Interactive SecOps Web Dashboard

SIMShield includes a high-contrast companion Security Operations (SecOps) Web Dashboard:

cd backend
npm start

Open http://localhost:3001/ in your browser to access:

  • Live Bank Balance Metric: Displays real-time ledger balance and account protection status.
  • ๐Ÿ’ณ SIMShield Pay Gateway: Interactive payment tester on web to verify pre-checks.
  • Live SVG Threat Gauge: 0โ€“100 animated needle gauge showing current risk score and mitigation policy.
  • Attack Simulator Studio: 5-stage automated attack chain replay with live progress stepper.
  • Incident Case Review Queue: Analyst triage queue with actions to release or hold transactions.
  • Real-Time Signal Feed: Cryptographically verified audit log with JSON inspector.

โš–๏ธ Multi-Signal Scoring Engine & Reason Codes

Signals are correlated across a 24-hour sliding window and capped at 100 points:

Signal Identifier Weight Domain Reason Code
SIM_CHANGED / REPLACED +30 Telecom Physical RECENT_SIM_CHANGE
ESIM_CHANGED / ADDED +30 Telecom Digital RECENT_ESIM_CHANGE
NUMBER_PORTED +25 Telecom Routing NUMBER_PORTED
CARRIER_CHANGED +20 Telecom Network CARRIER_CHANGED
NEW_DEVICE_LOGIN +20 Authentication NEW_DEVICE / ACCOUNT_TAKEOVER_PATTERN
PASSWORD_RESET +15 Credential Recovery PASSWORD_RESET_AFTER_SIM_CHANGE
PIN_RESET +15 Credential Recovery PIN_RESET
NEW_BENEFICIARY +15 Core Banking NEW_BENEFICIARY_AFTER_SIM_CHANGE
UNUSUAL_TRANSACTION +20 Financial Velocity ABNORMAL_TRANSACTION
FAILED_AUTH_ATTEMPTS +10 Authentication FAILED_AUTH_ATTEMPTS

๐Ÿšฆ Automated Response Policies:

  • 0 โ€“ 29 LOW (ALLOW): Normal profile. Payments execute automatically.
  • 30 โ€“ 49 MEDIUM (WARN_USER): Step-up warning. User advised to review SIM activity.
  • 50 โ€“ 79 HIGH (STEP_UP_AUTH): Hardware biometric authentication required before payment.
  • 80 โ€“ 100 CRITICAL (HOLD_TRANSACTION / BLOCK): Outbound transfers blocked; balance untouched; P1 case opened.

๐Ÿ“ก REST API Reference

Method Endpoint Description
GET / or /dashboard Interactive SecOps Web Dashboard & Attack Simulator
GET /healthz, /readyz Liveness & readiness health checks
GET /api/metrics Telemetry metrics (events count, active alerts, held txns)
POST /api/mobile-events Ingest validated mobile identity event (HMAC verified)
GET /api/mobile-events Retrieve global recent security events stream
GET /api/users/{id}/risk Authoritative risk score, level, and reason codes
GET /api/users/{id}/security-events Chronological event timeline for the subject
GET /api/users/{id}/fraud-alerts Active fraud alerts for the subject
GET /api/users/{id}/balance Live mock bank balance and account status
GET /api/users/{id}/transactions Ledger transaction history with risk audit metadata
POST /api/transactions/precheck Pre-transaction fraud risk evaluation & decision (ALLOW/BLOCK)
POST /api/transactions/verify Step-up biometric authentication confirmation
POST /api/transactions/execute Authoritative mock bank debit/credit execution
POST /api/security/emergency-lock Panic lockdown: freeze transfers, revoke sessions, open P1 case
POST /api/security/confirm-activity "This was me" out-of-band biometric confirmation
GET /api/cases List all open fraud mitigation cases
POST /api/cases/{id}/{action} Case actions (RESOLVE, HOLD, RELEASE)
POST /api/simulation/{scenario} Dev sandbox (sim-swap, esim-change, new-device, account-takeover, reset)

๐Ÿงช Automated Testing

SIMShield includes 34 automated test suites covering risk scoring, temporal correlation, mock payments, transaction pre-checks, emergency lockdowns, and crypto signatures:

cd backend
npm test
โ–ถ SecOps Dashboard & Studio API Suite (7 tests)
  โœ” GET / serves HTML dashboard
  โœ” GET /styles.css serves CSS stylesheet
  โœ” GET /app.js serves JavaScript controller
  โœ” GET /api/metrics returns system metrics and telemetry
  โœ” GET /api/mobile-events returns global recent events list
  โœ” Case escalation and resolution workflow
  โœ” POST /api/reset clears user state cleanly
โœ” SecOps Dashboard & Studio API Suite (92ms)

โ–ถ HTTP API Integration Suite (7 tests)
  โœ” GET /healthz returns 200 HEALTHY
  โœ” POST /api/mobile-events ingests event and returns 201
  โœ” GET /api/users/:userId/risk returns updated risk evaluation
  โœ” GET /api/users/:userId/security-events returns event timeline
  โœ” POST /api/security/confirm-activity confirms user identity
  โœ” POST /api/fraud-alerts/:alertId/report opens fraud case
  โœ” POST /api/simulation/:scenario fails with 403 when demo disabled
โœ” HTTP API Integration Suite (47ms)

โœ” Event validation correctly normalizes and validates mobile identity events
โœ” Recent SIM change is a warning-level medium risk (30 pts)
โœ” Recent eSIM profile change is a warning-level medium risk (30 pts)
โœ” Number ported event awards 25 risk points with a warning alert
โœ” SIM change + new device login triggers ACCOUNT_TAKEOVER_PATTERN (50 pts)
โœ” Temporal Sequence: Password reset & beneficiary addition shortly after SIM change
โœ” Full correlated takeover sequence caps score at 100 and escalates to CRITICAL
โœ” Events outside the 24-hour correlation window are ignored
โœ” Safe customer confirmation ("This was me" flow) resolves alerts with verified audit trail
โœ” Crypto HMAC hashing and timing-safe webhook signature verification

โ–ถ Mock UPI & Transaction Anti-Fraud Suite (7 tests)
  โœ” Scenario 1: Normal transaction with low risk completes and updates balance
  โœ” Scenario 2: SIM swap only raises risk to MEDIUM and requires verification
  โœ” Scenario 3: SIM swap + New device raises risk to HIGH and requires biometric step-up
  โœ” Scenario 4: Full ATO sequence results in CRITICAL risk, BLOCK decision, and zero balance change
  โœ” Scenario 5: Old SIM event outside 24h window does not penalize transaction
  โœ” Scenario 6: Emergency Lockdown freezes transfers immediately
  โœ” Scenario 7: Transaction history audit log accurately records all transactions
โœ” Mock UPI & Transaction Anti-Fraud Suite (77ms)

โ„น total tests: 34 | suites: 0 | pass: 34 | fail: 0 | duration: ~250ms

๐Ÿ”’ Security & Privacy Guardrails

  • Zero Raw PII Storage: Only salted HMAC-SHA256 hashes of device IDs, IP addresses, and phone numbers are stored.
  • No SMS OTP Access: The app never requests READ_SMS or RECEIVE_SMS permissions.
  • Cleartext Network Policy: Restricted explicitly for local testing via android:usesCleartextTraffic="true".
  • Hardware Enclave Attestation: Biometric confirmations interact directly with Android's secure hardware enclave (BiometricPrompt).
  • Authoritative Ledger Guard: Blocked transactions can never debit funds; direct client-side execution attempts are rejected with 403 Forbidden.

๐Ÿ“„ Documentation & Guides

About

Resources

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages