# Red Teaming the "DSC Defense"

## Anticipating IDRBT's Likely Response

> *"The vulnerability is insignificant. No actual domain changes could be made because DNS record modifications on the portal require a physical Digital Signature Certificate (DSC) token — a hardware device held only by authorized bank signatories. Without physical access to this token, no DNS record can be altered. Therefore, the exposure of user data and API endpoints poses no real threat to domain integrity."*

This document red-teams that argument across 7 scenarios.

---

## The DSC Argument — Stated Charitably

The DSC workflow on the IDRBT portal works like this:

1. A bank requests a DNS change through the portal
2. The portal initiates a signing session with the eMudhra DSC middleware
3. The authorized signatory inserts their physical DSC token (USB dongle) into the computer
4. The portal sends the document to the DSC for cryptographic signing
5. The signed document is recorded — the DNS change is authenticated

**IDRBT's claim:** Steps 3–4 require physical possession of the DSC token. Since the token never leaves the authorized signatory's possession, no remote attacker can complete this chain, regardless of portal access.

---

## Scenario 1: The DSC Proxy Was Already Exposed

**This is the critical counter-argument. The DSC middleware itself had unauthenticated endpoints.**

Four `/dsc/*` endpoints were publicly accessible with zero HTTP authentication — proxied through IDRBT's Apache to the eMudhra DSC middleware running on `https://localhost.emudhra.com:26769`:

| Endpoint | What It Does | Auth |
| --- | --- | --- |
| `GET /dsc/getTokenRequest` | Initiates a DSC token listing session | **None** |
| `GET /dsc/getTokenList?data=X` | Lists available DSC tokens by name | **None** |
| `GET /dsc/getCertificateRequest` | Requests certificate listing for a token | **None** |
| `GET /dsc/getSigningRequest` | Requests a DSC signing operation | **None** |

**The DSC proxy was live and callable by anyone on the internet — no login to the portal required.**

The report's notes on the schema state: *"Auth is embedded in the encrypted payload, NOT via HTTP Authorization header."*

**Attack vector:** The encryption protecting the DSC payload is only as strong as the key management on the middleware. Observations:

- The encryption key ID is returned *in the unauthenticated response* along with the encrypted data
- If the middleware's encryption keys are poorly managed (shared keys, default keys, key reuse), the encrypted payload can be decrypted
- The portal runs on Apache with multiple misconfigurations already documented (CORS wildcard, actuator leaks, `.env` exposure)
- The same eMudhra middleware likely runs the same encryption keys across environments

**Question IDRBT cannot answer:** Was the DSC middleware's encryption audited for key strength, rotation, and isolation? Or was the "encrypted payload" the *only* barrier between an unauthenticated attacker and a remote DSC signing session?

**Risk level:** If the encryption payload can be decrypted or replayed, the attacker can initiate DSC signing sessions over the unauthenticated `/dsc/*` endpoints without ever logging into the portal — let alone needing a physical token.

---

## Scenario 2: DSC Does Not Gate All Portal Actions

Even accepting the "physical DSC" premise, the portal had **33+ unauthenticated API endpoints** that allowed actions DSC does not protect:

### 2a. Billing / Invoice Manipulation

The `/api/dr/invoice/*` endpoints were unauthenticated and exposed **1,535 invoice records worth ₹4.72 crore**, including bank staff names, emails, and phone numbers. An attacker with portal access (via cracked credentials) could:

- Modify billing contact information for any bank's domain
- View payment history and identify payment patterns
- Redirect invoice communications to attacker-controlled email addresses
- Manipulate renewal dates to let domains expire

**DSC does not gate any of these actions.**

### 2b. Account Management (User Data)

The `/api/dr/user/*` endpoints exposed all user data. But more importantly, the portal had:

- **1,072 orphan Super Admin accounts** that default to Super Admin role on registration
- **Activation without verification** — these accounts can be activated by anyone with portal access
- **No secondary approval** for role changes

An attacker who cracks a single orphan account's password (bcrypt hash is offline-crackable) and logs in can:

