Add service hierarchy reporting to HTTP & modify Jenkins login scanner - #21488
Merged
adfoster-r7 merged 1 commit intoMay 29, 2026
Merged
Conversation
sjanusz-r7
force-pushed
the
add-service-hierarchy-to-login-scanner-subset
branch
4 times, most recently
from
May 21, 2026 16:11
10367ab to
5a42e38
Compare
adfoster-r7
reviewed
May 21, 2026
sjanusz-r7
force-pushed
the
add-service-hierarchy-to-login-scanner-subset
branch
2 times, most recently
from
May 21, 2026 16:57
3781906 to
83cda60
Compare
Contributor
There was a problem hiding this comment.
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) toLoginScanner::Result#to_hfor 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_serviceon successful setup checks). - Pin
metasploit-credentialto a Git fork/branch at version6.0.25to pick up the related credential-side changes.
Impact Analysis:
- Blast radius: medium–high; affects many
Metasploit::Framework::LoginScanner::HTTPdescendants and any modules consuming theirResult#to_houtput, plus bundler dependency resolution for the whole framework. - Data and contract effects:
Result#to_hnow includes additional keys (parents,resource) and many scanners changeservice_namesemantics fromhttp/httpsto 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 |
| 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
force-pushed
the
add-service-hierarchy-to-login-scanner-subset
branch
from
May 28, 2026 22:38
83cda60 to
63a5156
Compare
adfoster-r7
force-pushed
the
add-service-hierarchy-to-login-scanner-subset
branch
from
May 28, 2026 22:44
63a5156 to
eda55c6
Compare
adfoster-r7
approved these changes
May 29, 2026
Contributor
Release NotesUpdates HTTP login scanners to report the detected service hierarchy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates HTTP login scanners to report the detected service hierarchy.
Relevant Metasploit Credential PR: rapid7/metasploit-credential#201
Verification
msfconsoleuse jenkins login scannerrunservicescommand returnsjenkins,httpandtcpservices correctly.