Skip to content

Add service hierarchy reporting to HTTP & modify Jenkins login scanner - #21488

Merged
adfoster-r7 merged 1 commit into
rapid7:masterfrom
sjanusz-r7:add-service-hierarchy-to-login-scanner-subset
May 29, 2026
Merged

Add service hierarchy reporting to HTTP & modify Jenkins login scanner#21488
adfoster-r7 merged 1 commit into
rapid7:masterfrom
sjanusz-r7:add-service-hierarchy-to-login-scanner-subset

Conversation

@sjanusz-r7

@sjanusz-r7 sjanusz-r7 commented May 21, 2026

Copy link
Copy Markdown
Contributor

Updates HTTP login scanners to report the detected service hierarchy.

Relevant Metasploit Credential PR: rapid7/metasploit-credential#201

Verification

  • Start msfconsole
  • use jenkins login scanner
  • run
  • Verify the services command returns jenkins, http and tcp services correctly.

@sjanusz-r7
sjanusz-r7 force-pushed the add-service-hierarchy-to-login-scanner-subset branch 4 times, most recently from 10367ab to 5a42e38 Compare May 21, 2026 16:11
Comment thread lib/metasploit/framework/login_scanner/http.rb Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates service-hierarchy reporting into many HTTP-based login scanners by standardizing how services are represented in LoginScanner::Result and by reporting the detected software service (with HTTP/HTTPS → TCP parents) during check_setup.

Changes:

  • Add service hierarchy fields (parents, resource) to LoginScanner::Result#to_h for downstream credential/service creation.
  • Introduce HTTP helper methods to build hierarchical service option hashes and update numerous HTTP login scanners to use them (and to report_service on successful setup checks).
  • Pin metasploit-credential to a Git fork/branch at version 6.0.25 to pick up the related credential-side changes.

Impact Analysis:

  • Blast radius: medium–high; affects many Metasploit::Framework::LoginScanner::HTTP descendants and any modules consuming their Result#to_h output, plus bundler dependency resolution for the whole framework.
  • Data and contract effects: Result#to_h now includes additional keys (parents, resource) and many scanners change service_name semantics from http/https to a software-specific name with parent services, impacting how services/credentials are stored and displayed.
  • Rollback and test focus: rollback is straightforward but dependency pinning may complicate it; focus testing on Jenkins login scanning + credential creation, DB service creation (including parent chains), and ensuring scanners still work when DB/framework/workspace context is missing or inactive.

Reviewed changes

Copilot reviewed 35 out of 36 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
lib/metasploit/framework/login_scanner/http.rb Adds service hierarchy helpers and uses them in HTTP scanner results; includes service reporting support.
lib/metasploit/framework/login_scanner/result.rb Extends result model and to_h output to carry service parents/resource.
lib/metasploit/framework/login_scanner/base.rb Adds a workspace method used by reporting mixins.
lib/metasploit/framework/login_scanner/jenkins.rb Updates Jenkins scanner to report service hierarchy and emit service info in results.
lib/metasploit/framework/login_scanner/zabbix.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/wowza_streaming_engine_manager.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/wordpress_rpc.rb Uses hierarchical service result fields for WordPress RPC scanning.
lib/metasploit/framework/login_scanner/wordpress_multicall.rb Uses hierarchical service result fields for WordPress multicall scanning.
lib/metasploit/framework/login_scanner/teamcity.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/syncovery_file_sync_backup.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/symantec_web_gateway.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/sonicwall.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/softing_sis.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/smh.rb Uses hierarchical service result fields for SMH scanning.
lib/metasploit/framework/login_scanner/phpmyadmin.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/pfsense.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/opnsense.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/octopusdeploy.rb Uses hierarchical service result fields for Octopus Deploy scanning.
lib/metasploit/framework/login_scanner/nessus.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/mybook_live.rb Uses hierarchical service result fields for MyBook Live scanning.
lib/metasploit/framework/login_scanner/manageengine_desktop_central.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/jupyter.rb Uses hierarchical service result fields for Jupyter scanning.
lib/metasploit/framework/login_scanner/ipboard.rb Uses hierarchical service result fields for IPBoard scanning.
lib/metasploit/framework/login_scanner/ivanti_login.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/gitlab.rb Uses hierarchical service result fields for GitLab scanning.
lib/metasploit/framework/login_scanner/glassfish.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/directadmin.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/cisco_firepower.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/chef_webui.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/caidao.rb Uses hierarchical service result fields for Caidao scanning.
lib/metasploit/framework/login_scanner/buffalo.rb Uses hierarchical service result fields for Buffalo scanning.
lib/metasploit/framework/login_scanner/bavision_cameras.rb Uses hierarchical service result fields and reports service on successful setup.
lib/metasploit/framework/login_scanner/axis2.rb Uses hierarchical service result fields for Axis2 scanning.
lib/metasploit/framework/login_scanner/advantech_webaccess.rb Uses hierarchical service result fields and reports service on successful setup.
Gemfile Pins metasploit-credential to a Git fork/branch to pick up required behavior.
Gemfile.lock Locks bundler to the Git-sourced metasploit-credential revision/version.

end

def workspace
framework_module&.workspace
Comment thread Gemfile Outdated
gem 'webmock', '~> 3.18'
end

gem 'metasploit-credential', '6.0.25', git: 'https://github.com/sjanusz-r7/metasploit-credential.git', branch: 'add-reporting-of-parent-services-to-credential-service'
Comment on lines 7 to +15
class Jenkins < HTTP

# Inherit LIKELY_PORTS,LIKELY_SERVICE_NAMES, and REALM_KEY from HTTP
CAN_GET_SESSION = true
DEFAULT_HTTP_NOT_AUTHED_CODES = [403]
DEFAULT_PORT = 8080
PRIVATE_TYPES = [:password].freeze
LOGIN_PATH_REGEX = /action="(j_([a-z0-9_]+))"/
# TODO: We can potentially append 'Jenkins'/'jenkins' to the LIKELY_SERVICE_NAME as now our service fingerprinting is more granular.
Comment on lines 80 to 84
service_name: service_name,
status: status
status: status,
parents: parents,
resource: resource
)
@adfoster-r7
adfoster-r7 force-pushed the add-service-hierarchy-to-login-scanner-subset branch from 83cda60 to 63a5156 Compare May 28, 2026 22:38
@adfoster-r7
adfoster-r7 force-pushed the add-service-hierarchy-to-login-scanner-subset branch from 63a5156 to eda55c6 Compare May 28, 2026 22:44
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Metasploit Kanban May 29, 2026
@adfoster-r7
adfoster-r7 merged commit 6926ad5 into rapid7:master May 29, 2026
23 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Metasploit Kanban May 29, 2026
@adfoster-r7

Copy link
Copy Markdown
Contributor

Release Notes

Updates HTTP login scanners to report the detected service hierarchy.

@adfoster-r7 adfoster-r7 added the rn-enhancement release notes enhancement label May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement rn-enhancement release notes enhancement

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants