Merged
Conversation
The tower elements are not supposed to be NDR types and they're not allowing the values to be set.
9 tasks
jheysel-r7
approved these changes
Apr 30, 2025
Contributor
jheysel-r7
left a comment
There was a problem hiding this comment.
This has been tested with rapid7/metasploit-framework#20017 as well as with the epm_client.rb example script and looks good 👍
➜ ruby_smb git:(test/msf/20017) ruby examples/epm_client.rb --max-towers 3 172.16.199.130 ncacn_ip_tcp b9785960-524f-11df-8b6d-83dcded72085
Tower: ncacn_ip_tcp:172.16.199.130[57966]
port: 57966
address: 172.16.199.130
Tower: ncacn_ip_tcp:172.16.199.130[49668]
port: 49668
address: 172.16.199.130
Tower: ncacn_ip_tcp:172.16.199.130[49664]
port: 49664
address: 172.16.199.130
➜ ruby_smb git:(test/msf/20017) ruby examples/epm_client.rb --max-towers 1 172.16.199.130 ncacn_np 12345778-1234-abcd-ef00-0123456789ac
Tower: ncacn_np:\\DC3[\pipe\lsass]
pipe: \pipe\lsass
host: \\DC3
➜ ruby_smb git:(test/msf/20017) ruby examples/epm_client.rb --max-towers 3 172.16.199.130 ncacn_ip_tcp 12345778-1234-abcd-ef00-0123456789ac
Tower: ncacn_ip_tcp:172.16.199.130[49664]
port: 49664
address: 172.16.199.130
➜ ruby_smb git:(test/msf/20017) ruby examples/epm_client.rb --max-towers 1 172.16.199.130 ncacn_ip_tcp 12345778-1234-abcd-ef00-0123456789ac
Tower: ncacn_ip_tcp:172.16.199.130[49664]
port: 49664
address: 172.16.199.130
➜ ruby_smb git:(test/msf/20017)
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.
This refactors the endpoint mapping (EPM) functionality defined in MS-RPCE to be more encapsulated, and thus reusable in isolation. An existing DCERPC client will now create a private DCERPC client instance specifically for the EPM service calls needed to map a service to a port for connection. This enables developers to also create their own DCERPC clients specifically for interacting with the EPM service, enabling them to control the exact parameters to the
ept_mapfunction when resolving services.This also includes an example script to demonstrate the functionality for the two protocols that are currently supported.
Demo
In this case, the target system (
192.168.159.10) is a Windows Server 2019 Domain Controller. The example script is used to resolve the GKDI and SAMR endpoints.