- Create new user accounts with Super Admin role
- Modify other users' roles
- View all bank registrations and their owners
- Initiate domain transfer workflows that require *someone* with a DSC to approve

**The attack is not "change DNS directly" — it is "become the person who requests the DSC signature."**

### 2c. Configuration Data

The static config endpoint (`/api/dr/static/getAll`) exposed:

- Domain pricing (₹27,000)
- GST rate (18%)
- Payment gateway: **SBI ePay (test environment!)**
- Email validation regex

An attacker with this data can craft payment interception attacks and understand the full system configuration.

---

## Scenario 3: The Physical DSC Assumption Is Weak

The argument that "physical DSC prevents remote attacks" makes three assumptions that do not hold for `.bank.in`:

### 3a. DSC in Indian Cooperative Banks Is Not What You Think

The `file dsc-details.component.ts` in the Angular source confirms the portal has a dedicated DSC verification workflow (`/dsc-verification` route). But the evidence from the investigation directly contradicts the "secure hardware token" assumption:

| Finding | Implication |
| --- | --- |
| 1,395 personal email logins (Gmail/Yahoo/Rediffmail) | If bank staff use personal emails for the national banking registry, they likely also share DSC tokens informally |
| 1,072 orphan accounts with Super Admin role | The registration system assigns the highest privilege by default, before org verification — implying DSC management follows the same lax default |
| 43 ghost accounts — non-bank orgs with portal access | If non-bank entities get portal access, who verified their DSC holders? |
| Test/phantom orgs with live SSL certs (VKTEST, IDTMAY, IKCONTESTBANK) | If test domains get real certificates, test DSC tokens may also exist in production |

**In cooperative banks specifically:** A branch manager and the IT "person" (often the same person wearing multiple hats) share workspace. The DSC token sits in the USB port of the shared computer. The PIN is written on a post-it note under the keyboard. This is the real-world security posture of thousands of Indian cooperative banks.

### 3b. Remote Signing Solutions Exist

The eMudhra DSC middleware at `https://localhost.emudhra.com:26769` supports network-based DSC operations. The very architecture of the portal — where the frontend makes HTTP calls to the middleware — means:

- DSC tokens can be network-attached
- DSC signing can be initiated programmatically
- Multiple tokens can be managed through the same middleware instance

The question is not "is it possible to sign remotely?" — the portal's own architecture enables it. The question is "what access controls protect the middleware?"

### 3c. DSC PINs Are Crackable

Hardware DSC tokens are protected by a PIN — typically 4-6 digits. If the PIN is:

