-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix PetitPotam UUID when using EsfRPC with lsarpc
named pipe
#19833
Fix PetitPotam UUID when using EsfRPC with lsarpc
named pipe
#19833
Conversation
@@ -9,6 +9,12 @@ | |||
require 'ruby_smb/dcerpc/lsarpc' | |||
require 'ruby_smb/dcerpc/efsrpc' | |||
|
|||
module RubySMB::Dcerpc::EfsrpcOverLsarpc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want this to be accessible from RubySMB then we should probably move it there. I think this is more of an edge case though for petitpotam though so it make make more sense to just define an EfsrpcOverLsarpc
module in the MetasploitModule
class to avoid altering the global namespace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it makes sense. I've addressed this in b3c2ae4. Thank you!
New and Improved:
Old and busted:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metasploit-framework (S:0 J:0) auxiliary(scanner/dcerpc/petitpotam) > run
[*] 192.168.159.10:445 - Binding to c681d488-d850-11d0-8c52-00c04fd90f7e:1.0@ncacn_np:192.168.159.10[\lsarpc] ...
[*] 192.168.159.10:445 - Bound to c681d488-d850-11d0-8c52-00c04fd90f7e:1.0@ncacn_np:192.168.159.10[\lsarpc] ...
[*] 192.168.159.10:445 - Attempting to coerce authentication via EfsRpcOpenFileRaw
[*] 192.168.159.10:445 - Server responded with ERROR_ACCESS_DENIED (Access is denied.)
[*] 192.168.159.10:445 - Attempting to coerce authentication via EfsRpcEncryptFileSrv
[+] 192.168.159.10:445 - Server responded with ERROR_BAD_NETPATH which indicates that the attack was successful
[*] 192.168.159.10:445 - Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed
metasploit-framework (S:0 J:0) auxiliary(scanner/dcerpc/petitpotam) >
Release NotesThis fixes an issue with the petitpotam module where in the default configuration, an incorrect service UUID was being used. |
According to 3.1.4.2 EFSRPC Interface, the UUID to bind to is different according to which server interface is used:
The current implementation of PetitPotam uses the LsaRPC UUID (
12345778-1234-abcd-ef00-0123456789ab
) when EsfRPC is used with thelsarpc
named pipe. It should bec681d488-d850-11d0-8c52-00c04fd90f7e
instead.This PR fixes this by adding a specific class (
EfsrpcOverLsarpc
), overriding theUUID
constant.Verification
msfconsole
use auxiliary/scanner/dcerpc/petitpotam
run verbose=true rhosts=<remote host> SMBUser=<username> SMBPass=<password> SMBDomain=<domain if needed>
Server responded with ERROR_BAD_NETPATH which indicates that the attack was successful
Before this fix
After the fix