ruby_smb 3.3.4 → 3.3.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 856b8696f918533a035d4ad0019e8d6a32b0bb238117cc93c6f25ee320356465
4
- data.tar.gz: 452cf8e8c441ae206ac4b5c030110a6f315e5b9c8a905d96b16d38ee33c1d4b3
3
+ metadata.gz: 69dcf2cf8fa1b0bfe541d6c8fca903fedeb202a779a57ea8f7603122f0ffdd4a
4
+ data.tar.gz: ea05a9a1c3a6c4120e56b9cd2656b70ffb7aa3f0b857596ae00104236271154c
5
5
  SHA512:
6
- metadata.gz: '08e4cf420f3ea5700d64e0201bf2a131a47d42fb9c20e144f269a431a4e5a8098a610dfcccbc5ec185ebb9b4ef2cbd0ff70cea9fcec37314ee4aa3b819ad16ac'
7
- data.tar.gz: b82a62664bd1d1de60c7726dd422e6e7c48aa76acd45b56b06a6e7f5fde7ab78cf86de50f9936b6aef8e6287eaf043d2e55e40918f850f30aa22e7cdd0d50818
6
+ metadata.gz: 3567cb640cb9221e3bd79adfbb26b9e8a6b2f0baa7b474b61d9fb02e283c72f53148542b5a271263e1c8ea77c9e5c84935123fec5e72c6f2146c8bee563b354f
7
+ data.tar.gz: 8fe76d29d6d96a63bad52c316909263e6e335819fc0bfcc04e2f5d0783c7c526ebb1b89c2c2b53798eebdcdec66954264d10b99cfdb8cccd5c4c488fba6473ad
checksums.yaml.gz.sig CHANGED
Binary file
@@ -66,12 +66,16 @@ module RubySMB::Dcerpc::Ndr
66
66
  end
67
67
 
68
68
  # [Integers](https://pubs.opengroup.org/onlinepubs/9629399/chap14.htm#tagcjh_19_02_05)
69
- # This will define the four size Integers accepted by the NDR protocol:
69
+ # This will define the eight Integers accepted by the NDR protocol:
70
+ # - NdrInt8
70
71
  # - NdrUint8
72
+ # - NdrInt16
71
73
  # - NdrUint16
74
+ # - NdrInt32
72
75
  # - NdrUint32
76
+ # - NdrInt64
73
77
  # - NdrUint64
74
- {Uint8: 1, Uint16le: 2, Uint32le: 4, Uint64le: 8}.each do |klass, nb_bytes|
78
+ {Int8: 1, Uint8: 1, Int16le: 2, Uint16le: 2, Int32le: 4, Uint32le: 4, Int64le: 8, Uint64le: 8}.each do |klass, nb_bytes|
75
79
  new_klass_name = "Ndr#{klass.to_s.chomp('le')}"
76
80
  unless self.const_defined?(new_klass_name)
77
81
  new_klass = Class.new(BinData.const_get(klass)) do
@@ -74,6 +74,7 @@ module RubySMB
74
74
  samr_create_user2_in_domain_request Samr::SAMR_CREATE_USER2_IN_DOMAIN
75
75
  samr_set_information_user2_request Samr::SAMR_SET_INFORMATION_USER2
76
76
  samr_delete_user_request Samr::SAMR_DELETE_USER
77
+ samr_query_information_domain_request Samr::SAMR_QUERY_INFORMATION_DOMAIN
77
78
  string :default
78
79
  end
79
80
  choice 'Wkssvc', selection: -> { opnum } do
