Skip to content
Pwnversity
WEB-ARQUITECTURASintermediate · 14 min · upd. 2026-11

Web Architectures and Stack Fingerprints

OWASP A02:2025CWE-200

Before firing a single payload, it pays to know what you’re looking at. An application that builds HTML on the server hides its logic and exposes forms; one that builds it in the browser hands you its code and exposes an API. A monolith has one door; a microservices architecture has dozens, some without a lock. Classifying the application in the first few minutes decides which vulnerabilities make sense and where to look for them.

Architecture isn’t a vulnerability, but it shapes all of them:

  • Where the logic lives: on the server (you can’t see it) or in the browser (you see all of it, including routes and checks the server may not repeat).
  • Where authorisation is decided: if the front end hides a button but the API doesn’t check permissions, the control doesn’t exist.
  • What trusts what: internal services that don’t authenticate because “only the gateway calls them” are the prize of an SSRF.
  • What gives the stack away: headers, cookies, paths and error pages reveal the technology and often the version, which is your ticket to a public exploit.

Knowing the pattern tells you where to look for routes, validation and database queries.

Pattern Idea Where you see it
MVC The request reaches a controller, which uses the model (data and rules) and returns a view (HTML). Laravel, Rails, Spring MVC, ASP.NET MVC
MTV Django’s MVC: the view acts as controller and the template is the view. Django
MVVM A ViewModel keeps data and view in sync both ways. Angular, Vue (Options API)
Components Each piece of UI carries its own state and rendering; they nest. React, Vue 3, Svelte

In MVC, routes usually look like /controller/action/id (/invoices/view/42), and that 42 is an immediate IDOR candidate.

MPA (server-rendered) SPA (client-rendered) Hybrid (SSR + hydration)
How it works Each click requests a full HTML page An almost empty HTML and a JS bundle load; then the JS fetches data and renders The server sends ready-rendered HTML and the JS “takes over” afterwards
What the server returns HTML JSON (REST or GraphQL) HTML and JSON
Examples Classic PHP, Laravel with Blade, JSP, ASP.NET Web Forms React, Angular, Vue with an API behind Next.js, Nuxt, SvelteKit, Remix
Where the surface is Each page’s parameters, forms and files The API: every endpoint the front end consumes Both, plus the framework’s server routes
Typical vectors Injections (SQL, commands), LFI, uploads, reflected XSS IDOR and broken access control, mass assignment, token flaws, DOM XSS Both sets, plus middleware bypasses and server-side SSRF
flowchart LR
    subgraph MPA
        N1[Browser] -->|"GET /invoices"| S1["Server: controller + template"]
        S1 -->|"Full HTML"| N1
    end
    subgraph SPA
        N2[Browser] -->|"GET /"| C["Empty HTML + main.js"]
        N2 -->|"GET /api/invoices"| API["API (JSON)"]
    end
Monolith Microservices Backend-as-a-service (BaaS)
What it is One application, one deployment, usually one database Many small services, each with its own code and data, behind a gateway The front end talks directly to a managed database, auth and storage service
Examples A classic Laravel or Django app Containerised services with an API gateway Supabase, Firebase
Communication Internal calls in the same process HTTP, gRPC or message queues between services The browser queries the database through the provider’s API
Typical flaw One vulnerability exposes everything Internal services without authentication “because they’re behind the gateway” Missing or badly written access rules (RLS, security rules): the public key is enough to read other users’ tables
flowchart LR
    U[Browser] --> G[API gateway / reverse proxy]
    G --> A[Users service]
    G --> B[Payments service]
    A --> M[(Users DB)]
    B --> I["Internal invoicing service (no auth)"]
    X["SSRF in another service"] -.->|"reaches it from inside"| I

In microservices, an SSRF weighs much more: from the server you reach services that don’t exist from outside. In a BaaS, authorisation lives in the database rules rather than in a backend of your own, and that’s the first thing to review.

