Case Study · v1.0

A serious penetration test is not a scanner report with nicer formatting. It is a structured attempt to prove how a real attacker could abuse authentication, authorization, APIs, session behavior, business workflows, and internal assumptions — then translate that evidence into fixes the engineering team can actually ship.

This case study documents how Brivox approached an advanced web penetration testing engagement focused on the issues that most often break production systems: broken access control, IDOR, privilege escalation, session weakness, API exposure, security misconfiguration, and sensitive workflow abuse.

The assessment was designed to produce validated findings, business-impact narratives, reproduction steps, prioritized remediation, and post-fix verification — not vague severity labels disconnected from engineering reality.

Executive Summary

Brivox performed a structured web security assessment across the web application, REST APIs, admin workflows, authentication surfaces, authorization boundaries, and payment-related endpoints where applicable. Testing combined manual exploitation, controlled automation, role matrix analysis, API mapping, and remediation verification.

The work focused on four outcomes:

  • Validate real impact. Findings were proven through controlled exploitation, not assumed from signatures.
  • Prioritize by business risk. Issues were ranked by what an attacker could access, change, or chain.
  • Give engineering-ready fixes. Reports included reproduction, root cause, and remediation guidance.
  • Verify remediation. Fixes were retested to confirm the vulnerability class was addressed.
The strategic shift: The assessment focused on exploitability and authorization boundaries, not just checklist coverage. The goal was to identify what could realistically compromise data, roles, tenants, or sensitive workflows.

Project Context

The application contained multiple sensitive surfaces: user accounts, role-based access, REST APIs, admin workflows, profile and resource management, session behavior, and business actions that could affect customer data or financial state.

Security priorities included:

  • Authentication and session lifecycle behavior.
  • Authorization across users, roles, and sensitive objects.
  • API endpoints reachable outside the intended UI flow.
  • Admin workflows and privileged operations.
  • Input validation and business logic abuse.
  • Security headers, CORS, error handling, and deployment hardening.

The assessment needed to identify both direct vulnerabilities and exploit chains — cases where individually moderate weaknesses could combine into high-impact compromise.

The Challenge

The challenge was separating cosmetic security issues from vulnerabilities that could genuinely harm the product. Many systems accumulate low-value scanner findings while missing the problems that attackers exploit: object-level authorization gaps, role boundary mistakes, session persistence flaws, unsafe admin tools, and API endpoints that trust UI assumptions.

The test needed to answer practical questions:

  • Can a user access another user's resources by changing an identifier?
  • Can a low-privilege account perform high-privilege actions through direct API calls?
  • Can role changes, account status, or subscription state be bypassed?
  • Can session tokens remain valid after password reset, role downgrade, or logout?
  • Can verbose errors, CORS, or missing headers increase exploitability?
  • Can admin workflows be abused without proper authorization and audit controls?
UI restrictions are not authorization. Hiding a button, route, or menu item does not protect an API. Every sensitive endpoint must enforce identity, permission, ownership, and business-state rules server-side.

Project Objectives

Objective Testing Direction Success Signal
Map attack surfaceDiscover routes, APIs, roles, flows, and sensitive objectsComplete testing inventory
Validate authorizationRole matrix and object ownership testingUnauthorized access blocked consistently
Prove exploitabilityManual exploitation with safe evidenceReproducible impact documented
Prioritize remediationRank by blast radius and business impactEngineering team knows what to fix first
Verify fixesRetest patched flows and regression pathsFinding closed with evidence

Risk Areas

  1. Broken access control. Users performing actions outside their intended role or object scope.
  2. IDOR. Direct object references allowing access to another user's data.
  3. Privilege escalation. Low-privilege users reaching admin or owner capabilities.
  4. Session weakness. Tokens remaining valid after security-sensitive changes.
  5. API abuse. Endpoints trusting frontend behavior or missing validation.
  6. Security misconfiguration. Verbose errors, permissive CORS, missing headers, or weak deployment defaults.

Testing Methodology

The assessment used a layered testing approach aligned with real attacker behavior and engineering review needs.

  1. Discovery and mapping. Routes, APIs, roles, request patterns, objects, and sensitive workflows were mapped.
  2. Authentication testing. Login, reset, logout, session expiry, token handling, and MFA behavior were reviewed where applicable.
  3. Authorization matrix testing. Actions were tested across roles, users, ownership boundaries, and object states.
  4. API security testing. Endpoints were tested directly outside normal UI flows.
  5. Business logic testing. Sensitive workflows were tested for bypass, replay, or state manipulation.
  6. Misconfiguration review. Headers, CORS, error exposure, and deployment defaults were reviewed.
  7. Fix verification. Remediated findings were retested to confirm closure.
Test Matrix:
Actor A: normal user
Actor B: unrelated normal user
Actor C: manager/support role
Actor D: admin role

Actions:
read, list, create, update, delete, export, approve, refund, invite, escalate

Attack Surface Mapping

The first stage mapped the application surface so testing could be systematic rather than random. This included public pages, authenticated views, API endpoints, admin routes, file access paths, payment-related endpoints, and background-triggered workflows.

Mapping focused on:

  • Object identifiers in URLs and request bodies.
  • Role-specific UI differences.
  • API endpoints not directly visible in navigation.
  • State-changing requests such as update, delete, approve, invite, refund, and export.
  • Authentication and password recovery flows.
  • Potentially sensitive files, downloads, and reports.