@@ -0,0 +1,151 @@
1
+ module RubySMB
2
+ module Dcerpc
3
+ module Samr
4
+ # [2.2.3.5 DOMAIN_PASSWORD_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/0ae356d8-c220-4706-846e-ebbdc6fabdcb)
5
+ class SamprDomainPasswordInformation < Ndr::NdrStruct
6
+ default_parameters byte_align: 4
7
+ endian :little
8
+
9
+ ndr_uint16 :min_password_length
10
+ ndr_uint16 :password_history_length
11
+ ndr_uint32 :password_properties
12
+ ndr_int64 :max_password_age
13
+ ndr_int64 :min_password_age
14
+ end
15
+
16
+ # [2.2.3.12 SAMPR_DOMAIN_OEM_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/7cbb7ff0-e593-440d-8341-a3435195cdf1)
17
+ class SamprDomainOemInformation < Ndr::NdrStruct
18
+ default_parameters byte_align: 4
19
+ endian :little
20
+
21
+ rpc_unicode_string :oem_information
22
+ end
23
+
24
+ # [2.2.3.7 DOMAIN_SERVER_ROLE_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/cb0e586a-29c8-49b2-8ced-c273a7476c22)
25
+ class SamprDomainServerRoleInformation < Ndr::NdrStruct
26
+ default_parameters byte_align: 4
27
+ endian :little
28
+
29
+ ndr_uint16 :domain_server_role
30
+ end
31
+
32
+ # [2.2.3.15 SAMPR_DOMAIN_LOCKOUT_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/c9d789ed-c54a-4450-be56-251e627e1f52)
33
+ class SamprDomainLockoutInformation < Ndr::NdrStruct
34
+ default_parameters byte_align: 4
35
+ endian :little
36
+
37
+ ndr_uint64 :lockout_duration
38
+ ndr_uint64 :lockout_observation_window
39
+ ndr_uint16 :lockout_threshold
40
+ end
41
+
42
+ # [2.2.3.10 SAMPR_DOMAIN_GENERAL_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/85973e1c-96f2-4c80-8135-b24d74ad7794)
43
+ class SamprDomainGeneralInformation < Ndr::NdrStruct
44
+ default_parameters byte_align: 4
45
+ endian :little
46
+
47
+ ndr_int64 :force_logoff
48
+ rpc_unicode_string :oem_information
49
+ rpc_unicode_string :domain_name
50
+ rpc_unicode_string :replica_source_node_name
51
+ ndr_int64 :domain_modified_count
52
+ ndr_uint32 :domain_server_state
53
+ ndr_uint32 :domain_server_role
54
+ ndr_uint8 :uas_compatibility_required
55
+ ndr_uint32 :user_count
56
+ ndr_uint32 :group_count
57
+ ndr_uint32 :alias_count
58
+ end
59
+
60
+ # [2.2.3.6 DOMAIN_LOGOFF_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/6fb0bbea-888c-4353-b5f8-75e7862344be)
61
+ class SamprDomainLogoffInformation < Ndr::NdrStruct
62
+ default_parameters byte_align: 4
63
+ endian :little
64
+
65
+ ndr_int64 :force_logoff
66
+ end
67
+
68
+ # [2.2.3.13 SAMPR_DOMAIN_NAME_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/5131d2c0-04c7-4c1b-8fd5-0b0b6cfa6c24)
69
+ class SamprDomainNameInformation < Ndr::NdrStruct
70
+ default_parameters byte_align: 4
71
+ endian :little
72
+
73
+ rpc_unicode_string :domain_name
74
+ end
75
+
76
+ # [2.2.3.8 DOMAIN_MODIFIED_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/e1da9680-8968-423b-98c0-fbdcf1535ef9)
77
+ class SamprDomainModifiedInformation < Ndr::NdrStruct
78
+ default_parameters byte_align: 4
79
+ endian :little
80
+
81
+ ndr_int64 :domain_modified_count
82
+ ndr_int64 :creation_time
83
+ end
84
+
85
+ # [2.2.3.9 DOMAIN_MODIFIED_INFORMATION2](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/47eea81b-5fee-4925-b5c1-fc594dcc8dff)
86
+ class SamprDomainModifiedInformation2 < Ndr::NdrStruct
87
+ default_parameters byte_align: 4
88
+ endian :little
89
+
90
+ ndr_int64 :domain_modified_count
91
+ ndr_int64 :creation_time
92
+ ndr_int64 :modified_count_at_last_promotion
93
+ end
94
+
95
+ # [2.2.3.3 DOMAIN_STATE_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/f224edcf-8d4e-4294-b0c3-b0eda384c402)
96
+ class SamprDomainStateInformation < Ndr::NdrStruct
97
+ default_parameters byte_align: 4
98
+ endian :little
99
+
100
+ ndr_uint16 :domain_server_state
101
+ end
102
+
103
+ # [2.2.3.11 SAMPR_DOMAIN_GENERAL_INFORMATION2](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/9a663cf2-0923-4959-b2c5-2e25c19735ff)
104
+ class SamprDomainGeneralInformation2 < Ndr::NdrStruct
105
+ default_parameters byte_align: 4
106
+ endian :little
107
+
108
+ sampr_domain_general_information :i1
109
+ ndr_uint64 :lockout_duration
110
+ ndr_uint64 :lockout_observation_window
111
+ ndr_uint16 :lockout_threshold
112
+ end
113
+
114
+ # [2.2.3.14 SAMPR_DOMAIN_REPLICATION_INFORMATION](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/c9293797-e11d-4098-be12-bf9e1de91f20)
115
+ class SamprDomainReplicationInformation < Ndr::NdrStruct
116
+ default_parameters byte_align: 4
117
+ endian :little
118
+
119
+ rpc_unicode_string :replica_node_name
120
+ end
121
+
122
+ # [2.2.3.17 SAMPR_DOMAIN_INFO_BUFFER](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/1adc2142-dbb8-4554-aa24-010c713698bf)
123
+ class SamprDomainInfoBuffer < BinData::Record
124
+ default_parameters byte_align: 4
125
+ endian :little
126
+
127
+ uint16 :info_class
128
+ skip length: 2
129
+
130
+ choice :buffer, selection: :info_class do
131
+ sampr_domain_password_information DOMAIN_PASSWORD_INFORMATION
132
+ sampr_domain_oem_information DOMAIN_OEM_INFORMATION
133
+ sampr_domain_server_role_information DOMAIN_SERVER_ROLE_INFORMATION
134
+ sampr_domain_lockout_information DOMAIN_LOCKOUT_INFORMATION
135
+ sampr_domain_logoff_information DOMAIN_LOGOFF_INFORMATION
136
+ sampr_domain_general_information DOMAIN_GENERAL_INFORMATION
137
+ sampr_domain_name_information DOMAIN_NAME_INFORMATION
138
+ sampr_domain_modified_information DOMAIN_MODIFIED_INFORMATION
139
+ sampr_domain_modified_information2 DOMAIN_MODIFIED_INFORMATION2
140
+ sampr_domain_state_information DOMAIN_STATE_INFORMATION
141
+ sampr_domain_general_information2 DOMAIN_GENERAL_INFORMATION2
142
+ sampr_domain_replication_information DOMAIN_REPLICATION_INFORMATION
143
+ end
144
+ end
145
+
146
+ class PsamprDomainInfoBuffer < SamprDomainInfoBuffer
147
+ extend Ndr::PointerClassPlugin
148
+ end
149
+ end
150
+ end
151
+ end
@@ -0,0 +1,22 @@
1
+ module RubySMB
2
+ module Dcerpc
3
+ module Samr
4
+
5
+ # [3.1.5.5.2 SamrQueryInformationDomain (Opnum 8)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/5d6a2817-caa9-41ca-a269-fd13ecbb4fa8)
6
+ class SamrQueryInformationDomainRequest < BinData::Record
7
+ attr_reader :opnum
8
+
9
+ endian :little
10
+
11
+ sampr_handle :domain_handle
12
+ ndr_uint16 :domain_information_class
13
+
14
+ def initialize_instance
15
+ super
16
+ @opnum = SAMR_QUERY_INFORMATION_DOMAIN
17
+ end
18
+ end
19
+
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,23 @@
1
+ module RubySMB
2
+ module Dcerpc
3
+ module Samr
4
+
5
+ # [3.1.5.5.2 SamrQueryInformationDomain (Opnum 8)](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/5d6a2817-caa9-41ca-a269-fd13ecbb4fa8)
6
+ class SamrQueryInformationDomainResponse < BinData::Record
7
+ attr_reader :opnum
8
+
9
+ endian :little
10
+
11
+ psampr_domain_info_buffer :buffer
12
+ ndr_uint32 :error_status
13
+
14
+ def initialize_instance
15
+ super
16
+ @opnum = SAMR_QUERY_INFORMATION_DOMAIN
17
+ end
18
+ end
19
+
20
+ end
21
+ end
22
+ end
23
+
@@ -16,6 +16,7 @@ module RubySMB
16
16
  SAMR_LOOKUP_DOMAIN_IN_SAM_SERVER = 0x0005