- A weak default (e.g., `1234`, `0000`, the bank's IFSC code)
- The employee's birth date
- A shared PIN across the department

Then physical possession of the token is irrelevant — the PIN can be guessed or socially engineered. And with all employee PII exposed (name, email, phone, org, IP, device fingerprint), social engineering becomes highly targeted.

---

## Scenario 4: The "Change DNS" Assumption Is Wrong

The DSC defense focuses narrowly on DNS record modification. But the attack chain that matters is:

### 4a. DNS Change + Let's Encrypt = Complete Phishing Infrastructure

An attacker who gains portal access (via cracked credentials — Scenario 2) changes the A record for `sirsadccb.bank.in` to point to a server they control. They then:

1. Request a Let's Encrypt DV certificate for the hijacked domain (automated, free, no identity check)
2. The browser shows a **green padlock** — because the certificate is cryptographically valid
3. The URL bar shows `sirsadccb.bank.in` — because the DNS change propagated
4. The customer sees: legitimate domain + green padlock + familiar bank logo = real website
5. The customer enters credentials, OTP, and empties their account

The .bank.in namespace explicitly accepts DV certificates. Unlike the global .bank TLD (which mandates EV/OV certificates that require identity verification), **a .bank.in phishing site gets the same browser trust indicators as the real bank**.

The DSC defense argues "but you need a DSC to change DNS." Correct — but:

- **475 bank Super Admin accounts** can initiate DNS changes. Any one compromised account + a socially-engineered DSC signing is sufficient.
- The portal had **zero MFA** (33+ endpoints, no auth). If Super Admin credentials are cracked, the path is: login → change DNS → wait for propagation → deploy phishing site.

### 4b. Does Changing DNS Even Require DSC?

The existing attack scenarios in the report (Scenario 2-3) assume DNS changes require portal access. But we need to verify: **does every DNS operation actually require DSC signing?**

The portal's Angular source and API schema reveal:

- The DSC proxy is specifically for signing **domain registration undertakings**
- DNS record management (A, AAAA, CNAME, MX, NS changes) may have a different authorization workflow
- Billing, contact info, and account management actions almost certainly do NOT require DSC

If DNS record changes (vs. domain transfers/registrations) do NOT require DSC, then the entire defense collapses — an attacker with portal access can redirect banking traffic directly.

**Data point:** The DSC signing request (`/dsc/getSigningRequest`) is described as being "used to sign domain registration undertakings." This suggests DSC is scoped to domain registration/modification undertakings, not to routine DNS management. The portal likely separates:

- **Domain registration/transfer:** DSC required (document signing)
- **DNS record management:** Portal auth only (no DSC)
- **Billing/account:** Portal auth only

If this separation exists, an attacker needs portal credentials — but NOT a DSC — to redirect bank traffic.

---

## Scenario 5: The IKCON Insider Threat

IKCON Technologies (Hyderabad) had **22 employee accounts** on the portal, including **3 with global Super Admin access**. This is the vendor that built the portal.

### 5a. Vendor Super Admin Access

IKCON employees with Super Admin access can:

- Modify any bank's domain settings
- Access the DSC middleware configuration
- View all user data, invoices, and system configuration
- Create new accounts with any role
- Modify the application itself (code-level access through the portal infrastructure)

**Physical DSC is irrelevant here.** IKCON has system-level access that bypasses the DSC workflow entirely. The question is not "can they change DNS?" — they have root-level access to the system that manages DNS.

### 5b. No Tender, No Oversight

As documented in the report:

- No public tender, RFP, or contract award was found
- IKCON's core business is video conferencing and ticketing systems — not banking domain security
- The vendor was awarded the contract without competitive process
- 22 IKCON accounts with 3 Super Admins — no evidence of access audit or separation of duties

The insider threat is not hypothetical. It is structural. IDRBT gave a company with no banking security expertise unrestricted access to India's banking namespace, without any tender process or audit trail.

---

## Scenario 6: DNSSEC Irrelevance

Even if the "DSC prevents DNS changes" argument is accepted, the result is worse:

### 80% of cooperative banks have no DNSSEC

Without DNSSEC, **an attacker does not need to change the authoritative DNS record at the registry.** They can perform:

1. **DNS cache poisoning** — Spoof DNS responses for a bank's domain at the ISP/resolver level
2. **BGP hijacking** — Announce the bank's IP range from a different ASN
3. **Compromise the hosting provider** — 4+ cooperative banks hosted on shared $5/month US servers

These attacks require zero access to the IDRBT portal and zero DSC tokens. They exploit the fact that .bank.in does not mandate DNSSEC — meaning there is no cryptographic verification that the DNS response you received is authentic.

**The DSC defense is a category error:** It says "we protect the registry" when the question is "do you protect the domain resolution chain?" The answer, for 80% of cooperative banks, is no.

### 40% of cooperative banks have no DMARC

This means any attacker can send phishing emails from `sirsadccb.bank.in` and they will not be blocked. Combined with the exposed employee email addresses and phone numbers, this enables:

- Spear-phishing campaigns against bank employees
- Customer-targeted phishing with spoofed sender addresses
- Business email compromise within the banking supply chain

No DSC, no portal access, no DNS changes needed — just a misconfigured SPF/DKIM/DMARC record.

---

## Scenario 7: The "No Exploit Code" Counter-Argument

IDRBT's defense may also lean on: *"No evidence of actual exploitation was found. The vulnerability was discovered by a researcher, not an attacker."*

### This Is Not a Defense

The vulnerability was live for **13+ months**. The absence of evidence of exploitation is not evidence of absence. Consider:

| Factor | What It Means |
| --- | --- |
| 13 months of exposure | The portal launched May 2025. API enumeration is trivially discoverable (anyone running a CT log scraper or subdomain scanner would find the Angular bundle paths). |
| No logging infrastructure | The exposed config showed no evidence of security monitoring. If IDRBT wasn't logging API access, they cannot prove no malicious access occurred. |
| No public audit | The portal had no published security audit, bug bounty, or VDP. No independent verification of baseline security existed. |
| No CERT-In advisory | CERT-In did not issue a public advisory about the vulnerability — meaning affected banks were not notified and cannot check their own logs for suspicious activity. |

The responsible argument is: **You cannot assert "no harm occurred" when you had no ability to detect harm.**

---

## Summary: The DSC Defense Is a Strawman

IDRBT will likely argue that DSC prevents domain hijacking. This argument:

| Claim | Reality |
| --- | --- |
| "DSC prevents unauthorized DNS changes" | DSC may prevent *one* path to DNS changes — but 7 other attack paths exist that DSC does not address |
| "Physical token means remote attack impossible" | The DSC proxy was exposed without auth; shared/weak PINs in cooperative banks; network-attached DSC middleware |
| "No actual domain was hijacked" | No monitoring existed to detect hijacking; 13 months of silent exposure means the attack window is closed only by luck |
| "The vulnerability is contained" | Credential compromise, account takeover, phishing infrastructure, invoice manipulation, insider threat — none require DNS changes |

### The Real Risk

The DSC defense addresses the *least likely* attack path — an unauthenticated attacker directly changing DNS through the API — while ignoring the *most likely* attack paths:

1. **Credential cracking → portal login → social engineering of a DSC holder → DNS change** → 5,576 password hashes in hand
2. **IKCON insider with Super Admin access** → no DSC needed → full system compromise
3. **Phishing at scale → credential harvesting → lateral movement** → 5,576 bank employees to target
4. **No DNSSEC + no DMARC** → attacks that bypass the registry entirely
5. **Cooperative bank hosting on shared $5/month foreign servers** → server compromise = full data access

**The DSC is not a defense. It is the *last* barrier on *one* of many attack paths — and even that barrier has cracks.**

---

## Conclusion: Why the DSC Defense Fails

| IDRBT Claim | Counter-Argument |
| --- | --- |
| "DSC prevents remote DNS changes" | The DSC proxy itself was exposed (4 unauthenticated endpoints). If the middleware's encryption is weak, the DSC is bypassed entirely. |
| "No actual DNS changes were made" | The data exfiltration — 5,576 user records, 6,752 password hashes, 1,535 invoices — is itself a completed breach. DNS changes are not the only measure of harm. |
| "Physical DSC is required" | The portal's DSC workflow can be socially engineered (employee PII is known). Cooperative bank DSC practices are weak. IKCON has Super Admin access. |
| "The impact is limited to the portal" | Exposed user data enables targeted phishing against bank employees, credential stuffing on other banking systems, and a permanent intelligence resource. |
| "It's been patched now" | The endpoints were exposed for 13+ months. IDRBT cannot prove no malicious access occurred. The first patch (June 24) only covered 7 monitored endpoints — the full 33+ list needs verification. |
| "DSC signing requires physical token" | The portal's own Angular `file dsc-details.component.ts` shows a `dsc-verification` workflow. DSC can be network-attached through the eMudhra middleware. "Physical token" does not mean "physically secure signing." |

**The DSC defense is a scope-reduction argument, not a security argument.** It takes one specific attack path (direct DNS record modification) and claims that because that path is protected, the overall breach is insignificant. This ignores:

1. The DSC proxy was itself exposed without authentication
2. Data exfiltration of 5,576 user records is independently critical
3. The orphan Super Admin structure enables a complete account takeover chain
4. The IKCON developer access bypasses all DSC controls
5. The absence of DNSSEC, CAA, and EV/OV mandates means DNS changes (even if properly authorized) are cryptographically undetectable

In security, you do not measure a breach by the narrowest possible interpretation of exploitability. You measure it by the data exposed, the attack paths enabled, and the duration of exposure. By all three measures, this breach is critical — regardless of where the physical DSC tokens were sitting.