Authorization Matrix Testing

The highest-value testing centered on authorization. Each sensitive action was tested with the wrong actor, wrong role, wrong object, wrong tenant/account boundary, and wrong state.

# Authorization test pattern
1. Capture valid request as authorized user.
2. Replace session with lower-privilege user.
3. Replace object ID with another user's object.
4. Replay request directly against API.
5. Repeat for read, update, delete, export, and admin actions.

This process identified whether the backend enforced real policy or merely depended on the frontend hiding actions.

Example Finding: IDOR / Broken Object Authorization

One representative finding involved an API endpoint that authenticated the user but did not verify ownership of the requested resource. By changing the object identifier, an authenticated user could access data belonging to another user.

GET /api/resources/10492
Authorization: Bearer user_a_token

Changed to:
GET /api/resources/10493
Authorization: Bearer user_a_token

The root cause was a query that selected by object ID alone instead of scoping by owner, account, or tenant.

// Vulnerable pattern
const resource = await db.resource.findUnique({
  where: { id: req.params.id }
});

// Safer pattern
const resource = await db.resource.findFirst({
  where: {
    id: req.params.id,
    ownerId: req.user.id
  }
});

The remediation used server-side ownership checks, scoped queries, removed direct object assumptions, centralized policy checks, and audit logging for denied access attempts.

Authentication proves who the user is. Authorization proves what they can touch. A logged-in user is still unauthorized for most objects in the system. Every object-level action must prove ownership or allowed scope.

Session & Authentication Review

Session testing reviewed whether account security events actually changed session validity. The test covered logout, password reset, role downgrade, account disablement, token expiry, cookie flags, and session reuse.

Important checks included:

  • Do sessions expire when expected?
  • Are cookies marked HttpOnly, Secure, and SameSite appropriately?
  • Does password reset invalidate active sessions?
  • Does role downgrade revoke or refresh permissions immediately?
  • Can old tokens continue performing privileged actions?
  • Are failed login and reset flows rate-limited?

API Security Review

APIs were tested independently from the UI. This included direct request replay, parameter tampering, method switching, mass assignment attempts, unsafe field updates, missing rate limits, weak validation, and inconsistent authorization.

// Mass assignment test payload
{
  "name": "Updated Name",
  "role": "admin",
  "isVerified": true,
  "accountStatus": "active"
}

Secure APIs rejected privileged fields, enforced schemas, checked permissions server-side, and returned safe error messages without leaking implementation details.

Remediation Strategy

Findings were translated into engineering actions. The remediation strategy avoided patching one endpoint at a time where the root cause was architectural.

  • Centralize authorization policies. Sensitive actions should call shared policy functions.
  • Scope data access. Repositories should require user/account/tenant context.
  • Allowlist request fields. Reject unknown or privileged client-submitted fields.
  • Harden session lifecycle. Revoke sessions after security-sensitive account events.
  • Improve audit logging. Record denied sensitive actions and privileged changes.
  • Fix security headers and CORS. Reduce browser and cross-origin exposure.

Fix Verification

After remediation, Brivox retested the affected flows and adjacent variants. Verification confirmed whether fixes addressed the vulnerability class, not only the exact original request.

Verification included:

  • Original proof-of-concept replay.
  • Same issue tested across similar endpoints.
  • Role matrix retesting.
  • Object ownership retesting.
  • Regression checks for legitimate authorized behavior.
  • Header, CORS, and error-handling validation.

Outcome

The assessment produced risk-ranked findings with reproduction steps, business impact, remediation guidance, and verification evidence. The highest-impact improvements focused on authorization correctness, session lifecycle hardening, API validation, and safer security configuration.

The outcome can be summarized in four improvements:

  • Authorization gaps were proven and fixed. Object-level access checks became stronger and more consistent.
  • Session behavior improved. Security-sensitive changes were tied to session and permission validity.
  • API exposure reduced. Validation and field allowlists limited abuse of direct requests.
  • Remediation confidence increased. Fixes were retested with evidence, not assumed complete.

Engineering Notes

  1. Most serious web findings are authorization findings. Scanners rarely understand business boundaries.
  2. IDOR is simple but high impact. One missing ownership check can expose sensitive data.
  3. Admin workflows need the same security model as public APIs.
  4. Fix the pattern, not just the endpoint. Centralized policy and scoped repositories prevent recurrence.
  5. Verification is part of the work. A finding is not truly closed until the exploit path fails and normal behavior still works.

What This Proves

This case study proves that advanced web penetration testing is not about producing a long list of generic issues. It is about proving where the product's trust boundaries fail, documenting the impact clearly, and helping engineering teams remove the vulnerability class from the system.

The highest-value findings are often not dramatic payloads. They are precise boundary failures: a user touching another user's object, a lower role performing a higher-role action, a stale session keeping old privileges, or an API trusting the frontend too much.

When testing is grounded in real workflows and verified remediation, penetration testing becomes more than compliance. It becomes a direct improvement to product security and production trust.

Security Note

Need a serious web penetration test before attackers do it for you?

AuthN/AuthZ, IDOR, API abuse, privilege escalation, and fix verification — tested with production-level discipline.

Let’s Talk

© 2026 Brivox (PUBARAB LTD) — Engineering documentation.