Stack Server and usual port Signals Files and paths to try Typical flaws
PHP Apache or Nginx + PHP-FPM X-Powered-By: PHP/x, PHPSESSID cookie, laravel_session, .php extension .env, config.php.bak, phpinfo.php, /vendor/, wp-config.php LFI/RFI, file upload, unserialize(), Laravel in debug mode
Java Tomcat, Jetty, WildFly, WebLogic (8080) JSESSIONID cookie, .jsp .do .action, Spring Boot “Whitelabel Error Page” /manager/html, /actuator/*, WEB-INF/web.xml Deserialisation, OGNL in Struts, exposed Actuator, Tomcat Manager with weak credentials
.NET IIS or Kestrel Server: Microsoft-IIS/x, X-AspNet-Version, ASP.NET_SessionId or .AspNetCore.* cookie, .aspx .ashx .asmx web.config, /_vti_bin/, trace.axd Unsigned ViewState or leaked machineKey, deserialisation
Python Gunicorn or uWSGI behind Nginx (8000 Django, 5000 Flask) csrftoken and sessionid cookies (Django), Django’s yellow error page, Werkzeug traceback settings.py, .env, /console (Werkzeug) SSTI in Jinja2, exposed debug console, leaked SECRET_KEY, pickle
Ruby on Rails Puma or Passenger (3000) _<app>_session cookie, Rails error page config/database.yml, config/master.key, Gemfile.lock Deserialisation with a leaked secret_key_base, mass assignment
Node.js Node process (3000), often behind Nginx X-Powered-By: Express, connect.sid cookie package.json, .env, /graphql Prototype pollution, NoSQL injection, SSRF, deserialisation
Next.js Node or a serverless platform /_next/static/ paths, x-powered-by: Next.js header, __NEXT_DATA__ in the HTML /_next/static/chunks/*.js, /api/* Middleware bypass, secrets in client-exposed variables, SSRF in server routes

Error and debug pages are the richest fingerprint: they name the framework, the version, disk paths and sometimes environment variables. Note which input triggered them, because that same input is often the vector.

Ventana de terminal
# Headers: server, framework and cookies
curl -sI https://app.example.local/
# HTML with content, or an empty container? (MPA or SPA)
curl -s https://app.example.local/ | head -30
# JavaScript bundles loaded by the home page
curl -s https://app.example.local/ | grep -oE '(src|href)="[^"]+\.js"' | sort -u
# Automatic fingerprinting
whatweb -a 3 https://app.example.local/
Question If the answer is yes
Is the initial HTML an almost empty <div id="root">? SPA: the surface is the API. Read the bundles (JavaScript recon).
Does each click produce a request that returns HTML? MPA: each page’s parameters and forms.
Do you see /_next/, __NEXT_DATA__ or /_nuxt/? Hybrid: also look at server routes and middleware.
Does traffic go to a Supabase or Firebase domain? BaaS: review the database access rules using the front end’s public key.
Do routes have per-service prefixes (/api/users/, /api/billing/)? Possible microservices: each may have its own level of control.
  • MPA: injections in every parameter, uploads, LFI, forms without CSRF protection.
  • SPAs and APIs: IDOR by changing identifiers, mass assignment with extra fields, JWT, endpoints the front end doesn’t use but the bundle mentions. See APIs.
  • Microservices: SSRF towards internal services, parsing differences between the gateway and the service (request smuggling).
  • Stack identified with a version: search for public exploits for that exact version, and the paths in the fingerprint table (/manager/html, /actuator, .env).
  • Requests to admin and debug paths (/actuator, /manager/html, /console, .env, .git/) from external sources.
  • Bursts of API requests with sequential identifiers (an IDOR pattern).
  • 5xx errors clustered by parameter: someone is probing inputs.
  • Remove or neutralise headers that reveal versions (Server, X-Powered-By, X-AspNet-Version).
  • Debug mode off in production, no exposed interactive consoles, and generic error pages.
  • Don’t publish source maps in production, or serve them only to internal users.
  • All authorisation on the server: what the front end hides doesn’t count. In a BaaS, access rules (RLS, security rules) enabled and reviewed on every table.
  • Authentication between internal services too (mTLS or service tokens); no “it’s internal, it doesn’t need it”.
  • Admin endpoints (/actuator, /manager) restricted by network and authentication.
  • CVE-2017-5638 (Apache Struts): remote code execution through an OGNL expression in the Content-Type header. It was the entry point in the 2017 Equifax breach.
  • CVE-2021-44228 (Log4Shell): a string logged by Log4j 2 triggered a JNDI lookup and the loading of remote code. It affected any Java application that logged user-controlled data.
  • CVE-2022-22965 (Spring4Shell): RCE in Spring Framework through data binding to objects, when deployed on Tomcat as a WAR.
  • CVE-2021-3129 (Laravel Ignition): RCE in Laravel applications with debug mode enabled, through the error page component.
  • CVE-2025-29927 (Next.js): the internal x-middleware-subrequest header allowed bypassing middleware, including authentication checks performed there.
Concept What to remember
MPA HTML per request. Surface: parameters and forms.
SPA Front end + API. Surface: the API. The JS is the map.
Hybrid Next/Nuxt: both surfaces, plus middleware and server routes.
MVC /controller/action/id: the id is an IDOR candidate.
Microservices Internal services without auth + SSRF.
BaaS Authorisation lives in the database rules.
JSESSIONID · PHPSESSID · ASP.NET_SessionId · csrftoken · connect.sid Java · PHP · .NET · Django · Express.
/manager/html · /actuator · /console · .env Tomcat · Spring Boot · Werkzeug · Laravel and others.
Error or debug page Framework, version, paths. Note which input triggered it.
Front end hides, API doesn’t check The control doesn’t exist.
  1. You open a website and the source is a <div id="root"></div> and a main.js. What kind of application is it and where is the surface?

    Answer

    An SPA. The surface is the API the front end consumes: endpoints, parameters and access controls. The JS bundles give you the map of routes and calls.

  2. You see the JSESSIONID cookie and port 8080. Which two paths do you try first, and why?

    Answer

    /manager/html (Tomcat Manager: with weak credentials it lets you deploy a WAR and execute code) and /actuator (Spring Boot: it can expose environment variables, configuration or a heap dump).

  3. Why is SSRF more serious in a microservices architecture?

    Answer

    Because there are many internal services reachable only from inside, and they often don’t authenticate their callers. SSRF turns the server into your access to that internal network.

  4. An SPA’s front end only shows the “Delete user” button to admins. What do you check?

    Answer

    Whether the API enforces the same check: call the delete endpoint with a regular user’s session. If it works, there’s broken access control.

  5. An application uses Supabase directly from the browser. Where is the authorisation and what do you review?

    Answer

    In the database access rules (Row Level Security). With the public key the front end carries, check whether you can read or modify other users’ rows or tables that shouldn’t be accessible.

  6. Why is a debug-mode error page so valuable?

    Answer

    Because it usually reveals the framework and version, filesystem paths, code snippets and sometimes environment variables or keys, and because the input that triggered it is often the vulnerable point.