17
17
  SAMR_ENUMERATE_DOMAINS_IN_SAM_SERVER = 0x0006
18
18
  SAMR_OPEN_DOMAIN = 0x0007
19
+ SAMR_QUERY_INFORMATION_DOMAIN = 0x0008
19
20
  SAMR_ENUMERATE_USERS_IN_DOMAIN = 0x000D
20
21
  SAMR_GET_ALIAS_MEMBERSHIP = 0x0010
21
22
  SAMR_LOOKUP_NAMES_IN_DOMAIN = 0x0011
@@ -139,6 +140,20 @@ module RubySMB
139
140
  USER_ALL_SECURITYDESCRIPTOR = 0x10000000
140
141
  USER_ALL_UNDEFINED_MASK = 0xC0000000
141
142
 
143
+ # [2.2.3.16 DOMAIN_INFORMATION_CLASS Values](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/6b0dff90-5ac0-429a-93aa-150334adabf6)
144
+ DOMAIN_PASSWORD_INFORMATION = 1
145
+ DOMAIN_GENERAL_INFORMATION = 2
146
+ DOMAIN_LOGOFF_INFORMATION = 3
147
+ DOMAIN_OEM_INFORMATION = 4
148
+ DOMAIN_NAME_INFORMATION = 5
149
+ DOMAIN_REPLICATION_INFORMATION = 6
150
+ DOMAIN_SERVER_ROLE_INFORMATION = 7
151
+ DOMAIN_MODIFIED_INFORMATION = 8
152
+ DOMAIN_STATE_INFORMATION = 9
153
+ DOMAIN_GENERAL_INFORMATION2 = 11
154
+ DOMAIN_LOCKOUT_INFORMATION = 12
155
+ DOMAIN_MODIFIED_INFORMATION2 = 13
156
+
142
157
  # [2.2.6.28 USER_INFORMATION_CLASS Values](https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-samr/6b0dff90-5ac0-429a-93aa-150334adabf6)
