Enterprise-Grade Mobile Identity Fraud Defense, SIM-Swap Detection & Real-Time Mock UPI Transaction Interception Platform
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.
- ๐ณ 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
BiometricPromptout-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.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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 ]
You can install the SIMShield Android Client (v1.1.0) on your Android device (Android 8.0 / API 26 through Android 15 / API 35):
- Navigate to the Actions tab in this repository.
- Select the latest successful workflow run for
Build SIMShield APK. - Scroll down to Artifacts and download
simshield-debug-apk. - Extract
app-debug.apkand transfer it to your Android phone. - Tap to install (enable "Install unknown apps" if prompted).
- Launch SIMShield!
# 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- Open Android Studio
$\rightarrow$ Open$\rightarrow$ select theSIMshildroot folder. - Wait for Gradle sync to complete.
- Select your connected device or emulator from the device dropdown.
- Click Run
app(Shift + F10).
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!
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 โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
- Open SIMShield
$\rightarrow$ ๐ณ SIMShield Paytab. - Initial state: Available Balance: โน10,000 INR, Security Status:
๐ข LOW RISK (18/100).
- Select Rahul (Personal) (
rahul@mockbank)$\rightarrow$ Amount: โน2,000. - Tap
[ CONTINUE TO PAY โน2,000 ]. -
Result:
- Backend evaluates risk:
ALLOW. - Dialog shows:
๐ข Payment Successful. - Simulated Bank Balance debits from โน10,000
$\rightarrow$ โน8,000.
- Backend evaluates risk:
- Tap
[ Reset Scenario & Balance (โน10,000) ]to restore fresh state. - In the Developer Attack Simulator, tap
[ SIMULATE FULL ACCOUNT TAKEOVER (ATO) ]. - The sequential attack chain is simulated:
SIM_SWAP (+30 pts) โ NEW_DEVICE (+20 pts) โ PASSWORD_RESET (+15 pts) โ NEW_BENEFICIARY (+15 pts) - Risk score elevates to
๐ด CRITICAL RISK (95/100).
- Select Attacker Mule Account (
attacker@fraudbank)$\rightarrow$ Amount: โน2,000. - Tap
[ CONTINUE TO PAY โน2,000 ]. -
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!).
- Server intercepts payment at pre-check stage:
- In the alert dialog, tap
[ ๐ SECURE MY ACCOUNT ]. - Result:
- Account status becomes
PROTECTED. - Outbound wire/UPI transfers: FROZEN.
- Remote active sessions: REVOKED.
- P1 Fraud Investigation Case: OPENED.
- Account status becomes
SIMShield includes a high-contrast companion Security Operations (SecOps) Web Dashboard:
cd backend
npm startOpen 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.
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 |
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.
| 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) |
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
- 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_SMSorRECEIVE_SMSpermissions. - 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.
- Security Policy & Model:
SECURITY.md - Architecture & Data Flow:
docs/ARCHITECTURE.md - REST API Reference:
docs/API_REFERENCE.md - Live Hackathon & Demo Guide:
docs/DEMO_GUIDE.md - Developer Brain & Invariants:
BRAIN.md - License: MIT License