📞 Call Now 💬 WhatsApp 📋 Report
⚖️
SIRI Law LLP
● Typically replies within 30 min
👋 Hi! How can SIRI Law LLP help you today?

We offer expert legal and cybersecurity advisory. Tap below for a confidential chat.
SIRI Law · Now
💬  Start Chat on WhatsApp

Case Study · Cloud Security Testing

All Customer Data at Risk: One IAM Misconfiguration Exposed an Entire AWS Environment

Service · Cloud Security TestingFirm · SIRI Law LLPContact · +91 7981912046
14
Critical Findings
100%
Customer Data Exposed
5 Days
Assessment
0
Prior Exploitations Found
3
Public S3 Buckets
₹250Cr
DPDPA Exposure

HomeCase StudiesCloud Security Testing → All Customer Data at Risk: One IAM Misconfiguration Exposed an Entire AWS Environment

Engagement Background

The Situation When We Were Engaged

A 150-person HR technology SaaS company had recently completed a rapid migration from on-premises to AWS. Their platform processed payroll data, PAN numbers, Aadhaar references, bank account details, and employment records for 50,000+ enterprise customers.

An AWS Well-Architected Review 8 months earlier had found configuration deviations but nothing classified as critical. The company had not conducted adversarial cloud security testing.

The trigger was a ₹3.2 crore enterprise deal — whose security questionnaire required ‘independent penetration testing of the cloud environment within the last 12 months.’ The engagement that followed revealed that 100% of customer data was accessible from a single compromised low-privilege service account.

Three publicly accessible S3 buckets contained complete payroll export files, full database backups, and JavaScript bundles with hardcoded third-party API keys — all publicly reachable by anyone who could construct or enumerate their URLs.

Client Profile

IndustryB2B SaaS — HR Technology
Customers50,000+ enterprise companies
Data ProcessedPayroll, PAN, Aadhaar, bank accounts
Assessment Duration5 days
ToolsPMapper, Pacu, ScoutSuite, Manual
Data Exposed8–18 months (unremediated)

Attack Scenario & Methodology

How the Assessment Was Conducted

Assessment Methodology

Starting Position 1External attacker — no credentials. S3 bucket enumeration using company name patterns.
Starting Position 2Compromised low-privilege Lambda execution role — insider threat or credential theft simulation.
Starting Position 3Compromised EC2 instance — IMDSv1 credential harvesting scenario.
Key ToolPMapper — IAM privilege escalation graph analysis. Maps all possible escalation chains, not just obvious paths.
Production SafetyTesting designed to confirm reachability — stopping before actual data exfiltration. Every step documented.
CloudTrail Review6 months of logs reviewed — confirmed zero prior external exploitation of all three public S3 buckets.

Technical Findings

What We Found

Each finding documented with proof-of-concept. Root cause and remediation guidance provided for every item.

CRITICALIAM Privilege Escalation — Lambda to AdministratorAccess in 3 API Calls

Lambda execution role had iam:AttachRolePolicy permission. Exploit chain: (1) Call iam:AttachRolePolicy to attach AdministratorAccess to own role; (2) Invoke Lambda; (3) Full account compromise. Time: under 60 seconds. All 50,000+ customers’ data reachable from this single escalation.

CRITICAL13 Additional IAM Privilege Escalation Paths

PMapper analysis found 13 additional escalation paths (2-hop to 7-hop chains) — including iam:CreatePolicyVersion exploitation, iam:CreateLoginProfile on admin users, ec2:RunInstances with iam:PassRole, and glue:CreateDevEndpoint. Fixing any one path would not have eliminated the risk — architectural redesign required.

CRITICALPublic S3 Bucket — 847 Active Payroll Export Files

Bucket named with company name + ‘exports’ suffix — publicly listable. 847 payroll export files: employee full names, PAN numbers, bank account numbers, IFSC codes, salary breakdowns. ~47,000 individual employee records. Bucket-level ACL set to public-read from a temporary debugging session — never reversed.

CRITICALPublic S3 Bucket — Complete Database Backups

Weekly PostgreSQL dump backups (.sql.gz, unencrypted) in a public-read bucket. Complete database of all 50,000+ customer companies’ employee records, all historical payroll data, all authentication data (hashed passwords), all API keys. Accessible to anyone with the URL — object names were predictable.

CRITICALPublic S3 Bucket — JavaScript Bundles with Hardcoded API Keys

Static asset bucket (public-read) contained frontend JavaScript bundles. Static analysis found hardcoded keys: payment gateway API key (read transaction history, initiate test transactions), SMS OTP provider key (send arbitrary SMS billed to client), background verification API key (query any individual’s employment verification data).

HIGHRDS PostgreSQL Publicly Accessible

Security group rule 0.0.0.0/0 on RDS — database protected only by credentials (which were in the public backup bucket).

HIGHCloudTrail Disabled in 4 Regions

Attacker activity in ap-south-2, eu-west-2, us-east-2, ap-southeast-3 would generate zero audit trail.

HIGHIMDSv1 Enabled on All EC2 Instances

SSRF vulnerability in any hosted application → credential harvest from instance metadata service.

HIGHGuardDuty Findings Unmonitored

GuardDuty enabled but findings not routed to any alerting system. 8 months of unreviewed findings in console.

Engagement Timeline

Phase-by-Phase Execution

Day 1
1

Scoping & Initial Enumeration

Confirmed no evidence of prior compromise via CloudTrail analysis. Mapped AWS account structure across all 7 regions — accounts, services, IAM identities. S3 bucket enumeration: discovered 3 public buckets within 40 minutes using company name pattern variations.

Days 1–2
2

IAM Privilege Escalation Analysis