143
158
  USER_GENERAL_INFORMATION = 1
144
159
  USER_PREFERENCES_INFORMATION = 2
@@ -474,6 +489,7 @@ module RubySMB
474
489
  end
475
490
 
476
491
  require 'ruby_smb/dcerpc/samr/rpc_sid'
492
+ require 'ruby_smb/dcerpc/samr/sampr_domain_info_buffer'
477
493
 
478
494
  require 'ruby_smb/dcerpc/samr/samr_connect_request'
479
495
  require 'ruby_smb/dcerpc/samr/samr_connect_response'
@@ -503,6 +519,8 @@ module RubySMB
503
519
  require 'ruby_smb/dcerpc/samr/samr_set_information_user2_response'
504
520
  require 'ruby_smb/dcerpc/samr/samr_delete_user_request'
505
521
  require 'ruby_smb/dcerpc/samr/samr_delete_user_response'
522
+ require 'ruby_smb/dcerpc/samr/samr_query_information_domain_request'
523
+ require 'ruby_smb/dcerpc/samr/samr_query_information_domain_response'
506
524
 
507
525
  # Returns a handle to a server object.
508
526
  #
@@ -979,7 +997,30 @@ module RubySMB
979
997
  samr_get_groups_for_user_reponse.groups.groups.to_ary
980
998
  end
981
999
 
1000
+ # Returns domain information.
1001
+ #
1002
+ # @param domain_handle [RubySMB::Dcerpc::Samr::SamprHandle] An RPC context
1003
+ # representing a domain object
1004
+ # @param info_class [Integer] The class of information to retrieve
1005
+ # @return [BinData::Choice] The requested information.
1006
+ def samr_query_information_domain(domain_handle:, info_class:)
1007
+ samr_request = SamrQueryInformationDomainRequest.new(
1008
+ domain_handle: domain_handle,
1009
+ domain_information_class: info_class
1010
+ )
1011
+ response = dcerpc_request(samr_request)
1012
+ begin
1013
+ samr_response = SamrQueryInformationDomainResponse.read(response)
1014
+ rescue IOError
1015
+ raise RubySMB::Dcerpc::Error::InvalidPacket, 'Error reading SamrQueryInformationDomainResponse'
1016
+ end
1017
+ unless samr_response.error_status == WindowsError::NTStatus::STATUS_SUCCESS
1018
+ raise RubySMB::Dcerpc::Error::SamrError,
1019
+ "Error returned while querying domain information: "\
1020
+ "#{WindowsError::NTStatus.find_by_retval(samr_response.error_status.value).join(',')}"
1021
+ end
1022
+ samr_response.buffer.buffer
1023
+ end
982
1024
  end
983
1025
  end
984
1026
  end
985
-
@@ -53,10 +53,12 @@ module RubySMB
53
53
  end
54
54
 
55
55
  def do_session_setup_smb2(request, session)
56
+ @smb2_related_operations_state.delete(:session_id)
57
+
56
58
  session_id = request.smb2_header.session_id
57
59
  if session_id == 0
58
60
  session_id = rand(1..0xfffffffe)
