Security control differential testing

From xalgorix/xalgorix · View interactive version

Security control differential testing is an AI agent skill from the GitHub repository xalgorix/xalgorix. Find security-relevant interpretation gaps between layers - client, CDN, WAF, reverse proxy, API gateway, application, framework - using path normalization, method, encoding, header, and version differentials. The goal is a control that one layer honors and another ignores, not generic WAF bypass.

How to use this skill

Skill file

Security Control Differential Testing

Purpose

Requests pass through a stack - client, CDN, WAF, reverse proxy, API gateway, application, framework/router - and each layer interprets the SAME bytes slightly differently. A security control enforced at one layer but not another is a bypass. This skill hunts the differentials that CHANGE a security outcome, pairing each experiment with a control request so differences are attributable.

The Layer Model

Client -> CDN -> WAF -> reverse proxy -> API gateway -> application -> framework/router

Determine which layers exist first (response headers, Server/Via/X-Cache hints, cookie domains, error pages, timing on block). Not every target has every layer; test the handoffs you actually observe.

Differential Experiments

Each experiment: send the CONTROL (canonical request) and the VARIANT; compare status, headers, body, and - critically - the OUTCOME (was the operation performed?). Use an operation you can verify server-side (an object read/write you can re-fetch).

Path interpretation

Method interpretation

Header interpretation

Version/route interpretation

What Makes a Differential a Finding

The interpretation gap must CHANGE a security outcome:

WAF sees /public      (no block)
backend sees /admin   (route executes)
=> blocked content reached: differential confirmed

gateway authorizes GET only
backend accepts arbitrary verb for the same write
=> the write succeeded through the variant: differential confirmed

JSON validator rejects duplicate keys at the gateway
backend parser uses the SECOND value
=> attacker-controlled second value took effect: differential confirmed

Not a finding by itself: the WAF can be bypassed for a request that the application then correctly rejects, or a path that reaches a public page anyway. A bypass primitive without a security-relevant target is an observation to chain, not a report.

Methodology

map the layers (what proxies/blocks/errors are observable)
-> choose a security-relevant operation you can verify (protected read, state change)
-> capture the canonical request (control)
-> apply ONE interpretation variant
-> compare outcome of control vs variant (status, body, AND backend effect)
-> if outcome differs, minimize which layer diverged (strip layers when possible)
-> report the differential with both requests and the divergent layer named

Evidence Contract

Not enough: the WAF did not block variant X.

Good proof: the variant request performed/reached the operation the control exists to prevent - protected object returned, write persisted, auth check skipped - with the control request's rejection attached for contrast.

Always attach the CONTROL pair: the same request in canonical form showing what the enforcing layer does with it.

Common Misses

False Positives

Xalgorix Tool Strategy

When to Load a Specialist Skill

Stopping Rule

Stop when: the observed layers each have one representative experiment per category (path, method, header, version), each controlled operation was tested with its most-likely variant rather than every variant, and two consecutive experiment rounds produce no new interpretation divergence. A proven differential on one operation should be re-tested on ONE other operation to confirm generality - not on every endpoint.

Handoffs

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.