Case Study 1: The Optus Breach — When an Unauthenticated API Endpoint Exposes a Nation

Overview

In September 2022, Optus — Australia's second-largest telecommunications company with approximately 10 million subscribers — disclosed a data breach that compromised the personal records of 9.8 million current and former customers. The breach was not the result of sophisticated hacking, advanced persistent threats, or insider compromise. It was caused by a single unauthenticated API endpoint that exposed customer data to anyone who could send an HTTP request.

The Optus breach became one of Australia's most significant cybersecurity incidents, triggering regulatory reform, executive resignations, and a national conversation about data retention and corporate security responsibilities. For API security professionals, it serves as an unambiguous example of the most fundamental API vulnerability: broken authentication.

Technical Background

The Vulnerable API

According to investigative reporting and Optus's subsequent disclosures, the vulnerable API endpoint was part of a customer identity verification system that had been exposed to the internet — potentially as part of a test environment or a legacy integration point that was never properly decommissioned.

The critical characteristics of the vulnerable endpoint:

  1. No Authentication Required: The API endpoint accepted requests without any form of authentication — no API key, no OAuth token, no session cookie, no client certificate
  2. Sequential Identifiers: Customer records were accessible via sequential numeric identifiers, making enumeration trivial
  3. Excessive Data in Responses: Each API response contained the full customer record, including sensitive personally identifiable information
  4. No Rate Limiting: The endpoint had no rate limiting, allowing rapid automated enumeration

The simplified attack was as straightforward as:

# No authentication header required
GET /api/customers/1000001 HTTP/1.1
Host: api.optus.com.au

# Response
{
  "customer_id": 1000001,
  "first_name": "John",
  "last_name": "Smith",
  "date_of_birth": "1985-03-15",
  "email": "john.smith@example.com",
  "phone": "+61412345678",
  "address": "123 Example Street, Sydney NSW 2000",
  "id_document_type": "passport",
  "id_document_number": "PA1234567",
  "medicare_number": "2345 67890 1"
}

The attacker simply incremented the customer ID to enumerate through the entire database:

# Simplified representation of the attack
import requests

for customer_id in range(1000001, 11000000):
    response = requests.get(
        f"https://api.optus.com.au/api/customers/{customer_id}"
    )
    if response.status_code == 200:
        save_record(response.json())

Data Exposed

The breach exposed data for approximately 9.8 million individuals — roughly 40% of Australia's population:

  • Full names, dates of birth, email addresses, and phone numbers for all affected customers
  • Physical addresses for all affected customers
  • Identity document numbers for approximately 2.8 million customers, including:
  • Passport numbers
  • Driver's license numbers
  • Medicare card numbers
  • Historical data extending back several years, including former customers who had left Optus

The exposure of government-issued identity document numbers was particularly severe because Australian identity verification systems rely heavily on document numbers. Unlike passwords, these numbers cannot be easily changed, creating long-term identity theft risk.

Attack Timeline

Date Event
Unknown Unauthenticated API endpoint exposed to the internet
Mid-September 2022 Attacker begins accessing and downloading customer records
September 22, 2022 Optus detects the breach and takes the endpoint offline
September 22, 2022 Optus notifies the Australian Cyber Security Centre (ACSC)
September 22, 2022 Optus publicly discloses the breach
September 23, 2022 Attacker posts on Breach Forums claiming to have the data
September 26, 2022 Attacker demands $1M USD ransom, threatening to release data
September 27, 2022 Attacker releases 10,200 customer records as "proof"
September 28, 2022 Attacker retracts ransom demand and claims to have deleted the data
October 2022 Australian Federal Police identify the attacker as a teenager
November 2022 Australian Parliament passes enhanced privacy penalty legislation

Root Cause Analysis

API Security Failures

The Optus breach represents a cascade of API security failures that collectively allowed one of the simplest possible attacks:

1. Broken Authentication (OWASP API1/API2)

The most fundamental failure: the API endpoint required no authentication whatsoever. In the OWASP API Security Top 10 framework, this falls under both API1 (Broken Object Level Authorization) and API2 (Broken Authentication) — the two most critical API vulnerability categories.

The question of how an unauthenticated endpoint reached production has several possible explanations: - A test or development endpoint was accidentally exposed to the internet - A legacy integration endpoint lost its authentication requirements during a migration or upgrade - The endpoint was intentionally left unauthenticated for internal use but was inadvertently made externally accessible through a network configuration error

2. Predictable Object References

Customer records were accessible via sequential numeric identifiers. This made enumeration trivial — the attacker needed only to increment an integer to access the next record. Even if the endpoint had required authentication, the sequential identifiers would have enabled any authenticated user to access all customer records (BOLA/IDOR).

3. Excessive Data Exposure (OWASP API3)

Each API response contained the complete customer record, including highly sensitive identity document numbers. A properly designed API would: - Return only the data necessary for the calling application's purpose - Exclude sensitive fields like identity document numbers from standard responses - Require additional authorization and logging for access to sensitive fields

4. Missing Rate Limiting (OWASP API4)

The absence of rate limiting allowed the attacker to enumerate millions of records through rapid automated requests. Even basic rate limiting (e.g., 100 requests per minute) would have made the mass download impractical or at least detectable.

5. Missing Monitoring and Detection

The breach went undetected during the initial exfiltration period. Effective monitoring would have flagged: - Large volumes of sequential API requests - Requests from an unusual IP address or geographic location - Data exfiltration volumes exceeding normal patterns - Access patterns inconsistent with legitimate application usage

Organizational Failures

Beyond technical controls, the breach reflected organizational security gaps:

  • Asset Inventory: Optus apparently did not have a complete inventory of externally-accessible API endpoints
  • Security Testing: The unauthenticated endpoint was not caught by regular security assessments
  • Network Segmentation: The endpoint was accessible from the public internet despite containing sensitive customer data
  • Data Minimization: The API exposed more data than necessary, violating data minimization principles

Australian Government Response

The Optus breach triggered significant regulatory action:

Privacy Legislation Reform: In November 2022, the Australian Parliament passed the Privacy Legislation Amendment (Enforcement and Other Measures) Bill 2022, which: - Increased maximum penalties for serious data breaches from AUD $2.22 million to the greater of: AUD $50 million, three times the value of the benefit obtained from the breach, or 30% of the company's adjusted turnover in the relevant period - Expanded the Australian Information Commissioner's powers to resolve privacy breaches - Allowed the Commissioner to share information with other regulators

Passport and License Replacement: The Australian Government offered free replacement of passports and driver's licenses for affected individuals — an unprecedented step that highlighted the severity of identity document exposure.

Telecommunications Security Review: The government announced a comprehensive review of telecommunications sector security requirements.

Corporate Impact

  • CEO Resignation: Optus CEO Kelly Bayer Rosmarin resigned in November 2022 following sustained pressure over the company's handling of the breach
  • Regulatory Investigation: The Office of the Australian Information Commissioner (OAIC) launched a formal investigation
  • Class-Action Lawsuit: A class-action lawsuit was filed on behalf of affected customers seeking damages for privacy violations
  • Deloitte Review: Optus commissioned an independent review by Deloitte of its security practices and the circumstances of the breach

Lessons for Ethical Hackers

API Reconnaissance Priority

The Optus breach demonstrates why API reconnaissance should be the first phase of any web application assessment:

  1. Discover All Endpoints: Use Kiterunner, ffuf, and JavaScript analysis to find undocumented API endpoints
  2. Test Authentication on Every Endpoint: Systematically test each endpoint without authentication credentials
  3. Check for Sequential Identifiers: Document the identifier format for each endpoint and test for predictability
  4. Assess Response Data: Review each endpoint's response for excessive data exposure
  5. Test Rate Limiting: Determine whether endpoints enforce request rate limits

Mapping to OWASP API Security Top 10

The Optus breach can be used as a teaching example for nearly every item in the OWASP API Security Top 10:

OWASP API Risk Optus Manifestation
API1: BOLA Sequential customer IDs allowed access to any record
API2: Broken Authentication No authentication required at all
API3: Broken Object Property Level Auth Full records including identity documents returned
API4: Unrestricted Resource Consumption No rate limiting on enumeration
API5: Broken Function Level Auth Not directly applicable
API6: Unrestricted Access to Business Flows Automated mass download possible
API7: SSRF Not applicable
API8: Security Misconfiguration Test/internal endpoint exposed publicly
API9: Improper Inventory Management Unknown/unmanaged endpoint in production
API10: Unsafe Consumption of APIs Not directly applicable

Report Template

When documenting similar findings:

## Finding: Unauthenticated API Endpoint Exposing Customer PII

**Severity:** Critical (CVSS 9.8)
**OWASP API:** API2 (Broken Authentication), API3 (Excessive Data Exposure)

**Description:** The endpoint /api/customers/{id} returns complete customer
records including PII and identity document numbers without requiring any
form of authentication.

**Impact:** An unauthenticated attacker can enumerate and download all
customer records by incrementing the customer ID parameter. The data
includes names, addresses, dates of birth, and government-issued identity
document numbers.

**Reproduction Steps:**
1. Send a GET request to /api/customers/1000001 without any authentication
2. Observe that a complete customer record is returned
3. Increment the ID to access additional records

**Remediation:**
1. Immediately require authentication for all customer data endpoints
2. Implement authorization checks ensuring users can only access their own records
3. Remove sensitive fields (identity document numbers) from standard responses
4. Implement rate limiting and monitoring
5. Replace sequential IDs with UUIDs or other non-enumerable identifiers

Discussion Questions

  1. The Optus endpoint reportedly required no authentication at all. In your experience, how common is it to find completely unauthenticated endpoints in production? What development and deployment practices lead to this situation?

  2. Sequential customer identifiers made enumeration trivial. However, even UUIDs would not have prevented the breach if the endpoint was unauthenticated. Discuss the relative importance of identifier obscurity versus proper authentication and authorization.

  3. The Australian government responded with dramatically increased penalties for data breaches. Evaluate whether financial penalties are an effective mechanism for improving corporate security practices. What alternative or additional approaches might be more effective?

  4. The attacker initially demanded a $1M ransom, then retracted and claimed to have deleted the data. Discuss the reliability of such claims and how organizations should respond to ransom demands following a data breach.

  5. Optus was Australia's second-largest telco, with presumably significant security resources and expertise. What organizational dynamics allow fundamental vulnerabilities like an unauthenticated API endpoint to persist in large, well-resourced companies?


Return to Chapter 23: API Security Testing