59
- session = @session_table[session_id] = Session.new(session_id)
61
+ session = Session.new(session_id)
60
62
  else
61
63
  session = @session_table[session_id]
62
64
  if session.nil?
@@ -92,6 +94,10 @@ module RubySMB
92
94
  update_preauth_hash(response)
93
95
  end
94
96
 
97
+
98
+ @session_table[session_id] = session
99
+ @smb2_related_operations_state[:session_id] = session_id
100
+
95
101
  response
96
102
  end
97
103
 
@@ -20,16 +20,46 @@ module RubySMB
20
20
  alias :do_transactions2_smb1 :proxy_share_io_smb1
21
21
 
22
22
  def proxy_share_io_smb2(request, session)
23
- # see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/9a639360-87be-4d49-a1dd-4c6be0c020bd
24
- share_processor = session.tree_connect_table[request.smb2_header.tree_id]
23
+ if request.smb2_header.flags.related_operations == 0
24
+ # see: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/9a639360-87be-4d49-a1dd-4c6be0c020bd
25
+ share_processor = session.tree_connect_table[request.smb2_header.tree_id]
26
+ @smb2_related_operations_state[:tree_id] = request.smb2_header.tree_id
27
+ else
28
+ # see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/46dd4182-62d3-4e30-9fe5-e2ec124edca1
29
+ if @smb2_related_operations_state.fetch(:tree_id) == 0
30
+ response = SMB2::Packet::ErrorPacket.new
31
+ response.smb2_header.nt_status = WindowsError::NTStatus::STATUS_INVALID_PARAMETER
32
+ return response
33
+ end
34
+ share_processor = session.tree_connect_table[@smb2_related_operations_state[:tree_id]]
35
+ end
36
+
25
37
  if share_processor.nil?
26
38
  response = SMB2::Packet::ErrorPacket.new
27
39
  response.smb2_header.nt_status = WindowsError::NTStatus::STATUS_NETWORK_NAME_DELETED
28
40
  return response
29
41
  end
30
42
 
43
+ if request.field_names.include?(:file_id)
44
+ if request.smb2_header.flags.related_operations == 0
45
+ @smb2_related_operations_state[:file_id] = request.file_id
46
+ elsif @smb2_related_operations_state[:file_id].nil?
47
+ response = SMB2::Packet::ErrorPacket.new
48
+ response.smb2_header.nt_status = WindowsError::NTStatus::STATUS_INVALID_HANDLE
49
+ return response
50
+ else
51
+ request.file_id = @smb2_related_operations_state[:file_id]
52
+ end
53
+ end
54
+
31
55
  logger.debug("Received #{SMB2::Commands.name(request.smb2_header.command)} request for share: #{share_processor.provider.name}")
32
- share_processor.share_io(__callee__, request)
56
+ response = share_processor.share_io(__callee__, request)
57
+
58
+ if response.field_names.include?(:file_id)
59
+ @smb2_related_operations_state[:file_id] = response.file_id
60
+ end
61
+
62
+ response
33
63
  end
34
64
 
35
65
  alias :do_close_smb2 :proxy_share_io_smb2
@@ -41,6 +41,8 @@ module RubySMB
41
41
  end
42
42
 
43
43
  def do_tree_connect_smb2(request, session)
44
+ @smb2_related_operations_state.delete(:tree_id)
45
+
44
46
  response = RubySMB::SMB2::Packet::TreeConnectResponse.new
45
47
  response.smb2_header.credits = 1
46
48
  if session.tree_connect_table.length >= MAX_TREE_CONNECTIONS
@@ -75,6 +77,8 @@ module RubySMB
75
77
  session.tree_connect_table[tree_id] = share_processor = share_provider.new_processor(self, session)
76
78
  response.maximal_access = share_processor.maximal_access
77
79
 
80
+ @smb2_related_operations_state[:tree_id] = tree_id
81
+
78
82
  response
79
83
  end
80
84
 
@@ -36,6 +36,7 @@ module RubySMB
36
36
 
37
37
  # session id => session instance
38
38
  @session_table = {}
39
+ @smb2_related_operations_state = {}
39
40
  end
40
41
 
41
42
  #
@@ -334,9 +335,23 @@ module RubySMB
334
335
  # @raise [NotImplementedError] Raised when the requested operation is not
335
336
  # supported.
336
337
  def handle_smb2(raw_request, header)
