Skip to content

Webbrute rework: HttpCompare baseline + defensive layers - #3166

Merged
liquidsec merged 7 commits into
devfrom
webbrute-rework
Jun 16, 2026
Merged

Webbrute rework: HttpCompare baseline + defensive layers#3166
liquidsec merged 7 commits into
devfrom
webbrute-rework

Conversation

@liquidsec

Copy link
Copy Markdown
Collaborator

Summary

Overhauls webbrute's false-positive prevention based on field testing against real scan data.

  • HttpCompare baseline: Replaces the old strict size/words/lines equality cascade with HttpCompare (DeepDiff-based). Two baseline requests are diffed to detect dynamic positions (CSRF tokens, timestamps, etc.), which are excluded from future comparisons. This eliminates false-positive floods from servers with per-request dynamic content.

  • Three-layer post-stream validation: Hits are collected before emission and gated by three checks:

    1. Canary -- a random word injected into the wordlist; if it "hits", all results are junk
    2. Mid-scan baseline -- a fresh random URL is re-checked after streaming; if it no longer matches baseline, the server's behavior drifted
    3. Hit cap -- sqrt-scaled threshold (4 * sqrt(wordlist_length)); catches edge cases where the server returns unique content for real words but not random strings
  • WAF avoidance (avoid_wafs, default true): Skips hosts tagged as WAF by cloudcheck. Disabled in dirbust-heavy and kitchen-sink presets.

  • Host-level timeout tracking: Blocks hosts after 50 connection failures (catches packet-dropping WAFs).

  • HttpCompare fix: Added Connection header to the ignore list -- Apache sends Connection: close under load, causing spurious header diffs.

  • Docs: Added docs/modules/webbrute.md covering features, configuration, WAF handling, and false-positive prevention.

  • Tests: 9 tests total (4 pre-existing + 5 new), covering dynamic content filtering, WAF pages, redirect-to-root, wildcard skip, and hit cap validation.

@github-actions

github-actions Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🚀 Performance Benchmark Report

⚠️ No current benchmark data available

This might be because:

  • Benchmarks failed to run
  • No benchmark tests found
  • Dependencies missing

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.46602% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 90%. Comparing base (48a79c3) to head (a7a9ef7).
⚠️ Report is 12 commits behind head on dev.

Files with missing lines Patch % Lines
bbot/modules/webbrute.py 57% 31 Missing ⚠️
bbot/modules/paramminer_headers.py 91% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             dev   #3166    +/-   ##
======================================
+ Coverage     90%     90%    +1%     
======================================
  Files        449     449            
  Lines      44129   44253   +124     
======================================
+ Hits       39447   39572   +125     
+ Misses      4682    4681     -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@liquidsec liquidsec mentioned this pull request Jun 15, 2026
28 tasks
@ausmaster
ausmaster self-requested a review June 15, 2026 22:26
ausmaster
ausmaster previously approved these changes Jun 15, 2026
Replace the strict size/words/lines equality cascade in baseline_fuzz
with HttpCompare, the same DeepDiff-based comparison used by paramminer,
lightfuzz, bypass403, and wildcard detection. Fixes false-positive floods
on hosts with dynamic content (CSRF tokens, timestamps, tracking IDs)
that defeated the old cascade and fell through to status-only filtering.

Also short-circuits extension iteration after the first host-level abort
(WAF, connectivity, 429), saving redundant canary requests.
- avoid_wafs config (default true): skip WAF-tagged hosts in filter_event
- Host-level timeout tracking: block hosts after 50 connection failures
- sqrt-scaled hit cap: discard + block when hits exceed 4*sqrt(wordlist)
- Add Connection header to HttpCompare ignore list (load-dependent noise)
- Disable avoid_wafs in dirbust-heavy and kitchen-sink presets
- Add tests for hit cap system (TestWebBruteHitCap)
- Add webbrute docs page
Base automatically changed from http-wildcard-detection to dev June 15, 2026 22:31
@liquidsec
liquidsec dismissed ausmaster’s stale review June 15, 2026 22:31

The base branch was changed.

@ausmaster
ausmaster self-requested a review June 15, 2026 23:02
@ausmaster
ausmaster self-requested a review June 15, 2026 23:06
@ausmaster ausmaster added this to the BBOT 3.0 - blazed_elijah milestone Jun 15, 2026
@liquidsec
liquidsec merged commit 8bb2291 into dev Jun 16, 2026
17 of 18 checks passed
@liquidsec
liquidsec deleted the webbrute-rework branch June 16, 2026 00:19
@liquidsec liquidsec mentioned this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants