Skip to content

Skip mismatched protocol/port probes for well-known ports - #3234

Merged
liquidsec merged 2 commits into
devfrom
skip-mismatched-port-probes
Jun 23, 2026
Merged

Skip mismatched protocol/port probes for well-known ports#3234
liquidsec merged 2 commits into
devfrom
skip-mismatched-port-probes

Conversation

@liquidsec

Copy link
Copy Markdown
Collaborator

Summary

When the http module receives an OPEN_TCP_PORT event, it speculatively probes both http:// and https:// on that port. For well-known ports (80 and 443), this means every scan generates requests that are almost never useful:

  • http://host:443/ - plain HTTP to a TLS port. Almost always fails or returns garbage.
  • https://host:80/ - TLS handshake to a plain HTTP port. Almost always times out.

These add up to a lot of wasted requests across a scan, especially with many open ports 80/443 targets. The success rate is near zero and the cost is a full request + timeout per target per mismatched combo.

This change makes the http module only probe the expected protocol for ports 80 and 443:

  • Port 443 -> only https://
  • Port 80 -> only http://
  • All other ports -> both (unchanged)

This only affects the speculative probing from OPEN_TCP_PORT events. If a user directly enters http://host:443 as a target, or such a URL is discovered naturally (from a page link, redirect, etc.), it still gets probed normally via the URL/URL_UNVERIFIED path.

@github-actions

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 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90%. Comparing base (ef65b09) to head (c533e63).
⚠️ Report is 2 commits behind head on dev.

Additional details and impacted files
@@          Coverage Diff          @@
##             dev   #3234   +/-   ##
=====================================
+ Coverage     90%     90%   +1%     
=====================================
  Files        453     453           
  Lines      46101   46126   +25     
=====================================
+ Hits       41211   41240   +29     
+ Misses      4890    4886    -4     

☔ 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.

@ausmaster ausmaster assigned ausmaster and liquidsec and unassigned ausmaster Jun 23, 2026
@ausmaster
ausmaster self-requested a review June 23, 2026 18:33
@ausmaster ausmaster added this to the BBOT 3.0 - blazed_elijah milestone Jun 23, 2026
@liquidsec
liquidsec merged commit f1485d6 into dev Jun 23, 2026
17 checks passed
@liquidsec
liquidsec deleted the skip-mismatched-port-probes branch June 23, 2026 19:46
@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