337
- session = @session_table[header.session_id]
338
+ session_required = !(header.command == SMB2::Commands::SESSION_SETUP && header.session_id == 0)
339
+
340
+ if header.flags.related_operations == 0
341
+ @smb2_related_operations_state.clear
342
+ session = @session_table[header.session_id]
343
+ @smb2_related_operations_state[:session_id] = header.session_id
344
+ else
345
+ # see: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/46dd4182-62d3-4e30-9fe5-e2ec124edca1
346
+ if @smb2_related_operations_state.fetch(:session_id) == 0 && session_required
347
+ response = SMB2::Packet::ErrorPacket.new
348
+ response.smb2_header.nt_status = WindowsError::NTStatus::STATUS_INVALID_PARAMETER
349
+ return response
350
+ end
351
+ session = @session_table[@smb2_related_operations_state[:session_id]]
352
+ end
338
353
 
339
- if session.nil? && !(header.command == SMB2::Commands::SESSION_SETUP && header.session_id == 0)
354
+ if session.nil? && session_required
340
355
  response = SMB2::Packet::ErrorPacket.new
341
356
  response.smb2_header.nt_status = WindowsError::NTStatus::STATUS_USER_SESSION_DELETED
342
357
  return response
@@ -387,7 +402,13 @@ module RubySMB
387
402
  end
388
403
 
389
404
  logger.debug("Dispatching request to #{dispatcher} (session: #{session.inspect})")
390
- send(dispatcher, request, session)
405
+ response = send(dispatcher, request, session)
406
+
407
+ if response.is_a?(SMB2::Packet::ErrorPacket)
408
+ @smb2_related_operations_state.clear
409
+ end
410
+
411
+ response
391
412
  end
392
413
 
393
414
  def _handle_smb2(raw_request)
@@ -1,3 +1,3 @@
1
1
  module RubySMB
2
- VERSION = '3.3.4'.freeze
2
+ VERSION = '3.3.6'.freeze
3
3
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_smb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.4
4
+ version: 3.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -38,7 +38,7 @@ cert_chain:
38
38
  DgscAao7wB3xW2BWEp1KnaDWkf1x9ttgoBEYyuYwU7uatB67kBQG1PKvLt79wHvz
39
39
  Dxs+KOjGbBRfMnPgVGYkORKVrZIwlaboHbDKxcVW5xv+oZc7KYXWGg==
40
40
  -----END CERTIFICATE-----
41
- date: 2024-03-20 00:00:00.000000000 Z
41
+ date: 2024-04-25 00:00:00.000000000 Z
42
42
  dependencies:
43
43
  - !ruby/object:Gem::Dependency
44
44
  name: redcarpet
@@ -309,6 +309,7 @@ files:
309
309
  - lib/ruby_smb/dcerpc/rrp_rpc_unicode_string.rb
310
310
  - lib/ruby_smb/dcerpc/samr.rb
311
311
  - lib/ruby_smb/dcerpc/samr/rpc_sid.rb
312
+ - lib/ruby_smb/dcerpc/samr/sampr_domain_info_buffer.rb
312
313
  - lib/ruby_smb/dcerpc/samr/samr_close_handle_request.rb
313
314
  - lib/ruby_smb/dcerpc/samr/samr_close_handle_response.rb
314
315
  - lib/ruby_smb/dcerpc/samr/samr_connect_request.rb
@@ -333,6 +334,8 @@ files:
333
334
  - lib/ruby_smb/dcerpc/samr/samr_open_domain_response.rb
334
335
  - lib/ruby_smb/dcerpc/samr/samr_open_user_request.rb
335
336
  - lib/ruby_smb/dcerpc/samr/samr_open_user_response.rb
337
+ - lib/ruby_smb/dcerpc/samr/samr_query_information_domain_request.rb
338
+ - lib/ruby_smb/dcerpc/samr/samr_query_information_domain_response.rb
336
339
  - lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_request.rb
337
340
  - lib/ruby_smb/dcerpc/samr/samr_rid_to_sid_response.rb
338
341
  - lib/ruby_smb/dcerpc/samr/samr_set_information_user2_request.rb
@@ -956,7 +959,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
956
959
  - !ruby/object:Gem::Version
957
960
  version: '0'
958
961
  requirements: []
959
- rubygems_version: 3.1.4
962
+ rubygems_version: 3.4.18
960
963
  signing_key:
961
964
  specification_version: 4
962
965
  summary: A pure Ruby implementation of the SMB Protocol Family
metadata.gz.sig CHANGED
Binary file