PMapper analysis of complete IAM graph: discovered 14 distinct escalation paths. Primary path (Lambda → AdministratorAccess) confirmed exploitable in under 60 seconds. Escalation immediately documented and communicated to client via secure channel.

Days 2–3
3

Data Exposure Scope Assessment

Confirmed contents of all 3 public S3 buckets. Assessed RDS accessibility. Mapped lateral movement paths from EC2. Identified CloudTrail blind spots and GuardDuty monitoring gaps.

Days 4–5
4

Reporting & Immediate Remediation

Prioritised findings delivered. Worked with engineering team on same-day IAM remediation — 3 most critical escalation paths closed within 24 hours. S3 public access revoked same day. JavaScript API keys rotated.

Week 2
5

Full Remediation Programme

All 14 IAM escalation paths closed. SCPs implemented at account level. IMDSv2 enforced. CloudTrail all-regions enabled. GuardDuty routed to PagerDuty. Enterprise deal documentation package delivered.

Legal & Regulatory Risk Analysis

Why This Mattered Legally

SIRI Law LLP’s integrated practice means every technical finding is analysed for its legal and regulatory implications — providing a complete risk picture, not just a vulnerability list.

DPDPA 2023 — Sensitive Personal Data Exposure

PAN numbers, Aadhaar references, bank account details, and salary data in publicly accessible S3 buckets constituted failure to implement adequate safeguards for sensitive personal data under DPDPA Section 8(4). Duration of exposure: 8–18 months.

⚠ Penalty up to ₹250 crore. Notification obligations if any external access occurred.

Aadhaar Act 2016 — Disclosure Prohibition

Aadhaar numbers in the exposed payroll export files are regulated by the Aadhaar Act, 2016, which prohibits disclosure to any entity not authorised by the Act. UIDAI complaints could have been filed by any individual whose Aadhaar reference was exposed.

⚠ UIDAI enforcement; potential criminal liability under Aadhaar Act Section 40

IT Act 2000 — Section 43A Liability

Corporate bodies negligently failing to implement reasonable security practices for sensitive personal data (salary, bank account, PAN — all SPDI Rules sensitive data) are liable for damages to affected persons. 50,000+ customer companies’ employees affected.

⚠ Damages liability to affected individuals — no statutory cap

Customer Contractual Breach

Enterprise SaaS agreements represented adequate security standards. Publicly accessible database backups were fundamentally inconsistent with those representations. Discovery by any customer would have triggered immediate contract termination and damages claims.

⚠ Contract termination across 50,000+ customers would be existential

Remediation Programme

How We Fixed It

Immediate — Day 1 (Same Day)

All 3 public S3 buckets: Block Public Access enabled, ACLs revoked within hours of report delivery.

S3 Block Public Access enabled at AWS account level — no future public bucket creation possible.

All 3 hardcoded API keys rotated — payment gateway, SMS provider, background verification service all notified.

RDS security group rule: 0.0.0.0/0 replaced with specific application subnet CIDR.

Week 1 — IAM Architecture Remediation

All 14 IAM privilege escalation paths remediated — Lambda role stripped of iam:AttachRolePolicy, replaced with iam:PassRole scoped to specific role ARNs.

IAM permission boundaries implemented for all service roles.

AWS SCPs via Organizations: account-level guardrails preventing IAM wildcard policy creation.

Automated PMapper runs in CI/CD pipeline — flags new escalation paths on every IAM change.

Weeks 2–4 — Systematic Hardening

IMDSv2 enforced on all EC2 instances — IMDSv1 disabled.

CloudTrail enabled in all 7 regions — CloudWatch alerts for sensitive API calls.

GuardDuty findings routed to PagerDuty — on-call for all High+ severity findings.

Secrets Manager rotation: 30-day rotation for all database and service credentials.

VPC Flow Logs enabled — centralised in dedicated security account.

Business Outcomes

What the Client Achieved

Enterprise Deal Executed — ₹3.2 Crore ARR

The assessment satisfied the enterprise customer’s security questionnaire requirement. Contract executed within 30 days of assessment completion.

₹250 Crore DPDPA Exposure Eliminated

All public S3 data secured before any Data Protection Board enforcement trigger. Zero evidence of prior external exploitation confirmed by CloudTrail.

47,000 Employee Records Secured

PAN numbers, bank accounts, Aadhaar references of 47,000 employees across 340 enterprise companies protected from further exposure.

14 IAM Escalation Paths Closed

Fundamental IAM architecture rebuilt — not patched. Automated ongoing monitoring via PMapper CI/CD integration prevents recurrence.

8–18 Months of Exposure Remediated

Three public S3 buckets — some exposed since migration 18 months earlier — secured before adversary discovery. Zero exploitation evidence.

Compliance Frameworks

Standards Applied in This Engagement

AWS Well-Architected FrameworkCIS AWS Foundations Benchmark v2.0DPDPA 2023Aadhaar Act 2016ISO 27001:2022SOC 2 CC6

Why Choose SIRI Law LLP

Unique Advantage

Qualified advocates — legally privileged investigations

Certified security engineers — OSCP, CISSP, CEPT, CEH

DPDPA + CERT-In compliance integrated into every engagement

24/7 incident response availability

Director GRC & Legal at COE Security — Adv. Chetan Seripally

Facing a Similar Security Challenge?

Contact SIRI Law LLP for a confidential scoping call with our legal and technical experts.

Disclaimer: This case study describes an engagement handled by SIRI Law LLP. All client details are generic to protect confidentiality. Outcomes are fact-specific and do not guarantee similar results. For legal advice specific to your situation, please consult a qualified advocate.
Scroll to Top