PISA Pakistan — Community CERT

← ⚙️ Red Team Fundamentals (Ethical)

48. Attacking National Identity Systems: Red Team Assessment of NADRA Biometric Authentication & e‑Government Services

⏱ 7 min

Attacking National Identity Systems: Red Team Assessment of NADRA Biometric Authentication & e‑Government Services

Pakistan’s National Database and Registration Authority (NADRA) underpins many critical services: SIM issuance, banking KYC, e‑tax filings, and the e‑Sahulat portal for government subsidies. A compromise can enable large‑scale identity theft, financial fraud, and unauthorized access to state benefits.

1. Attack Surface Overview

  • Public API Endpoints – Mobile apps and third‑party services query NADRA for identity verification (e.g., https://api.nadra.gov.pk/verify).
  • Biometric Authentication – Fingerprint and iris verification APIs used by telecom operators for SIM activation.
  • Web Portals – e‑Sahulat, NADRA’s own web UI, and provincial services expose login and session management functions.
  • Mobile Applications – Android/iOS apps that store tokens and biometric templates locally.

2. Red‑Team Methodology

  1. OSINT & Footprinting – Enumerate subdomains (portal.nadra.gov.pk, api.nadra.gov.pk) with Amass or Sublist3r.
  2. API Fuzzing – Use Burp Suite to test IDOR (Insecure Direct Object References) in identity‑lookup endpoints, e.g., passing arbitrary CNIC numbers.
  3. Mobile App Analysis – Reverse‑engineer the NADRA verification app with MobSF; extract hardcoded API keys and insecure storage of biometric tokens.
  4. SS7/SIM‑Swap Simulation – Demonstrate how an attacker can intercept OTP sent to a mobile number, bypassing the second factor used in many NADRA‑linked services.
  5. Credential Harvesting – Clone the login page (via Social‑Engineer Toolkit) to phish NADRA credentials, then validate against the real portal.

3. Real‑World Pakistani Example

A red‑team engagement for a Lahore‑based mobile wallet provider uncovered an IDOR in their NADRA verification endpoint. By simply incrementing the cnic parameter, testers could retrieve full name, address, and photo of any CNIC holder, exposing the personal data of millions.

4. Do / Don’t

  • Do enforce OAuth 2.0 with PKCE for API authentication; avoid passing CNIC numbers in URL parameters.
  • Do store biometric templates in a hardware security module (HSM) and never on the device.
  • Don’t expose NADRA APIs directly to the internet; place them behind an API gateway with rate limiting and logging.
  • Don’t rely on SMS OTP alone for high‑risk transactions; implement push‑based MFA or biometric confirmation.

5. Takeaway

Assess any system that consumes NADRA data for IDOR, insecure storage, and weak session management. If you can retrieve personal records or bypass biometric checks, immediately report the findings to the organization and NCCIA (1799) for coordinated disclosure. Strengthen defenses by adopting tokenization, secure API design, and continuous monitoring.

← PrevNext →