RPC vulns and services reports resources and parents (service only)#21305
Open
sjanusz-r7 wants to merge 2 commits intorapid7:masterfrom
Open
RPC vulns and services reports resources and parents (service only)#21305sjanusz-r7 wants to merge 2 commits intorapid7:masterfrom
sjanusz-r7 wants to merge 2 commits intorapid7:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds richer reporting metadata to the RPC database endpoints to align with updated service/vulnerability reporting, specifically exposing resource data and service parent relationships to RPC consumers.
Changes:
db.services: refactors service serialization into a helper and addsresource+ recursiveparents.db.vulns: addsresourceto each returned vulnerability.
73697ef to
c07df96
Compare
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.
Closes #21250
This PR adds the reporting of
resourcefor both thedb.vulnsanddb.servicesRPC calls. It also adds theparentsfield to the services only.Tested in Pro, no changes/impact.
Before
db.vulns
no resources
db.services
No resources and no parents
After
db.vulns
db.services
JSON RPC
This also works for JSON RPC:
=> Vulns
{ "port": 445, "proto": "tcp", "time": 1776246892, "host": "x", "name": "ESC15", "refs": "URL-https://trustedsec.com/blog/ekuwu-not-just-another-ad-cs-esc", "resource": { "ldap_dn": "CN=ESC15,CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration,DC=ad,DC=pro,DC=local", "template_name": "ESC15" } },=> services
{ "host": "x", "created_at": 1776246677, "updated_at": 1776246677, "port": 445, "proto": "tcp", "state": "open", "name": "icertpassage", "info": "", "resource": { "dcerpc": { "pipe": "cert" } }, "parents": [ { "host": "x", "created_at": 1776246676, "updated_at": 1776246677, "port": 445, "proto": "tcp", "state": "open", "name": "dcerpc", "info": "", "resource": { "smb": { "share": "IPC$" } }, "parents": [ { "host": "x", "created_at": 1776246676, "updated_at": 1776246676, "port": 445, "proto": "tcp", "state": "open", "name": "smb", "info": "", "resource": {}, "parents": [] } ] } ] },Verification
List the steps needed to make sure this thing works
msfconsoleload msgrpcrpc.call("db.services", {})rpc.call("db.vulns", {})