Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

OAuthLancer

OAuthLancer is a directed semantic fuzzer for OAuth 2.0 / OIDC authorization servers. It targets protocol-level logic violations rather than crashes: races in single-use credential consumption, redirect-boundary bypasses, PKCE downgrades, token-type confusion, header-parsing faults, scope escalation, outbound-fetch side channels, and revocation survival.

This artifact provides the system source code of OAuthLancer.

How it works

The system has four cooperating parts.

  1. Vulnerability pattern templates (VPT-1..8). Each class names one violation signature, its flexibility-boundary anchor, a generation schema, and an applicability condition. implements/oauthlancer/vpt_map.py maps protocol symbols and differential batteries onto the eight classes.
  2. Template-directed two-layer generation. A skeleton layer assembles protocol-conformant exchanges (login, consent, PKCE, token redemption) through the target adapters in protocol/; an anomaly layer injects class-specific deviations, including barrier-synchronized storms for the race templates (implements/oauthlancer/race_probes.py).
  3. Graded class-specific oracles. Violations score in [0,1] per class signature (implements/oauthlancer/graded_oracle.py, core/security.py); scores feed the scheduler instead of acting as pass/fail only.
  4. Conformance-scored scheduling. Dispatch priority combines class frequency, severity, differential priors, and running score means. The ablation switch (implements/oauthlancer/ablation_fuzzer.py, arms A0-A5 plus SERIAL/NODIFF controls) isolates each contribution.

Repository layout

run_oauth_fuzzing.py        CLI entry point
core/                       engine: config, fuzzer, adapters, oracles, coverage, health
protocol/                   per-target protocol adapters (13 authorization servers)
OAuthMapper/                SUT abstraction layer (symbol-level request/response)
configs/                    target deployment configurations (13 servers)
targets_manager/            deployment managers and service configurations
implements/
  oauthlancer/              VPT map, graded oracles, race probes, ablation arms, runner
  scripts/                  matrix runners and utilities
  configs/                  per-campaign lane configurations (coverage / ablation)
  rq1_baselines/            coverage-instrumented Hydra provisioning and samplers
  patches/                  P1-P7 engine patches (idempotent; apply_patches.py)
  tests/                    smoke tests
validate/targets/hydra/poc/ mock login provider used by Hydra provisioning

Requirements

Python 3.8+ (requests); Docker Engine 20.10+ for target provisioning; Java 11+/Maven only for the optional CXF sample image build. The P1-P7 patches are already reflected in the packaged core/; apply_patches.py is idempotent and included for provenance.

All scripts resolve the repository root by walking up from their own location until core/fuzzer.py is found, so the package can be unpacked anywhere.

Quickstart

# unit test for the graded oracles (no Docker needed)
python3 implements/tests/test_graded_oracle.py

# arm dispatch smoke against a live target (default lane config: configs/oauth_logto.json)
python3 implements/tests/smoke_arms.py --target-config configs/oauth_logto.json --budget 300

# provision a target, then run one directed campaign (six-hour window default)
python3 targets_manager/cxf_oauth_manager.py --action start --config configs/oauth_cxf.json
python3 implements/oauthlancer/runner.py --target cxf_oauth --arm A0 --seed 1 \
    --budget 10000 --base-config configs/oauth_cxf.json --run-dir runs/a0_s1

# ablation matrix: 6 arms x 3 targets x 5 seeds at an equal step budget
python3 implements/scripts/run_ablation_matrix.py

Campaign parameters follow the paper's protocol: generative arms run five seeds in six-hour windows (--timeout-h, default 6; timeout_seconds: 21600 in the lane configs), and the ablation matrix holds an equal 10,000-protocol-step budget per run. A DONE marker records each run's wall-clock budget; re-running a completed cell is idempotent.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages