@@ -8,7 +8,7 @@ class MetasploitModule < Msf::Auxiliary
8
8
include Msf ::Auxiliary ::Scanner
9
9
include Msf ::Exploit ::Remote ::DCERPC
10
10
Netlogon = RubySMB ::Dcerpc ::Netlogon
11
- @@ dport = nil
11
+ @dport = nil
12
12
13
13
def initialize ( info = { } )
14
14
super (
@@ -44,12 +44,12 @@ def initialize(info = {})
44
44
end
45
45
46
46
def bind_to_netlogon_service
47
- @@ dport = datastore [ 'RPORT' ]
48
- if @@ dport . nil? || @ @dport == 0
49
- @@ dport = dcerpc_endpoint_find_tcp ( datastore [ 'RHOST' ] , Netlogon ::UUID , '1.0' , 'ncacn_ip_tcp' )
50
- fail_with ( Failure ::NotFound , 'Could not determine the RPC port used by the Microsoft Netlogon Server' ) unless @@ dport
47
+ @dport = datastore [ 'RPORT' ]
48
+ if @dport . nil? || @dport == 0
49
+ @dport = dcerpc_endpoint_find_tcp ( datastore [ 'RHOST' ] , Netlogon ::UUID , '1.0' , 'ncacn_ip_tcp' )
50
+ fail_with ( Failure ::NotFound , 'Could not determine the RPC port used by the Microsoft Netlogon Server' ) unless @dport
51
51
end
52
- handle = dcerpc_handle ( Netlogon ::UUID , '1.0' , 'ncacn_ip_tcp' , [ @@ dport ] )
52
+ handle = dcerpc_handle ( Netlogon ::UUID , '1.0' , 'ncacn_ip_tcp' , [ @dport ] )
53
53
print_status ( "Binding to #{ handle } ..." )
54
54
dcerpc_bind ( handle )
55
55
end
@@ -75,7 +75,7 @@ def dsr_get_dc_name_ex2(username)
75
75
def report_username ( domain , username )
76
76
service_data = {
77
77
address : datastore [ 'RHOST' ] ,
78
- port : @@ dport ,
78
+ port : @dport ,
79
79
service_name : 'netlogon' ,
80
80
protocol : 'tcp' ,
81
81
workspace_id : myworkspace_id
0 commit comments