πŸ”—Multi-Step Profiles

Multi-step profiles allow you to chain multiple scanning steps together in a sequential flow. This is essential for testing vulnerabilities that require multiple requests, such as multi-stage attacks, authentication-dependent tests, and workflows that rely on state from previous requests.

πŸ’‘ Concept

A multi-step profile executes a sequence of steps, where each step is a complete scan configuration (payloads, grep patterns, insertion points). Steps are executed sequentially, and cookies/state can be shared between them.

Step 1: Send initial payload β†’ Match response
  β”‚ πŸͺ (cookies carried forward)
  β–Ό
Step 2: Send follow-up payload β†’ Match response
  β”‚ πŸͺ (cookies carried forward)
  β–Ό
Step 3: Send verification payload β†’ Final match β†’ πŸ› Report issue

πŸ“Š Step Structure

Each step in the steps[] array contains the same fields as a regular profile, plus additional multi-step-specific fields:

Field
Type
Description

πŸͺ reuseCookie

Boolean

Carry cookies from the previous step's response

πŸ“ insertionPoint

String

"same" to reuse the matched insertion point from the previous step, or null for all insertion points

All standard profile fields are available per step: Payloads, Grep, MatchType, InsertionPointType, RedirType, MaxRedir, Header, NewHeaders, etc.

βš™οΈ How Multi-Step Execution Works

  1. 1️⃣ Step 1 executes with its payloads and insertion points

  2. βœ… If Step 1 matches, the scanner records:

    • πŸ“ The matching insertion point

    • πŸͺ Any cookies set in the response

  3. 2️⃣ Step 2 executes using:

    • πŸͺ Cookies from Step 1 (if reuseCookie: true)

    • πŸ“ The same insertion point as Step 1 (if insertionPoint: "same")

    • 🌐 Or all insertion points (if insertionPoint: null)

  4. πŸ”„ This continues for all steps in the sequence

  5. 🎯 Stop-on-match: If any step fails to match, the entire sequence stops for that insertion point

When reuseCookie: true:

  1. The response from the previous step is analyzed for Set-Cookie headers

  2. All cookies are collected and added to the next step's request

  3. This enables testing scenarios like:

    • πŸ”“ Login β†’ Access protected resource

    • πŸ›‘οΈ CSRF token retrieval β†’ Use token in attack

    • πŸ”‘ Session setup β†’ Exploit session-dependent vulnerability

πŸ“ Insertion Point Reuse

When insertionPoint: "same":

  • The step tests only the same insertion point that matched in the previous step

  • This ensures the attack chain targets a consistent parameter across all steps

  • If not set (or null), all configured insertion points are tested

πŸ“š Example: Multi-Step Authentication Test

πŸ”„ Flow:

  1. 1️⃣ Step 1 sends admin as a body parameter and checks for a session cookie

  2. 2️⃣ Step 2 reuses the session cookie and requests /admin/dashboard, checking for admin access

πŸ“š Example: CSRF Token Retrieval + Exploitation

⏱️ Time-Based Detection in Multi-Step

Multi-step profiles support time-based detection through the checkTimeDelayGreps() method. This enables timing attacks where:

  1. 1️⃣ Step 1 sends a baseline request (no delay)

  2. 2️⃣ Step 2 sends a time-delay payload

  3. ⏱️ The time difference is analyzed to confirm the vulnerability

🎯 Stop-on-Match Behavior

Multi-step profiles have built-in stop-on-match logic per step:

  • βœ… When a step matches, subsequent payloads for the same step are skipped

  • ➑️ The sequence proceeds to the next step

  • ❌ If a step fails to match, the entire sequence stops for that insertion point

  • πŸ”€ This is separate from the single-step stop-on-first-match optimization

πŸ’‘ Tips

  • πŸ“ Start simple β€” Test each step independently as a regular profile before combining into a multi-step sequence

  • πŸͺ Use cookie reuse β€” Enable reuseCookie: true when the next step depends on session state from the previous step

  • πŸ“ Use insertion point reuse β€” Set insertionPoint: "same" when the entire attack chain should target the same parameter

  • πŸ”’ Order matters β€” Steps execute in array order; place prerequisite steps first

  • πŸ” Debug with Scanner tab β€” Use the Scanner tab to see per-request details for each step

Last updated