Bambdas and BChecks

Burp’s two lightweight extensibility layers: Bambdas are Java lambda snippets compiled inside Burp against the Montoya API (filters, columns, match-and-replace, Repeater actions, scan checks); BChecks are custom scan checks in a small declarative language run by Burp Scanner (Pro and DAST).

Extensibility in Burp is three things: extensions (BApps), Bambdas, and BChecks. Reach for the lightest one that does the job — see the decision table at the end. Full extensions are covered in Burp Suite Extensions.

Bambdas

Script types

TypeWhereEdition
Table filtersProxy HTTP history, WebSockets history, Logger (incl. capture filter), Site mapCommunity + Pro
Custom columnsProxy/Logger/Site map tables (⋮ → Add custom column)Pro
Match and replace rulesHTTP and WebSocket messages passing the proxy (limited Montoya access)Pro
Repeater custom actionsExtract/transform/analyze messages in Repeater; 2025.5 added AI-powered actions and a race-condition templatePro
Custom scan checksActive and passive checks written in JavaPro

Introduced in 2023.10.3 as HTTP-history filters; the filter receives requestResponse (ProxyHttpRequestResponse) plus utilities(), and must return true to keep a row.

Workflow

  • Proxy > HTTP history → click the filter bar → Script mode → paste/write → Apply (compiles; fix errors in the Compilation errors panel) → Apply & close. Applies retroactively to every logged item and to future traffic. Toggle Filter on/off to compare without resetting.
  • Convert an existing GUI filter into a script, or start from a built-in template.
  • Shortcuts in the editor: Ctrl/Cmd+S save, Ctrl/Cmd+Shift+S save as, Ctrl/Cmd+N new, Ctrl/Cmd+O load recent.
  • Bambda library: Extensions > Bambda library > Import — select .bambda files or a folder (recursive). Re-import to update; Burp asks before overwriting. Scripts are reusable across projects.
  • Debug: logging.logToOutput(...) → Bambda output console (early versions had no logging or stepping; runtime traces pointed at Burp’s loader, not your line).
  • Warning: Bambdas run arbitrary code — vet anything imported.

Example: hunt non-standard JWT algs across 100k+ requests

Dana Epp used this to find new endpoints signed with HS512 (target normally HS256), which led to a vulnerable token-exchange service and a P1:

if (!requestResponse.hasResponse()) return false;
var req = requestResponse.request();
if (req.hasHeader("Authorization") && req.headerValue("Authorization").startsWith("Bearer")) {
    String tok = req.headerValue("Authorization").split(" ")[1].trim();
    if (tok.contains(".")) {
        String hdr = utilities().base64Utils().decode(tok.split("\\.")[0]).toString();
        return hdr.split("\"alg\":\"")[1].toUpperCase().startsWith("HS512");
    }
}
return false;

Workshop exercises in PortSwigger’s Burp, But Yours follow the same pattern: filters for proxy-history noise, custom columns surfacing X-Cache headers or the JWT alg claim, match-and-replace rules — tested against Academy labs.

Sources of Bambdas

  • PortSwigger/bambdas — official repo by type (CustomAction, MatchAndReplace, CustomScanChecks, filters, columns). Java scan checks live here; BCheck-language checks live in PortSwigger/BChecks.
  • 254Labs/awesome-bambdas — community filters split into request-filters / response-filters.
  • AI Bambda Generator (BApp, uses Burp AI credits) drafts a Bambda from plain English; autoBambda (Tib3rius) is a Claude Code loop that writes the Java body, compiles against a stub Montoya API, runs fake-request harnesses, checks false positives and emits an importable YAML. Read what they produce. See Burp AI and MCP.

BChecks

Language essentials

  • .bcheck files; mandatory metadata block with name; also language (v1-beta, newer v2-beta), description, author, tags (e.g. a CWE).
  • One given … then scope per check: response, request, host, any insertion point (default), query insertion point, header insertion point, body insertion point, cookie insertion point.
  • send request [called name]: with method, replacing path, headers: overrides; run for each: var = "a", "b" loops; {base.request.url}, {check.response.status_code} variables; matches regex, in substring, to_lower().
  • report issue: with severity, confidence, detail, remediation. Backtick strings interpolate {vars}; double-quoted strings are literal.
  • {generate_collaborator_address()} + if http interactions then for OAST — see Burp Collaborator.

Examples

Missing auth on JSON responses (passive-ish, CWE-864):

metadata:
    language: v1-beta
    name: "Possible missing Authorization header"
    tags: "CWE-864"
given response then
    if {to_lower(base.response.headers)} matches "application/json" then
        if not ("authorization:" in {to_lower(base.response.headers)}) then
            report issue:
                severity: medium
                confidence: firm
                detail: `Possible API call without an Authorization header at {base.request.url}.`
        end if
    end if

Host-level probe:

run for each:
    potential_path = "/security.txt", "/.well-known/security.txt"
given host then
    send request called check:
        method: "GET"
        replacing path: {potential_path}
    if {check.response.status_code} is "200" then
        report issue:
            severity: info
            confidence: firm
            detail: `security.txt at {check.request.url.host}{potential_path}`
    end if

Running them

  • Editor: Extensions > BChecks > New (template picker; built-in editor with syntax highlighting and test tools in Pro).
  • To run only BChecks: build a custom audit config — Dashboard → New scan → Scan configuration → Use a custom configuration → New → Auditing → Issues reported → Select individual issues → keep only BCheck generated issue → Save to library. Use it for targeted scans.
  • BChecks import into Burp Suite DAST too, so a check written during a test becomes fleet-wide regression coverage.

Repo highlights

PortSwigger/BChecks examples: Blind SSRF (OOB), exposed .git, leaked AWS tokens, Log4Shell (OOB), server-side prototype pollution, suspicious input transformation, plus CVE-specific checks. vulnerability-classes/injection contains CRLFInjection, CSVinjection, hidden-input-field XSS, SSRFInjection / ExtendedSSRFInjection, SSTI-Razor, Spring4Shell, template-injection.

Rapid response pattern

For PHP2Shell (CVE-2026-109618/-109619), PortSwigger shipped within hours: a Java custom scan check (Bambda) for active + passive detection, a DAST-compatible BCheck, an ActiveScan++ update, and a Burp AT skill. The general lesson: a new CVE is often a one-file BCheck/Bambda away from coverage across every tester and the DAST estate.

Bambda vs BCheck vs extension

NeedUse
Find/sort rows in huge history, surface a field as a columnBambda filter / column
Rewrite traffic in flight with logicBambda match-and-replace (or Reshaper/Hackvertor)
Quick one-request scan check, portable to DASTBCheck
Scan check needing real code (parsing, state)Bambda custom scan check (Java)
UI tabs, state across requests, protocol decoding, background threads, Collaborator pollingFull extension (Montoya)

Dana Epp’s trade-off: Bambdas skip all extension scaffolding but force Java; BChecks are far quicker than a BApp when you just want to add a check to the scanner.

Sources